diff --git a/views/DashboardView.php b/views/DashboardView.php index d27c50b..29db3e9 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -291,7 +291,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); // Previous page button if ($page > 1) { $currentParams['page'] = $page - 1; - $prevUrl = '?' . http_build_query($currentParams); + $prevUrl = htmlspecialchars('?' . http_build_query($currentParams), ENT_QUOTES, 'UTF-8'); echo ""; } @@ -299,14 +299,14 @@ $nonce = SecurityHeadersMiddleware::getNonce(); for ($i = 1; $i <= $totalPages; $i++) { $activeClass = ($i === $page) ? 'active' : ''; $currentParams['page'] = $i; - $pageUrl = '?' . http_build_query($currentParams); + $pageUrl = htmlspecialchars('?' . http_build_query($currentParams), ENT_QUOTES, 'UTF-8'); echo ""; } // Next page button if ($page < $totalPages) { $currentParams['page'] = $page + 1; - $nextUrl = '?' . http_build_query($currentParams); + $nextUrl = htmlspecialchars('?' . http_build_query($currentParams), ENT_QUOTES, 'UTF-8'); echo ""; } ?> @@ -393,7 +393,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); 'Ticket ID', @@ -417,7 +417,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); $sortClass = ($currentSort === $col) ? "sort-$currentDir" : ''; $ariaSort = ($currentSort === $col) ? "aria-sort='" . ($currentDir === 'asc' ? 'ascending' : 'descending') . "'" : ''; $sortParams = array_merge($_GET, ['sort' => $col, 'dir' => $newDir]); - $sortUrl = '?' . http_build_query($sortParams); + $sortUrl = htmlspecialchars('?' . http_build_query($sortParams), ENT_QUOTES, 'UTF-8'); echo "$label"; } } @@ -440,9 +440,10 @@ $nonce = SecurityHeadersMiddleware::getNonce(); echo "{$row['ticket_id']}"; echo "{$row['priority']}"; echo "" . htmlspecialchars($row['title']) . ""; - echo "{$row['category']}"; - echo "{$row['type']}"; - echo "{$row['status']}"; + echo "" . htmlspecialchars($row['category']) . ""; + echo "" . htmlspecialchars($row['type']) . ""; + $statusSlug = htmlspecialchars(str_replace(' ', '-', $row['status']), ENT_QUOTES); + echo "" . htmlspecialchars($row['status']) . ""; echo "" . htmlspecialchars($creator) . ""; echo "" . htmlspecialchars($assignedTo) . ""; echo "" . date('Y-m-d H:i', strtotime($row['created_at'])) . ""; @@ -451,7 +452,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); echo ""; echo "
"; echo ""; - echo ""; + echo ""; echo ""; echo "
"; echo ""; @@ -496,12 +497,12 @@ $nonce = SecurityHeadersMiddleware::getNonce(); -
- +
+
- - + +
$i "; } if ($totalPages > 10) {