01.02.2016, 16:32
Hello,i've scripted a login/register system and it works fine but the problem is when i hash the passwords and then login again and type the password it says wrong password
On Register Dialog:
On Login Dialog:
the sizeof hashpass is 129 and it hashs the pass but seems it doesn't compare it properly so...Note that if i removed the hash system it works fine
On Register Dialog:
Quote:
WP_Hash(hashpass, sizeof(hashpass), inputtext); mysql_format(mysql, query, sizeof(query), "INSERT INTO `users`(`Password`) VALUES ('%e')", hashpass); mysql_query(mysql, query); |
Quote:
WP_Hash(hashpass, sizeof(hashpass), inputtext); mysql_format(mysql, query, sizeof(query),"SELECT * FROM `users` WHERE `Password` = '%s'", hashpass); mysql_query(mysql, query); |