Skip to content

Commit 535b4ad

Browse files
committed
check for valid utf 8 in transmitter address
1 parent 19de2f0 commit 535b4ad

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

core/capabilities/ccip/oraclecreator/plugin.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"io"
88
"strings"
99
"time"
10+
"unicode/utf8"
1011

1112
"github.com/google/uuid"
1213
"github.com/prometheus/client_golang/prometheus"
@@ -510,6 +511,16 @@ func (i *pluginOracleCreator) createCCIPProviders(
510511
if len(transmitter) == 0 {
511512
return nil, errors.New("transmitter list is empty")
512513
}
514+
515+
// Check if the transmitter string is a valid utf-8 string
516+
if !utf8.ValidString(transmitter[0]) {
517+
i.lggr.Errorw("transmitter contains invalid UTF-8",
518+
"transmitter", transmitter[0],
519+
"relayID.Network", relayID.Network,
520+
"chainSelector", chainSelector)
521+
return nil, fmt.Errorf("transmitter contains invalid UTF-8: %q", transmitter[0])
522+
523+
}
513524
ccipProvider, err := relayer.NewCCIPProvider(ctx, types.CCIPProviderArgs{
514525
PluginType: cciptypes.PluginType(config.Config.PluginType),
515526
OffRampAddress: config.Config.OfframpAddress,

system-tests/lib/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ require (
3232
github.com/pkg/errors v0.9.1
3333
github.com/rs/zerolog v1.33.0
3434
github.com/scylladb/go-reflectx v1.0.1
35-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250926171641-6cf0b7f2ca4f
3635
github.com/smartcontractkit/chain-selectors v1.0.72
36+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250926171641-6cf0b7f2ca4f
3737
github.com/smartcontractkit/chainlink-deployments-framework v0.49.0
3838
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401
3939
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be

0 commit comments

Comments
 (0)