diff --git a/x/upgrade/CHANGELOG.md b/x/upgrade/CHANGELOG.md index 94422712d9f5..d3524d3022e5 100644 --- a/x/upgrade/CHANGELOG.md +++ b/x/upgrade/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#19443](https://github.com/cosmos/cosmos-sdk/pull/19443) `NewKeeper` takes an `appmodule.Environment` instead of individual services. +### Bug Fixes + +* [#19706](https://github.com/cosmos/cosmos-sdk/pull/19706) Stop treating inline JSON as a URL. + ## [v0.1.1](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.1) - 2023-12-11 ### Improvements diff --git a/x/upgrade/plan/info.go b/x/upgrade/plan/info.go index d05c985b5419..6f132032d96d 100644 --- a/x/upgrade/plan/info.go +++ b/x/upgrade/plan/info.go @@ -54,7 +54,7 @@ func ParseInfo(infoStr string, opts ...ParseOption) (*Info, error) { } // If it's a url, download it and treat the result as the real info. - if _, err := neturl.Parse(infoStr); err == nil { + if _, err := neturl.ParseRequestURI(infoStr); err == nil { if err := ValidateURL(infoStr, parseConfig.EnforceChecksum); err != nil { return nil, err } diff --git a/x/upgrade/plan/info_test.go b/x/upgrade/plan/info_test.go index c74b4e48437e..047cd49defa6 100644 --- a/x/upgrade/plan/info_test.go +++ b/x/upgrade/plan/info_test.go @@ -76,6 +76,12 @@ func (s *InfoTestSuite) TestParseInfo() { expectedInfo: nil, expectedInError: []string{"plan info must not be blank"}, }, + { + name: "empty JSON", + infoStrMaker: makeInfoStrFuncString("{}"), + expectedInfo: &Info{}, + expectedInError: nil, + }, { name: "json binaries is wrong data type", infoStrMaker: makeInfoStrFuncString(binariesWrongJSON),