[ 
https://issues.apache.org/jira/browse/WICKET-6660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16829663#comment-16829663
 ] 

Sven Meier commented on WICKET-6660:
------------------------------------

I've just tried with Wicket 6.x and the entered password *was* trimmed.
If you think this is a regression, please create a quickstart that works fine 
with Wicket 6.x

> PasswordTextField should not be trimmed
> ---------------------------------------
>
>                 Key: WICKET-6660
>                 URL: https://issues.apache.org/jira/browse/WICKET-6660
>             Project: Wicket
>          Issue Type: Wish
>    Affects Versions: 8.4.0
>            Reporter: Dennis Lotz
>            Priority: Minor
>
> 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