ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

The class protector_bruteforce_overrun_message is not named in CamelCase.
Open

class protector_bruteforce_overrun_message extends ProtectorFilterAbstract {

    function execute() {
        // header( 'Location: http://google.com/' ) ; // redirect somewhere
        echo 'You have tried too many wrong loggin in'; // write any message as you like

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The property $_should_be_banned_time0 is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The class protector_f5attack_overrun_message is not named in CamelCase.
Open

class protector_f5attack_overrun_message extends ProtectorFilterAbstract {

    function execute() {
        // header( 'Location: http://google.com/' ) ; // redirect somewhere
        echo 'You have reloaded a page too many times'; // write any message as you like

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The class protector_postcommon_post_need_multibyte is not named in CamelCase.
Open

class protector_postcommon_post_need_multibyte extends ProtectorFilterAbstract {

    function execute() {

        if (!function_exists('mb_strlen')) return true;

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The parameter $database_name is not named in camelCase.
Open

function sanitize_database($database_name) {
    return preg_replace('/[^A-Za-z0-9_]+/', '', $database_name);
}
Severity: Minor
Found in htdocs/install/page_dbsettings.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The class protector_postcommon_post_register_moratorium is not named in CamelCase.
Open

class protector_postcommon_post_register_moratorium extends ProtectorFilterAbstract {

    function execute() {

        if (!is_object(icms::$user)) {

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The parameter $bad_ips is not named in camelCase.
Open

    function write_file_badips($bad_ips) {
        asort($bad_ips);

        $fp = @fopen($this->get_filepath4badips(), 'w');
        if ($fp) {

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The class protector_prepurge_exit_message is not named in CamelCase.
Open

class protector_prepurge_exit_message extends ProtectorFilterAbstract {

    function execute() {
        // header( 'Location: http://google.com/' ) ; // redirect somewhere
        echo 'Protector detects attacking actions'; // write any message as you like

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The property $last_error_type is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $_dos_stage is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Avoid variables with short names like $ip. Configured minimum length is 3.
Open

        $ip = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $ip. Configured minimum length is 3.
Open

    function register_bad_ips($jailed_time = 0, $ip = null) {

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $s. Configured minimum length is 3.
Open

    function bigumbrella_outputcheck($s) {

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $can_ban is not named in camelCase.
Open

    function check_dos_attack($uid = 0, $can_ban = false) {
        if ($this->_done_dos) return true;

        $ip4sql = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
        $uri4sql = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING);

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Avoid variables with short names like $ip. Configured minimum length is 3.
Open

    function deny_by_htaccess($ip = null) {

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The class protector_postcommon_post_htmlpurify4everyone is not named in CamelCase.
Open

class protector_postcommon_post_htmlpurify4everyone extends ProtectorFilterAbstract {
    var $purifier;
    var $method;

    function execute() {

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Avoid variables with short names like $s. Configured minimum length is 3.
Open

    function ob_filter($s) {

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The class protector_precommon_badip_errorlog is not named in CamelCase.
Open

class protector_precommon_badip_errorlog extends ProtectorFilterAbstract {

    function execute() {
        echo _MD_PROTECTOR_YOUAREBADIP;
        $protector = &Protector::getInstance();

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The class protector_postcommon_post_deny_by_rbl is not named in CamelCase.
Open

class protector_postcommon_post_deny_by_rbl extends ProtectorFilterAbstract {

    function execute() {
        // RBL servers (don't enable too many servers)
        $rbls = array (

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The parameter $with_jailed_time is not named in camelCase.
Open

    function get_bad_ips($with_jailed_time = false) {
        list($bad_ips_serialized) = @file(self::get_filepath4badips());
        $bad_ips = empty($bad_ips_serialized) ? array() : @unserialize($bad_ips_serialized);
        if (!is_array($bad_ips) || isset($bad_ips[0])) $bad_ips = array();

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Severity
Category
Status
Source
Language