Replies: 3 comments 2 replies
-
|
Note, that CoPilot didn't scan the entire source tree, it only did 275 files, which all seemed to be in BrowserKit. No idea what it would find in the other 3000ish files 😀 |
Beta Was this translation helpful? Give feedback.
-
|
Webcompat. This is tracked in issues and PR threads if you blame the lines. If you're not interested in these exact values in your fork, revert the changes, or generally feel free to do whatever suits your case, or what other forks do. |
Beta Was this translation helpful? Give feedback.
-
Yes. (… and no, at times.) Feel free to open an issue specific to this, as there definitely pros and cons of having it mimic and track Safari versions, and also not have it at all. There are apps that fail to sniff UA with this bit missing (most often seen as "Your Safari version: 0 is outdated. Upgrade.") so site patches are being added for these. (ServiceNow, government, healthcare…) At the same time, once you add the Safari version, some apps actually expect real Safari and start using wild intents/schemes that basically switch you out from your browser to mobile Safari without asking, through deeplinks on the system level. (Xitter…) Some other browsers get away with having At the same time, these already can get away with no Basically you don't want to touch these things, as most of the logic you'd be breaking in archaic code out there won't ever change (update, get a new dependency, deployment etc.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, in my fork all PRs go through Copilot for review. While creating the PR for my version of the 149.1 branch it came up with the following suggestions, some of which could fix potential crashes, some are just typos in comments and one involving the creation of UserAgent strings where the OS version is hard-coded:
In BrowserKit/Sources/Shared/UserAgent.swift:
defaultMobileUserAgent() now hardcodes the OS version as 18_7, which will produce incorrect user agents on most devices/OS versions. This should use the actual OS version (e.g., based on UIDeviceDetails.systemVersion with . replaced by _) to avoid web-compat and analytics issues.
Interestingly it only picked up the hard-coded version in
defaultMobileUserAgentand not the one indefaultDesktopUserAgent.Looking at how the user agent string differs from Safari for desktop and mobile in iPad OS 26 (From https://www.whatismybrowser.com/detect/what-is-my-user-agent/):
iPad and iPhone Desktop
The only difference is the
Version/[18.6|26.4]and I assume Firefox is wrong here in saying its 18.6iPad Mobile
iPhone Mobile
For mobile the main difference is the swapping of the
Version/...section with theFxiOS/...section.I don't know enough about all the shenanigans that have been needed to get various websites to play nicely with Firefox, but I do wonder if the lack of the 'Version/...` section in our Mobile UserAgent is troublesome???
Anyway, here's the original rtf file with all the suggestions and better formatting:
Copilot issues.rtf
Beta Was this translation helpful? Give feedback.
All reactions