8000 Change order of absolute path and normalize in the theme folder by rmartinc · Pull Request #34153 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Change order of absolute path and normalize in the theme folder - #34153

Merged
jonkoops merged 1 commit into
keycloak:mainfrom
rmartinc:issue-34028
Oct 22, 2024
Merged

jonkoops merged 1 commit into
keycloak:mainfrom
rmartinc:issue-34028

Conversation

@rmartinc
@rmartinc rmartinc commented Oct 21, 2024 •
Copy link
Copy Markdown
Contributor

Closes #34028

The current order is normalize().toAbsolutePath() but it seems in macos the home folder of keycloak (the system property) is -Dkc.home.dir=./... This is because in macos the readlink has no -f option that canonicalize the path (check kc.sh script). Therefore doing the normalize() first, the ./.. into is transformed into empty string ``, and then themes folder is incorrect (nothing is found). If we do in the reverse order (first absolute path and then normalize) the correct themes folder is found. Added a test that uses relative path to get the file.

Closes keycloak#34028

Signed-off-by: rmartinc <rmartinc@redhat.com>
@rmartinc
rmartinc requested a review from a team as a code owner October 21, 2024 15:20
@jonkoops jonkoops left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this on my Macbook and this indeed fixes the issue as expected.

@jonkoops
jonkoops enabled auto-merge (squash) October 21, 2024 21:59
@jonkoops
jonkoops merged commit a84a2c2 into keycloak:main Oct 22, 2024
rmartinc added a commit to rmartinc/keycloak that referenced this pull request Oct 22, 2024
…loak#34153)

Closes keycloak#34028

Signed-off-by: rmartinc <rmartinc@redhat.com>
(cherry picked from commit a84a2c2)
mposolda pushed a commit that referenced this pull request Oct 22, 2024
Closes #34028

Signed-off-by: rmartinc <rmartinc@redhat.com>
(cherry picked from commit a84a2c2)
@edewit edewit mentioned this pull request Nov 19, 2024
@edewit edewit mentioned this pull request Dec 11, 2024
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.

Custom keycloak login theme styles.css return error 404

3 participants

0