[
https://issues.apache.org/jira/browse/TOMEE-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved TOMEE-1470.
------------------------------------
Resolution: Auto Closed
Hi there!
We wanted to reach out and let you know that we're currently working on
cleaning up open issues in Jira that specifically impact unsupported versions,
including 1.7.x, 7.0.x, and 7.1.x.
If you had previously reported this issue on one of these unsupported versions,
we kindly ask you to check if the problem still persists and can be reproduced
on a supported version such as 8.0.x or 9.0.x. If you find that it is indeed
reproducible on a supported version, you're more than welcome to re-open this
issue.
Thanks!
> Login not successful due to encoding problem using login-config auth-method
> FORM
> --------------------------------------------------------------------------------
>
> Key: TOMEE-1470
> URL: https://issues.apache.org/jira/browse/TOMEE-1470
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 1.7.1
> Environment: CentOS
> Reporter: Marco Bellavia
> Priority: Major
>
> Our ear application comes with an authentication configuration in web.xml as
> follows:
> ...
> <login-config>
> <auth-method>FORM</auth-method>
> <realm-name>jdbc-realm</realm-name>
> <form-login-config>
> <form-login-page>login.jsp</form-login-page>
> <form-error-page>error.jsp</form-error-page>
> </form-login-config>
> </login-config>
> ...
> We noticed that the authentification with a password containing special
> characters (for example umlauts) fails with our TomEE instance running on
> CentOS Linux (while on Windows the problem does not occur).
> Our application was previously deployed on a Glassfish 3.1, where we were not
> experiencing the phenomen just described. There we could configure the
> default charset using the directive <parameter-encoding
> default-charset="UTF-8"/> in sun-web.xml.
> All other encoding configurations are set to UTF-8.
> We notice the following while debugging under TomEE: calling the method
> getCharacterEncoding() on the ServletRequest returns NULL, which implies that
> TomEE takes as default ISO-8859-1 on CentOS.
> As recommended here: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q3
> we set a character encoding filter. On TomEE the recommended solution doesn't
> seem to be working. A SetCharacterEncodingFilter was placed as first in the
> chain setting the encoding to UTF-8.
> We assume that setting the encoding of the request on a TomEE - as the filter
> does - happens too late.
> As workaround we implemented a customized jdbc-realm class, where we convert
> the encoding to UTF-8 by:
> public Principal authenticate(final String username, final String
> credentials) {
> ...
>
> final String utf8EncodedCredentials = new
> String(credentials.getBytes("ISO-8859-1"),"UTF-8");
>
> ...
> }
> We would welcome a general solution.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)