Created
April 9, 2017 17:17
-
-
Save hugollm/8837d1bf40aeee7db23b9f89f731ae16 to your computer and use it in GitHub Desktop.
A bug that I found with python http.cookies.SimpleCookie
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
# watch -n 1 python3 -m unittest bug.py | |
from unittest import TestCase | |
from http.cookies import SimpleCookie | |
class BugTestCase(TestCase): | |
def test_bug(self): | |
morsel = list(SimpleCookie('token=abc; HttpOnly; SameSite=Strict').values())[0] | |
self.assertEqual(morsel.key, 'token') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment