Skip to content

Commit

Permalink
Fix possible NPE in FacebookAuthenticator.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaura committed May 7, 2024
1 parent 99acc39 commit 894a080
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ protected void initiateAuthenticationRequest(HttpServletRequest request,
}

String callbackUrl = getCallbackUrl(authenticatorProperties);
if (Boolean.parseBoolean((String) context.getProperty(FacebookAuthenticatorConstants.IS_API_BASED))) {
if (context.getProperty(FacebookAuthenticatorConstants.IS_API_BASED) != null &&
Boolean.parseBoolean((String) context.getProperty(FacebookAuthenticatorConstants.IS_API_BASED))) {
callbackUrl = (String) context.getProperty(FacebookAuthenticatorConstants.REDIRECT_URL);
}

Expand Down

0 comments on commit 894a080

Please sign in to comment.