summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
authornervo <nervo@nervo.net>2012-09-23 10:54:29 +0300
committernervo <nervo@nervo.net>2012-09-23 10:54:29 +0300
commit4665ed2785a57a491df92a8eb678c3eb1b9bac4e (patch)
tree3c01c5d02df0b79658576a1401ed32472cde2d20 /Http
parent055a325fe5ac1d971e1b70ce12defecbde284c6f (diff)
downloadsymfony-security-4665ed2785a57a491df92a8eb678c3eb1b9bac4e.zip
symfony-security-4665ed2785a57a491df92a8eb678c3eb1b9bac4e.tar.gz
symfony-security-4665ed2785a57a491df92a8eb678c3eb1b9bac4e.tar.bz2
Update src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
Better consistency in request method checking (See L.58)
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/UsernamePasswordFormAuthenticationListener.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
index 22330a8..057ff71 100644
--- a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
+++ b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
@@ -67,7 +67,7 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL
*/
protected function attemptAuthentication(Request $request)
{
- if ($this->options['post_only'] && 'post' !== strtolower($request->getMethod())) {
+ if ($this->options['post_only'] && !$request->isMethod('post')) {
if (null !== $this->logger) {
$this->logger->debug(sprintf('Authentication method not supported: %s.', $request->getMethod()));
}