From 7b4af63a90a726b98a59b83e53f040a7a566a11d Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 10 Nov 2021 17:53:13 +0100 Subject: Update --- .../cms-special/admin/login-old/index.php | 122 +-------------------- 1 file changed, 1 insertion(+), 121 deletions(-) mode change 100755 => 100644 Neutron-trunk/cms-special/admin/login-old/index.php (limited to 'Neutron-trunk/cms-special/admin/login-old') diff --git a/Neutron-trunk/cms-special/admin/login-old/index.php b/Neutron-trunk/cms-special/admin/login-old/index.php old mode 100755 new mode 100644 index d4428d7..e977d90 --- a/Neutron-trunk/cms-special/admin/login-old/index.php +++ b/Neutron-trunk/cms-special/admin/login-old/index.php @@ -1,122 +1,2 @@ - 12,]), PASSWORD_BCRYPT, ['cost' => 12,])); - if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens")) { - mkdir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); - } - $tokens = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); - foreach ($tokens as $atoken) { - if ($atoken == "." || $atoken == "..") {} else { - unlink($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $atoken); - } - } - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $token, ""); - header("Set-Cookie: _NEUTRON_ADMIN_TOKEN={$token}; Path=/; Http-Only; SameSite=Strict"); - header("Location: " . $callback); - return; - } else { - $invalid = true; - } - } -} - -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/") { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { - if (isset($_GET['pr'])) { - if (isset($_GET['pa'])) { - $callback = $_GET['pr'] . $_GET['pa']; - } else { - $callback = $_GET['pr']; - } - } else { - $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"; - } - header("Location: " . $callback); - } -} - -?> - -") ?> - - - - - - - - - /resources/css/admin.css"> - /resources/css/fonts-import.css"> - /resources/css/ui.css"> - - <?php - - if ($ready) { - echo($lang["login"]["login"] . " - " . $lang["login"]["title"] . " - " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")); - } else { - echo("Neutron"); - } - - ?> - location.href = '{$GLOBALS["SYSTEM_ROOT"]}/cms-special/setup';"); - } - ?> - - -
- /resources/upload/siteicon.png" style="border-radius:100%;" class="intro-element"> -

-

", str_replace("{", "", $lang["login"]["redirect"])); ?>

-

' . $lang["login"]["uauth"] . '
' . $lang['login']['pass'] . ''); - } else { - echo('' . $lang["login"]["upass"] . '
' . $lang['login']['auth'] . '
'); - } - - ?>

- ' . $lang["login"]["invalid"] . '
');} ?> - - -
- ">

- "> -

- -
- " disabled>

- " . $lang["login"]["nokey"][1] . " " . $lang["login"]["nokey"][2] ?> -

- - - - \ No newline at end of file + \ No newline at end of file -- cgit