Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect detection of DuckDuckGo browser on macOS #7736

Closed
ramsey opened this issue Jul 10, 2024 · 0 comments · Fixed by #7737
Closed

Incorrect detection of DuckDuckGo browser on macOS #7736

ramsey opened this issue Jul 10, 2024 · 0 comments · Fixed by #7737

Comments

@ramsey
Copy link

ramsey commented Jul 10, 2024

The DuckDuckGo browser installed on my system (version 1.95.0 (216)) uses the following user agent string:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15 Ddg/17.5

matomo/device-detector detects this user agent string as Safari:

$dd = new DeviceDetector\DeviceDetector('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15 Ddg/17.5');
$dd->parse();

var_dump($dd->getClient());
[
    "type" => "browser",
    "name" => "Safari",
    "short_name" => "SF",
    "version" => "17.5",
    "engine" => "WebKit",
    "engine_version" => "605.1.15",
    "family" => "Safari",
]

This is different from the user agent strings used for testing in #7709, and I'm also unable to find any documentation that shows use of this variant, so maybe this is a bug in DuckDuckGo?

When I use a user agent string from #7709, matomo/device-detector properly identifies the UA as the "DuckDuckGo Privacy Browser:"

$dd = new DeviceDetector\DeviceDetector('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 DuckDuckGo/7 Safari/605.1.15');
$dd->parse();

var_dump($dd->getClient());
[
    "type" => "browser",
    "name" => "DuckDuckGo Privacy Browser",
    "short_name" => "DD",
    "version" => "7",
    "engine" => "Blink",
    "engine_version" => "",
    "family" => "Chrome",
]

While this PR is for the iOS app, it seems like it might be related: duckduckgo/iOS#2335, particularly this new method with the string "Ddg/" hard-coded:

private static func createBrandComponent(withVersion version: String) -> String { "Ddg/\(version)" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant