fix(core): Restore credential data deep copy in overwrites#28737
Closed
fix(core): Restore credential data deep copy in overwrites#28737
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Performance ComparisonComparing current → latest master → 14-day baseline Memory consumption baseline with starter plan resources
docker-stats
Idle baseline with Instance AI module loaded
How to read this table
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Matsuuu
approved these changes
Apr 20, 2026
Member
Matsuuu
left a comment
There was a problem hiding this comment.
The reasoning seems reasonable. Let's try this out tomorrow with a patch release
BerniWittmann
approved these changes
Apr 21, 2026
Member
Author
|
Closing as doesn't appear to be needed. |
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.
Summary
Restores the deep copy behavior for credential data in
CredentialsOverwrites.applyOverwrite().PR #28573 changed
CredentialsOverwrites.get()to returnundefinedinstead of{}when no credential overwrites are configured. This causedapplyOverwrite()to early-return the original credential data reference instead of adeepCopy().In multi-main queue mode, multiple workflow executions run concurrently on the same process. The
getDecrypted()method inCredentialsHelperhas anawaitpoint atdynamicCredentialsProxy.resolveIfNeeded(). With the original reference being shared across concurrent requests, one execution could observe a partially-mutated credential object from another — resulting in an empty or corrupted token being passed to downstream API calls (e.g. Slack'snot_authederror).Fix: Change
if (entries.length === 0) return undefined→if (entries.length === 0) return {}.This restores the 2.17.2 path where
applyOverwritealways callsdeepCopy(data), giving each concurrent execution its own isolated copy. TheskipTypesoptional chaining safety fix from PR #28573 is preserved.To test:
not_authedRelated Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4869
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)🤖 PR Summary generated by AI