Page 1 of 1

Password matching problem when accessing DB from an App

Posted: 2020-11-03 16:33
by pilandros
I need to access the DataBase from an App and prior to ver 5.90 I use to do the query:
" ... WHERE memberID='$user' AND passMD5='".md5($password)."' AND isApproved=1 AND isBanned=0 " and it always worked.

I can see that the new version 5.90 is using password_hash($password,PASSWORD_DEFAULT) so I am using this instead but I can not get it to run because the results are different.
The hashed password with the function does not match the one saved in the table (which was created/updated with the 5.90 version).
What am I missing?

Re: Password matching problem when accessing DB from an App

Posted: 2020-11-13 07:14
by onoehring
Hi pilandros,

can you please elaborate a little more? If the new method is indeed (and I believe you) the method AG uses, it should work (otherwise we all would probably be locked out of our applications ;-) ).
If I am correct, once a user has logged into the application his password is not MD5 anymore but sha256 - maybe that is the reason? If so, your original query might need a change.

Olaf