Skip to content

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
mainfrom
fix/apple-touch-icon-whitelist-wildcard
Closed

fix: whitelist /apple-touch-icon* wildcard so Safari icon probes don't hit protected-URL handling#77
devondragon wants to merge 1 commit into
mainfrom
fix/apple-touch-icon-whitelist-wildcard

Conversation

@devondragon

Copy link
Copy Markdown
Owner

Problem

Safari/iOS automatically probes both /apple-touch-icon.png and /apple-touch-icon-precomposed.png (plus sized variants) at the site root on every page load. The demo's user.security.unprotectedURIs lists only whitelisted /apple-touch-icon-precomposed.png, so the plain /apple-touch-icon.png probe was a protected URL under defaultAction=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.png token for the /apple-touch-icon* wildcard (covers plain, precomposed, and sized variants) in:

  • src/main/resources/application.yml
  • src/main/resources/application-mfa.yml
  • src/main/resources/application-playwright-test.yml

Config-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 RequestCache that won't save auto-probe requests, and (2) auto-unprotecting /apple-touch-icon*, /favicon*, /.well-known/** in getUnprotectedURIsList(). Once released, the demo picks up both automatically; this PR keeps the demo's explicit config exemplary in the meantime.

…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).
@devondragon

Copy link
Copy Markdown
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 levelgetUnprotectedURIsList() adds /apple-touch-icon*.png, /favicon.*, and /.well-known/** for every consumer, and the hardened RequestCache prevents an icon probe from hijacking the post-login redirect. That makes this PR's manual /apple-touch-icon* whitelist entry redundant. The demo now gets correct behavior straight from the framework default with no app-side config, which is the better thing to model. Framework change: devondragon/SpringUserFramework#343.

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