From 9ee879dc0447adcd2f5e82b66ca141c4e2ef10f9 Mon Sep 17 00:00:00 2001 From: xnacly Date: Wed, 3 Feb 2021 19:39:37 +0100 Subject: added passwordStrength estimator --- src/util/Constants.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/util/Constants.ts') diff --git a/src/util/Constants.ts b/src/util/Constants.ts index 35d11615..84012071 100644 --- a/src/util/Constants.ts +++ b/src/util/Constants.ts @@ -71,6 +71,12 @@ export interface DefaultOptions { requireInvite: boolean; allowNewRegistration: boolean; allowMultipleAccounts: boolean; + password: { + pwMinLength: number; + pwMinNumbers: number; + pwMinUpperCase: number; + pwMinSymbols: number; + }; }; } @@ -123,7 +129,7 @@ export const DefaultOptions: DefaultOptions = { required: true, allowlist: false, blocklist: true, - domains: [], // TODO: efficicently save domain blocklist in database + domains: [], // TODO: efficiently save domain blocklist in database // domains: fs.readFileSync(__dirname + "/blockedEmailDomains.txt", { encoding: "utf8" }).split("\n"), }, dateOfBirth: { @@ -134,6 +140,12 @@ export const DefaultOptions: DefaultOptions = { requireCaptcha: true, allowNewRegistration: true, allowMultipleAccounts: true, + password: { + pwMinLength: 8, + pwMinNumbers: 2, + pwMinUpperCase: 2, + pwMinSymbols: 0, + }, }, }; -- cgit 1.5.1