Skip to content

Commit

Permalink
fix(authz): check string is not empty (backport #18209) (#18218)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <[email protected]>
  • Loading branch information
mergify[bot] and tac0turtle authored Oct 23, 2023
1 parent 362f234 commit 269a245
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/authz/generic_authorization.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package authz

import (
"errors"

sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand All @@ -25,5 +27,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 269a245

Please sign in to comment.