Bug 533287 - CMSServlet.outputXML() does not escape strings
Summary: CMSServlet.outputXML() does not escape strings
Alias: None
Product: Dogtag Certificate System
Classification: Retired
Component: Certificate Manager
Version: 1.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: John Dennis
QA Contact: Ben Levenson
Depends On: 531953
Blocks: ipa-fixes 431020 freeipa20
TreeView+ depends on / blocked
Reported: 2009-11-05 21:46 UTC by John Dennis
Modified: 2015-01-05 00:16 UTC (History)
3 users (show)

Clone Of:
Last Closed:

Attachments (Terms of Use)

Description John Dennis 2009-11-05 21:46:42 UTC
When generating XML it's important to escape (e.g. replace with entities) all strings. This is important for two reasons:

1) to produce valid XML
2) to protect against injection attacks

The best way to produce valid and safe XML is to build a DOM tree and serialize it. In fact many parts of CMS do this via the XMLObject class. However, for some reason CMSServlet.outputXML just uses println() in a naive fashion.

By the way, I've filed a number of bugs in the last couple of days. I've got patches for many of them and I'll attach the patches to the bug reports shortly.

Comment 1 John Dennis 2009-11-12 16:26:23 UTC
patch provided in bz #531953 solves this problem

Comment 2 Andrew Wnuk 2009-11-25 23:46:26 UTC
Patch included in in bug #533979 (attachment #373874 [details]) is committed.

Note You need to log in before you can comment on or make changes to this bug.