r45485 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45484‎ | r45485 | r45486 >
Date:03:54, 7 January 2009
Author:brion
Status:ok
Tags:
Comment:
Revert r45450, r45451 "(bug 2242) Introduce expiry time for temporary passwords."

<b>Notice</b>: Undefined variable: wgNewPasswordExpiry in <b>/Library/WebServer/Documents/trunk/includes/User.php</b> on line <b>2710</b><br />
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -2705,13 +2705,7 @@
27062706 * @return \bool True if matches, false otherwise
27072707 */
27082708 function checkTemporaryPassword( $plaintext ) {
2709 - if( self::comparePasswords( $this->mNewpassword, $plaintext, $this->getId() ) ) {
2710 - $this->load();
2711 - $expiry = wfTimestamp( TS_UNIX, $this->mNewpassTime ) + $wgNewPasswordExpiry;
2712 - return ( time() < $expiry );
2713 - } else {
2714 - return false;
2715 - }
 2709+ return self::comparePasswords( $this->mNewpassword, $plaintext, $this->getId() );
27162710 }
27172711
27182712 /**
Index: trunk/phase3/includes/DefaultSettings.php
@@ -521,11 +521,6 @@
522522 $wgPasswordReminderResendTime = 24;
523523
524524 /**
525 - * The time, in seconds, when an emailed temporary password expires.
526 - */
527 -$wgNewPasswordExpiry = 3600 * 24 * 7;
528 -
529 -/**
530525 * SMTP Mode
531526 * For using a direct (authenticated) SMTP server connection.
532527 * Default to false or fill an array :
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -654,7 +654,7 @@
655655 * @private
656656 */
657657 function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
658 - global $wgServer, $wgScript, $wgUser, $wgNewPasswordExpiry;
 658+ global $wgServer, $wgScript, $wgUser;
659659
660660 if ( '' == $u->getEmail() ) {
661661 return new WikiError( wfMsg( 'noemail', $u->getName() ) );
@@ -670,8 +670,7 @@
671671 $u->setNewpassword( $np, $throttle );
672672 $u->saveSettings();
673673
674 - $m = wfMsgExt( $emailText, array( 'parsemag' ), $ip, $u->getName(), $np,
675 - $wgServer . $wgScript, round( $wgNewPasswordExpiry / 86400 ) );
 674+ $m = wfMsg( $emailText, $ip, $u->getName(), $np, $wgServer . $wgScript );
676675 $result = $u->sendMail( wfMsg( $emailTitle ), $m );
677676
678677 return $result;
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -937,7 +937,6 @@
938938 password for {{SITENAME}} ($4). A temporary password for user
939939 "$2" has been created and was set to "$3". If this was your
940940 intent, you will need to log in and choose a new password now.
941 -Your temporary password will expire in {{PLURAL:$5|one day|$5 days}}.
942941
943942 If someone else made this request, or if you have remembered your password,
944943 and you no longer wish to change it, you may ignore this message and
Index: trunk/phase3/RELEASE-NOTES
@@ -71,9 +71,8 @@
7272 * The 'BeforeWatchlist' hook has been removed due to internal changes in
7373 Special:Watchlist. 'SpecialWatchlistQuery' should now be used by extensions
7474 to customize the watchlist database query.
75 -* Added $wgNewPasswordExpiry, to specify an expiry time (in seconds) to
76 - tempoary passwords
7775
 76+
7877 === Migrated extensions ===
7978 The following extensions are migrated into MediaWiki 1.14:
8079
@@ -258,7 +257,6 @@
259258 move log
260259 * Image moving is now enabled for sysops by default
261260 * Make "Did you mean" search feature more noticeable
262 -* (bug 2242) Add an expiry time to temporary passwords
263261 * (bug 16720) Transcluded Special:NewPages processes "/username="
264262
265263 === Bug fixes in 1.14 ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r45503Re-fix bug 2242 - adding expiry time for temporary passwords. Now with proper...demon14:34, 7 January 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45450(bug 2242) Introduce expiry time for temporary passwords.demon16:21, 6 January 2009
r45451Use wfMsgExt() with parsemag, so {{PLURAL}} will work.demon18:15, 6 January 2009

Status & tagging log