FilterInvocation#getFullRequestUrl
can result in UnsupportedOperationException: public abstract java.lang.String javax.servlet.ServletRequest.getScheme() is not supported
#10694
Labels
Describe the bug
Calling
FilterInvocation#getFullRequestUrl
can throwUnsupportedOperationException: public abstract java.lang.String javax.servlet.ServletRequest.getScheme() is not supported
.Since upgrading Spring Boot from 2.5.x to 2.6.2 (Spring Security from 5.5 to 5.6.1) we have noticed this exception being thrown when a request results in an error. It seems like the introduction of
ErrorPageSecurityFilter
by Spring Boot has changed the way a request is handled in the case of an error. In which case we end up with aFilterInvocation
that has aDummyRequest
without support forgetScheme
.Stacktrace below. (
MyVoter
andMyRequestAuthenticationFilter
are classes that have been redacted)To Reproduce
Call
FilterInvocation#getFullRequestUrl
from anAccessDecisionVoter#vote
methodExpected behavior
No exception is thrown
Sample
No sample as of yet.
The text was updated successfully, but these errors were encountered: