Page 1 of 1

domotiga 1.0019 pasword hashing not working

Posted: Sun Dec 21, 2014 12:41 pm
by JohanVanDyck
Hi

I installed domotiga 1.0019 on my cubieboard (cubian OS). I also installed domotiyii web front-end. Everything update to the latest version.
With the default auser admin and password admin, everything is working fine. However, when I change my password via the domitiga client, I can't login anymore.
I can't login to my domotiga client; I can't login to domotiyii.

When I manually alter the mysql users table with the original hash for admin/admin, everythink is working fine. --> either the users module in domotiga isn't working anymore or a charconversion is going wrong. Does someone has the same behaviour? How to debug?

Some info:
- cubie OS locals: cat /etc/locale.gen gives en_US.UTF-8 UTF-8
- the domotiga.users table in mysql is utf8_general_ci encoded. (but I have same result for latin1 encoding)
- versions on domotiyii:
JSON-RPC server 0.04
PHP 5.4.35-0+deb7u2
Yii framework 1.1.15
Yiistrap 1.3.0

Thanks

Johan.

Re: domotiga 1.0019 pasword hashing not working

Posted: Sun Dec 21, 2014 3:56 pm
by emvee
Yes, from your description it looks like DomotiYii is not writing the right password hash to the database.

If you want to debug things, have a look at domotiyii/protected/models/Users.php

Re: domotiga 1.0019 pasword hashing not working

Posted: Sun Jan 04, 2015 8:53 pm
by uAlex73
The hashing worked a while ago (i had it working in my pre-alpha Yii), but i will have a look why it isn't working anymore.

Re: domotiga 1.0019 pasword hashing not working

Posted: Mon Oct 05, 2015 8:46 pm
by JohanVanDyck
Hi

Via private message, I was asked where to find the user table. (I can't reply on that message in private) but:
- I use phpmyadmin to have a view on my database. But you can also use the hard way...
- I open the domotiga db, in the "users" table the columns "username" and "password" exist.
via mysql use this querry: (db name = domotiga in my case; name is choosen @ installation)
>mysql -u root -p
mysql> use domotiga
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT * FROM `users` WHERE `fullname`="admin";
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| id | username | password | fullname | admin | comments | lastlogin | emailaddress | cookie |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| 1 | admin | MD5AQxbz2WH4CZ72Z4F5SvrJcKgkFJ8S1 | Admin | 1 | | 2008-11-06 14:12:13 | admin@mydomain.com | |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
1 row in set (0.00 sec)

mysql> quit


Regards

Johan.

Re: domotiga 1.0019 pasword hashing not working

Posted: Mon Oct 05, 2015 9:31 pm
by JohanVanDyck
Hi

You can find the table users in your database (domotiga). I use phpmyadmin, but via mysql
$mysql -uroot -p
mysql> use domotiga
Database changed
mysql> SELECT * FROM `users` WHERE `fullname`="admin";
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| id | username | password | fullname | admin | comments | lastlogin | emailaddress | cookie |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| 1 | admin | MD5AQxbz2WH4CZ72Z4F4SvrJcKgkFJ9S1 | Admin | 1 | | 2008-11-06 14:12:13 | admin@mydomain.com | |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
1 row in set (0.00 sec)

mysql> quit;

Re: domotiga 1.0019 pasword hashing not working

Posted: Wed Oct 07, 2015 8:26 am
by Edwin
Thank u very much
For your help

Greetings
Edwin