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/05/01 15:52:00 UTC
[jira] [Commented] (WICKET-6660) PasswordTextField should not be
trimmed
[ https://issues.apache.org/jira/browse/WICKET-6660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16831080#comment-16831080 ]
Dennis Lotz commented on WICKET-6660:
-------------------------------------
Yes you are right, passwords also get trimmed in Wicket 6.x. I can not reproduce the problem I had. During debugging I just noticed that the password gets trimmed in Wicket 8.40 so I assumed that is a bug and didn't double check with Wicket 6.x. Sorry that was my bad.
> 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)