redirect after login uses context root
--------------------------------------
Key: WICKET-2154
URL: https://issues.apache.org/jira/browse/WICKET-2154
Project: Wicket
Issue Type: Bug
Affects Versions: 1.3.4
Reporter: Ittay Dror
Fix For: 1.3.6
When using authentication, PageMap#setUpRedirect is used to store the
intercepted URL and PageMpa#continueToOriginalDestination is used to redirect
to it after a successful login.
The issue is that setUpRedirect uses cycle.getRequest().getURL() which for
ServletWebRequest uses HttpServletRequest#getServletPath which returns also the
context path of the servlet (so if the servlet is under 'foo' (so
http://localhost:8080/foo activates it)), then redirect uses
RedirectRequestTarget which uses 'response.redirect(RequestCycle.get()
.getRequest()
.getRelativePathPrefixToContextRoot() +
redirectUrl.substring(1)'
since RequestCycle.get().getRequest().getRelativePathPrefixToContextRoot() also
uses getServletPath(), we get the context path twice (so the final redirect is
foo/foo)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.