Skip to content

Conversation

@daryllimyt
Copy link
Contributor

@daryllimyt daryllimyt commented Jan 20, 2026

Motivation

  • Align frontend password validation with the backend's updated minimum password length of 16 characters to avoid client/backend mismatches during registration and password updates.

Description

  • Updated the sign-up password schema in frontend/src/components/auth/sign-up.tsx to require .min(16), updated the update-password schema in frontend/src/components/auth/update-password-form.tsx to require 16 characters for both password and confirmPassword, and changed the default auth_min_password_length in frontend/src/components/organization/org-settings-auth.tsx to 16.

Testing

  • No automated tests were run.

Codex Task


Summary by cubic

Align frontend password validation to 16 characters to match the backend, preventing registration/reset failures from mismatched rules.

  • Bug Fixes
    • Sign-up schema: password min length set to 16.
    • Update/reset password schema: password and confirmPassword min length set to 16.
    • Org auth settings: default auth_min_password_length set to 16.

Written for commit 0e78d0e. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e78d0eb9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 98 to +100
password: z
.string()
.min(12, "Password needs to be at least 12 characters long"),
.min(16, "Password needs to be at least 16 characters long"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep UI min length aligned with backend default

If the backend still uses the default 12‑character minimum (tracecat/config.py:102-103 and AuthSettingsUpdate default=12 in tracecat/settings/schemas.py), this change makes the sign‑up UI reject 12–15 character passwords that the API would accept, so users can be blocked from registering or forced to pick longer passwords than policy requires. This only manifests in environments where TRACECAT__AUTH_MIN_PASSWORD_LENGTH (or the stored auth settings) remains 12, so either use the configured value in the UI or update the backend defaults together to avoid the mismatch.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant