Skip to content

Commit b46aa11

Browse files
kalessilfabpot
authored andcommitted
[2.3] Static Code Analysis for Components
1 parent a235ce5 commit b46aa11

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Firewall/DigestAuthenticationListener.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,8 @@ public function validateAndDecode($entryPointKey, $expectedRealm)
172172
throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s" (%s)', $this->header, implode(', ', $keys)));
173173
}
174174

175-
if ('auth' === $this->elements['qop']) {
176-
if (!isset($this->elements['nc']) || !isset($this->elements['cnonce'])) {
177-
throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s"', $this->header));
178-
}
175+
if ('auth' === $this->elements['qop'] && !isset($this->elements['nc'], $this->elements['cnonce'])) {
176+
throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s"', $this->header));
179177
}
180178

181179
if ($expectedRealm !== $this->elements['realm']) {

0 commit comments

Comments
 (0)