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

Add basic UnixFS sanity check to 'ipfs files cp' #10331

Open
Tracked by #10580 ...
lidel opened this issue Feb 5, 2024 · 1 comment
Open
Tracked by #10580 ...

Add basic UnixFS sanity check to 'ipfs files cp' #10331

lidel opened this issue Feb 5, 2024 · 1 comment
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

Comments

@lidel
Copy link
Member

lidel commented Feb 5, 2024

#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 than raw or dag-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 for rm, but not cp)

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization topic/MFS Topic MFS labels Feb 5, 2024
@SgtPooki
Copy link
Member

SgtPooki commented Feb 5, 2024

When people attempt to add content that is not unixfs to MFS, should we prompt users to re-encode the data as unix-fs? I feel like the majority of webui users are unaware what type of content CIDs they're passing around is, and likely just want to add it to webui/desktop. The easier we make that, the happier they would be.

@lidel lidel added help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Feb 13, 2024
@lidel lidel mentioned this issue Sep 10, 2024
34 tasks
@gammazero gammazero mentioned this issue Oct 17, 2024
28 tasks
@lidel lidel mentioned this issue Nov 14, 2024
47 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants