Config/Sanity

* Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
This commit is contained in:
Sarjuuk
2017-03-20 23:38:00 +01:00
parent 8b9b653028
commit 90a31ac99f
2 changed files with 2 additions and 2 deletions

View File

@@ -752,7 +752,7 @@ trait spawnHelper
abstract class Filter abstract class Filter
{ {
private static $pattern = "/[^\p{L}0-9\s_\-\'\.\?\*]/ui";// delete any char not in unicode, number, space, underscore, hyphen, single quote, dot or common wildcard private static $pattern = "/[\p{C}]/ui"; // delete unprintable characters
private static $wCards = ['*' => '%', '?' => '_']; private static $wCards = ['*' => '%', '?' => '_'];
private static $criteria = ['cr', 'crs', 'crv']; // [cr]iterium, [cr].[s]ign, [cr].[v]alue private static $criteria = ['cr', 'crs', 'crv']; // [cr]iterium, [cr].[s]ign, [cr].[v]alue

View File

@@ -96,7 +96,7 @@ foreach ($sets as $k => $v)
else if ($v['flags'] & CON_FLAG_TYPE_BOOL) else if ($v['flags'] & CON_FLAG_TYPE_BOOL)
$val = (bool)$v['value']; $val = (bool)$v['value'];
else if ($v['flags'] & CON_FLAG_TYPE_STRING) else if ($v['flags'] & CON_FLAG_TYPE_STRING)
$val = preg_replace('/[^\p{L}0-9~\s_\-\'\/\.:,]/ui', '', $v['value']); $val = preg_replace("/[\p{C}]/ui", '', $v['value']);
else if ($php) else if ($php)
{ {
trigger_error('PHP config value '.strtolower($k).' has no type set - config will not be used!', E_USER_ERROR); trigger_error('PHP config value '.strtolower($k).' has no type set - config will not be used!', E_USER_ERROR);