From 31dd6e3c0a037d18e88f6dbde10d1369b15ca6d4 Mon Sep 17 00:00:00 2001 From: avel Date: Wed, 1 Nov 2006 15:24:54 +0000 Subject: [PATCH] I should read RFC 2831 more carefully: DIGEST-MD5 with authzid needs one more tweak. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11942 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/auth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/auth.php b/functions/auth.php index 4fcc53f9..49a0b1f1 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -152,6 +152,9 @@ function digest_md5_response ($username,$password,$challenge,$service,$host,$aut $string_a1 .= utf8_encode($password); $string_a1 = hmac_md5($string_a1); $A1 = $string_a1 . ":" . $result['nonce'] . ":" . $cnonce; + if(!empty($authz)) { + $A1 .= ":" . utf8_encode($authz); + } $A1 = bin2hex(hmac_md5($A1)); $A2 = "AUTHENTICATE:$digest_uri_value"; // If qop is auth-int or auth-conf, A2 gets a little extra -- 2.25.1