10gen / mongo-orchestration

Apache License 2.0
7 stars 11 forks source link

Use json_util.dumps to encode all responses #229

Closed ShaneHarvey closed 7 years ago

ShaneHarvey commented 7 years ago

This change prevents MO from responding with the raw buildInfo command response which might contain BSON types that are not JSON serializable.

Related to https://github.com/10gen/mongo-orchestration/pull/222 and http://jira.mongodb.org/browse/SERVER-27773.

ShaneHarvey commented 7 years ago

@behackett @llvtt I decided to keep "serverInfo" in the response and simply whitelist some fields that we know are acceptable instead of using json_util. I believe this was the only place MO sent a raw command response to the client so this should be just as future proof. Thoughts?