We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5544aa commit 13cc320Copy full SHA for 13cc320
src/Umbraco.Infrastructure/Persistence/Repositories/Implement/CreatedPackageSchemaRepository.cs
@@ -266,7 +266,12 @@ public string ExportPackage(PackageDefinition definition)
266
definition.Name.Replace(' ', '_')));
267
Directory.CreateDirectory(directoryName);
268
269
+ var expectedRoot = _hostingEnvironment.MapPathContentRoot(_createdPackagesFolderPath);
270
var finalPackagePath = Path.Combine(directoryName, fileName);
271
+ if (finalPackagePath.StartsWith(expectedRoot) == false)
272
+ {
273
+ throw new IOException("Invalid path due to the package name");
274
+ }
275
276
// Clean existing files
277
foreach (var packagePath in new[] { definition.PackagePath, finalPackagePath })
0 commit comments