Skip to content
Snippets Groups Projects
Commit 36651b91 authored by JediKev's avatar JediKev
Browse files

xss: Prevent Agent Directory XSS

This addresses a vulnerability where an Agent can perform XSS via the
Agent Directory’s REQUEST query string. This sanitizes the request params
so the code will be escaped and not executed in the browser.
parent c4669d77
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,10 @@ $qs = array();
$agents = Staff::objects()
->select_related('dept');
// Sanitize 'order' param To Escape XSS
if ($_REQUEST['order'])
$_REQUEST['order'] = Format::sanitize($_REQUEST['order']);
if($_REQUEST['q']) {
$searchTerm=$_REQUEST['q'];
if($searchTerm){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment