Skip to content

Fix XML parsing errors caused by invalid characters in AD attributes#6

Open
Spoonman1091 wants to merge 1 commit intologangoins:mainfrom
Spoonman1091:main
Open

Fix XML parsing errors caused by invalid characters in AD attributes#6
Spoonman1091 wants to merge 1 commit intologangoins:mainfrom
Spoonman1091:main

Conversation

@Spoonman1091
Copy link

Text records now sanitize values before XML serialization by:

  • Removing invalid XML 1.0 control characters (0x00-0x08, 0x0B, 0x0C, 0x0E-0x1F)
  • Escaping XML special characters (<, >, &, ", ')

This fixes "not well-formed (invalid token)" errors when querying AD environments where user attributes contain control characters.

Text records now sanitize values before XML serialization by:
- Removing invalid XML 1.0 control characters (0x00-0x08, 0x0B, 0x0C, 0x0E-0x1F)
- Escaping XML special characters (<, >, &, ", ')

This fixes "not well-formed (invalid token)" errors when querying AD
environments where user attributes contain control characters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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