From 7fe1745a3e92d1976eeba6f92bebe764961e7f80 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 3 Jun 2025 08:57:21 +0200 Subject: [PATCH] Use a password field for passwords, not plain text --- pgmailmgr/mailmgr/forms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgmailmgr/mailmgr/forms.py b/pgmailmgr/mailmgr/forms.py index 6804774..0197e15 100644 --- a/pgmailmgr/mailmgr/forms.py +++ b/pgmailmgr/mailmgr/forms.py @@ -60,6 +60,9 @@ class VirtualUserForm(forms.ModelForm): super(VirtualUserForm, self).__init__(data=data, instance=instance) self.user = user + self.fields['passwd'].widget = forms.PasswordInput() + self.fields['passwd'].widget.attrs['autocomplete'] = 'new-password' + self.fields['account'] = forms.CharField(max_length=200, widget=AccountEmailWidget(instance.account), required=False) if not user.is_superuser: -- 2.39.5