Skip to content

api people - #39

Merged
frederic34 merged 1 commit into
mainfrom
dev
Sep 23, 2025
Merged

api people#39
frederic34 merged 1 commit into
mainfrom
dev

Conversation

@frederic34

Copy link
Copy Markdown
Contributor

No description provided.

@frederic34
frederic34 merged commit 07821ae into main Sep 23, 2025
1 check passed
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 "&#39;" 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 "&#39;" untouched (it hides
it behind __SIMPLEQUOTE__ so htmlentities() never encodes the &), which leaves
exactly this attack open. $escapeonlyhtmltags=1 has no such carve-out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant