Code

Added checks to mailAccount, to prevent adding empty forward addresses
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Aug 2011 06:13:09 +0000 (06:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Aug 2011 06:13:09 +0000 (06:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20970 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mailAccount.inc

index 4654e54330c0c51db9c6af5e8aef1f68d513721d..1d3993a1dca3468f42cd1e203e80e3ace9dc3d26 100644 (file)
@@ -337,8 +337,8 @@ class mailAccount extends plugin
       return($this->mailAddressSelect->execute());
     }
 
-    if (isset($_POST['add_forwarder'])){
-      if ($_POST['forward_address'] != ""){
+    if (isset($_POST['add_forwarder']) && isset($_POST['forward_address'])){
+      if (!empty($_POST['forward_address'])){
         $address= get_post('forward_address');
         $valid= FALSE;
         if (!tests::is_email($address)){
@@ -364,7 +364,7 @@ class mailAccount extends plugin
         }
       }
     }
-    if (isset($_POST['delete_forwarder'])){
+    if (isset($_POST['delete_forwarder']) && isset($_POST['forwarder_list'])){
       $this->delForwarder ($_POST['forwarder_list']);
     }
     if ($this->mailAddressSelect instanceOf mailAddressSelect){