You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/06/14 18:26:33 UTC
DO NOT REPLY [Bug 39813] New: - JMX proxy servlet newline escaping is incorrect
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39813>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39813
Summary: JMX proxy servlet newline escaping is incorrect
Product: Tomcat 5
Version: 5.5.17
Platform: All
OS/Version: other
Status: NEW
Severity: trivial
Priority: P4
Component: Webapps:Manager
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: asf@rbramley.com
JMXProxyServlet.java at revision 411724.
Using MBean qry operation, if an attribute returns a String containing a
newline, the character before the newline is removed by the escape method (uses
idx-1 instead of idx on line 204).
e.g. PermGenStatus: Perm Gen : 19.93% (26739168/134217728\n
Furthermore, the end int is not checked to be > 0 in the appendHead method - so
anything starting with a newline would end up being a substring(0,-1) call (line
223) - resulting in an StringIndexOutOfBoundsException("String index out of
range: -1") which would then drop into "} catch (Exception e) {} // Ignore" in
listBeans causing any further attributes to not be printed out.
Finally, the get operation does not use the escape method in getAttribute (line
114) so will print newlines. Guess this contravenes the JMX spec 1.2 - whose
changes log says "...the newline character ('\n') is forbidden everywhere. This
rule is new with 1.2."
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 39813] - JMX proxy servlet newline escaping is incorrect
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39813>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39813
------- Additional Comments From asf@rbramley.com 2006-06-16 09:14 -------
Created an attachment (id=18476)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=18476&action=view)
Patch for newline escaping
Here you go!
Tested with a Spring MBean exported POJO returning strings containing newlines
and starting with a newline.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 39813] - JMX proxy servlet newline escaping is incorrect
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39813>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39813
markt@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From markt@apache.org 2006-06-17 16:57 -------
Patch applied.
Many thanks.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 39813] - JMX proxy servlet newline escaping is incorrect
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39813>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39813
------- Additional Comments From yoavs@computer.org 2006-06-15 19:29 -------
Patches would be great ;)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org