8000 Update src/Symfony/Component/Security/Http/Firewall/UsernamePasswordF… · sam57/symfony@e0c001b · GitHub
[go: up one dir, main page]

Skip to content

Commit e0c001b

Browse files
committed
Update src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
Better consistency in request method checking (See L.58)
1 parent e9b6a12 commit e0c001b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function requiresAuthentication(Request $request)
6767
*/
6868
protected function attemptAuthentication(Request $request)
6969
{
70-
if ($this->options['post_only'] && 'post' !== strtolower($request->getMethod())) {
70+
if ($this->options['post_only'] && !$request->isMethod('post')) {
7171
if (null !== $this->logger) {
7272
$this->logger->debug(sprintf('Authentication method not supported: %s.', $request->getMethod()));
7373
}

0 commit comments

Comments
 (0)
0