Repository navigation
Check redirectTo and the collection value in the cookie selector - #114
Merged
Merged
Conversation
harmony7
requested review from
a team and
kailan
and removed request for
a team
October 21, 2026 03:11
harmony7
force-pushed
the
fix/cookie-selector-redirect
branch
from
October 21, 2026 03:14
76dc93f to
ab01879
Compare
kpfleming
approved these changes
Oct 21, 2026
CookieCollectionSelector now accepts only a path on the same site for redirectTo, on the activate and reset paths. Any other value redirects to /. The activate path also refuses a collection value with characters that a cookie value cannot have, and sets no cookie. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
harmony7
force-pushed
the
fix/cookie-selector-redirect
branch
from
October 22, 2026 00:11
ab01879 to
8fc1224
Compare
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.
collectionSelector.fromCookie()now checks two query parameters on the activate and reset paths:redirectTomust be a path on the same site: it starts with one/, and it resolves to the same origin. Any other value redirects to/.collectionmust have only characters that a cookie value can have (RFC 6265). Any other value gets a400response, and no cookie is set.Only apps that use the cookie selector see a change. The scaffolded app does not use it. The same change for v7 is in #115.
Tests: new unit tests in
test/unit/cookie-selector.test.js.🤖 Generated with Claude Code