Handle passwords without EOF

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: 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
              Reporter:
              Varsha Subrahmanyam (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: