initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/_bootstrap.php';
|
||||
|
||||
$username = $_POST['username'] ?? '';
|
||||
$password = $_POST['password'] ?? '';
|
||||
|
||||
$expectedUser = $config['USERNAME'];
|
||||
$expectedHash = $config['PASSWORD_HASH'];
|
||||
|
||||
if ($username === $expectedUser && password_verify($password, $expectedHash)) {
|
||||
session_regenerate_id(true);
|
||||
$_SESSION['tt_logged_in'] = true;
|
||||
header('Location: /');
|
||||
exit;
|
||||
}
|
||||
|
||||
header('Location: /?err=1');
|
||||
exit;
|
||||
Reference in New Issue
Block a user