AbanteCart Community

Shopping Cart Operations => Support => Topic started by: Palamedes on March 07, 2012, 03:13:51 PM

Title: Unable to log into second store with identical user settings
Post by: Palamedes on March 07, 2012, 03:13:51 PM
Code: [Select]
mysql> select * from store.users;
+---------+---------------+-----------+----------------------------------+-----------+----------+-----------------------+--------+----------------+---------------------+---------------------+
| user_id | user_group_id | username  | password                         | firstname | lastname | email                 | status | ip             | date_added          | last_login          |
+---------+---------------+-----------+----------------------------------+-----------+----------+-----------------------+--------+----------------+---------------------+---------------------+
|       1 |             1 | palamedes | 2f28fea59aa3979397385178ea4a0051 | aaaaa     | bbbbb    | aaaaa.bbbbb@yahoo.com |      1 | 172.179.21.203 | 2012-03-06 13:22:19 | 2012-03-07 12:12:34 |
+---------+---------------+-----------+----------------------------------+-----------+----------+-----------------------+--------+----------------+---------------------+---------------------+
1 row in set (0.00 sec)

mysql> select * from secondstore.users;
+---------+---------------+-----------+----------------------------------+-----------+----------+-----------------------+--------+----------------+---------------------+---------------------+
| user_id | user_group_id | username  | password                         | firstname | lastname | email                 | status | ip             | date_added          | last_login          |
+---------+---------------+-----------+----------------------------------+-----------+----------+-----------------------+--------+----------------+---------------------+---------------------+
|       1 |             1 | palamedes | 2f28fea59aa3979397385178ea4a0051 | aaaaa     | bbbbb    | aaaaa.bbbbb@yahoo.com |      1 | 172.179.21.203 | 2012-03-06 13:22:19 | 2012-03-07 08:44:27 |
+---------+---------------+-----------+----------------------------------+-----------+----------+-----------------------+--------+----------------+---------------------+---------------------+
1 row in set (0.00 sec)


I have two installs store and secondstore.. both have identical admin accounts with the same password -- I made sure of this by updating the second stores table to be that of the first store..  Yet I can't login to the second store as it says no match for user name/password..  but it works fine on the first store.

Note; it was working fine before I did a backup of one store, and restored it to the other store to test those features.

Cache issue?
Title: Re: Unable to log into second store with identical user settings
Post by: abolabo on March 08, 2012, 12:46:38 PM
Hello.
You need to take value of constant UNIQUE_ID  from /system/config.php and insert into config of second instance of Abantecart.
 This value using by hash generating function and works as "salt" (http://en.wikipedia.org/wiki/Salt_%28cryptography%29).
it made by security reason. For example, to prevent using md5 collision.
Title: Re: Unable to log into second store with identical user settings
Post by: Palamedes on March 08, 2012, 05:49:20 PM
Ah ha!  Makes perfect sense.. a salt system.. good idea..