diff --git a/include/ws_functions/pwg.images.php b/include/ws_functions/pwg.images.php index 6a8685437..09f3bbf0d 100644 --- a/include/ws_functions/pwg.images.php +++ b/include/ws_functions/pwg.images.php @@ -1674,7 +1674,12 @@ SELECT * ); } - $update['file'] = $params['file']; + // prevent XSS, remove HTML tags + $update['file'] = strip_tags($params['file']); + if (empty($update['file'])) + { + unset($update['file']); + } } if (count(array_keys($update)) > 0)