Project

General

Profile

Actions

Defect #26337

closed

Can't download attachments with russian letters in name (from issue)

Added by VVD VVD almost 7 years ago. Updated almost 7 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Work perfect before upgrade from 3.3.3 to 3.4.0.

production.log from 3.4.0:

Started GET "/attachments/5450/%d0%a2%d0%97.pdf" for 10.0.0.1 at 2017-07-04 08:12:53 +0300
Processing by AttachmentsController#show as HTML
  Parameters: {"id"=>"5450", "filename"=>"\xD0\xA2\xD0\x97.pdf"}
  Current user: VVD (id=3)
  Rendered common/error.html.erb within layouts/base (0.2ms)
Filter chain halted as :find_attachment rendered or redirected
Completed 404 Not Found in 76ms (Views: 28.6ms | ActiveRecord: 42.5ms)

production.log from 3.3.3:

Started GET "/attachments/5450/%d0%a2%d0%97.pdf" for 10.0.0.1 at 2017-07-04 08:34:34 +0300
Processing by AttachmentsController#show as HTML
  Parameters: {"id"=>"5450", "filename"=>"ТЗ.pdf"}
  Current user: VVD (id=3)
  Rendered common/_other.html.erb (1.4ms)
  Rendered layouts/_file.html.erb (56.8ms)
  Rendered attachments/other.html.erb within layouts/base (94.4ms)
Completed 200 OK in 297ms (Views: 203.5ms | ActiveRecord: 53.5ms)

Look at difference:

"filename"=>"\xD0\xA2\xD0\x97.pdf"
"filename"=>"ТЗ.pdf"

2nd is correct name.

Work fine with only latin letters in attachment name:
production.log from 3.4.0:

Started GET "/attachments/5490/TZ.pdf" for 10.0.0.1 at 2017-07-04 08:18:21 +0300
Processing by AttachmentsController#show as HTML
  Parameters: {"id"=>"5490", "filename"=>"TZ.pdf"}
  Current user: VVD (id=3)
  Rendered common/_other.html.erb (0.5ms)
  Rendered layouts/_file.html.erb (7.0ms)
  Rendered attachments/other.html.erb within layouts/base (7.4ms)
Completed 200 OK in 79ms (Views: 48.6ms | ActiveRecord: 20.7ms)


Related issues

Has duplicate Redmine - Defect #27076: Cannot open attachements with special characters in filenameClosed

Actions
Actions #1

Updated by Toshi MARUYAMA almost 7 years ago

  • Status changed from New to Needs feedback
  • Priority changed from Urgent to Normal

I cannot reproduce.

Environment:
  Redmine version                3.4.0.stable
  Ruby version                   1.9.3-p551 (2014-11-13) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               SQLite
SCM:
  Subversion                     1.7.14
  Mercurial                      2.8.2
  Git                            1.8.3.1
  Filesystem                     
Redmine plugins:
  no plugin installed

Started GET "/attachments/download/8/%D0%A2%D0%97.txt" for ::1 at 2017-07-04 15:15:22 +0900
Processing by AttachmentsController#download as HTML
  Parameters: {"id"=>"8", "filename"=>"ТЗ.txt"}
  Current user: admin (id=1)
Sent file /REDMINE/WORK-DIR-NO-RAID/MY-REDMINE/test-3.4-stable/files/2017/07/170704150635_f3cf60dff4df61c26c81e2507630cdde.txt (0.0ms)
Completed 200 OK in 128ms (ActiveRecord: 122.5ms)
Started GET "/attachments/download/9/%D0%A2%D0%97.pdf" for ::1 at 2017-07-04 15:15:26 +0900
Processing by AttachmentsController#download as HTML
  Parameters: {"id"=>"9", "filename"=>"ТЗ.pdf"}
  Current user: admin (id=1)
