Fix: GETPOST on int accept negative values
This commit is contained in:
parent
abf9fbbd2a
commit
b689fdf031
@ -199,7 +199,7 @@ function GETPOST($paramname,$check='',$method=0)
|
|||||||
if (! empty($check))
|
if (! empty($check))
|
||||||
{
|
{
|
||||||
// Check if numeric
|
// Check if numeric
|
||||||
if ($check == 'int' && ! preg_match('/^[\.,0-9]+$/i',trim($out))) $out='';
|
if ($check == 'int' && ! preg_match('/^[-\.,0-9]+$/i',trim($out))) $out='';
|
||||||
// Check if alpha
|
// Check if alpha
|
||||||
//if ($check == 'alpha' && ! preg_match('/^[ =:@#\/\\\(\)\-\._a-z0-9]+$/i',trim($out))) $out='';
|
//if ($check == 'alpha' && ! preg_match('/^[ =:@#\/\\\(\)\-\._a-z0-9]+$/i',trim($out))) $out='';
|
||||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user