[SERVER-61846] Prevent redact from throwing BSONObjectTooLarge Created: 02/Dec/21 Updated: 29/Oct/23 Resolved: 13/Dec/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 5.2.0, 5.0.6, 4.4.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Haley Connelly | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v5.2, v5.0, v4.4
|
||||||||||||||||
| Steps To Reproduce: | The described behavior is demonstrated by adding the following to redaction_test.cpp
|
||||||||||||||||
| Sprint: | Execution Team 2021-12-13 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
redact replaces BSONObj field values with the kRedactionDefaultMask string "###". A redacted BSONObj can throw BSONObjectTooLarge if a valid BSONObj has many fields with values smaller than the kRedactionDefaultMask string size. ex) This can cause real problems on startup if, say, we try to apply a large oplog entry close to the limit full of arrays of ints that get expanded to "###" and cause the startup to fail with a DBException |
| Comments |
| Comment by Githook User [ 16/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 886e09ce457d5cdbef16710678c386ec6765db3c) |
| Comment by Githook User [ 16/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit c8de2a7f419f2486780fed5ae06ade4e78aa2a5d) |
| Comment by Githook User [ 16/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 886e09ce457d5cdbef16710678c386ec6765db3c) |
| Comment by Githook User [ 16/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit c8de2a7f419f2486780fed5ae06ade4e78aa2a5d) |
| Comment by Githook User [ 15/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 15/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Benety Goh [ 15/Dec/21 ] |
|
This redaction changes in this ticket builds on the BSONArray work done in |
| Comment by Githook User [ 13/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 13/Dec/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |