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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.1
    • Affects Version/s: 1.0.0
    • Component/s: GridFS
    • None

      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.

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

              Created:
              Updated:
              Resolved: