[MONGOCRYPT-6] Explain gives incorrect listCollections filter Created: 02/Jun/19  Updated: 28/Oct/23  Resolved: 04/Jun/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Build libmongocrypt library

 Description   

After CDRIVER-3148, mongocrypt_ctx_encrypt_init was changed to accept the full command to be encrypted, and generate the listCollections filter based on the parsed collection name. For almost every collection command, the value of the first key is the collection name. However, explain is an exception. It wraps another command in a subdocument like so:

{ explain: { find: "coll", filter: {} }

This wasn't being parsed correctly and resulted in a listCollections filter with an empty collection name.



 Comments   
Comment by Githook User [ 03/Jun/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3163 fix command parsing + more tests
Branch: master
https://github.com/10gen/libmongocrypt/commit/834c9473a9dc348052bdca2c851ecd8820fa03a4

Generated at Thu Feb 08 09:07:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.