Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): make errors more resistant to tampering #15789

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Sep 6, 2022

This commit makes error objects more resistant to prototype tampering.

This bug was found when updating the deno_std Node compatibility layer to Node 18. The Node test parallel/test-assert-fail.js was breaking std's assertion library.

Refs: denoland/std#2585

This commit makes error objects more resistant to
prototype tampering.

This bug was found when updating the deno_std Node compatibility
layer to Node 18. The Node test 'parallel/test-assert-fail.js'
was breaking std's assertion library.

Refs: denoland/std#2585
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed our assertion lib is vulnerable to this tampering (Object.prototype.get = () => {}) and this PR fixes. LGTM

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too

@cjihrig cjihrig merged commit 3b1204e into denoland:main Sep 7, 2022
@cjihrig cjihrig deleted the assert branch September 7, 2022 13:11
kt3k pushed a commit that referenced this pull request Sep 9, 2022
This commit makes error objects more resistant to
prototype tampering.

This bug was found when updating the deno_std Node compatibility
layer to Node 18. The Node test 'parallel/test-assert-fail.js'
was breaking std's assertion library.

Refs: denoland/std#2585
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.

3 participants