You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Oliver Szymanski <Ol...@bov.de> on 2001/09/06 14:45:46 UTC

[PATCH] Tomcat 3.2.1 Admin Context

> Hello *,
> 
> i have found an error in the admin context of tomcat 3.2.3 and hopefully
> corrected it.
> 
> You can not use the function "view all contexts" because this
> functionality throws an error.
> 
> The problem is that the method  "public final static String
> URLDecode(String str)" in the class org.apache.tomcat.util.RequestUtil
> can't decode a string that contains the char "/".
> 
> But it is used in the class "ContextAdmin" of the admin context of tomcat
> 3 to decode the value of the property "work dir" from a context (line 122
> of the file "ContextAdmin.java"). This throws an exception, because of the
> reason this property is an directory path it certainly has "/" in it.
> 
> I have exchanged the line 76:
> v.addElement("WORK DIR: " +
> RequestUtil.URLDecode(context.getWorkDir().getName()));
> with
> v.addElement("WORK DIR: " +
> java.net.URLDecoder.decode(context.getWorkDir().getName()));
> 
> and the line 92
> v.addElement("ATTRIBUTE: " +
> RequestUtil.URLDecode(context.getAttribute(key).toString()));
> with
> v.addElement("ATTRIBUTE: " +
> java.net.URLDecoder.decode(context.getAttribute(key).toString()));
> 
> and everything's working fine.
> 
> 
> 
> Oliver Szymanski 
> Technology Specialist
> BOV Aktiengesellschaft
> Voice: +49 201/ 4513 - 067 
> Fax: +49 201/ 4513 - 149 
> Mobil: +49 172 / 27 27 504 
> mailto:oliver.szymanski@bov.de
> visit our new website: http://www.bov.de
> subscribe to our newsletter: http://www.bov.de/presse/newsletter.asp
> 
> Web your knowledge - nun auch im Internet. Besuchen sie unser neues Portal
> www.bazaar42.de <http://www.bazaar42.de> mit vielfältigen Informationen
> rund um "Bazaar42" - der webbasierten Software von BOV. Weitere
> Informationen: <ma...@bov.de>. Wir freuen uns auf Ihren Besuch.
> 
> Wie Sie wissen, koennen ueber das Internet versandte eMails leicht unter
> fremden Namen erstellt oder manipuliert werden. Aus diesem Grunde bitten
> wir um Verstaendnis dafuer, dass wir zu Ihrem und unserem Schutz die
> rechtliche Verbindlichkeit der vorstehenden Erklaerungen und Aeusserungen
> ausschliessen. 
> As you are probably aware, e-mails sent via the Internet can easily be
> copied or manipulated by third parties. For this reason we would ask for
> your understanding that, for your own protection and ours, we must decline
> all legal responsibility for the validity of the statements and comments
> given above. 
> 
> 
> 
>