Fix bug where commit data would not appear in some subdirectories
Fix issue where commit data would not show up in some subdirectories due to escaped slashes. For example:
https://gitlab.common-lisp.net/ecl/ecl/tree/develop/src/gc (now patched with fix)
The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b7) caused slashes in a tree to be escaped automatically. Using a wildcard glob in the route prevents this behavior.
Merge request reports
Activity
mentioned in issue #1478 (closed)
mentioned in issue #1438 (closed)
Added 1 commit:
- ef0055b5 - Fix bug where commit data would not appear in some subdirectories
Can you review this one, @DouweM? Looks like lots of happy customers in the GitHub issue. :)
435 435 member do 436 436 # tree viewer logs 437 437 get 'logs_tree', constraints: { id: Gitlab::Regex.git_reference_regex } 438 get 'logs_tree/:path' => 'refs#logs_tree', as: :logs_file, constraints: { 438 get 'logs_tree/*path' => 'refs#logs_tree', as: :logs_file, constraints: { 439 439 id: Gitlab::Regex.git_reference_regex, 440 440 path: /.*/ Good question. I'm not sure; do we have do some path sanitation (e.g. http://stackoverflow.com/questions/1939333/how-to-make-a-ruby-string-safe-for-a-filesystem)? I know that this change restores the behavior before GitLab v7.9.
We can also go the route of unescaping the path name, but I think the URL will look a bit ugly with lots of
%2F
characteers.@DouweM Thanks for investigating and merging!
mentioned in commit 822ba95f
mentioned in commit c99f4e93
mentioned in commit c311b39f
mentioned in commit e805a647
mentioned in merge request !5824 (merged)
mentioned in commit dd3b738d
mentioned in commit 2193ae22
mentioned in commit 7edc37d1
mentioned in commit ec4549e4
mentioned in commit f673f1e3
mentioned in commit 75f216cb
Mentioned in commit tnir/gitlab-ce@dd3b738d
Mentioned in commit tnir/gitlab-ce@7edc37d1
Mentioned in commit e805a647
Mentioned in commit 2193ae22