Work items: 30500

This commit is contained in:
hartvig
2011-09-22 06:42:18 -02:00
parent feeba931bc
commit 5aa8868248
2 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ using System.Web.UI.HtmlControls;
using System.IO;
using umbraco.cms.presentation.Trees;
using umbraco.IO;
using System.Linq;
namespace umbraco.cms.presentation.settings.scripts
{
@@ -54,7 +55,7 @@ namespace umbraco.cms.presentation.settings.scripts
// validate file
IOHelper.ValidateEditPath(IOHelper.MapPath(path), SystemDirectories.Scripts);
// validate extension
IOHelper.ValidateFileExtension(IOHelper.MapPath(path), new List<string>() { "js" });
IOHelper.ValidateFileExtension(IOHelper.MapPath(path), UmbracoSettings.ScriptFileTypes.Split(',').ToList());
StreamReader SR;
string S;

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
@@ -346,7 +347,7 @@ namespace umbraco.presentation.webservices
SystemDirectories.Scripts);
// validate extension
IOHelper.ValidateFileExtension(IOHelper.MapPath(SystemDirectories.Scripts + "/" + filename),
new List<string>() { "js" });
UmbracoSettings.ScriptFileTypes.Split(',').ToList());
string val = contents;