Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent

This commit is contained in:
Stephan
2013-10-11 09:24:06 +02:00
2 changed files with 20 additions and 3 deletions

View File

@@ -458,6 +458,21 @@ namespace Umbraco.Core.ObjectResolution
}
}
/// <summary>
/// Gets the types in the collection of types.
/// </summary>
/// <returns>The types in the collection of types.</returns>
/// <remarks>Returns an enumeration, the list cannot be modified.</remarks>
public virtual IEnumerable<Type> GetTypes()
{
Type[] types;
using (new ReadLock(_lock))
{
types = _instanceTypes.ToArray();
}
return types;
}
/// <summary>
/// Returns a value indicating whether the specified type is already in the collection of types.
/// </summary>

View File

@@ -750,9 +750,11 @@ namespace Umbraco.Web.Security.Providers
private bool IsEmaiValid(string email)
{
var validator = new EmailAddressAttribute();
return validator.IsValid(email);
const string pattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|"
+ @"([-a-z0-9!#$%&'*+/=?^_`{|}~]|(?<!\.)\.)*)(?<!\.)"
+ @"@[a-z0-9][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$";
return Regex.IsMatch(email, pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);
}
/// <summary>