Skip to content

Escape backslashes and quotes in NT account names passed to GetGroupDN() - #73

Open
bastienperez wants to merge 1 commit into
canix1:masterfrom
bastienperez:fix/escape-quotes-in-getgroupdn-onclick
Open

Escape backslashes and quotes in NT account names passed to GetGroupDN()#73
bastienperez wants to merge 1 commit into
canix1:masterfrom
bastienperez:fix/escape-quotes-in-getgroupdn-onclick

Conversation

@bastienperez

Copy link
Copy Markdown

The trustee name was injected as-is into the JavaScript onclick handler of the HTML report, so any account name containing a JS metacharacter produced a broken GetGroupDN('...') call:

2026-08-04-113339

Backslashes and single quotes are now escaped with the JavaScript convention (\ and ') before interpolation, in both HTML report generation blocks.

The trustee name was injected as-is into the JavaScript onclick handler
of the HTML report, so any account name containing a JS metacharacter
produced a broken GetGroupDN('...') call:

- an apostrophe (DOMAIN\O'Brien) terminated the string literal early;
- the domain separator was read as a JS escape sequence, so CONTOSO\bob
  reached GetGroupDN() as "CONTOSObob" (\b = backspace).

Backslashes and single quotes are now escaped with the JavaScript
convention (\\ and \') before interpolation, in both HTML report
generation blocks.
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