-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Error page is not accessible even "/error" added to web.ignoring()
#28768
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
Comments
Duplicates #28759. |
FYI @wilkinsona, I fixed it by |
If you'd like us to double-check, please provide a complete and minimal sample that reproduces the behaviour you've described. |
Hi @wilkinsona, I also noticed the same issue and it's not related to Basically, for the following configuration and controller :
Spring Boot 2.5.7 returns a json error response for |
Thanks, @mgr32. Your sample has enabled me to double-check and, as @quaff suspected, this is not a duplicate of #28759. The problem here is a combination of your use of @Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().mvcMatchers("/hello500", "/error").permitAll();
}
} These feels like a bug to me so I will bring it to the Security team's attention. |
I think I'm facing a similar challenge. The live application works just fine, so I figured it was mockMvc with the problem. Switched to WebTestClient since it's also supported now and this picked up the configuration correctly, the configured ignored URLs too, without having to add them to the permitAll config. Hoping this info can help isolate the issue whether it's security or mockMvc with the issue. |
The Security team are now aware of the problem. AIUI, the fix for spring-projects/spring-security#10554 will also address the problem described here with |
I'm using
response.sendError
to forward response toBasicErrorController
It's broken by dd1d148
@mbhave
The text was updated successfully, but these errors were encountered: