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

dht put doesn't interact well with binary data #5112

Closed
Stebalien opened this issue Jun 14, 2018 · 0 comments · Fixed by #6750
Closed

dht put doesn't interact well with binary data #5112

Stebalien opened this issue Jun 14, 2018 · 0 comments · Fixed by #6750
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands

Comments

@Stebalien
Copy link
Member

Currently, ipfs dht put allows users to put "arbitrary" values into the DHT. Unfortunately, this doesn't interact well with binary data. Due to how the CLI works, we can't pipe arbitrary binary stdin because each "line" will be interpreted as a new argument. We can't pass it in as an argument because it may contain null bytes.

The DHT commands should probably take files as input (or base64 decode the value).

@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) topic/commands Topic commands labels Jun 14, 2018
@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
Stebalien added a commit that referenced this issue Nov 5, 2019
Stdin can't have newlines, command-line arguments can't include null characters,
DHT values can include both.

This is a breaking change but this API has never worked anyways.

fixes #5112
pontiyaraja pushed a commit to pontiyaraja/go-ipfs that referenced this issue Dec 27, 2019
Stdin can't have newlines, command-line arguments can't include null characters,
DHT values can include both.

This is a breaking change but this API has never worked anyways.

fixes ipfs#5112
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 6, 2020
Stdin can't have newlines, command-line arguments can't include null characters,
DHT values can include both.

This is a breaking change but this API has never worked anyways.

fixes ipfs#5112
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
Stdin can't have newlines, command-line arguments can't include null characters,
DHT values can include both.

This is a breaking change but this API has never worked anyways.

fixes ipfs#5112
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
Stdin can't have newlines, command-line arguments can't include null characters,
DHT values can include both.

This is a breaking change but this API has never worked anyways.

fixes ipfs#5112
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) topic/commands Topic commands
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant