Skip to content

Commit 13cc320

Browse files
Zeegaanbergmania
andauthored
Merge pull request from GHSA-6324-52pr-h4p5
* Bump version * Fix GHSA-6324-52pr-h4p5 * Fix GHSA-6324-52pr-h4p5 --------- Co-authored-by: Bjarke Berg <[email protected]> Co-authored-by: Zeegaan <[email protected]>
1 parent b5544aa commit 13cc320

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Umbraco.Infrastructure/Persistence/Repositories/Implement/CreatedPackageSchemaRepository.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,12 @@ public string ExportPackage(PackageDefinition definition)
266266
definition.Name.Replace(' ', '_')));
267267
Directory.CreateDirectory(directoryName);
268268

269+
var expectedRoot = _hostingEnvironment.MapPathContentRoot(_createdPackagesFolderPath);
269270
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+
}
270275

271276
// Clean existing files
272277
foreach (var packagePath in new[] { definition.PackagePath, finalPackagePath })

0 commit comments

Comments
 (0)