fix(authz): check string is not empty (#18209)
This commit is contained in:
parent
442c3c5e4b
commit
19eaac3ba4
@ -2,6 +2,7 @@ package authz
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/authz"
|
||||
@ -26,5 +27,8 @@ func (a GenericAuthorization) Accept(ctx context.Context, msg sdk.Msg) (authz.Ac
|
||||
|
||||
// ValidateBasic implements Authorization.ValidateBasic.
|
||||
func (a GenericAuthorization) ValidateBasic() error {
|
||||
if a.Msg == "" {
|
||||
return errors.New("msg type cannot be empty")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user