Fix Checkstyle for CsrfWebFilter
Issue gh-9337
This commit is contained in:
@@ -131,8 +131,8 @@ public class CsrfWebFilter implements WebFilter {
|
||||
|
||||
private Mono<Void> validateToken(ServerWebExchange exchange) {
|
||||
return this.csrfTokenRepository.loadToken(exchange)
|
||||
.switchIfEmpty(Mono
|
||||
.defer(() -> Mono.error(new CsrfException("An expected CSRF token cannot be found"))))
|
||||
.switchIfEmpty(
|
||||
Mono.defer(() -> Mono.error(new CsrfException("An expected CSRF token cannot be found"))))
|
||||
.filterWhen((expected) -> containsValidCsrfToken(exchange, expected))
|
||||
.switchIfEmpty(Mono.defer(() -> Mono.error(new CsrfException("Invalid CSRF Token")))).then();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user