From 832838df57cf7ac46743ee8d711a9024ab3db0eb Mon Sep 17 00:00:00 2001 From: bashrc Date: Tue, 7 Apr 2026 17:30:15 +0100 Subject: [PATCH] More checks on user agent browsers --- utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/utils.py b/utils.py index 76c5db1ce..afa6dbd55 100644 --- a/utils.py +++ b/utils.py @@ -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