Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1045

Segfault if username is not provided for SCRAM-SHA-1 authMechanism

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.3
    • Affects Version/s: 1.3.2
    • Component/s: None
    • Labels:
      None

      A segfault reported in mongodb/mongo-php-driver#666 appears to come from the following usage of the PHP driver:

      <?php
      
      // A null connection string defaults to "mongodb://127.0.0.1:27017"
      $m = new MongoDB\Driver\Manager(null, ['authMechanism' => 'SCRAM-SHA-1', 'ssl' => false]);
      
      // Execute a basic ping command to trigger connection initialization
      $c = $m->executeCommand('admin', new MongoDB\Driver\Command(['ping'=>1]));
      var_dump($c->toArray()[0]);
      

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: