From c62ebb8c0e12e4b87b67feb8f4ec1551450f5bac Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 23 Oct 2023 15:33:48 +0200 Subject: [PATCH] fix(authz): check string is not empty (#18209) (cherry picked from commit 19eaac3ba495001c3fecfb2888d2cbe52f76af35) # Conflicts: # x/authz/generic_authorization.go --- x/authz/generic_authorization.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x/authz/generic_authorization.go b/x/authz/generic_authorization.go index 688211a6928d..8c1b80742528 100644 --- a/x/authz/generic_authorization.go +++ b/x/authz/generic_authorization.go @@ -1,7 +1,12 @@ package authz import ( +<<<<<<< HEAD context "context" +======= + "context" + "errors" +>>>>>>> 19eaac3ba (fix(authz): check string is not empty (#18209)) sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -27,5 +32,8 @@ func (a GenericAuthorization) Accept(ctx context.Context, msg sdk.Msg) (AcceptRe // ValidateBasic implements Authorization.ValidateBasic. func (a GenericAuthorization) ValidateBasic() error { + if a.Msg == "" { + return errors.New("msg type cannot be empty") + } return nil }