fix: generate correct user agent string for Google sign-in#2360
Open
phelix001 wants to merge 2 commits intoferdium:developfrom
Open
fix: generate correct user agent string for Google sign-in#2360phelix001 wants to merge 2 commits intoferdium:developfrom
phelix001 wants to merge 2 commits intoferdium:developfrom
Conversation
Webview sessions previously had no setPermissionRequestHandler, causing all permissions to be auto-granted by Electron's default behavior. This adds an explicit allowlist for safe permissions (media, notifications, clipboard, etc.) and enables HID/USB/Serial permission checks needed for hardware FIDO2 security key detection. Unknown permissions are denied and logged for debugging. Related: ferdium#1487, ferdium#2316 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The useragent-generator library produces malformed UA strings with `537.36.0` instead of `537.36` for AppleWebKit and Safari versions. Google's bot detection flags this as a non-standard browser, blocking sign-in with "Couldn't sign you in - This browser or app may not be secure." Replace useragent-generator with a direct template string that produces a standard Chrome UA. Fixes ferdium#2324, ferdium#1414, ferdium#639. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useragent-generatorlibrary with a direct template string for building the Chrome user agent537.36.0instead of the correct537.36for AppleWebKit and Safari version tokensBefore:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36.0 (KHTML, like Gecko) Chrome/138.0.7204.251 Safari/537.36.0After:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.251 Safari/537.36Fixes #2324, #1414, #639
Test plan
🤖 Generated with Claude Code