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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Servlets
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: 62298
    
  68

That is a security bug in IE.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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:

 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: upload file - different browsers send different path name