Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: x/upgrade ParseInfo consider some values as URLs #19686

Closed
1 task done
mhofman opened this issue Mar 7, 2024 · 4 comments · Fixed by #19706
Closed
1 task done

[Bug]: x/upgrade ParseInfo consider some values as URLs #19686

mhofman opened this issue Mar 7, 2024 · 4 comments · Fixed by #19706
Labels

Comments

@mhofman
Copy link

mhofman commented Mar 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Trying to use values such as {} for upgrade-info results in error missing checksum query parameter.

The problem is that ParseInfo attempts to parse the upgrade info as a URL and consider it as such if no error is returned. However most strings can parse as a valid URL, especially relative ones.

It should at least check that the URL is absolute.

Cosmos SDK Version

0.46

How to reproduce?

$ gaiad tx gov submit-proposal software-upgrade foo --upgrade-height 123 --upgrade-info '{}'
Error: missing checksum query parameter
@gibson042
Copy link
Contributor

The simplest fix is replacing Parse with ParseRequestURI: agoric-labs#405

@julienrbrt
Copy link
Member

The simplest fix is replacing Parse with ParseRequestURI: agoric-labs#405

Cool! Are you willing to submit a PR?

@julienrbrt
Copy link
Member

Error: missing checksum query parameter

FWIW, you can skip the upgrade info checks with a flag

@gibson042
Copy link
Contributor

Cool! Are you willing to submit a PR?

#19706

gibson042 added a commit to gibson042/cosmos-sdk that referenced this issue Mar 8, 2024
julienrbrt added a commit to gibson042/cosmos-sdk that referenced this issue Mar 16, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to 🥳 Done in Cosmos-SDK Mar 16, 2024
@tac0turtle tac0turtle removed this from Cosmos-SDK Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants