mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-10-23 11:56:04 +02:00
Restrict new passwords to 72 characters in length
This commit is contained in:
@@ -779,7 +779,7 @@ final class Auth extends UserManager {
|
||||
*/
|
||||
public function changePasswordWithoutOldPassword($newPassword) {
|
||||
if ($this->isLoggedIn()) {
|
||||
$newPassword = self::validatePassword($newPassword);
|
||||
$newPassword = self::validatePassword($newPassword, true);
|
||||
$this->updatePasswordInternal($this->getUserId(), $newPassword);
|
||||
|
||||
try {
|
||||
@@ -1560,7 +1560,7 @@ final class Auth extends UserManager {
|
||||
if ((int) $resetData['resettable'] === 1) {
|
||||
if (\password_verify($token, $resetData['token'])) {
|
||||
if ($resetData['expires'] >= \time()) {
|
||||
$newPassword = self::validatePassword($newPassword);
|
||||
$newPassword = self::validatePassword($newPassword, true);
|
||||
$this->updatePasswordInternal($resetData['user'], $newPassword);
|
||||
$this->forceLogoutForUserById($resetData['user']);
|
||||
|
||||
|
Reference in New Issue
Block a user