diff options
author | Yorhel <git@yorhel.nl> | 2017-02-10 17:38:33 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2017-02-10 17:38:33 +0100 |
commit | 1d24ff9a2f245dc997cf7fc6c85dd4adc53f9b3b (patch) | |
tree | 2bc55d8fb1b216691bb2d1221683df8c10e2e038 | |
parent | c604c0c2e725f75346ed29fea081c7ae8559b542 (diff) |
Disallow exclamation mark in email address validation
While technically allowed, most MTAs and services refuse to send/receive
mail from it. I don't see why TUWF should accept it as valid.
-rw-r--r-- | lib/TUWF/Misc.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/TUWF/Misc.pm b/lib/TUWF/Misc.pm index 9d6563c..1112816 100644 --- a/lib/TUWF/Misc.pm +++ b/lib/TUWF/Misc.pm @@ -46,7 +46,7 @@ my %default_templates = ( int => { func => \&_template_validate_num, regex => qr/^-?(?:0|[1-9]\d*)$/, inherit => ['min','max'] }, uint => { func => \&_template_validate_num, regex => qr/^(?:0|[1-9]\d*)$/, inherit => ['min','max'] }, ascii => { regex => qr/^[\x20-\x7E]*$/ }, - email => { regex => qr/^[-\+\.!#\$=\w]+\@$re_domain$/, maxlength => 254 }, + email => { regex => qr/^[-\+\.#\$=\w]+\@$re_domain$/, maxlength => 254 }, weburl => { regex => qr/^https?:\/\/$re_domain(?::[1-9][0-9]{0,5})?\/[^\s<>"]*$/, maxlength => 65536 }, # the maxlength is a bit arbitrary, but better than unlimited ); |