From 0291df3193f6fd23806a6ec1e87bf1aa7ed49c25 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 8 Jul 2015 12:10:34 -0400 Subject: 3.0.5666.2 --- MediaBrowser.WebDashboard/Api/PackageCreator.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.WebDashboard/Api/PackageCreator.cs') diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 0cd22baa9..c50f98c33 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -124,6 +124,15 @@ namespace MediaBrowser.WebDashboard.Api var fullPath = Path.Combine(rootPath, virtualPath.Replace('/', Path.DirectorySeparatorChar)); + try + { + fullPath = Path.GetFullPath(fullPath); + } + catch (Exception ex) + { + _logger.ErrorException("Error in Path.GetFullPath", ex); + } + // Don't allow file system access outside of the source folder if (!_fileSystem.ContainsSubPath(rootPath, fullPath)) { @@ -654,7 +663,7 @@ namespace MediaBrowser.WebDashboard.Api await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.theme.min.css", newLineBytes).ConfigureAwait(false); await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.structure.min.css", newLineBytes).ConfigureAwait(false); - + var files = new[] { "css/site.css", -- cgit v1.2.3