r60729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60728‎ | r60729 | r60730 >
Date:13:45, 6 January 2010
Author:reedy
Status:ok
Tags:
Comment:
* (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS

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
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiLogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiLogin.php
@@ -92,30 +92,39 @@
9393 case LoginForm :: NO_NAME :
9494 $result['result'] = 'NoName';
9595 break;
 96+
9697 case LoginForm :: ILLEGAL :
9798 $result['result'] = 'Illegal';
9899 break;
 100+
99101 case LoginForm :: WRONG_PLUGIN_PASS :
100102 $result['result'] = 'WrongPluginPass';
101103 break;
 104+
102105 case LoginForm :: NOT_EXISTS :
103106 $result['result'] = 'NotExists';
104107 break;
 108+
 109+ 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;"
105110 case LoginForm :: WRONG_PASS :
106111 $result['result'] = 'WrongPass';
107112 break;
 113+
108114 case LoginForm :: EMPTY_PASS :
109115 $result['result'] = 'EmptyPass';
110116 break;
 117+
111118 case LoginForm :: CREATE_BLOCKED :
112119 $result['result'] = 'CreateBlocked';
113120 $result['details'] = 'Your IP address is blocked from account creation';
114121 break;
 122+
115123 case LoginForm :: THROTTLED :
116124 global $wgPasswordAttemptThrottle;
117125 $result['result'] = 'Throttled';
118126 $result['wait'] = intval($wgPasswordAttemptThrottle['seconds']);
119127 break;
 128+
120129 default :
121130 ApiBase :: dieDebug(__METHOD__, "Unhandled case value: {$authRes}");
122131 }
Index: trunk/phase3/RELEASE-NOTES
@@ -755,6 +755,7 @@
756756 * (bug 21945) Add chomp control in YAML
757757 * Expand the thumburl to an absolute url to make it consistent with url and
758758 descriptionurl
 759+* (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
759760
760761 === Languages updated in 1.16 ===
761762

Status & tagging log