Esempio n. 1
0
 public void DEmailWithHtmlUrl_WhenScrubbed_BecomesSafe()
 {
     string malicious = "<div>Hello, world!</div>";
     DEmail email = new DEmail { Url = malicious };
     email.Scrub();
     Assert.AreNotEqual(email.Url, malicious);
 }
Esempio n. 2
0
 public void DEmailWithSqlUrl_WhenScrubbed_BecomesSafe()
 {
     string malicious = "<div>Hello, world!</div>');DROP TABLE dbo.Users;--";
     DEmail email = new DEmail { Url = malicious };
     email.Scrub();
     Assert.AreNotEqual(email.Url, malicious);
 }
Esempio n. 3
0
 public void DEmailWithHtmlAndSqlUrl_WhenScrubbed_BecomesSafe()
 {
     string malicious = "attribute');DROP TABLE dbo.Users;--";
     DEmail email = new DEmail { Url = malicious };
     email.Scrub();
     Assert.AreNotEqual(email.Url, malicious);
 }