Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing ArrayIndexOutOfBoundsException in XorCsrfTokenRequestAttribute… #13550

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

RahulKumarNitP
Copy link
Contributor

@RahulKumarNitP RahulKumarNitP commented Jul 17, 2023

Issue Description: #13310

ArrayIndexOutOfBoundsException in XorCsrfTokenRequestAttributeHandler

SecurityIssue

Steps to reproduce the issue

  1. Modify the CSRF token value from the client side.
  2. Submit the request with the modified token value.

Expected behaviour:

The underlying method getTokenValue should validate the encoded token length and return null if the value is incorrect. Generating stack traces for exceptions is much more expensive and may impact performance.

Change Details:

  1. Handle the ArrayIndexOutOfBoundsException.
  2. Added the test case.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 17, 2023
@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 7, 2023
@jzheaux jzheaux assigned jzheaux and unassigned sjohnr Aug 7, 2023
@jzheaux jzheaux added the type: enhancement A general enhancement label Aug 7, 2023
@jzheaux jzheaux added this to the 6.2.0-M2 milestone Aug 7, 2023
@jzheaux jzheaux merged commit 82c0ddc into spring-projects:main Aug 7, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Aug 7, 2023

Thanks, @kevin2jordan! This is now merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants