Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-77109

Remove canonicalizeType from IDLParserContext::checkAndAssertCollectionName

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Server Security

      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.

            Assignee:
            backlog-server-security [DO NOT USE] Backlog - Security Team
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: