We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ad9688 commit c5b4db0Copy full SHA for c5b4db0
__tests__/CWE-1321.test.ts
@@ -0,0 +1,16 @@
1
+import plist from "../src";
2
+
3
+/** @see https://cwe.mitre.org/data/definitions/1321.html */
4
5
+describe("CWE-1321", () => {
6
+ it("filters out unsafe properties", () => {
7
+ const unsafeDoc = { __proto__: 42, foo: "bar" };
8
+ const safeDoc = plist.parse(plist.stringify(unsafeDoc));
9
10
+ expect(safeDoc).toMatchInlineSnapshot(`
11
+ Object {
12
+ "foo": "bar",
13
+ }
14
+ `);
15
+ });
16
+});
0 commit comments