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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.0.1
    • Affects Version/s: 1.0.0
    • Component/s: GridFS
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Patrick Freed
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: