mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
When auth was disabled, users could log out, reach the login page, and authenticate with the default admin/admin credentials to gain full admin privileges — defeating the purpose of AUTH_ENABLED=false. Defense-in-depth fix across five layers: - Skip ensureDefaultAdmin() when auth is disabled (no admin user seeded) - Return 403 from POST /api/auth/login when auth is disabled - Return synthetic anonymous user from GET /api/auth/session when auth is disabled - Hide logout button in settings when auth is disabled - Redirect /login and /change-password to / via AuthGuard when auth is disabled Closes #90