-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-35647: Fix path check in cookiejar #11436
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
Conversation
@serhiy-storchaka It would be helpful if you can review this since you had reviewed #10258 . The RFC has a section weak integrity about this
So opinions on if this is worthy enough of considering it as a security fix to backport to 3.6 or to have this as a regular bug fix to 3.7 and master would be helpful. cc: @ned-deily |
16a6959
to
de2c5a4
Compare
@alex Any opinions on this? It would be good to get this resolved for 3.7.3rc1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert in this code, so it'd be good to get someone more familiar with the http
module, but the logic looks right to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the detailed description of this issue in (https://bugs.python.org/issue35647) (Thanks @tirkarthi )
Inclined to agree that, this is a security loophole that is being fixed.
+1 to back-porting this to supported versions of Python.
@orsenthil: Please replace |
Thanks @tirkarthi for the PR, and @orsenthil for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
GH-12267 is a backport of this pull request to the 3.7 branch. |
GH-12268 is a backport of this pull request to the 3.6 branch. |
* Refactor cookie path check as per RFC 6265 * Add tests for prefix match of path * Add news entry * Fix set_ok_path and refactor tests * Use slice for last letter (cherry picked from commit 0e1f1f0) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* Refactor cookie path check as per RFC 6265 * Add tests for prefix match of path * Add news entry * Fix set_ok_path and refactor tests * Use slice for last letter (cherry picked from commit 0e1f1f0) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* Refactor cookie path check as per RFC 6265 * Add tests for prefix match of path * Add news entry * Fix set_ok_path and refactor tests * Use slice for last letter (cherry picked from commit 0e1f1f0) Co-authored-by: Xtreak <tir.karthi@gmail.com>
Thanks Alex and Senthil for review and merge. |
* Refactor cookie path check as per RFC 6265 * Add tests for prefix match of path * Add news entry * Fix set_ok_path and refactor tests * Use slice for last letter (cherry picked from commit 0e1f1f0)
* Refactor cookie path check as per RFC 6265 * Add tests for prefix match of path * Add news entry * Fix set_ok_path and refactor tests * Use slice for last letter (cherry picked from commit 0e1f1f0)
path_return_ok
to use RFC 6265 path-match algorithm. Fixset_ok_path
which also had similar bug in prefix check which now usespath_return_ok
itself.https://bugs.python.org/issue35647