From 8460771d20b9136e9b5b2aa3e8ae356eea382ba4 Mon Sep 17 00:00:00 2001 From: Johnnybegood90 Date: Fri, 13 Mar 2026 21:28:18 +0100 Subject: [PATCH] Fix: setup.php now add a key in existing setup post update. --- setup.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.php b/setup.php index 2358d11..12d20df 100644 --- a/setup.php +++ b/setup.php @@ -14,6 +14,11 @@ if (file_exists($config_path)) { unset($existing['epg_url'], $existing['m3u_url']); file_put_contents($config_path, json_encode($existing, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } + // Bootstrap : config existante sans cle admin -> on en genere une maintenant + if (empty($existing['admin_key'])) { + $existing['admin_key'] = bin2hex(random_bytes(16)); + file_put_contents($config_path, json_encode($existing, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); + } } $is_first_setup = !file_exists($config_path);