Merge branch 'ChristianPauly-master-patch-64485' into 'master'

Ignore key requests from unknown devices

See merge request famedly/famedlysdk!325
This commit is contained in:
Christian Pauly 2020-05-25 07:37:23 +00:00
commit 0854cb81af
2 changed files with 2 additions and 2 deletions

View file

@ -1574,7 +1574,7 @@ class Client {
deviceKeys.verified && deviceKeys.verified &&
!deviceKeys.blocked) { !deviceKeys.blocked) {
await roomKeyRequest.forwardKey(); await roomKeyRequest.forwardKey();
} else { } else if (roomKeyRequest.requestingDevice != null) {
onRoomKeyRequest.add(roomKeyRequest); onRoomKeyRequest.add(roomKeyRequest);
} }
} }

View file

@ -22,7 +22,7 @@ class RoomKeyRequest extends ToDeviceEvent {
for (final key in session.forwardingCurve25519KeyChain) { for (final key in session.forwardingCurve25519KeyChain) {
forwardedKeys.add(key); forwardedKeys.add(key);
} }
await requestingDevice?.setVerified(true, client); await requestingDevice.setVerified(true, client);
var message = session.content; var message = session.content;
message['forwarding_curve25519_key_chain'] = forwardedKeys; message['forwarding_curve25519_key_chain'] = forwardedKeys;