You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Arieh Markel <Ar...@Sun.COM> on 2001/03/21 17:15:46 UTC
to trim or not to trim (was Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util FileUtil.java)
> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> list-help: <ma...@jakarta.apache.org>
> list-unsubscribe: <ma...@jakarta.apache.org>
> list-post: <ma...@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: Yoshiyuki Karezaki <ka...@wtank.csk.co.jp>
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util
FileUtil.java
> User-Agent: Wanderlust/2.4.1 (Stand By Me) Emacs/20.4 Mule/4.1 (AOI)
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
>
> Hi arieh,
>
> In article <cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util
FileUtil.java>,
> arieh@apache.org wrote:
> | public static String patch(String path) {
> | - String patchPath = path;
> | + String patchPath = path.trim();
>
> The fix of 1.9.2.6 becomes ineffective.
> trim() should be removed ?
Yoshiyuki,
Thanks for your comments.
Before I go ahead with reverting the code to what it was before.
Can you explain why the addition of trim makes the fix ineffective ?
The trim() protects from generating invalid paths that may result
from appended spaces.
Are you suggesting that we don't try to fix the possible existence of
appended spaces (or CR LF) ?
Have you seen any problem with the current version ?
Other opinions ?
Thanks,
Arieh
>
> Yoshiyuki Karezaki kare@wtank.csk.co.jp
--
Arieh Markel Sun Microsystems Inc.
Network Storage 500 Eldorado Blvd. MS UBRM11-194
e-mail: arieh.markel@sun.COM Broomfield, CO 80021
Pray for snow !!!! Phone: (303) 272-8547 x78547
(e-mail me with subject SEND PUBLIC KEY to get public key)