/// <summary> /// 检查SSL /// </summary> /// <param name="ssl"></param> /// <param name="context"></param> static void CheckSSL(SSLSettings ssl, HttpContext context) { if (ssl == SSLSettings.All) { Globals.RedirectToSSL(context); } }
public static void ValidateSecureConnection(SSLSettings ssl, HttpContext context) { if (HiConfiguration.GetConfig().SSL == ssl) { RedirectToSSL(context); } }
private static void smethod_0(SSLSettings sslsettings_0, HttpContext httpContext_0) { if (sslsettings_0 == SSLSettings.All) { Globals.RedirectToSSL(httpContext_0); } }
/// <summary> /// 检查SSL /// </summary> /// <param name="ssl"></param> /// <param name="context"></param> static void CheckSSL(SSLSettings ssl, HttpContext context) { if (ssl == SSLSettings.All) { Globals.RedirectToSSL(context); } }
internal void GetAttributes(XmlAttributeCollection attributeCollection) { XmlAttribute attribute = attributeCollection["smtpServerConnectionLimit"]; if (attribute != null) { smtpServerConnectionLimit = short.Parse(attribute.Value, CultureInfo.InvariantCulture); } else { smtpServerConnectionLimit = -1; } attribute = attributeCollection["ssl"]; if (attribute != null) { ssl = (SSLSettings)Enum.Parse(typeof(SSLSettings), attribute.Value, true); } attribute = attributeCollection["usernameMinLength"]; if (attribute != null) { usernameMinLength = int.Parse(attribute.Value); } attribute = attributeCollection["usernameMaxLength"]; if (attribute != null) { usernameMaxLength = int.Parse(attribute.Value); } attribute = attributeCollection["usernameRegex"]; if (attribute != null) { usernameRegex = attribute.Value; } attribute = attributeCollection["emailEncoding"]; if (attribute != null) { emailEncoding = attribute.Value; } attribute = attributeCollection["shippingAddressQuantity"]; if (attribute != null) { shippingAddressQuantity = int.Parse(attribute.Value); } attribute = attributeCollection["passwordMaxLength"]; if (attribute != null) { passwordMaxLength = int.Parse(attribute.Value); } if (passwordMaxLength < Membership.Provider.MinRequiredPasswordLength) { passwordMaxLength = 0x10; } attribute = attributeCollection["emailRegex"]; if (attribute != null) { emailRegex = attribute.Value; } attribute = attributeCollection["adminFolder"]; if (attribute != null) { adminFolder = attribute.Value; } attribute = attributeCollection["useUniversalCode"]; if ((attribute != null) && attribute.Value.Equals("true")) { useUniversalCode = true; } }
internal void GetAttributes(XmlAttributeCollection attributeCollection) { XmlAttribute xmlAttribute = attributeCollection["smtpServerConnectionLimit"]; if (xmlAttribute != null) { this.smtpServerConnectionLimit = short.Parse(xmlAttribute.Value, CultureInfo.InvariantCulture); } else { this.smtpServerConnectionLimit = -1; } xmlAttribute = attributeCollection["ssl"]; if (xmlAttribute != null) { this.ssl = (SSLSettings)Enum.Parse(typeof(SSLSettings), xmlAttribute.Value, true); } xmlAttribute = attributeCollection["usernameMinLength"]; if (xmlAttribute != null) { this.usernameMinLength = int.Parse(xmlAttribute.Value); } xmlAttribute = attributeCollection["usernameMaxLength"]; if (xmlAttribute != null) { this.usernameMaxLength = int.Parse(xmlAttribute.Value); } xmlAttribute = attributeCollection["usernameRegex"]; if (xmlAttribute != null) { this.usernameRegex = xmlAttribute.Value; } xmlAttribute = attributeCollection["emailEncoding"]; if (xmlAttribute != null) { this.emailEncoding = xmlAttribute.Value; } xmlAttribute = attributeCollection["shippingAddressQuantity"]; if (xmlAttribute != null) { this.shippingAddressQuantity = int.Parse(xmlAttribute.Value); } xmlAttribute = attributeCollection["passwordMaxLength"]; if (xmlAttribute != null) { this.passwordMaxLength = int.Parse(xmlAttribute.Value); } if (this.passwordMaxLength < 6) { this.passwordMaxLength = 16; } xmlAttribute = attributeCollection["emailRegex"]; if (xmlAttribute != null) { this.emailRegex = xmlAttribute.Value; } xmlAttribute = attributeCollection["adminFolder"]; if (xmlAttribute != null) { this.adminFolder = xmlAttribute.Value; } xmlAttribute = attributeCollection["version"]; if (xmlAttribute != null) { this.version = xmlAttribute.Value; } xmlAttribute = attributeCollection["useUniversalCode"]; if (xmlAttribute?.Value.Equals("true") ?? false) { this.useUniversalCode = true; } xmlAttribute = attributeCollection["cachePolicy"]; if (xmlAttribute != null) { this.cachePolicy = xmlAttribute.Value; } xmlAttribute = attributeCollection["imageServerUrl"]; if (xmlAttribute != null) { this.imageServerUrl = xmlAttribute.Value; } }
public static void ValidateSecureConnection(SSLSettings ssl, HttpContext context) { if (HiConfiguration.GetConfig().SSL == ssl) { RedirectToSSL(context); } }
internal void GetAttributes(XmlAttributeCollection attributeCollection) { XmlAttribute attribute = attributeCollection["smtpServerConnectionLimit"]; if (attribute != null) { this.smtpServerConnectionLimit = short.Parse(attribute.Value, CultureInfo.InvariantCulture); } else { this.smtpServerConnectionLimit = -1; } attribute = attributeCollection["ssl"]; if (attribute != null) { this.ssl = (SSLSettings)Enum.Parse(typeof(SSLSettings), attribute.Value, true); } attribute = attributeCollection["usernameMinLength"]; if (attribute != null) { this.usernameMinLength = int.Parse(attribute.Value); } attribute = attributeCollection["usernameMaxLength"]; if (attribute != null) { this.usernameMaxLength = int.Parse(attribute.Value); } attribute = attributeCollection["usernameRegex"]; if (attribute != null) { this.usernameRegex = attribute.Value; } attribute = attributeCollection["emailEncoding"]; if (attribute != null) { this.emailEncoding = attribute.Value; } attribute = attributeCollection["shippingAddressQuantity"]; if (attribute != null) { this.shippingAddressQuantity = int.Parse(attribute.Value); } attribute = attributeCollection["passwordMaxLength"]; if (attribute != null) { this.passwordMaxLength = int.Parse(attribute.Value); } if (this.passwordMaxLength < Membership.Provider.MinRequiredPasswordLength) { this.passwordMaxLength = 0x10; } attribute = attributeCollection["emailRegex"]; if (attribute != null) { this.emailRegex = attribute.Value; } attribute = attributeCollection["adminFolder"]; if (attribute != null) { this.adminFolder = attribute.Value; } attribute = attributeCollection["useUniversalCode"]; if ((attribute != null) && attribute.Value.Equals("true")) { this.useUniversalCode = true; } }