Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-2290

mongorestore should not treat % in collection names as URL escape character

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.10, 4.1.12
    • Component/s: None
    • Labels:
      None

      Description

      mongorestore treats % characters as URL escape characters instead of literal characters when parsing collection names:

      marko$ mongodump --archive --port 44444 | mongorestore --archive --port 44444
      2019-05-13T11:12:16.346-0400    writing admin.system.version to archive on stdout
      2019-05-13T11:12:16.348-0400    done dumping admin.system.version (1 document)
      2019-05-13T11:12:16.348-0400    writing redacted.test<% env %>test to archive on stdout
      2019-05-13T11:12:16.351-0400    done dumping redacted.test<% env %>test (1 document)
      2019-05-13T11:12:16.360-0400    Failed: corruption found in archive; ParserConsumer.BodyBSON() ( invalid URL escape "% e" )
      

      It should not treat % characters as URL escape characters when parsing collection names since they are valid characters to use in collection names according to https://docs.mongodb.com/manual/reference/limits/#restrictions-on-collection-names.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                patrick.freed Patrick Freed
                Reporter:
                marko.vojvodic Marko Vojvodic
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: