Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-887

Panic when passing in UploadOptions with Metadata but no Registry to bucket.OpenUploadStream

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.0.1
    • 1.0.0
    • GridFS
    • None

    Description

      Passing in an UploadOptions specifying Metadata but not Registry to bucket.OpenUploadStream causes the driver to panic due to a nil pointer dereference.

      This is due to the options.GridFSUpload constructor not setting the default registry as the docstring suggests, and the lack of a nil check in parseUploadOptions, where the panic actually occurs.

      Attachments

        Activity

          People

            patrick.freed@mongodb.com Patrick Freed
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: