[MAGNOLIA-6496] Internal redirect always prepends context path Created: 12/Jan/16 Updated: 18/Jan/16 Resolved: 13/Jan/16 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 5.4.3 |
| Fix Version/s: | 5.4.4 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Christopher Zimmermann | Assignee: | Roman Kovařík |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Sprint: | Kromeriz 26 | ||||||||
| Story Points: | 2 | ||||||||
| Description |
|
With Jenkins bundle, after registering via PUR, try to login and supply proper credentials. The incorrect URL. |
| Comments |
| Comment by Roman Kovařík [ 12/Jan/16 ] |
|
info.magnolia.cms.util.RequestDispatchUtil#dispatch does:
if (isInternal(redirectUrl)) {
redirectUrl = request.getContextPath() + redirectUrl;
}
even if the context path is already part of redirectUrl. The issue doesn't occur when the site is correctly configured. |
| Comment by Christopher Zimmermann [ 12/Jan/16 ] |
|
How must the site be configured? What is mis-configured? |
| Comment by Roman Kovařík [ 12/Jan/16 ] |
|
To configure: |
| Comment by Christopher Zimmermann [ 12/Jan/16 ] |
|
Hmm - if someone downloads the bundle - they should not have to configure hosts in order to test the PUR functionality. It should work ootb. Do you have any suggestions on how this could be accomplished. Or do you disagree? |
| Comment by Roman Kovařík [ 12/Jan/16 ] |
|
For me it's more an issue in RequestDispatchUtil#dispatch, since
redirect: ${cmsfn.link("website", content.targetPage)!}
gives the link including the context path. (This code is used in public-user-registration/templates/components/login.ftl ) |
| Comment by Christopher Zimmermann [ 12/Jan/16 ] |
|
I propose that RequestDispatchUtil#dispatch should be improved to not duplicate the context. |