Project

General

Profile

Actions

Patch #26522

closed

Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/

Added by Jens Krämer over 7 years ago. Updated over 6 years ago.

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

0%

Estimated time:

Description

If the first component of a path in a repository equals one of the strings above, the wrong route gets selected in the case of links without repository_id (as they are generated from wiki source: links to the default repository of a project) and the intended action is mistaken for the repository_id parameter. Attached is a patch to the repository routing test illustrating the issue.

I would suggest to change repository#identifier_param to always return an identifier (see second patch) and remove the repository routes without repository_id (rows 280ff in current config/routes.rb).


Files

repository_routing_test.patch (555 Bytes) repository_routing_test.patch illustrates failure of route for certain path Jens Krämer, 2017-07-25 11:42
repository_identifier_param.patch (381 Bytes) repository_identifier_param.patch always return a repository identifier Jens Krämer, 2017-07-25 11:42

Related issues

Related to Redmine - Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manualNew

Actions
Actions #1

Updated by Toshi MARUYAMA over 7 years ago

  • Target version set to 4.0.0
Actions #2

Updated by Jean-Philippe Lang over 6 years ago

  • Subject changed from repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/ to Repository routing bug when file path starts with (browse|entry|raw|changes|annotate|diff)/
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

Routes without repository_id are removed.

Actions #3

Updated by Holger Just about 3 years ago

  • Related to Defect #35885: the change of routing raw files from repositories not included in the upgrade proces/manual added
Actions

Also available in: Atom PDF