Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(frontend): require passwrods to be min length 12 (#10061)

Nicholas Tindle85e108a37a6b
diff --git a/autogpt_platform/frontend/src/components/profile/settings/SettingsForm.tsx b/autogpt_platform/frontend/src/components/profile/settings/SettingsForm.tsx
index 9ae19e654f..fbd1202f5a 100644
--- a/autogpt_platform/frontend/src/components/profile/settings/SettingsForm.tsx
+++ b/autogpt_platform/frontend/src/components/profile/settings/SettingsForm.tsx
@@ -33,9 +33,9 @@ const formSchema = z
.optional()
.refine((val) => {
// If password is provided, it must be at least 8 characters
- if (val) return val.length >= 8;
+ if (val) return val.length >= 12;
return true;
- }, "String must contain at least 8 character(s)"),
+ }, "String must contain at least 12 character(s)"),
confirmPassword: z.string().optional(),
notifyOnAgentRun: z.boolean(),
notifyOnZeroBalance: z.boolean(),
diff --git a/autogpt_platform/frontend/src/types/auth.ts b/autogpt_platform/frontend/src/types/auth.ts
index 21e77cd562..545ac976da 100644
--- a/autogpt_platform/frontend/src/types/auth.ts
+++ b/autogpt_platform/frontend/src/types/auth.ts
@@ -23,11 +23,11 @@ export const signupFormSchema = z
.trim(),
password: z
.string()
- .min(6, "Password must contain at least 6 characters")
+ .min(12, "Password must contain at least 12 characters")
.max(64, "Password must contain at most 64 characters"),
confirmPassword: z
.string()
- .min(6, "Password must contain at least 6 characters")
+ .min(12, "Password must contain at least 12 characters")
.max(64, "Password must contain at most 64 characters"),
agreeToTerms: z.boolean().refine((value) => value === true, {
message: "You must agree to the Terms of Use and Privacy Policy",
@@ -50,11 +50,11 @@ export const changePasswordFormSchema = z
.object({
password: z
.string()
- .min(6, "Password must contain at least 6 characters")
+ .min(12, "Password must contain at least 12 characters")
.max(64, "Password must contain at most 64 characters"),
confirmPassword: z
.string()
- .min(6, "Password must contain at least 6 characters")
+ .min(12, "Password must contain at least 12 characters")
.max(64, "Password must contain at most 64 characters"),
})
.refine((data) => data.password === data.confirmPassword, {