mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fix crash in UCBrowser (PRETIXEU-20M)
This commit is contained in:
@@ -53,7 +53,7 @@ def drops_unrecognized_same_site_cookies(useragent):
|
||||
# Regex parsing of User-Agent string. (See note above!)
|
||||
RE_CHROMIUM = re.compile(r"Chrom(e|ium)")
|
||||
RE_CHROMIUM_VERSION = re.compile(r"Chrom[^ /]+[ /]([0-9]+)[.0-9]*")
|
||||
RE_UC_VERSION = re.compile(r"UCBrowser/([0-9]+)\.([0-9]+)\.([0-9]+)[.0-9]* ")
|
||||
RE_UC_VERSION = re.compile(r"UC[ ]?Browser/([0-9]+)\.([0-9]+)\.([0-9]+)[.0-9]*")
|
||||
RE_IOS_VERSION = re.compile(r"\(iP.+; CPU .*OS ([0-9]+)[_0-9]*.*\) AppleWebKit/")
|
||||
RE_MAC_VERSION = re.compile(r"\(Macintosh;.*Mac OS X ([0-9]+)_([0-9]+)[_0-9]*.*\) AppleWebKit/")
|
||||
RE_SAFARI = re.compile(r"Version/.* Safari/")
|
||||
|
||||
@@ -195,6 +195,8 @@ def test_cookie_samesite_none(env, client, agent):
|
||||
'Mobile/14E5239e Safari/602.1',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 '
|
||||
'Safari/534.59.10',
|
||||
'Mozilla/5.0 (Linux; Android 4.4.2; YOGA Tablet 2-1050L Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) '
|
||||
'Version/4.0 Chrome/30.0.0.0 Safari/537.36 UCBrowser/3.1.0.403',
|
||||
])
|
||||
def test_cookie_samesite_none_only_on_compatible_browsers(env, client, agent):
|
||||
client.post('/mrmcd/2015/cart/add', HTTP_HOST='example.com', HTTP_USER_AGENT=agent, secure=True)
|
||||
|
||||
Reference in New Issue
Block a user