[DRIVERS-101] BSON cstring with null bytes should not be allowed Created: 19/Jul/13  Updated: 15/Apr/19  Resolved: 22/Jun/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Barrie Segal Assignee: Barrie Segal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CXX-519 Ensure null bytes are not allowed wit... Closed
Duplicate
is duplicated by SERVER-7005 Documents containing keys with embedd... Closed
Related
related to CSHARP-788 Strengthen checks for nulls in CStrings Closed
is related to JAVA-891 Document fields accept NULL characters Closed
is related to PHPC-891 BSON encoding should throw if PHP key... Closed
is related to RUBY-646 Ensure we check for null characters i... Closed
is related to PHPC-721 Javascript constructor should throw i... Closed
is related to PHPC-724 Regex constructor should throw if pat... Closed
Driver Compliance:
Key Status/Resolution FixVersion
CXX-519 Done legacy-1.0.1

 Description   

The BSON spec defines two string types:

  • The "string" type is a sequence of bytes encoded with a length. This sequence can include null bytes since the length of the sequence is encoded.
  • The "cstring" type is a null terminated sequence of bytes. It is not encoded with a length. The sequence ends with a null byte so it can not include null bytes.

This ticket is to validate that drivers do not allow sequences including null bytes wherever a cstring is required (e.g. document keys, database and collection name, regular expressions, ...)


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