fix: whitelist /apple-touch-icon* wildcard so Safari icon probes don't hit protected-URL handling#77
Closed
devondragon wants to merge 1 commit into
Closed
Conversation
…t hit protected-URL handling Safari/iOS auto-probes both /apple-touch-icon.png and /apple-touch-icon-precomposed.png (plus sized variants) at the site root on every page load. The unprotectedURIs lists only whitelisted the precomposed variant, so the plain /apple-touch-icon.png probe was a protected URL under defaultAction=deny. Swap the single precomposed token for the /apple-touch-icon* wildcard in application.yml, application-mfa.yml, and application-playwright-test.yml so the reference config models the correct pattern. Pairs with the library-level RequestCache hardening and auto-unprotect in SpringUserFramework PR #343 (which fixes the underlying post-login redirect hijack for all consumers).
2 tasks
Owner
Author
|
Closing as superseded by the 5.1.1 upgrade (merged in #78). ds-spring-user-framework 5.1.1 now auto-unprotects the browser-probed paths at the framework level — |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Safari/iOS automatically probes both
/apple-touch-icon.pngand/apple-touch-icon-precomposed.png(plus sized variants) at the site root on every page load. The demo'suser.security.unprotectedURIslists only whitelisted/apple-touch-icon-precomposed.png, so the plain/apple-touch-icon.pngprobe was a protected URL underdefaultAction=deny. That's the exact condition that lets an unauthenticated icon probe overwrite the saved request during login and hijack the post-login redirect to/apple-touch-icon.png?continue(seen in production on a consuming app).Fix
Swap the single
/apple-touch-icon-precomposed.pngtoken for the/apple-touch-icon*wildcard (covers plain, precomposed, and sized variants) in:src/main/resources/application.ymlsrc/main/resources/application-mfa.ymlsrc/main/resources/application-playwright-test.ymlConfig-only; one token per file, all surrounding entries/ordering/comments preserved. The pattern matches the new framework-level auto-unprotect so the reference config stays consistent.
Relationship to the library fix
This pairs with SpringUserFramework PR #343, which fixes the underlying issue for all consumers via (1) a hardened, consumer-overridable
RequestCachethat won't save auto-probe requests, and (2) auto-unprotecting/apple-touch-icon*,/favicon*,/.well-known/**ingetUnprotectedURIsList(). Once released, the demo picks up both automatically; this PR keeps the demo's explicit config exemplary in the meantime.