tough-cookie 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -265,7 +265,7 @@ The `options` object can be omitted and can have the following properties:
265
265
  - _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk"
266
266
  - _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name.
267
267
  - _prefixSecurity_ - string - default `silent` - set to `'unsafe-disabled'`, `'silent'`, or `'strict'`. See [Cookie Prefixes](#cookie-prefixes) below.
268
- - _allowSpecialUseDomain_ - boolean - default `false` - accepts special-use domain suffixes, such as `local`. Useful for testing purposes.
268
+ - _allowSpecialUseDomain_ - boolean - default `true` - accepts special-use domain suffixes, such as `local`. Useful for testing purposes.
269
269
  This is not in the standard, but is used sometimes on the web and is accepted by most browsers.
270
270
 
271
271
  #### `.setCookie(cookieOrString, currentUrl[, options][, callback(err, cookie)])`
package/lib/cookie.js CHANGED
@@ -1099,7 +1099,10 @@ class CookieJar {
1099
1099
  validators.validate(validators.isObject(options), options);
1100
1100
  this.rejectPublicSuffixes = options.rejectPublicSuffixes;
1101
1101
  this.enableLooseMode = !!options.looseMode;
1102
- this.allowSpecialUseDomain = !!options.allowSpecialUseDomain;
1102
+ this.allowSpecialUseDomain =
1103
+ typeof options.allowSpecialUseDomain === "boolean"
1104
+ ? options.allowSpecialUseDomain
1105
+ : true;
1103
1106
  this.store = store || new MemoryCookieStore();
1104
1107
  this.prefixSecurity = getNormalizedPrefixSecurity(options.prefixSecurity);
1105
1108
  this._cloneSync = syncWrap("clone");
package/lib/memstore.js CHANGED
@@ -64,7 +64,7 @@ class MemoryCookieStore extends Store {
64
64
  const results = [];
65
65
  if (typeof allowSpecialUseDomain === "function") {
66
66
  cb = allowSpecialUseDomain;
67
- allowSpecialUseDomain = false;
67
+ allowSpecialUseDomain = true;
68
68
  }
69
69
  if (!domain) {
70
70
  return cb(null, []);
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- module.exports = '4.1.0'
2
+ module.exports = '4.1.1'
package/package.json CHANGED
@@ -67,7 +67,7 @@
67
67
  "RFC6265",
68
68
  "RFC2965"
69
69
  ],
70
- "version": "4.1.0",
70
+ "version": "4.1.1",
71
71
  "homepage": "https://github.com/salesforce/tough-cookie",
72
72
  "repository": {
73
73
  "type": "git",