diff --git a/portal-impl/src/com/liferay/portal/servlet/filters/secure/BaseAuthFilter.java b/portal-impl/src/com/liferay/portal/servlet/filters/secure/BaseAuthFilter.java index d6e1db3d62ab42..c6e7cbc27ec601 100644 --- a/portal-impl/src/com/liferay/portal/servlet/filters/secure/BaseAuthFilter.java +++ b/portal-impl/src/com/liferay/portal/servlet/filters/secure/BaseAuthFilter.java @@ -369,16 +369,16 @@ private boolean _isDigestModified(HttpSession httpSession) User user = (User)httpSession.getAttribute(WebKeys.USER); - if (user != null) { - String digest = (String)httpSession.getAttribute( - WebKeys.USER_DIGEST); + if (user == null) { + return false; + } - user = UserLocalServiceUtil.getUser(user.getUserId()); + String digest = (String)httpSession.getAttribute( + WebKeys.USER_DIGEST); - return !StringUtil.equals(digest, user.getDigest()); - } + user = UserLocalServiceUtil.getUser(user.getUserId()); - return false; + return !StringUtil.equals(digest, user.getDigest()); } private static final Log _log = LogFactoryUtil.getLog(BaseAuthFilter.class);