From d58280d26664fd77b2ea876f08ec16ff1c7e6a86 Mon Sep 17 00:00:00 2001
From: Andreas Kienast <a.fernandez@scripting-base.de>
Date: Tue, 6 Feb 2024 09:00:04 +0100
Subject: [PATCH] [BUGFIX] Fix typo in `Random::DEFAULT_PASSWORD_LENGTH`
 constant

Resolves: #103055
Releases: main, 12.4
Change-Id: If1c9f1dee8952faba5ed65bf54770a51aefdd37d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82832
Tested-by: Andreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de>
Tested-by: core-ci <typo3@b13.com>
---
 typo3/sysext/core/Classes/Crypto/Random.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/core/Classes/Crypto/Random.php b/typo3/sysext/core/Classes/Crypto/Random.php
index b40c1c83f924..c144bc0f1a4d 100644
--- a/typo3/sysext/core/Classes/Crypto/Random.php
+++ b/typo3/sysext/core/Classes/Crypto/Random.php
@@ -25,7 +25,7 @@ use TYPO3\CMS\Core\Utility\StringUtility;
  */
 class Random
 {
-    private const DEFAULT_PASSWORD_LEGNTH = 16;
+    private const DEFAULT_PASSWORD_LENGTH = 16;
     private const LOWERCASE_CHARACTERS = 'abcdefghijklmnopqrstuvwxyz';
     private const UPPERCASE_CHARACTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
     private const SPECIAL_CHARACTERS = '!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~';
@@ -62,7 +62,7 @@ class Random
      */
     public function generateRandomPassword(array $passwordRules): string
     {
-        $passwordLength = (int)($passwordRules['length'] ?? self::DEFAULT_PASSWORD_LEGNTH);
+        $passwordLength = (int)($passwordRules['length'] ?? self::DEFAULT_PASSWORD_LENGTH);
         if ($passwordLength < 8) {
             throw new InvalidPasswordRulesException(
                 'Password rules are invalid. Length must be at least 8.',
-- 
GitLab