Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-951

Corrupt GridFS files can send GridOut.read / readline into an infinite loop

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.3, 2.9
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 21

      Description

      A test case that hangs at GridOut.read:

      import pymongo
      from bson.binary import Binary
      from gridfs import GridFS
      client = pymongo.MongoClient()
      db = client.test
      gfs = GridFS(db)
      files_id = gfs.put('foobar')
      db.fs.chunks.update({'files_id': files_id}, {'$set': {'data': Binary('foo', 0)}})
      out = gfs.get(files_id)
      out.read()
      

      The same problem occurs in GridOut.readline.

      This problem was reported here: https://github.com/mongodb/mongo-python-driver/pull/271

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: