Add support for Argon2 hashes in phpBB 3.1+ exporter
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 21 Jan 2021 13:19:36 +0000 (14:19 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 21 Jan 2021 13:20:37 +0000 (14:20 +0100)
Resolves #56

files/lib/system/exporter/PhpBB31xExporter.class.php

index f8de4baa7997825ef032879d7f3e3aeeab9f9a6b..b3cba8b3eedf919267a89aa5f1f77fe7d8c27020 100644 (file)
@@ -385,6 +385,9 @@ class PhpBB31xExporter extends AbstractExporter {
                                if (PasswordUtil::isBlowfish($row['user_password'])) {
                                        $password = PasswordUtil::getSaltedHash($row['user_password'], $row['user_password']);
                                }
+                               else if (StringUtil::startsWith($row['user_password'], '$argon2')) {
+                                       $password = 'argon2:'.$row['user_password'];
+                               }
                                else {
                                        $password = 'phpbb3:'.$row['user_password'].':';
                                }