arj03 / ssb-browser-demo

A secure scuttlebutt client interface running in the browser
Other
58 stars 11 forks source link

Enforce size limits on messages #130

Closed KyleMaas closed 3 years ago

KyleMaas commented 3 years ago

Need to make sure that when we go to post a message that the size doesn't exceed the maximum per-message size for Scuttlebutt messages - 8KB including headers, according to:

https://scuttlebot.io/docs/message-types/post.html

KyleMaas commented 3 years ago

I was able to determine the actual message size. It's not 8KB. It's 8KiB. See the following commit:

https://github.com/ssbc/ssb-db/pull/112/commits/5461395a539201e3029e8255833b11ba7926510d

KyleMaas commented 3 years ago

Another reference to 8192 bytes:

https://github.com/ssb-js/ssb-validate/blob/main/index.js#L110