summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-15 10:36:24 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-15 10:36:24 +0000
commit524b3db30ca53449c13cb6bb9a518cfc2c0cacf7 (patch)
tree47b332794787eea77ce7f0a846f3c08468a03cff /config
parent465a20888a0c226be5dbaf0f54da916127b0f220 (diff)
parentd02d02c672bcac0d2ef46204d132645bc69827a8 (diff)
downloadgitlab-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.rb4
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