Skip to content

Commit ec35977

Browse files
Add nodejs24 to coexist with nodejs 20, add fix for runtime internationalization support in nodejs24 (#15385)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent cbc9f97 commit ec35977

14 files changed

Lines changed: 1191 additions & 2 deletions

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2947,6 +2947,7 @@
29472947
"nginx",
29482948
"ninja-build",
29492949
"nodejs",
2950+
"nodejs24",
29502951
"npth",
29512952
"nspr",
29522953
"nss",

SPECS/nodejs/nodejs.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Name: nodejs
55
# WARNINGS: MUST check and update the 'npm_version' macro for every version update of this package.
66
# The version of NPM can be found inside the sources under 'deps/npm/package.json'.
77
Version: 20.14.0
8-
Release: 11%{?dist}
8+
Release: 12%{?dist}
99
License: BSD AND MIT AND Public Domain AND NAIST-2003 AND Artistic-2.0
1010
Vendor: Microsoft Corporation
1111
Distribution: Azure Linux
@@ -49,6 +49,7 @@ Requires: brotli
4949
Requires: c-ares
5050
Requires: coreutils >= 8.22
5151
Requires: openssl >= 1.1.1
52+
Provides: nodejs
5253

5354
%description
5455
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
@@ -146,6 +147,9 @@ make cctest
146147
%{_prefix}/lib/node_modules/*
147148

148149
%changelog
150+
* Thr Jan 29 2026 Sandeep Karambelkar <skarambelkar@microsoft.com> - 20.14.0-12
151+
- Add nodejs provides to manage co existence with nodejs24
152+
149153
* Wed Jan 28 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 20.14.0-11
150154
- Patch for CVE-2026-21637, CVE-2025-59466, CVE-2025-59465, CVE-2025-55132, CVE-2025-55131
151155

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
From ce71e5f5911b12ebc36711a7d86dab0a11bd1c4d Mon Sep 17 00:00:00 2001
2+
From: Suresh Thelkar <sthelkar@microsoft.com>
3+
Date: Fri, 20 Sep 2024 09:55:21 +0530
4+
Subject: [PATCH] Changed needed to upgrade jinja2 to 2.10.1
5+
6+
---
7+
.../jinja2/Jinja2-2.10.1.tar.gz.md5 | 1 +
8+
.../jinja2/Jinja2-2.10.1.tar.gz.sha512 | 1 +
9+
.../jinja2/Jinja2-2.10.tar.gz.md5 | 1 -
10+
.../jinja2/Jinja2-2.10.tar.gz.sha512 | 1 -
11+
tools/inspector_protocol/jinja2/LICENSE | 62 +++++++++----------
12+
tools/inspector_protocol/jinja2/__init__.py | 2 +-
13+
tools/inspector_protocol/jinja2/get_jinja2.sh | 4 +-
14+
tools/inspector_protocol/jinja2/sandbox.py | 17 ++++-
15+
8 files changed, 50 insertions(+), 39 deletions(-)
16+
create mode 100644 tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.md5
17+
create mode 100644 tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.sha512
18+
delete mode 100644 tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.md5
19+
delete mode 100644 tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.sha512
20+
21+
diff --git a/tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.md5 b/tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.md5
22+
new file mode 100644
23+
index 00000000..254f4371
24+
--- /dev/null
25+
+++ b/tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.md5
26+
@@ -0,0 +1 @@
27+
+0ae535be40fd215a8114a090c8b68e5a Jinja2-2.10.1.tar.gz
28+
\ No newline at end of file
29+
diff --git a/tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.sha512 b/tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.sha512
30+
new file mode 100644
31+
index 00000000..7c379ff1
32+
--- /dev/null
33+
+++ b/tools/inspector_protocol/jinja2/Jinja2-2.10.1.tar.gz.sha512
34+
@@ -0,0 +1 @@
35+
+a00153a0e07bb7d67f301b4eaf7af657726a1985e9ffc7ae2d76bdbb4c062d672efc8065e398767e1039b18a483a0092e206deac91e4047aad64920b56869623 Jinja2-2.10.1.tar.gz
36+
\ No newline at end of file
37+
diff --git a/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.md5 b/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.md5
38+
deleted file mode 100644
39+
index 9137ee12..00000000
40+
--- a/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.md5
41+
+++ /dev/null
42+
@@ -1 +0,0 @@
43+
-61ef1117f945486472850819b8d1eb3d Jinja2-2.10.tar.gz
44+
diff --git a/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.sha512 b/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.sha512
45+
deleted file mode 100644
46+
index 087d24c1..00000000
47+
--- a/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.sha512
48+
+++ /dev/null
49+
@@ -1 +0,0 @@
50+
-0ea7371be67ffcf19e46dfd06523a45a0806e678a407d54f5f2f3e573982f0959cf82ec5d07b203670309928a62ef71109701ab16547a9bba2ebcdc178cb67f2 Jinja2-2.10.tar.gz
51+
diff --git a/tools/inspector_protocol/jinja2/LICENSE b/tools/inspector_protocol/jinja2/LICENSE
52+
index 31bf900e..10145a26 100644
53+
--- a/tools/inspector_protocol/jinja2/LICENSE
54+
+++ b/tools/inspector_protocol/jinja2/LICENSE
55+
@@ -1,31 +1,31 @@
56+
-Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
57+
-
58+
-Some rights reserved.
59+
-
60+
-Redistribution and use in source and binary forms, with or without
61+
-modification, are permitted provided that the following conditions are
62+
-met:
63+
-
64+
- * Redistributions of source code must retain the above copyright
65+
- notice, this list of conditions and the following disclaimer.
66+
-
67+
- * Redistributions in binary form must reproduce the above
68+
- copyright notice, this list of conditions and the following
69+
- disclaimer in the documentation and/or other materials provided
70+
- with the distribution.
71+
-
72+
- * The names of the contributors may not be used to endorse or
73+
- promote products derived from this software without specific
74+
- prior written permission.
75+
-
76+
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
77+
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
78+
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
79+
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
80+
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
81+
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
82+
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
83+
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
84+
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
85+
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
86+
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
87+
+Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
88+
+
89+
+Some rights reserved.
90+
+
91+
+Redistribution and use in source and binary forms, with or without
92+
+modification, are permitted provided that the following conditions are
93+
+met:
94+
+
95+
+ * Redistributions of source code must retain the above copyright
96+
+ notice, this list of conditions and the following disclaimer.
97+
+
98+
+ * Redistributions in binary form must reproduce the above
99+
+ copyright notice, this list of conditions and the following
100+
+ disclaimer in the documentation and/or other materials provided
101+
+ with the distribution.
102+
+
103+
+ * The names of the contributors may not be used to endorse or
104+
+ promote products derived from this software without specific
105+
+ prior written permission.
106+
+
107+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
108+
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
109+
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
110+
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
111+
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
112+
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
113+
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
114+
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
115+
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
116+
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
117+
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
118+
diff --git a/tools/inspector_protocol/jinja2/__init__.py b/tools/inspector_protocol/jinja2/__init__.py
119+
index 42aa763d..15e13b6f 100644
120+
--- a/tools/inspector_protocol/jinja2/__init__.py
121+
+++ b/tools/inspector_protocol/jinja2/__init__.py
122+
@@ -27,7 +27,7 @@
123+
:license: BSD, see LICENSE for more details.
124+
"""
125+
__docformat__ = 'restructuredtext en'
126+
-__version__ = '2.10'
127+
+__version__ = '2.10.1'
128+
129+
# high level interface
130+
from jinja2.environment import Environment, Template
131+
diff --git a/tools/inspector_protocol/jinja2/get_jinja2.sh b/tools/inspector_protocol/jinja2/get_jinja2.sh
132+
index bc6c4c30..b0fa6e8e 100755
133+
--- a/tools/inspector_protocol/jinja2/get_jinja2.sh
134+
+++ b/tools/inspector_protocol/jinja2/get_jinja2.sh
135+
@@ -7,8 +7,8 @@
136+
# Download page:
137+
# https://pypi.python.org/pypi/Jinja2
138+
PACKAGE='Jinja2'
139+
-VERSION='2.10'
140+
-SRC_URL='https://pypi.python.org/packages/56/e6/332789f295cf22308386cf5bbd1f4e00ed11484299c5d7383378cf48ba47/Jinja2-2.10.tar.gz'
141+
+VERSION='2.10.1'
142+
+SRC_URL='https://files.pythonhosted.org/packages/93/ea/d884a06f8c7f9b7afbc8138b762e80479fb17aedbbe2b06515a12de9378d/Jinja2-2.10.1.tar.gz'
143+
PACKAGE_DIR='jinja2'
144+
145+
CHROMIUM_FILES="README.chromium OWNERS get_jinja2.sh"
146+
diff --git a/tools/inspector_protocol/jinja2/sandbox.py b/tools/inspector_protocol/jinja2/sandbox.py
147+
index 93fb9d45..752e8128 100644
148+
--- a/tools/inspector_protocol/jinja2/sandbox.py
149+
+++ b/tools/inspector_protocol/jinja2/sandbox.py
150+
@@ -137,7 +137,7 @@ class _MagicFormatMapping(Mapping):
151+
def inspect_format_method(callable):
152+
if not isinstance(callable, (types.MethodType,
153+
types.BuiltinMethodType)) or \
154+
- callable.__name__ != 'format':
155+
+ callable.__name__ not in ('format', 'format_map'):
156+
return None
157+
obj = callable.__self__
158+
if isinstance(obj, string_types):
159+
@@ -402,7 +402,7 @@ class SandboxedEnvironment(Environment):
160+
obj.__class__.__name__
161+
), name=attribute, obj=obj, exc=SecurityError)
162+
163+
- def format_string(self, s, args, kwargs):
164+
+ def format_string(self, s, args, kwargs, format_func=None):
165+
"""If a format call is detected, then this is routed through this
166+
method so that our safety sandbox can be used for it.
167+
"""
168+
@@ -410,6 +410,17 @@ class SandboxedEnvironment(Environment):
169+
formatter = SandboxedEscapeFormatter(self, s.escape)
170+
else:
171+
formatter = SandboxedFormatter(self)
172+
+
173+
+ if format_func is not None and format_func.__name__ == 'format_map':
174+
+ if len(args) != 1 or kwargs:
175+
+ raise TypeError(
176+
+ 'format_map() takes exactly one argument %d given'
177+
+ % (len(args) + (kwargs is not None))
178+
+ )
179+
+
180+
+ kwargs = args[0]
181+
+ args = None
182+
+
183+
kwargs = _MagicFormatMapping(args, kwargs)
184+
rv = formatter.vformat(s, args, kwargs)
185+
return type(s)(rv)
186+
@@ -418,7 +429,7 @@ class SandboxedEnvironment(Environment):
187+
"""Call an object from sandboxed code."""
188+
fmt = inspect_format_method(__obj)
189+
if fmt is not None:
190+
- return __self.format_string(fmt, args, kwargs)
191+
+ return __self.format_string(fmt, args, kwargs, __obj)
192+
193+
# the double prefixes are to avoid double keyword argument
194+
# errors when proxying the call.
195+
--
196+
2.34.1
197+
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
From 1416131a2c937e08dd313f622f6c8b928c64e477 Mon Sep 17 00:00:00 2001
2+
From: Kevin Lockwood <v-klockwood@microsoft.com>
3+
Date: Wed, 5 Feb 2025 16:33:58 -0800
4+
Subject: [PATCH] [Medium] Patch nodejs to fix CVE-2020-28493
5+
6+
Link: https://github.com/pallets/jinja/pull/1343/commits/ef658dc3b6389b091d608e710a810ce8b87995b3.patch
7+
---
8+
tools/inspector_protocol/jinja2/utils.py | 93 ++++++++++++++----------
9+
1 file changed, 56 insertions(+), 37 deletions(-)
10+
11+
diff --git a/tools/inspector_protocol/jinja2/utils.py b/tools/inspector_protocol/jinja2/utils.py
12+
index 502a311c..00664b56 100644
13+
--- a/tools/inspector_protocol/jinja2/utils.py
14+
+++ b/tools/inspector_protocol/jinja2/utils.py
15+
@@ -12,24 +12,13 @@ import re
16+
import json
17+
import errno
18+
from collections import deque
19+
+from string import ascii_letters as _letters
20+
+from string import digits as _digits
21+
from threading import Lock
22+
from jinja2._compat import text_type, string_types, implements_iterator, \
23+
url_quote
24+
25+
26+
-_word_split_re = re.compile(r'(\s+)')
27+
-_punctuation_re = re.compile(
28+
- '^(?P<lead>(?:%s)*)(?P<middle>.*?)(?P<trail>(?:%s)*)$' % (
29+
- '|'.join(map(re.escape, ('(', '<', '&lt;'))),
30+
- '|'.join(map(re.escape, ('.', ',', ')', '>', '\n', '&gt;')))
31+
- )
32+
-)
33+
-_simple_email_re = re.compile(r'^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$')
34+
-_striptags_re = re.compile(r'(<!--.*?-->|<[^>]*>)')
35+
-_entity_re = re.compile(r'&([^;]+);')
36+
-_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
37+
-_digits = '0123456789'
38+
-
39+
# special singleton representing missing values for the runtime
40+
missing = type('MissingType', (), {'__repr__': lambda x: 'missing'})()
41+
42+
@@ -203,35 +192,65 @@ def urlize(text, trim_url_limit=None, rel=None, target=None):
43+
trim_url = lambda x, limit=trim_url_limit: limit is not None \
44+
and (x[:limit] + (len(x) >=limit and '...'
45+
or '')) or x
46+
- words = _word_split_re.split(text_type(escape(text)))
47+
+ words = re.split(r"(\s+)", text_type(escape(text)))
48+
rel_attr = rel and ' rel="%s"' % text_type(escape(rel)) or ''
49+
target_attr = target and ' target="%s"' % escape(target) or ''
50+
51+
for i, word in enumerate(words):
52+
- match = _punctuation_re.match(word)
53+
+ head, middle, tail = "", word, ""
54+
+ match = re.match(r"^([(<]|&lt;)+", middle)
55+
+
56+
if match:
57+
- lead, middle, trail = match.groups()
58+
- if middle.startswith('www.') or (
59+
- '@' not in middle and
60+
- not middle.startswith('http://') and
61+
- not middle.startswith('https://') and
62+
- len(middle) > 0 and
63+
- middle[0] in _letters + _digits and (
64+
- middle.endswith('.org') or
65+
- middle.endswith('.net') or
66+
- middle.endswith('.com')
67+
- )):
68+
- middle = '<a href="http://%s"%s%s>%s</a>' % (middle,
69+
- rel_attr, target_attr, trim_url(middle))
70+
- if middle.startswith('http://') or \
71+
- middle.startswith('https://'):
72+
- middle = '<a href="%s"%s%s>%s</a>' % (middle,
73+
- rel_attr, target_attr, trim_url(middle))
74+
- if '@' in middle and not middle.startswith('www.') and \
75+
- not ':' in middle and _simple_email_re.match(middle):
76+
- middle = '<a href="mailto:%s">%s</a>' % (middle, middle)
77+
- if lead + middle + trail != word:
78+
- words[i] = lead + middle + trail
79+
+ head = match.group()
80+
+ middle = middle[match.end() :]
81+
+
82+
+ # Unlike lead, which is anchored to the start of the string,
83+
+ # need to check that the string ends with any of the characters
84+
+ # before trying to match all of them, to avoid backtracking.
85+
+ if middle.endswith((")", ">", ".", ",", "\n", "&gt;")):
86+
+ match = re.search(r"([)>.,\n]|&gt;)+$", middle)
87+
+
88+
+ if match:
89+
+ tail = match.group()
90+
+ middle = middle[: match.start()]
91+
+
92+
+ if middle.startswith("www.") or (
93+
+ "@" not in middle
94+
+ and not middle.startswith("http://")
95+
+ and not middle.startswith("https://")
96+
+ and len(middle) > 0
97+
+ and middle[0] in _letters + _digits
98+
+ and (
99+
+ middle.endswith(".org")
100+
+ or middle.endswith(".net")
101+
+ or middle.endswith(".com")
102+
+ )
103+
+ ):
104+
+ middle = '<a href="http://%s"%s%s>%s</a>' % (
105+
+ middle,
106+
+ rel_attr,
107+
+ target_attr,
108+
+ trim_url(middle),
109+
+ )
110+
+
111+
+ if middle.startswith("http://") or middle.startswith("https://"):
112+
+ middle = '<a href="%s"%s%s>%s</a>' % (
113+
+ middle,
114+
+ rel_attr,
115+
+ target_attr,
116+
+ trim_url(middle),
117+
+ )
118+
+
119+
+ if (
120+
+ "@" in middle
121+
+ and not middle.startswith("www.")
122+
+ and ":" not in middle
123+
+ and re.match(r"^\S+@\w[\w.-]*\.\w+$", middle)
124+
+ ):
125+
+ middle = '<a href="mailto:%s">%s</a>' % (middle, middle)
126+
+
127+
+ words[i] = head + middle + tail
128+
+
129+
return u''.join(words)
130+
131+
132+
--
133+
2.34.1
134+

0 commit comments

Comments
 (0)