Merge branch '7.0.2' of https://github.com/rsoeteman/Umbraco-CMS into rsoeteman-7.0.2

This commit is contained in:
Shannon
2014-01-29 11:26:05 +11:00
2 changed files with 10 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
<%
// NH: Adds this inline check to avoid a simple codebehind file in the legacy project!
if (!umbraco.cms.helpers.url.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri))
if (Request["url"].ToLower().Contains("booting.aspx") || !umbraco.cms.helpers.url.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri))
{
throw new ArgumentException("Can't redirect to the requested url - it's not local or an approved proxy url",
"url");

View File

@@ -81,10 +81,15 @@ namespace Umbraco.Web.Strategies.DataTypes
var dimensions = isImageType ? GetDimensions(path, fileSystem) : null;
// only add dimensions to web images
content.getProperty(uploadFieldConfigNode.WidthFieldAlias).Value = isImageType ? dimensions.Item1.ToString(CultureInfo.InvariantCulture) : string.Empty;
content.getProperty(uploadFieldConfigNode.HeightFieldAlias).Value = isImageType ? dimensions.Item2.ToString(CultureInfo.InvariantCulture) : string.Empty;
content.getProperty(uploadFieldConfigNode.LengthFieldAlias).Value = size == default(long) ? string.Empty : size.ToString(CultureInfo.InvariantCulture);
if (isImageType)
{
// only add dimensions to web images
content.getProperty(uploadFieldConfigNode.WidthFieldAlias).Value = dimensions.Item1.ToString(CultureInfo.InvariantCulture);
content.getProperty(uploadFieldConfigNode.HeightFieldAlias).Value = dimensions.Item2.ToString(CultureInfo.InvariantCulture);
}
content.getProperty(uploadFieldConfigNode.LengthFieldAlias).Value = size == default(long) ? string.Empty : size.ToString(CultureInfo.InvariantCulture);
content.getProperty(uploadFieldConfigNode.ExtensionFieldAlias).Value = string.IsNullOrEmpty(extension) ? string.Empty : extension;
}