Skip to content

Commit

Permalink
URL-encode passwords entered on CLI
Browse files Browse the repository at this point in the history
Closes #62
  • Loading branch information
alxndrsn committed Mar 19, 2018
1 parent 58b75bb commit 77bae73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bin/medic-conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ switch(args[0]) {
//> instance URL handling:
case '--instance':
const password = readline.question(`${emoji.key} Password: `, { hideEchoBack:true });
instanceUrl = `https://admin:${password}@${args[1]}.medicmobile.org`;
const encodedPassword = encodeURIComponent(password);
instanceUrl = `https://admin:${encodedPassword}@${args[1]}.medicmobile.org`;
shift(2);
break;
case '--local':
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medic-conf",
"version": "1.11.5",
"version": "1.11.6",
"description": "Configure Medic Mobile deployments",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 77bae73

Please sign in to comment.