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 c6e7cbc27ec601..0b9e6b45eb962d 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 @@ -34,6 +34,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashSet; +import java.util.Objects; import java.util.Set; import javax.servlet.FilterChain; @@ -373,12 +374,10 @@ private boolean _isDigestModified(HttpSession httpSession) return false; } - String digest = (String)httpSession.getAttribute( - WebKeys.USER_DIGEST); - user = UserLocalServiceUtil.getUser(user.getUserId()); - return !StringUtil.equals(digest, user.getDigest()); + return !Objects.equals( + user.getDigest(), httpSession.getAttribute(WebKeys.USER_DIGEST)); } private static final Log _log = LogFactoryUtil.getLog(BaseAuthFilter.class);