summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter D'Haeseleer <wouter.dhaeseleer@vasco.com>2013-01-04 15:05:00 +0100
committerWouter D'Haeseleer <wouter.dhaeseleer@vasco.com>2013-01-04 15:05:00 +0100
commitfd4bcd9f09305c057e91a4f791c74d00da9ac143 (patch)
tree5d13685ba2e07182250d00a6caf597ea40cc18f8
parente6c0673ef1108a93928c4d88ba273e12616b836b (diff)
downloadgitlab-ce-fd4bcd9f09305c057e91a4f791c74d00da9ac143.tar.gz
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"
-rw-r--r--lib/extracts_path.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 0b7a0d47caf..d1e569ce3e5 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -108,7 +108,7 @@ module ExtractsPath
request.format = :atom
end
- path = request.fullpath.dup
+ path = CGI::unescape(request.fullpath.dup)
@ref, @path = extract_ref(path)