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 authored and James Valleroy committed 2022-05-09 21:44:32 -04:00
1 parent 7e761c91ea
commit 8875bc32ae
1 file changed
+4 -2
+4 -2
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=_(