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

Database name validation for special characters

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.9.3, 3.2.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The python driver considers "$" to be an invalid character in a database name:
      https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/database.py#L44

      But it should be valid on Linux and Unix systems:
      https://docs.mongodb.org/v2.6/reference/limits/#Restrictions-on-Database-Names-for-Unix-and-Linux-Systems

      I didn't find any Windows or Linux specific code in pymongo, so maybe pymongo doesn't support any platform specific behavior by design? If that's the case, it'd be nice to get a confirmation.

      Additionally, The double quote character should be invalid on all platforms, but passes pymongo's validation.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: