[SERVER-38888] Remove the null terminator check in IndexCatalogImpl::_isSpecOk() for the 'name' field Created: 08/Jan/19 Updated: 27/Oct/23 Resolved: 08/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Gregory Wlodarek | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Storage Execution
|
| Participants: |
| Description |
|
Right now if we pass an index spec with the 'name' field set to "f\0o", for example, then getting the string representation from the BSON element, using valueStringData(), returns "f". After this, we check if the string representation contains '\0', which could be safely removed since we should never encounter this scenario.
See here |
| Comments |
| Comment by Gregory Wlodarek [ 08/Jan/19 ] |
|
Turns out that simply passing "f\0o" to the BSON is incorrect, the correct way is to pass in "f\0o"_sd. |