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

Password basestring type check

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.8, 3.0
    • Affects Version/s: 2.7
    • Component/s: None
    • Labels:
      None

      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

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            Winnetou Mieszko Chowaniec [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: