Fix: Query string escape bug

This commit is contained in:
Akkariin Meiko 2020-01-21 13:51:14 +08:00 committed by GitHub
parent 7170f89920
commit a7a937e180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,9 +110,9 @@ if((isset($_GET['apitoken']) && $_GET['apitoken'] == API_TOKEN) || (isset($_GET[
// 目前只验证域名和子域名
$domain = $_GET['domain'] ?? "null";
$subdomain = $_GET['subdomain'] ?? "null";
$username = Database::escape($rs['username']);
$domain = Database::escape($domain);
$subdomain = Database::escape($subdomain);
$username = $rs['username'];
$domain = $domain;
$subdomain = $subdomain;
$domainSQL = (isset($_GET['domain']) && !empty($_GET['domain'])) ? ["domain" => $domain] : ["subdomain" => $subdomain];
$querySQL = [
"username" => $username,