Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 101e116baf | |||
| ebf24d69b5 | |||
| c94662e49c | |||
| 5d37eaf993 | |||
| 1ded2c9baf | |||
| 2daacd8d57 | |||
| 3f4fa8b8ed |
@@ -1 +1 @@
|
||||
7.1.5
|
||||
7.1.6
|
||||
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class UmbracoVersion
|
||||
{
|
||||
private static readonly Version Version = new Version("7.1.5");
|
||||
private static readonly Version Version = new Version("7.1.6");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current version of Umbraco.
|
||||
|
||||
@@ -165,6 +165,16 @@ namespace Umbraco.Core.Media
|
||||
ep.Param[0] = new EncoderParameter(Encoder.Quality, 90L);
|
||||
|
||||
// Save the new image using the dimensions of the image
|
||||
var predictableThumbnailName = thumbnailFileName.Replace("UMBRACOSYSTHUMBNAIL", maxWidthHeight.ToString(CultureInfo.InvariantCulture));
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
bp.Save(ms, codec, ep);
|
||||
ms.Seek(0, 0);
|
||||
|
||||
fs.AddFile(predictableThumbnailName, ms);
|
||||
}
|
||||
|
||||
// TODO: Remove this, this is ONLY here for backwards compatibility but it is essentially completely unusable see U4-5385
|
||||
var newFileName = thumbnailFileName.Replace("UMBRACOSYSTHUMBNAIL", string.Format("{0}x{1}", widthTh, heightTh));
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
|
||||
@@ -2530,9 +2530,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>7150</DevelopmentServerPort>
|
||||
<DevelopmentServerPort>7160</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:7150</IISUrl>
|
||||
<IISUrl>http://localhost:7160</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -43,12 +43,8 @@ namespace Umbraco.Web.Mvc
|
||||
/// <returns></returns>
|
||||
public static string GetAuthHeaderTokenVal(ApplicationContext appContext)
|
||||
{
|
||||
int numberOfUsers;
|
||||
var users = appContext.Services.UserService.GetAll(0, 25, out numberOfUsers);
|
||||
var admin = users.FirstOrDefault(u => u.UserType.Alias == "admin" && u.RawPasswordValue != string.Empty && u.RawPasswordValue.InvariantEquals("default") == false);
|
||||
var admin = appContext.Services.UserService.GetUserById(0);
|
||||
|
||||
if (admin == null)
|
||||
return string.Empty;
|
||||
|
||||
var token = string.Format("{0}u____u{1}u____u{2}", admin.Email, admin.Username, admin.RawPasswordValue);
|
||||
|
||||
@@ -95,8 +91,8 @@ namespace Umbraco.Web.Mvc
|
||||
//decrypt the string
|
||||
var text = encrypted.DecryptWithMachineKey();
|
||||
|
||||
//split
|
||||
var split = text.Split(new[] { "u____u" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
//split - some users have not set an email, don't strip out empty entries
|
||||
var split = text.Split(new[] {"u____u"}, StringSplitOptions.None);
|
||||
if (split.Length != 3) return false;
|
||||
|
||||
//compare
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
@@ -149,24 +150,28 @@ namespace Umbraco.Web.PropertyEditors
|
||||
/// <returns></returns>
|
||||
public override IDictionary<string, object> ConvertDbToEditor(IDictionary<string, object> defaultPreVals, PreValueCollection persistedPreVals)
|
||||
{
|
||||
var result = new Dictionary<string, object>();
|
||||
var result = new List<PreValue>();
|
||||
|
||||
//the pre-values just take up one field with a semi-colon delimiter so we'll just parse
|
||||
var dictionary = persistedPreVals.FormatAsDictionary();
|
||||
if (dictionary.Any())
|
||||
{
|
||||
//there should only be one val
|
||||
var delimited = dictionary.First().Value.Value.Split(new[] {';'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
var delimited = dictionary.First().Value.Value.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (var index = 0; index < delimited.Length; index++)
|
||||
{
|
||||
result.Add(index.ToInvariantString(), delimited[index]);
|
||||
result.Add(new PreValue(index, delimited[index]));
|
||||
}
|
||||
}
|
||||
|
||||
//the items list will be a dictionary of it's id -> value we need to use the id for persistence for backwards compatibility
|
||||
return new Dictionary<string, object> { { "items", result } };
|
||||
return new Dictionary<string, object> { { "items", result.ToDictionary(x => x.Id, x => PreValueAsDictionary(x)) } };
|
||||
}
|
||||
|
||||
private IDictionary<string, object> PreValueAsDictionary(PreValue preValue)
|
||||
{
|
||||
return new Dictionary<string, object> { { "value", preValue.Value }, { "sortOrder", preValue.SortOrder } };
|
||||
}
|
||||
/// <summary>
|
||||
/// Take the posted values and convert them to a semi-colon separated list so that its backwards compatible
|
||||
/// </summary>
|
||||
|
||||
@@ -25,7 +25,10 @@ namespace Umbraco.Web.WebApi
|
||||
public override HttpControllerDescriptor SelectController(HttpRequestMessage request)
|
||||
{
|
||||
var routeData = request.GetRouteData();
|
||||
if (routeData == null || routeData.Route == null || routeData.Route.DataTokens["Namespaces"] == null)
|
||||
if (routeData == null
|
||||
|| routeData.Route == null
|
||||
|| routeData.Route.DataTokens == null
|
||||
|| routeData.Route.DataTokens["Namespaces"] == null)
|
||||
return base.SelectController(request);
|
||||
|
||||
// Look up controller in route data
|
||||
|
||||
@@ -21,6 +21,7 @@ using umbraco.cms.businesslogic.cache;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.presentation.nodeFactory;
|
||||
using Umbraco.Web;
|
||||
using Action = umbraco.BusinessLogic.Actions.Action;
|
||||
using Node = umbraco.NodeFactory.Node;
|
||||
using Umbraco.Core;
|
||||
@@ -97,13 +98,13 @@ namespace umbraco
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
if (UmbracoContext.Current == null || UmbracoContext.Current.HttpContext == null)
|
||||
return XmlContentInternal;
|
||||
var content = HttpContext.Current.Items[XmlContextContentItemKey] as XmlDocument;
|
||||
var content = UmbracoContext.Current.HttpContext.Items[XmlContextContentItemKey] as XmlDocument;
|
||||
if (content == null)
|
||||
{
|
||||
content = XmlContentInternal;
|
||||
HttpContext.Current.Items[XmlContextContentItemKey] = content;
|
||||
UmbracoContext.Current.HttpContext.Items[XmlContextContentItemKey] = content;
|
||||
}
|
||||
return content;
|
||||
}
|
||||
@@ -828,24 +829,27 @@ namespace umbraco
|
||||
/// </summary>
|
||||
internal void RemoveXmlFilePersistenceQueue()
|
||||
{
|
||||
HttpContext.Current.Application.Lock();
|
||||
HttpContext.Current.Application[PersistenceFlagContextKey] = null;
|
||||
HttpContext.Current.Application.UnLock();
|
||||
if (UmbracoContext.Current != null && UmbracoContext.Current.HttpContext != null)
|
||||
{
|
||||
UmbracoContext.Current.HttpContext.Application.Lock();
|
||||
UmbracoContext.Current.HttpContext.Application[PersistenceFlagContextKey] = null;
|
||||
UmbracoContext.Current.HttpContext.Application.UnLock();
|
||||
}
|
||||
}
|
||||
|
||||
internal bool IsXmlQueuedForPersistenceToFile
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current != null)
|
||||
if (UmbracoContext.Current != null && UmbracoContext.Current.HttpContext != null)
|
||||
{
|
||||
bool val = HttpContext.Current.Application[PersistenceFlagContextKey] != null;
|
||||
bool val = UmbracoContext.Current.HttpContext.Application[PersistenceFlagContextKey] != null;
|
||||
if (val)
|
||||
{
|
||||
DateTime persistenceTime = DateTime.MinValue;
|
||||
try
|
||||
{
|
||||
persistenceTime = (DateTime)HttpContext.Current.Application[PersistenceFlagContextKey];
|
||||
persistenceTime = (DateTime)UmbracoContext.Current.HttpContext.Application[PersistenceFlagContextKey];
|
||||
if (persistenceTime > GetCacheFileUpdateTime())
|
||||
{
|
||||
return true;
|
||||
@@ -894,8 +898,8 @@ namespace umbraco
|
||||
private void ClearContextCache()
|
||||
{
|
||||
// If running in a context very important to reset context cache orelse new nodes are missing
|
||||
if (HttpContext.Current != null && HttpContext.Current.Items.Contains(XmlContextContentItemKey))
|
||||
HttpContext.Current.Items.Remove(XmlContextContentItemKey);
|
||||
if (UmbracoContext.Current != null && UmbracoContext.Current.HttpContext != null && UmbracoContext.Current.HttpContext.Items.Contains(XmlContextContentItemKey))
|
||||
UmbracoContext.Current.HttpContext.Items.Remove(XmlContextContentItemKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1193,20 +1197,20 @@ order by umbracoNode.level, umbracoNode.sortOrder";
|
||||
{
|
||||
//if this is called outside a web request we cannot queue it it will run in the current thread.
|
||||
|
||||
if (HttpContext.Current != null)
|
||||
if (UmbracoContext.Current != null && UmbracoContext.Current.HttpContext != null)
|
||||
{
|
||||
HttpContext.Current.Application.Lock();
|
||||
UmbracoContext.Current.HttpContext.Application.Lock();
|
||||
try
|
||||
{
|
||||
if (HttpContext.Current.Application[PersistenceFlagContextKey] != null)
|
||||
if (UmbracoContext.Current.HttpContext.Application[PersistenceFlagContextKey] != null)
|
||||
{
|
||||
HttpContext.Current.Application.Add(PersistenceFlagContextKey, null);
|
||||
UmbracoContext.Current.HttpContext.Application.Add(PersistenceFlagContextKey, null);
|
||||
}
|
||||
HttpContext.Current.Application[PersistenceFlagContextKey] = DateTime.UtcNow;
|
||||
UmbracoContext.Current.HttpContext.Application[PersistenceFlagContextKey] = DateTime.UtcNow;
|
||||
}
|
||||
finally
|
||||
{
|
||||
HttpContext.Current.Application.UnLock();
|
||||
UmbracoContext.Current.HttpContext.Application.UnLock();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user