Iptables.php
authorAlan Knowles <alan@akbkhome.com>
Fri, 29 Mar 2013 07:50:04 +0000 (15:50 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 29 Mar 2013 07:50:04 +0000 (15:50 +0800)
Iptables.php

index 16bf1b0..635ae5c 100644 (file)
@@ -245,8 +245,7 @@ class Pman_Admin_Iptables extends Pman {
             }
             
             if ($old) {
-                $this->exec("{$iptables} -R postgres {$old['num']} -s {$ip}/32 -j ACCEPT --comment ".
-                    escapeshellarg(json_encode(array('expires'=>$expires)))) ;
+                $this->exec("{$iptables} -R postgres {$old['num']} -s {$ip}/32 -j ACCEPT --comment $comment";
                 
                 if (isset($remove[$ip])) {
                     unset($remove[$ip]);
@@ -254,7 +253,7 @@ class Pman_Admin_Iptables extends Pman {
                 continue;
             }
             
-            $this->exec("{$iptables} -I postgres {$lastrulenum} -s {$ip}/32 -j ACCEPT --comment ".
+            $this->exec("{$iptables} -I postgres {$lastrulenum} -s {$ip}/32 -j ACCEPT --comment $comment";