Skip to content

Spring 6 refactorings because of CSRF cookie#3542

Merged
strehle merged 1 commit intodevelopfrom
csrfConfig
Jul 2, 2025
Merged

Spring 6 refactorings because of CSRF cookie#3542
strehle merged 1 commit intodevelopfrom
csrfConfig

Conversation

@strehle
Copy link
Member

@strehle strehle commented Jul 1, 2025

In some deployments, we see that X-Uaa-Csrf cookie is sent only in first request but then the value stays. The value in the Thymeleaf generated HTML forms get changed with each request.

This ends in /login?error=invalid_login_request

Change csrfTokenRequestHandler because of
https://stackoverflow.com/questions/74811673/spring-security-not-sending-csrf-token-in-rest-application https://docs.spring.io/spring-security/reference/servlet/exploits/csrf.html#migrating-to-spring-security-6

In some deployments, we see that X-Uaa-Csrf cookie is sent only in first request but then the value stays. The value in the Thymeleaf generated HTML forms get changed with each request.

This ends in /login?error=invalid_login_request

Change csrfTokenRequestHandler because of
https://stackoverflow.com/questions/74811673/spring-security-not-sending-csrf-token-in-rest-application
https://docs.spring.io/spring-security/reference/servlet/exploits/csrf.html#migrating-to-spring-security-6
@github-project-automation github-project-automation bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jul 1, 2025
@strehle strehle merged commit 2f5a9f2 into develop Jul 2, 2025
27 checks passed
@strehle strehle deleted the csrfConfig branch July 2, 2025 21:40
@github-project-automation github-project-automation bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Login Chooser breaks after 77.35 -> 78.0 update

2 participants