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

Password basestring type check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.8, 3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 12

      Description

      In [1]: from pymongo import MongoClient
      In [2]: m = MongoClient()
      In [3]: mypass = ''
      In [4]: isinstance(mypass, basestring)
      Out [4]: True
      In [5]: m.admin.authenticate('myuser', mypass)
      ....
      ....
      File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 215, in authenticate_mongo_cr
      key = auth_key(nonce, username, password)
      File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 76, in _auth_key
      digest = _password_digest(username, password)
      File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 60, in _password_digest
      "of %s" % (basestring.__name,))
      TypeError: password must be an instance of basestring

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: