Browse Source

Fix GenerateOneTimeTokenWebFilter double publish of chain.filter(...)

closes gh-16458

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
pull/16523/head
Daniel Garnier-Moiroux 11 months ago committed by Rob Winch
parent
commit
bb8e757c4b
No known key found for this signature in database
  1. 1
      web/src/main/java/org/springframework/security/web/server/authentication/ott/GenerateOneTimeTokenWebFilter.java

1
web/src/main/java/org/springframework/security/web/server/authentication/ott/GenerateOneTimeTokenWebFilter.java

@ -58,7 +58,6 @@ public final class GenerateOneTimeTokenWebFilter implements WebFilter { @@ -58,7 +58,6 @@ public final class GenerateOneTimeTokenWebFilter implements WebFilter {
// @formatter:off
return this.matcher.matches(exchange)
.filter(ServerWebExchangeMatcher.MatchResult::isMatch)
.switchIfEmpty(chain.filter(exchange).then(Mono.empty()))
.then(exchange.getFormData())
.mapNotNull((data) -> data.getFirst(USERNAME))
.switchIfEmpty(chain.filter(exchange).then(Mono.empty()))

Loading…
Cancel
Save