1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01:00

removed strength normalization

This commit is contained in:
ngn 2024-01-03 16:48:39 +00:00 committed by GitHub
parent 8e564dc11e
commit e12fae8abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,10 +101,5 @@ export function checkPassword(password: string): number {
}
strength += calculateEntropy(password);
// Strength should between 0 and 1??? (am I wrong?)
// Normalize the strength score to the range [0, 1]
const MAX_STRENGTH = 2.0; // Maximum possible strength score
strength = strength / MAX_STRENGTH;
return strength;
}