Skip to content

Commit

Permalink
Fix browsers detected as 360 Secure Browser
Browse files Browse the repository at this point in the history
Signed-off-by: Liviu-Mihail Concioiu <[email protected]>
  • Loading branch information
liviuconcioiu committed Dec 2, 2024
1 parent 5893901 commit b18f37c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions DeviceDetector.NET/Parser/Client/BrowserParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -952,20 +952,11 @@ public override ParseResult<ClientMatchResult> Parse()
client.EngineVersion = browserFromUserAgent.EngineVersion ?? string.Empty;
}

// https://bbs.360.cn/thread-16096544-1-1.html
if (GetRegexEngine().Match(client.Version, "/^15/") && GetRegexEngine().Match(browserFromUserAgent.Version, "/^114/"))
{
client.Version = string.Empty;
}

// If client hints report the following browsers, we use the version from useragent
if (!string.IsNullOrEmpty(browserFromUserAgent.Version)
&& !new[] { "A0", "AL", "HP", "JR", "MU", "OM", "OP", "VR" }.Contains(client.ShortName))
{
client.Name = "360 Secure Browser";
client.ShortName = "3B";
client.Engine = browserFromUserAgent.Engine ?? string.Empty;
client.EngineVersion = browserFromUserAgent.EngineVersion ?? string.Empty;
client.Version = browserFromUserAgent.Version;
}

if ("Vewd Browser" == client.Name)
Expand Down

0 comments on commit b18f37c

Please sign in to comment.