Skip to content

Commit fd4bcd9

Browse files
author
Wouter D'Haeseleer
committed
Fixing request.fullpath URL encoding
Let's assume your path is = "project/tree/master/This%20Is%20valid" In this case gitlab renders a 404. To fix this we should decode the path so that it looks like "project/tree/master/This Is valid"
1 parent e6c0673 commit fd4bcd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/extracts_path.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def assign_ref_vars
108108
request.format = :atom
109109
end
110110

111-
path = request.fullpath.dup
111+
path = CGI::unescape(request.fullpath.dup)
112112

113113
@ref, @path = extract_ref(path)
114114

0 commit comments

Comments
 (0)