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

Boot's /error page not accessible in certain scenarios after updating to 5.6.2 #10937

Closed
jkuipers opened this issue Mar 5, 2022 · 4 comments
Closed
Assignees
Labels
in: web An issue in web modules (web, webmvc) type: bug A general bug

Comments

@jkuipers
Copy link
Contributor

jkuipers commented Mar 5, 2022

After updating from 5.6.1 to 5.6.2 (by updating from Boot 2.6.3 to 2.6.4), the Boot /error page isn't accessible anymore in certain cases.
Here's a sample app with an integration test that showcases the issue:
spring-boot-errorpage-security-issue.zip

I reported this as a Boot issue first (as I wasn't sure what the root problem is). Andy Wilkinson had a look and concluded that this is related to Spring Security rather than the way that Boot sets up its /error page.
There are workarounds, like explicitly permitting access to /error or using authorizeRequests instead of authorizeHttpRequests, but without additional info I do expect this to be a regression bug.

@jkuipers
Copy link
Contributor Author

Hey, I was wondering if you could at least confirm that this is considered a bug. Also, not sure if you saw Andy's comment in the Boot-issue, but when you use authorizeRequests instead of authorizeHttpRequests the behavior is as expected.

@marcusdacoregio marcusdacoregio added in: web An issue in web modules (web, webmvc) and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 1, 2022
@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Apr 1, 2022

Hi @jkuipers, this is probably related to #10950.

You can see in the debug logs the following: Abstaining since did not find matching RequestMatcher, and there was a bug with the AuthorizationManagerWebInvocationPrivilegeEvaluator where it denied access if there was no decision, also known as AuthorizationDecision == null.

When using authorizeRequests() it works because it uses the DefaultWebInvocationPrivilegeEvaluator.

Can you please try the version 5.6.3-SNAPSHOT of Spring Security and confirm if it works?

@jkuipers
Copy link
Contributor Author

jkuipers commented Apr 1, 2022

I can confirm that the integration tests passes with 5.6.3-SNAPSHOT. Your explanation makes sense, so with that I will close this issue.

@jkuipers jkuipers closed this as completed Apr 1, 2022
@marcusdacoregio
Copy link
Contributor

Thanks for verifying @jkuipers. Have a great weekend!

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: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants