mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #1410 check on user input to prevent SQL injection
This commit is contained in:
@@ -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"].', ';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user