Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

chore(backend:user): restore shared login validation export and use supported progressbar typ

johaven7b7c94eaf122
diff --git a/backend/src/applications/users/constants/user.ts b/backend/src/applications/users/constants/user.ts
index 6192a602..42cf9b26 100644
--- a/backend/src/applications/users/constants/user.ts
+++ b/backend/src/applications/users/constants/user.ts
@@ -1,5 +1,6 @@
export const USER_PASSWORD_MIN_LENGTH = 8
export const USER_MAX_PASSWORD_ATTEMPTS = 10
+export const USER_LOGIN_VALIDATION = /^(?! )(?!.* $)[a-zA-Z0-9@\-._ ]{2,255}$/
export const USER_PATH = {
TMP: 'tmp',
diff --git a/backend/src/applications/users/utils/login.ts b/backend/src/applications/users/utils/login.ts
index 29a97d4a..d2ebb622 100644
--- a/backend/src/applications/users/utils/login.ts
+++ b/backend/src/applications/users/utils/login.ts
@@ -1,4 +1,4 @@
-const USER_LOGIN_VALIDATION = /^(?! )(?!.* $)[a-zA-Z0-9@\-._ ]{2,255}$/
+import { USER_LOGIN_VALIDATION } from '../constants/user'
export function isSafePathSegment(value: unknown): value is string {
return typeof value === 'string' && !!value && value !== '.' && value !== '..' && !value.includes('/') && !value.includes('\\')