Project

General

Profile

Actions

Defect #21949

closed

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

Added by Mark Stroeve almost 9 years ago. Updated almost 8 years ago.

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

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

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'
Actions #1

Updated by Toshi MARUYAMA almost 9 years ago

  • Status changed from New to Needs feedback

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

Actions #2

Updated by Mark Stroeve almost 9 years ago

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

Actions #3

Updated by Toshi MARUYAMA almost 9 years ago

Actions #4

Updated by Mark Stroeve almost 9 years ago

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

Actions #5

Updated by Toshi MARUYAMA almost 9 years 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

Actions #6

Updated by Willy Lee almost 8 years 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.

Actions #7

Updated by Toshi MARUYAMA almost 8 years 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.

Actions

Also available in: Atom PDF