]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1828: squid.conf docutemtation error for proxy_auth digest
authorhno <>
Sat, 13 Jan 2007 23:08:19 +0000 (23:08 +0000)
committerhno <>
Sat, 13 Jan 2007 23:08:19 +0000 (23:08 +0000)
Change squid.conf.default notes to document that the digest hash needs to be in
hex (not base64) and make Squid case insensitive on the hex format.

lib/rfc2617.c
src/cf.data.pre

index cf95ef98708403afac5e1bd5cb7c3695c1095401..5c14e86a2b35522b91061528886c3e2847d6ec80 100644 (file)
@@ -13,7 +13,7 @@
 
 
 /*
- * $Id: rfc2617.c,v 1.9 2003/11/07 17:23:03 hno Exp $
+ * $Id: rfc2617.c,v 1.10 2007/01/13 16:08:19 hno Exp $
  *
  * DEBUG:
  * AUTHOR: RFC 2617 & Robert Collins
@@ -83,14 +83,20 @@ CvtBin(const HASHHEX Hex, HASH Bin)
        j = Hex[i];
        if (('0' <= j) && (j <= '9'))
            n = j - '0';
-       else
+       else if (('a' <= j) && (j <= 'f'))
            n = j - 'a' + 10;
+       else if (('A' <= j) && (j <= 'F'))
+           n = j - 'A' + 10;
+       else
+           continue;
        if (i % 2 == 0)
            Bin[i / 2] = n << 4;
        else
            Bin[i / 2] |= n;
     }
-    Bin[HASHLEN] = '\0';
+    for (; i <= HASHHEXLEN; i++) {
+       Bin[i] = '\0';
+    }
 }
 
 
index bf77705c4506c939fdeb1bd22abf6b3d684f1e05..03dd0c55e1fc85a1b919fed13a88430b7903299b 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.427 2006/11/04 15:44:58 hno Exp $
+# $Id: cf.data.pre,v 1.428 2007/01/13 16:08:19 hno Exp $
 #
 #
 # SQUID Web Proxy Cache                http://www.squid-cache.org/
@@ -1813,7 +1813,7 @@ DOC_START
        "program" cmdline
        Specify the command for the external authenticator.  Such
        a program reads a line containing "username":"realm" and
-       replies with the appropriate H(A1) value base64 encoded or
+       replies with the appropriate H(A1) value hex encoded or
        ERR if the user (or his H(A1) hash) does not exists.
        See rfc 2616 for the definition of H(A1).
        "ERR" responses may optionally be followed by a error description