Ver Fonte

Bugfix when password is disabled in config no new paste can be
created

Haocen Xu há 6 anos atrás
pai
commit
56222d6cfb
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      js/privatebin.js

+ 2 - 1
js/privatebin.js

@@ -3814,7 +3814,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
          */
         me.getPassword = function()
         {
-            return $passwordInput.val();
+            // when password is disabled $passwordInput.val() will return undefined
+            return $passwordInput.val() || '';
         };
 
         /**