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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.10, 4.1.12
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • v4.0

      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.

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

              Created:
              Updated:
              Resolved: