1.3 #1

Merged
meteo merged 11 commits from 1.3 into main 2026-07-08 21:37:31 +00:00
Showing only changes of commit b31185c2e9 - Show all commits

View File

@@ -13,11 +13,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$password = $_POST['password'] ?? ''; $password = $_POST['password'] ?? '';
if (empty($username) || empty($password)) { if (empty($username) || empty($password)) {
die("Username and password are required."); setcookie('login_error', 'Invalid username or password', time() + 3600, '/');
header('Location: /login/');
exit;
} }
if ($username !== 'superuser' && !filter_var($username, FILTER_VALIDATE_EMAIL)) { if ($username !== 'superuser' && !filter_var($username, FILTER_VALIDATE_EMAIL)) {
die("Invalid email address."); setcookie('login_error', 'Invalid email address', time() + 3600, '/');
header('Location: /login/');
exit;
} }
$stmt = $GLOBALS['conn']->prepare("SELECT * FROM system_users WHERE user_email = ? LIMIT 1"); $stmt = $GLOBALS['conn']->prepare("SELECT * FROM system_users WHERE user_email = ? LIMIT 1");