Index: trunk/phase3/includes/User.php |
— | — | @@ -2794,7 +2794,7 @@ |
2795 | 2795 | * @return Boolean: True if the given password is correct, otherwise False. |
2796 | 2796 | */ |
2797 | 2797 | function checkPassword( $password ) { |
2798 | | - global $wgAuth; |
| 2798 | + global $wgAuth, $wgLegacyEncoding; |
2799 | 2799 | $this->load(); |
2800 | 2800 | |
2801 | 2801 | // Even though we stop people from creating passwords that |
— | — | @@ -2817,11 +2817,13 @@ |
2818 | 2818 | } |
2819 | 2819 | if ( self::comparePasswords( $this->mPassword, $password, $this->mId ) ) { |
2820 | 2820 | return true; |
2821 | | - } elseif ( function_exists( 'iconv' ) ) { |
| 2821 | + } elseif ( $wgLegacyEncoding ) { |
2822 | 2822 | # Some wikis were converted from ISO 8859-1 to UTF-8, the passwords can't be converted |
2823 | 2823 | # Check for this with iconv |
2824 | 2824 | $cp1252Password = iconv( 'UTF-8', 'WINDOWS-1252//TRANSLIT', $password ); |
2825 | | - if ( self::comparePasswords( $this->mPassword, $cp1252Password, $this->mId ) ) { |
| 2825 | + if ( $cp1252Password != $password && |
| 2826 | + self::comparePasswords( $this->mPassword, $cp1252Password, $this->mId ) ) |
| 2827 | + { |
2826 | 2828 | return true; |
2827 | 2829 | } |
2828 | 2830 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -42,6 +42,9 @@ |
43 | 43 | by the page, but $wgAllowUserJs is set to false. |
44 | 44 | * Pure "Skin" class based custom skins are no longer supported, all custom skins |
45 | 45 | should be put together using SkinTemplate and BaseTemplate or QuickTemplate. |
| 46 | +* The transliteration for passwords in case they were migrated from an old Latin-1 |
| 47 | + install (previous to MediaWiki 1.5) is now only done for wikis with |
| 48 | + $wgLegacyEncoding set. |
46 | 49 | |
47 | 50 | === New features in 1.18 === |
48 | 51 | * Added a special page, disabled by default, that allows users with the |