Skip to content

KNOX-3523: KnoxSSO login page redirects to a broken URL when the them… - #1472

Open
hanicz wants to merge 1 commit into
apache:masterfrom
hanicz:KNOX-3532
Open

hanicz wants to merge 1 commit into
apache:masterfrom
hanicz:KNOX-3532

Conversation

@hanicz

@hanicz hanicz commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

…e param comes after originalUrl

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

@github-actions

Copy link
Copy Markdown

Test Results

  4 files    4 suites   1m 32s ⏱️
149 tests 149 ✅ 0 💤 0 ❌
173 runs  173 ✅ 0 💤 0 ❌

Results for commit 6e2c6b2.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant