Skip to content

Commit

Permalink
fix(authz): check string is not empty (#18209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Oct 23, 2023
1 parent 442c3c5 commit 19eaac3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/authz/generic_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package authz

import (
"context"
"errors"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/authz"
Expand All @@ -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
}

0 comments on commit 19eaac3

Please sign in to comment.