Skip to content

fix(ui): reconcile modifier state for Firefox resistFingerprinting (#1305)#1344

Draft
adamshiervani wants to merge 2 commits intodevfrom
fix/1305
Draft

fix(ui): reconcile modifier state for Firefox resistFingerprinting (#1305)#1344
adamshiervani wants to merge 2 commits intodevfrom
fix/1305

Conversation

@adamshiervani
Copy link
Copy Markdown
Contributor

Summary

  • Firefox's resistFingerprinting suppresses standalone modifier key events (Shift, Ctrl, Alt, Meta keydown/keyup never fire), causing uppercase letters and modified keys to be sent as unmodified
  • Adds modifier reconciliation that checks e.shiftKey/e.ctrlKey/e.altKey/e.metaKey boolean properties after each keydown/keyup and synthesizes missing modifier press/release events
  • Fixes isWindows() detection to avoid RFP spoofing navigator.platform to "Win32", which incorrectly activated AltGr buffering on non-Windows systems

Closes #1305

AI Agent and others added 2 commits March 26, 2026 18:57
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firefox resist fingerprinting breaks target device login

1 participant