Skip to content

Instantly share code, notes, and snippets.

@CaMer0n
Last active December 16, 2015 17:41
Show Gist options
  • Save CaMer0n/5472498 to your computer and use it in GitHub Desktop.
Save CaMer0n/5472498 to your computer and use it in GitHub Desktop.
This should clean-out any corruption that has occurred from the v1.0.3 parser bug.
<?php
require_once("class2.php");
require_once(HEADERF);
global $pref; // just in case.
echo "<h2>Cleaned Prefs</h2>";
$stripsan = array('[sanitised]','[/sanitised]','##xss##');
foreach($pref as $k=>$v)
{
if(strstr($v,'amp;amp;')!==false)
{
$pref[$k] = str_replace("amp;","",$v);
echo "<br />Correcting pref: ".$k;
}
if(strstr($v,'[sanitised]')!==false)
{
$pref[$k] = str_replace($stripsan,'',$v);
echo "<br />De-sanitizing pref: ".$k;
}
}
save_prefs();
echo "<hr />";
print_a($pref);
require_once(FOOTERF);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment