fixes #1410 check on user input to prevent SQL injection

This commit is contained in:
plegall
2021-05-13 12:38:45 +02:00
parent fbb489b3da
commit 2ce1e59522

View File

@@ -65,7 +65,7 @@ if ( isset( $_REQUEST["order"][0]["column"] ) )
$sOrder = "ORDER BY ";
$i = 0;
$col = $_REQUEST["order"][0]["column"];
if ( $_REQUEST['columns'][$col]["searchable"] == "true" )
if ( $_REQUEST['columns'][$col]["searchable"] == "true" and preg_match('/^(asc|desc)$/i', $_REQUEST["order"][0]["dir"]))
{
$sOrder .= $aColumns[ $col ].' '.$_REQUEST["order"][0]["dir"].', ';
}