[GODRIVER-2083] Test serialization of BSON with embedded null bytes in strings Created: 15/Jul/21  Updated: 04/Nov/21  Resolved: 04/Nov/21

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.8.0

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

Issue Links:
Issue split
Related
is related to GODRIVER-1923 BSON cstrings are not properly validated Closed
Quarter: FY22Q3

 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 Githook User [ 04/Nov/21 ]

Author:

{'name': 'Gabriela Asuncion', 'email': 'gabriela.asuncion@mongodb.com', 'username': 'gabbyasuncion'}

Message: GODRIVER-2083: Test serialization of BSON with embedded null bytes in strings (#784)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/9fdc7d2f1266a002c9692163b1374c51b5e6a647

Generated at Thu Feb 08 08:37:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.