From 50b2a3cbdeb7614228503e21a0cd06ea28eb63db Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 9 Aug 2007 12:31:00 +0000 Subject: [PATCH] Check for invalid input in service git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7032 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_dhcpService.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/admin/systems/class_dhcpService.inc b/plugins/admin/systems/class_dhcpService.inc index 6faa7caa3..25c0b53cc 100644 --- a/plugins/admin/systems/class_dhcpService.inc +++ b/plugins/admin/systems/class_dhcpService.inc @@ -134,6 +134,17 @@ class dhcpService extends dhcpPlugin function check() { $message= array(); + + if (!is_id($this->statements['default-lease-time'])){ + $message[]= _('Default lease time needs to be numeric.'); + } + if (!is_id($this->statements['max-lease-time'])){ + $message[]= _('Maximum lease time needs to be numeric.'); + } + if ($this->statements['default-lease-time'] > $this->statements['max-lease-time']){ + $message[]= _('Default lease time needs to smaller than the maximum lease time.'); + } + return $message; } -- 2.30.2