W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] "C:\fakepath\" in HTML5

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 24 Mar 2009 10:11:52 -0400
Message-ID: <49C8EA28.2010104@mit.edu>
Lachlan Hunt wrote:
> https://www.freedfm.com/
> 
> Specifically, the following code:
> 
> if((strFileName.indexOf("\\") == -1) && (strFileName.indexOf("/") == -1))
> {
>   alert("Please do not type your filename. Click Browse and upload your 
> zip file.");
>   document.fileupload.UploadFileData.focus();
>   return false;   
> }

I just tried this in a current Firefox.  The site worksforme, if we're 
talking about the ZIP upload on the front page.

The code you mentioned is commented out in their JS, like so:

   /* KRC 6/19/2008 #8234
   ...
   */

They still have various other silly checks (like requiring a filename 
that's at least 6 characters long without telling the user that's what 
they require), but that's not really relevant to this discussion.

-Boris
Received on Tuesday, 24 March 2009 07:11:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT