E2E: Fix NPE in getEventSenderDeviceInfo
This commit is contained in:
@@ -633,6 +633,11 @@ Crypto.prototype.getEventSenderDeviceInfo = function(event) {
|
||||
event.getSender(), algorithm, sender_key
|
||||
);
|
||||
|
||||
if (device === null) {
|
||||
// we haven't downloaded the details of this device yet.
|
||||
return null;
|
||||
}
|
||||
|
||||
// so far so good, but now we need to check that the sender of this event
|
||||
// hadn't advertised someone else's Curve25519 key as their own. We do that
|
||||
// by checking the Ed25519 claimed by the event (or, in the case of megolm,
|
||||
|
||||
Reference in New Issue
Block a user