Comparing version 1.0.1 to 1.0.2
@@ -15,4 +15,7 @@ "use strict"; | ||
* "`" / "|" / "~" / DIGIT / ALPHA | ||
* | ||
* Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191 | ||
* Allow same range as cookie value, except `=`, which delimits end of name. | ||
*/ | ||
const cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; | ||
const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/; | ||
/** | ||
@@ -26,4 +29,7 @@ * RegExp to match cookie-value in RFC 6265 sec 4.1.1 | ||
* ; and backslash | ||
* | ||
* Allowing more characters: https://github.com/jshttp/cookie/issues/191 | ||
* Comma, backslash, and DQUOTE are not part of the parsing algorithm. | ||
*/ | ||
const cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/; | ||
const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/; | ||
/** | ||
@@ -180,3 +186,3 @@ * RegExp to match domain-value in RFC 6265 sec 4.1.1 | ||
? options.priority.toLowerCase() | ||
: options.sameSite; | ||
: undefined; | ||
switch (priority) { | ||
@@ -183,0 +189,0 @@ case "low": |
{ | ||
"name": "cookie", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "HTTP server cookie parsing and serialization", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -20,2 +20,3 @@ # cookie | ||
const cookie = require("cookie"); | ||
// import * as cookie from 'cookie'; | ||
``` | ||
@@ -22,0 +23,0 @@ |
Sorry, the diff of this file is not supported yet
46521
352
249