You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed this for some time in my application logs and thought I was just misconfiguring Spring Security WebFlux somehow. But upon closer examination, I think there's a bug in AuthenticationWebFilter that causes this behavior:
The .switchIfEmpty() here is actually assembling the filter chain on downstream subscription, rather than deferring it until it is needed. Shouldn't that line be more like:
I've noticed this for some time in my application logs and thought I was just misconfiguring Spring Security WebFlux somehow. But upon closer examination, I think there's a bug in
AuthenticationWebFilter
that causes this behavior:spring-security/web/src/main/java/org/springframework/security/web/server/authentication/AuthenticationWebFilter.java
Line 114 in 8e2a4bf
The
.switchIfEmpty()
here is actually assembling the filter chain on downstream subscription, rather than deferring it until it is needed. Shouldn't that line be more like:And, in fact, the method directly below this one uses
Mono.defer()
for error cases.The text was updated successfully, but these errors were encountered: