From 0fc74959db5e1038eb779ef34274b15bb9d07a28 Mon Sep 17 00:00:00 2001 From: sasha0552 Date: Fri, 12 Apr 2019 02:29:13 +0600 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D1=82=20=D1=82=D0=B5=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D1=8C=20=D1=82=D0=BE=D1=87=D0=BD=D0=BE=20=D1=80=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/{auth.php => AuthHandler.php} | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) rename scripts/{auth.php => AuthHandler.php} (90%) diff --git a/scripts/auth.php b/scripts/AuthHandler.php similarity index 90% rename from scripts/auth.php rename to scripts/AuthHandler.php index 422e5e31..64ece72e 100644 --- a/scripts/auth.php +++ b/scripts/AuthHandler.php @@ -1,5 +1,7 @@ filter_input(INPUT_GET, 'username', FILTER_SANITIZE_STRING), 'uuid' => filter_input(INPUT_GET, 'uuid', FILTER_SANITIZE_STRING), 'accessToken' => filter_input(INPUT_GET, 'accessToken', FILTER_SANITIZE_STRING), - 'ServerID' => filter_input(INPUT_GET, 'ServerID', FILTER_SANITIZE_STRING) + 'ServerID' => filter_input(INPUT_GET, 'ServerID', FILTER_SANITIZE_STRING), + 'secretKey' => filter_input(INPUT_GET, 'secretKey', FILTER_SANITIZE_STRING) ]; +if (!isset($AuthHandler['secretKey'])) { + die('Не указан ключ!'); +} + +if ($secretkey != $AuthHandler['secretKey']) { + die('Неверный ключ!'); +} + if(!$link) { die('Ошибка подключения к базе данных'); }