Skip to content

Conversation

SBerkovic
Copy link

This pull request fixes an issue with the _getPlatform function in the user-agent-override evasion where the user agent hint platform for macOS devices was incorrectly returned as 'Mac OS X' instead of 'macOS'.
In the real world, the sec-ch-ua-platform header for macOS devices is set to 'macOS', as documented in the official MDN Web Docs (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-UA-Platform).

The function has been updated to correctly return 'macOS' when the extended parameter is set to true. I have also updated the corresponding test case to reflect the change in the sec-ch-ua-platform header for macOS devices.

Updated the `_getPlatform` function to correctly return the user agent hint for macOS devices in stealth mode. The function now returns 'macOS' instead of 'Mac OS X' when the `extended` parameter is set to `true`.
Also updated the test case to reflect the change in the `sec-ch-ua-platform` header for macOS devices.
@github-actions github-actions bot added plugin: puppeteer-extra PuppeteerExtra Plugin related plugin: stealth ㊙️ Detection evasion related labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: puppeteer-extra PuppeteerExtra Plugin related plugin: stealth ㊙️ Detection evasion related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant