Skip to content

Commit

Permalink
Merge pull request from GHSA-6324-52pr-h4p5
Browse files Browse the repository at this point in the history
* Bump version

* Fix GHSA-6324-52pr-h4p5

* Fix GHSA-6324-52pr-h4p5

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
  • Loading branch information
3 people authored Dec 11, 2023
1 parent b5544aa commit 13cc320
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ public string ExportPackage(PackageDefinition definition)
definition.Name.Replace(' ', '_')));
Directory.CreateDirectory(directoryName);

var expectedRoot = _hostingEnvironment.MapPathContentRoot(_createdPackagesFolderPath);
var finalPackagePath = Path.Combine(directoryName, fileName);
if (finalPackagePath.StartsWith(expectedRoot) == false)
{
throw new IOException("Invalid path due to the package name");
}

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

0 comments on commit 13cc320

Please sign in to comment.