Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25059

URL support needs to support percent-encoding (escape sequences)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: 3.3.9
    • Component/s: Shell
    • None
    • ALL
    • Platforms 2017-08-21

      mongo --authenticationDatabase admin -u MrAt -p @
      MongoDB shell version: 3.3.9
      connecting to: 127.0.0.1:27017/test
      MongoDB server version: 3.2.6
      WARNING: shell and server versions do not match
      ...
      

      Cool.

      mongo mongodb://MrAt:@@localhost/admin
      FailedToParse: Bad digit "@" while parsing @@localhost
      ...
      

      Yeah, fair enough.

      mongo mongodb://MrAt:%40@localhost/admin
      MongoDB shell version: 3.3.9
      connecting to: mongodb://MrAt:%40@localhost/admin
      2016-07-14T16:32:13.168+1000 E QUERY    [thread1] Error: Authentication failed. :
      connect@src/mongo/shell/mongo.js:221:14
      @(connect):1:6
      
      exception: connect failed
      

      Poor MrAt.

      mongo mongodb://MrPercent:%@localhost/admin
      MongoDB shell version: 3.3.9
      connecting to: mongodb://MrPercent:%@localhost/admin
      MongoDB server version: 3.2.6
      WARNING: shell and server versions do not match
      16:29:32@admin>^C
      bye
      

      MrPercent is a happy camper. Although he shouldn't be.

      According to the specification this is the wrong way around. The escaped passwords should work, and the unescaped versions should fail.

      URL option needs to support escape sequences.

            Assignee:
            tyler.kaye@mongodb.com Tyler Kaye
            Reporter:
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: