Unverified Commit efec14a7 authored by Joyee Cheung's avatar Joyee Cheung Committed by Anna Henningsen
Browse files

assert: enforce type check in deepStrictEqual

Add checks for the built-in type tags to catch objects
with faked prototypes.

See https://tc39.github.io/ecma262/#sec-object.prototype.tostring
for a partial list of built-in tags.

Fixes: https://github.com/nodejs/node/issues/10258
PR-URL: https://github.com/nodejs/node/pull/10282


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 055482c2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment