From 71070fbe863bcc5a5bb89aa1b968ac86901d7103 Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 12 Sep 2017 22:48:12 +0200 Subject: [PATCH] [Web] Fix admin injection query --- data/web/inc/init_db.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/web/inc/init_db.inc.php b/data/web/inc/init_db.inc.php index f63a42d8..9fe50fe7 100644 --- a/data/web/inc/init_db.inc.php +++ b/data/web/inc/init_db.inc.php @@ -3,7 +3,7 @@ function init_db_schema() { try { global $pdo; - $db_version = "31082017_0853"; + $db_version = "12092017_2254"; $stmt = $pdo->query("SHOW TABLES LIKE 'versions'"); $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); @@ -649,7 +649,7 @@ function init_db_schema() { // Inject admin if not exists $stmt = $pdo->query("INSERT INTO `admin` (`username`, `password`, `superadmin`, `created`, `modified`, `active`) - SELECT 'admin', '{SSHA256}K8eVJ6YsZbQCfuJvSUbaQRLr0HPLz5rC9IAp0PAFl0tmNDBkMDc0NDAyOTAxN2Rk', 1, NOW(), NOW(), 1 + SELECT 'admin', '{SSHA256}K8eVJ6YsZbQCfuJvSUbaQRLr0HPLz5rC9IAp0PAFl0tmNDBkMDc0NDAyOTAxN2Rk', 1, NOW(), NOW(), 1 FROM `admin` WHERE NOT EXISTS (SELECT * FROM `admin`);"); $stmt = $pdo->query("INSERT INTO `domain_admins` (`username`, `domain`, `created`, `active`) SELECT `username`, 'ALL', NOW(), 1 FROM `admin`