Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

cms hash help

Newbie Spellweaver
Joined
Jan 22, 2007
Messages
19
Reaction score
3
Hello all!

I need some help with a CMS i'm editing. I've changed it hashing to ordinary md5 on register, but it won't work logging in.

I've tried to edit a lot, but i only manage to edit it to connect with whatever password i want.

The code is;

final public function passValidation($username, $password) { global $db, $core; $conn = $db->PDO(); try { $stmt = $conn->pdo->prepare('SELECT `password` FROM `users` WHERE `username` = :u LIMIT 1'); $stmt->bindParam(':u', $username, $db->PARAM_STR); $stmt->execute(); if(password_verify($password, $stmt->fetchColumn())) { return true; } return false; } catch(PDOException $e) { die($e->getMessage()); } $conn = null; }

Any idea what i have to edit, to access the CMS with correct hashed md5 password typed in?
 
Newbie Spellweaver
Joined
Jan 22, 2007
Messages
19
Reaction score
3
all your old users have the another type of password hash ??

yes, my old users have md5 hash and the CMS used another hash.
But i've managed to edit it to register with md5 hash now, but i can't login as i don't see what i have to edit to make it validate password that are md5 hashed, from the code i posted above.
 
Upvote 0
Back
Top