Properly support argon2 password hashes (vB 5)
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 21 Sep 2020 12:58:58 +0000 (14:58 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 7 Oct 2020 07:47:13 +0000 (09:47 +0200)
see WoltLab/WCF#3571

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

index 571eadda910801ae5ae87ea3e5d99f58a678df74..1983346e48aaed9537e522b7c721931a2deff9c1 100644 (file)
@@ -308,6 +308,9 @@ class VB5xExporter extends AbstractExporter {
                                if (StringUtil::startsWith($row['scheme'], 'blowfish')) {
                                        $password = PasswordUtil::getSaltedHash($row['token'], $row['token']);
                                }
+                               else if (StringUtil::startsWith($row['scheme'], 'argon2')) {
+                                       $password = 'argon2:'.$row['token'];
+                               }
                                else if ($row['scheme'] == 'legacy') {
                                        $password = 'vb5:'.implode(':', explode(' ', $row['token'], 2));
                                }