From 2326a93b550fa1fa22a84a23fe7b8ff89ef9dcdd Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Wed, 14 May 2025 13:25:10 -0700 Subject: [PATCH] Enable a strong enforce CSP by default --- server/configs/application.properties | 31 --------------- .../embedded/config/application.properties | 31 --------------- .../src/org/labkey/embedded/LabKeyServer.java | 38 +++++++++++-------- 3 files changed, 23 insertions(+), 77 deletions(-) diff --git a/server/configs/application.properties b/server/configs/application.properties index 17af72d480..cb50699a21 100644 --- a/server/configs/application.properties +++ b/server/configs/application.properties @@ -122,37 +122,6 @@ management.server.port=@@shutdownPort@@ #jsonaccesslog.condition-if=attributeName #jsonaccesslog.condition-unless=attributeName -## START OF CSP ENFORCE BLOCK (DO NOT CHANGE THIS TEXT) -#useLocalBuild#csp.enforce=\ -#useLocalBuild# default-src 'self' ; /* Limit the default to only the current server */\ -#useLocalBuild# connect-src 'self' ${CONNECTION.SOURCES} ; /* Limit allowed connection sources */\ -#useLocalBuild# object-src 'none' ; /* These tags are not currently used by LKS */\ -#useLocalBuild# style-src 'self' 'unsafe-inline' ${STYLE.SOURCES} ; /* We currently have a few inline