Address changes.

This commit is contained in:
Cody Cook 2025-02-22 17:20:19 -08:00
commit 635b3ddcbc
59 changed files with 7249 additions and 2745 deletions

View file

@ -3,6 +3,7 @@
// read toml config file
require_once 'vendor/autoload.php';
use Random\RandomException;
use Yosymfony\Toml\Toml;
use DJMixHosting\SessionManager;
@ -11,6 +12,14 @@ require_once 'functions/i18n.php';
// Instead of including sessions.php, start the session via SessionManager:
SessionManager::start();
if (empty($_SESSION['csrf_token'])) {
try {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
} catch (RandomException $e) {
die("An error occurred. Please try again.");
}
}
require_once 'includes/lang_loader.php';
$mixshowsPages = ["/mixshows", "/mixshows/", "/mixshows.php"];