tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Encoding problem during authentication
Date Wed, 11 May 2005 21:40:40 GMT
I have just committed a fix for this.

Mark

Andrey Grebnev wrote:
> Hello,
> 
>   I suppose I found the problem with Tomcat. I have already
> write about it into tomcat-user mailting list but I did not
> get feedback.
> 
>   I have a problem under following environment:
>    - Windows XP SP2
>    - JDK 1.4.2_04
>    - Tomcat 5.5.9
>    - Struts 1.2.4
> 
>   I use characterEncodingFilter to setup UTF-8 encoding
> into request before
>   using the content of the request. When I submit form with
> POST
>   method it works well. I use FORM based authentication.
> 
>   However if I perform the following steps I have the
> problems with
>   encoding:
> 
>   1. Open JSP with HTML form which submit some UTF-8 string
> data using POST
>   method.
>   2. Waiting when the HTTP session is invalidated (session
> timeout).
>   3. Submit the form.
>   4. Because session is invalidated I need to
> re-authenticate myself.
>   5. After success authentication The processing of the
> original request is
>   continued.
>   6. The data of the form (from first step) is saved in
> incorrect
>   encoding.
> 
>   I suppose that Valve (FormAuthenticator) which
> responsible for authentication is
>   processed earlier then characterEncodingFilter and the
> parameters from
>   POST request are parsed using
>   DEFAULT_CHARACTER_ENCODING="ISO-8859-1" when the original
> request
>   information is saved into session.
> 
>   I have tried to specify
> enctype="application/x-www-form-urlencoded;
>   charset=utf-8" attribute for my FORM tag. But e.g.
> Mozilla browser
>   specify only Content-Type:
> application/x-www-form-urlencoded header
>   and cut out specified charset.
> 
>   Any ideas?
> 
> --
> Best regards.
> Andrey Grebnev
> ----------------------------------------------------
> Треть суток на треть дешевле!
> МАРК-ИТТ ввёл льготные цены на ночной трафик в
Народном Интернете
> цены на трафик на 30% ниже дневных в период с 1:00 до
9:00.
> 600-й - 1.75р, Профессиональный - 1.89р, Деловой - 1.96р,
5-ка - 2,03р, Домашний - 2,10р
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message