From e0596395a0670c0b26cd573202268e5eb1ae10a7 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Fri, 15 Sep 2017 15:19:05 +0200 Subject: [PATCH] Fix: regression in utils --- utils/handletrack.php | 1 + utils/handleuser.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/handletrack.php b/utils/handletrack.php index 52e6a6c..d57568f 100644 --- a/utils/handletrack.php +++ b/utils/handletrack.php @@ -18,6 +18,7 @@ */ require_once(dirname(__DIR__) . "/helpers/auth.php"); + require_once(ROOT_DIR . "/lang.php"); require_once(ROOT_DIR . "/helpers/track.php"); require_once(ROOT_DIR . "/helpers/utils.php"); diff --git a/utils/handleuser.php b/utils/handleuser.php index 5b9ca59..1fe1fef 100644 --- a/utils/handleuser.php +++ b/utils/handleuser.php @@ -18,6 +18,7 @@ */ require_once(dirname(__DIR__) . "/helpers/auth.php"); + require_once(ROOT_DIR . "/lang.php"); require_once(ROOT_DIR . "/helpers/utils.php"); $auth = new uAuth(); @@ -25,7 +26,7 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL; $login = isset($_REQUEST['login']) ? trim($_REQUEST['login']) : NULL; $pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL; - if (!$auth->isAuthenticated() || !$auth->isAdmin || $auth->user->login == $login || empty($action) || empty($login)) { + if (!$auth->isAuthenticated() || !$auth->isAdmin() || $auth->user->login == $login || empty($action) || empty($login)) { uUtils::exitWithError($lang["servererror"]); }