Hola Kazuhiro:

Can you send the patch as an attached file?? it's a pain to extract it
from mail, to apply..., is far more quick to commit this if you it as
attached file...

Thanks for the Patch!!!

Saludos ,
Ignacio J. Ortega


> -----Mensaje original-----
> De: Kazuhiro Kazama [mailto:[EMAIL PROTECTED]]
> Enviado el: miércoles 20 de diciembre de 2000 8:07
> Para: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Asunto: [PATCH] SECURITY FIX (Re: Tomcat 3.2.1 JSP Source Disclosure)
> 
> 
> This patch fixes Tomcat 3.2.1 security problem that Yoshiyuki Karezaki
> (cf. BugRat Report #513) and Robert Ellis (cf. "Tomcat 3.2.1 JSP
> Source Disclosure") reported.
> 
> At the same time, this patch fixes the bug Mark Brouwer reported
>  (cf. "[BUG] getProtocol() method on ServletRequest includes CRLF
> causing problems").
> 
> Kazuhiro Kazama ([EMAIL PROTECTED])   NTT Network Innovation 
> Laboratories
> 
> --- 
> src/org/apache/tomcat/service/http/HttpRequestAdapter.ja
> va.orig       Wed Dec 13 06:37:14 2000
> +++ 
> src/org/apache/tomcat/service/http/HttpRequestAdapter.java    
> Wed Dec 20 15:54:56 2000
> @@ -303,7 +303,9 @@
>      private  final int skipSpaces() {
>       while (off < count) {
>           if ((buf[off] != (byte) ' ') 
> -             && (buf[off] != (byte) '\t')) {
> +             && (buf[off] != (byte) '\t')
> +             && (buf[off] != (byte) '\r')
> +             && (buf[off] != (byte) '\n')) {
>               return off;
>           }
>           off++;
> @@ -316,7 +318,9 @@
>      private  int findSpace() {
>       while (off < count) {
>           if ((buf[off] == (byte) ' ') 
> -             || (buf[off] == (byte) '\t')) {
> +             || (buf[off] == (byte) '\t')
> +             || (buf[off] == (byte) '\r')
> +             || (buf[off] == (byte) '\n')) {
>               return off;
>           }
>           off++;
> @@ -369,9 +373,8 @@
>       
>       method= new String( buf, startMethod, endMethod - startMethod );
>  
> -     if( endReq < 0 ) {
> +     if( startProto < 0 ) {
>           protocol=null;
> -         endReq=count;
>       } else {
>           if( endProto < 0 ) endProto = count;
>           protocol=new String( buf, startProto, endProto-startProto );
> 

Reply via email to