Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
5.1.2, 5.2.2, 5.2.3, 6.0.0 Preview
-
None
-
Linux version 2.6.22.19-0.2-bigsmp ([email protected]) (gcc version 4.2.1 (SUSE Linux)) #1 SMP 2008-12-18 10:17:03 +0100
Oracle 10
Tomcat 5.5
-
5.2.x, 5.1.x
-
Committed
-
Accept
Description
If you develop custom portlets and use <user-principal-strategy>screenName</user-principal-strategy> in the liferay-portlet.xml file, a NPE will get generated in PortletServletRequest.java.
Lines 88 - 100 look to see what the strategy the portlet uses and if it is screen name it grabs the User from PortalUtil.getUser but it does check to see if the user is null, it only employs a try catch block and logs the error. This will destroy a log file if someone puts a custom portlet on a page that is accessible by guests.
To fix this, either put in a null check or change the level of the logging event from error.