From cff894e0916d640dc0ad37a37157184441db7b92 Mon Sep 17 00:00:00 2001 From: robvde Date: Sat, 15 Sep 2012 09:27:33 +0400 Subject: [PATCH] Fixed: GlobalDNSREcord only accepts ip addresses. Input validation removed from control. --- .../DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx | 1 + .../WebsitePanel/GlobalDnsRecordsControl.ascx.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx index c66291a3..03f5f160 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx @@ -60,6 +60,7 @@ --> + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx.cs index ebb94dde..9dc65cd5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/GlobalDnsRecordsControl.ascx.cs @@ -176,6 +176,7 @@ namespace WebsitePanel.Portal } } protected void Validate(object source, ServerValidateEventArgs args) { +/* var ip = args.Value; System.Net.IPAddress ipaddr; if (string.IsNullOrEmpty(args.Value)) @@ -184,6 +185,8 @@ namespace WebsitePanel.Portal args.IsValid = System.Net.IPAddress.TryParse(ip, out ipaddr) && (ip.Contains(":") || ip.Contains(".")) && ((ddlRecordType.SelectedValue == "A" && ipaddr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) || (ddlRecordType.SelectedValue == "AAAA" && ipaddr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)); +*/ + args.IsValid = true; } private void SaveRecord()