ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: GridFS
    • None
    • Go Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Detailed steps to reproduce the problem?

      GridFSBucket.OpenDownloadStream will panic instead of returning an error when a stored GridFS document has bad fields:

      • chunk n is neither int32 or int64 (a float64, for example)
      • chunk data isn't binary
      • the files document's chunkSize is negative

      Repro for case 1: https://github.com/10gen/go-driver-tools/blob/main/preston/repros/2.9.3/godriver_3137_test.go

      Definition of done: what must be done to consider the task complete?

      • For files chunkSize, OpenDownloadStream and OpenDownloadStreamByName should return an error if the data is bad
      • For chunk n or data, GridFSDownloadStream.Read and GridFSDownloadStream.Skip should return an error if the data is bad.
      • Ensure testing covers all cases

      The exact Go version used, with patch level:

      go1.27.3 darwin/arm64

      The exact version of the Go driver used:

      2.9.3

      Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.

      latest replica set

      The operating system and version (e.g. Windows 7, OSX 10.8, ...)

      OSX

      Security Vulnerabilities

      NA

            Assignee:
            Qingyang Hu
            Reporter:
            Preston Vasquez
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: