File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
openid-connect-client/src/main/java/org/mitre/openid/connect/client Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -286,11 +286,9 @@ protected Authentication handleAuthorizationCodeResponse(HttpServletRequest requ
286
286
287
287
// check for state, if it doesn't match we bail early
288
288
String storedState = getStoredState (session );
289
- if (!Strings .isNullOrEmpty (storedState )) {
290
- String state = request .getParameter ("state" );
291
- if (!storedState .equals (state )) {
292
- throw new AuthenticationServiceException ("State parameter mismatch on return. Expected " + storedState + " got " + state );
293
- }
289
+ String requestState = request .getParameter ("state" );
290
+ if (storedState == null || !storedState .equals (requestState )) {
291
+ throw new AuthenticationServiceException ("State parameter mismatch on return. Expected " + storedState + " got " + requestState );
294
292
}
295
293
296
294
// look up the issuer that we set out to talk to
You can’t perform that action at this time.
0 commit comments