[GODRIVER-1805] Investigate whether BSON can fail to parse if an undefined document field contains a nested document or array Created: 02/Dec/20  Updated: 28/Oct/23  Resolved: 14/Dec/20

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Task Priority: Major - P3
Reporter: Benji Rewis (Inactive) Assignee: Benji Rewis (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Related to GODRIVER-1235.

Investigate whether BSON parsing can fail if a source BSON document contains a document field that is not represented in the target struct and that document contains a nested document or array. Verify that unmarshalling in this case does not fail or incorrectly skip too many fields.

You'll want to examine value_reader.go and the Skip() function on line 330.



 Comments   
Comment by Benji Rewis (Inactive) [ 08/Mar/21 ]

Cherry-picked onto release/1.5 with https://github.com/mongodb/mongo-go-driver/commit/8cceae16aa6305d672962ce11f0d0b997831b540 

Comment by Githook User [ 14/Dec/20 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: GODRIVER-1805 Add tests for unmarshalling BSON with undefined fields (#552)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/8cceae16aa6305d672962ce11f0d0b997831b540

Comment by Benji Rewis (Inactive) [ 10/Dec/20 ]

https://github.com/mongodb/mongo-go-driver/pull/552

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