Mohd Ahmed Khan created PLUTO-648:
-------------------------------------
Summary: Unable to get IllegalArgumentException while using
relative path in sendRedirect method in processAction
Key: PLUTO-648
URL: https://issues.apache.org/jira/browse/PLUTO-648
Project: Pluto
Issue Type: Bug
Components: portlet container
Affects Versions: 2.1.0-M3
Reporter: Mohd Ahmed Khan
Priority: Minor
Failing test case:
1) V2AddlResponseTests_SPEC2_12_Action_redirect1 - If a relative path is
supplied to the sendRedirect method, an IllegalArgumentException must be thrown
Problem -
1) If I start the path from ../ or ./ , pluto reads it as 3/ or 4/
respectively.
2) If I start the path from / , pluto considers it as full path which is
allowed.
Observed behavior - We get ServletException with root cause
NumberFormatException. Below is the stack trace of the same
exception
javax.servlet.ServletException: Cannot handle request for portal URL. Problem:
For input string: "3/V2AddlRequestTests"
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:130)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.NumberFormatException: For input string: "3/V2AddlRequestTests"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:77)
java.lang.Integer.parseInt(Integer.java:504)
java.lang.Integer.parseInt(Integer.java:539)
org.apache.pluto.driver.url.impl.PortalURLParserImpl.parse(PortalURLParserImpl.java:248)
org.apache.pluto.driver.core.PortalRequestContext.getRequestedPortalURL(PortalRequestContext.java:119)
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:126)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Expected behavior - We should get IllegalArgumentException on using relative
path.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)