Repository navigation
Clarify when the pairing round count resets - #312
Merged
Merged
Conversation
11 of 12 tasks
arturpragacz
requested changes
Oct 23, 2026
arturpragacz
approved these changes
Oct 23, 2026
1 of 9 tasks
maximmaxim345
added a commit
to Sendspin/sendspin-js
that referenced
this pull request
Oct 27, 2026
# What does this implement/fix? <!-- Quick description and explanation of changes. --> A mistyped dynamic pairing code ended the whole pairing attempt, and after 10 failures every attempt needed the pairing window, with no way to reset the count. Now a wrong code starts another round with the same code. After 20 rounds without a correct code, attempts wait until the app calls `releasePairingHold()` on a deliberate action on the device, which also resets the count. This also fixes a few other gaps with the spec: - The static pairing window now stays open across attempts, so a timed-out or cancelled attempt no longer needs a new gesture. It closes on a completed pairing, the fifth wrong code, a drop of the connection that used it, or `cancelPairing()`. - Pairing messages that arrive out of sequence now close the connection instead of being ignored. Messages still in flight after the client's own `pair/abort` are still dropped. - The sample player shows the dynamic code as `123-456` and speaks it with a pause between groups. This is a breaking change: `isDynamicPinEscalated()` is now `isRoundLimitReached()`, and `releasePairingHold()` replaces `openPairingWindow()` for releasing held-back dynamic pairing attempts. **Related issue or spec PR (if applicable):** - Sendspin/spec#194 - Sendspin/spec#237 - Sendspin/spec#312 ## Types of changes <!-- Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the matching label, and the release notes use it to sort this change. --> - [ ] Bugfix (non-breaking change which fixes an issue): `bugfix` - [ ] New feature (non-breaking change which adds functionality): `new-feature` - [ ] Enhancement to an existing feature: `enhancement` - [x] Breaking change (changes the public API or the protocol in a way that is not backwards compatible): `breaking-change` - [ ] Refactor (no behavior change): `refactor` - [ ] Documentation only: `documentation` - [ ] Maintenance / chore: `maintenance` - [ ] CI / workflow change: `ci` - [ ] Dependencies bump: `dependencies`
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.
The round limit said the operator action that lifts the hold-back also resets the round count, but not whether other operator actions could. A client that resets on an operator action partway through an attempt gives an attacker more than 20 guesses at the same pairing code.
Now only that action or a verified
server_kcresets the count.