📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix: max password length is hardcoded
Blue Mousea296f11f1283
diff --git a/web/app/routes/signup.tsx b/web/app/routes/signup.tsxindex ee4ed43a5..571f365bc 100644--- a/web/app/routes/signup.tsx+++ b/web/app/routes/signup.tsx@@ -13,6 +13,7 @@ import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import Signup from '~/pages/Auth/Signup'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'import { createHeadersWithCookies } from '~/utils/session.server'+import { MAX_PASSWORD_CHARS } from '~/utils/validator'export const meta: MetaFunction = () => {// eslint-disable-next-line react-hooks/rules-of-hooks@@ -80,8 +81,8 @@ export async function action({ request }: ActionFunctionArgs) {fieldErrors.password = 'Password must be at least 8 characters'}- if (password.length > 50) {- fieldErrors.password = 'Password must be at most 50 characters'+ if (password.length > MAX_PASSWORD_CHARS) {+ fieldErrors.password = `Password must be at most ${MAX_PASSWORD_CHARS} characters`}if (!tos && !isSelfhosted) {diff --git a/web/app/routes/signup_.invitation.$id.tsx b/web/app/routes/signup_.invitation.$id.tsxindex 94ed141d5..a60baca96 100644--- a/web/app/routes/signup_.invitation.$id.tsx+++ b/web/app/routes/signup_.invitation.$id.tsx@@ -17,6 +17,7 @@ import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import InvitationSignup from '~/pages/Auth/Signup/InvitationSignup'import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'import { createHeadersWithCookies } from '~/utils/session.server'+import { MAX_PASSWORD_CHARS } from '~/utils/validator'export const meta: MetaFunction = () => {// eslint-disable-next-line react-hooks/rules-of-hooks@@ -124,8 +125,8 @@ export async function action({ request, params }: ActionFunctionArgs) {fieldErrors.password = 'Password must be at least 8 characters'}- if (password.length > 50) {- fieldErrors.password = 'Password must be at most 50 characters'+ if (password.length > MAX_PASSWORD_CHARS) {+ fieldErrors.password = `Password must be at most ${MAX_PASSWORD_CHARS} characters`}if (!tos && !isSelfhosted) {