From d695b1a77f15094211fc57a64079c0316f8f45ad Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Aug 2011 06:13:09 +0000 Subject: [PATCH] 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 --- gosa-plugins/mail/personal/mail/class_mailAccount.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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){ -- 2.30.2