Mantis - Resin
Viewing Issue Advanced Details
4183 minor always 08-19-10 15:18 01-13-11 15:12
cjohn  
ferg  
normal  
closed 3.1.6  
fixed  
none    
none 4.0.15  
0004183: Issue Parsing Querystring when it contains the url endcoded string '%A3'
We've come into an issue with the parsing of query string parameters and pinned it down to the handling of the encoded pound symbol '%A3'.

It looks like an IOException is being caught and logged, and any parameters after this are ignored.

The issue can be replicated by passing in the following string as a query to com.caucho.server.connection.Form.parseQueryString(..)

query = "cost=%a39.99"
We're passing in UTF8 as the javaEncoding.

The exact error is happing around line 91 in Form.java

String value = converter.getConvertedString();

This goes into com.caucho.vfs.ByteToChar.getConvertedString() where the error is thrown when flush() is called.

Notes
(0004731)
cjohn   
08-23-10 11:23   
Based on feedback, '%A3' is not valid UTF-8 encoding.

However, can the handling of the exception be done differently to allow the remaining valid characters to get parsed correctly?

E.g. "cost=%a39.99&storeId=12" would still parse the storeId.

Many thanks,

Chris
(0004929)
ferg   
01-13-11 15:12   
server/004a

Parsing to the invalid character (%xfffd)