diff --git a/www/_include.php b/www/_include.php index ab5e7dcab22bc81bf2339bd474412a5844728c09..26ce8ee85306a4f2b289c946a45824029b93f3af 100644 --- a/www/_include.php +++ b/www/_include.php @@ -1,5 +1,22 @@ <?php +/* Remove magic quotes. */ +if(get_magic_quotes_gpc()) { + foreach(array('_GET', '_POST', '_COOKIE', '_REQUEST') as $a) { + foreach($$a as &$v) { + + /* We don't use array-parameters anywhere. + * Ignore any that may appear. + */ + if(is_array($v)) { + continue; + } + + /* Unescape the string. */ + $v = stripslashes($v); + } + } +} $path_extra = dirname(dirname(__FILE__)) . '/lib';