• Resolved calimero2

    (@calimero2)


    Fresh installation of version 1.1.2
    Opening the settings page will show : IP_LOCATION_BLOCK_AUTH is not defined at admin.min.js?ver=1.1.2:1:71

    Cannot save any setting with the button at the bottom. Always shows the error message: Sorry, your request cannot be accepted.

    Are these 2 errors related, or am i doing something wrong ?

    regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter calimero2

    (@calimero2)

    Just found that: classes/class-ip-location-block.php
    public static function enqueue_nonce( $hook ) {
    if ( ! IP_Location_Block_Util::is_user_logged_in() ) {

    returns false, but I’m logged in and in the iplocationblock settings screen.
    How can this be ?

    regards.

    Thread Starter calimero2

    (@calimero2)

    I fixed this by simply changing wp-content/plugins/ip-location-block/classes/class-ip-location-block-util.php

    public static function is_user_logged_in() {
    if ( null === $logged_in ) {
    $logged_in = is_user_logged_in();
    }

    because:
    check for: did_action( ‘init’ ) always returns false

    and

    The file ip-location-block\classes\class-ip-location-block-util.php
    private static function validate_auth_cookie( $scheme = ‘logged_in’ )

    returns false on hash_equals. The $hash is different. Unclear why.

    if ( ! self::hash_equals( $hash, $hmac ) ) {
    return $cache_user = false;
    }

    Plugin Author Darko G.

    (@darkog)

    Thanks for reporting the error. This will be fixed in 1.1.3.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘IP_LOCATION_BLOCK_AUTH is not defined’ is closed to new replies.