diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe
index b635d50e..874fb221 100644
Binary files a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe and b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe differ
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/PortalAntiXSS.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/PortalAntiXSS.cs
new file mode 100644
index 00000000..061f3847
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/PortalAntiXSS.cs
@@ -0,0 +1,59 @@
+// Copyright (c) 2012, Outercurve Foundation.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// - Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// - Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// - Neither the name of the Outercurve Foundation nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+using System;
+//using System.Collections.Generic;
+//using System.Linq;
+using System.Web;
+using Microsoft.Security.Application;
+
+//usage
+//<%@ Import Namespace="WebsitePanel.Portal" %>
+//using WebsitePanel.Portal;
+
+namespace WebsitePanel.Portal
+{
+ public class PortalAntiXSS
+ {
+ public static string Encode(string input)
+ {
+ return Encoder.HtmlEncode(input);
+ }
+
+ public static string EncodeOld(string input)
+ {
+ return Encoder.HtmlEncode(HttpUtility.HtmlDecode(input)); // HtmlDecode is used for compatability reasons with WSP pre-1.2.2 versions
+ }
+
+ public static string DecodeOld(string input)
+ {
+ return HttpUtility.HtmlDecode(input); // HtmlDecode is used for compatability reasons with WSP pre-1.2.2 versions
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs
index 37bde9ba..42cc31b9 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs
@@ -35,7 +35,6 @@ using System.Security.Cryptography;
using System.Runtime.Serialization;
using System.Globalization;
using System.Text;
-using Microsoft.Security.Application;
namespace WebsitePanel.WebPortal
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/Default.aspx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/Default.aspx.cs
index b831b110..50c487d0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/Default.aspx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/Default.aspx.cs
@@ -42,7 +42,7 @@ using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;
-using Microsoft.Security.Application;
+using WebsitePanel.Portal;
namespace WebsitePanel.WebPortal
{
@@ -387,7 +387,7 @@ namespace WebsitePanel.WebPortal
{
Label lbl = new Label();
lbl.Text =
- Microsoft.Security.Application.Encoder.HtmlEncode("
" + message.Replace("\n", "
") +
+ PortalAntiXSS.Encode("
" + message.Replace("\n", "
") +
"
");
lbl.ForeColor = Color.Red;
lbl.Font.Bold = true;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/Ecommerce/UserControls/CreateUserAccount.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/Ecommerce/UserControls/CreateUserAccount.ascx.cs
index 3fc40e80..c6c78afa 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/Ecommerce/UserControls/CreateUserAccount.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/Ecommerce/UserControls/CreateUserAccount.ascx.cs
@@ -27,7 +27,6 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
-using Microsoft.Security.Application;
using WSP = WebsitePanel.Portal;
using WebsitePanel.Ecommerce.EnterpriseServer;
using WebsitePanel.EnterpriseServer;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BandwidthReport.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BandwidthReport.ascx.cs
index 67d0b8be..59cd0268 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BandwidthReport.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BandwidthReport.ascx.cs
@@ -31,7 +31,6 @@ using System;
using System.Data;
using System.Text;
using System.Web.UI.WebControls;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReport.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReport.ascx.cs
index 6aa7773f..ce8f460c 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReport.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReport.ascx.cs
@@ -37,7 +37,6 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
-using Microsoft.Security.Application;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReportPackageDetails.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReportPackageDetails.ascx.cs
index 6e709956..c7c74d83 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReportPackageDetails.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DiskspaceReportPackageDetails.ascx.cs
@@ -39,7 +39,6 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal
{
@@ -94,7 +93,7 @@ namespace WebsitePanel.Portal
i++;
}
- litTotal.Text = Microsoft.Security.Application.Encoder.HtmlEncode(DiskspaceTotal.ToString());
+ litTotal.Text = PortalAntiXSS.Encode(DiskspaceTotal.ToString());
// get summary
gvSummary.DataSource = ds;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.cs
index ebc64bfa..501cab8b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.cs
@@ -29,7 +29,6 @@
using System;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.HostedSolution;
-using Microsoft.Security.Application;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.ExchangeServer
@@ -64,7 +63,7 @@ namespace WebsitePanel.Portal.ExchangeServer
ExchangeContact contact = ES.Services.ExchangeServer.GetContactGeneralSettings(PanelRequest.ItemID,
PanelRequest.AccountID);
- litDisplayName.Text = Microsoft.Security.Application.Encoder.HtmlEncode(contact.DisplayName);
+ litDisplayName.Text = PortalAntiXSS.Encode(contact.DisplayName);
// bind form
txtDisplayName.Text = contact.DisplayName;
@@ -146,7 +145,7 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
}
- litDisplayName.Text = Microsoft.Security.Application.Encoder.HtmlEncode(txtDisplayName.Text);
+ litDisplayName.Text = PortalAntiXSS.Encode(txtDisplayName.Text);
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_CONTACT_SETTINGS");
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.cs
index bdf839bf..feb9ed19 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.cs
@@ -38,7 +38,6 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.HostedSolution;
-using Microsoft.Security.Application;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.ExchangeServer
@@ -63,7 +62,7 @@ namespace WebsitePanel.Portal.ExchangeServer
ExchangeDistributionList dlist = ES.Services.ExchangeServer.GetDistributionListGeneralSettings(
PanelRequest.ItemID, PanelRequest.AccountID);
- litDisplayName.Text = dlist.DisplayName;
+ litDisplayName.Text = PortalAntiXSS.Encode(dlist.DisplayName);
// bind form
txtDisplayName.Text = dlist.DisplayName;
@@ -105,7 +104,7 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
}
- litDisplayName.Text = Microsoft.Security.Application.Encoder.HtmlEncode(txtDisplayName.Text);
+ litDisplayName.Text = PortalAntiXSS.Encode(txtDisplayName.Text);
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS");
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs
index 35b5b5b8..a06f972b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs
@@ -29,7 +29,6 @@
using System;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal.ExchangeServer
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangePublicFolderGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangePublicFolderGeneralSettings.ascx.cs
index 708b7774..66152db9 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangePublicFolderGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangePublicFolderGeneralSettings.ascx.cs
@@ -29,7 +29,6 @@
using System;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer;
-using Microsoft.Security.Application;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
@@ -120,7 +119,7 @@ namespace WebsitePanel.Portal.ExchangeServer
string origName = litDisplayName.Text;
origName = origName.Substring(0, origName.LastIndexOf("\\"));
- litDisplayName.Text = Microsoft.Security.Application.Encoder.HtmlEncode(origName + txtName.Text);
+ litDisplayName.Text = PortalAntiXSS.Encode(origName + txtName.Text);
BindSettings();
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
index b58fbea9..540fb703 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
@@ -29,7 +29,6 @@
using System;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
-using Microsoft.Security.Application;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.HostedSolution
@@ -70,7 +69,7 @@ namespace WebsitePanel.Portal.HostedSolution
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID,
PanelRequest.AccountID);
- litDisplayName.Text = Microsoft.Security.Application.Encoder.HtmlEncode(user.DisplayName);
+ litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
lblUserDomainName.Text = user.DomainUserName;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/FileManager.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/FileManager.ascx.cs
index 94d5833a..b8fe38e6 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/FileManager.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/FileManager.ascx.cs
@@ -33,7 +33,6 @@ using System.Text;
using System.Web;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.OS;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal
{
@@ -243,7 +242,7 @@ function SetCreateZipFocus()
{
if (e.CommandName == "browse")
{
- litPath.Text = HttpContext.Current.Server.HtmlEncode((string)e.CommandArgument);
+ litPath.Text = PortalAntiXSS.Encode((string)e.CommandArgument);
BindPath();
}
}
@@ -697,7 +696,7 @@ function SetCreateZipFocus()
if (e.CommandName == "browse")
{
string fileName = (string)e.CommandArgument;
- litPath.Text += HttpContext.Current.Server.HtmlEncode((litPath.Text != "\\") ? ("\\" + fileName) : fileName);
+ litPath.Text += PortalAntiXSS.Encode((litPath.Text != "\\") ? ("\\" + fileName) : fileName);
BindPath();
}
else if (e.CommandName == "download")
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx
index a13b0bd1..0af12b0d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx
@@ -11,9 +11,9 @@
- <%# Eval("PlanName") %>
+ <%# PortalAntiXSS.EncodeOld((string) Eval("PlanName")) %>
- <%# Eval("PlanDescription") %>
+ <%# PortalAntiXSS.EncodeOld((string) Eval("PlanDescription")) %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx.designer.cs
index ebd26788..26ff079a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddons.ascx.designer.cs
@@ -1,10 +1,37 @@
+// Copyright (c) 2012, Outercurve Foundation.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// - Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// - Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// - Neither the name of the Outercurve Foundation nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddonsEditAddon.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddonsEditAddon.ascx.cs
index ee7df6f3..bb5b4fac 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddonsEditAddon.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingAddonsEditAddon.ascx.cs
@@ -29,7 +29,6 @@
using System;
using System.Web;
using WebsitePanel.EnterpriseServer;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal
{
@@ -79,8 +78,8 @@ namespace WebsitePanel.Portal
}
// bind plan
- txtPlanName.Text = Server.HtmlDecode(plan.PlanName);
- txtPlanDescription.Text = Server.HtmlDecode(plan.PlanDescription);
+ txtPlanName.Text = PortalAntiXSS.DecodeOld(plan.PlanName);
+ txtPlanDescription.Text = PortalAntiXSS.DecodeOld(plan.PlanDescription);
//chkAvailable.Checked = plan.Available;
//txtSetupPrice.Text = plan.SetupPrice.ToString("0.00");
@@ -107,8 +106,8 @@ namespace WebsitePanel.Portal
plan.UserId = PanelSecurity.SelectedUserId;
plan.PlanId = PanelRequest.PlanID;
plan.IsAddon = true;
- plan.PlanName = Server.HtmlEncode(txtPlanName.Text);
- plan.PlanDescription = Server.HtmlEncode(txtPlanDescription.Text);
+ plan.PlanName = txtPlanName.Text;
+ plan.PlanDescription = txtPlanDescription.Text;
plan.Available = true; // always available
plan.SetupPrice = 0;
@@ -144,7 +143,7 @@ namespace WebsitePanel.Portal
try
{
PackageResult result = ES.Services.Packages.UpdateHostingPlan(plan);
- lblMessage.Text = Microsoft.Security.Application.Encoder.HtmlEncode(GetExceedingQuotasMessage(result.ExceedingQuotas));
+ lblMessage.Text = PortalAntiXSS.Encode(GetExceedingQuotasMessage(result.ExceedingQuotas));
if (result.Result < 0)
{
ShowResultMessage(result.Result);
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx
index e7534921..63d61b1a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx
@@ -12,9 +12,9 @@
- <%# Eval("PlanName") %>
+ <%# PortalAntiXSS.Encode((string)Eval("PlanName")) %>
- <%# Eval("PlanDescription") %>
+ <%# PortalAntiXSS.Encode((string)Eval("PlanDescription")) %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx.designer.cs
index cfdf9e07..27a8b616 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlans.ascx.designer.cs
@@ -1,10 +1,37 @@
+// Copyright (c) 2012, Outercurve Foundation.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// - Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// - Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// - Neither the name of the Outercurve Foundation nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3074
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansEditPlan.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansEditPlan.ascx.cs
index 61ecfb3f..d7ba9fa8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansEditPlan.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansEditPlan.ascx.cs
@@ -30,7 +30,6 @@ using System;
using System.Web;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal
{
@@ -104,8 +103,8 @@ namespace WebsitePanel.Portal
}
// bind plan
- txtPlanName.Text = Server.HtmlDecode(plan.PlanName);
- txtPlanDescription.Text = Server.HtmlDecode(plan.PlanDescription);
+ txtPlanName.Text = PortalAntiXSS.DecodeOld(plan.PlanName);
+ txtPlanDescription.Text = PortalAntiXSS.DecodeOld(plan.PlanDescription);
//chkAvailable.Checked = plan.Available;
//txtSetupPrice.Text = plan.SetupPrice.ToString("0.00");
@@ -137,8 +136,8 @@ namespace WebsitePanel.Portal
plan.UserId = PanelSecurity.SelectedUserId;
plan.PlanId = PanelRequest.PlanID;
plan.IsAddon = false;
- plan.PlanName = Server.HtmlEncode(txtPlanName.Text);
- plan.PlanDescription = Server.HtmlEncode(txtPlanDescription.Text);
+ plan.PlanName = txtPlanName.Text;
+ plan.PlanDescription = txtPlanDescription.Text;
plan.Available = true; // always available
plan.SetupPrice = 0;
@@ -196,7 +195,7 @@ namespace WebsitePanel.Portal
if (result.Result < 0)
{
ShowResultMessage(result.Result);
- lblMessage.Text = Microsoft.Security.Application.Encoder.HtmlEncode(GetExceedingQuotasMessage(result.ExceedingQuotas));
+ lblMessage.Text = PortalAntiXSS.Encode(GetExceedingQuotasMessage(result.ExceedingQuotas));
return;
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LoggedUserEditDetails.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LoggedUserEditDetails.ascx.cs
index 4f0d0126..eafcbe40 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LoggedUserEditDetails.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LoggedUserEditDetails.ascx.cs
@@ -64,8 +64,8 @@ namespace WebsitePanel.Portal
userPassword.SetUserPolicy(user.UserId, UserSettings.WEBSITEPANEL_POLICY, "PasswordPolicy");
// account info
- txtFirstName.Text = Server.HtmlDecode(user.FirstName);
- txtLastName.Text = Server.HtmlDecode(user.LastName);
+ txtFirstName.Text = PortalAntiXSS.DecodeOld(user.FirstName);
+ txtLastName.Text = PortalAntiXSS.DecodeOld(user.LastName);
txtEmail.Text = user.Email;
txtSecondaryEmail.Text = user.SecondaryEmail;
lblUsername.Text = user.Username;
@@ -106,8 +106,8 @@ namespace WebsitePanel.Portal
{
// gather data from form
// account info
- user.FirstName = Server.HtmlEncode(txtFirstName.Text);
- user.LastName = Server.HtmlEncode(txtLastName.Text);
+ user.FirstName = txtFirstName.Text;
+ user.LastName = txtLastName.Text;
user.Email = txtEmail.Text;
user.SecondaryEmail = txtSecondaryEmail.Text;
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PeersEditPeer.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PeersEditPeer.ascx.cs
index 6750e309..0f052cb3 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PeersEditPeer.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PeersEditPeer.ascx.cs
@@ -38,7 +38,6 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
-using Microsoft.Security.Application;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal
@@ -111,8 +110,8 @@ namespace WebsitePanel.Portal
userPassword.ValidationGroup = "NewPassword";
// account info
- txtFirstName.Text = Server.HtmlDecode(user.FirstName);
- txtLastName.Text = Server.HtmlDecode(user.LastName);
+ txtFirstName.Text = PortalAntiXSS.DecodeOld(user.FirstName);
+ txtLastName.Text = PortalAntiXSS.DecodeOld(user.LastName);
txtEmail.Text = user.Email;
txtSecondaryEmail.Text = user.SecondaryEmail;
ddlMailFormat.SelectedIndex = user.HtmlMail ? 1 : 0;
@@ -189,8 +188,8 @@ namespace WebsitePanel.Portal
user.IsPeer = true;
// account info
- user.FirstName = Server.HtmlEncode(txtFirstName.Text);
- user.LastName = Server.HtmlEncode(txtLastName.Text);
+ user.FirstName = txtFirstName.Text;
+ user.LastName = txtLastName.Text;
user.Email = txtEmail.Text;
user.SecondaryEmail = txtSecondaryEmail.Text;
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail60_EditList.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail60_EditList.ascx.cs
index eeba8b82..1a8f0c85 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail60_EditList.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail60_EditList.ascx.cs
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, Outercurve Foundation.
+// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@@ -30,7 +30,6 @@
using System.Web.UI.WebControls;
using WebsitePanel.Providers.Mail;
using WebsitePanel.WebPortal.Code.Controls;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal.ProviderControls
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail_EditList.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail_EditList.ascx.cs
index e6abdf3d..a4daba42 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail_EditList.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/SmarterMail_EditList.ascx.cs
@@ -30,7 +30,6 @@ using System;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.Mail;
using WebsitePanel.WebPortal.Code.Controls;
-using Microsoft.Security.Application;
namespace WebsitePanel.Portal.ProviderControls
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx
index aaaa709c..7e6c19f5 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Schedules.ascx
@@ -3,6 +3,7 @@
<%@ Register Src="UserControls/UserDetails.ascx" TagName="UserDetails" TagPrefix="uc2" %>
<%@ Register Src="UserControls/SearchBox.ascx" TagName="SearchBox" TagPrefix="uc1" %>
<%@ Register Src="UserControls/Quota.ascx" TagName="Quota" TagPrefix="uc4" %>
+<%@ Import Namespace="WebsitePanel.Portal" %>