Support » Plugin: IP Geo Block » GB added to whitelist

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tokkonopapa


    Hello Bart,

    Thank for your trying my plugin.

    At the first installation, this plugin put your country code into the whitelist automatically. And in the past, there were a similar issue which was fixed in 2.2.3.

    I’d like to ask you to check the followings in order to identify your issue.

    1. Push “Scan your country code” at the top of “Validation rule settings” and check if your country code is correct.
    2. After removing “GB” from the whitelist and “Save Chnages”, check the whitelist. Is “GB” still there?

    I appreciate your cooperation.


    Thx for the reply. I just did as you asked and
    1) yes the country code is correct
    2) yes the GB is removed

    But what I noticed is that is randomly appears from time to time. I use your lugin since a month and it appeared exactly 3 times.

    Plugin Author tokkonopapa


    Wow, that’s too bad.

    Saving settings into your DB needs an admin authority and knowing a scret nonce. Additionally just before saving, admin capability will be checked by the following code:

    // must check that the user has the required capability
    if ( ! current_user_can( 'manage_options' ) )
        wp_die( __( 'You do not have sufficient permissions to access this page.' ) );

    This means “double-check” by design. So it seems very tough to debug, but I should try.

    For the time being, I recommend you to put the following snippet into your functions.php which is placed in your theme or child theme.

    function my_whitelist( $validate ) {
        $whitelist = array(
            'JP', // your country code should be upper case
        // block by default
        $validate['result'] = 'blocked';
        // if the country code is in the whitelist, then pass it
        if ( in_array( $validate['code'], $whitelist ) ) {
            $validate['result'] = 'passed';
        // return the validation result
        return $validate;
    add_filter( 'ip-geo-block-comment', 'my_whitelist' );
    add_filter( 'ip-geo-block-xmlrpc', 'my_whitelist' );
    add_filter( 'ip-geo-block-login', 'my_whitelist' );
    add_filter( 'ip-geo-block-admin', 'my_whitelist' );

    This code does not use the whitelist in your DB. Please refer to this document about some more details.

    And I expect you to send me an email if you never mind. You can find my address here.

    I would appreciate your kind cooperation.

    Plugin Author tokkonopapa


    Hi BartTheMan,

    Thanks to your post, I’ll release the fixed version in near future.

    I appreciate your contribution. Thanks.

    Plugin Author tokkonopapa


    Hi there,

    This issue happened at activation phase and I fixed it in 2.2.5.

    Thank you for your reporting!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘GB added to whitelist’ is closed to new replies.