https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-08-02T04:54:24ZRedmineRedmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=401382012-08-02T04:54:24ZOlivier Mehani
<ul><li><strong>File</strong> <a href="/attachments/8047">a+b</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8047/a+b">a+b</a> added</li></ul> Redmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=401392012-08-02T04:55:10ZOlivier Mehani
<ul></ul><p>Right, my experiment shows that I am not up to date. Is this a known bug that has already been addressed? I couldn't find it in the issues.</p> Redmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=401432012-08-02T11:32:27ZEtienne Massip
<ul><li><strong>Category</strong> set to <i>Attachments</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>Redmine.org is not running the latest version but <a href="http://demo.redmine.org" class="external">demo</a> is.</p>
<p>And indeed, it happens with trunk.</p> Redmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=403592012-08-14T08:16:40ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Seems to be a Rails issue. The + is already replaced with a space in the <code>original_filename</code> found in attachment params:</p>
<pre>
"attachments"=>{"1"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0x4c11fa8 @original_filename="test plus.txt",
@content_type="text/plain", @headers="Content-Disposition: form-data; name=\"attachments[1][file]\";
filename=\"test+plus.txt\"\r\nContent-Type: text/plain\r\n", @tempfile=#<File:xxx/RackMultipart20120814-2236-ogyxbd>>, "description"=>""}}
</pre> Redmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=491142013-05-05T18:23:28ZJean-Baptiste Barth
<ul></ul><p>It works now fine on 2.3.1 and trunk, but confirmed broken on 2.2.4 and 2.1.6.</p>
<p>Relevant log on a fresh install: <pre>
redmine-2.2.4/log/development.log: Parameters: [...] "attachments"=>{"1"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0x007fcb8a55e5d0
@original_filename="a b.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"attachments[1][file]\";
filename=\"a+b.txt\"\r\nContent-Type: text/plain\r\n", @tempfile=#<File:/var/folders/2d/ym9f6qbd61x6_xxc51f17wq40000gn/T/
RackMultipart20130505-96276-1v561qz>>, "description"=>""}}, [...]
redmine-2.3.1/log/development.log: Parameters: [...] "attachments"=>{"1"=>{"filename"=>"a+b.txt", "description"=>"",
"token"=>"1.0d599f0ec05c3bda8c3b8a68c32a1b47"}} [...]
</pre></p>
<p>The fix is probably related to <a class="changeset" title="Merged ajax_upload branch (#3957)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/10977">r10977</a> ?</p>
<p>Now that it works I think we need to add some tests to ensure it won't break again.</p> Redmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=619352015-03-06T09:49:32ZGo MAEDA
<ul></ul><p>Olivier Mehani wrote:</p>
<blockquote>
Steps to reproduce:
<ol>
<li>Create a file with a '+' in its name (say, "a+b");</li>
<li>Upload it in the files section of a Redmine project</li>
<li>The file appears as "a b", and the download link leads to ".../a%20b"</li>
</ol>
<p>While the file downloads correctly, it is inconvenient to have one's file renamed without control.</p>
</blockquote>
<p>No problem on Redmine 3.0.0.<br />It seems that we can close this issue.</p> Redmine - Defect #11568: Uploaded file name gets mangled when it contains a +https://www.redmine.org/issues/11568?journal_id=968752020-03-20T16:35:10ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Closed</i></li><li><strong>Target version</strong> deleted (<del><i>Candidate for next minor release</i></del>)</li></ul><p>No problem on Redmine 4.1.</p>