[CXX-2309] Test serialization of BSON with embedded null bytes in strings Created: 15/Jul/21  Updated: 12/Jun/23

Status: Blocked
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: size-small
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CXX-2087 Implement All Relevant Spec Tests Backlog
Issue split
Quarter: FY24Q3

 Description   

Downstream changes: drivers should sync BSON corpus spec tests with mongodb/specifications@ff5d91f. Specifically:

  • There are new decodeErrors tests for document.json, regex.json, and top.json
  • There are new parseErrors tests for top.json
  • There are new prose tests for encoding BSON documents and regex types.

Existing language in the spec was also relaxed to no longer require drivers to successfully parse parseErrors tests in binary.json and top.json with a non-Extended JSON parser (to check for general JSON syntax errors). Also, an allowance was made for drivers that parse Extended JSON directly into language types (with regard to evaluating parseErrors).


Per DRIVERS-101, drivers are expected to validate that C strings do not contain embedded null bytes.

We should add spec or prose tests to verify BSON C strings with embedded null bytes are rejected when serialized.



 Comments   
Comment by Roberto Sanchez [ 08/Mar/23 ]

At the moment, BSON corpus tests are not included in the C++ driver. The implementation of a BSON corpus tester (CXX-2087) is necessary in order to complete this ticket.

Generated at Wed Feb 07 22:05:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.