More checks on user agent browsers

main
bashrc 2026-04-07 17:30:15 +01:00
parent fbcb1b60a4
commit 832838df57
1 changed files with 10 additions and 0 deletions

View File

@ -4116,6 +4116,16 @@ def check_mixed_user_agent(ua_str: str):
if client_ua in ua_str:
matching_agents.append(client_ua)
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 False