From 4c70a748272a185b2cdd2dbbd5017796a9b1b03f Mon Sep 17 00:00:00 2001 From: rugk Date: Thu, 11 Aug 2016 18:24:13 +0200 Subject: [PATCH] Allow space passwords Also removes the strange `|| ''`. I don't know what this piece of code should actually do. Sometimes imple solutions are just best. --- js/privatebin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index 4344efca..d1fd16ef 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -493,7 +493,7 @@ $(function() { { // Galois Counter Mode, keysize 256 bit, authentication tag 128 bit var options = {mode: 'gcm', ks: 256, ts: 128}; - if ((password || '').trim().length === 0) + if (password.length === 0) { return sjcl.encrypt(key, this.compress(message), options); }