by the page, but $wgAllowUserJs is set to false.
* Pure "Skin" class based custom skins are no longer supported, all custom skins
should be put together using SkinTemplate and BaseTemplate or QuickTemplate.
+* The transliteration for passwords in case they were migrated from an old Latin-1
+ install (previous to MediaWiki 1.5) is now only done for wikis with
+ $wgLegacyEncoding set.
=== New features in 1.18 ===
* Added a special page, disabled by default, that allows users with the
* @return Boolean: True if the given password is correct, otherwise False.
*/
function checkPassword( $password ) {
- global $wgAuth;
+ global $wgAuth, $wgLegacyEncoding;
$this->load();
// Even though we stop people from creating passwords that
}
if ( self::comparePasswords( $this->mPassword, $password, $this->mId ) ) {
return true;
- } elseif ( function_exists( 'iconv' ) ) {
+ } elseif ( $wgLegacyEncoding ) {
# Some wikis were converted from ISO 8859-1 to UTF-8, the passwords can't be converted
# Check for this with iconv
$cp1252Password = iconv( 'UTF-8', 'WINDOWS-1252//TRANSLIT', $password );
- if ( self::comparePasswords( $this->mPassword, $cp1252Password, $this->mId ) ) {
+ if ( $cp1252Password != $password &&
+ self::comparePasswords( $this->mPassword, $cp1252Password, $this->mId ) )
+ {
return true;
}
}