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

politeiad: Plugin metadata JSON bug. #1432

Open
lukebp opened this issue Jun 18, 2021 · 1 comment
Open

politeiad: Plugin metadata JSON bug. #1432

lukebp opened this issue Jun 18, 2021 · 1 comment
Labels
blocked bug A bug that made it into a production enviroment.

Comments

@lukebp
Copy link
Member

lukebp commented Jun 18, 2021

The plugin hooks add plugin specific validation to record submissions and updates. A case that was not considered was if the client provides a valid base64 metadata payload, but that contains invalid JSON. This causes politeiad to fail with a 500 instead of handling the error gracefully with a UserErrorReply.

Attribution
This bug was introduced by #1180. It was the result of not considering all input edge cases.

Prevention
Test cases for invalid JSON should be added for all plugin metadata validation. A testing framework has not been setup yet for the politeiad plugins. This will be added by #1494.

@lukebp lukebp added the bug A bug that made it into a production enviroment. label Jun 18, 2021
@lukebp lukebp added this to the v1.1.0 milestone Jun 18, 2021
@lukebp
Copy link
Member Author

lukebp commented Jun 28, 2021

Blocked by #1406

@lukebp lukebp removed this from the v1.1.0 milestone Aug 3, 2021
@lukebp lukebp removed the 91cfcc8 label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug A bug that made it into a production enviroment.
Projects
None yet
Development

No branches or pull requests

1 participant