summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Reznichenko <kalessil@gmail.com>2016-01-06 14:34:50 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2016-01-12 12:31:34 +0100
commitd91b2e562d7f514f1c9066c9d6395ef75aab2354 (patch)
treef1491da4f615e30b29797f1dd915ca8dfcf5f2b9
parent0485f6dc37baef0ecd53fd2c6d38a3d43500b268 (diff)
downloadsymfony-security-d91b2e562d7f514f1c9066c9d6395ef75aab2354.zip
symfony-security-d91b2e562d7f514f1c9066c9d6395ef75aab2354.tar.gz
symfony-security-d91b2e562d7f514f1c9066c9d6395ef75aab2354.tar.bz2
[2.3] Static Code Analysis for Components
-rw-r--r--Http/Firewall/DigestAuthenticationListener.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/Http/Firewall/DigestAuthenticationListener.php b/Http/Firewall/DigestAuthenticationListener.php
index 5e1159f..4e57667 100644
--- a/Http/Firewall/DigestAuthenticationListener.php
+++ b/Http/Firewall/DigestAuthenticationListener.php
@@ -172,10 +172,8 @@ class DigestData
throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s" (%s)', $this->header, implode(', ', $keys)));
}
- if ('auth' === $this->elements['qop']) {
- if (!isset($this->elements['nc']) || !isset($this->elements['cnonce'])) {
- throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s"', $this->header));
- }
+ if ('auth' === $this->elements['qop'] && !isset($this->elements['nc'], $this->elements['cnonce'])) {
+ throw new BadCredentialsException(sprintf('Missing mandatory digest value; received header "%s"', $this->header));
}
if ($expectedRealm !== $this->elements['realm']) {