Skip to content

Commit

Permalink
fix(authz): check string is not empty (backport #18209) (#18217)
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 535567e commit aa72f10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x/authz/generic_authorization.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package authz

import (
context "context"
"context"
"errors"

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -27,5 +28,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
}

0 comments on commit aa72f10

Please sign in to comment.