Skip to:
Content

bbPress.org

Ticket #1928: phpBB-pass_arrayhash.diff

File phpBB-pass_arrayhash.diff, 1.0 KB (added by netweb, 9 years ago)
  • phpBB.php

    class phpBB extends BBP_Converter_Base { 
    435435  * @return bool Returns true if the password is correct, false if not.
    436436  */
    437437 public function authenticate_pass($password, $serialized_pass) {
     438    $password = md5($password);
    438439   $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
    439440   $pass_array = unserialize($serialized_pass);
    440    if (strlen($pass_array['hash']) == 34) {        
    441      return ($this->_hash_crypt_private($password, $pass_array['hash'], $itoa64) === $pass_array['hash']) ? true : false;
     441   if (strlen($pass_arrayhash?) == 34) {       
     442     return ($this->_hash_crypt_private($password, $pass_arrayhash?, $itoa64) === $pass_arrayhash?) ? true : false;
    442443   }
    443444 
    444    return (md5($password) === $pass_array['hash']) ? true : false;
     445   return (md5($password) === $pass_arrayhash?) ? true : false;
    445446 }
    446447 
    447448 /**