Repository navigation
connector: don't ask for a reconnect when only retired E2EE keys are missing - #309
Merged
Merged
Conversation
Contributor
Author
|
No issues found.
All CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
highesttt
approved these changes
Nov 6, 2026
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.
Fixes PLAT-40140
Logs (prod, line a9cefaf): From Nov 3 to Nov 6, 12 accounts went CONNECTED → BAD_CREDENTIALS
line-e2ee-key-missingwithin 5-60 s of logging in. Six of them had just done a full PIN login. Each one unwrapped group keys with its new key, then got flagged formissing my private key for <id>. In every case that ID was older than the new key: the recent-message backfill was hitting history encrypted to the user's previous keys. Five of those users redid the PIN login for nothing. One still shows the reconnect prompt.Cause:
markMissingE2EEKeytreats everyErrMissingOwnPrivateKeyas stale credentials. LINE key IDs increase over time, andLoadMyKeyFromSecureDataalready relies on that. A missing own key belowmyRawKeyIDis a retired key that no relogin returns. Only a newer missing key means the login's keys are stale.Change:
pkg/e2eenow returns a typedMissingOwnKeyError{KeyID}(it wrapsErrMissingOwnPrivateKeyand keeps the same text).markMissingE2EEKeyskips the reconnect flag when that key ID is lower than the current own key. Those messages still show as undecryptable. Stale preserved-key re-logins that miss a newer key are still flagged.go build ./...,go vetand the existing tests in pkg/e2ee and pkg/connector pass.Tag
@indentto continue the conversation here.