This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 71d3aca6b37a [SPARK-58158][CORE][UI] Escape the executor removal
reason in executorspage.js
71d3aca6b37a is described below
commit 71d3aca6b37ae5446538e5304bb420172a18dd11
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Jul 16 06:19:42 2026 -0700
[SPARK-58158][CORE][UI] Escape the executor removal reason in
executorspage.js
---
.../resources/org/apache/spark/ui/static/executorspage.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git
a/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
b/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
index 38dc446eaac6..f82c06fdc535 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/executorspage.js
@@ -39,9 +39,21 @@ function getHeapHistogramEnabled() {
return heapHistogramEnabled;
}
+/* escape XSS */
+function escapeHtml(text) {
+ if (typeof text !== 'string') return text;
+ return text
+ .replace(/&/g, "&")
+ .replace(/</g, "<")
+ .replace(/>/g, ">")
+ .replace(/"/g, """)
+ .replace(/'/g, "'");
+}
+
function formatLossReason(removeReason) {
if (removeReason) {
- return removeReason
+ // The reason originates outside the driver and DataTables renders this
cell as HTML.
+ return escapeHtml(removeReason)
} else {
return ""
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]