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

Commit 832fe58

Browse files
committed
Merge branch 'feature/39' into develop
Close #39
2 parents 19f407d + 9bb42ea commit 832fe58

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Adapter/Digest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ public function authenticate()
162162
}
163163

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

167166
$result = [
168167
'code' => AuthenticationResult::FAILURE,
@@ -178,7 +177,7 @@ public function authenticate()
178177
if (empty($line)) {
179178
break;
180179
}
181-
if (substr($line, 0, $idLength) === $id) {
180+
if (0 === strpos($line, $id)) {
182181
if (CryptUtils::compareStrings(
183182
substr($line, -32),
184183
md5("$this->identity:$this->realm:$this->credential")

0 commit comments

Comments
 (0)