Skip to content
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

Closed
wants to merge 153 commits into from
Closed

Issue 160 local suffix #172

wants to merge 153 commits into from

Conversation

miggs125
Copy link
Contributor

@miggs125 miggs125 commented Oct 5, 2019

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

stash-sfdc and others added 30 commits April 21, 2015 18:18
Temporarily remove logo until it can be re-hosted.  I've saved it as a
gist here: https://gist.github.com/stash/814c45a58bf8df781c34
Get rid of strict mode (closes #34, fixes #9)
Fix work with public suffixes. Fixes #16
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
stash and others added 24 commits January 7, 2019 11:24
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
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
@salesforce-cla
Copy link

salesforce-cla bot commented Oct 5, 2019

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.

@salesforce-cla
Copy link

salesforce-cla bot commented Oct 5, 2019

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.

@salesforce-cla
Copy link

salesforce-cla bot commented Oct 5, 2019

Thanks for the contribution! Before we can merge this, we need @inikulin @apsavin to sign the Salesforce.com Contributor License Agreement.

@miggs125 miggs125 closed this Oct 5, 2019
@miggs125
Copy link
Contributor Author

miggs125 commented Oct 5, 2019

Closed because I was having issues with linking commits to github email. will create a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow .local suffix domains for testing purposes