Fix legacy shell crash if an auto-encryption function is called on closed Mongo connection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Security 2023-08-07
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-77600 added the ability to set and toggle auto-encryption on an existing Mongo connection. This added new functions to the Mongo object namely: set/unsetAutoEncryption(), toggleAutoEncryption(), isAutoEncryptionEnabled(), and getAutoEncryptionOptions().  If these functions are called after the connection was closed, it results in a segmentation fault, since these functions do not check the private data shared pointer before dereferencing it.  The proper behavior is to throw an exception.

              Assignee:
              Erwin Pe
              Reporter:
              Erwin Pe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: