Check for more bcrypt prefixes

This commit is contained in:
Aaron Bieber 2018-02-12 07:08:19 -07:00 committed by Zlatko Čalušić
parent 733c8da8fc
commit bdaa1ae345

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):