Skip to content

Commit

Permalink
Fix NPE in SessionUrlAuthenticationSuccessHandler (JENKINS-46993)
Browse files Browse the repository at this point in the history
Only occured with some application servers (e.g Tomcat 6.0.29)
  • Loading branch information
fcrespel committed Sep 26, 2017
1 parent 95e495f commit bb4c0c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected String determineTargetUrl(HttpServletRequest request, HttpServletRespo
session.removeAttribute(targetUrlSessionAttribute);
}

if (isAlwaysUseDefaultTargetUrl() || StringUtils.hasText(request.getParameter(getTargetUrlParameter())) || !StringUtils.hasText(targetUrl)) {
if (isAlwaysUseDefaultTargetUrl() || !StringUtils.hasText(targetUrl) || (getTargetUrlParameter() != null && StringUtils.hasText(request.getParameter(getTargetUrlParameter())))) {
return super.determineTargetUrl(request, response);
}

Expand Down

0 comments on commit bb4c0c6

Please sign in to comment.