Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 533287 - CMSServlet.outputXML() does not escape strings
Summary: CMSServlet.outputXML() does not escape strings
Keywords:
Status: CLOSED EOL
Alias: None
Product: Dogtag Certificate System
Classification: Retired
Component: Certificate Manager
Version: 1.2
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: RHCS Maintainers
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On: 531953
Blocks: 431020 freeipa20 ipa-fixes
TreeView+ depends on / blocked
 
Reported: 2009-11-05 21:46 UTC by John Dennis
Modified: 2020-03-27 20:00 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:00:21 UTC
Embargoed:


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.