From 74799ed141ba4d2da96c1bb20f463a365ba6a72a Mon Sep 17 00:00:00 2001 From: Leberwurscht Date: Mon, 16 Apr 2012 23:39:21 +0200 Subject: [PATCH] jappixmini: throw error when decrypt_password fails --- jappixmini/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jappixmini/lib.js b/jappixmini/lib.js index d02f5d5c..8e698654 100644 --- a/jappixmini/lib.js +++ b/jappixmini/lib.js @@ -84,7 +84,7 @@ function jappixmini_addon_decrypt_password(encrypted_password, callback) { // remove \0 first_null = password.indexOf("\0") - // TODO: check first_null==null + if (first_null==-1) throw "Decrypted password does not contain \\0"; password = password.substr(0, first_null); callback(password); -- 2.39.5