Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 5.2.3, 6.0.4 GA
-
Fix Version/s: None
-
Component/s: WCM
-
Labels:None
-
Similar Issues:
Description
Direct access to portlet from browsercause NullPointerException.
For example, You go to the following URL,
http://www.liferay.com/wol-portlet/1/
and Following stacktrace is visible in your browser. It is not good to reveal to users the details of error.
java.lang.NullPointerException
com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:80)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
and same stacktrace is recorded in server.log.
It seems that portletRequest variable is null in PortletServlet#service when direct access to portlet.
and there is not null check for portletRequest, so PortletServlet throw NullPointerException.
PortletRequest portletRequest = (PortletRequest)request.getAttribute(
JavaConstants.JAVAX_PORTLET_REQUEST);
・・・
LiferayPortletSession portletSession =
(LiferayPortletSession)portletRequest.getPortletSession();
