From 4922567a27f31f07171e09d660acb715cc0ef3a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 21 Jan 2020 15:01:22 +0100 Subject: [PATCH] Add .noexec extension for old php4, php5... files --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7f5c3c351c7..add0dba599d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8499,7 +8499,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u */ function isAFileWithExecutableContent($filename) { - if (preg_match('/\.(htm|html|js|php|phtml|pl|py|cgi|ksh|sh|bash|bat|cmd|wpk|exe|dmg)$/i', $filename)) + if (preg_match('/\.(htm|html|js|php|php\d+|phtml|pl|py|cgi|ksh|sh|bash|bat|cmd|wpk|exe|dmg)$/i', $filename)) { return true; }