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

Update multihash dependency to fix panic on some types of bad input #135

Closed
wants to merge 1 commit into from

Conversation

mattheworris
Copy link
Contributor

multihash:0.18.0 can panic on some types of bad input.
Require v0.18.1 in dependencies to avoid panics.

See the following pull request for more information:
multiformats/rust-multihash#293

mattheworris added a commit to frequency-chain/frequency that referenced this pull request Apr 17, 2023
# Goal
The goal of this PR is to add a unit test in the messages pallet to
detect a panic on some types of bad cids.
`multihash` v0.18.1 fixes an issue with calling `unwrap()` on certain
types of errors in a `no-std` environment.
`multihash` is included by the `cid` crate used for IPFS messages.
[`Cargo.lock` was updated by another PR before this was merged, so
v0.18.1 is already there]

Closes #1233 

Further updates in progress #1417 
multiformats/rust-cid#135
@vmx
Copy link
Member

vmx commented Sep 11, 2023

I totally missed that PR. A cargo update in your dependency tree should also lead to that version.

Current master branch is now at multihash v0.19, which contains that fix.

@vmx vmx closed this Sep 11, 2023
@mattheworris
Copy link
Contributor Author

I totally missed that PR. A cargo update in your dependency tree should also lead to that version.

Current master branch is now at multihash v0.19, which contains that fix.

Do you recommend using the master branch in the cargo dependencies or will there be a new release to crates.io?
We're using cid = 0.10.1 as a dependency, so cargo update is not resolving to multihash v0.19.

@vmx
Copy link
Member

vmx commented Sep 11, 2023

We're using cid = 0.10.1 as a dependency, so cargo update is not resolving to multihash v0.19.

But cid v0.10.1 should resolve to multihash v0.18.1.

@mattheworris
Copy link
Contributor Author

mattheworris commented Sep 28, 2023 via email

rustadot pushed a commit to rustadot/recurrency that referenced this pull request Sep 5, 2024
# Goal
The goal of this PR is to add a unit test in the messages pallet to
detect a panic on some types of bad cids.
`multihash` v0.18.1 fixes an issue with calling `unwrap()` on certain
types of errors in a `no-std` environment.
`multihash` is included by the `cid` crate used for IPFS messages.
[`Cargo.lock` was updated by another PR before this was merged, so
v0.18.1 is already there]

Closes #1233 

Further updates in progress #1417 
multiformats/rust-cid#135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants