tough-cookie
Advanced tools
Sorry, the diff of this file is not supported yet
+1
-1
@@ -344,3 +344,3 @@ /* | ||
| */ | ||
| var cookie_avs = unparsed.split(/\s*;\s+/); | ||
| var cookie_avs = unparsed.split(/\s*;\s*/); | ||
| while (cookie_avs.length) { | ||
@@ -347,0 +347,0 @@ var av = cookie_avs.shift(); |
+1
-1
@@ -6,3 +6,3 @@ { | ||
| "keywords": "HTTP cookie cookies set-cookie cookiejar jar RFC6265 RFC2965", | ||
| "version": "0.9.8", | ||
| "version": "0.9.9", | ||
| "homepage": "https://github.com/goinstant/node-cookie", | ||
@@ -9,0 +9,0 @@ "repository": { |
+19
-1
@@ -247,3 +247,3 @@ /* | ||
| assert.equal(c.TTL(now), 9000); | ||
| assert.equal(c.expiryTime(), c.expires); | ||
| assert.equal(c.expiryTime(), c.expires.getTime()); | ||
| }, | ||
@@ -453,2 +453,20 @@ "TTL with old expires": function() { | ||
| }, | ||
| }, | ||
| "Ironically, Google 'GAPS' cookie has very little whitespace": { | ||
| topic: function() { | ||
| return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); | ||
| }, | ||
| "parsed": function(c) { assert.ok(c) }, | ||
| "key": function(c) { assert.equal(c.key, 'GAPS') }, | ||
| "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, | ||
| "path": function(c) { | ||
| assert.notEqual(c.path, '/;Expires'); // BUG | ||
| assert.equal(c.path, '/'); | ||
| }, | ||
| "expires": function(c) { | ||
| assert.notEqual(c.expires, Infinity); | ||
| assert.equal(c.expires.getTime(), 1397700749000); | ||
| }, | ||
| "secure": function(c) { assert.ok(c.secure) }, | ||
| "httponly": function(c) { assert.ok(c.httpOnly) }, | ||
| } | ||
@@ -455,0 +473,0 @@ } |
| node_modules/ | ||
| .*.sw[nmop] | ||
| npm-debug.log |
| diff --git a/lib/cookie.js b/lib/cookie.js | ||
| index 07cbeeb..af041c0 100644 | ||
| --- a/lib/cookie.js | ||
| +++ b/lib/cookie.js | ||
| @@ -709,11 +709,15 @@ CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { | ||
| if (this.rejectPublicSuffixes && cookie.domain) { | ||
| var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); | ||
| if (suffix == null) // e.g. "com" | ||
| - return cb(new Error("Cookie has domain set to a public suffix")); | ||
| + if (cookie.cdomain() == host) | ||
| + cookie.domain = null; | ||
| + else | ||
| + return cb(new Error("Cookie has domain set to a public suffix")); | ||
| } | ||
| // S5.3 step 6: | ||
| if (cookie.domain) { | ||
| + console.log("CMP",host,cookie.cdomain()); | ||
| if (!domainMatch(host, cookie.cdomain(), false)) | ||
| return cb(new Error("Cookie not in this host's domain")); | ||
| else |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
254628
0.01%2604
0.7%10
-9.09%