Skip to content

Commit d192349

Browse files
author
Marius Burkard
committed
Merge branch 'master' into 'stable-3.1'
Master See merge request !327
2 parents b218ba4 + 0268a2b commit d192349

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

interface/lib/classes/tform_base.inc.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,22 +973,33 @@ function validateField($field_name, $field_value, $validators) {
973973
$this->errorMessage .= $errmsg."<br />\r\n";
974974
}
975975
}
976+
break;
976977
case 'ISEMAIL':
978+
$error = false;
977979
if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
978980
if($validator['allowempty'] == 'y' && $field_value == '') {
979981
//* Do nothing
980982
} else {
981983
if(function_exists('filter_var')) {
982984
if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) {
985+
$error = true;
986+
} else {
987+
if (!preg_match("/^[^\\+]+$/", $field_value)) { // * disallow + in local-part
988+
$error = true;
989+
}
990+
}
991+
if ($error) {
983992
$errmsg = $validator['errmsg'];
984993
if(isset($this->wordbook[$errmsg])) {
985994
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
986995
} else {
987996
$this->errorMessage .= $errmsg."<br />\r\n";
988997
}
989998
}
999+
9901000
} else $this->errorMessage .= "function filter_var missing <br />\r\n";
9911001
}
1002+
unset($error);
9921003
break;
9931004
case 'ISINT':
9941005
if(function_exists('filter_var') && $field_value < 2147483647) {

0 commit comments

Comments
 (0)