From 732b5fe161843389de061a066bce7137a36a5cf3 Mon Sep 17 00:00:00 2001 From: hoellen Date: Tue, 8 Jan 2019 19:29:34 +0100 Subject: [PATCH] change password field type in fetch creation/edit and add validators. --- CHANGELOG.md | 1 + core/admin/mailu/ui/forms.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac4c83af..34c976e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,7 @@ v1.6.0 - unreleased - Bug: Fix rainloop permissions ([#637](https://github.com/Mailu/Mailu/issues/637)) - Bug: Fix broken webmail and logo url in admin ([#792](https://github.com/Mailu/Mailu/issues/792)) - Bug: Don't recursivly chown on mailboxes ([#776](https://github.com/Mailu/Mailu/issues/776)) +- Bug: Fetched accounts: Password field is of type "text" ([#789](https://github.com/issues/789)) v1.5.1 - 2017-11-21 ------------------- diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py index 5ee6da7d..9967fefc 100644 --- a/core/admin/mailu/ui/forms.py +++ b/core/admin/mailu/ui/forms.py @@ -165,11 +165,11 @@ class FetchForm(flask_wtf.FlaskForm): protocol = fields.SelectField(_('Protocol'), choices=[ ('imap', 'IMAP'), ('pop3', 'POP3') ]) - host = fields.StringField(_('Hostname or IP')) - port = fields.IntegerField(_('TCP port')) + host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()]) + port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)]) tls = fields.BooleanField(_('Enable TLS')) - username = fields.StringField(_('Username')) - password = fields.StringField(_('Password')) + username = fields.StringField(_('Username'), [validators.DataRequired()]) + password = fields.PasswordField(_('Password'), [validators.DataRequired()]) keep = fields.BooleanField(_('Keep emails on the server')) submit = fields.SubmitField(_('Submit'))