[SERVER-77109] Remove canonicalizeType from IDLParserContext::checkAndAssertCollectionName Created: 12/May/23  Updated: 30/May/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Backlog - Security Team
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Security
Participants:

 Description   

This code

 const bool isUUID = (element.canonicalType() == canonicalizeBSONType(mongo::BinData) &&

can be simplified by just using type().

The other call

element.canonicalType() == canonicalizeBSONType(mongo::String)

can be simplified to

type() == Symbol || type == String

Same simplification can be done to CommandHelpers::parseNsCollectionRequired.


Generated at Thu Feb 08 06:34:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.