Socket
Socket
Sign inDemoInstall

tough-cookie

Package Overview
Dependencies
0
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.2 to 2.3.0

lib/cookie.js.orig

18

lib/cookie.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc