diff --git a/vtlib/Vtiger/Functions.php b/vtlib/Vtiger/Functions.php index 25a7ef961dabdbfc1793dec9ecc3d0f653e57a9b..360bcd6b96c68d6b5f9b84073fc1a501408bc4ec 100644 --- a/vtlib/Vtiger/Functions.php +++ b/vtlib/Vtiger/Functions.php @@ -1461,7 +1461,8 @@ class Vtiger_Functions { 'parent_id' => 'id', '_mfrom' => 'email', '_mto' => 'email', - 'sequencesList' => 'noAlphabet' + 'sequencesList' => 'idlist', + 'search_value' => 'keyword', ); /** @@ -1491,7 +1492,16 @@ class Vtiger_Functions { break; case 'email' : $ok = (!filter_var($value, FILTER_VALIDATE_EMAIL)) ? false : $ok; break; - case 'noAlphabet' : $ok = (preg_match('/[a-zA-Z]/', $value)) ? false : $ok; + case 'idlist' : $ok = (preg_match('/[a-zA-Z]/', $value)) ? false : $ok; + break; + case 'keyword': + $blackList = array('UNION', '--', 'SELECT ', 'SELECT*', '%', 'NULL', 'HEX'); + foreach ($blackList as $keyword) { + if (stripos($value, $keyword) !== false) { + $ok = false; + break; + } + } break; } return $ok;