Skip to content

Commit

Permalink
Improves detection for Dezor (matomo-org#7797)
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu authored Aug 26, 2024
1 parent b975507 commit 126083d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ class Browser extends AbstractClientParser
'K3', 'Q4', 'G2', 'R2', 'WX', 'XP', '3I', 'BG', 'R0',
'JO', 'OL', 'GN', 'W4', 'QI', 'E1', 'RI', '8B', '5B',
'K4', 'WK', 'T3', 'K5', 'MU', '9P', 'K6', 'VR', 'N9',
'M9', 'F9', '0P', '0A', 'JR',
'M9', 'F9', '0P', '0A', 'JR', 'D3',
],
'Firefox' => [
'FF', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -788,10 +788,10 @@ class Browser extends AbstractClientParser
'ZR', 'D6', 'F6', 'P3', 'FT', 'A9', 'X2', 'NI', 'FG',
'TH', 'N3', 'GD', 'O9', 'Q3', 'F7', 'K2', 'N4', 'P5',
'H5', 'V3', 'G2', 'BG', 'OL', 'II', 'TL', 'M6', 'Y3',
'M7', 'GN', 'D3', 'IG', 'HW', '4O', 'OU', '5P', 'KE',
'M7', 'GN', 'JR', 'IG', 'HW', '4O', 'OU', '5P', 'KE',
'5A', 'TT', '6P', 'G3', '7P', 'VU', 'F8', 'L4', 'DK',
'DP', 'KL', 'K4', 'N6', 'KU', 'WK', 'M8', 'UP', 'ZT',
'9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A', 'JR',
'9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A',
];

/**
Expand Down
9 changes: 9 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9905,3 +9905,12 @@
engine: Blink
engine_version: 85.0.4183.121
family: Chrome
-
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Dezor/1.2.11 Chrome/106.0.5249.199 Electron/21.4.0 Safari/537.36
client:
type: browser
name: Dezor
version: 1.2.11
engine: Blink
engine_version: 106.0.5249.199
family: Chrome
5 changes: 5 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
###############

# Dezor (https://www.dezor.net/)
- regex: 'Dezor/(\d+[\.\d]+)'
name: 'Dezor'
version: '$1'

# OJR Browser (https://play.google.com/store/apps/details?id=com.ojr.browser.anti.blokir)
- regex: 'OJR Browser/([\d\.]+)'
name: 'OJR Browser'
Expand Down
2 changes: 1 addition & 1 deletion regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,7 @@
version: '$1'

# Electron generic apps
- regex: ' (?!(?:AppleWebKit|brave|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|TweakStyle|Colibri|Polypane|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
- regex: ' (?!(?:AppleWebKit|brave|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
name: '$1'
version: '$2'

Expand Down

0 comments on commit 126083d

Please sign in to comment.