From 8fb457f4f32553610c7262d92495093879999361 Mon Sep 17 00:00:00 2001 From: EKS Distro PR Bot <75336432+eks-distro-pr-bot@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:53:55 -0400 Subject: [PATCH] Security update: (#8957) For security reasons, Amazon does not allow Webpage loads resources from CDN or domain with public access or elevated risk via link(s). For this reason we host the javascript files locally and reference them in the theme. Signed-off-by: Jacob Weinstock Co-authored-by: Jacob Weinstock --- docs/patches/0001-Security-update.patch | 26 +++++++++- docs/static/font/font-face.css | 65 +++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 docs/static/font/font-face.css diff --git a/docs/patches/0001-Security-update.patch b/docs/patches/0001-Security-update.patch index 3b41b3e8bb0d..fcca6dfb86d3 100644 --- a/docs/patches/0001-Security-update.patch +++ b/docs/patches/0001-Security-update.patch @@ -1,5 +1,6 @@ +From 510caead5e2dacbf6df5491926a13f609174416c Mon Sep 17 00:00:00 2001 From: Jacob Weinstock -Date: Thu, 31 Oct 2024 10:24:12 -0600 +Date: Fri, 1 Nov 2024 09:16:06 -0600 Subject: [PATCH] Security update: For security reasons, Amazon does not allow @@ -10,11 +11,32 @@ and reference them in the theme. Signed-off-by: Jacob Weinstock --- + assets/scss/rtl/_main.scss | 4 ++-- layouts/partials/head.html | 4 ++-- layouts/partials/scripts.html | 4 ++-- static/js/prism.js | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) + 4 files changed, 7 insertions(+), 7 deletions(-) +diff --git a/assets/scss/rtl/_main.scss b/assets/scss/rtl/_main.scss +index ffe9577..d7ddaff 100644 +--- a/assets/scss/rtl/_main.scss ++++ b/assets/scss/rtl/_main.scss +@@ -31,7 +31,7 @@ body:lang(ur) { + } + + body:lang(fa) { +- @import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v27.0.1/dist/font-face.css'); ++ @import url('/font/font-face.css'); + font-family: 'Vazir', "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + } + +@@ -43,4 +43,4 @@ body:lang(he) { + body:lang(ar) { + @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap'); + font-family: 'Tajawal', "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +-} +\ No newline at end of file ++} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a40f447..db9ae40 100644 --- a/layouts/partials/head.html diff --git a/docs/static/font/font-face.css b/docs/static/font/font-face.css new file mode 100644 index 000000000000..59ce3a764b9c --- /dev/null +++ b/docs/static/font/font-face.css @@ -0,0 +1,65 @@ +@font-face { + font-family: Vazir; + src: url('Vazir-Regular.eot'); + src: url('Vazir-Regular.eot?#iefix') format('embedded-opentype'), + url('Vazir-Regular.woff2') format('woff2'), + url('Vazir-Regular.woff') format('woff'), + url('Vazir-Regular.ttf') format('truetype'); + font-weight: normal; + font-display:swap; +} + +@font-face { + font-family: Vazir; + src: url('Vazir-Bold.eot'); + src: url('Vazir-Bold.eot?#iefix') format('embedded-opentype'), + url('Vazir-Bold.woff2') format('woff2'), + url('Vazir-Bold.woff') format('woff'), + url('Vazir-Bold.ttf') format('truetype'); + font-weight: bold; + font-display:swap; +} + +@font-face { + font-family: Vazir; + src: url('Vazir-Thin.eot'); + src: url('Vazir-Thin.eot?#iefix') format('embedded-opentype'), + url('Vazir-Thin.woff2') format('woff2'), + url('Vazir-Thin.woff') format('woff'), + url('Vazir-Thin.ttf') format('truetype'); + font-weight: 100; + font-display:swap; +} + +@font-face { + font-family: Vazir; + src: url('Vazir-Light.eot'); + src: url('Vazir-Light.eot?#iefix') format('embedded-opentype'), + url('Vazir-Light.woff2') format('woff2'), + url('Vazir-Light.woff') format('woff'), + url('Vazir-Light.ttf') format('truetype'); + font-weight: 300; + font-display:swap; +} + +@font-face { + font-family: Vazir; + src: url('Vazir-Medium.eot'); + src: url('Vazir-Medium.eot?#iefix') format('embedded-opentype'), + url('Vazir-Medium.woff2') format('woff2'), + url('Vazir-Medium.woff') format('woff'), + url('Vazir-Medium.ttf') format('truetype'); + font-weight: 500; + font-display:swap; +} + +@font-face { + font-family: Vazir; + src: url('Vazir-Black.eot'); + src: url('Vazir-Black.eot?#iefix') format('embedded-opentype'), + url('Vazir-Black.woff2') format('woff2'), + url('Vazir-Black.woff') format('woff'), + url('Vazir-Black.ttf') format('truetype'); + font-weight: 900; + font-display:swap; +} \ No newline at end of file