Changeset 18889 for trunk/profile.php


Ignore:
Timestamp:
Nov 2, 2012, 2:59:07 PM (11 years ago)
Author:
plg
Message:

feature 2727: improve password security with the use of PasswordHash class.
This class performs salt and multiple iterations. Already used in Wordpress,
Drupal, phpBB and many other web applications.

$confpass_convert is replaced by $confpassword_hash + $confpassword_verify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/profile.php

    r15578 r18889  
    178178      list($current_password) = pwg_db_fetch_row(pwg_query($query));
    179179
    180       if ($conf['pass_convert']($_POST['password']) != $current_password)
     180      if (!$conf['password_verify']($_POST['password'], $current_password))
    181181      {
    182182        $errors[] = l10n('Current password is wrong');
     
    203203      {
    204204        array_push($fields, $conf['user_fields']['password']);
    205         // password is encrpyted with function $conf['pass_convert']
    206         $data{$conf['user_fields']['password']} = $conf['pass_convert']($_POST['use_new_pwd']);
     205        // password is hashed with function $conf['password_hash']
     206        $data{$conf['user_fields']['password']} = $conf['password_hash']($_POST['use_new_pwd']);
    207207      }
    208208     
Note: See TracChangeset for help on using the changeset viewer.