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

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

From: Randy Drielinger <Randy@ProWebDesign.nl>
Date: Tue, 24 Mar 2009 15:56:29 +0100
Message-ID: <9B9E69783BF54CE39B0387B2BF7B5B25@emea.inin.com>
So instead of fixing the web, we're "fixing" the spec (and thus implementing 
fakepath in browsers)?


----- Original Message ----- 
From: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>
To: "Ian Hickson" <ian at hixie.ch>
Cc: <whatwg at whatwg.org>
Sent: Tuesday, March 24, 2009 11:00 AM
Subject: Re: [whatwg] "C:\fakepath\" in HTML5


> Ian Hickson wrote:
>> Maybe someone from Opera could let us know which sites caused them to do
>> this? Was it many, as with Microsoft?
>
> I did a quick search through our bugs and found this site that breaks if 
> only the filename is returned because there's an onsubmit script that 
> checks the value for the presence of either a slash or backslash.
>
> 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; }
>
> -- 
> Lachlan Hunt - Opera Software
> http://lachy.id.au/
> http://www.opera.com/
> 
Received on Tuesday, 24 March 2009 07:56:29 GMT

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