Skip to content

fix: multibase in pubsub http rpc#8183

Merged
lidel merged 17 commits intoipfs:masterfrom
coryschwartz:feat/pubsub-require-multibase
Nov 29, 2021
Merged

fix: multibase in pubsub http rpc#8183
lidel merged 17 commits intoipfs:masterfrom
coryschwartz:feat/pubsub-require-multibase

Conversation

@coryschwartz
Copy link

@coryschwartz coryschwartz commented Jun 9, 2021

This PR got picked up by @lidel, who created below high level description:

This updates HTTP RPC wire format to wrap binary data in multibase to fix bug entire class of bugs described in #7939

TODO

Closes #7939
Closes #8454


Click to expand original description from Cory
  • Rather than newline-delimeted string args, data passed on stdin for ipfs pubsub pub gets wrapped in multibase
  • data, topic, and seqno are expected to be multibase encoded on the HTTP API

multibase encoding does not remain throughout the entire system, only for publishing. My thinking is that in json responses, the data is already base64-encoded. multibase-encoded url-strings provides some benefit to producers, but there would be a size penalty for subscribers that have double-encoded. I could be convinced otherwise, though.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/api/v0/pubsub/pub should use body for payload Pubsub subscription data encoding

4 participants