View Issue Details

IDProjectCategoryView StatusLast Update
0009785mantisbtotherpublic2013-01-17 18:29
Reporterartgroup Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.2 
Summary0009785: Blank spaces in filename in docs are replaced with '+' when downloading the file
Description

If the file name uploaded to docs is with blank space when the file is downloaded each blank space is replaced with '+'.
For example the uploaded filename "a b c d e f g.txt" when is downloaded from the user the saved file name is "a+b+c++d+e+f+g.txt"

TagsNo tags attached.

Activities

artgroup

artgroup

2008-11-07 07:22

reporter   ~0019799

I found a possible fix even I'm not sure if it's a good solution.
Change the line 100 in file_download.php with this one:
header( 'Content-Disposition:' . $t_disposition . ' filename="' . urldecode( $t_filename ) . '"' );# urlencode( $t_filename ) . '"' );

where I replaced the "urlencode" with "urldecode"

jreese

jreese

2008-11-07 10:48

reporter   ~0019803

That's an incorrect fix. The proper fix is to replace urlencode() with a call to rawurlencode().

artgroup

artgroup

2008-11-07 11:08

reporter   ~0019804

I tried your suggestion and the result of the downloaded file is:
a%20b%20c%20%20d%20e%20f%20g.bmp

I'm not an expert but encode convert the blank to "%20" while decode the viceversa.

jreese

jreese

2008-11-07 13:50

reporter   ~0019806

Sorry, you are correct. I was mis-interpreting the context of the problem.

atrol

atrol

2013-01-07 15:29

developer   ~0034729

This issue is not reproducible with the current version of MantisBT.

We recommend that you upgrade to the latest stable version [1]; if after doing so the problem persists, do not hesitate to reopen the issue, with additional relevant information.

[1] https://sourceforge.net/projects/mantisbt/files/mantis-stable/