Bug 61603 - Not-well-formed XML returned from /manager/status?XML=true when running Java 9
Summary: Not-well-formed XML returned from /manager/status?XML=true when running Java 9
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Manager (show other bugs)
Version: 8.5.23
Hardware: PC Linux
: P2 regression (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-10 01:36 UTC by Shira
Modified: 2017-10-10 14:31 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shira 2017-10-10 01:36:57 UTC
Hello!

When running Tomcat 8.5.23 or Tomcat 9.0.1 for that matter with Java 9
the response from /manager/status?XML=true is returning not-well-formed XML data.

Expected behaviour:
Getting well-formed XML.

Actual behaviour:
Getting non-well-formed XML.

Reproducible:
Always when run on Java 9.

Example snippet of offending output:
<memorypool name='CodeHeap 'non-nmethods'' type='Non-heap memory' usageInit='2555904' usageCommitted='2555904' usageMax='5836800' usageUsed='1469952'/>

Please note the apostrophes surrounding non-nmethods, which should be escaped.

Possible solution:
Ensure all String attribute values are XML-escaped.

Thank you.
Comment 1 Remy Maucherat 2017-10-10 14:31:48 UTC
It is possible other values could need escaping, but the others are rather controlled (IMO) so it seems reasonable to keep that as is for now.
Fixed in 9.0.2, 8.5.24, 8.0.48, 7.0.83.