feat: Upgrade Next.js and refine password/amount restrictions

This commit addresses several key updates and fixes:

1.  **Security Update:** Upgraded Next.js to fix the vulnerability identified as **CVE-2025-55182**.
2.  **Password Policy:** Globally adjusted the password requirement for "change password" operations to a minimum length of **6 characters**.
3.  **Validation Improvement:** Enhanced validation logic for amount fields during MCP (Multi-Currency Purchase/Payment, assuming this acronym) creation to ensure proper limits and constraints are applied.
This commit is contained in:
riverLethe committed 2025-12-04 17:43:59 +08:00
1 parent 755d48a2f8
commit 54654b386d
9 files changed
+458 -33

No files matched your search

@@ -45,7 +45,7 @@ export const AdminConfigForm: React.FC<AdminConfigFormProps> = ({
formData.username.trim() !== "" &&
formData.password?.trim() !== "" &&
formData.password === confirmPassword &&
formData.password?.length >= 8;
formData.password?.length >= 6;
const passwordsMatch = formData.password === confirmPassword;
@@ -86,7 +86,7 @@ export const AdminConfigForm: React.FC<AdminConfigFormProps> = ({
<Input
label={t("Administrator Password")}
placeholder={t("Enter administrator password")}
description={t("Password must be at least 8 characters long")}
description={t("Password must be at least 6 characters long")}
value={formData.password}
onChange={(e) => handleInputChange("password", e.target.value)}
type={showPassword ? "text" : "password"}
@@ -106,13 +106,13 @@ export const AdminConfigForm: React.FC<AdminConfigFormProps> = ({
isRequired
autoComplete="new-password"
color={
formData.password?.length > 0 && formData.password?.length < 8
formData.password?.length > 0 && formData.password?.length < 6
? "danger"
: "default"
}
errorMessage={
formData.password?.length > 0 && formData.password?.length < 8
? t("Password must be at least 8 characters")
formData.password?.length > 0 && formData.password?.length < 6
? t("Password must be at least 6 characters")
: ""
}
/>