Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge 9bb42ea into 026005f
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed May 8, 2018
2 parents 026005f + 9bb42ea commit f9d2b6a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Adapter/Digest.php
Expand Up @@ -162,7 +162,6 @@ public function authenticate()
}

$id = "$this->identity:$this->realm";
$idLength = strlen($id);

$result = [
'code' => AuthenticationResult::FAILURE,
Expand All @@ -178,7 +177,7 @@ public function authenticate()
if (empty($line)) {
break;
}
if (substr($line, 0, $idLength) === $id) {
if (0 === strpos($line, $id)) {
if (CryptUtils::compareStrings(
substr($line, -32),
md5("$this->identity:$this->realm:$this->credential")
Expand Down

0 comments on commit f9d2b6a

Please sign in to comment.