Permalink
Browse files

Applying AntiXSS

  • Loading branch information...
juanonsoftware
juanonsoftware committed Oct 19, 2015
1 parent fa82bf3 commit 170d81324b46e47ca3d67852060d40396716ebf0
@@ -1,5 +1,6 @@
using System.Web.Mvc;
using Demo.XBanking.Models;
using Microsoft.Security.Application;
namespace Demo.XBanking.Controllers
{
@@ -13,7 +14,9 @@ public ActionResult New()
[HttpPost]
public ActionResult New(LineItem item)
{
var safeHtml = Sanitizer.GetSafeHtmlFragment(item.Message);
return View(item);
}
}
}
}
@@ -41,10 +41,18 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AntiXssLibrary, Version=4.3.0.0, Culture=neutral, PublicKeyToken=d127efab8a9c114f, processorArchitecture=MSIL">
<HintPath>..\packages\AntiXSS.4.3.0\lib\net40\AntiXssLibrary.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="HtmlSanitizationLibrary, Version=4.3.0.0, Culture=neutral, PublicKeyToken=d127efab8a9c114f, processorArchitecture=MSIL">
<HintPath>..\packages\AntiXSS.4.3.0\lib\net40\HtmlSanitizationLibrary.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AntiXSS" version="4.3.0" targetFramework="net45" />
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
<package id="bootstrap" version="3.3.5" targetFramework="net45" />
<package id="jQuery" version="2.1.4" targetFramework="net45" />

0 comments on commit 170d813

Please sign in to comment.