Dennis Lotz created WICKET-6660:
-----------------------------------

             Summary: PasswordTextField should not be trimmed
                 Key: WICKET-6660
                 URL: https://issues.apache.org/jira/browse/WICKET-6660
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 8.4.0
            Reporter: Dennis Lotz


Because {{PasswordTextField}} is a {{FormComponent}} and {{shouldTrimInput()}} 
is not overridden, passwords do get trimmed. Workaround is to override the 
method manually for every {{PasswordTextField. }}

{code:java}
new PasswordTextField("password"){
        @Override
        protected boolean shouldTrimInput() {
                return false;
        }
}
{code}

If you use {{org.apache.wicket.authroles.authentication.panel.SignInPanel}} 
this gets very verbose :(

{code:java}
add(new SignInPanel("signInPanel") {
        @Override
        protected void onInitialize() {
                super.onInitialize();
                super.getForm().replace(new PasswordTextField("password"){
                        @Override
                        protected boolean shouldTrimInput() {
                                return false;
                        }
                });
        }
});
{code}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to