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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Minor - P4
    • No version
    • Affects Version/s: 1.23.0
    • Component/s: Compass
    • None
    • Not Needed
    • None

      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

        1. image-2020-09-18-09-48-21-549.png
          33 kB
          Massimiliano Marcon
        2. Screen Shot 2020-09-17 at 7.59.07 PM.png
          69 kB
          Felicia Hsieh
        3. Screen Shot 2020-09-17 at 8.14.48 PM.png
          250 kB
          Felicia Hsieh

            Assignee:
            Unassigned
            Reporter:
            Felicia Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: