diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index 5020aba739e..4201ae3d437 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -11,6 +11,7 @@ $sanitizeRegex array( // Documented: 'none', + 'password', 'array', 'int', 'intcomma', @@ -22,24 +23,15 @@ $sanitizeRegex 'aZ09', 'aZ09arobase', 'aZ09comma', + 'email', 'san_alpha', 'restricthtml', 'nohtml', 'custom', // Not documented: - 'email', 'restricthtmlallowclass', 'restricthtmlallowunvalid', - 'restricthtmlnolink', - //'ascii', - //'categ_id', - //'chaine', - - //'html', - //'boolean', - //'double', - //'float', - //'string', + 'restricthtmlnolink' ) ).')*$/'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 63fe97d8b36..a8e88c8dcff 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -735,7 +735,7 @@ function GETPOSTISARRAY($paramname, $method = 0) * 'int'=check it's numeric (integer or float) * 'intcomma'=check it's integer+comma ('1,2,3,4...') * 'alpha'=Same than alphanohtml - * 'alphawithlgt'=alpha with lgt + * 'alphawithlgt' or 'email'=alpha with lgt * 'alphanohtml'=check there is no html content and no " and no ../ * 'aZ'=check it's a-z only * 'aZ09'=check it's simple alpha string (recommended for keys) @@ -1231,7 +1231,8 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options // keep lines feed } break; - case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name ". Less secured than 'alphanohtml' + case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name ". Less secured than 'alphanohtml' + case 'email': if (!is_array($out)) { $out = trim($out); do {