mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
16 lines
276 B
Go
16 lines
276 B
Go
|
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
|
||
|
}
|