From a2463f74c3ce6af007de023e61b876f7d5316edc Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Mon, 26 Aug 2019 10:45:38 +1000 Subject: [PATCH] Improve object validation in createPairingAuthorisationProtoMessage --- libloki/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libloki/api.js b/libloki/api.js index 071fc97fd..a07c37859 100644 --- a/libloki/api.js +++ b/libloki/api.js @@ -73,8 +73,8 @@ if ( !primaryDevicePubKey || !secondaryDevicePubKey || - type === undefined || - type === null + !requestSignature || + typeof type !== 'number' ) { throw new Error( 'createPairingAuthorisationProtoMessage: pubkeys or type is not set'