Skip to content

fix: reply to the legacy PIN request instead of letting the pair hang - #110

Merged
MegaManSec merged 1 commit into
mainfrom
fix/reply-to-legacy-pin-request
Aug 20, 2026
Merged

fix: reply to the legacy PIN request instead of letting the pair hang#110
MegaManSec merged 1 commit into
mainfrom
fix/reply-to-legacy-pin-request

Conversation

@MegaManSec

Copy link
Copy Markdown
Owner

devicePairingPINCodeRequest logged the request and returned. The delegate contract requires replyPINCode in response ("must be invoked in response and happen before the timeout period of the device"), so any peripheral that falls back to legacy PIN pairing sat at "Pairing…" until the 60s watchdog, every attempt.

Reply with the all-zero PIN legacy HID peripherals use, and only for a pair this app installed in pendingPairs — a request belonging to any other pair is left alone rather than answered on its behalf. Same gating and main-hop as the confirmation handler in #107, so the two compose.

Found while looking into #109; independent of it.

`devicePairingPINCodeRequest` logged the request and returned without
calling `replyPINCode`, which the delegate contract requires. Any
peripheral that falls back to legacy PIN pairing sat in `.connecting`
until the 60s pair watchdog fired, every attempt.

Reply with the all-zero PIN legacy HID peripherals use, and only for a
pair this app installed in `pendingPairs` — a request belonging to any
other pair is left alone rather than answered on its behalf.
@MegaManSec
MegaManSec enabled auto-merge (squash) August 20, 2026 20:17
@MegaManSec
MegaManSec merged commit 40b55b4 into main Aug 20, 2026
2 checks passed
@MegaManSec
MegaManSec deleted the fix/reply-to-legacy-pin-request branch August 20, 2026 20:17
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.25.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant