From 83c400e70c9eb163b271d2b3457916641eb1ab70 Mon Sep 17 00:00:00 2001 From: tassium Date: Mon, 2 Dec 2002 19:33:23 +0000 Subject: [PATCH] Fixed some E_ALL warnings, should now be E_ALL clean. No new functionality. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4202 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/auth.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions/auth.php b/functions/auth.php index 0de160c9..b00efd43 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -73,7 +73,7 @@ function digest_md5_response ($username,$password,$challenge,$service,$host) { $result=digest_md5_parse_challenge($challenge); // verify server supports qop=auth - $qop = explode(",",$result['qop']); + // $qop = explode(",",$result['qop']); //if (!in_array("auth",$qop)) { // rfc2831: client MUST fail if no qop methods supported // return false; @@ -120,7 +120,7 @@ function digest_md5_parse_challenge($challenge) { returns an array. See the RFC for details on what's in the challenge string. */ $challenge=base64_decode($challenge); - while (strlen($challenge)) { + while (isset($challenge)) { if ($challenge{0} == ',') { // First char is a comma, must not be 1st time through loop $challenge=substr($challenge,1); } @@ -142,7 +142,11 @@ function digest_md5_parse_challenge($challenge) { } else { // We're in a "simple" value - explode to next comma $val=explode(',',$challenge,2); - $challenge=$val[1]; + if (isset($val[1])) { + $challenge=$val[1]; + } else { + unset($challenge); + } $value=$val[0]; } $parsed["$key"]=$value; -- 2.25.1