tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45067] New: UDecoder. java stack dumps on valid URL encoding
Date Fri, 23 May 2008 06:35:19 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45067

           Summary: UDecoder.java stack dumps on valid URL encoding
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Connectors
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: treeck@yahoo.com


Some URL-encoded text causes UDecoder to stack dump and not process a request
parameter.

I looked at the source code of UDecoder.java and it simply checks if a %
character is followed by 2 hex digits. It doesn't handle cases like the degree
symbol (e.g., 0-40°C) and the dagger (e.g., $199.99†) when text pasted into
a text field and submitted as part of a form. IE 7 URL encodeds the text like
%u2020, and UDecoder fails the isHexDigit test on the "u" character. Java's
URLdecode class also stack dumps on this...

A work-around would be appreciated.

The stack dump follows:
May 22, 2008 11:23:41 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: May 22, 2008 11:23:41 PM org.apache.tomcat.util.http.Parameters
processParameters WARNING: Parameters: Character decoding failed. Parameter
skipped. java.io.CharConversionException: isHexDigit at
org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88) at
org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49) at
org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:412) at
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:394)
at
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:346)
at org.apache.catalina.connector.Request.parseParameters(Request.java:2491) at
org.apache.catalina.connector.Request.getParameter(Request.java:1040) at
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)
at javarex.beans.servlet.util.HttpServlet.doPost(HttpServlet.java:386) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
javarex.beans.servlet.ServletApplication.service(ServletApplication.java:141)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at
java.lang.Thread.run(Unknown Source)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message