Export the correct salt for SMF2
authorjoshuaruesweg <josh@wcflabs.de>
Wed, 30 Sep 2020 10:57:24 +0000 (12:57 +0200)
committerjoshuaruesweg <josh@wcflabs.de>
Wed, 30 Sep 2020 10:57:24 +0000 (12:57 +0200)
files/lib/system/exporter/SMF2xExporter.class.php

index 24980059bc9616dcc9ee9fd7c8a6e1f27086a863..d9d3b228d06aac31cb83b1d2486125aef02becec 100644 (file)
@@ -349,7 +349,9 @@ class SMF2xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(['smf2:'.$row['passwd'].':'.$row['password_salt'], $newUserID]);
+                               // The lowered username is used for the salt. The column `passwd_salt` is in fact used 
+                               // for the auto login. 
+                               $passwordUpdateStatement->execute(['smf2:'.$row['passwd'].':'.mb_strtolower($row['member_name']), $newUserID]);
                        }
                }
        }