summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-15 16:27:16 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-15 16:27:16 +0000
commitb1d9174ea0b26a6fd025630e416bb1c4c8e07e0f (patch)
tree873fdca17c279ccc82ca202a83a0c333639eb9d8
parentee2b94b1d62e515e7591a07103e5f6267e4c0a2c (diff)
downloaddrakx-b1d9174ea0b26a6fd025630e416bb1c4c8e07e0f.tar
drakx-b1d9174ea0b26a6fd025630e416bb1c4c8e07e0f.tar.gz
drakx-b1d9174ea0b26a6fd025630e416bb1c4c8e07e0f.tar.bz2
drakx-b1d9174ea0b26a6fd025630e416bb1c4c8e07e0f.tar.xz
drakx-b1d9174ea0b26a6fd025630e416bb1c4c8e07e0f.zip
ensure we got a valied email in "email alert"
-rwxr-xr-xperl-install/standalone/logdrake6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 4fcddfd0d..296e57bab 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -26,7 +26,7 @@ use lib qw(/usr/lib/libDrakX);
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
use common;
use interactive;
-use ugtk2 qw(:wrappers :helpers :create);
+use ugtk2 qw(:create :dialogs :wrappers :helpers);
$::isInstall and die "Not supported during install.\n";
@@ -449,6 +449,10 @@ EOF
{ label => "" },
{ label => "Email", val => \$email },
]) or goto step_load;
+ if ($email !~ /[\w.-]*@[\w.-]/) {
+ err_dialog(N("Wrong email"), N("\"%s\" is not a valid email!"));
+ goto step_output;
+ }
$cron .= q(#- report it