Handle dropped checkok pattern in postgresql package (#3046)

This commit is contained in:
Lars Lehtonen 2017-07-26 09:28:02 -07:00 committed by Jeff Mitchell
parent 0ab5b0e26b
commit 72ee5e573c

View file

@ -41,7 +41,9 @@ func (b *backend) secretCredsRenew(
return nil, fmt.Errorf("secret is missing username internal data")
}
username, ok := usernameRaw.(string)
if !ok {
return nil, fmt.Errorf("usernameRaw is not a string")
}
// Get our connection
db, err := b.DB(req.Storage)
if err != nil {
@ -92,7 +94,9 @@ func (b *backend) secretCredsRevoke(
return nil, fmt.Errorf("secret is missing username internal data")
}
username, ok := usernameRaw.(string)
if !ok {
return nil, fmt.Errorf("usernameRaw is not a string")
}
var revocationSQL string
var resp *logical.Response