Skip to content

Escape special characters in DOM2Writer#399

Merged
mondain merged 1 commit intoRed5:mainfrom
kdkd:cherry-pick-b50d424-20251126-124519
Nov 26, 2025
Merged

Escape special characters in DOM2Writer#399
mondain merged 1 commit intoRed5:mainfrom
kdkd:cherry-pick-b50d424-20251126-124519

Conversation

@kdkd
Copy link
Copy Markdown

@kdkd kdkd commented Nov 26, 2025

Commit from kdkd fork b50d424

io/utils/DOM2Writer.java: element text and attribute values were written without XML escaping. Any <, &, or " characters in content produced malformed XML and if not handled properly could allow injection of arbitrary markup.


without XML escaping.  Any <, &, or " characters in content produced
malformed XML and if not handled properly could allow injection of arbitrary
markup.
@kdkd
Copy link
Copy Markdown
Author

kdkd commented Nov 26, 2025

There are functions to do this in Apache Commons instead of rolling my own escape() function, but this seemed simple enough

@mondain mondain merged commit 495ae9b into Red5:main Nov 26, 2025
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.

2 participants