]> mj.ucw.cz Git - pciids.git/commitdiff
Email needs at last one dot after @
authorMichal Vaner <vorner@ucw.cz>
Thu, 4 Sep 2008 20:33:22 +0000 (22:33 +0200)
committerMichal Vaner <vorner@ucw.cz>
Thu, 4 Sep 2008 20:33:22 +0000 (22:33 +0200)
PciIds/Users.pm

index d6b136714613d2aff7a6008d6610c0515b52eec7..a1087c16b084a92eab4e9681d117b0bbf235a423 100644 (file)
@@ -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 );