This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
ipfs.files.add with {cidVersion: 1} returns valid hash with undefined size #1585
Labels
exp/novice
Someone with a little familiarity can pick up
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
Type: Bug
Severity: High
Description:
For some inputs
ipfs.files.add
with{cidVersion: 1}
returns valid CID howeversize
field isundefined
. The problem does not occur if{cidVersion: 0}
is used.Result of ipfs.files.add (CIDv0)
Result of ipfs.files.add (CIDv1)
Steps to reproduce the error:
Did not look into details, but I attach test case that illustrates the issue: js-ipfs-add-cidv1-missing-size-bug-repro.zip.
To run it:
yarn && yarn test
(ornpm install && npm test
).Hope this helps.
The text was updated successfully, but these errors were encountered: