10000 Redirect requests from outdated theme version to the current theme version by ahus1 · Pull Request #39725 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Redirect requests from outdated theme version to the current theme version #39725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ahus1
Copy link
Contributor
@ahus1 ahus1 commented May 14, 2025

Closes #39723

TODOs:

  • add a test
  • wrap it with the experimental feature for zero-downtime-patch-releases - or maybe not?!

With this change in place, the following will work:

  • Resources in the login theme are seamlessly redirected - I tested this manually by changing the version in UrlBean to be wrong, and I see that the redirect seamlessly showed CSS and images as expected.
  • The account console and admin console reloads automatically
    I tested it manually by
    • logging in
    • changing the version in migration_model
    • restarting Keycloak
    • if it is a resource with a content hash it is fetched if it exists despite the different version

ahus1 added 2 commits May 14, 2025 21:02
…rsion

Closes keycloak#39723

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
…the resource version

Closes keycloak#39723

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
@ahus1 ahus1 force-pushed the is-39723-redirect-resource-to-current-version branch from 298a501 to 46143ba Compare May 14, 2025 19:03
Comment on lines +99 to +102
UriBuilder.fromResource(ThemeResource.class)
.path("/{version}/{themeType}/{themeName}/{path}")
// The 'path' can contain slashes, so encoding of slashes is set to false
.build(new Object[]{Version.RESOURCES_VERSION, themeType, themeName, path}, false)

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
Untrusted URL redirection depends on a
user-provided value
.
Untrusted URL redirection depends on a
user-provided value
.
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.

Redirect request from wrong version to the right version
1 participant
0