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

assert canonical base64 on top level properties #11

Closed
wants to merge 2 commits into from

Conversation

dominictarr
Copy link
Contributor

previous, author, signature and content (if it's a string) are now checked to be valid canonical base64 strings. strings inside content are not checked (they may be inside markdown text anyway) are not checked.
It makes sense that another implementation may wish to encode the top level object in a binary representation, but I think if they encounter strings within the content that are not canonical base64 they should consider them invalid, and just represent them as arbitrary strings.

@AljoschaMeyer

@dominictarr
Copy link
Contributor Author

note, this PR depends on ssbc/ssb-ref#21

@AljoschaMeyer
Copy link

AljoschaMeyer commented Oct 21, 2018

Yeah, non-metadata strings don't need to be verified in any special way. They need to adhere to some constraints, but the js implementation enforces those automatically through the JSON.encode(JSON.decode()) roundtrip.

As for unambiguous detection of cypherlinks, that's something hsdt will (most likely) add to ssb.

@arj03
Copy link
Member

arj03 commented Oct 23, 2018

@dominictarr
Copy link
Contributor Author

dominictarr commented Oct 23, 2018 via email

@dominictarr
Copy link
Contributor Author

merged in f1dd1cd

@christianbundy christianbundy deleted the canonical branch August 25, 2020 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants