security(compliance-hub): HTML-encode the application name in the export-history action cell - #7961
Open
ar2rsawseen wants to merge 1 commit into
Open
security(compliance-hub): HTML-encode the application name in the export-history action cell#7961ar2rsawseen wants to merge 1 commit into
ar2rsawseen wants to merge 1 commit into
Conversation
…ort-history action cell The export/purge history model builds each row's action cell as an HTML string and the template renders it with v-html. Every other value in that string comes from the API, which HTML-encodes its output, but the application name is read from countlyGlobal, whose values are raw at runtime. Encode the application name with countlyCommon.encodeHtml so it is rendered as text, matching the encoding of the other fields in the same string. Only the application name needed encoding; the remaining fields are already API-encoded and must not be encoded again. The display is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The export/purge history model (
plugins/compliance-hub/frontend/public/javascripts/countly.models.js) builds each row's action cell as an HTML string, andexportHistory.htmlrenders it withv-html. Every other value in that string comes from the API, which HTML-encodes its output, but the application name is read fromcountlyGlobal, whose values are raw at runtime. So an application name is placed into thev-htmlstring unencoded.Encode the application name with
countlyCommon.encodeHtmlso it renders as text, matching the encoding of the other fields in the same string.Only the application name needed it — the remaining fields are already API-encoded and must not be double-encoded; the display is unchanged. This is a distinct sink from #7949 (that fix covered the inline serializer and the active-app jQuery sink); this is downstream HTML construction in the default Compliance Hub plugin.
Scope check: a codebase scan for a raw
countlyGlobalvalue reaching an HTML sink found only two sites — the active-app name (fixed in #7949) and this one. The widerv-html/unescapeHtmlsource audit is tracked separately.Reported through the security bug bounty program.
🤖 Generated with Claude Code