mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-22 13:50:49 +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
|
charRange = charRange + pwSpecialChars
|
||||||
}
|
}
|
||||||
if config.excludeChars != "" {
|
if config.excludeChars != "" {
|
||||||
regExp := regexp.MustCompile("[" + config.excludeChars + "]")
|
regExp := regexp.MustCompile("[" + regexp.QuoteMeta(config.excludeChars) + "]")
|
||||||
charRange = regExp.ReplaceAllLiteralString(charRange, "")
|
charRange = regExp.ReplaceAllLiteralString(charRange, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue