Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4420

Special Character in Database Name Doesn't Work as Expected in mongosh

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor - P4 Minor - P4
    • No version
    • 1.23.0
    • Compass
    • None
    • Not Needed

    Description

      This is for Compass 1.23.0-beta.2 but doesn't exist in the Jira field tag.

      In mongosh

      > use %3Cscript%3Ealert(1)%3C%2Fscript%3E
      > db.asdf.insertOne("hello":"test")

      generates an error, but the "%" character is allowed.

      https://docs.mongodb.com/manual/reference/limits/#restrictions-on-db-names

      In Compass UI, creating the database and adding a document is successful. The behavior is inconsistent.

      Related to https://jira.mongodb.org/browse/CLOUDP-70233

      Attachments

        Activity

          People

            Unassigned Unassigned
            felicia.hsieh@mongodb.com Felicia Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: