Hubert Chathi
e22ecc6b6d
Merge branch 'develop' into backup_refactor
2021-06-03 18:43:46 -04: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
J. Ryan Stinnett
e217bf9e37
Enable prefixed loggers to chain
2021-02-28 17:15:07 +00:00
J. Ryan Stinnett
8d14dc9ee3
Add debug logs to encryption prep, take 3
...
This continues adding more logs to work out the root cause of
https://github.com/vector-im/element-web/issues/16194 .
Somehow, we're getting stuck while sharing keys with new sessions.
2021-02-23 14:22:44 +00:00
J. Ryan Stinnett
4a0f848551
Add more debug logs to encryption prep
...
This continues work from https://github.com/matrix-org/matrix-js-sdk/pull/1580
and adds more logging, including specialised logging for a potential cause of
https://github.com/vector-im/element-web/issues/16194 .
So far, it seems clear that something's going wrong in the "sharing keys with
new Olm session" step.
2021-02-17 13:45:26 +00:00
J. Ryan Stinnett
4a073a7ba5
Fix lint
2021-01-19 15:36:08 +00:00
J. Ryan Stinnett
9f275d57a9
Add debug logs to encryption prep
...
This extra debug logs may help isolate the cause of
https://github.com/vector-im/element-web/issues/16194 .
These changes also fix a related (but most likely different) failure mode: if a
failure occurred in the `encryptionPreparation` async task, we would skip trying
to prepare in all future attempts for that room. This change ensures prep
failures are logged and we resume prep attempts on the next call from the
application.
2021-01-19 15:28:28 +00:00
Hubert Chathi
458384d658
queue keys for backup even if backup isn't enabled yet
...
We may not have managed to set up the backup yet when we get keys. So we should
unconditionally queue up the keys for backup, so that when the backup is set up,
they will be sent instead of dropped.
2021-01-14 19:55:02 -05:00
J. Ryan Stinnett
a9c9ec3977
Replace Riot with Element in docs and comments
...
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.
Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:32:52 +01:00
Hubert Chathi
fa550e8f03
fix jsdoc
2020-06-16 12:03:29 -04:00
Hubert Chathi
2d73564eba
apply feedback from review, and improve js docs
2020-06-16 11:38:36 -04:00
Hubert Chathi
fd126b8563
lint
2020-06-15 17:53:37 -04:00
Hubert Chathi
bc97e7a5ea
don't trust keys megolm received from backup for verifying the sender
2020-06-15 17:47:25 -04:00
David Baker
cb7e1a9d82
Merge pull request #1367 from matrix-org/dbkr/increase_olm_second_phase_timeout
...
Increase timeout for 2nd phase of Olm session creation
2020-05-01 18:32:25 +01:00
David Baker
3c9dfc195e
Increase timeout for 2nd phase of Olm session creation
...
The timeouts on the two phases of olm session creation are 2 and 10
seconds respectively, so sessions will fail if servers take more
than 10s to respond. Now that we have two phases, we can afford to
wait longer on the second one because the user's isn't waiting for
it to finish before the message will send, so increase it to 30s
so servers have more of a chance to respond.
2020-05-01 18:25:25 +01:00
David Baker
d699e98346
Add logging on decryption retries
...
For https://github.com/vector-im/riot-web/issues/13473
2020-05-01 17:36:49 +01:00
David Baker
21d3dd4506
Remove some dead code from _retryDecryption
...
I think this was attempting to remove the events from _pendingEvents
but a) it wasn't and b) it probably shouldn't be because the retry
itself will re-add them when the decryption attempt starts and remove
them if it succeeds.
Also fix what was presumably a c+p fail.
2020-04-24 14:36:42 +01:00
David Baker
b58846ab6e
Log first known index with megolm session updates
...
Move the logging lower to a point where we know the first index.
2020-04-23 11:43:22 +01:00
David Baker
8b2752441d
Prune to_device messages to avoid sending empty messages
...
Fixes https://github.com/vector-im/riot-web/issues/13322
2020-04-22 13:48:57 +01:00
Hubert Chathi
4f58e9945b
factor out failed device notif to a function, and record all failed devices
...
instead of filtering out already-notified devices
2020-03-24 00:15:04 -04:00
Hubert Chathi
547ded9155
handle failed devices that we aren't going to retry
2020-03-23 23:14:36 -04:00
Hubert Chathi
4f112e8379
only re-try creating olm sessions for servers that failed to respond
...
If the server responded, then retrying likely won't help. Retrying is mainly
to help with slow servers.
2020-03-23 22:36:10 -04:00
Hubert Chathi
4d63f8ed04
don't always do second phase of olm creation
...
don't need to do the shorter timeout when doing preparation to encrypt, and
skip the second phase if the first phase already took longer than a normal
otk claim
2020-03-23 21:26:56 -04:00
David Baker
e1ad2f8a21
Use checkDeviceTrust when computing untrusted devices
...
Apparently we missed using cross-signing trust in the js-sdk itself
2020-03-23 14:28:10 +00:00
Hubert Chathi
9911766435
expose prepareToEncrypt in the client API
2020-03-18 18:53:26 -04:00
Bruno Windels
9bebb22746
devicesByUser should be userId => array of devices
2020-03-17 09:51:28 +01:00
Hubert Chathi
04387e78cc
some cleanups
2020-03-10 15:56:33 -04:00
Hubert Chathi
98d955ef1f
refactor megolm encryption to improve perceived speed
...
- allow applications to pre-send decryption keys before the message is sent
- establish new olm sessions with a shorter timeout first, and then re-try in
the background with a longer timeout without blocking message sending
2020-03-09 18:38:18 -04:00
Hubert Chathi
bf92cb1522
try to re-fetch devices before giving up on trying to heal a broken olm ( #1224 )
2020-02-21 10:20:46 -05:00
Hubert Chathi
cb69515be9
add some logging when sender could not establish an olm session
2020-02-20 14:49:32 -05:00
Hubert Chathi
6e233e860e
remove leftover debugging messages
2020-02-20 14:43:59 -05:00
Hubert Chathi
b4f0ea441b
remove obsolete comment
2020-02-20 14:43:24 -05:00
Jack Works
468fb2cc41
chore: remove custom promise, use es6 standard
...
Signed-off-by: Jack Works <jackworks@protonmail.com >
2020-01-23 19:23:08 -07:00
Travis Ralston
b3efa73eda
Fix conflict in megolm.js
2020-01-15 09:06:30 -07:00
Travis Ralston
f3efac059c
Merge branch 'develop' into travis/sourcemaps
2020-01-15 09:03:21 -07:00
Hubert Chathi
9fb4ed2ec0
Merge pull request #1146 from uhoreg/reporting_olm_error
...
record, report, and notify about olm errors
2020-01-15 09:37:43 -05:00
Hubert Chathi
f19013143a
fix indexedDB storage and retry decryption when we get an olm error
2020-01-14 23:47:05 -05:00
Hubert Chathi
ea3ee9bea5
Merge pull request #1148 from matrix-org/erikj/per_user_device_messages
...
Send device messages for the same user in same API call.
2020-01-14 21:33:46 -05:00
David Baker
6a583d2ba6
Merge pull request #1150 from matrix-org/dbkr/dont_error_on_unknown_devices
...
Add an option to ignore unverified devices
2020-01-14 17:11:47 +00:00
Erik Johnston
b4a93d2dc3
Also apply cahnge to '_splitBlockedDevices'
2020-01-14 10:09:19 +00:00
Erik Johnston
260040b919
Rename var to match new function
2020-01-14 10:07:54 +00:00
Travis Ralston
458b2d422d
Merge branch 'develop' into travis/sourcemaps
2020-01-13 11:17:27 -07:00