File: drop-__proto__-calls.patch

package info (click to toggle)
node-jju 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 640 kB
  • sloc: javascript: 5,244; makefile: 15
file content (16 lines) | stat: -rw-r--r-- 426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: drop __proto__ calls
Author: Yadd <yadd@debian.org>
Forwarded: no
Last-Update: 2022-12-01

--- a/test/test_stringify.js
+++ b/test/test_stringify.js
@@ -52,7 +52,7 @@
 assert.equal("[1, 2, 3]", stringify([1, 2, 3], {indent: 2}))
 
 var oddball = Object(42)
-oddball.__proto__ = { __proto__: null }
+Object.setPrototypeOf(oddball, { __proto__: null })
 assert.equal('{}', stringify(oddball))
 
 /* this WILL throw