function coder_security_reviews in Coder 5
Same name and namespace in other branches
- 5.2 includes/coder_security.inc \coder_security_reviews()
- 6.2 includes/coder_security.inc \coder_security_reviews()
- 6 includes/coder_security.inc \coder_security_reviews()
@file This include file implements coder functionality for Drupal Standards
Todo: The rules for this review are not yet complete.
File
- includes/
coder_security.inc, line 9 - This include file implements coder functionality for Drupal Standards
Code
function coder_security_reviews() {
$rules = array(
array(
'#type' => 'regex',
'#value' => 'l\\(check_plain\\(',
'#warning_callback' => '_coder_security_l_check_plain_warning',
),
/* array(
'#type' => 'callback',
'#value' => _coder_security_callback,
), */
array(
'#type' => 'regex',
'#value' => '(?-i)\\$REQUEST_URI',
'#warning_callback' => '_coder_security_request_uri_warning',
),
array(
'#type' => 'regex',
'#source' => 'all',
'#value' => '(?-i)\\"REQUEST_URI\\"|\'REQUEST_URI\'',
'#warning_callback' => '_coder_security_request_uri_warning',
),
);
$review = array(
'#title' => 'Handle text in a secure fashion',
'#link' => 'http://drupal.org/node/28984',
'#rules' => $rules,
'#severity' => 'critical',
'#description' => t('very basic, needs work, but what it finds is good'),
);
return array(
'security' => $review,
);
}