From: hickert Date: Wed, 17 Aug 2011 06:13:09 +0000 (+0000) Subject: Added checks to mailAccount, to prevent adding empty forward addresses X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d695b1a77f15094211fc57a64079c0316f8f45ad;p=gosa.git Added checks to mailAccount, to prevent adding empty forward addresses git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20970 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index 4654e5433..1d3993a1d 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -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){