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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Storage Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: