Skip to content

Commit 0cf25ff

Browse files
[Medium] Patch reaper for CVE-2024-6485 (#15277)
1 parent 6278cb2 commit 0cf25ff

2 files changed

Lines changed: 113 additions & 1 deletion

File tree

SPECS/reaper/CVE-2024-6485.patch

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
From 769c032fd93d6f2c07599e096a736c5d09c041cf Mon Sep 17 00:00:00 2001
2+
From: Klemen <16374228+KlemenDEV@users.noreply.github.com>
3+
Date: Tue, 1 Oct 2024 17:50:16 +0200
4+
Subject: [PATCH] Fix CVE-2024-6485 (#2) by KlemenDEV
5+
6+
* Fix CVE-2024-6485
7+
8+
* Inline
9+
10+
* Remove comment
11+
12+
Upstream Patch Reference: https://github.com/entreprise7pro/bootstrap/commit/769c032fd93d6f2c07599e096a736c5d09c041cf.patch
13+
---
14+
src/ui/bower_components/bootstrap/js/button.js | 11 ++++++++++-
15+
src/ui/node_modules/bootstrap/js/button.js | 11 ++++++++++-
16+
src/ui/theming/bootstrap/js/button.js | 11 ++++++++++-
17+
3 files changed, 30 insertions(+), 3 deletions(-)
18+
19+
diff --git a/src/ui/bower_components/bootstrap/js/button.js b/src/ui/bower_components/bootstrap/js/button.js
20+
index 843b39c9..f84d4e2d 100644
21+
--- a/src/ui/bower_components/bootstrap/js/button.js
22+
+++ b/src/ui/bower_components/bootstrap/js/button.js
23+
@@ -25,6 +25,15 @@
24+
loadingText: 'loading...'
25+
}
26+
27+
+ Button.prototype.sanitize = function (unsafeText) {
28+
+ return unsafeText
29+
+ .replace(/&/g, "&amp;")
30+
+ .replace(/</g, "&lt;")
31+
+ .replace(/>/g, "&gt;")
32+
+ .replace(/"/g, "&quot;")
33+
+ .replace(/'/g, "&#039;");
34+
+ }
35+
+
36+
Button.prototype.setState = function (state) {
37+
var d = 'disabled'
38+
var $el = this.$element
39+
@@ -37,7 +46,7 @@
40+
41+
// push to event loop to allow forms to submit
42+
setTimeout($.proxy(function () {
43+
- $el[val](data[state] == null ? this.options[state] : data[state])
44+
+ $el[val](data[state] == null ? this.options[state] : this.sanitize(data[state]))
45+
46+
if (state == 'loadingText') {
47+
this.isLoading = true
48+
diff --git a/src/ui/node_modules/bootstrap/js/button.js b/src/ui/node_modules/bootstrap/js/button.js
49+
index ff4af20e..1c9defa7 100644
50+
--- a/src/ui/node_modules/bootstrap/js/button.js
51+
+++ b/src/ui/node_modules/bootstrap/js/button.js
52+
@@ -25,6 +25,15 @@
53+
loadingText: 'loading...'
54+
}
55+
56+
+ Button.prototype.sanitize = function (unsafeText) {
57+
+ return unsafeText
58+
+ .replace(/&/g, "&amp;")
59+
+ .replace(/</g, "&lt;")
60+
+ .replace(/>/g, "&gt;")
61+
+ .replace(/"/g, "&quot;")
62+
+ .replace(/'/g, "&#039;");
63+
+ }
64+
+
65+
Button.prototype.setState = function (state) {
66+
var d = 'disabled'
67+
var $el = this.$element
68+
@@ -37,7 +46,7 @@
69+
70+
// push to event loop to allow forms to submit
71+
setTimeout($.proxy(function () {
72+
- $el[val](data[state] == null ? this.options[state] : data[state])
73+
+ $el[val](data[state] == null ? this.options[state] : this.sanitize(data[state]))
74+
75+
if (state == 'loadingText') {
76+
this.isLoading = true
77+
diff --git a/src/ui/theming/bootstrap/js/button.js b/src/ui/theming/bootstrap/js/button.js
78+
index 8fdf9ddc..b9244470 100644
79+
--- a/src/ui/theming/bootstrap/js/button.js
80+
+++ b/src/ui/theming/bootstrap/js/button.js
81+
@@ -25,6 +25,15 @@
82+
loadingText: 'loading...'
83+
}
84+
85+
+ Button.prototype.sanitize = function (unsafeText) {
86+
+ return unsafeText
87+
+ .replace(/&/g, "&amp;")
88+
+ .replace(/</g, "&lt;")
89+
+ .replace(/>/g, "&gt;")
90+
+ .replace(/"/g, "&quot;")
91+
+ .replace(/'/g, "&#039;");
92+
+ }
93+
+
94+
Button.prototype.setState = function (state) {
95+
var d = 'disabled'
96+
var $el = this.$element
97+
@@ -37,7 +46,7 @@
98+
99+
// push to event loop to allow forms to submit
100+
setTimeout($.proxy(function () {
101+
- $el[val](data[state] == null ? this.options[state] : data[state])
102+
+ $el[val](data[state] == null ? this.options[state] : this.sanitize(data[state]))
103+
104+
if (state == 'loadingText') {
105+
this.isLoading = true
106+
--
107+
2.43.0
108+

SPECS/reaper/reaper.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Reaper for cassandra is a tool for running Apache Cassandra repairs against single or multi-site clusters.
77
Name: reaper
88
Version: 3.1.1
9-
Release: 21%{?dist}
9+
Release: 22%{?dist}
1010
License: ASL 2.0
1111
Vendor: Microsoft Corporation
1212
Distribution: Mariner
@@ -56,6 +56,7 @@ Patch20: CVE-2018-19797.patch
5656
Patch21: CVE-2025-12816.patch
5757
Patch22: CVE-2025-66031.patch
5858
Patch23: CVE-2025-66030.patch
59+
Patch24: CVE-2024-6485.patch
5960

6061
BuildRequires: git
6162
BuildRequires: javapackages-tools
@@ -204,6 +205,9 @@ fi
204205
%{_unitdir}/cassandra-%{name}.service
205206

206207
%changelog
208+
* Tue Dec 09 2025 Akhila Guruju <v-guakhila@microsoft.com> - 3.1.1-22
209+
- Patch CVE-2024-6485
210+
207211
* Tue Dec 02 2025 Akhila Guruju <v-guakhila@microsoft.com> - 3.1.1-21
208212
- Patch CVE-2025-12816, CVE-2025-66031 and CVE-2025-66030
209213

0 commit comments

Comments
 (0)