Bug 46105 - URIEncoding doesn't affect after form-authentication redirect
Summary: URIEncoding doesn't affect after form-authentication redirect
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Connector:HTTP (show other bugs)
Version: 5.5.27
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-27 23:37 UTC by Maxim Kuleshov
Modified: 2009-06-03 14:13 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Kuleshov 2008-10-27 23:37:52 UTC
How to reproduce bug.

Configure tomcat connector with URIEncoding=UTF-8 attribute.
Make a simple page that write out any request parameter. Configure this page as protected with form-based authentication.
Try to access page, e.g.

/site/page.jsp?q=%xx%yy%zz%tt

where q=%xx%yy%zz is value in UTF-8 charset.

When page is being accessed for the first time, then after authentication, parameter "q" is incorrectly interpreted (it seems as it was in ISO8859-1 or anything else, but not UTF-8).

But subsequent access to the _same_ URI, i.e.
/site/page.jsp?q=%xx%yy%zz%tt

gives perfect result.

I also tried useBobyEncodingForURI=true and request.setCharacterEncoding("UTF-8") - nothing is changed.
Comment 1 Mark Thomas 2008-10-30 16:54:52 UTC
This has been fixed in trunk and proposed for 5.5.x and 6.0.x
Comment 2 Mark Thomas 2008-11-30 14:43:26 UTC
This has been fixed in 6.0.x and will be in 6.0.19 onwards.
Comment 3 Mark Thomas 2009-06-03 14:13:20 UTC
The patch has been applied to 5.5.x and will be included in 5.5.28 onwards.