• Resolved b.l.k

    (@blk-1)


    Hello,
    there is an SQL error in the function lockout() in secure.php when BWPS tries to ban an host:

    $wpdb->insert(
    	$wpdb->base_prefix . 'bwps_lockouts',
    	array(
    		'type' => $type,
    		'active' => 1,
    		'starttime' => $currtime,
    		'exptime' => $exptime,
    		'host' => $wpdb->escape( $_SERVER['REMOTE_ADDR'] ),
    		'user' => ''
    	)
    );

    the column user is defined as bigint(20) and an empty string is sent in the query.

    The correct query should be :

    $wpdb->insert(
    	$wpdb->base_prefix . 'bwps_lockouts',
    	array(
    		'type' => $type,
    		'active' => 1,
    		'starttime' => $currtime,
    		'exptime' => $exptime,
    		'host' => $wpdb->escape( $_SERVER['REMOTE_ADDR'] ),
    		'user' => 0
    	)
    );

    or maybe you can try to send NULL ?

    Could you confirm this is an error and fix it in the next release ?

    Thank you for your answer

    https://www.ads-software.com/extend/plugins/better-wp-security/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Better WP Security] SQL errror in function lockout()’ is closed to new replies.