[SERVER-40510] Distinct command can create an invalid BSON projection spec if key contains embedded null byte Created: 05/Apr/19  Updated: 29/Oct/23  Resolved: 12/Apr/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.1.11

Type: Bug Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Martin Neupauer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2019-05-06
Participants:
Linked BF Score: 58

 Description   

As of SERVER-40089, the distinct key may be used to create a projection spec in the resulting canonical query. However, if the key contains an embedded null byte then we'll create an invalid BSON since BSON keys are null-terminated (while values are not, they are allowed to contain null bytes).



 Comments   
Comment by Githook User [ 12/Apr/19 ]

Author:

{'email': 'martin.neupauer@mongodb.com', 'name': 'Martin Neupauer', 'username': 'MartinNeupauer'}

Message: SERVER-40510 Distinct command can create an invalid BSON projection spec if key contains embedded null byte
Branch: master
https://github.com/mongodb/mongo/commit/57d32f66ca23e0f4a49894e65b8472b5eabe00da

Generated at Thu Feb 08 04:55:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.