-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Currently libmongoc's bulk write API does not validate BSON keys in documents when doing update/insert.
No keys starting with "$" or containing ".":
- mongoc_collection_insert - tested in test_insert
- mongoc_collection_insert_bulk - test_insert_bulk
- mongoc_bulk_operation_insert - test_insert_check_keys
- mongoc_collection_save - test_save
- "document" param to mongoc_bulk_operation_replace_one - test_replace_one_check_keys
- "document" param to mongoc_bulk_operation_replace_one_with_opts - test_replace_one_with_opts_check_keys
All keys must start with "$":
- "document" param to mongoc_bulk_operation_update - test_update_check_keys
- "document" param to mongoc_bulk_operation_update_many_with_opts - test_update_many_with_opts_check_keys
- "document" param to mongoc_bulk_operation_update_one - test_update_one_check_keys
- "document" param to mongoc_bulk_operation_update_one_with_opts - test_update_one_with_opts_check_keys
- is depended on by
-
PHPC-712 Driver should validate BSON documents before insert and update
- Closed
-
DRIVERS-308 BSON Key Validation in Drivers
- Closed
- is duplicated by
-
CDRIVER-1111 Provide error feedback for invalid newObj arg to update/replace functions
- Closed
- related to
-
CDRIVER-2017 Inconsistent error reporting for insert, update, and replace BSON validation
- Closed
-
CDRIVER-1932 mongoc_collection_update() omits validation entirely for update documents
- Closed
-
CDRIVER-2265 Overly validating documents in bulk inserts
- Closed
-
CDRIVER-2016 Report offending field name in BSON validation errors
- Closed
-
PHPC-579 Throw exception for invalid BulkWrite::update() newObj argument
- Closed