XF 2.2 Bug? Server error: Error on ip ban wildcard

Black Tiger

Well-known member
Seems XF 2.2.13 has an issue with ip bans. I didn't see that on 2.2.12 yet.

Code:
    XF\PrintableException: Job PB\ACPI:IpBanJob: Gelieve een geldige IP of IP-bereik in te voeren. Jokertekens mogen alleen op het einde gebruikt worden. src/XF/Repository/Banning.php:251 

    Generated by: Unknown account Jun 21, 2023 at 18:42 

Stack trace

#0 src/XF/Repository/Banning.php(162): XF\Repository\Banning->getIpRecord('')
#1 src/addons/PB/ACPI/Job/IpBanJob.php(39): XF\Repository\Banning->banIp('', '')
#2 src/XF/Job/Manager.php(260): PB\ACPI\Job\IpBanJob->run(8)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#4 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#5 job.php(22): XF\Job\Manager->runByIds(Array, 8)
#6 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(50) "https://www.mydomain.org/admin.php?banning/ips"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(5) {
    ["only_ids"] => array(1) {
      [0] => string(6) "146412"
    }
    ["_xfRequestUri"] => string(22) "/admin.php?banning/ips"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

The first line has Dutch text, I translated it via Google so that should read:
XF\PrintableException: Job PB\ACPI:IpBanJob: Please enter a valid IP or IP range. Wildcards may only be used at the end. src/XF/Repository/Banning.php:251

However, I don't have any wildcards on ip addresses in the banning section, only on banned e-mail addresses and that should not be an issue.

So why is this suddenly going wrong?
 
Solution
Looks like some add-on (PB/ACPI) is actually just passing an empty string, which is being flagged as an empty IP address. You'd need to ask the add-on author for support.
Looks like some add-on (PB/ACPI) is actually just passing an empty string, which is being flagged as an empty IP address. You'd need to ask the add-on author for support.
 
Solution
Back
Top Bottom