Skip to content

Commit

Permalink
chore: follow up for #2510 (#2854)
Browse files Browse the repository at this point in the history
* follow up for #2510

* Update modules/core/02-client/types/keys.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
  • Loading branch information
crodriguezvega and colin-axner committed Dec 1, 2022
1 parent a5e3249 commit 1986aaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (modules/core/02-client)[\#1676](https://github.com/cosmos/ibc-go/pull/1676) ClientState must be zeroed out for `UpgradeProposals` to pass validation. This prevents a proposal containing information governance is not actually voting on.
* (modules/core/keeper) [\#2403](https://github.com/cosmos/ibc-go/pull/2403) Added a function in keeper to cater for blank pointers.
* (modules/core/keeper) [\#2745](https://github.com/cosmos/ibc-go/pull/2745) Fix request wiring for `UpgradedConsensusState` in core query server.
* (core/02-client) [\#2510](https://github.com/cosmos/ibc-go/pull/2510) Fix client ID validation regex to conform closer to spec.

## [v5.1.0](https://github.com/cosmos/ibc-go/releases/tag/v5.1.0) - 2022-11-09

Expand Down
2 changes: 2 additions & 0 deletions modules/core/02-client/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ func FormatClientIdentifier(clientType string, sequence uint64) string {
// parsing client identifiers. The client identifier must be in the form: `{client-type}-{N}
// which per the specification only permits ASCII for the {client-type} segment and
// 1 to 20 digits for the {N} segment.
// `([\w-]+\w)?` allows for a letter or hyphen, with the {client-type} starting with a letter
// and ending with a letter, i.e. `letter+(letter|hypen+letter)?`.
var IsClientIDFormat = regexp.MustCompile(`^\w+([\w-]+\w)?-[0-9]{1,20}$`).MatchString

// IsValidClientID checks if the clientID is valid and can be parsed into the client
Expand Down

0 comments on commit 1986aaf

Please sign in to comment.