Project

General

Profile

Actions

Defect #11365

closed

Attachment description length is not validated

Added by Anonymous over 12 years ago. Updated over 12 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I received an internal server error (500) when attaching an image to a post, because the 'optional description' was too long.

I suggest adding 'maxlength="255"' to the optional description html.

Database manager version: PostgreSQL: 9.0.5
Ruby version: Ruby 1.8.7
Rails version: Rails 3.1.3

Below are the error details:
ActiveRecord::StatementInvalid (PG::Error: ERROR: value too long for type character varying(255)
: UPDATE "attachments" SET "description" = 'example of small countdown in a banner. ideally they could b the same style countdown. the banner might have a solid background color to make it more noticeable though for example, up to you though. keep in mind it will be displayed on a variety of background images e.g. next attached images', "container_type" = 'Issue', "container_id" = 1341 WHERE "id" = 124):
app/models/issue.rb:732:in `save_issue_with_child_records'
app/models/issue.rb:719:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:182:in `update'
passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronise'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) helper-scripts/passenger-spawn-server:99

Rendering /Library/Server/Web/Data/Sites/redmine-1.4/public/500.html (500 Internal Server Error)

Actions #1

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from New to Confirmed
Actions #2

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.0.4
  • Resolution set to Fixed

Description length is now validated and a maxlength=255 attribute was added to the description field.

Actions #3

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from Resolved to Closed

Merged in 2.0 and 1.4.

Actions #4

Updated by Jean-Philippe Lang over 12 years ago

  • Subject changed from Attachment maxlength issue to Attachment description length is not validated
Actions

Also available in: Atom PDF