Skip to content

Commit 4dfdbf0

Browse files
committed
minor #19060 [Security] Add post method attribute to json login (vincent-the-oz)
This PR was merged into the 5.4 branch. Discussion ---------- [Security] Add post method attribute to json login With json login, restrict the api/login route to post method only. Commits ------- 06127bf Add post method attribute to json login
2 parents 9c67064 + 06127bf commit 4dfdbf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ token (or whatever you need to return) and return the JSON response:
10541054
10551055
class ApiLoginController extends AbstractController
10561056
{
1057-
#[Route('/api/login', name: 'api_login')]
1057+
#[Route('/api/login', name: 'api_login', methods: ['POST'])]
10581058
- public function index(): Response
10591059
+ public function index(#[CurrentUser] ?User $user): Response
10601060
{

0 commit comments

Comments
 (0)