mirror of
https://github.com/wneessen/apg-go.git
synced 2024-12-23 11:40:38 +01:00
excludeChars are now escaped before using them as regExp
This commit is contained in:
parent
d2eae0da9f
commit
1f3aeb9d44
1 changed files with 1 additions and 1 deletions
2
chars.go
2
chars.go
|
@ -29,7 +29,7 @@ func getCharRange() string {
|
|||
charRange = charRange + pwSpecialChars
|
||||
}
|
||||
if config.excludeChars != "" {
|
||||
regExp := regexp.MustCompile("[" + config.excludeChars + "]")
|
||||
regExp := regexp.MustCompile("[" + regexp.QuoteMeta(config.excludeChars) + "]")
|
||||
charRange = regExp.ReplaceAllLiteralString(charRange, "")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue