diff --git a/include/utils/CommonUtils.php b/include/utils/CommonUtils.php index 885bffd5d9..d9a0d4f41d 100644 --- a/include/utils/CommonUtils.php +++ b/include/utils/CommonUtils.php @@ -2374,7 +2374,7 @@ function validateImageFile($file_details) { } $filetype = strtolower($filetype); } - if (in_array($filetype, ['jpeg', 'png', 'jpg', 'pjpeg', 'x-png', 'gif', 'bmp', 'svg', 'svg+xml', 'xml', 'text/xml'])) { + if (in_array($filetype, ['jpeg', 'png', 'jpg', 'pjpeg', 'x-png', 'gif', 'bmp', 'svg', 'svg+xml', 'xml', 'text/xml', 'pdf', 'octet-stream'])) { // we add XML to the array in order to apply validation rules to that type as it can contain executable code $saveimage = 'true'; } else { @@ -2465,7 +2465,8 @@ function validateImageContents($filename) { || stripos($contents, '<%=') !== false || stripos($contents, '