From b0e00d337edb66af23e00d240d03a463ad20a9f6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 9 Jun 2017 15:28:53 +0200 Subject: [PATCH] more careful validation --- www/common/pinpad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/pinpad.js b/www/common/pinpad.js index 6dd153c9c..ffdbb9002 100644 --- a/www/common/pinpad.js +++ b/www/common/pinpad.js @@ -120,7 +120,7 @@ define([ exp.getFileListSize = function (cb) { rpc.send('GET_TOTAL_SIZE', undefined, function (e, response) { if (e) { return void cb(e); } - if (response && response.length) { + if (response && response.length && typeof(response[0]) === 'number') { cb(void 0, response[0]); } else { cb('INVALID_RESPONSE');