Skip to content

EspoCRM – Open Source CRM Application

Extension file with slash BC support

Yuriif77415f03a9f
diff --git a/application/Espo/Core/Utils/File/ZipArchive.php b/application/Espo/Core/Utils/File/ZipArchive.php
index 720a46c6ff..6660982202 100644
--- a/application/Espo/Core/Utils/File/ZipArchive.php
+++ b/application/Espo/Core/Utils/File/ZipArchive.php
@@ -75,6 +75,11 @@ class ZipArchive
continue;
}
+ // For BC.
+ if (str_starts_with($filename, '/')) {
+ $filename = substr($filename, 1);
+ }
+
if (
str_contains($filename, '..') ||
str_starts_with($filename, '/') ||