Richard van der Hoff
aefdacc566
Merge pull request #297 from matrix-org/rav/better_new_device_handling
...
Avoid a packetstorm of device queries on startup
2016-11-17 17:42:51 +00:00
Richard van der Hoff
d619495136
Merge pull request #295 from matrix-org/rav/handle_errors_on_key_share
...
E2E: Check devices to share keys with on each send
2016-11-17 17:40:20 +00:00
Richard van der Hoff
036d1da013
Avoid a packetstorm of device queries on startup
...
Two main changes here:
* when we get an m.new_device event for a device we know about, ignore it
* Batch up the m.new_device events received during initialsync and spam out
all the queries at once.
2016-11-17 16:23:24 +00:00
Richard van der Hoff
f6830992ea
Apply unknown-keyshare mitigations
...
Now that the mobile clients have been updated to send the right fields, enforce
their correctness on the recipient side.
2016-11-16 22:39:08 +00:00
Richard van der Hoff
769a0cb76f
Check devices to share keys with on each send
...
Instead of trying to maintain a list of devices we need to share with, just
check all the devices for all the users on each send.
This should fix https://github.com/vector-im/vector-web/issues/2568 , and
generally mean we're less likely to get out of sync.
2016-11-16 22:24:11 +00:00
Richard van der Hoff
766e837775
Factor out ensureOlmSessionsForDevices
...
... and move to olmlib
2016-11-16 21:21:57 +00:00
Richard van der Hoff
851b33aac2
distinguish unknown users from deviceless users
...
Fixes https://github.com/vector-im/vector-web/issues/2275
2016-11-16 18:05:41 +00:00
David Baker
fc958a3922
lint
2016-11-16 16:33:08 +00:00
David Baker
2c31b72c52
Merge pull request #293 from arxcode/develop
...
Allows to start client with initialSyncLimit = 0
2016-11-16 14:43:20 +00:00
Richard van der Hoff
8decb02027
Merge pull request #289 from matrix-org/luke/api-change-tlw-public-unpagination
...
Make timeline-window _unpaginate public and rename to unpaginate
2016-11-16 14:29:15 +00:00
Alexander
a0fd87c032
Allows to start client with initialSyncLimit = 0 (see http://bit.ly/2f49Kbs )
2016-11-16 09:26:16 -05:00
Luke Barnard
c0d862c9f0
Correct jsdoc for unpaginate
2016-11-16 11:06:56 +00:00
David Baker
8143abc9e7
Merge pull request #286 from fred-wang/fix-sync-stop
...
Send a STOPPED sync updated after call to stopClient
2016-11-16 10:02:28 +00:00
Richard van der Hoff
5b4aedd4be
Fix bug in verifying megolm event senders
...
1a03e534bd introduced a bug which mixed up the keys_proved and the
keys_claimed. Switch them around again so that megolm messages are correctly
tied back to the sending device.
2016-11-16 09:22:31 +00:00
Luke Barnard
d8c0b16d7e
Make timeline-window _unpaginate public and remove _
2016-11-15 13:27:42 +00:00
Richard van der Hoff
909b56d48e
Merge pull request #288 from matrix-org/rav/decrypt_after_keys_arrive
...
Handle decryption of events after they arrive
2016-11-15 11:11:10 +00:00
Richard van der Hoff
a5d857945a
Retry decryption after receiving keys
...
m.room_keys may arrive after the messages themselves, so allow events to be
decrypted after the event (haha).
2016-11-14 15:13:02 +00:00
Richard van der Hoff
1a03e534bd
Refactor decryption
...
Create the MatrixEvent wrapper before decryption, and then pass that into the
decryptors, which should update it.
Also remove the workaround that sends m.new_device messages when we get an
unknown session; it's just a bandaid which is obscuring more meaningful
problems.
2016-11-14 15:13:02 +00:00
Richard van der Hoff
e623b539c4
persist DecryptionAlgorithm instances
...
It's useful to be able to keep state between events in the DecryptionAlgorithm,
so store them in a map.
2016-11-14 15:13:02 +00:00
Matthew Hodgson
1532188d95
fix typo
2016-11-13 13:24:51 +00:00
Frédéric Wang
04093692c9
Use native Array.isArray when available.
2016-11-13 13:24:35 +00:00
Frédéric Wang
7029083266
Send a STOPPED sync updated after call to stopClient
2016-11-12 21:58:58 +01:00
Mark Haines
bfffbea4a0
Merge remote-tracking branch 'origin/develop' into markjh/encrypted_voip
2016-11-11 10:20:40 +00:00
Mark Haines
777ef83378
Merge remote-tracking branch 'origin/develop' into markjh/encrypted_voip
2016-11-10 19:44:42 +00:00
Mark Haines
24283dcbd5
Encrypt all events, including 'm.call.*'
2016-11-10 19:42:16 +00:00
Richard van der Hoff
2113c83679
Ignore reshares of known megolm sessions
...
If we get a second key for a known megolm session, ignore it.
Fixes https://github.com/vector-im/vector-web/issues/2326 , one hopes.
2016-11-10 19:28:08 +00:00
Richard van der Hoff
77508f38bb
event jsdoc
...
Add a comment on the event event
2016-11-08 16:53:07 +00:00
Richard van der Hoff
6c3eb19b74
Merge pull request #274 from matrix-org/rav/log_on_unknown_session
...
Log to the console on unknown session
2016-11-07 22:46:37 +00:00
Richard van der Hoff
e173d822e8
Log to the console on unknown session
...
This might help diagnose Erik/Matthew's comms breakdown.
2016-11-07 18:57:09 +00:00
Paul "LeoNerd" Evans
65f1b3c976
Document the return type of getRequest()
2016-11-02 18:04:00 +00:00
Paul "LeoNerd" Evans
4529578cd6
Make a handy shortcut for SDK users to provide request wrapping functions in a neat stack
2016-11-02 18:02:02 +00:00
Paul "LeoNerd" Evans
6769c96942
Add a method for querying the js-sdk's current 'request' function in case people want to wrap it
2016-11-02 17:55:23 +00:00
David Baker
a15aa0f7a4
Merge branch 'release-v0.6.4'
2016-11-02 10:30:05 +00:00
lukebarnard
5900542cfb
Add ability to set a filter prior to initial sync.
...
Useful for only syncing with a subset of joined rooms or only retrieving certain relevant types of events.
2016-10-25 20:05:25 +01:00
Richard van der Hoff
a4f192bc88
Sign one-time keys, and verify their signatures
...
We have decided that signing one-time keys is the lesser of two evils;
accordingly, use a new key algorithm type (`signed_curve25519`), sign the
one-time keys that we upload to the server, and verify the signatures on those
we download.
This will mean that develop won't be able to talk to master, but hey, we're in
beta.
2016-10-21 12:24:19 +01:00
Mark Haines
16b4865035
Merge pull request #241 from matrix-org/markjh/check_for_duplicate_message_ids
...
Check for duplicate message indexes for group messages
2016-10-21 09:55:38 +01:00
Mark Haines
20b310484b
Document the format of the keys
2016-10-21 09:54:57 +01:00
Mark Haines
8b856b9d15
Wrap the longer lines
2016-10-20 18:02:48 +01:00
Mark Haines
3f7df0d15c
Fiddle linebreaks
2016-10-20 17:59:15 +01:00
Mark Haines
e0917d3c47
Check for duplicate message indexes for group messages
2016-10-20 17:49:37 +01:00
Richard van der Hoff
19c257703c
Rotate megolm sessions
...
In order to mitigate backward-secrecy concerns, make sure that we rotate the
outbound megolm session at regular intervals (every week/100 msgs by default).
2016-10-20 15:42:06 +01:00
pik
62b6262534
Add getRoomTags method
...
Signed-off-by: pik <alexander.maznev@gmail.com >
2016-10-19 10:10:33 -05:00
Richard van der Hoff
7a7f345f28
Merge pull request #239 from matrix-org/rav/fix_unknown_key
...
Check recipient and sender in Olm messages
2016-10-19 11:44:48 +01:00
Richard van der Hoff
b5c7c700d5
Check recipient and sender in Olm messages
...
Embed the sender, recipient, and recipient keys in the plaintext of Olm
messages, and check those fields on receipt.
Fixes https://github.com/vector-im/vector-web/issues/2483
2016-10-19 11:24:59 +01:00
Richard van der Hoff
aafb1ffdef
Consistency checks for E2E device downloads
...
Check that the user_id and device_id in device query responses match those that
we expect.
This resolves an unknown-key attack whereby Eve can re-sign Bob's keys with her
own key, thus getting Alice to send her messages which she can then forward to
Bob, making Bob think that Alice sent the messages to him.
2016-10-18 13:40:13 +01:00
David Baker
c5d738d25c
Merge pull request #235 from matrix-org/rav/delete_device_ui_auth
...
Support User-Interactive auth for delete device
2016-10-12 18:13:49 +01:00
David Baker
15d8252909
Merge pull request #234 from matrix-org/rav/interactive_auth
...
Utility to help with interactive auth
2016-10-12 18:13:36 +01:00
Richard van der Hoff
8189c58fc3
Use utils.extend instead of Object.assign
...
... because javascript is awful
2016-10-12 15:21:47 +01:00
David Baker
b3e7f4ea21
gjslint wants a space before the '='...
2016-10-12 11:42:10 +01:00
David Baker
09255a52f7
Merge branch 'release-v0.6.3'
2016-10-12 11:27:05 +01:00