Check for more bcrypt prefixes

This commit is contained in:
Aaron Bieber
2018-02-15 17:19:17 +01:00
committed by Zlatko Čalušić
parent 733c8da8fc
commit bdaa1ae345
+1 -1
View File
@@ -165,7 +165,7 @@ func (h *HtpasswdFile) Validate(user string, password string) bool {
}
var shaRe = regexp.MustCompile(`^{SHA}`)
var bcrRe = regexp.MustCompile(`^\$2b\$`)
var bcrRe = regexp.MustCompile(`^\$2b\$|^\$2a\$|^\$2y\$`)
switch {
case shaRe.MatchString(realPassword):