mirror of https://gitlab.com/bashrc2/epicyon
More checks on user agent browsers
parent
fbcb1b60a4
commit
832838df57
10
utils.py
10
utils.py
|
|
@ -4116,6 +4116,16 @@ def check_mixed_user_agent(ua_str: str):
|
||||||
if client_ua in ua_str:
|
if client_ua in ua_str:
|
||||||
matching_agents.append(client_ua)
|
matching_agents.append(client_ua)
|
||||||
if len(matching_agents) > 1:
|
if len(matching_agents) > 1:
|
||||||
|
if len(matching_agents) == 2:
|
||||||
|
if matching_agents[0] == 'Mozilla':
|
||||||
|
# Safari browser oddly starts with Mozilla
|
||||||
|
# https://www.useragentstring.com/pages/Safari
|
||||||
|
if matching_agents[1] == 'Safari':
|
||||||
|
return False
|
||||||
|
# Chrome browser oddly starts with Mozilla
|
||||||
|
# https://www.useragentstring.com/pages/Chrome
|
||||||
|
if matching_agents[1] == 'Chrome':
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue