• Resolved swissspaceboy

    (@swissspaceboy)


    Hello,

    I have these strange error messages in my PHP error log file. I have no access activity at those timestamps.

    I could find the string “Invalid IP Address” in your plugin, file blackhole-ip.php, line 92

    
    if ($ip) {
        $log = apply_filters('blackhole_validate_ip_log', 'Invalid IP Address: '. $ip, $ip);
        error_log($log);		
    }
    

    Can you check please?

    Version:2.9.1

    Thanks, Didier.

    [22-Sep-2020 06:38:05 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 06:43:20 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 06:48:27 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 06:53:41 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 11:21:53 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 11:27:06 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 11:32:17 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 11:37:18 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 12:31:05 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 12:36:30 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 12:41:53 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [22-Sep-2020 12:47:11 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [23-Sep-2020 11:23:17 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))
    [23-Sep-2020 11:28:22 UTC] Invalid IP Address: 1.1 localhost (Apache-HttpClient/4.5.2 (cache))

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jeff Starr

    (@specialk)

    It just means that the requests did not have a valid IP address. You can disable the errors if you want, using the provided filter.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hi Jeff,

    I took me some weeks to find out that this PHP error was coming from this plugin, so I have some additional questions, please.

    1. What has it to do with this Apache HTTP Client Cache 4.5.2?
    2. The bad IP is coming from a bad bot? Why I do not see this bot in my http access log?
    3. Where is this “localhost” coming from?
    4. Why the bad bot is not logged in the table as bad bot?

    Thanks for the answers so that I can reply to my web hoster who is already tracking this item.

    If the error message is not critical, I will drop it from my PHP log via the filter.

    Thanks,

    Didier.

    Plugin Author Jeff Starr

    (@specialk)

    Glad to help:

    1) Not familiar with that software/app
    2) Not sure, maybe it is happening internally?
    3) Not sure, but it’s not something the plugin is doing.
    4) Again, not sure

    It sounds to me like maybe there is some incompatibility with another plugin or maybe something on the server. Are any cache plugins or services running?

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hi,

    hmm..still wondering where this is coming from “1.1 localhost”. I have no other cache plugins enabled. I use “Autoptimize” and “IP2Location Redirection”, but I contacted all those plugin authors to see if they are responsible of this 1.1 localhost. Nothing from their side.

    I have no clue where these requests are coming from. Anyway, everything seems to be working fine, so I will disable the logging of that filter.

    As last question, can you tell how to disable that filter “blackhole_validate_ip_log” in my custom functions.php ? I am not an expert in WP coding.

    Many thanks.

    Didier.

    Plugin Author Jeff Starr

    (@specialk)

    Yes this should work:

    function blackhole_validate_ip_log_custom($log, $ip) { return ''; }
    add_filter('blackhole_validate_ip_log', 'blackhole_validate_ip_log_custom', 10, 2);

    Let me know if I can provide any further infos, glad to help anytime.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hi Jeff,

    I added the code, but I now obtain this in my error log. No text anymore, but the data is still printed. Anyway to get this error completely disabled?

    [09-Oct-2020 06:06:12 UTC] 
    [09-Oct-2020 06:11:33 UTC] 
    [09-Oct-2020 06:16:37 UTC] 
    [09-Oct-2020 06:21:41 UTC] 

    Thanks,

    Didier.

    Plugin Author Jeff Starr

    (@specialk)

    Hi Didier, that is a bug. Should disable the entire log entry. Will get it fixed up for the next plugin update.

    Plugin Author Jeff Starr

    (@specialk)

    This issue is resolved in the next version the plugin. As of Blackhole 3.0, the above recommended code snippet will disable all log entries. Thank you for reporting, Didier.

    Thread Starter swissspaceboy

    (@swissspaceboy)

    Hello,

    Thanks for the fix. This is now under test. I report back if I see some issues with it.

    Bye,

    Didier.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Invalid IP Address: 1.1 localhost’ is closed to new replies.