Hello.
I actually use a forum system that I wont name for security reasons 😉
Some people suggested a update because of a security flaw, so I checked what the update was for, and found out this :
old file
if($allowhtml==0) $post=$this->convertHTML($post,false);
else {
$post=preg_replace("/<([\/]?)script([^>]*)>/i","<\\1script\\2>",$post);
$post=preg_replace("/(<table[^>]*>)([^\\3]*)(<\/table>)/eiU","\"\\1\".\$this->formatTableTR('\\2').\"\\3\"",$post);
}
new file
// remove tab
$post = str_replace("\t", " ", $post);
if($allowhtml==0) $post=$this->convertHTML($post,false);
else {
$post=preg_replace("/<([\/]?)script([^>]*)>/i","<\\1script\\2>",$post);
$post=preg_replace("/(<table[^>]*>)([^\\3]*)(<\/table>)/eiU","\"\\1\".\$this->formatTableTR('\\2').\"\\3\"",$post);
}
So I d like to know what arethe potential risks to not use this fix, and how the \t could affect the preg replace function? Or would this affect html outpout and let user make some html + javascript injection?
Thanks for your help 🙂