diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php index 4f512fd7820a5..0244ab10ede13 100644 --- a/lib/internal/Magento/Framework/Config/Dom.php +++ b/lib/internal/Magento/Framework/Config/Dom.php @@ -274,7 +274,8 @@ public static function validateDomDocument( $schema = self::$urnResolver->getRealPath($schema); libxml_use_internal_errors(true); try { - if (file_exists($schema)) { + // 4096 is the maximum length allowed by file_exists for the filename + if (strlen($schema) < 4096 && file_exists($schema)) { $result = $dom->schemaValidate($schema); } else { $result = $dom->schemaValidateSource($schema);