Fix session_start guards, add missing API routes, rewrite README
- Added session_status() === PHP_SESSION_NONE guard to six API files (custom_fields, revoke_api_key, manage_templates, generate_api_key, get_template, manage_recurring) that called bare session_start() after RateLimitMiddleware had already started the session - Registered /api/notifications.php and /api/user_avatar.php in index.php router (were missing, served only by direct file access) - Complete README rewrite: remove all Discord references (Matrix/hookshot is the only external notification method), add hwmonDaemon API docs, document all TDS v1.2 features (kanban, charts, SLA, command palette, notification bell, watcher avatars, @mention, etc.), fix keyboard shortcuts table, add Matrix/LDAP env vars to setup section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ try {
|
||||
require_once dirname(__DIR__) . '/models/AuditLogModel.php';
|
||||
|
||||
// Check authentication via session
|
||||
session_start();
|
||||
if (session_status() === PHP_SESSION_NONE) session_start();
|
||||
if (!isset($_SESSION['user']) || !isset($_SESSION['user']['user_id'])) {
|
||||
throw new Exception("Authentication required");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user