Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Help with passwords?

I'm currently creating a personal modification to Vanilla for a private site, the build-on will add about 7x the code.. I'm trying to make a new user manager within another module, and i cannot figure out how to create a new password from a custom php script. I'm not really using the framework of vanilla, so I'm looking to find out how the password is generated so i can call that function or regenerate it myself

Comments

  • You talking about Vanilla 2? If so, I think you're looking for this in class.passwordhash.php:

    /** * Chech a password against a stored password * * The stored password can be plain, a md5 hash or a phpass hash. * * If the password wasn't a phppass hash, * the Weak property is set to True. * * @param string $Password * @param string $StoredHash * @return boolean */ function CheckPassword($Password, $StoredHash) { $this->Weak = FALSE; if (!isset($StoredHash[0])) return FALSE; if ($StoredHash[0] === '_' || $StoredHash[0] === '$') { return parent::CheckPassword($Password, $StoredHash); } else if ($Password && $StoredHash !== '*' && ($Password === $StoredHash || md5($Password) === $StoredHash) ) { $this->Weak = TRUE; return TRUE; } return FALSE; }
Sign In or Register to comment.