Avoid using PasswordUtil
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 6 Nov 2020 09:04:40 +0000 (10:04 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 6 Nov 2020 09:04:40 +0000 (10:04 +0100)
wcfsetup/install/files/lib/data/user/User.class.php
wcfsetup/install/files/lib/form/AccountManagementForm.class.php
wcfsetup/install/files/lib/system/user/notification/TestableUserNotificationEventHandler.class.php

index 841943780d0a2075a824e83a704dee2ca5ab9b4b..8bc0e834c6743cb81f8b43ac966fa22c07b053c3 100644 (file)
@@ -15,7 +15,6 @@ use wcf\system\user\authentication\password\PasswordAlgorithmManager;
 use wcf\system\user\storage\UserStorageHandler;
 use wcf\system\WCF;
 use wcf\util\JSON;
-use wcf\util\PasswordUtil;
 use wcf\util\UserUtil;
 
 /**
index 2c1df8506189dde29bad6764f66f07d2e48af250..4df48e8fa8bbd957b28746bc9689a484a90dd38c 100644 (file)
@@ -11,9 +11,7 @@ use wcf\system\exception\SystemException;
 use wcf\system\exception\UserInputException;
 use wcf\system\menu\user\UserMenu;
 use wcf\system\WCF;
-use wcf\util\HeaderUtil;
 use wcf\util\JSON;
-use wcf\util\PasswordUtil;
 use wcf\util\StringUtil;
 use wcf\util\UserRegistrationUtil;
 use wcf\util\UserUtil;
index d5a3822488dd1b7eb8fdfbcc28437c1773755ffc..0d8c526ab87e425ea003c6fcdff1ea143e8d0b30 100644 (file)
@@ -16,7 +16,6 @@ use wcf\system\language\LanguageFactory;
 use wcf\system\user\notification\event\ITestableUserNotificationEvent;
 use wcf\system\SingletonFactory;
 use wcf\system\WCF;
-use wcf\util\PasswordUtil;
 use wcf\util\StringUtil;
 
 /**
@@ -76,7 +75,7 @@ class TestableUserNotificationEventHandler extends SingletonFactory {
                                        'data' => [
                                                'email' => $username . '@example.com',
                                                'languageID' => $languages[array_rand($languages)]->languageID,
-                                               'password' => PasswordUtil::getRandomPassword(),
+                                               'password' => \bin2hex(\random_bytes(16)),
                                                'registrationDate' => TIME_NOW - 24 * 3600 * random_int(10, 1000),
                                                'username' => $username
                                        ]