From c9fc2154abf094781c97b3b25c93ef90f1797e87 Mon Sep 17 00:00:00 2001 From: "Adam C. Baker" Date: Wed, 8 Oct 2014 16:37:30 -0700 Subject: [PATCH] fix basic auth parsing --- src/Dbapi.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dbapi.hs b/src/Dbapi.hs index 7ce42bef5..d7b6d8922 100644 --- a/src/Dbapi.hs +++ b/src/Dbapi.hs @@ -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