This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8479
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/gc/8479 by this push:
     new 3bb920810 fixup! [#8479] modified exisinting logic on settings and 
added support for script-src
3bb920810 is described below

commit 3bb92081089dc8a5a2d64573704de1f191c2eea1
Author: Guillermo Cruz <[email protected]>
AuthorDate: Thu Nov 17 14:15:31 2022 -0600

    fixup! [#8479] modified exisinting logic on settings and added support for 
script-src
---
 Allura/allura/lib/custom_middleware.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Allura/allura/lib/custom_middleware.py 
b/Allura/allura/lib/custom_middleware.py
index f46b81a1c..fa23a74fe 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -503,7 +503,7 @@ class ContentSecurityPolicyMiddleware:
             to the middleware. In this case we pass a custom list of domains 
from google that can't be built
             directly in here.
             """
-            if environ['google_domains']:
+            if environ.get('google_domains',''):
                 script_srcs = f"{script_srcs} {' 
'.join(environ['google_domains'])}"
 
             if asbool(self.config.get('csp.script_scr_enforce',False)):

Reply via email to