Support Forum

Ban Plugin: Where to see the added IPs?

18 Answers

New Answer

EL Elsa
Elsa
Member

This is exactly what I did:

1. I cleared the error log

2. Edited the sp-ban-admin-save.php file per instructions (below) & uploaded file to server

function sp_ban_admin_do_save_bans() {
$ips = explode(“n”, trim($_POST[‘ip_addr’]));
sp_update_option(‘banned_ips’, sp_esc_str($ips));

$ip_ranges = explode(“n”, trim($_POST[‘ip_addr_range’]));
sp_update_option(‘banned_ip_ranges’, sp_esc_str($ip_ranges));

$hostnames = explode(“n”, trim($_POST[‘hostname’]));
sp_update_option(‘banned_hostnames’, sp_esc_str($hostnames));

$user_agents = explode(“n”, trim($_POST[‘user_agent’]));
sp_update_option(‘banned_agents’, sp_esc_str($user_agents));

return __(‘Bans updated’, ‘sp-ban’);
}

3. Entered 3 IP addresses (one per line)

27.159.223.93
27.252.78.193
31.73.110.211

4. Clicked Updated Bans

5. All IP addresses disappeared and were no longer in the box

6. Checked error log (see attached pdf)

MP Mr Papa
Mr Papa
Member

I am afraid I confused and have lost the bubble here a bit…  The code I linked doesnt look quite right and doesnt match what is in the upcoming bans plugin update…

That update is coming out tomorrow with sp 5.3…  Can we until then and just update the plugin and see if that resolves it?

EL Elsa
Elsa
Member

Yes, we can wait.  Thank you for all your help.

MP Mr Papa
Mr Papa
Member

5.3 and the plugin updates, including bans, have been pushed out…