Private GIT

Skip to content
Snippets Groups Projects
Commit 75d3156d authored by Stephane Chapron's avatar Stephane Chapron
Browse files

fix(sec): Fix SQL injection in Graph Template

parent 810092ae
Branches
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ $SearchTool = null;
$search = '';
if (isset($_POST['searchGT']) && $_POST['searchGT']) {
$search = $_POST['searchGT'];
$SearchTool = " WHERE name LIKE '%".$search."%'";
$SearchTool = " WHERE name LIKE '%" . $pearDB->escape($search) . "%'";
}
$res = $pearDB->query("SELECT COUNT(*) FROM giv_graphs_template".$SearchTool);
......@@ -140,7 +140,7 @@ $o2 = $form->getElement('o2');
$o2->setValue(null);
$tpl->assign('limit', $limit);
$tpl->assign('searchGT', $search);
$tpl->assign('searchGT', htmlentities($search));
/*
* Apply a template definition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment