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

Password basestring type check

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial - P5
    • Resolution: Fixed
    • 2.7
    • 2.8, 3.0
    • None
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: