Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
1dc38c2415
!20 [sync] PR-14: fix CVE-2025-3155
From: @openeuler-sync-bot 
Reviewed-by: @weidongkl 
Signed-off-by: @weidongkl
2025-05-16 03:02:23 +00:00
Funda Wang
7a72a74190 fix CVE-2025-3155
(cherry picked from commit f2f13d08329da0dcbd259d126e5aaafedd5d75d2)
2025-05-16 10:29:47 +08:00
openeuler-ci-bot
2fa19a61db !9 Upgrade to 3.38.3
From: @weijin-deng
Reviewed-by: @weidongkl,@dwl301
Signed-off-by: @weidongkl,@dwl301
2021-05-19 16:22:36 +08:00
weijin-deng
26e1df3d92 Upgrade to 3.38.3
Update License and BuildRequires
2021-05-19 15:59:28 +08:00
openeuler-ci-bot
6f919bcfdb !7 upgrade to 3.38.2
From: @jinzhimin369
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2021-01-30 17:38:01 +08:00
jzm369
9f274bb668 Upgrade to 3.38.2 2021-01-30 16:27:08 +08:00
openeuler-ci-bot
7699e57dc7 !4 update souce0
From: @zzm_567
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2020-09-29 10:07:10 +08:00
x30007275
2c27f1a71e update source0 2020-09-07 14:32:15 +08:00
openeuler-ci-bot
6850dadaf1 !2 yelp-xsl: Update to 3.36
Merge pull request !2 from chengguipeng_xian/master
2020-07-27 16:15:42 +08:00
chengguipeng
20dd23cff9 yelp-xsl: Update to 3.36
Signed-off-by: chengguipeng <chengguipeng1@huawei.com>
2020-07-23 16:43:33 +08:00
4 changed files with 117 additions and 7 deletions

View File

