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

Lachlan Hunt lachlan.hunt at lachy.id.au
Tue Mar 24 03:00:19 PDT 2009


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/



More information about the whatwg mailing list