Skip to content

Commit e73dd38

Browse files
committed
Merge pull request #134 from K1N62/patch-1
Fixed XSS vulnerability in comments for comms bans
2 parents ebd899f + d2cda71 commit e73dd38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web_upload/pages/page.commslist.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ function setPostKey()
571571

572572
$cdata['comname'] = $commentres->fields['comname'];
573573
$cdata['added'] = SBDate($dateformat, $commentres->fields['added']);
574-
$cdata['commenttxt'] = str_replace("\n", "<br />", $commentres->fields['commenttxt']);
574+
$cdata['commenttxt'] = RemoveCode($commentres->fields['commenttxt']);
575+
$cdata['commenttxt'] = str_replace("\n", "<br />", $cdata['commenttxt']);
575576
// Parse links and wrap them in a <a href=""></a> tag to be easily clickable
576577
$cdata['commenttxt'] = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1" target="_blank">$1</a>', $cdata['commenttxt']);
577578

0 commit comments

Comments
 (0)