Yifan (Eric) Jiang a écrit :
> Hi all,
>
> I am currently working in a project which requires to exporting user
> information from Mediawiki MySQL database to OpenLDAP directory (with
> Berkeley database). Everything is fine except the password issue. I am
> not sure what hash algorithm does Mediawiki use to hash user password,
> (But I guess it may be MD5). However, I can't get the same hash value by
> using OpenLDAP slappasswd with {MD5}, {SHA}, {SMD5}, {CRYPT} AND {SSHA}
> algorithms. Therefore I am wondering if any one has similar experience
> that can share with me. Any hints, tips would be much appreciated!
>
> Thanks
>
> Eric Jiang
Here it is :
in includes/GlobalFunctions.php :
function wfEncryptPassword( $userid, $password ) {
global $wgPasswordSalt;
$p = md5( $password);
if($wgPasswordSalt)
return md5( "{$userid}-{$p}" );
else
return $p;
}