Merge remote-tracking branch 'origin/6.2.2' into 7.2.0

Conflicts:
	src/Umbraco.Core/Models/DeepCloneHelper.cs
This commit is contained in:
Shannon
2014-08-25 16:42:19 +10:00
2 changed files with 15 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ namespace Umbraco.Web
{
// the keepalive service will use that url
ApplicationContext.Current.OriginalRequestUrl = string.Format("{0}:{1}{2}", httpContext.Request.ServerVariables["SERVER_NAME"], httpContext.Request.ServerVariables["SERVER_PORT"], IOHelper.ResolveUrl(SystemDirectories.Umbraco));
LogHelper.Info<UmbracoModule>("Setting OriginalRequestUrl: " + ApplicationContext.Current.OriginalRequestUrl);
}
// do not process if client-side request

View File

@@ -50,7 +50,13 @@ namespace umbraco.cms.helpers
if (Uri.TryCreate(callerUrl, UriKind.RelativeOrAbsolute, out localUri))
{
// check for local urls
if (!requestUri.IsAbsoluteUri || requestUri.Host == localUri.Host)
//Cannot start with // since that is not a local url
if (!requestUri.OriginalString.StartsWith("//")
//cannot be non-absolute and also contain the char : since that will indicate a protocol
&& (!requestUri.IsAbsoluteUri && !requestUri.OriginalString.Contains(":"))
//needs to be non-absolute or the hosts must match the current request
&& (!requestUri.IsAbsoluteUri || requestUri.Host == localUri.Host))
{
return true;
}
@@ -61,6 +67,13 @@ namespace umbraco.cms.helpers
throw new ArgumentException("CallerUrl is in a wrong format that couldn't be parsed as a valid URI. If you don't want to evaluate for local urls, but just proxy urls then leave callerUrl empty", "callerUrl");
}
}
//we cannot continue if the url is not absolute
if (!requestUri.IsAbsoluteUri)
{
return false;
}
// check for valid proxy urls
var feedProxyXml = XmlHelper.OpenAsXmlDocument(IOHelper.MapPath(SystemFiles.FeedProxyConfig));
if (feedProxyXml != null &&