summary refs log tree commit diff
path: root/tests/handlers/test_e2e_keys.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in device list caching when remote users leave rooms (#13749)Sean Quah2022-09-141-1/+7
| | | | | | | | | | | | When a remote user leaves the last room shared with the homeserver, we have to mark their device list as unsubscribed, otherwise we would hold on to a stale device list in our cache. Crucially, the device list would remain cached even after the remote user rejoined the room, which could lead to E2EE failures until the next change to the remote user's device list. Fixes #13651. Signed-off-by: Sean Quah <seanq@matrix.org>
* Prefer `make_awaitable` over `defer.succeed` in tests (#12505)Sean Quah2022-04-271-4/+3
| | | | | | | | | | | When configuring the return values of mocks, prefer awaitables from `make_awaitable` over `defer.succeed`. `Deferred`s are only awaitable once, so it is inappropriate for a mock to return the same `Deferred` multiple times. Also update `run_in_background` to support functions that return arbitrary awaitables. Signed-off-by: Sean Quah <seanq@element.io>
* Add type hints for `tests/unittest.py`. (#12347)Richard van der Hoff2022-04-011-2/+4
| | | In particular, add type hints for get_success and friends, which are then helpful in a bunch of places.
* Add type hints to some tests/handlers files. (#12224)Dirk Klimpel2022-03-151-16/+20
|
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Cache empty responses from `/user/devices` (#11587)David Robertson2022-01-051-0/+96
| | | If we've never made a request to a remote homeserver, we should cache the response---even if the response is "this user has no devices".
* Support unprefixed versions of fallback key property names. (#11541)Hubert Chathi2021-12-091-5/+25
|
* Keep fallback key marked as used if it's re-uploaded (#11382)Hubert Chathi2021-11-191-1/+31
|
* Include cross-signing signatures when syncing remote devices for the first ↵Erik Johnston2021-11-091-0/+151
| | | | | | | time (#11234) When fetching remote devices for the first time, we did not correctly include the cross signing keys in the returned results. c.f. #11159
* Always communicate device OTK counts to clients (#10485)Andrew Morgan2021-07-271-5/+15
| | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Limit the number of in-flight /keys/query requests from a single device. ↵Patrick Cloke2021-06-091-3/+10
| | | | (#10144)
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-091-1/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-4/+6
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Convert some test cases to use HomeserverTestCase. (#9377)Patrick Cloke2021-02-111-139/+91
| | | | This has the side-effect of being able to remove use of `inlineCallbacks` in the test-cases for cleaner tracebacks.
* Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-091-1/+1
| | | All handlers now available via get_*_handler() methods on the HomeServer.
* Invalidate the cache when an olm fallback key is uploaded (#8501)Hubert Chathi2020-10-081-0/+20
|
* Add support for MSC2732: olm fallback keys (#8312)Hubert Chathi2020-10-061-0/+65
|
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Convert device handler to async/await (#7871)Patrick Cloke2020-07-171-4/+6
|
* Convert E2E key and room key handlers to async/await. (#7851)Patrick Cloke2020-07-151-112/+174
|
* isort 5 compatibility (#7786)Will Hunt2020-07-051-3/+1
| | | The CI appears to use the latest version of isort, which is a problem when isort gets a major version bump. Rather than try to pin the version, I've done the necessary to make isort5 happy with synapse.
* Add option to enable encryption by default for new rooms (#7639)Andrew Morgan2020-06-101-4/+14
| | | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/2431 Adds config option `encryption_enabled_by_default_for_room_type`, which determines whether encryption should be enabled with the default encryption algorithm in private or public rooms upon creation. Whether the room is private or public is decided based upon the room creation preset that is used. Part of this PR is also pulling out all of the individual instances of `m.megolm.v1.aes-sha2` into a constant variable to eliminate typos ala https://github.com/matrix-org/synapse/pull/7637 Based on #7637
* Fix encryption algorithm typos in tests/comments (#7637)Andrew Morgan2020-06-041-5/+5
| | | | | | | | @uhoreg has confirmed these were both typos. They are only in comments and tests though, rather than anything critical. Introduced in: * https://github.com/matrix-org/synapse/pull/7157 * https://github.com/matrix-org/synapse/pull/5726
* look up cross-signing keys from the DB in bulk (#6486)Hubert Chathi2019-12-121-8/+0
|
* Back out perf regression from get_cross_signing_keys_from_cache. (#6494)Neil Johnson2019-12-091-0/+8
| | | Back out cross-signing code added in Synapse 1.5.0, which caused a performance regression.
* use something that's the right type for user_idHubert Chathi2019-09-061-1/+1
|
* fix testHubert Chathi2019-09-051-1/+3
|
* add testHubert Chathi2019-09-041-0/+88
|
* make isort happyHubert Chathi2019-09-041-0/+1
|
* make black happyHubert Chathi2019-09-041-85/+62
|
* allow uploading signatures of master key signed by devicesHubert Chathi2019-09-041-1/+226
|
* fix formattingHubert Chathi2019-08-011-1/+3
|
* allow uploading keys for cross-signingHubert Chathi2019-07-251-0/+63
|
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
|
* Run black.black2018-08-101-65/+34
|
* run isortAmber Brown2018-07-091-2/+3
|
* s/replication_client/federation_client/Erik Johnston2018-03-131-1/+1
|
* Fix testsErik Johnston2018-03-131-1/+1
|
* Remove spurious unittest.DEBUGRichard van der Hoff2018-01-261-1/+0
|
* Do some logging when one-time-keys get claimedRichard van der Hoff2017-05-091-0/+34
| | | | | might help us figure out if https://github.com/vector-im/riot-web/issues/3868 has happened.
* Allow clients to upload one-time-keys with new sigsRichard van der Hoff2017-05-091-0/+98
| | | | | | | When a client retries a key upload, don't give an error if the signature has changed (but the key is the same). Fixes https://github.com/vector-im/riot-android/issues/1208, hopefully.
* keys/query: return all users which were asked forRichard van der Hoff2016-08-031-0/+46
In the situation where all of a user's devices get deleted, we want to indicate this to a client, so we want to return an empty dictionary, rather than nothing at all.