Skip to content

feat(console): use ids for admin record urls#658

Open
mreq wants to merge 3 commits into
masterfrom
feat/ids-only-console
Open

feat(console): use ids for admin record urls#658
mreq wants to merge 3 commits into
masterfrom
feat/ids-only-console

Conversation

@mreq

@mreq mreq commented Jun 29, 2026

Copy link
Copy Markdown
Member

Generate console polymorphic member URLs with database IDs while leaving public FriendlyId URLs unchanged. Load site-scoped console records by numeric ID and redirect legacy slug GET URLs to ID URLs.

Generate console polymorphic member URLs with database IDs while leaving public FriendlyId URLs unchanged. Load site-scoped console records by numeric ID and redirect legacy slug GET URLs to ID URLs.
# Conflicts:
#	app/controllers/folio/console/base_controller.rb
The legacy FriendlyId -> id console redirect merged raw request query
params into url_for options with only_path: false. A query param like
?host=evil.example.com flowed into url_for as the :host option, producing
an off-host URL that redirect_to then rejects with UnsafeRedirectError
(500) under Rails 8's open-redirect protection; legitimate query params
named host/protocol/port/script_name likewise broke URL generation.

Generate a same-host path (only_path: true) and re-attach the original
query string verbatim, so query params are preserved as query params and
can never hijack the redirect target.
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.

2 participants