8000 add Request type json check in json_login · symfony/symfony@23a3293 · GitHub
[go: up one dir, main page]

Skip to content

Commit 23a3293

Browse files
committed
add Request type json check in json_login
1 parent 6c7bced commit 23a3293

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM
7373
public function handle(GetResponseEvent $event)
7474
{
7575
$request = $event->getRequest();
76+
if ('json' !== $request->getRequestFormat()|| 'json' !== $request->getContentType()) {
77+
return;
78+
}
7679

7780
if (isset($this->options['check_path']) && !$this->httpUtils->checkRequestPath($request, $this->options['check_path'])) {
7881
return;

0 commit comments

Comments
 (0)
0