Add missing validity check to device storage

pull/749/head
Matt Corallo 10 years ago committed by lilia
parent 30dd13e8e3
commit bfb3e7751e

@ -75,7 +75,7 @@
};
var internalSaveDeviceObject = function(deviceObject, onlyKeys) {
if (deviceObject.identityKey === undefined || deviceObject.encodedNumber === undefined)
if (deviceObject.identityKey === undefined || deviceObject.encodedNumber === undefined || deviceObject.registrationId === undefined)
throw new Error("Tried to store invalid deviceObject");
var number = textsecure.utils.unencodeNumber(deviceObject.encodedNumber)[0];

Loading…
Cancel
Save