You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.0 KiB
26 lines
1.0 KiB
diff -rupN yarn-1.22.21/node_modules/tough-cookie/lib/memstore.js yarn-1.22.21-new/node_modules/tough-cookie/lib/memstore.js
|
|
--- yarn-1.22.21/node_modules/tough-cookie/lib/memstore.js 2024-02-16 23:36:08.000000000 +0100
|
|
+++ yarn-1.22.21-new/node_modules/tough-cookie/lib/memstore.js 2024-02-19 10:48:11.215668646 +0100
|
|
@@ -36,7 +36,7 @@ var util = require('util');
|
|
|
|
function MemoryCookieStore() {
|
|
Store.call(this);
|
|
- this.idx = {};
|
|
+ this.idx = Object.create(null);
|
|
}
|
|
util.inherits(MemoryCookieStore, Store);
|
|
exports.MemoryCookieStore = MemoryCookieStore;
|
|
@@ -115,10 +115,10 @@ MemoryCookieStore.prototype.findCookies
|
|
|
|
MemoryCookieStore.prototype.putCookie = function(cookie, cb) {
|
|
if (!this.idx[cookie.domain]) {
|
|
- this.idx[cookie.domain] = {};
|
|
+ this.idx[cookie.domain] = Object.create(null);
|
|
}
|
|
if (!this.idx[cookie.domain][cookie.path]) {
|
|
- this.idx[cookie.domain][cookie.path] = {};
|
|
+ this.idx[cookie.domain][cookie.path] = Object.create(null);
|
|
}
|
|
this.idx[cookie.domain][cookie.path][cookie.key] = cookie;
|
|
cb(null);
|