-
1. Re: can't login with Arabic password using JAAS in JBoss AS
sfcoy Jul 25, 2012 4:04 AM (in response to romyo0o)Have you taken steps to ensure that your webapp requests/responses are encoded in UTF-8?
We use a servlet filter for this purpose.
-
2. Re: can't login with Arabic password using JAAS in JBoss AS
romyo0o Jul 25, 2012 5:25 AM (in response to sfcoy)Thanks,
I added a filter and nothing work, the j_secutiry_check request doesn't pass on the filter
-
3. Re: can't login with Arabic password using JAAS in JBoss AS
romyo0o Jul 25, 2012 5:37 AM (in response to sfcoy)I added the request post method snapshot
-
4. Re: can't login with Arabic password using JAAS in JBoss AS
sfcoy Jul 25, 2012 7:50 AM (in response to romyo0o)I was afraid that might happen. Servlet filters seem to work for j_security_check on some app servers and not others.
In any event, you might try adding the following to your login form (assuming it's a JSP):
{code:xml}<%@ page contentType="text/html; charset=UTF-8" %>
...
<%
request.setCharacterEncoding("UTF-8");
%>
...{code}
-
5. Re: can't login with Arabic password using JAAS in JBoss AS
romyo0o Jul 26, 2012 3:42 AM (in response to sfcoy)Thanks Stephen,
but the same issue and the same request snapshot as above, the password in the request in UTF-8 format
already my form accept utf-8:
<form action="<%= response.encodeURL( "j_security_check" ) %>" method="post" accept-charset="UTF-8">
I think the problem now is not in the encoding of the request ?
-
6. Re: can't login with Arabic password using JAAS in JBoss AS
sfcoy Jul 26, 2012 10:49 AM (in response to romyo0o)Sorry, it's the response encoding that we really need to be concerned about. The above was an attempt to encourage the browser to respond in UTF-8. Using accept-charset is a better idea.
At this point I'd be loading up the source code for your version of JBoss and debugging it.
-
7. Re: can't login with Arabic password using JAAS in JBoss AS
romyo0o Aug 1, 2012 10:15 AM (in response to sfcoy)Thanks
Hope any feed back
-
8. Re: can't login with Arabic password using JAAS in JBoss AS
romyo0o Sep 17, 2012 5:05 AM (in response to romyo0o)I didn't find a solution till now, so I did a workaround to ignored arabic passwords.
-
9. Re: can't login with Arabic password using JAAS in JBoss AS
danpeter Oct 25, 2012 3:47 AM (in response to romyo0o)Maybe this is similar to my issue:
http://stackoverflow.com/questions/12676336/jaas-autentication-fails-on-jboss-as-7 -
10. Re: can't login with Arabic password using JAAS in JBoss AS
ybxiang.china Aug 9, 2013 1:28 AM (in response to danpeter)Answer in http://stackoverflow.com/questions/12676336/jaas-autentication-fails-on-jboss-as-7 works well in jboss as 7.2.0
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>MySecurityDomain</security-domain>
<valve>
<class-name>org.apache.catalina.authenticator.FormAuthenticator</class-name>
<param>
<param-name>characterEncoding</param-name>
<param-value>UTF-8</param-value>
</param>
</valve>
</jboss-web>