Enforce $wgMinimalPasswordLength client-side
authorAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 23 Aug 2009 03:33:11 +0000 (03:33 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 23 Aug 2009 03:33:11 +0000 (03:33 +0000)
commitd7f090bb12f4db3b929351d05d1e5c5d1e5bcbd8
treeeaf26474007639234fb169ce9cf0922f7d6ed131
parentcdbd969dcb2f10fee77340558c5fe3966e3b8637
Enforce $wgMinimalPasswordLength client-side

. . . except not really.  It works fine on Opera 9.6, except for the
slight detail that if you enter a password that's too short, Opera will
helpfully repeat your password back to you un-*ed when telling you it's
too short.  Same in Opera 10.00 Beta 3.  So the code is commented out,
and there are no functional changes.  We'll need UA sniffing when the
code is uncommented.  But I already wrote it, so may as well commit it
for future use.

This recycles the "passwordtooshort" message to provide the client-side
error message, using the title attribute on the input.  Since the title
attribute might be displayed when the user hasn't actually entered an
invalid password, I've reworded it to not imply the user actually
entered an incorrect password, so it just states the requirement.  (This
accords with the advice given in the HTML 5 spec.)  I didn't make up a
new message name for that, because it's not a big deal if translations
do imply that the password is wrong, since that should theoretically be
the most common case anyway.
includes/User.php
includes/specials/SpecialResetpass.php
includes/templates/Userlogin.php
languages/messages/MessagesEn.php