From a4b412253ed27c110b2dc306e85f8a5834384d1c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Aug 2026 10:06:11 +0300 Subject: [PATCH] security(core): HTML-encode the application name in the graph note tooltip Backport of #7966 to release.24.05. The graph-note tooltip builds an HTML string including the application name from countlyGlobal (raw at runtime) and renders it via tipsy html:true. Encode it with countlyCommon.encodeHtml so it renders as text. Display unchanged. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 3 +++ frontend/express/public/javascripts/countly/countly.common.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7703fab7885..50790c4f535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ Fixes: Enterprise Fixes: - [data-manager] Fixed editing an event whose key contains `&` creating undeletable duplicate rows in the events table +Security Fixes: +- [core] The graph note tooltip now HTML-encodes the application name before rendering, so an application name is shown as text rather than markup + ## Version 24.05.51 Fixes: diff --git a/frontend/express/public/javascripts/countly/countly.common.js b/frontend/express/public/javascripts/countly/countly.common.js index ef7e9a15298..b055dc877b1 100644 --- a/frontend/express/public/javascripts/countly/countly.common.js +++ b/frontend/express/public/javascripts/countly/countly.common.js @@ -1115,7 +1115,7 @@ var noteTime = moment(notes[0].ts).format("D MMM, HH:mm"); var noteId = notes[0].app_id; var app = countlyGlobal.apps[noteId] || {}; - titleDom = "
" + noteTime + "
" + app.name + "
" + + titleDom = "
" + noteTime + "
" + countlyCommon.encodeHtml(app.name) + "
" + "
" + notes[0].note + "
" + "" + "
";