Add basic UnixFS sanity check to 'ipfs files cp' #10331
Open
Labels
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
topic/MFS
Topic MFS
#7999, #8144, #7172 still hunts us ipfs/ipfs-webui#2205.
I think we should make
ipfs files cp /ipfs/cid /mfs-destination
at least check the root cid, and error if it is not a valid UnixFS node or has codec other thanraw
ordag-pb
.This way it is less likely people import non-UnixFS to MFS (majority of time, it will be root cid at fault). This would fix both CLI and ipfs-webui.
ps. while we are at this, we should also add
--force
mentioned in #2074 (we already have it forrm
, but notcp
)The text was updated successfully, but these errors were encountered: