Update src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
Better consistency in request method checking (See L.58)
This commit is contained in:
parent
e9b6a12baf
commit
e0c001b772
@ -67,7 +67,7 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL
|
|||||||
*/
|
*/
|
||||||
protected function attemptAuthentication(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) {
|
if (null !== $this->logger) {
|
||||||
$this->logger->debug(sprintf('Authentication method not supported: %s.', $request->getMethod()));
|
$this->logger->debug(sprintf('Authentication method not supported: %s.', $request->getMethod()));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user