chore(deps): update dependency csrf-csrf to v4 #1799
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.
This PR contains the following updates:
3.2.2
->4.0.0
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
Psifi-Solutions/csrf-csrf (csrf-csrf)
v4.0.0
Compare Source
⚠ BREAKING CHANGES
This list may not be an exhaustive list of breaking changes, for more information consult the version 3 -> 4 upgrade guide and the updated configuration documentation in the README.
createHmac
, the format has changed significantly, see the CSRF token format section of the upgrade guide.getSessionIdentifier
is now required and must return a unique identifier per-request (and per-session) - this is an essential part of CSRF token securitygetTokenFromRequest
renamed togetCsrfTokenFromRequest
generateToken
renamed togenerateCsrfToken
overwrite
andvalidateOnReuse
parameters forgenerateCsrfToken
have been merged into a single object parameter which also acceptscookieOptions
:generateCsrfToken(req, res, options);
validateOnReuse
is nowfalse
cookieOptions.sameSite
is nowstrict
cookieOptions.signed
is no longer available, CSRF tokens are inherently signed, this is redundantdelimiter
option removed,csrfTokenDelimiter
andmessageDelimiter
are now used for the respective purposesigned
option incookieOptions
config option removed (redundant), csrf tokens generated by csrf-csrf are inherently signedsize
config option now sets the size of the message used to construct the hmac, now defaults to32
instead of64
, this is combined with the return value ofgetSessionIdentifier
to construct the hmac payloadCsrfTokenCookieOverrides
renamed toCsrfTokenCookieOptions
CsrfTokenCreator
renamed toCsrfTokenGenerator
doubleCsrfProtection
renamed toDoubleCsrfProtection
RequestMethod
renamed toCsrfRequestMethod
CsrfIgnoredMethods
renamed toCsrfIgnoredRequestMethods
Features
3.2.2 (2025-04-24)
Bug Fixes
3.2.1 (2025-04-20)
No changes, just re-published the botched 3.2.0
Configuration
📅 Schedule: Branch creation - "before 3am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.