mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 16:12:39 +01:00
Add az09comma to sanitize sortfield/sortorder
This commit is contained in:
@@ -542,6 +542,13 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu
|
||||
if (preg_match('/[^a-z0-9_\-\.]+/i',$out)) $out='';
|
||||
}
|
||||
break;
|
||||
case 'aZ09comma': // great to sanitize sortfield or sortorder params that can be t.abc,t.def_gh
|
||||
if (! is_array($out))
|
||||
{
|
||||
$out=trim($out);
|
||||
if (preg_match('/[^a-z0-9_\-\.,]+/i',$out)) $out='';
|
||||
}
|
||||
break;
|
||||
case 'array':
|
||||
if (! is_array($out) || empty($out)) $out=array();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user