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

3.2.0-M3 to 3.2.0-RC1 OncePerRequestFilter servlet filter names broken in tests #38182

Closed
bratkartoffel opened this issue Nov 2, 2023 · 2 comments
Labels
status: duplicate A duplicate of another issue

Comments

@bratkartoffel
Copy link

bratkartoffel commented Nov 2, 2023

Hi,

after upgrading to spring boot 3.2.0-RC1, my custom security filter no longer runs in tests. It seems it is simply skipped from execution. After debugging around OncePerRequestFilter:97, I found out that with RC1, the getAlreadyFilteredAttributeName() just returns .FILTERED for a number of filters instead of a unique name. With M3 everything works fine. This behaviour only occurs when running the tests, running the application "regularly" is fine too.

The issue can be reproduced with my examples project (https://github.com/bratkartoffel/security-jwt-examples) by changing the gradle.properties , springBootVersion=3.2.0-RC1and running eu.fraho.spring.example.test.regular_internal.TestRegularApplication#testPrivateWithTokenA().

Forcing the alreadyFilteredAttributeName to getClass().getName() + ALREADY_FILTERED_SUFFIX using the debugger makes the test green again.
image

Thanks,
Simon

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 2, 2023
@bratkartoffel
Copy link
Author

After searching more in the other spring projects i came across spring-projects/spring-framework#31474 which seems to be my problem here. Closing, thanks

@wilkinsona
Copy link
Member

Thanks for trying the RC and for the sample that reproduces the problem. It does not occur with 3.2.0-SNAPSHOT due to the changes made for #38001.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants