Pages: 1 2 [3]
Print
Author Topic: More script questions  (Read 1815 times)
Support
Administrator
Jr. Member
*****
Posts: 93



« Reply #30 on: May 14, 2010, 09:10:40 PM »

Password encoding functions reside within admin/libraries/DX_Auth.php script.

The encoded password is saved in the database in the script admin/models/dx_auth/users.php.

In the change_password function place an echo statement to reveal the encoded password.:
Quote
   function change_password($user_id, $new_pass)
   {   echo "saved password: $new_pass<BR>";
      $this->db->set('password', $new_pass);
      $this->db->where('id', $user_id);
      return $this->db->update($this->_table);
   }

Change the password and see if the password in the lr_v32_users is the same or different the the echo.
Logged
flip
Newbie
*
Posts: 26


« Reply #31 on: May 15, 2010, 02:09:13 AM »

The encoded passwords ("search") are different:

- Saved password via echo: $2a$05$iGDqhJHCmlCCTH8bR.E3d.PzWYy4ZZqUgQgSZtr4obnDJHdXk6Kre
- Password stored in DB: $2a$05$iGDqhJHCmlCCTH8bR.E3d.PzWYy
Logged
Support
Administrator
Jr. Member
*****
Posts: 93



« Reply #32 on: May 15, 2010, 07:13:02 AM »

For some reason the password being generated is longer than the allotted space in lr_v32_users password field of 34 characters and the password is being truncated. Via phyMyAdmin increase the size of password varchar(34) to password varchar(100)

Or modify the admin/models/database_model.php and increase the size of the password field in

Quote
    // Table schema for lr_xxx_users 
    $this->tables[$this->lr_xxx . 'users'] = "
   CREATE TABLE IF NOT EXISTS " . $this->lr_xxx . "users (
     id int(11) NOT NULL auto_increment,
     role_id int(11) NOT NULL default '1',
     username varchar(25) NOT NULL,
     password varchar(100) NOT NULL,
     email varchar(100) NOT NULL,
     banned tinyint(1) NOT NULL default '0',
     ban_reason varchar(255) default NULL,
     newpass varchar(34) default NULL,
     newpass_key varchar(32) default NULL,
     newpass_time datetime default NULL,
     last_ip varchar(40) NOT NULL,
     last_login datetime NOT NULL default '0000-00-00 00:00:00',
     created datetime NOT NULL default '0000-00-00 00:00:00',
     modified timestamp NOT NULL,
     PRIMARY KEY  (id)
   ) TYPE=MyISAM


then re-create the table.
Logged
flip
Newbie
*
Posts: 26


« Reply #33 on: May 15, 2010, 06:02:31 PM »

Great. Now it's working. Hopefully it will be included in updates. I also noticed that the following image isn't shown in some cases in the header of the backend when I update the password but that's not critical:

/finder/warpcore/admin/views/picts/spacer.gif
Logged
Pages: 1 2 [3]
Print
Jump to: