Skip to content

fix: Use default XOR CSRF token mechanism in Spring - #16521

Merged
Artur- merged 2 commits into
mainfrom
XorCsrfTokenRequestAttributeHandler
Apr 3, 2023
Merged

Artur- merged 2 commits into
mainfrom
XorCsrfTokenRequestAttributeHandler

Conversation

@Artur-

@Artur- Artur- commented Apr 3, 2023

Copy link
Copy Markdown
Member

@Artur-
Artur- requested a review from platosha April 3, 2023 14:12
@Artur-
Artur- force-pushed the XorCsrfTokenRequestAttributeHandler branch from 11764ba to 11d05b8 Compare April 3, 2023 14:13
@github-actions

github-actions Bot commented Apr 3, 2023 •

Copy link
Copy Markdown
Contributor

Test Results

   978 files     978 suites   1h 20m 48s ⏱️
6 165 tests 6 127 ✔️ 38 💤 0 ❌
6 416 runs  6 371 ✔️ 45 💤 0 ❌

Results for commit ab3136a.

♻️ This comment has been updated with latest results.

// session (double-submit cookie pattern)
CsrfTokenRepository csrfTokenRepository = CookieCsrfTokenRepository
.withHttpOnlyFalse();
XorCsrfTokenRequestAttributeHandler delegate = new XorCsrfTokenRequestAttributeHandler();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a comment explaining why the handler is customized like this. Maybe linking this: https://docs.spring.io/spring-security/reference/5.8/migration/servlet/exploits.html#_i_am_using_angularjs_or_another_javascript_framework

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@Artur-
Artur- enabled auto-merge (squash) April 3, 2023 15:39
@sonarqubecloud

sonarqubecloud Bot commented Apr 3, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Artur-
Artur- merged commit 3fd2745 into main Apr 3, 2023
@Artur-
Artur- deleted the XorCsrfTokenRequestAttributeHandler branch April 3, 2023 15:50
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.1.0.alpha3 and is also targeting the upcoming stable 24.1.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support XorCsrfTokenRequestAttributeHandler

3 participants