Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update src/Symfony/Component/Security/Http/Firewall/UsernamePasswordF…

…ormAuthenticationListener.php

Better consistency in request method checking (See L.58)
  • Loading branch information...
commit 4665ed2785a57a491df92a8eb678c3eb1b9bac4e 1 parent 055a325
@nervo nervo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Http/Firewall/UsernamePasswordFormAuthenticationListener.php
View
2  Http/Firewall/UsernamePasswordFormAuthenticationListener.php
@@ -67,7 +67,7 @@ protected function requiresAuthentication(Request $request)
*/
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()));
}
Please sign in to comment.
Something went wrong with that request. Please try again.