Skip to content

fix(pagination): validate client page URLs and omit unsafe data-to#56

Merged
karim-semmoud merged 1 commit into
mainfrom
fix/pagination-client-url-parity
Jun 2, 2026
Merged

fix(pagination): validate client page URLs and omit unsafe data-to#56
karim-semmoud merged 1 commit into
mainfrom
fix/pagination-client-url-parity

Conversation

@karim-semmoud
Copy link
Copy Markdown
Member

Summary

Pagination link mode now validates to on the client the same way as on the server. Unsafe bases no longer get data-to or client-built page URLs.

Changes

  • buildGetPageUrl uses isAllowedRedirectDestination (same rules as Corex.Url / navigate).
  • Connect.props only sets data-to when Corex.Url.allowed_href?/1 passes.

Why

#55 hardened SSR href for pagination, but the hook still read raw data-to. This closes that gap before 0.1.1.

Test plan

  • mix test test/components/pagination_test.exs
  • npm test (pagination Vitest files)

@karim-semmoud karim-semmoud self-assigned this Jun 2, 2026
@karim-semmoud karim-semmoud merged commit e033969 into main Jun 2, 2026
14 checks passed
@karim-semmoud karim-semmoud deleted the fix/pagination-client-url-parity branch June 2, 2026 14:10
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