(cp 0f359f2af) fixes GHSA-mgqc-3445-qghq checks standard date fields

This commit is contained in:
plegall
2026-02-17 18:55:59 +01:00
parent 8ff31e0758
commit 0d5ed1f777
2 changed files with 40 additions and 0 deletions
+10
View File
@@ -34,6 +34,16 @@ function ws_isInvokeAllowed($res, $methodName, $params)
*/
function ws_std_image_sql_filter( $params, $tbl_name='' )
{
foreach (array('f_min_date_available', 'f_max_date_available', 'f_min_date_created', 'f_max_date_created') as $datefield)
{
if (isset($params[$datefield]) and !is_valid_mysql_datetime($params[$datefield]))
{
global $service;
$service->sendResponse(new PwgError(WS_ERR_INVALID_PARAM, 'Invalid '.$datefield));
exit;
}
}
$clauses = array();
if ( is_numeric($params['f_min_rate']) )
{