@ -0,0 +1,92 @@
From 6902d7439c0419055e1c48c7771629ccbb278408 Mon Sep 17 00:00:00 2001
From: Shaun McCance <shaunm@redhat.com>
Date: Fri, 18 Apr 2025 11:31:18 -0400
Subject: [PATCH] Initial fix for CVE-2025-3155 from parrot409
https://gitlab.gnome.org/GNOME/yelp/-/issues/221
---
xslt/common/html.xsl | 40 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index 77aed075..82832fb4 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -266,6 +266,16 @@ certain tokens, and you can add your own with {html.sidebar.mode}. See
-->
<xsl:param name="html.sidebar.right" select="''"/>
+<!--@@==========================================================================
+html.csp.nonce
+An optional CSP nonce string to allow the execution of scripts and styles.
+@revision[version=42.2 date=2025-02-22 status=final]
+
+This parameter takes a string value that will be added to the 'nonce' attribute
+of all 'style' and 'script' tags in the generated HTML output. This paramter is used
+to whitelist script and style tags that are allowed to be executed.
+-->
+<xsl:param name="html.csp.nonce" select="false()"/>
<!--**==========================================================================
html.output
@@ -1124,6 +1134,11 @@ dimensions. All parameters can be automatically computed if not provided.
</xsl:call-template>
</xsl:param>
<style type="text/css">
+ <xsl:if test="$html.csp.nonce">
+ <xsl:attribute name="nonce">
+ <xsl:value-of select="$html.csp.nonce" />
+ </xsl:attribute>
+ </xsl:if>
<xsl:call-template name="html.css.content">
<xsl:with-param name="node" select="$node"/>
<xsl:with-param name="direction" select="$direction"/>
@@ -1533,6 +1548,11 @@ copy, override this template and provide the necessary files.
<xsl:param name="node" select="."/>
<xsl:if test="$node//mml:*[1]">
<script type="text/javascript">
+ <xsl:if test="$html.csp.nonce">
+ <xsl:attribute name="nonce">
+ <xsl:value-of select="$html.csp.nonce" />
+ </xsl:attribute>
+ </xsl:if>
<xsl:attribute name="src">
<xsl:text>http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML</xsl:text>
</xsl:attribute>
@@ -1558,6 +1578,11 @@ result of {html.js.content} to that file.
<xsl:template name="html.js.script">
<xsl:param name="node" select="."/>
<script type="text/javascript">
+ <xsl:if test="$html.csp.nonce">
+ <xsl:attribute name="nonce">
+ <xsl:value-of select="$html.csp.nonce" />
+ </xsl:attribute>
+ </xsl:if>
<xsl:call-template name="html.js.content">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
@@ -2035,8 +2060,19 @@ on all `code` elements with `"syntax"` in the class value.
<xsl:template name="html.js.syntax">
<xsl:param name="node" select="."/>
<xsl:if test="$html.syntax.highlight">
- <script type="text/javascript" src="{$html.js.root}highlight.pack.js"></script>
- <script><![CDATA[
+ <script type="text/javascript" src="{$html.js.root}highlight.pack.js">
+ <xsl:if test="$html.csp.nonce">
+ <xsl:attribute name="nonce">
+ <xsl:value-of select="$html.csp.nonce" />
+ </xsl:attribute>
+ </xsl:if>
+ </script>
+ <script>
+ <xsl:if test="$html.csp.nonce">
+ <xsl:attribute name="nonce">
+ <xsl:value-of select="$html.csp.nonce" />
+ </xsl:attribute>
+ </xsl:if><![CDATA[
document.addEventListener('DOMContentLoaded', function() {
var matches = document.querySelectorAll('code.syntax')
for (var i = 0; i < matches.length; i++) {
--
GitLab

Binary file not shown.

BIN
yelp-xsl-3.38.3.tar.xz Normal file

Binary file not shown.

View File

@ -1,14 +1,16 @@
Name: yelp-xsl
Version: 3.34.0
Release: 1
Version: 3.38.3
Release: 2
Summary: XSL stylesheets for the yelp help browser
License: LGPLv2+ and GPLv2+ and MIT
License: LGPLv2.1 and GPLv2+ and MIT
URL: https://wiki.gnome.org/Apps/Yelp
Source0: https://download.gnome.org/sources/%{name}/3.30/%{name}-%{version}.tar.xz
Source0: https://download.gnome.org/sources/%{name}/3.38/%{name}-%{version}.tar.xz
Patch6001: backport-CVE-2025-3155.patch
BuildArch: noarch
BuildRequires: python2-libxml2 /usr/bin/xmllint /usr/bin/xsltproc intltool
BuildRequires: itstool /usr/bin/ducktype libxml2 libxslt
BuildRequires: gcc python3-libxml2 itstool
BuildRequires: libxml2 libxslt python3-mallard-ducktype
Requires: (yelp >= 2:3.38.3-2 if yelp)
%description
This package contains XSL stylesheets that are used by the yelp help browser.
@ -23,7 +25,7 @@ The package contains developer documentation for the XSL stylesheets in %{name}.
%package_help
%prep
%autosetup -n %{name}-%{version}
%autosetup -p1 -n %{name}-%{version}
%build
%configure --enable-doc
@ -47,5 +49,21 @@ The package contains developer documentation for the XSL stylesheets in %{name}.
%doc NEWS
%changelog
* Fri May 16 2025 Funda Wang <fundawang@yeah.net> - 3.38.3-2
- fix CVE-2025-3155
* Wed May 19 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.3-1
- Upgrade to 3.38.3
- Update License and BuildRequires
* Fri Jan 29 2021 jinzhimin <jinzhimin2@huawei.com> - 3.38.2-1
- Upgrade to 3.38.2
* Mon Sep 7 2020 zhanzhimin <zhanzhimin@huawei.com> - 3.36.0-2
- Update Source0
* Mon Jul 20 2020 chengguipeng<chengguipeng1@huawei.com> 3.36.0-1
- Upgrade to 3.36.0-1
* Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.34.0-1
- Package init