Skip to content

Commit

Permalink
Security: Ticket: Remove possible XSS in attachment file name
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Feb 12, 2024
1 parent a63e03e commit 53275c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main/inc/lib/TicketManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ public static function get_ticket_detail_by_id($ticketId)

$result_attach = Database::query($sql);
while ($row2 = Database::fetch_assoc($result_attach)) {
$row2['filename'] = Security::remove_XSS($row2['filename']);
$archiveURL = $webPath.'ticket/download.php?ticket_id='.$ticketId.'&id='.$row2['id'];
$row2['attachment_link'] = $attach_icon.
'&nbsp;<a href="'.$archiveURL.'">'.$row2['filename'].'</a>&nbsp;('.$row2['size'].')';
Expand Down

0 comments on commit 53275c1

Please sign in to comment.