Repository navigation
Fix CSRF header after the cookie v2 bump - #4066
Merged
Merged
Conversation
cookie 2.0 dropped parse, so getCSRFHeader threw (caught, warned) and the X-CSRFToken header was never sent.
Contributor
Dash performance benchmarks✅ all within thresholds
growth = late-third / early-third per-op time; ~1 is flat, a large value means the per-op cost scales with accumulated state. machine scale vs baseline: 0.74x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on |
|
KoolADE85
approved these changes
Oct 15, 2026
KoolADE85
left a comment
Contributor
There was a problem hiding this comment.
Tested and confirmed that this resolves the issue 💃
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.



#4058 bumped
cookieto 2.0.1 in the renderer. Version 2 droppedparse(it isparseCookienow), sogetCSRFHeaderthrew on every request. The error was caught and logged asTypeError: w.parse is not a function, and theX-CSRFTokenheader was never sent.Changes
dash/dash-renderer/src/actions/index.js: importparseCookie. It is the onlycookieuse in the repo.The bump is unreleased (it is in 4.5.0rc1, which is not out yet), so no CHANGELOG entry.
Tests
tests/integration/security/test_csrf.py: the app sets a_csrf_tokencookie and a callback echoes back theX-CSRFTokenheader it gets. It fails before the change (the header is missing) and passes after.