feat: updated with goroutines
This commit is contained in:
@@ -47,7 +47,7 @@ func Check(input string, wordList, passwordList []string) (string, error) {
|
||||
|
||||
// Check if password is in common passwords
|
||||
for _, entry := range passwordList {
|
||||
if strings.Contains(strings.ToLower(entry), strings.ToLower(input)) {
|
||||
if strings.Contains(strings.ToLower(entry), strings.ToLower(input)) && len(entry) > 3 {
|
||||
return "Weak password", fmt.Errorf("password found inside common passwords")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user