hanicz opened a new pull request, #1472: URL: https://github.com/apache/knox/pull/1472
…e param comes after originalUrl [KNOX-3532](https://issues.apache.org/jira/browse/KNOX-3532) - KnoxSSO login page redirects to a broken URL when the theme param comes after originalUrl ## What changes were proposed in this pull request? The login page reads `originalUrl` by taking everything after originalUrl= (KNOX-820). So a theme param placed after it, as in `login.html?originalUrl=.../home/&theme=modern`, became part of the redirect target. After login the user landed on `.../home/&theme=modern`, which returns a `404`. Change: a new `getOriginalUrl()` in `knoxauth.js` removes one trailing `&theme=<valid-name>` from `originalUrl` before it's used for the websso request and the redirect. ## How was this patch tested? - **originalUrl=.../home/&theme=modern**: modern theme shown, redirect goes to .../home/ - **originalUrl=...?a=1&b=2**: unchanged - **Logout, then "Sign in again" with theme=modern**: redirect is correct -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
