500 if control characters in filenames on tree show
Created by: cirosantilli
Repo works on GitHub: https://github.com/cirosantilli/test-control-chars
Fails on GitLab: https://gitlab.com/cirosantilli/test-control-chars/tree/master
Log:
Started GET "/root/gitlab-test-control-chars/tree/master" for 127.0.0.1 at 2014-11-25 12:19:58 +0100
Processing by Projects::TreeController#show as HTML
Parameters: {"project_id"=>"root/gitlab-test-control-chars", "id"=>"master"}
[1m[36mUser Load (3.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
[1m[35mNamespace Load (2.2ms)[0m SELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."path" = 'root' LIMIT 1
[1m[36mProject Load (3.4ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."namespace_id" = 1 AND "projects"."path" = 'gitlab-test-control-chars' LIMIT 1[0m
[1m[35mProjectMember Load (1.4ms)[0m SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $1 AND "members"."source_type" = $2 AND "members"."user_id" = 1 LIMIT 1 [["source_id", 10], ["source_type", "Project"]]
[1m[36mGroup Load (1.0ms)[0m [1mSELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."type" IN ('Group') AND "namespaces"."id" = $1 AND "namespaces"."type" = 'Group' LIMIT 1[0m [["id", 1]]
[1m[35mNamespace Load (1.0ms)[0m SELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."id" = $1 LIMIT 1 [["id", 1]]
[1m[36mUser Load (1.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1]]
Rendered shared/_ref_switcher.html.haml (4.4ms)
Rendered projects/repositories/_download_archive.html.haml (11.0ms)
[1m[35mProtectedBranch Load (1.5ms)[0m SELECT "protected_branches".* FROM "protected_branches" WHERE "protected_branches"."project_id" = $1 [["project_id", 10]]
Rendered projects/tree/_spinner.html.haml (1.6ms)
Rendered projects/tree/_spinner.html.haml (0.1ms)
Rendered projects/tree/_spinner.html.haml (0.1ms)
Rendered projects/tree/_spinner.html.haml (0.1ms)
Rendered projects/tree/_spinner.html.haml (0.1ms)
Rendered projects/tree/_blob_item.html.haml (14.1ms)
Rendered projects/tree/_tree.html.haml (54.9ms)
Rendered projects/tree/show.html.haml within layouts/projects (79.7ms)
Completed 500 Internal Server Error in 366ms
ActionController::UrlGenerationError - No route matches {:action=>"show", :controller=>"projects/blob", :format=>nil, :id=>"master/a\nb", :project_id=>#<Project id: 10, name: "gitlab-test-control-chars", path: "gitlab-test-control-chars", description: "", created_at: "2014-11-25 11:17:57", updated_at: "2014-11-25 11:19:22", creator_id: 1, issues_enabled: true, wall_enabled: false, merge_requests_enabled: true, wiki_enabled: true, namespace_id: 1, issues_tracker: "gitlab", issues_tracker_id: nil, snippets_enabled: false, last_activity_at: "2014-11-25 11:19:22", import_url: "", visibility_level: 20, archived: false, import_status: "none", repository_size: 0.17, star_count: 0>} missing required keys: [:id]:
then the huge trace.