diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-15 10:36:24 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-15 10:36:24 +0000 |
commit | 524b3db30ca53449c13cb6bb9a518cfc2c0cacf7 (patch) | |
tree | 47b332794787eea77ce7f0a846f3c08468a03cff /config | |
parent | 465a20888a0c226be5dbaf0f54da916127b0f220 (diff) | |
parent | d02d02c672bcac0d2ef46204d132645bc69827a8 (diff) | |
download | gitlab-ce-524b3db30ca53449c13cb6bb9a518cfc2c0cacf7.tar.gz |
Merge branch 'fix-path-with-leading-dot-error' into 'master'
Fix error preventing displaying of commit data for a directory with a leading dot
Directories with leading dots erroneously get rejected by the route controller if git
ref regex is used in constraints. This prevents commit data from being loaded. The regex verification is now done in controller.
Closes https://github.com/gitlabhq/gitlabhq/issues/8763
See merge request !1574
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index 8e6fbf6340c..893ab59c327 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -543,8 +543,10 @@ Gitlab::Application.routes.draw do member do # tree viewer logs get 'logs_tree', constraints: { id: Gitlab::Regex.git_reference_regex } + # Directories with leading dots erroneously get rejected if git + # ref regex used in constraints. Regex verification now done in controller. get 'logs_tree/*path' => 'refs#logs_tree', as: :logs_file, constraints: { - id: Gitlab::Regex.git_reference_regex, + id: /.*/, path: /.*/ } end |