]> git.mxchange.org Git - friendica-addons.git/commitdiff
jappixmini: throw error when decrypt_password fails
authorLeberwurscht <leberwurscht@hoegners.de>
Mon, 16 Apr 2012 21:39:21 +0000 (23:39 +0200)
committerLeberwurscht <leberwurscht@hoegners.de>
Mon, 16 Apr 2012 21:39:21 +0000 (23:39 +0200)
jappixmini/lib.js

index d02f5d5c348727aa63678d4caa268df2093938fe..8e6986547273f3b3235c7a08ab04e7f0d147d7ae 100644 (file)
@@ -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);