Skip to content

Commit

Permalink
Merge pull request #89 from liviuconcioiu/88
Browse files Browse the repository at this point in the history
Fix browsers detected as 360 Secure Browser
  • Loading branch information
totpero authored Dec 3, 2024
2 parents 5893901 + b18f37c commit b91a252
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 b91a252

Please sign in to comment.