Skip to content

Commit

Permalink
Add az09comma to sanitize sortfield/sortorder
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 25, 2018
1 parent 59d0e9a commit 75a4891
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -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;
Expand Down

0 comments on commit 75a4891

Please sign in to comment.