DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11183>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11183

ArrayIndexOutOfBoundsException in parseParameters()

           Summary: ArrayIndexOutOfBoundsException in parseParameters()
           Product: Tomcat 4
           Version: 4.0.4 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When submitting a JSP request in which the value of the LAST parameter on the 
URL ends in a percent sign, Catalina throws a 
"java.lang.ArrayIndexOutOfBoundsException" in the parseParameters() method of 
org.apache.catalina.util.RequestUtil. 

Looking at the following line from the switch statement, it would seem that the 
code is assuming there are two more characters after the percent sign:

case '%':
    data[ox++] = (byte)((convertHexDigit(data[ix++]) << 4)
                    + convertHexDigit(data[ix++]));

If the query string were properly encoded (% -> %25), this wouldn't be an issue.  
But if it's not, shouldn't the container handle it better than this exception?

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to