r97443 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97442‎ | r97443 | r97444 >
Date:22:04, 18 September 2011
Author:laner
Status:ok
Tags:
Comment:
Adding check for PHP bug 55439
Modified paths:
  • /trunk/extensions/LdapAuthentication/LdapAuthentication.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php
@@ -1746,6 +1746,10 @@
17471747 // Set the password hashing based upon admin preference
17481748 switch ( $hashtouse ) {
17491749 case 'crypt':
 1750+ // https://bugs.php.net/bug.php?id=55439
 1751+ if ( crypt( 'password', '$1$U7AjYB.O$' ) == '$1$U7AjYB.O' ) {
 1752+ die( 'The version of PHP in use has a broken crypt function. Please upgrade your installation of PHP, or use another encryption function for LDAP.' );
 1753+ }
17501754 $pass = '{CRYPT}' . crypt( $password );
17511755 break;
17521756 case 'clear':

Status & tagging log