mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
Check for more bcrypt prefixes
This commit is contained in:
committed by
Zlatko Čalušić
parent
733c8da8fc
commit
bdaa1ae345
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user