This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
ipfs.files.add with {cidVersion: 1} returns CID of an empty file #1518
Description
This was originally found as a part of #1440 and ipfs/js-ipfs-http-response#9
- Version: js-ipfs 0.31.6
- Platform: Node
- Subsystem:
Type: Bug
Severity: High
Description:
For some inputs ipfs.files.add
with {cidVersion: 1}
returns a CIDv1 of an empty file, instead of CID for the actual input buffer.
The problem does not occur if {cidVersion: 0}
is used.
Steps to reproduce the error:
I attach test case that illustrates the issue: js-ipfs-add-cidv1-bug-repro.zip
To run it: yarn && yarn test
(or npm install && npm test
)