示例#1
0
 public void DPlaceWithHtmlLongName_WhenScrubbed_BecomesSafe()
 {
     string malicious = "<div>Hello, world!</div>";
     DPlace place = new DPlace { Long_Name = malicious };
     place.Scrub();
     Assert.AreNotEqual(place.Long_Name, malicious);
 }
示例#2
0
 public void DPlaceWithSqlShortName_WhenScrubbed_BecomesSafe()
 {
     string malicious = "<div>Hello, world!</div>');DROP TABLE dbo.Users;--";
     DPlace place = new DPlace { Short_Name = malicious };
     place.Scrub();
     Assert.AreNotEqual(place.Short_Name, malicious);
 }
示例#3
0
 public void DPlaceWithHtmlAndSqlShortName_WhenScrubbed_BecomesSafe()
 {
     string malicious = "attribute');DROP TABLE dbo.Users;--";
     DPlace place = new DPlace { Short_Name = malicious };
     place.Scrub();
     Assert.AreNotEqual(place.Short_Name, malicious);
 }