E2E: Fix NPE in getEventSenderDeviceInfo

This commit is contained in:
Richard van der Hoff
2016-09-21 15:05:27 +01:00
parent ea23db6450
commit 669aecf4e6
+5
View File
@@ -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,