Skip to content

Commit

Permalink
Add check for the principal of subject whether is null
Browse files Browse the repository at this point in the history
  • Loading branch information
plx927 committed Nov 7, 2018
1 parent f782eb1 commit 9c58d30
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -78,7 +78,7 @@ public void setSuccessUrl(String successUrl) {
*/
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
Subject subject = getSubject(request, response);
return subject.isAuthenticated();
return subject.isAuthenticated() && subject.getPrincipal() != null;
}

/**
Expand Down

0 comments on commit 9c58d30

Please sign in to comment.