Skip to content

Commit c2f3294

Browse files
committed
Fix NPE
1 parent 04e71ce commit c2f3294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/eu/openanalytics/containerproxy/auth/impl/saml/AuthenticationFailureHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void onAuthenticationFailure(HttpServletRequest request,
7777
}
7878

7979
private boolean isOrWasAuthenticated(HttpServletRequest request) {
80-
if (request.getAttribute(REQ_PROP_AUTH_BEFORE_SSO).equals("true")) {
80+
if (Objects.equals(request.getAttribute(REQ_PROP_AUTH_BEFORE_SSO), "true")) {
8181
// Before doing a SSO request we check whether the user is authenticated, if so we set the SP_REQ_PROP_AUTH_BEFORE_SSO
8282
// property. If the auth failed, the Spring SecurityContext is cleared and thus we cannot use that to
8383
// check whether the user is authenticated.

0 commit comments

Comments
 (0)