api people - #39
Merged
Merged
Conversation
frederic34
added a commit
that referenced
this pull request
Jul 29, 2026
Google Drive file and folder names are attacker-controlled: anybody sharing a folder with the connected account picks its name. Breadcrumb: the name was concatenated into a string injected with .html(), so a folder named "<img src=x onerror=alert(1)>" ran script on every re-render. Escape it through a text node first. onclick handlers: dol_escape_js() protects the JS string literal but not the surrounding HTML attribute, and the browser HTML-decodes the attribute before parsing it as JS. A name containing "'" therefore became a real quote and broke out of the argument. Build the handler first, then HTML-escape it as a whole. Uses dol_escape_htmltag($s, 0, 0, '', 1): in its default mode dol_escape_htmltag() re-emits the literal sequence "'" untouched (it hides it behind __SIMPLEQUOTE__ so htmlentities() never encodes the &), which leaves exactly this attack open. $escapeonlyhtmltags=1 has no such carve-out.
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.
No description provided.