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

snoopdave pushed a commit to branch allow-same-origin-fonts-in-theme-csp
in repository https://gitbox.apache.org/repos/asf/roller.git

commit ea3d5a9c823137ab18d27c6ca8ce1767134f809f
Author: David M. Johnson <[email protected]>
AuthorDate: Tue Sep 8 07:05:26 2026 -0400

    Allow same-origin webfonts in preset theme CSP
    
    The Content-Security-Policy meta tag added to the preset themes in 6.1.2
    sets default-src 'none' with no font-src directive, so font fetches fall
    back to 'none' and every @font-face webfont is blocked while the CSS still
    loads. In the gaurav theme this leaves the Font Awesome icons (for example
    the search and "posted on" glyphs) blank even though the stylesheet applies.
    
    Add font-src 'self' so same-origin webfonts load again. All five preset
    themes carry the same policy string, so update them together to keep it
    consistent; gaurav is the one that ships webfonts today.
    
    Claude-Session: https://claude.ai/code/session_015X69HHQ5XnjRkJP8ymzwFf
---
 app/src/main/webapp/themes/basic/weblog.vm       | 2 +-
 app/src/main/webapp/themes/basicmobile/weblog.vm | 2 +-
 app/src/main/webapp/themes/fauxcoly/weblog.vm    | 2 +-
 app/src/main/webapp/themes/frontpage/_header.vm  | 2 +-
 app/src/main/webapp/themes/gaurav/std_head.vm    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/src/main/webapp/themes/basic/weblog.vm 
b/app/src/main/webapp/themes/basic/weblog.vm
index 41900ad49..17f52ad2d 100644
--- a/app/src/main/webapp/themes/basic/weblog.vm
+++ b/app/src/main/webapp/themes/basic/weblog.vm
@@ -3,7 +3,7 @@
 <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 
'none'">
+    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
font-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; 
frame-ancestors 'none'">
     <title>$model.weblog.name</title>
     #showAutodiscoveryLinks($model.weblog)
     #showAnalyticsTrackingCode($model.weblog)
diff --git a/app/src/main/webapp/themes/basicmobile/weblog.vm 
b/app/src/main/webapp/themes/basicmobile/weblog.vm
index 3e49d9764..88504abad 100644
--- a/app/src/main/webapp/themes/basicmobile/weblog.vm
+++ b/app/src/main/webapp/themes/basicmobile/weblog.vm
@@ -3,7 +3,7 @@
 <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 
'none'">
+    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
font-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; 
frame-ancestors 'none'">
     <title>$model.weblog.name</title>
     #showAutodiscoveryLinks($model.weblog)
     #showAnalyticsTrackingCode($model.weblog)
diff --git a/app/src/main/webapp/themes/fauxcoly/weblog.vm 
b/app/src/main/webapp/themes/fauxcoly/weblog.vm
index 38f8ce26a..bee525959 100644
--- a/app/src/main/webapp/themes/fauxcoly/weblog.vm
+++ b/app/src/main/webapp/themes/fauxcoly/weblog.vm
@@ -3,7 +3,7 @@
     <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 
'none'">
+    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
font-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; 
frame-ancestors 'none'">
     #includeTemplate($model.weblog "standard_head")
     <title>$model.weblog.name: $model.weblog.tagline</title>
     #showAutodiscoveryLinks($model.weblog)
diff --git a/app/src/main/webapp/themes/frontpage/_header.vm 
b/app/src/main/webapp/themes/frontpage/_header.vm
index d946743c1..0e4e77005 100644
--- a/app/src/main/webapp/themes/frontpage/_header.vm
+++ b/app/src/main/webapp/themes/frontpage/_header.vm
@@ -3,7 +3,7 @@
   <head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 
'none'">
+  <meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
font-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; 
frame-ancestors 'none'">
   <title>$model.weblog.name</title>
   <link href="$url.absoluteSite/favicon.svg" rel="shortcut icon" 
type="image/x-icon" />
   #showAutodiscoveryLinks($model.weblog)
diff --git a/app/src/main/webapp/themes/gaurav/std_head.vm 
b/app/src/main/webapp/themes/gaurav/std_head.vm
index 0b5e620cd..94318dcc7 100755
--- a/app/src/main/webapp/themes/gaurav/std_head.vm
+++ b/app/src/main/webapp/themes/gaurav/std_head.vm
@@ -1,5 +1,5 @@
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-<meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 
'none'">
+<meta http-equiv="Content-Security-Policy" content="default-src 'none'; 
script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; 
font-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; 
frame-ancestors 'none'">
 #if ($model.permalink == false)
    <meta name="Description" content="$model.weblog.about">
 #else

Reply via email to