Details
Description
Uploading an archive with IE fails because the uploaded file name contains the full path. This is due to the different behaviour to commons-upload FileItem, depending on the browser.
The uploaded file name needs to be stripped of any path prefix, if present.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | web-2.1.4 [ 15894 ] |
Mauro Talevi
made changes -
Summary | Incorrect uploaded filename handling on Windows IE | Incorrect uploaded filename on Windows IE |
Description |
Uploading an archive with IE fails because the uploaded file name is not properly recognised. So it tries to append full path, e.g. for file C:\archive.zip and upload dir C:\Documents and Settings\user\upload, it tries to upload to C:\Documents and Settings\user\upload\C:\archive.zip, which fails. The uploaded file name needs to be stripped of any path prefix, if present. |
Uploading an archive with IE fails because the uploaded file name contains the full path. This is due to the different behaviour to commons-upload FileItem, depending on the browser. The uploaded file name needs to be stripped of any path prefix, if present. |
Mauro Talevi
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Mauro Talevi
made changes -
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Assignee | Mauro Talevi [ maurotalevi ] | |
Resolution | Fixed [ 1 ] |
Mauro Talevi
made changes -
Fix Version/s | web-2.1.5 [ 16021 ] |
Mauro Talevi
made changes -
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Using new File(path).getName() to extract the file name (without parent path info) only works when client and server use same file separator.
Need to use a cross-platform solution like Commons-IO FilenameUtils.getName(path)