fix: support constructor and __proto__ parameters in Parse URI (#2578) (#2581)

This commit is contained in:
MAN$I VERMA
2026-07-04 18:04:50 +01:00
committed by GitHub
parent 86746296be
commit 19c8a8a310
3 changed files with 31 additions and 6 deletions
+12
View File
@@ -729,6 +729,18 @@ Arguments:
assert.strictEqual(result.toString(), expected);
}),
it("Parse URI with constructor and __proto__ arguments", () => {
const result = chef.parseURI("https://example.com/?constructor=ok&__proto__=hello");
const expected = `Protocol: https:
Hostname: example.com
Path name: /
Arguments:
\tconstructor = ok
\t__proto__ = hello
`;
assert.strictEqual(result.toString(), expected);
}),
it("Parse user agent", () => {
const result = chef.parseUserAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 ");
const expected = `Browser