Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-56266

NPE is thrown when navigating to /web/guest/ and SecureFilter is disabled

    Details

    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Set com.liferay.portal.servlet.filters.secure.SecureFilter=false
      2. Start up your application server
      3. Navigate to http://<your_domain>/web/guest/
      4. Check your logs

      Actual Result:
      An error is shown in the logs

      13:12:59,358  ERROR [ajp-bio-8009-exec-17][LayoutSettings:126] null
      java.lang.NullPointerException
      	at com.liferay.portal.service.permission.LayoutPermissionImpl.containsWithoutViewableGroup(LayoutPermissionImpl.java:219)
      	at com.liferay.portal.service.permission.LayoutPermissionImpl.containsWithoutViewableGroup(LayoutPermissionImpl.java:320)
      	at com.liferay.portal.service.permission.LayoutPermissionImpl.containsWithViewableGroup(LayoutPermissionImpl.java:365)
      	at com.liferay.portal.service.permission.LayoutPermissionImpl.contains(LayoutPermissionImpl.java:102)
      	at com.liferay.portal.service.permission.LayoutPermissionImpl.contains(LayoutPermissionImpl.java:111)
      	at com.liferay.portal.service.permission.LayoutPermissionUtil.contains(LayoutPermissionUtil.java:65)
      	at com.liferay.portal.util.LayoutSettings.hasViewPermission(LayoutSettings.java:121)
      	at com.liferay.portal.util.LayoutSettings.getURL(LayoutSettings.java:84)
      	at com.liferay.portal.util.PortalImpl.getLayoutActualURL(PortalImpl.java:2705)
      	at com.liferay.portal.util.PortalImpl.getLayoutActualURL(PortalImpl.java:2732)
      	at com.liferay.portal.util.PortalImpl.getActualURL(PortalImpl.java:984)
      	at sun.reflect.GeneratedMethodAccessor1007.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler$InvokePrivilegedExceptionAction.run(DoPrivilegedHandler.java:167)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:100)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
      	at com.sun.proxy.$Proxy543.getActualURL(Unknown Source)
      	at com.liferay.portal.util.PortalUtil.getActualURL(PortalUtil.java:232)
      	at com.liferay.portal.servlet.FriendlyURLServlet.getRedirect(FriendlyURLServlet.java:376)
      	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:117)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	at sun.reflect.GeneratedMethodAccessor625.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:277)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:169)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:297)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:191)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:187)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:186)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at sun.reflect.GeneratedMethodAccessor679.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:277)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:249)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:191)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:187)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:186)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
      	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:57)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
      	at sun.reflect.GeneratedMethodAccessor622.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:277)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:249)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:191)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:187)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:186)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:193)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      

      Expected Result:
      The page is loaded successfully without errors in the logs

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                daniel.couso Daniel Couso
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 43 weeks, 5 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5