aspose file tools
The moose likes Servlets and the fly likes upload file - different browsers send different path name Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "upload file - different browsers send different path name" Watch "upload file - different browsers send different path name" New topic
Author

upload file - different browsers send different path name

Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Hi guys,

I use the following code to save a uploaded file on server:



If the file uploaded by Firefox, the fileName contains only file name.
If the file uploaded by IE, the fileName contains absolute path on client's computer which may exposes security threat.

So why's the different?


Advanced java topics
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

That is a security bug in IE.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Bear Bibeault wrote:That is a security bug in IE.

I tested with IE 6, maybe the later version fixes the bug.
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
I have to use this workaround:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: upload file - different browsers send different path name
 
Similar Threads
how to upload file
Store file in access
Submit multipart and form data
upload file question
How do I get request parameters when the form is encoded?