Project

General

Profile

Actions

Defect #26124

closed

Error 404 when trying to download issue-attached file with url-encoded link

Added by Andrey Iskousnykh almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Issue appears when I try to download file, that is attached to issue and which name contains non-latin chars (russian letters). Somehow file name become corrupted during get request.
Here log parts:
Upload request (OK)

Started POST "/redmine/uploads.js?attachment_id=1&filename=Scan10001%20%E2%80%94%20%D0%BA%D0%BE%D0%BF%D0%B8%D1%8F.jpg&content_type=image%2Fjpeg" for 127.0.0.1 at 2017-06-07 18:02:43 +0300
Processing by AttachmentsController#upload as JS
  Parameters: {"attachment_id"=>"1", "filename"=>"Scan10001 — копия.jpg", "content_type"=>"image/jpeg"}
  Current user: NK (id=3)
Saving attachment 'C:/BitNami/redmine-3.3.0-1/apps/redmine/htdocs/files/2017/06/170607180244_6da4361f84cca44f87c91e3fe3171a32.jpg' (966578 bytes)
  Rendered attachments/upload.js.erb (0.0ms)
Completed 200 OK in 129ms (Views: 0.0ms | ActiveRecord: 80.0ms)

File and db-record are both fine.
Failed download request:
Started GET "/redmine/attachments/download/1452/Scan10001%20‥94%20копия.jpg" for 127.0.0.1 at 2017-06-07 18:02:51 +0300
Processing by AttachmentsController#download as HTML
  Parameters: {"id"=>"1452", "filename"=>"Scan10001 \xE2\x80\x94 \xD0\xBA\xD0\xBE\xD0\xBF\xD0\xB8\xD1\x8F.jpg"}
  Current user: NK (id=3)
  Rendered common/error.html.erb within layouts/base (0.0ms)
Filter chain halted as :find_attachment rendered or redirected
Completed 404 Not Found in 47ms (Views: 15.6ms | ActiveRecord: 15.6ms)

Even log record is corrupted, printscreen of notepad++ attached (unprintable chars present):
partial log opened in notepad++

HTML-anchor in issue looks fine.

My environment:
Redmine is installed using Bitnami Redmine Stack.

Environment:
  Redmine version                3.3.0.stable
  Ruby version                   2.1.8-p440 (2015-12-16) [i386-mingw32]
  Rails version                  4.2.6
  Environment                    production
  Database adapter               Mysql2


Files

prntscr1.PNG (9.23 KB) prntscr1.PNG partial log opened in notepad++ Andrey Iskousnykh, 2017-06-08 17:44
Actions #1

Updated by Toshi MARUYAMA almost 7 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Please ask Bitnami team.

Actions

Also available in: Atom PDF