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

Handle passwords without EOF

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      The tools panic when they get a password without an EOF. Consequently, users are unable to supply passwords in the following way:

      echo -n $PASSWORD | mongodump -u admin -p

      We can fix this by checking if there's any data in the pipe, e.g.
       

      bytes, _ := ioutil.ReadAll(os.Stdin)
      password := string(bytes)  

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            varsha.subrahmanyam@mongodb.com Varsha Subrahmanyam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: