Repository navigation
Conversation
…#1663) * Harden dsAuthInfo auth cookie with Secure and SameSite attributes Set secure and sameSite='lax' on the auth JWT cookie written in storeToken(), as defense-in-depth. The Secure flag is derived from the actual page protocol (location.protocol === 'https:') so it is applied on any https page, including behind a TLS-terminating reverse proxy, while local http dev still works. 'lax' is used rather than 'strict' so the cookie is still sent on the top-level navigation that returns from external authentication. * docs: shorten auth cookie security comment --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> (cherry picked from commit 9bcd483)
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.
Tento fix pochádza z
dtq-dev(v7). Cherry-pick dodtq-dev-9-basesa NEDAL aplikovať úplne čisto a bolo ho treba manuálne prispôsobiť v9. Prosím o dôkladný review.Čo bolo treba upraviť: líšil sa len názov typu cookie options (v9 používa⚠️ spec NEBOL portnutý (v9 má inú štruktúru importov). POZN.: v9 má druhý zápis cookie (
Cookies.CookieAttributes, v7CookieAttributes) — ponechaný v9 typ s v7 poliamisecure/sameSite.storeImpersonatingTokenAsCookie/druhý výskyt ~r.592), ktorý v7 fix nemenil — zvážiť zahardenovať tiež.Port of #1663 z
dtq-devdodtq-dev-9-base. Part of UFAL/Propagate PRs to v9: dataquest-dev/dspace-customers#1107🤖 Generated with Claude Code