This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 0e5d6d9a csp may no be present
0e5d6d9a is described below
commit 0e5d6d9a38acc2d52d4cf42af00198168ed4006b
Author: Sebb <[email protected]>
AuthorDate: Fri Oct 31 16:57:33 2025 +0000
csp may no be present
---
lib/whimsy/sitestandards.rb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/whimsy/sitestandards.rb b/lib/whimsy/sitestandards.rb
index c292d152..76215c38 100644
--- a/lib/whimsy/sitestandards.rb
+++ b/lib/whimsy/sitestandards.rb
@@ -275,7 +275,7 @@ module SiteStandards
# - invalid
def process_csp(sites)
sites.each do |site, data|
- csp = data.fetch('csp', '')
+ csp = data.fetch('csp', nil)
squashed = csp&.gsub(/ +/, ' ') # might be null
m = DEFAULT_CSP_RE.match(squashed)
if m # the syntax of the CSP appears to be OK
@@ -292,12 +292,10 @@ module SiteStandards
end
elsif csp == nil
data['csp_check'] = 'OK - no website yet'
- $stderr.puts [site, csp].inspect # Temp debug
elsif data['nonpmc'] and data['uri'] =~
%r{^https://(www\.)?apache\.org/} and squashed == WWW_CSP
data['csp_check'] = 'OK'
else # did not match
data['csp_check'] = "Invalid: #{squashed}"
- $stderr.puts [site, csp].inspect # Temp debug
end
end
end