Announcement Announcement Module
Collapse
No announcement yet.
Wrong Password when using none Unicode-Signs Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wrong Password when using none Unicode-Signs

    Hi,

    I'm using the acegi implementation of Appfuse, but I have a problem when the user has an password with an none unicode sign in it.

    e.g. when he is typing a german ,,.

    The credentials of the UsernamePasswordAuthenticationToken has the wrong content.
    When the password is the german word "Mrz". The content of the credentials is März06.

    I'm trying to authenticate agains an LDAP System. It works well, but in this case i get a BadCredentialsException.

    How can I solve this problem? Im tried to set the "accept-charset" value in the html form, but it didn't help. Is this a Bug inside the authenticationProcessingFilter?

    Thanks!

    Sebastian Balz

  • #2
    Having the same problem

    Does anyone have a resolution for this? We're having the same problem, although we're not using Appfuse.

    Comment


    • #3
      Resolved

      This issue had nothing to do with Acegi, the problem was in the request character encoding. We added a filter in web.xml that forces the character encoding of the request to UTF-8, and a corresponding <filter-mapping> before Acegi FilterToBeanProxy with the url-pattern 'j_acegi_security_check'. After this, the password gets decoded correctly when Acegi calls request.getParameter(..).

      Comment


      • #4
        Originally posted by plaurone View Post
        This issue had nothing to do with Acegi, the problem was in the request character encoding. We added a filter in web.xml that forces the character encoding of the request to UTF-8, and a corresponding <filter-mapping> before Acegi FilterToBeanProxy with the url-pattern 'j_acegi_security_check'. After this, the password gets decoded correctly when Acegi calls request.getParameter(..).
        We seem to have a very similar problem. We have it with either a login with non-ascii characters or a password with non-ascii characters. We're using utf-8 throughout the application. And so I did as you suggest but it doesn't seem to work:
        Code:
            <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                        /WEB-INF/applicationContext*.xml;
                </param-value>
            </context-param>
                
            <filter>
                <filter-name>charsetFilter</filter-name>
                <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
                <init-param>
                    <param-name>encoding</param-name>
                    <param-value>UTF-8</param-value>
                </init-param>
                <init-param>
                    <param-name>forceEncoding</param-name>
                    <param-value>true</param-value>
                </init-param>
            </filter>
        
            <filter-mapping>
                <filter-name>charsetFilter</filter-name>
                <url-pattern>/*</url-pattern>
            </filter-mapping>
            
            <filter>
                <filter-name>Acegi Filter Chain Proxy</filter-name>
                    <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
                <init-param>
                    <param-name>targetClass</param-name>
                    <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
                </init-param>
            </filter>
            
            <filter-mapping>
                <filter-name>Acegi Filter Chain Proxy</filter-name>
                <url-pattern>/*</url-pattern>
            </filter-mapping>
        I'm probably missing something

        Comment

        Working...
        X