r43642 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43641‎ | r43642 | r43643 >
Date:21:49, 17 November 2008
Author:harddisk
Status:reverted (Comments)
Tags:
Comment:
Added $wgLoginAutocomplete to let wiki owner disable password autocompletion in Special:Userlogin by setting it to false. Defaults to true.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/templates/Userlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -484,6 +484,12 @@
485485 $wgPasswordSender = 'MediaWiki Mail <apache@' . $wgServerName . '>';
486486
487487 /**
 488+ * Determines if password autocompletion should be enabled in Special:Userlogin
 489+ * Defaults to true. If false, autocomplete="off" will be injected in the form tag.
 490+ */
 491+$wgLoginAutocomplete = true;
 492+
 493+/**
488494 * dummy address which should be accepted during mail send action
489495 * It might be necessay to adapt the address or to set it equal
490496 * to the $wgEmergencyContact address
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -791,6 +791,7 @@
792792 global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail;
793793 global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector;
794794 global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
 795+ global $wgLoginAutocomplete;
795796
796797 $titleObj = SpecialPage::getTitleFor( 'Userlogin' );
797798
@@ -870,7 +871,8 @@
871872 $template->set( 'canreset', $wgAuth->allowPasswordChange() );
872873 $template->set( 'canremember', ( $wgCookieExpiration > 0 ) );
873874 $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember );
874 -
 875+ $template->set( 'autocomplete', $wgLoginAutocomplete );
 876+
875877 # Prepare language selection links as needed
876878 if( $wgLoginLanguageSelector ) {
877879 $template->set( 'languages', $this->makeLanguageSelector() );
Index: trunk/phase3/includes/templates/Userlogin.php
@@ -25,7 +25,7 @@
2626
2727 <div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
2828 <div id="userloginForm">
29 -<form name="userlogin" method="post" action="<?php $this->text('action') ?>">
 29+<form name="userlogin" method="post" action="<?php $this->text('action') ?>" <?PHP if( !$this->data['autocomplete'] ) echo 'autocomplete="off"'; ?>>
3030 <h2><?php $this->msg('login') ?></h2>
3131 <p id="userloginlink"><?php $this->html('link') ?></p>
3232 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
Index: trunk/phase3/RELEASE-NOTES
@@ -63,6 +63,8 @@
6464 * Image namespace and accompanying talk namespace renamed to File. For backward
6565 compatibility purposes, Image still works. External tools may need to be
6666 updated.
 67+* Added $wgLoginAutocomplete to let wiki owner disable password autocompletion
 68+ in Special:Userlogin by setting it to false. Defaults to true.
6769
6870 === Migrated extensions ===
6971 The following extensions are migrated into MediaWiki 1.14:

Follow-up revisions

RevisionCommit summaryAuthorDate
r43645Reverting r43642 "Added $wgLoginAutocomplete to let wiki owner disable passwo...brion22:09, 17 November 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   22:09, 17 November 2008

There's not a compelling reason to make it hard for users to manage their own affairs here. Reverted in r43645.

#Comment by Simetrical (talk | contribs)   22:39, 17 November 2008

There is if you're, say, a bank, or the CIA. Wikis can be locked-down and potentially have high security requirements.

Status & tagging log