-
Notifications
You must be signed in to change notification settings - Fork 101
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
Strip leading .
from cookie domain names.
#1041
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataflake
approved these changes
May 17, 2022
d-maurer
approved these changes
May 17, 2022
icemac
commented
May 18, 2022
Michael Howitz wrote at 2022-5-17 23:25 -0700:
***@***.*** commented on this pull request.
> @@ -242,6 +242,10 @@ def domain_converter(value):
return value
from encodings.idna import ToASCII
from encodings.idna import nameprep
***@***.*** Is it necessary to do these imports here instead of at the top of the module?
They are here for documentation/modularity purposes:
this documents that they are special to this converter and not used
elsewhere.
Maybe, we should consider
"#1033":
meanwhile, I believe that using the IDNA encoding (in this place) is wrong
altogether and that it should get replaced by normal URL quoting
(with safe characters defined by
"https://datatracker.ietf.org/doc/html/rfc3986.html#section-3.2.2").
IDNA is likely necessary only in interactions with the DNS;
Browsers apparently do not expect IDNA encoding in the `host` part
of an URL but normal URL quoting.
|
icemac
changed the title
Allow leading
Strip leading May 19, 2022
.
in cookie domain names..
from cookie domain names.
I'm going to merge this, #1033 is a separate issue for a separate PR. |
dataflake
added a commit
that referenced
this pull request
May 20, 2022
* Allow leading `.` in cookie domain names. * Add PR reference. * Strip leading dot as suggested by @d-maurer. * Make linter happy. * - small cleanups Co-authored-by: Jens Vagelpohl <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the value of the
domain
attribute in the cookie starts with.
Zope currently breaks.But according to https://www.rfc-editor.org/rfc/rfc6265#section-4.1.2.3 it should be allowed.
I added a test and a fix, without the fix the new test breaks with: