mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
Check for more bcrypt prefixes
This commit is contained in:
parent
733c8da8fc
commit
bdaa1ae345
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ func (h *HtpasswdFile) Validate(user string, password string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
var shaRe = regexp.MustCompile(`^{SHA}`)
|
var shaRe = regexp.MustCompile(`^{SHA}`)
|
||||||
var bcrRe = regexp.MustCompile(`^\$2b\$`)
|
var bcrRe = regexp.MustCompile(`^\$2b\$|^\$2a\$|^\$2y\$`)
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case shaRe.MatchString(realPassword):
|
case shaRe.MatchString(realPassword):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue