- Audit log: every admin_log entry is also stored permanently in the database (admin/audit.php, audit.view) - Rate limits per account, login throttling per IP (not per account), emergency lock after mass deletions, force logout / lock in user management - Comments under gallery pictures (picture page, report button, owner can disable them) - Moderation: new members, links, reported content and a "moderate everything" switch go to the approval list (moderation.php) - Every uploaded image is re-encoded (strips appended code and EXIF data) - Custom 404 page, also shown for pages without permission Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', '0');
|
|
|
|
// Manche Hoster liefern per Default einen abweichenden Zeichensatz im
|
|
// Content-Type-Header aus, der die <meta charset>-Angabe im HTML überstimmt
|
|
// und dann Umlaute (oe/ae/ue) kaputt macht. Deshalb hier explizit erzwingen.
|
|
ini_set('default_charset', 'UTF-8');
|
|
mb_internal_encoding('UTF-8');
|
|
|
|
// Alle Zeiten in deutscher Zeit. Der Bot rechnet Raid- und Event-Zeiten ebenfalls als deutsche
|
|
// Zeit um. Ohne diese Zeile nimmt PHP die Zeitzone des Hosters (oft UTC) - dann erscheint ein
|
|
// Raid um 9 Uhr auf der Website als 7 Uhr (Sommerzeit), und beim naechsten Bearbeiten wuerde
|
|
// er sogar auf 7 Uhr verschoben.
|
|
date_default_timezone_set('Europe/Berlin');
|
|
header('Content-Type: text/html; charset=UTF-8');
|
|
|
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
|
session_set_cookie_params([
|
|
'httponly' => true,
|
|
'samesite' => 'Lax',
|
|
]);
|
|
session_start();
|
|
}
|
|
|
|
require_once __DIR__ . '/db.php';
|
|
require_once __DIR__ . '/functions.php';
|
|
require_once __DIR__ . '/auth.php';
|
|
require_once __DIR__ . '/permissions.php';
|
|
require_once __DIR__ . '/schema.php';
|
|
require_once __DIR__ . '/settings.php';
|
|
require_once __DIR__ . '/admin_log.php';
|
|
require_once __DIR__ . '/security.php';
|
|
require_once __DIR__ . '/moderation.php';
|
|
|
|
ensure_schema();
|
|
|
|
// Tempolimit fuer abgeschickte Formulare (Spam-/Missbrauchsschutz, siehe includes/security.php)
|
|
security_guard_post();
|