util: fix inspection of errors with tampered name or stack property · nodejs/node@d96c765 · GitHub
Skip to content

Commit d96c765

Browse files
BridgeARBethGriggs
authored andcommitted
util: fix inspection of errors with tampered name or stack property
This makes sure that `util.inspect()` does not throw while inspecting errors that have the name or stack property set to a different type than string. Fixes: #30572 PR-URL: #30576 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a83ccf8 commit d96c765

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

lib/internal/util/inspect.js

Lines changed: 3 additions & 3 deletions

test/parallel/test-util-inspect.js

Lines changed: 29 additions & 0 deletions

0 commit comments

Comments
 (0)