404 on new issue with special chars/encoding
Created by: oscx
Gitlab 6.4.3
When adding/editing an issue with content like
...
- foo -> bar
- foobar
gitlab does not save the issue. If it's a new issue, then I end up with 404 because the issue id does not exist since the content has not been stored in db.
This is reproducable in one specific project. As soon as I remove ->
from the issue description/text, I can save and proceed.
When trying to post the same with another project, exactly the same title/descriptions/tags/assignee etc., there is no issue.
Checking the logs:
Started POST "/nlegas-android/furtave/issues" for 127.0.0.1 at 2014-01-14 08:43:15 +0100
Processing by Projects::IssuesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"Gp4L9IGFIdOzY0ZQAy7i6WTgkakQRw+FWNN5EWo1l8Y=", "issue"=>{"title"=>"encoding bug issue", "assignee_id"=>"33", "milestone_id"=>"", "label_list"=>"test_tag", "description"=>"... 1. foo -> bar 2. foobar"}, "project_id"=>"nlegas-android/furtave"}
Started GET "/nlegas-ios/furtavl/notes.json?target_type=issue&target_id=358" for 127.0.0.1 at 2014-01-14 08:43:16 +0100
Processing by Projects::NotesController#index as JSON
Parameters: {"target_type"=>"issue", "target_id"=>"358", "project_id"=>"nlegas-ios/furtavl"}
Rendered projects/notes/_note.html.haml (20.6ms)
Rendered projects/notes/_note.html.haml (10.8ms)
Rendered projects/notes/_note.html.haml (9.3ms)
Rendered projects/notes/_note.html.haml (13.5ms)
Rendered projects/notes/_note.html.haml (14.4ms)
Rendered projects/notes/_note.html.haml (8.6ms)
Rendered projects/notes/_notes.html.haml (90.9ms)
Completed 200 OK in 181ms (Views: 2.4ms | ActiveRecord: 9.8ms)
Redirected to http://gitlab.intra.net/nlegas-android/furtave/issues/2
Completed 302 Found in 802ms (ActiveRecord: 41.0ms)
Started GET "/nlegas-android/furtave/issues/2" for 127.0.0.1 at 2014-01-14 08:43:19 +0100
Processing by Projects::IssuesController#show as HTML
Parameters: {"project_id"=>"nlegas-android/furtave", "id"=>"2"}
ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound):
app/controllers/projects/issues_controller.rb:134:in `redirect_old'
app/controllers/projects/issues_controller.rb:102:in `rescue in issue'
app/controllers/projects/issues_controller.rb:99:in `issue'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'
Rendered errors/not_found.html.haml within layouts/errors (2.2ms)
Rendered layouts/_head.html.haml (6.8ms)
Rendered layouts/_search.html.haml (478.3ms)
Rendered layouts/_head_panel.html.haml (499.8ms)
Rendered layouts/_flash.html.haml (3.0ms)
Completed 404 Not Found in 617ms (Views: 492.6ms | ActiveRecord: 50.4ms)
Started GET "/nlegas-android/furtave/edit" for 127.0.0.1 at 2014-01-14 08:40:07 +0100
Processing by ProjectsController#edit as HTML
Parameters: {"id"=>"nlegas-android/furtave"}
Rendered projects/_visibility_level.html.haml (3.3ms)
Rendered projects/edit.html.haml within layouts/project_settings (50.6ms)
Rendered layouts/_head.html.haml (1.5ms)
Rendered layouts/_broadcast.html.haml (2.5ms)
Rendered layouts/_search.html.haml (444.5ms)
Rendered layouts/_head_panel.html.haml (454.1ms)
Rendered layouts/_init_auto_complete.html.haml (0.8ms)
Rendered layouts/_flash.html.haml (0.4ms)
Rendered shared/_no_ssh.html.haml (2.4ms)
Rendered layouts/nav/_project.html.haml (19.6ms)
Rendered projects/_settings_nav.html.haml (3.1ms)
Completed 200 OK in 652ms (Views: 515.1ms | ActiveRecord: 34.5ms)
Started GET "/nlegas-android/furtave/team" for 127.0.0.1 at 2014-01-14 08:40:09 +0100
Processing by Projects::TeamMembersController#index as HTML
Parameters: {"project_id"=>"nlegas-android/furtave"}
Rendered projects/team_members/_team_member.html.haml (10.1ms)
Rendered projects/team_members/_team_member.html.haml (6.6ms)
Rendered projects/team_members/_team_member.html.haml (6.5ms)
Rendered projects/team_members/_team.html.haml (28.5ms)
Rendered users_groups/_users_group.html.haml (6.2ms)
Rendered users_groups/_users_group.html.haml (5.9ms)
Rendered users_groups/_users_group.html.haml (5.5ms)
Rendered users_groups/_users_group.html.haml (5.7ms)
Rendered projects/team_members/_group_members.html.haml (29.2ms)
Rendered projects/team_members/index.html.haml within layouts/project_settings (65.0ms)
Rendered layouts/_head.html.haml (1.8ms)
Rendered layouts/_broadcast.html.haml (2.7ms)
Rendered layouts/_search.html.haml (271.3ms)
Rendered layouts/_head_panel.html.haml (280.3ms)
Rendered layouts/_init_auto_complete.html.haml (0.8ms)
Rendered layouts/_flash.html.haml (0.4ms)
Rendered shared/_no_ssh.html.haml (2.7ms)
Rendered layouts/nav/_project.html.haml (209.0ms)
Rendered projects/_settings_nav.html.haml (3.6ms)
Completed 200 OK in 861ms (Views: 548.5ms | ActiveRecord: 36.8ms)
Any ideas what's wrong there?