[SERVER-54003] Validate BSON type to be array when parsing BSON object to Array Created: 24/Jan/21  Updated: 29/Oct/23  Resolved: 26/Jan/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0-alpha3

Type: Task Priority: Major - P3
Reporter: Moustafa Maher Assignee: Moustafa Maher
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Sprint: Repl 2021-02-08
Participants:

 Description   

We allow BSON representation of an Array to be parsed to array without checking the type of the BSON object , ex: *

{“0” : “hello”, “1” : “world” }

* is accepted as array<string> => [“hello”, “world”]

As we adding more strict rules to our inputs/outputs for our command, we will enforce that BSON should be of array type to be parsed as array, to prevent future confusion if we start accepting (Object, array) types for the same field.

 



 Comments   
Comment by Githook User [ 26/Jan/21 ]

Author:

{'name': 'Moustafa Maher', 'email': 'm.maher@10gen.com', 'username': 'moustafamaher'}

Message: SERVER-54003 Validate BSON type to be array when parsing BSON object to Array
Branch: master
https://github.com/mongodb/mongo/commit/593de2a7ed6e6717ed35112c63ab3ee38b825851

Generated at Thu Feb 08 05:32:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.