From 9a544bac61235ab8c303843c9fd03b4883df0621 Mon Sep 17 00:00:00 2001 From: Devops Date: Tue, 4 Apr 2017 10:52:37 +0100 Subject: [PATCH] www/dbq/dbq.php --- www/dbq/dbq.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ]; -- 2.47.3