-
Bug
-
Resolution: Fixed
-
Neutral
-
6.0
-
None
-
-
Empty show more show less
-
AdminX 34
-
3
-
Yes
When passing parameters to a restricted URL without being authenticated we are experiencing a couple of issues:Â first of all, the parameters in the formatted (result) string are duplicated. Also after a successful authentication, the parameters are lost (not included in the URL).
Steps for reproduce it (eg, at our demo):
- Go to configuration App --> server --> filters --> securityCallBack --> clientCallBacks --> travel-demo-pur --> location --> set the value:Â travel/members/login.html?redirectToThis={0}
- Go to http://localhost:8080/magnoliaPublic/travel/members/protected.html?param1=value1
- Magnolia redirect the user to the login page for membersÂ
- Do a proper login and check the resulting URL
There are some attached images that may help.
Added description of the related ticket MAGNOLIA-8038
In Magnolia 6.2.4 the MAGNOLIA-7915 changes to LoginFilter were made that only permit redirects to relative URLs.
But when RedirectClientCallback is used to redirect user form the restricted page to login form it injects Full URL into redirect. That makes it incompatible with LoginFilter.
For example, when user request a restricted "/account" page, and the SecurityCallbackFilter is configured to use RedirectClientCallback the latter will send a redirect respone to a URL like "/account-login?from=http%3A%2F%2Fexample.org%2Faccount".{}
That /account-login page will take the "from" parameter value of "http://example.org/account" and typically put it inside login form in "mgnlReturnTo" field.
When login credentials are then posted, the LoginFilter will take the full return URL from "mgnlReturnTo" request parameter and reject it as unsafe.
Correct behaviour for RedirectClientCallback wold be to inject "root" URL representation into redirect URL, e.g. "/account-login?from=%2Faccount".
- is duplicated by
-
MAGNOLIA-8038 RedirectClientCallback puts full URLs into target parameter
- Closed
1.
|
Implementation | Completed | Evzen Fochr | |
2.
|
Review | Completed | Enrique Espana | |
3.
|
PiQA | Completed | Enrique Espana | |
4.
|
Final QA | Completed | Thai Chi Minh |