From e208e05b83dfa4e0f477d7724232846820c778e3 Mon Sep 17 00:00:00 2001 From: Krystie Date: Thu, 23 Jul 2026 23:13:58 -0700 Subject: [PATCH] fix(auth): relax CSP script-src for auto-login page (inline JS was silently blocked) --- dashcaddy-api/routes/auth/sso-gate.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dashcaddy-api/routes/auth/sso-gate.js b/dashcaddy-api/routes/auth/sso-gate.js index 61a3888..7449342 100644 --- a/dashcaddy-api/routes/auth/sso-gate.js +++ b/dashcaddy-api/routes/auth/sso-gate.js @@ -9,10 +9,10 @@ const { AuthenticationError, NotFoundError } = require('../../src/utilities/erro */ module.exports = function(deps) { const router = express.Router(); - + // Extract dependencies const { authManager, totpConfig, session, asyncHandler, errorResponse, log, getAppSession, appSessionCache, credentialManager, fetchT, getServiceById, licenseManager, servicesStateManager } = deps; - + // Create ctx-like object for compatibility const ctx = { credentialManager, @@ -209,6 +209,14 @@ module.exports = function(deps) { if (!html) return res.status(404).send('Unknown service'); res.setHeader('Content-Type', 'text/html; charset=utf-8'); res.setHeader('Cache-Control', 'no-store'); + // This page is a server-rendered shell whose entire auto-login logic runs + // in an inline