From: Michal Vaner Date: Thu, 4 Sep 2008 20:33:22 +0000 (+0200) Subject: Email needs at last one dot after @ X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e7d7dbef0c5a2bdd5dae02232c9231f532d4c4e8;p=pciids.git Email needs at last one dot after @ --- diff --git a/PciIds/Users.pm b/PciIds/Users.pm index d6b1367..a1087c1 100644 --- a/PciIds/Users.pm +++ b/PciIds/Users.pm @@ -18,7 +18,7 @@ our @EXPORT = qw(&addUser &emailConfirm &checkConfirmHash &saltedPasswd &genAuth sub emailCheck( $$ ) { my( $email, $tables ) = @_; my $newmail; - return 'Does not look like an email address' unless ( ( $newmail ) = ( $email =~ /^([^,? "'`;<>]+@[^@,?\/ "'`;<>]+)$/ ) );#make sure the mail is not only reasonable looking, but safe to work with too + return 'Does not look like an email address' unless ( ( $newmail ) = ( $email =~ /^([^,? "'`;<>]+@[^@,?\/ "'`;<>]+\.[^@,?\/ "'`;<>]+)$/ ) );#make sure the mail is not only reasonable looking, but safe to work with too return 'Email too long' if length $newmail > 255; return 'An account for this email address already exists' if( ( defined $tables ) && $tables->hasEmail( $newmail ) ); return ( undef, $newmail );