15
vendor/github.com/jimstudt/http-authentication/basic/bcrypt.go
generated
vendored
Normal file
15
vendor/github.com/jimstudt/http-authentication/basic/bcrypt.go
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package basic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Reject any password encoded using bcrypt.
|
||||
func RejectBcrypt(src string) (EncodedPasswd, error) {
|
||||
if strings.HasPrefix(src, "$2y$") {
|
||||
return nil, fmt.Errorf("bcrypt passwords are not accepted: %s", src)
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user