Przeglądaj źródła

Don't strip space characters of beginning or end of password, while
still ignoring passwords consisting of just spaces, resolves #69

El RIDO 10 lat temu
rodzic
commit
3ec7002f63
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      js/zerobin.js

+ 1 - 2
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));
             }