Sent file /REDMINE/WORK-DIR-NO-RAID/MY-REDMINE/test-3.4-stable/files/2017/07/170704151507_7874e7a042efd7db124776adda6517aa.pdf (0.0ms)
Completed 200 OK in 157ms (ActiveRecord: 152.4ms)

Actions #2

Updated by Go MAEDA almost 7 years ago

Could you describe more detail about your environment? (operating system, web server, plugins, etc. Please see Submissions)

Actions #3

Updated by VVD VVD almost 7 years ago

Environment:
  Redmine version                3.4.0.stable
  Ruby version                   2.4.1-p111 (2017-03-22) [amd64-freebsd11]
  Rails version                  4.2.9
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.9.5
  Git                            2.13.2
  Filesystem                     
Redmine plugins:
  news_notifications             0.0.1
  redmine_autorization_extended_app_common 0.0.1
  redmine_autorization_reports   0.0.1
  redmine_autorization_schedule  0.0.1
  redmine_checklists             3.1.5
  redmine_dmsf                   1.5.9
  redmine_image_clipboard_paste  1.0.0
  redmine_issue_reminder         0.1.0
  redmine_meeting_room_calendar  3.0.0
  redmine_reminder               0.3.0
  redmine_timesheet_plugin       0.7.0
  redmine_workflow_hidden_fields 0.3.0
# uname -srm
FreeBSD 11.0-RELEASE-p9 amd64

postgresql96-server-9.6.3_1

Actions #4

Updated by VVD VVD almost 7 years ago

Work fine on:

Environment:
  Redmine version                3.3.3.stable
  Ruby version                   2.3.4-p301 (2017-03-30) [amd64-freebsd11]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.9.5
  Git                            2.13.2
  Filesystem                     
Redmine plugins:
  news_notifications             0.0.1
  redmine_autorization_extended_app_common 0.0.1
  redmine_autorization_reports   0.0.1
  redmine_autorization_schedule  0.0.1
  redmine_checklists             3.1.5
  redmine_dmsf                   1.5.8
  redmine_image_clipboard_paste  1.0.0
  redmine_issue_reminder         0.1.0
  redmine_meeting_room_calendar  3.0.0
  redmine_timesheet_plugin       0.7.0
  redmine_workflow_hidden_fields 0.2.0

Same OS and DBMS.

Actions #5

Updated by VVD VVD almost 7 years ago

Apache 2.4.26, passenger (5.1.4) on 3.3.3.
Apache 2.4.26, passenger (5.1.5) on 3.4.0.

Actions #6

Updated by Toshi MARUYAMA almost 7 years ago

Do you use clean Redmine?
Your Redmine version is 3.4.0 and Rails version is 4.2.9.
But Rails version of Redmine 3.2.1 is 4.2.8.

source:tags/3.4.0/Gemfile#L7

Actions #7

Updated by Toshi MARUYAMA almost 7 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Cant reproduce

I cannot reproduce on Ruby 2.4.1 webrick.

Environment:
  Redmine version                3.4.0.stable
  Ruby version                   2.4.1-p111 (2017-03-22) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               SQLite
SCM:
  Subversion                     1.7.14
  Mercurial                      2.8.2
  Git                            1.8.3.1
  Filesystem                     
Redmine plugins:
  no plugin installed
Actions #8

Updated by Toshi MARUYAMA almost 7 years ago

  • Resolution changed from Cant reproduce to Invalid
Actions #9

Updated by VVD VVD almost 7 years ago

Just downgrade Rails to version 4.2.8 and tested - it's work correct again.

This issue is about compatibility Redmine 3.4.0 and Rails 4.2.9.

Can you rename this issue or I have to create new issue?

Actions #10

Updated by VVD VVD almost 7 years ago

Or may be it's bug in Rails and I have to report it upstream…

Actions #12

Updated by Toshi MARUYAMA over 6 years ago

  • Has duplicate Defect #27076: Cannot open attachements with special characters in filename added
Actions

Also available in: Atom PDF