IDN support: new validation of domain names, make DNS providers use ascii and iis unicode. Block use of IDN domain names in organizations and mail
This commit is contained in:
parent
a211800357
commit
2d96231e35
24 changed files with 581 additions and 203 deletions
|
@ -30,6 +30,7 @@ using System;
|
|||
using System.Web;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using System.Collections.Generic;
|
||||
using WebsitePanel.Portal.UserControls;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
|
@ -82,12 +83,12 @@ namespace WebsitePanel.Portal
|
|||
if (type == DomainType.Domain || type == DomainType.DomainPointer)
|
||||
{
|
||||
// domains
|
||||
DomainPanel.Visible = true;
|
||||
DomainName.IsSubDomain = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// sub-domains
|
||||
SubDomainPanel.Visible = true;
|
||||
DomainName.IsSubDomain = true;
|
||||
|
||||
// fill sub-domains
|
||||
if (!IsPostBack)
|
||||
|
@ -178,14 +179,14 @@ namespace WebsitePanel.Portal
|
|||
if (!domain.IsDomainPointer && !domain.IsSubDomain && !domain.IsInstantAlias)
|
||||
domains.Add(domain);
|
||||
|
||||
DomainsList.DataSource = domains;
|
||||
DomainsList.DataBind();
|
||||
DomainName.DataSource = domains;
|
||||
DomainName.DataBind();
|
||||
}
|
||||
|
||||
private void BindResellerDomains()
|
||||
{
|
||||
DomainsList.DataSource = ES.Services.Servers.GetResellerDomains(PanelSecurity.PackageId);
|
||||
DomainsList.DataBind();
|
||||
DomainName.DataSource = ES.Services.Servers.GetResellerDomains(PanelSecurity.PackageId);
|
||||
DomainName.DataBind();
|
||||
}
|
||||
|
||||
private void AddDomain()
|
||||
|
@ -197,9 +198,7 @@ namespace WebsitePanel.Portal
|
|||
DomainType type = GetDomainType(Request["DomainType"]);
|
||||
|
||||
// get domain name
|
||||
string domainName = DomainName.Text.Trim();
|
||||
if (type == DomainType.SubDomain || type == DomainType.ProviderSubDomain)
|
||||
domainName = SubDomainName.Text.Trim() + "." + DomainsList.SelectedValue;
|
||||
var domainName = DomainName.Text;
|
||||
|
||||
int pointWebSiteId = 0;
|
||||
int pointMailDomainId = 0;
|
||||
|
@ -263,5 +262,13 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
AddDomain();
|
||||
}
|
||||
|
||||
protected void DomainName_TextChanged(object sender, DomainControl.DomainNameEventArgs e)
|
||||
{
|
||||
// If the choosen domain is a idn domain, don't allow to create mail
|
||||
var isIdn = Utils.IsIdnDomain(e.DomainName);
|
||||
PointMailDomainPanel.Enabled = !isIdn;
|
||||
PointMailDomain.Checked = !isIdn;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue