EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Export extension extra validation
Yurii66ab04e9a971
diff --git a/application/Espo/Tools/ExportCustom/Data.php b/application/Espo/Tools/ExportCustom/Data.phpindex cab2d18242..23575e68ab 100644--- a/application/Espo/Tools/ExportCustom/Data.php+++ b/application/Espo/Tools/ExportCustom/Data.php@@ -29,6 +29,8 @@namespace Espo\Tools\ExportCustom;+use RuntimeException;+class Data{/**@@ -38,7 +40,12 @@ class Datapublic string $folder,public array $customEntityTypeList,private string $module- ) {}+ ) {++ if (!preg_match('/^[A-Za-z0-9.\-]+$/', $folder)) {+ throw new RuntimeException("Bad folder.");+ }+ }public function getDir(): string{