Fixed false-positive Mobile Safari detection for AppleCoreMedia/1.0.0… - #8369
Fixed false-positive Mobile Safari detection for AppleCoreMedia/1.0.0…#8369ionut-slaveanu wants to merge 4 commits into
Conversation
|
@ionut-slaveanu you need to move the test to -
user_agent: AppleCoreMedia/1.0.0.18G82 (iPhone; U; CPU OS 14_7_1 like Mac OS X; es_xl)
client:
type: library
name: iOS Application
version: "" |
Done! |
liviuconcioiu
left a comment
There was a problem hiding this comment.
I made some code suggestions that can be merged.
You need to also replace lines:
device-detector/regexes/client/libraries.yml
Lines 554 to 555 in 1a80bcf
with:
- regex: 'AppleCoreMedia'
name: 'Apple Core Media'Line:
device-detector/regexes/client/browsers.yml
Line 3594 in 1a80bcf
with:
- regex: '^(?!AppleCoreMedia).*?\bMacintosh'After you make the changes, run ./vendor/bin/phpunit and fix all tests.
Co-authored-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
Done! |
|
This should close #5869. |
AppleCoreMedia/1.0.0.18G82 (iPhone; U; CPU OS 14_7_1 like Mac OS X; es_xl)
Description
Fix detection of AppleCoreMedia user agents that are incorrectly identified as Mobile Safari.
User agents such as:
contain iPhone, causing them to match the Mobile Safari browser regex even though the user agent represents an iOS application using AppleCoreMedia/1.0.0 framewiork.
The
user agent should match the following regex from regexes/client/libraries.yml:
name: 'iOS Application'
version: ''
Instead, it currently matches the Mobile Safari regex from regexes/client/browsers.yml:
name: 'Mobile Safari'
version: ''
engine:
Expected behavior
AppleCoreMedia/1.0.0 (iPhone; ...) → iOS Application
Checklist
Review