* use strbuf base64 decoding instead of the plain one. next todo.
authorWilfried Göesgens <willi@citadel.org>
Wed, 11 Feb 2009 20:07:40 +0000 (20:07 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 11 Feb 2009 20:07:40 +0000 (20:07 +0000)
webcit/webcit.c

index 6715fe4836a5d0537be72426a8b8b5ca631c663b..8b8450f1dde98273d67ec1b2da0ae65e617c4706 100644 (file)
@@ -633,12 +633,9 @@ void session_loop(HashList *HTTPHeaders, StrBuf *ReqLine, StrBuf *request_method
        }
        if (GetHash(HTTPHeaders, HKEY("AUTHORIZATION"), &vLine) &&
            (vLine!=NULL)) {
-/* TODO: wrap base64 in strbuf */
-               CtdlDecodeBase64(c_httpauth_string, ChrPtr((StrBuf*)vLine), StrLength((StrBuf*)vLine));
-               FlushStrBuf(Buf);
-               StrBufAppendBufPlain(Buf, c_httpauth_string, -1, 0);
-               StrBufExtract_token(c_httpauth_user, Buf, 0, ':');
-               StrBufExtract_token(c_httpauth_pass, Buf, 1, ':');
+               StrBufDecodeBase64((StrBuf*)vLine);
+               StrBufExtract_token(c_httpauth_user, (StrBuf*)vLine, 0, ':');
+               StrBufExtract_token(c_httpauth_pass, (StrBuf*)vLine, 1, ':');
        }
        if (GetHash(HTTPHeaders, HKEY("CONTENT-LENGTH"), &vLine) &&
            (vLine!=NULL)) {