fix basic auth parsing

This commit is contained in:
Adam C. Baker
2014-10-08 16:37:30 -07:00
parent 5d64258140
commit c9fc2154ab
+1 -1
View File
@@ -77,7 +77,7 @@ httpRequesterRole :: RequestHeaders -> Connection -> IO LoginAttempt
httpRequesterRole hdrs conn = do
let auth = fromMaybe "" $ lookup hAuthorization hdrs
case BS.split ' ' (cs auth) of
("Basic " : b64 : _) ->
("Basic" : b64 : _) ->
case BS.split ':' $ cs (decode $ cs b64) of
(u:p:_) -> signInRole u p conn
_ -> return MalformedAuth