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

Filter order values should not be fixed and should be relative to requirements of Spring Boot. #13809

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

codeconsole
Copy link
Contributor

@codeconsole codeconsole commented Oct 23, 2024

Fixes #13797

This will evolve, but it is good to get the process started.

It was place in grails-controllers because that is where the used filters are instantiated. The other possible location is grails-bootstrap. These are the only 2 locations that depend on spring boot autoconfigure. This needs to be based on spring boot autoconfigure in case at some point Spring decides to change the default value (A situation like this broke the Grails Spring Security Core plugin which was previously dependent on fixed numerical values that became outdated )

Asset pipeline PR should be merged after this is accepted.
Sitemesh plugin will be updated after this is accepted.

Copy link
Contributor

@jamesfredley jamesfredley left a comment

Choose a reason for hiding this comment

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

Given:

SecurityProperties.DEFAULT_FILTER_ORDER = -100
OrderedFilter.REQUEST_WRAPPER_FILTER_MAX_ORDER = 0

and the lowest int is run first

this puts these in the right order and fixed relative to when the Spring Security Filter Chain runs.

@codeconsole codeconsole merged commit ab022e8 into grails:7.0.x Oct 24, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7.0 Filter Order needs to be Reconsidered
4 participants