Skip to content

Commit

Permalink
fix: don't log invalid utf8 key string
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhphuctadang committed Aug 21, 2023
1 parent c6e918b commit e81ddc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/authz/keeper/keeper.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package keeper

import (
"encoding/base64"
"fmt"
"strconv"
"time"
Expand Down Expand Up @@ -101,7 +102,7 @@ func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs []

grant, found := k.getGrant(ctx, skey)
if !found {
return nil, sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "failed to update grant with key %s", string(skey))
return nil, sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "failed to update grant with key %s", base64.StdEncoding.EncodeToString(skey))
}

if grant.Expiration != nil && grant.Expiration.Before(now) {
Expand Down

0 comments on commit e81ddc6

Please sign in to comment.