You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dennis Lotz (JIRA)" <ji...@apache.org> on 2019/04/29 14:52:00 UTC

[jira] [Created] (WICKET-6660) PasswordTextField should not be trimmed

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)