* (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
authorSam Reed <reedy@users.mediawiki.org>
Wed, 6 Jan 2010 13:45:06 +0000 (13:45 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 6 Jan 2010 13:45:06 +0000 (13:45 +0000)
As per Bryans comment, and as per SpecialUserlogin - "The e-mailed temporary password should not be used for actual logins;"

Therefore treat RESET_PASS as WRONG_PASS

RELEASE-NOTES
includes/api/ApiLogin.php

index 332d23a..87b87fa 100644 (file)
@@ -755,6 +755,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 21945) Add chomp control in YAML
 * Expand the thumburl to an absolute url to make it consistent with url and 
   descriptionurl 
+* (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
 
 === Languages updated in 1.16 ===
 
index 66ff8df..6cde44a 100644 (file)
@@ -92,30 +92,39 @@ class ApiLogin extends ApiBase {
                        case LoginForm :: NO_NAME :
                                $result['result'] = 'NoName';
                                break;
+
                        case LoginForm :: ILLEGAL :
                                $result['result'] = 'Illegal';
                                break;
+
                        case LoginForm :: WRONG_PLUGIN_PASS :
                                $result['result'] = 'WrongPluginPass';
                                break;
+
                        case LoginForm :: NOT_EXISTS :
                                $result['result'] = 'NotExists';
                                break;
+       
+                       case LoginForm :: RESET_PASS : //bug 20223 - Treat a temporary password as wrong. Per SpecialUserLogin - "The e-mailed temporary password should not be used for actual logins;"
                        case LoginForm :: WRONG_PASS :
                                $result['result'] = 'WrongPass';
                                break;
+
                        case LoginForm :: EMPTY_PASS :
                                $result['result'] = 'EmptyPass';
                                break;
+
                        case LoginForm :: CREATE_BLOCKED :
                                $result['result'] = 'CreateBlocked';
                                $result['details'] = 'Your IP address is blocked from account creation';
                                break;
+
                        case LoginForm :: THROTTLED :
                                global $wgPasswordAttemptThrottle;
                                $result['result'] = 'Throttled';
                                $result['wait'] = intval($wgPasswordAttemptThrottle['seconds']);
                                break;
+
                        default :
                                ApiBase :: dieDebug(__METHOD__, "Unhandled case value: {$authRes}");
                }