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

Explore whether uassert validation of the nss can be done in the NamespaceStringOrUUID class via its constructor

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Storage
    • None
    • Storage Execution

    Description

      NamespaceStringOrUUID performs no validation of the NamespaceString that can be passed in, and then blindly returns the value to any callers of NamespaceStringOrUUID::nss(). This is rather inconvenient because we must still pair using the nss() returns with something like CollectionCatalog:: resolveNamespaceStringOrUUID to do the nss validation, and we get something like this:

      if (nssOrUUID.nss()) {
          auto nss = collectionCatalog->resolveNamespaceStringOrUUID(nssOrUUID);
          ....
      }
      

      We cannot trust anything returned from NamespaceStringOrUUID. UUIDs are at least generated internally, so they seem to be reliable.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: