From 453b76ef8c1a84e893bf88887672587a4c4048b8 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 8 Jul 2009 16:53:59 +0100 Subject: prosodyctl: Quit when user pressed ^C in password prompts --- prosodyctl | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3