From: Devops Date: Tue, 4 Apr 2017 09:52:37 +0000 (+0100) Subject: www/dbq/dbq.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=9a544bac61235ab8c303843c9fd03b4883df0621;p=nb.git www/dbq/dbq.php --- diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 990be05c..3905c9a1 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -467,10 +467,11 @@ class DbQ extends nb { if ($password=='' and !empty($_POST['password'])) $password = $_POST['password']; if ($this->db->is_html) echo << - + EOF; + if (!$password) return []; $salt = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',4)),0,4); $password = '{SSHA}' . base64_encode(sha1( $password.$salt, TRUE ). $salt); return [ 'SSHA' => $password ];