Add admin login

- admins and login_attempts tables
- cli/create_admin.php: create an admin or reset a password over SSH
  (no email involved)
- includes/auth.php: hardened admin sessions, login throttling (5
  failures per IP per 15 minutes) and CSRF helpers
- admin/: login, logout and a dashboard showing broadcast status
- includes/admin_layout.php: shared admin page layout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel MesserandClaude Opus 5.5 committed 2026-10-29 07:13:51 -05:00
1 parent 74dfb3c146
commit babb71660c
8 files changed
+389

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<?php
require __DIR__ . '/../includes/auth.php';
// Logout is POST-only with a CSRF token, so other sites can't log you out with a link or image
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
verifyCsrf();
startAdminSession();
logoutAdmin();
}
header('Location: login.php');