Skip to content

Commit d2cda71

Browse files
committed
Fixed XSS vulnerability in comments for comms bans
Used RemoveCode on comment data to prevent XSS
1 parent ebd899f commit d2cda71

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)