fix(cognito): reject missing SRP challenge session (#4578)

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This commit is contained in:
XuJian authored and GitHub committed 2026-09-28 14:34:12 -04:00
1 parent 864f79cf31
commit fbbbf244af
2 files changed
+20 -1

No files matched your search

@@ -578,7 +578,7 @@ final class CognitoAuthFlowHandler {
clientMetadata);
}
SrpSession srp = srpSessions.get(session);
SrpSession srp = session == null ? null : srpSessions.get(session);
if (srp == null) throw new AwsException("NotAuthorizedException", "Session not found", 400);
if (sessionExpired(srp.expiresAt())) {
srpSessions.remove(session);