mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Config/Sanity
* Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user