Fix CMS login and restore PAGEPAN feature icons

This commit is contained in:
2026-11-21 18:47:07 +08:00
parent d9bda755d1
commit 908f9385fb
32 changed files with 519 additions and 156 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace App\Content;
final class Passwords
{
public const MIN_LENGTH = 8;
public static function isSupported(string $password): bool
{
return strlen($password) <= 72 && !str_contains($password, "\0") && mb_check_encoding($password, 'UTF-8');
}
public static function isValidNew(string $password): bool
{
return self::isSupported($password) && mb_strlen($password, 'UTF-8') >= self::MIN_LENGTH;
}
}