Browse Source

Require non-null authenticationRequest

Closes gh-18880

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
pull/18872/head
Josh Cummings 1 week ago
parent
commit
ef76ba040d
No known key found for this signature in database
GPG Key ID: 869B37A20E876129
  1. 1
      saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/CacheSaml2AuthenticationRequestRepository.java

1
saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/web/CacheSaml2AuthenticationRequestRepository.java

@ -52,6 +52,7 @@ public final class CacheSaml2AuthenticationRequestRepository @@ -52,6 +52,7 @@ public final class CacheSaml2AuthenticationRequestRepository
@Override
public void saveAuthenticationRequest(AbstractSaml2AuthenticationRequest authenticationRequest,
HttpServletRequest request, HttpServletResponse response) {
Assert.notNull(authenticationRequest, "authenticationRequest must not be null");
String relayState = request.getParameter(Saml2ParameterNames.RELAY_STATE);
Assert.notNull(relayState, "relayState must not be null");
this.cache.put(relayState, authenticationRequest);

Loading…
Cancel
Save