nixpkgs/pkgs/servers/web-apps/discourse/prebuild-theme-transpiler.patch
Martin Weinelt 25755c0d20
discourse: 3.1.0 -> 3.2.2
https://meta.discourse.org/t/3-1-1-security-and-bug-fix-release/278760
https://meta.discourse.org/t/3-1-2-security-and-bug-fix-release/282427
https://meta.discourse.org/t/3-1-3-security-and-bug-fix-release/284973
https://meta.discourse.org/t/3-1-4-security-and-bug-fix-release/290939
https://blog.discourse.org/2024/01/celebrating-discourse-3-2/
https://meta.discourse.org/t/3-2-1-security-and-bug-fix-release/298237
https://meta.discourse.org/t/3-2-2-bug-fix-release/307780

Co-Authored-By: Christian Albrecht <christian.albrecht@mayflower.de>
Fixes: CVE-2023-38706, CVE-2023-40588, CVE-2023-41043, CVE-2023-41042,
       CVE-2023-44388, CVE-2023-43814, CVE-2023-45147, CVE-2023-43659,
       CVE-2023-44391, CVE-2023-45131, CVE-2023-47120, CVE-2023-45816,
       CVE-2023-46130, CVE-2023-47119, CVE-2023-47121, CVE-2023-45806,
       CVE-2023-49099, CVE-2024-21655, CVE-2024-21655, CVE-2023-48297,
       CVE-2024-24748, CVE-2024-24827, CVE-2024-27085, CVE-2024-27100,
       CVE-2024-28242
2024-05-27 13:36:51 +02:00

22 lines
723 B
Diff

diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb
index 26d142fa4d..6040aba6f4 100644
--- a/lib/discourse_js_processor.rb
+++ b/lib/discourse_js_processor.rb
@@ -68,7 +68,7 @@ class DiscourseJsProcessor
TRANSPILER_PATH =
(
if Rails.env.production?
- "tmp/theme-transpiler.js"
+ "app/assets/javascripts/theme-transpiler.js"
else
"tmp/theme-transpiler/#{Process.pid}.js"
end
@@ -87,6 +87,6 @@ class DiscourseJsProcessor
"node",
"app/assets/javascripts/theme-transpiler/build.js",
TRANSPILER_PATH,
- )
+ ) if !Rails.env.production? or !File.file?(TRANSPILER_PATH)
TRANSPILER_PATH
end