From 8f469139bf30718628229f2866462b1be8714a3c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 3 Dec 2008 14:55:00 +0000 Subject: (get_restricted_authentication) prevent typing in empty password or login --- mdkapplet-restricted-helper | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mdkapplet-restricted-helper') diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper index 7835fd92..2d5a9219 100755 --- a/mdkapplet-restricted-helper +++ b/mdkapplet-restricted-helper @@ -84,7 +84,17 @@ sub get_restricted_authentication() { create_okcancel($w, N("Next"), N("Cancel")), ]); - $res ? add_restricted_medium($email_w->get_text, $password) : 0; + my $email = $email_w->get_text; + if ($res) { + if ($email && $password) { + add_restricted_medium($email, $password); + } else { + interactive->vnew->ask_warn(N("Error"), N("Password & email cannot be empty.")); + goto &get_restricted_authentication; + } + } else { + 0; + } } sub get_from { -- cgit v1.2.1