Skip to content

Validate cookie session data - #11660

Open
mjackson wants to merge 1 commit into
mainfrom
mjackson/validate-cookie-session-data
Open

Validate cookie session data#11660
mjackson wants to merge 1 commit into
mainfrom
mjackson/validate-cookie-session-data

Conversation

@mjackson

Copy link
Copy Markdown
Member

Cookie session storage previously trusted any successfully parsed JSON through a type assertion. Valid JSON with the wrong session ID or data shape could therefore reach the session runtime.

Validate parsed cookie payloads with @remix-run/data-schema before restoring a session. Malformed payloads now follow the existing invalid-cookie behavior and start a fresh session.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Build Available

A preview build has been created for this PR. You can install it using:

pnpm install "remix-run/remix#preview/pr-11660&path:packages/remix"

This preview build will be updated automatically as you push new commits.

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