Dotclear


Ignore:
Timestamp:
12/19/17 17:27:59 (8 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Use PHP 5.5+ new password functions, closes #2182

Warnings:

  • $core->auth->crypt($pwd) doesn't return twice the same result for a single $pwd, so if you need this old behaviour use the $core->auth->cryptLegacy($pwd) instead.
  • $core->auth->checkPassword($pwd) must be used with an uncrypted password string as argument.
  • if you need a unique UID/key, use http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->cryptLegacy($core->auth->userID())). (may be refined in future)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.moduleslist.php

    r3472 r3627  
    12531253               || !empty($_POST['fetch_pkg']) && !empty($_POST['pkg_url'])) 
    12541254          { 
    1255                if (empty($_POST['your_pwd']) || !$this->core->auth->checkPassword($this->core->auth->crypt($_POST['your_pwd']))) { 
     1255               if (empty($_POST['your_pwd']) || !$this->core->auth->checkPassword($_POST['your_pwd'])) { 
    12561256                    throw new Exception(__('Password verification failed')); 
    12571257               } 
     
    20332033                    || !empty($_POST['fetch_pkg']) && !empty($_POST['pkg_url'])) 
    20342034               { 
    2035                     if (empty($_POST['your_pwd']) || !$this->core->auth->checkPassword($this->core->auth->crypt($_POST['your_pwd']))) { 
     2035                    if (empty($_POST['your_pwd']) || !$this->core->auth->checkPassword($_POST['your_pwd'])) { 
    20362036                         throw new Exception(__('Password verification failed')); 
    20372037                    } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map