This commit is contained in:
Laurent Destailleur 2024-07-23 19:19:27 +02:00
parent 2ddc483e78
commit c21313fc2c
2 changed files with 6 additions and 13 deletions

View File

@ -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'
)
).')*$/';

View File

@ -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 <email>". 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 <email@domain.com>". Less secured than 'alphanohtml'
case 'email':
if (!is_array($out)) {
$out = trim($out);
do {