From 5137206dcc5df6fcff7c69cc9871a29ca45b2313 Mon Sep 17 00:00:00 2001 From: Alexandr Salamatov Date: Fri, 21 Jan 2022 14:28:33 -0600 Subject: [PATCH] adjust indentation Signed-off-by: Alexandr Salamatov --- api.php | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/api.php b/api.php index 919ff07d..b986a655 100644 --- a/api.php +++ b/api.php @@ -143,13 +143,11 @@ elseif (isset($_GET['list'])) } elseif(isset($_GET['customdns']) && $auth) { - if(isset($_GET["auth"])) - { - if($_GET["auth"] !== $pwhash) - die("Not authorized!"); - } - else - { + if (isset($_GET["auth"])) { + if ($_GET["auth"] !== $pwhash) { + die("Not authorized!"); + } + } else { // Skip token validation if explicit auth string is given check_csrf($_GET['token']); } @@ -170,13 +168,11 @@ elseif(isset($_GET['customdns']) && $auth) } elseif(isset($_GET['customcname']) && $auth) { - if(isset($_GET["auth"])) - { - if($_GET["auth"] !== $pwhash) - die("Not authorized!"); - } - else - { + if (isset($_GET["auth"])) { + if ($_GET["auth"] !== $pwhash) { + die("Not authorized!"); + } + } else { // Skip token validation if explicit auth string is given check_csrf($_GET['token']); }