aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-08 16:53:59 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-08 16:53:59 +0100
commit453b76ef8c1a84e893bf88887672587a4c4048b8 (patch)
tree7440e7e2ffbe6423532bf40c9767b787491a572a /prosodyctl
parent30f4284b663ea18c421ed754a1d2102712b6fee0 (diff)
downloadprosody-453b76ef8c1a84e893bf88887672587a4c4048b8.tar.gz
prosody-453b76ef8c1a84e893bf88887672587a4c4048b8.zip
prosodyctl: Quit when user pressed ^C in password prompts
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl4
1 files changed, 4 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index 8471e7ab..837be552 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -158,6 +158,10 @@ local function read_password()
while true do
io.write("Enter new password: ");
password = getpass();
+ if not password then
+ show_message("No password - cancelled");
+ return;
+ end
io.write("Retype new password: ");
if getpass() ~= password then
if not show_yesno [=[Passwords did not match, try again? [Y/n]]=] then