From: Aryeh Gregor Date: Thu, 3 Jun 2010 17:31:14 +0000 (+0000) Subject: Password not always required on account creation X-Git-Tag: 1.31.0-rc.0~36627 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=279172d5f95f7ca1ffd674aa27abd8332c25954b;p=lhc%2Fweb%2Fwiklou.git Password not always required on account creation Bug 23769. It's not required when the account is being created by e-mail, regardless of $wgMinimalPasswordLength. This commit technically does nothing, given r67283, but it will keep the bug fixed even in the future when r67283 can be reverted. --- diff --git a/includes/User.php b/includes/User.php index 941f0bdca1..aa48403fad 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3714,6 +3714,10 @@ class User { * * Obviously, you still need to do server-side checking. * + * NOTE: A combination of bugs in various browsers means that this function + * actually just returns array() unconditionally at the moment. May as + * well keep it around for when the browser bugs get fixed, though. + * * @return array Array of HTML attributes suitable for feeding to * Html::element(), directly or indirectly. (Don't feed to Xml::*()! * That will potentially output invalid XHTML 1.0 Transitional, and will @@ -3728,7 +3732,14 @@ class User { # Note that the pattern requirement will always be satisfied if the # input is empty, so we need required in all cases. - $ret = array( 'required' ); + # + # FIXME (bug 23769): This needs to not claim the password is required + # if e-mail confirmation is being used. Since HTML5 input validation + # is b0rked anyway in some browsers, just return nothing. When it's + # re-enabled, fix this code to not output required for e-mail + # registration. + #$ret = array( 'required' ); + $ret = array(); # We can't actually do this right now, because Opera 9.6 will print out # the entered password visibly in its error message! When other