Projects ⇒ Bugs ⇒ #979: unable to remove blocked IP's from security center admin ⇒ CPG Dragonfly™ CMS
Bug #979 unable to remove blocked IP's from security center admin
Project: Dragonfly 9.0.3 -> 9.3 Category: Administration
Submitted: Thursday, August 09, 2007 (14:05:55) Modified: Monday, September 17, 2007 (01:02:47)
Status: Closed Assigned to: NanoCaiordo
PHP Version: Irrelevant HTTPD Server: Apache 1.3

View/Vote Add Comment

by: dusman
Description:
------------
If you block IP's via the security center in admin, you are not able to then remove those IP's via the security center admin. When you select the IP(s) to remove you get an error "nothing specified"

Reproduce code:
---------------
add IP to block and then try to remove that IP via the security admin center

Expected result:
----------------
IP's are removed from being blocked

Actual result:
--------------
"nothing specified" error
by: NanoCaiordo
Which DragonflyCMS version are you using.
by: NanoCaiordo
This bug has been fixed in the CVS.

Snapshots of the sources are packaged every 6 hours; this change
will be in the next snapshot. You can grab the snapshot at the
Downloads section.

Thank you for the report, and for helping us to make Dragonfly 9.0.3 -> 9.1 better.

Index: security.php =================================================================== RCS file: /cvs/html/admin/modules/security.php,v retrieving revision 1.16 diff -u -r1.16 security.php --- security.php 4 Aug 2007 07:36:49 -0000 1.16 +++ security.php 17 Sep 2007 00:54:31 -0000 @@ -331,6 +331,20 @@ # else if (isset($_GET['ips'])) { if (Security::check_post()) { + if (!empty($_POST['mark'])) { + foreach (($_POST['mark']) as $ip) { + if (preg_match('#^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})( - )?([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})?$#',$ip, $match)) { + $ban_ipv4_s = ip2long($match[1]); + $ban_ipv4_e = ''; + if (!empty($match[2])) { + $ban_ipv4_e = 'AND ban_ipv4_e=\''.ip2long($match[3]).'\''; + } + } + $db->sql_query('DELETE FROM '.$prefix."_security WHERE ban_ipv4_s='$ban_ipv4_s' $ban_ipv4_e AND ban_type='0'"); + } + $db->optimize_table($prefix.'_security'); + url_redirect(adminlink('&ips')); + } $ip = $ip2 = false; if (!empty($_POST['ban_ipv4_s'])) { # CIDR block ?
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español