This commit is contained in:
Jan Dvorak
2021-06-11 15:32:31 +02:00
parent 48ef28d5c0
commit f4e15deb0d

View File

@@ -274,10 +274,12 @@ const userQueryValidator = Match.Where(user => {
return true;
});
const passwordValidator = {
digest: Match.Where(str => Match.test(str, String) && str.length === 64),
algorithm: Match.OneOf('sha-256')
};
const passwordValidator = Match.OneOf(
Match.Where(str => Match.test(str, String) && str.length <= Meteor.settings?.packages?.accounts?.passwordMaxLength || 256), {
digest: Match.Where(str => Match.test(str, String) && str.length === 64),
algorithm: Match.OneOf('sha-256')
}
);
// Handler to login with a password.
//