-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a more structured algorithm for determining decryption client for appservice events #352
Open
Half-Shot
wants to merge
103
commits into
turt2live:main
Choose a base branch
from
Half-Shot:hs/intelligent-decrypt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Ensure that the bot has all keys needed for sharing a room key with recipients before encryping an event in that room. Signed-off-by: Andrew Ferrazzutti <[email protected]>
* Handle pre-shared invite keys Signed-off-by: Andrew Ferrazzutti <[email protected]> * Use assignment for changes to membership array * Catch member lookup errors in prepareEncrypt Treat an error in looking up room members of a particular membership type as there being no members of that type. Return early if no members are found. * Resolve conflict on `members` variable Signed-off-by: Andrew Ferrazzutti <[email protected]>
We'd like to disable the LRU to tempoarily workaround some caching issues, which requires us to be able to set the values of maxAgeMs/maxCached to `0`.
We'd like to disable the LRU to tempoarily workaround some caching issues, which requires us to be able to set the values of maxAgeMs/maxCached to `0`.
Includes v0.6.4+patches (not yet released as v0.6.5 upstream)
…e#314) * Fix key query and claim APIs to support async functionality * fix copy/paste fail
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Run all tests with both the Sled and SQLite store types Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
This also allows it to be guarded with a check on whether the client's crypto had been set up.
This allows responding to when a transaction requires an appservice user that the process has not yet initialized.
because: - the failure will print its own logs - the point of catching this is that it's _not_ an error
because the failure already logs the error
If key backups are enabled on a client that already has them enabled, don't re-add the listener for to-device room key messages.
Otherwise, if a listener of that event were to trigger a lookup of the same Intent, the lookup wouldn't see the event in the Intent cache, and thus cause a new Intent to be created & new event to be emitted.
Half-Shot
force-pushed
the
hs/intelligent-decrypt
branch
from
November 29, 2023 09:54
aa8e470
to
15643f8
Compare
turt2live
requested changes
Nov 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something seems to have gone wrong with the branch.
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.
This PR changes the way we pick a client for decrypting an event, and caches the result so that it can be reused. This is intended to ensure that when the sender user isn't used for decryption, Appservice doesn't make repeated calls to get_joined_rooms, and when it picks a client it prefers one with encryption already enabled to save time.
We also update to ES2022 so I can use Error.cause, one of my favourite new ES features.
Checklist