Changeset 18890


Ignore:
Timestamp:
Nov 2, 2012, 3:39:01 PM (8 years ago)
Author:
plg
Message:

feature 2727: improved backward compatibility with pass_convert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_user.inc.php

    r18889 r18890  
    11341134  global $conf, $pwg_hasher;
    11351135
    1136   // If the hash is still md5...
    1137   if (strlen($hash) <= 32)
    1138   {
    1139     $check = ($hash == md5($password));
     1136  // If the password has not been hashed with the current algorithm.
     1137  if (strpos('$P', $hash) !== 0)
     1138  {
     1139    if (!empty($conf['pass_convert']))
     1140    {
     1141      $check = ($hash == $conf['pass_convert']($password));
     1142    }
     1143    else
     1144    {
     1145      $check = ($hash == md5($password));
     1146    }
    11401147   
    11411148    if ($check and isset($user_id) and !$conf['external_authentification'])
Note: See TracChangeset for help on using the changeset viewer.