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

Illegal JSON in Event Signing test vectors #2023

Closed
JJJollyjim opened this issue May 26, 2019 · 0 comments · Fixed by #2047
Closed

Illegal JSON in Event Signing test vectors #2023

JJJollyjim opened this issue May 26, 2019 · 0 comments · Fixed by #2047
Assignees
Labels
meta Something that is not a spec change/request and is not related to the build tools spec-bug Something which is in the spec, but is wrong

Comments

@JJJollyjim
Copy link
Contributor

The content section of the second test case in Appendix 7.3 contains a trailing comma, both before and after signing:

https://github.com/matrix-org/matrix-doc/blob/c1b630e975f2cde0b0101a46b11751dee204c666/specification/appendices/test_vectors.rst#L131-L133

https://github.com/matrix-org/matrix-doc/blob/c1b630e975f2cde0b0101a46b11751dee204c666/specification/appendices/test_vectors.rst#L151-L153

While this is allowed in modern JavaScript, it is disallowed in JSON, which predates the JavaScript spec, and is rejected by most parsers.

From json.org

@turt2live turt2live added meta Something that is not a spec change/request and is not related to the build tools spec-bug Something which is in the spec, but is wrong labels May 28, 2019
@turt2live turt2live added this to To add to spec in Matrix 1.0 workflow via automation May 28, 2019
@turt2live turt2live moved this from To add to spec to Nice to have bug/omission fixes in Matrix 1.0 workflow May 28, 2019
@turt2live turt2live self-assigned this May 28, 2019
@turt2live turt2live moved this from Nice to have bug/omission fixes to In progress in Matrix 1.0 workflow May 28, 2019
turt2live added a commit that referenced this issue May 29, 2019
Fixes #2023

The content hashes appear correct, however applying the algorithm defined in the spec never resulted in the signatures previously demonstrated.
Matrix 1.0 workflow automation moved this from In progress to Done Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Something that is not a spec change/request and is not related to the build tools spec-bug Something which is in the spec, but is wrong
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants