tough-cookie
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -71,5 +71,2 @@ /*! | ||
// Used for checking whether or not there is a trailing semi-colon | ||
var TRAILING_SEMICOLON = /;+$/; | ||
var DAY_OF_MONTH = /^(\d{1,2})[^\d]*$/; | ||
@@ -331,8 +328,2 @@ var TIME = /^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/; | ||
// S4.1.1 Trailing semi-colons are not part of the specification. | ||
var semiColonCheck = TRAILING_SEMICOLON.exec(str); | ||
if (semiColonCheck) { | ||
str = str.slice(0, semiColonCheck.index); | ||
} | ||
// We use a regex to parse the "name-value-pair" part of S5.2 | ||
@@ -367,3 +358,3 @@ var firstSemi = str.indexOf(';'); // S5.2 step 1 | ||
// "discard the first ";" and trim". | ||
var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); | ||
var unparsed = str.slice(firstSemi + 1).trim(); | ||
@@ -384,5 +375,8 @@ // "If the unparsed-attributes string is empty, skip the rest of these | ||
*/ | ||
var cookie_avs = unparsed.split(/\s*;\s*/); | ||
var cookie_avs = unparsed.split(';'); | ||
while (cookie_avs.length) { | ||
var av = cookie_avs.shift(); | ||
var av = cookie_avs.shift().trim(); | ||
if (av.length === 0) { // happens if ";;" appears | ||
continue; | ||
} | ||
var av_sep = av.indexOf('='); | ||
@@ -389,0 +383,0 @@ var av_key, av_value; |
@@ -46,3 +46,3 @@ { | ||
], | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"homepage": "https://github.com/SalesforceEng/tough-cookie", | ||
@@ -65,3 +65,3 @@ "repository": { | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4.0" | ||
}, | ||
@@ -68,0 +68,0 @@ "devDependencies": { |
@@ -429,2 +429,13 @@ [RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js | ||
## Community Cookie Stores | ||
These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look: | ||
- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases | ||
- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk | ||
- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis | ||
- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk | ||
- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage | ||
# Serialization Format | ||
@@ -431,0 +442,0 @@ |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
266816
10
0
504
2129
4