Return generic error for incorrect webhook password

This commit is contained in:
Elara 2023-06-09 12:32:40 -07:00
parent 2113e8eade
commit 0341c7c6b3

View File

@ -41,6 +41,7 @@ var (
ErrInvalidHdrVal = errors.New("invalid header value type")
ErrInvalidType = errors.New("invalid type")
ErrInsecureWebhook = errors.New("secure webhook missing authorization")
ErrIncorrectPassword = errors.New("incorrect password")
)
var httpModule = &starlarkstruct.Module{
@ -355,7 +356,7 @@ func verifySecure(pwdHash, pluginName string, req *http.Request) error {
fmt.Println(string(pwd))
if err := bcrypt.CompareHashAndPassword([]byte(pwdHash), pwd); err != nil {
return err
return ErrIncorrectPassword
}
return nil