From af8665d973e63ace812ab1d433ae8b8dce5922c4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 17 Feb 2015 15:57:47 +0200 Subject: Fix #3572: CI_Security::_remove_evil_attributes() --- tests/codeigniter/core/Security_test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/codeigniter') diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index 402422ff8..d967613b5 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -79,6 +79,18 @@ class Security_test extends CI_TestCase { // -------------------------------------------------------------------- + public function test_remove_evil_attributes() + { + $this->assertEquals('', $this->security->remove_evil_attributes('', false)); + $this->assertEquals('', $this->security->remove_evil_attributes('', false)); + $this->assertEquals('', $this->security->remove_evil_attributes('', false)); + $this->assertEquals('', $this->security->remove_evil_attributes('', false)); + $this->assertEquals('onOutsideOfTag=test', $this->security->remove_evil_attributes('onOutsideOfTag=test', false)); + $this->assertEquals('onNoTagAtAll = true', $this->security->remove_evil_attributes('onNoTagAtAll = true', false)); + } + + // -------------------------------------------------------------------- + public function test_xss_hash() { $this->assertEmpty($this->security->xss_hash); -- cgit v1.2.3-24-g4f1b