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: the length of the identity hash must be equal to the length of the data #6007

Closed
ivan386 opened this issue Feb 20, 2019 · 4 comments · Fixed by #6010
Closed

BUG: the length of the identity hash must be equal to the length of the data #6007

ivan386 opened this issue Feb 20, 2019 · 4 comments · Fixed by #6010
Assignees
Labels
kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP

Comments

@ivan386
Copy link
Contributor

ivan386 commented Feb 20, 2019

Version information:

Version "0.4.19-dev"
Commit "ef94a43e8"
Repo "7"
System "amd64/linux"
Golang "go1.11.4"

Type: Bug

Description:

I try to open this link:

https://ipfs.io/ipfs/uAXAASxJFCjoBcAA2EjAKIhIg-BnibCPDDbicOSNiGB_lIYDbHBAGRwaLnjjbSOE-1ssSCjIwMTkuMDIuMjAKAggBEgdpcGZzLmlvCgIIAQ/

And get this error:

ipfs cat /ipfs/uAXAASxJFCjoBcAA2EjAKIhIg-BnibCPDDbicOSNiGB_lIYDbHBAGRwaLnjjbSOE-1ssSCjIwMTkuMDIuMjAKAggBEgdpcGZzLmlvCgIIAQ/: the length of the identity hash (75) must be equal to the length of the data (77)

On other gateway it works

@Stebalien Stebalien added P0 Critical: Tackled by core team ASAP kind/bug A bug in existing code (including security flaws) labels Feb 20, 2019
@Stebalien
Copy link
Member

Fix part one: ipfs/go-cid#84. However, I believe the problem is deeper. Do you remember how you ended up creating that object?

@Stebalien
Copy link
Member

Ah, nevermind. I thought the data had gotten corrupted. It turns out we're just trying to recompute the CID somewhere and failing.

This was referenced Feb 21, 2019
@ghost ghost assigned Stebalien Feb 21, 2019
@ghost ghost added the status/in-progress In progress label Feb 21, 2019
@ghost ghost removed the status/in-progress In progress label Feb 21, 2019
@ivan386
Copy link
Contributor Author

ivan386 commented Feb 21, 2019

Do you remember how you ended up creating that object?

I use js-ipfs-wrap-with-directory script to generate ID hash from directory structure.

wrap_files_with_directory({
    "ipfs.io":{
        "2019.02.20" : "Qmf38iBq7nsjP3tBhppnpx61FMSPG5pbcbW6MTnYfnApcA"
    },
})

result

/ipfs/uAXAASxJFCjoBcAA2EjAKIhIg-BnibCPDDbicOSNiGB_lIYDbHBAGRwaLnjjbSOE-1ssSCjIwMTkuMDIuMjAKAggBEgdpcGZzLmlvCgIIAQ/

@Stebalien
Copy link
Member

Got it. I just wanted to make sure go-ipfs wasn't generating really long inlined objects unless requested by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants