summaryrefslogtreecommitdiff
path: root/src/catlfish_web.erl
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-02-27 13:51:09 +0100
committerMagnus Ahltorp <map@kth.se>2015-02-27 13:51:09 +0100
commit0b82926a7f6c342f5942fb8e7181791460a3267e (patch)
treed7e16308392f41979d00378043dcd9de4751e855 /src/catlfish_web.erl
parent6b4d4105d57b590b242c7ad6655dadc89330133f (diff)
Verify raw query string instead of parsed
Diffstat (limited to 'src/catlfish_web.erl')
-rw-r--r--src/catlfish_web.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/catlfish_web.erl b/src/catlfish_web.erl
index 0518597..5ee5743 100644
--- a/src/catlfish_web.erl
+++ b/src/catlfish_web.erl
@@ -25,7 +25,8 @@ loop(Req, Module) ->
case Req:get(method) of
'GET' ->
Query = Req:parse_qs(),
- Result = case http_auth:verify_auth(AuthHeader, "GET", "/" ++ Path, Query) of
+ {_, RawQuery, _} = mochiweb_util:urlsplit_path(Req:get(raw_path)),
+ Result = case http_auth:verify_auth(AuthHeader, "GET", "/" ++ Path, RawQuery) of
failure ->
{403, [{"Content-Type", "text/plain"}], "Invalid credentials"};
success ->