From 0fc2239ef9cb6acccf030e49d47a7c66b5cea96a Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Sat, 14 Oct 2023 03:30:53 +0200 Subject: [PATCH] Improves version detection for iOS and macOS --- Tests/Parser/fixtures/oss.yml | 16 ++++++++++++++++ regexes/oss.yml | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/Tests/Parser/fixtures/oss.yml b/Tests/Parser/fixtures/oss.yml index 9e06eeda76..d4025ccc78 100644 --- a/Tests/Parser/fixtures/oss.yml +++ b/Tests/Parser/fixtures/oss.yml @@ -3918,3 +3918,19 @@ version: 5.4.0 platform: x64 family: Android +- + user_agent: Aloha/1 CFNetwork/1483 Darwin/23.1.0 + os: + name: iOS + short_name: IOS + version: "17.1" + platform: + family: iOS +- + user_agent: Safari/19616.8.27.211.1 CFNetwork/1483 Darwin/23.1.0 + os: + name: Mac + short_name: MAC + version: "14.1" + platform: + family: Mac diff --git a/regexes/oss.yml b/regexes/oss.yml index 7aad3329e0..088f04b037 100644 --- a/regexes/oss.yml +++ b/regexes/oss.yml @@ -807,6 +807,8 @@ - regex: '^(?!com.apple.Safari.SearchHelper|Safari).*CFNetwork/.+ Darwin/(\d+[\.\d]+)(?!.*(?:x86_64|i386|PowerMac|Power%20Macintosh))' name: 'iOS' versions: + - regex: 'Darwin/23.1.0' + version: '17.1' - regex: 'Darwin/23.0.0' version: '17.0' - regex: 'Darwin/22.6.0' @@ -1030,6 +1032,8 @@ - regex: '(?:CFNetwork|StudioDisplay)/.+Darwin(?:/|; )(?:[\d\.]+).+(?:x86_64|i386|Power%20Macintosh)|(?:x86_64-apple-)?darwin(?:[\d\.]+)|PowerMac|com.apple.Safari.SearchHelper|^Safari' name: 'Mac' versions: + - regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23.1.0' + version: '14.1' - regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23.0.0' version: '14.0' - regex: '(?:x86_64-apple-)?Darwin(?:/|; )?22.6.0'