- Code: Select all
if (!(array_key_exists('process',$_POST) && ($_POST['process'] == 'process'))) {
return '';
}
Add below:
- Code: Select all
// Slash global data if magic_quotes_gpc is off.
if ( !get_magic_quotes_gpc() )
{
$_GET = $this->slash_global_data($_GET);
$_POST = $this->slash_global_data($_POST);
}
At the very end of the file, find:
- Code: Select all
}
$config = new config($tablename);
Add above:
- Code: Select all
/**
* Applies addslashes() to the provided data
*
* @param mixed $data Array of data or a single string
* @return mixed Array or string of data
*/
function slash_global_data(&$data)
{
if ( is_array($data) )
{
foreach ( $data as $k => $v )
{
$data[$k] = ( is_array($v) ) ? slash_global_data($v) : addslashes($v);
}
}
return $data;
}
This fix will be in the next release, but I've got some other work underway so I don't want to push now.
A workaround is doubling all \ in the regex setting. (so instead of /([\w]+)/ use /([\\w]+)/)
EDIT: Whoops, forgot to attach a fixed file