From 3ec7002f639cdcb61eb0f8cec148ccc3323983da Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 26 Apr 2016 20:41:15 +0200 Subject: [PATCH] Don't strip space characters of beginning or end of password, while still ignoring passwords consisting of just spaces, resolves #69 --- js/zerobin.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/zerobin.js b/js/zerobin.js index 52979e9b..bfbcfa12 100644 --- a/js/zerobin.js +++ b/js/zerobin.js @@ -444,8 +444,7 @@ $(function() { */ cipher: function(key, password, message) { - password = (password || '').trim(); - if (password.length == 0) + if ((password || '').trim().length == 0) { return sjcl.encrypt(key, this.compress(message)); }