Skip to content

Commit

Permalink
fix(authz): check string is not empty (#18209)
Browse files Browse the repository at this point in the history
(cherry picked from commit 19eaac3)

# Conflicts:
#	x/authz/generic_authorization.go
  • Loading branch information
tac0turtle authored and mergify[bot] committed Oct 23, 2023
1 parent d003fa1 commit f8665d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x/authz/generic_authorization.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
package authz

import (
<<<<<<< HEAD
=======
"context"
"errors"

>>>>>>> 19eaac3ba (fix(authz): check string is not empty (#18209))
sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand All @@ -25,5 +31,8 @@ func (a GenericAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (AcceptRespon

// ValidateBasic implements Authorization.ValidateBasic.
func (a GenericAuthorization) ValidateBasic() error {
if a.Msg == "" {
return errors.New("msg type cannot be empty")
}
return nil
}

0 comments on commit f8665d9

Please sign in to comment.