mediawiki: Check if admin password is at least 10 characters long

Sunil: Current passwords policies as of MediaWiki 1.35.6 do not require capital
letter and numeral. Add comment that the password can't be common one.

Tests:

- Set the admin password to 'testingtesting'. Update should be successful.

[sunil: Fix typos]
[sunil: Drop checking for capital letter and numeral in password]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Benedek Nagy 2022-03-20 18:57:49 +00:00 committed by James Valleroy
parent 7e761c91ea
commit 8875bc32ae
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -51,8 +51,10 @@ class MediaWikiForm(forms.Form): # pylint: disable=W0232
password = forms.CharField(
label=_('Administrator Password'), help_text=_(
'Set a new password for MediaWiki\'s administrator account '
'(admin). Leave this field blank to keep the current password.'),
required=False, widget=forms.PasswordInput)
'(admin). The password cannot be a common one and the minimum '
'required length is <strong>10 characters</strong>. '
'Leave this field blank to keep the current password.'),
required=False, widget=forms.PasswordInput, min_length=10)
server_url = forms.CharField(
label=_('Server URL'), required=False, help_text=_(