mcalinghee
f84a33910c
Unexpected ignored self key request when it's not shared history ( #2724 )
...
* ignore forwarded key process also if the user is not the same
2022-10-04 14:31:21 +02:00
Faye Duxovni
7d5360a00f
Rename redecryption-related function arguments for clarity ( #2709 )
2022-10-03 19:51:30 -04:00
Michael Telatynski
f349663329
Add CI to protect against mixing src and lib imports ( #2704 )
2022-09-30 09:05:28 +01:00
RiotRobot
a587d7c360
Resolve multiple CVEs
...
CVE-2022-39249
CVE-2022-39250
CVE-2022-39251
CVE-2022-39236
2022-09-28 13:55:15 +01:00
Travis Ralston
8716c1ab9b
Convert several internal maps to real maps
2022-08-31 09:21:46 -06:00
Faye Duxovni
3762c20aad
Revert "Always block sending keys to unverified devices of verified users ( #2562 )" ( #2571 )
...
This will be rolled out again later with more accompanying UI adjustments, including clearer error messages and possibly the option to disable it per-room.
2022-08-08 12:27:41 -04:00
David Baker
575b416856
Simplify encryptAndSendToDevices ( #2566 )
...
It went to quite a lot of effort to gather a bunch of information to
return, but the only thing using it already had all that info anyway.
2022-08-05 15:58:33 +01:00
Faye Duxovni
43b453804b
Always block sending keys to unverified devices of verified users ( #2562 )
2022-08-04 11:11:12 -04:00
Robin
c36bfc821c
Add support for sending user-defined encrypted to-device messages ( #2528 )
...
* Add support for sending user-defined encrypted to-device messages
This is a port of the same change from the robertlong/group-call branch.
* Fix tests
* Expose the method in MatrixClient
* Fix a code smell
* Fix types
* Test the MatrixClient method
* Fix some types in Crypto test suite
* Test the Crypto method
* Fix tests
* Upgrade matrix-mock-request
* Move useRealTimers to afterEach
2022-08-03 16:16:48 +00:00
David Baker
7e784da00a
Retry to-device messages ( #2549 )
...
* Retry to-device messages
This adds a queueToDevice API alongside sendToDevice which is a
much higher-level API that adds the messages to a queue, stored in
persistent storage, and retries them periodically. Also converts
sending of megolm keys to use the new API.
Other uses of sendToDevice are nopt converted in this PR, but could
be later.
Requires https://github.com/matrix-org/matrix-mock-request/pull/17
* Bump matrix-mock-request
* Add more waits to make indexeddb tests pass
* Switch some test expectations to queueToDevice
* Stop straight away if the client has been stopped
Hopefully will fix tests being flakey and logging after tests have
finished.
* Add return types & fix constant usage
* Fix return type
Co-authored-by: Germain <germains@element.io >
* Fix return type
Co-authored-by: Germain <germains@element.io >
* Fix return type
Co-authored-by: Germain <germains@element.io >
* Stop the client in all test cases
Co-authored-by: Germain <germains@element.io >
2022-08-03 13:32:58 +01:00
Travis Ralston
08ab51eeac
Remove unstable support for m.room_key.withheld ( #2512 )
...
We no longer send or receive the unstable type.
2022-07-13 08:56:01 -06:00
Jonathan de Jong
78db74dad8
Various changes to src/crypto files for correctness ( #2137 )
...
* make various changes for correctness
* apply some review feedback
* Address some review feedback
* add some more correctness
* refactor ensureOutboundSession to fit types better
* change variable naming slightly to prevent confusion
* some wording around exception-catching
* Tidy test
* Simplify
* Add tests
* Add more test coverage
* Apply suggestions from code review
Co-authored-by: Travis Ralston <travpc@gmail.com >
* Update crypto.spec.js
* Update spec/unit/crypto.spec.js
Co-authored-by: Faye Duxovni <duxovni@duxovni.org >
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
Co-authored-by: Travis Ralston <travpc@gmail.com >
Co-authored-by: Faye Duxovni <duxovni@duxovni.org >
2022-06-13 19:05:03 +00:00
Michael Telatynski
4897bccdc9
Improve decryption failure logging ( #2453 )
...
* Improve typing
* Log the actual errors to include call stacks
2022-06-13 13:26:01 +01:00
Jonathan de Jong
aa94d5d95c
Assume per-user deviceID uniqueness in encryptAndSendKeysToDevices ( #2136 )
...
* Segment recorded device info by user ID when tracking key shares.
Fixes #2135 .
* address review feedback
* fix userIdDeviceInfo
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2022-06-06 15:09:32 +01:00
Faye Duxovni
8412ccfa9b
Try to load keys from key backup when a message fails to decrypt ( #2373 )
...
Co-authored-by: Travis Ralston <travisr@matrix.org >
2022-06-01 00:43:23 -04:00
Michael Telatynski
8be30acb11
Apply suggestions from SonarQube ( #2340 )
2022-05-03 15:40:57 -06:00
Hubert Chathi
17f3920ddd
Send and handle stable name for withheld codes ( #2232 )
...
since MSC2399 is finished FCP and it's in the spec, we can use the stable name
now
2022-03-11 16:21:06 -05:00
J. Ryan Stinnett
83d952eae8
Fix spacing errors ( #2096 )
2022-01-10 12:57:11 +00:00
Michael Telatynski
f8097221e6
Improve typing ( #2055 )
2021-12-09 14:22:58 +00:00
Denis Kasak
a0de1740a4
Add comma per review
...
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2021-10-12 13:23:22 +00:00
Denis Kasak
8e2e3018d8
Log device objects for existing/new devices when sharing room keys.
2021-10-12 13:48:41 +02:00
Denis Kasak
60e93024e7
Fix comment regarding marking blocked devices as notified.
2021-10-12 13:43:28 +02:00
Denis Kasak
d89aa365f9
More detailed logging of blocked devices.
...
Separately log how many blocked devices there are in total and list them
out.
Then, log how many devices were notified because they were newly
blocked and list those out too.
2021-10-12 13:43:28 +02:00
Denis Kasak
4241263f2c
Make log message regarding notifying unnotified failed devices clearer.
2021-10-12 13:43:26 +02:00
Denis Kasak
b009f9c21b
Log more clearly when we're sharing room keys with *new* Olm sessions.
2021-10-12 13:41:04 +02:00
Denis Kasak
04ccec6de3
Log which devices room keys were shared with.
2021-10-12 13:41:04 +02:00
RiotRobot
72d580edfd
Merge branch 'master' into develop
2021-09-13 12:50:02 +01:00
RiotRobot
894c24880d
Verify target device key on reshare
2021-09-13 12:34:48 +01:00
Michael Telatynski
666e471369
Convert OlmDevice to Typescript
2021-09-07 13:22:27 +01:00
Michael Telatynski
011a2acfd2
Convert crypto/store/* to Typescript
2021-07-24 11:35:30 +01:00
Michael Telatynski
17efcad6fe
Improve and consolidate typing
2021-07-10 15:50:40 +01:00
Hubert Chathi
17dc1bda19
Merge branch 'develop' into symmetric_backup
2021-07-07 19:19:56 -04:00
Hubert Chathi
9019bce843
mark session as untrusted when the session data has the untrusted flag
2021-07-07 16:16:07 -04:00
Michael Telatynski
d50e559f97
MegolmDecryption::deviceId is not a valid field, sub it out for undefined as it isn't used meaningfully anyhow
2021-06-25 10:21:28 +01:00
Michael Telatynski
835aafcb17
Type the rest of algorithms because tests are unhappy otherwise
2021-06-25 10:18:46 +01:00
Michael Telatynski
48ad9ba3d7
Some more types
2021-06-24 21:48:55 +01:00
Michael Telatynski
e9007429dd
fix more underscored accesses
2021-06-23 15:02:01 +01:00
Travis Ralston
39892c98f9
Add keysharing on invites to File Tree Spaces
2021-06-17 17:36:49 -06:00
Travis Ralston
f53a32a6b4
Merge branch 'develop' into travis/ts-mtxcli
2021-06-03 18:49:08 -06:00
Hubert Chathi
e22ecc6b6d
Merge branch 'develop' into backup_refactor
2021-06-03 18:43:46 -04:00
Travis Ralston
486369e97c
Clean up "base-apis" find&replace
2021-06-02 13:42:20 -06:00
Germain Souquet
cb91c4292c
Merge branch 'develop' into gsouquet/pr-review-linting-rules
2021-05-27 16:00:12 +01:00
Hubert Chathi
747723c8fb
factor out backup management to a separate module
2021-05-18 18:15:22 -04:00
Germain
9a9ed124f5
Use native Object and Array methods ( #1693 )
2021-05-13 17:20:09 +01:00
Germain Souquet
5caf05cfa1
Apply new linting rules
2021-05-11 11:25:43 +01:00
Germain Souquet
576f46cb88
Add flag to prevent emitting event.decrypted
2021-05-10 15:25:07 +01:00
Hubert Chathi
1c191b2278
use new terminology and field name from MSC
2021-03-15 22:49:43 -04:00
Hubert Chathi
a489691151
various fixes
2021-03-11 17:30:05 -05:00
Hubert Chathi
0bfcb5071d
fix test, lint
2021-03-10 20:04:34 -05:00
Hubert Chathi
ceb162eb01
initial work on room history key sharing, take 2
2021-03-10 19:51:22 -05:00