]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
New re-hashing of passords while login should work now
[mailer.git] / inc / functions.php
index e24be85a2de601d7eb0a4784f70a6b90418b9051..bfa97b999a9e7d533114e74becb3e1bbf73ceb4d 100644 (file)
@@ -1805,7 +1805,7 @@ function CREATE_EMAIL_LINK($email, $table="admins") {
        return $EMAIL;
 }
 // Generate a hash for extra-security for all passwords
-function generateHash($plainText, $salt = "") {
+function generateHash ($plainText, $salt = "") {
        global $_CONFIG, $_SERVER;
 
        // Is the required extension "sql_patches" there?
@@ -1997,6 +1997,11 @@ function generatePassString($passHash) {
 
                //* DEBUG: */ die($passHash."<br>".$newHash." (".strlen($newHash).")");
                $ret = generateHash($newHash, $_CONFIG['master_salt']);
+       } else {
+               // Hash it simple
+               //* DEBUG: */ echo "--".$passHash."--<br />\n";
+               $ret = md5($passHash);
+               //* DEBUG: */ echo "++".$ret."++<br />\n";
        }
 
        // Return result