Skip to content

fix(formatError): prevent crash on inherited Object.prototype names (rebased) - #6288

Closed
deepshekhardas wants to merge 1 commit into
colinhacks:mainfrom
deepshekhardas:r/fix/formatError-object-prototype
Closed

fix(formatError): prevent crash on inherited Object.prototype names (rebased)#6288
deepshekhardas wants to merge 1 commit into
colinhacks:mainfrom
deepshekhardas:r/fix/formatError-object-prototype

Conversation

@deepshekhardas

Copy link
Copy Markdown

Summary

Rebased version fixing a crash in \ ormatError\ and \ reeifyError\ when the error path contains inherited Object.prototype property names like _proto_, \constructor, \ oString, etc.

Changes

  • Updated \packages/zod/src/v4/core/errors.ts\ to filter out inherited property names
  • Added tests in \packages/zod/src/v4/classic/tests/error.test.ts\

Related

Rebased version of #6281 (fix/formatError-object-prototype). Superseded by #6243 (fix/formatError-treeifyError-inherited-paths).

@deepshekhardas

Copy link
Copy Markdown
Author

Closing duplicate — superseded by #6281

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