Hash passwords in PHP instead of asking MySQL to do it.
darkmorford -
9f040c95c2e0
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -42,10 +42,8 define('USING_TIDY', false);
42
42
43 /* These function are all for core authentication. */
43 /* These function are all for core authentication. */
44
44
45 // Call mysql to hash a password
46 function mt_hash_password($password) {
45 function mt_hash_password($password) {
47 global $mtdb;
46 return sha1($password);
48 return $mtdb->getOne('SELECT SHA1("' . mysqli_real_escape_string($mtdb->link, $password) . '")') ;
49 }
47 }
50
48
51 // Remove invalid characters from username. Permit only alpha, underscore, period, at, hypen
49 // Remove invalid characters from username. Permit only alpha, underscore, period, at, hypen
Comments 0
You need to be logged in to leave comments. Login now