-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 160 local suffix #172
Conversation
Temporarily remove logo until it can be re-hosted. I've saved it as a gist here: https://gist.github.com/stash/814c45a58bf8df781c34
Fix work with public suffixes. Fixes #16
Use built-in punycode
Export MemoryCookieStore. Fix #39.
This replaces the private `_creationRuntimeIdx` and `_initialCreationTime` properties with a public `.creationIndex` property. Cookies now get a creation time at construction, but this is replaced when `jar.setCookie` according to either the wall time or the `now` option to that method. Prior to this change, cookies were returned by MemoryCookieStore's getAllCookies in a strange order (sorted by domain then path then key), which breaks `cookieCompare` for cookies with creation times in the same millisecond. Sorting by `.creationIndex` and then removing that property will allow the deserializer to assign new process-specific `.creationIndex` values. But, if the underlying `Store` wants to set that upon retrieval, then they can do that too. By making the property non-enumerable, `assert.deepEqual` can work as expected ;)
Serializable! NB: Cookie toJSON API-breaking change
Addresses #132, partially. The error message is clearer, indicating that this method only accepts the afformentioned types. The part of 132 that it doesn't address is the whole "Cookie instance from another version of the `tough-cookie` package" thing, which isn't really solvable unless we somehow expose the Cookie class that "belongs to" this CookieJar class, which is maybe another patch.
In the event that two tough-cookie modules are loaded, it can be confusing when one sees this error, so help folks figure out how to resolve this.
setCookie arg must be Cookie or string
Use ip-regex instead of net.isIP. Fix #125
Fixes #125 Upgrades minimum supported node.js version to v6 because (a) ip-regexp doesn't work before v4 and (b) request now requires v6+
Downgrade ip-regex dependency to support node 6
* use eslint and prettier to apply consistent formatting * convert var to let,const * prefer template literal over string concatenation * prefer arrow function callbacks * remove string.prototype.repeat * bump async and nyc to latest * use Date.prototype.toUTCString to format date * reformat async task arrangement to be more compact * condense json serialization test with arrow functions * require punycode unconditionally * update remove cookies test to no assume synchronous store * npm test should not run eslint
* use eslint and prettier to apply consistent formatting * convert var to let,const * prefer template literal over string concatenation * prefer arrow function callbacks * remove string.prototype.repeat * bump async and nyc to latest * use Date.prototype.toUTCString to format date * reformat async task arrangement to be more compact * condense json serialization test with arrow functions * require punycode unconditionally * update remove cookies test to no assume synchronous store * npm test should not run eslint * test: update ietf test dates to impossibly far in the future * test: prune unused module var
updated PSL
This reverts commit 720703f.
this was added because .local domains are commonly used for testing purposes inside internal/local networks.
added allowSpecialUseDomain to parameters so that it can be passed to permuteDomain, line 103
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Miguel Roncancio <m***@g***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce.com Contributor License Agreement and this Pull Request will be revalidated. |
Thanks for the contribution! It looks like @stash-sfdc is an internal user so signing the CLA is not required. However, we need to confirm this. |
Thanks for the contribution! Before we can merge this, we need @inikulin @apsavin to sign the Salesforce.com Contributor License Agreement. |
Closed because I was having issues with linking commits to github email. will create a new PR. |
fixes #160
I have added an additional CookieStore option named allowSpecialUseDomain to allow for special-use domains such as '.local'. This is useful for testing purposes, '.local' is a commonly used suffix in testing environments.The const array in permuteDomain includes only .local because that is what I mentioned in the original issue. However, I could add the rest if needed.
Here are some more links regarding special-use domains
https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Special-Use_Domains
https://tools.ietf.org/html/rfc6761
passed all tests. Ran tests with
npm run test
Updated the README to reflect changes made