function CoderReviewSecurityTest::testSecurityPostGetRequest in Coder 7
Same name and namespace in other branches
- 7.2 coder_review/tests/coder_review_security.test \CoderReviewSecurityTest::testSecurityPostGetRequest()
File
- coder_review/
tests/ coder_review_security.test, line 231
Class
Code
function testSecurityPostGetRequest() {
$this
->assertCoderReviewPass(' $_POST["safe_data"] = "abc";');
$this
->assertCoderReviewPass(' $_POST["tainted_data"] .= "abc";');
$this
->assertCoderReviewPass(' $post = check_plain($_POST["tainted_data"]);');
$this
->assertCoderReviewPass(' $post = check_markup($_POST["tainted_data"]);');
$this
->assertCoderReviewPass(' $post = filter_xss($_POST["tainted_data"]);');
$this
->assertCoderReviewPass(' $post = filter_xss_admin($_POST["tainted_data"]);');
$this
->assertCoderReviewPass(' $post = form_set_cache($_POST["form_build_id"], $form_state);');
$this
->assertCoderReviewFail(' $post = $_POST["tainted_data"];');
$this
->assertCoderReviewFail(' t($_POST["tainted_data"]);');
}