fix(ui): reconcile modifier state for Firefox resistFingerprinting (#1305)#1344
Draft
adamshiervani wants to merge 2 commits intodevfrom
Draft
fix(ui): reconcile modifier state for Firefox resistFingerprinting (#1305)#1344adamshiervani wants to merge 2 commits intodevfrom
adamshiervani wants to merge 2 commits intodevfrom
Conversation
…sistFingerprinting spoofing (#1305) Firefox's resistFingerprinting (RFP) spoofs navigator.platform to "Win32" on all OSes, causing isWindows() to return true on Linux. This activates the Windows-specific AltGr key buffering logic, which combined with RFP's ~100ms timestamp precision reduction makes the 3ms AltGr timing check unreliable, potentially swallowing or misrouting key events during password entry. Fix: 1. Use navigator.userAgentData?.platform (User-Agent Client Hints API) when available (Chromium browsers). This API is not affected by RFP. 2. For Firefox/Safari (no userAgentData), detect RFP by checking if both Date.now() and performance.timeOrigin are clamped to 100ms boundaries. When RFP is detected, don't trust the spoofed platform value and return false, disabling the unreliable AltGr workaround.
…tFingerprinting (#1305)
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
resistFingerprintingsuppresses standalone modifier key events (Shift, Ctrl, Alt, Meta keydown/keyup never fire), causing uppercase letters and modified keys to be sent as unmodifiede.shiftKey/e.ctrlKey/e.altKey/e.metaKeyboolean properties after each keydown/keyup and synthesizes missing modifier press/release eventsisWindows()detection to avoid RFP spoofingnavigator.platformto "Win32", which incorrectly activated AltGr buffering on non-Windows systemsCloses #1305