Skip to content

Avoid reflective SecurityContextRepository mutation - #19634

Open
avsan wants to merge 1 commit into
spring-projects:mainfrom
avsan:fix/gh-19520-security-context-repository-setter
Open

Avoid reflective SecurityContextRepository mutation#19634
avsan wants to merge 1 commit into
spring-projects:mainfrom
avsan:fix/gh-19520-security-context-repository-setter

Conversation

@avsan

@avsan avsan commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Add a setter for the SecurityContextRepository used by SecurityContextHolderFilter and use it from WebTestUtils instead of reflectively modifying the field.

Add coverage verifying that a null repository is rejected.

Closes gh-19520

Add a setter for the SecurityContextRepository used by
SecurityContextHolderFilter and use it from WebTestUtils instead of
reflectively modifying the field.

Add coverage verifying that a null repository is rejected.

Closes spring-projectsgh-19520

Signed-off-by: avsan <abhishekrajabca@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebTestUtils mutates a final SecurityContextHolderFilter field

2 participants