Defect #21949

500 error when adding attachment to issue with name 90989623640.xls

Added by Mark Stroeve over 1 year ago. Updated 8 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Attachments
Target version:-
Resolution:Cant reproduce Affected version:3.2.0

Description

A cutomer uploaded a attachement with the name 90989623640.xls.
When opening the issue afterwards results in a 500 error.

I changed the name 90989623640.xls to file.xls in mysql journal_details.value and attachments.filename en attachement.disk_filename.
And also changed the filename on disk.
Result: the issue can be opened again (no 500).

Completed 500 Internal Server Error in 814ms (ActiveRecord: 81.0ms)

ActionView::Template::Error (90989623640 is out of range for ActiveRecord::Type::Integer with limit 4):
     9: 
    10:     <% if journal.details.any? %>
    11:     <ul class="details">
    12:       <% details_to_strings(journal.visible_details).each do |string| %>
    13:        <li><%= string %></li>
    14:       <% end %>
    15:     </ul>
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:96:in `call_hook'
  app/helpers/issues_helper.rb:427:in `show_detail'
  app/helpers/issues_helper.rb:345:in `block in details_to_strings'
  app/helpers/issues_helper.rb:331:in `each'
  app/helpers/issues_helper.rb:331:in `details_to_strings'
  app/views/issues/_history.html.erb:12:in `block in _app_views_issues__history_html_erb___3453607684228899445_69873229205320'
  app/views/issues/_history.html.erb:2:in `each'
  app/views/issues/_history.html.erb:2:in `_app_views_issues__history_html_erb___3453607684228899445_69873229205320'
  app/controllers/issues_controller.rb:118:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:115:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

History

#1 Updated by Toshi MARUYAMA over 1 year ago

  • Status changed from New to Needs feedback

I cannot reproduce on clean Redmine.
Log says your plugin causes problem.

#2 Updated by Mark Stroeve over 1 year ago

Could you please point me at which plugin/line is the problem?
I can't see any plugin specific files in the loglines

#4 Updated by Mark Stroeve over 1 year ago

How can i find out which plugin causes this issue?
The mentioned file seems to be a core redmine source file.

#5 Updated by Toshi MARUYAMA over 1 year ago

Mark Stroeve wrote:

How can i find out which plugin causes this issue?
The mentioned file seems to be a core redmine source file.

https://github.com/search?q=helper_issues_show_detail_after_setting&type=Code

#6 Updated by Willy Lee 9 months ago

We just hit the same error with a file that had a disk filename of 20150203_135935.jpg where the string 20150203 was what failed to get turned into an int. Just changing the value and old_value fields in the journal_details table allowed the ticket to display again.

#7 Updated by Toshi MARUYAMA 8 months ago

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

Willy Lee wrote:

We just hit the same error with a file that had a disk filename of 20150203_135935.jpg where the string 20150203 was what failed to get turned into an int.

Cannot reproduce.

Also available in: Atom PDF