Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Erronous namespace to CID encoding #10

Closed
vyzo opened this issue Feb 14, 2019 · 2 comments
Closed

Erronous namespace to CID encoding #10

vyzo opened this issue Feb 14, 2019 · 2 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@vyzo
Copy link
Contributor

vyzo commented Feb 14, 2019

While researching a bug, I discovered that the conversion of namespace to CID in nsToCID is completely erroneous.
It uses mh.Encode([]byte(ns), mh.SHA2_256) instead of mh.Sum(...) which constructs an invalid multihash.

@vyzo vyzo added the kind/bug A bug in existing code (including security flaws) label Feb 14, 2019
@vyzo vyzo self-assigned this Feb 14, 2019
@vyzo
Copy link
Contributor Author

vyzo commented Feb 14, 2019

cc @Stebalien @raulk

@ghost ghost added the status/in-progress In progress label Feb 14, 2019
@vyzo
Copy link
Contributor Author

vyzo commented Feb 14, 2019

Fix in #11.

@vyzo vyzo closed this as completed in #11 Feb 14, 2019
@ghost ghost removed the status/in-progress In progress label Feb 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

1 participant