enforce group-level password strength for users and shares

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2025-10-26 09:44:32 +01:00
parent accb9703d0
commit 5ce9688780
3 changed files with 68 additions and 4 deletions

View File

@@ -146,7 +146,7 @@ func (s *Share) HasRedactedPassword() bool {
func (s *Share) hashPassword() error {
if s.Password != "" && !util.IsStringPrefixInSlice(s.Password, internalHashPwdPrefixes) {
user, err := UserExists(s.Username, "")
user, err := GetUserWithGroupSettings(s.Username, "")
if err != nil {
return util.NewGenericError(fmt.Sprintf("unable to validate user: %v", err))
}