-
Bug
-
Resolution: Done
-
Major
-
7.4.4.GA
-
False
-
None
-
False
-
-
-
-
-
-
+
If an app is bound to a context with a trailing slash:
<context-root>/app/</context-root>
Then relative redirects can be incorrect. For instance, if requesting /app/redirect.jsp then response.sendRedirect("newpage.jsp") would previously return a location of /app/newpage.jsp. But now it results in /app/redirect.jspnewpage.jsp.
That's because after UNDERTOW-1409, this:
current = current.substring(0, lastSlash + 1);
Does not see a last slash and so does not modify the current string, meaning that this:
realPath = CanonicalPathUtils.canonicalize(servletContext.getContextPath() + current + location);
ends up being called with values like /app/+redirect.jsp+newpage.jsp.
- incorporates
-
UNDERTOW-2094 Bad relative redirect is generated if app is mapped to trailing slash context
- Closed
- is caused by
-
UNDERTOW-1409 sendRedirect to relative urls does not properly encode the current path
- Resolved
- is incorporated by
-
JBEAP-23559 [GSS](7.4.z) Upgrade Undertow from 2.2.17.SP4-redhat-00001 to 2.2.18.SP1
- Closed