Skip to content

Commit ef76ba0

Browse files
committed
Require non-null authenticationRequest
Closes gh-18880 Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
1 parent 7e37aa2 commit ef76ba0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public AbstractSaml2AuthenticationRequest loadAuthenticationRequest(HttpServletR
5252
@Override
5353
public void saveAuthenticationRequest(AbstractSaml2AuthenticationRequest authenticationRequest,
5454
HttpServletRequest request, HttpServletResponse response) {
55+
Assert.notNull(authenticationRequest, "authenticationRequest must not be null");
5556
String relayState = request.getParameter(Saml2ParameterNames.RELAY_STATE);
5657
Assert.notNull(relayState, "relayState must not be null");
5758
this.cache.put(relayState, authenticationRequest);

0 commit comments

Comments
 (0)