From 8e38225ba345d584343af95a199f7d7b8eeab789 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 29 Aug 2005 08:08:35 +0000 Subject: [PATCH] Added check in logonScriptManagement to avoid | in name/description ... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1241 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../environment/class_logonManagementDialog.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/personal/environment/class_logonManagementDialog.inc b/plugins/personal/environment/class_logonManagementDialog.inc index b2bdea79c..ea1dcca55 100644 --- a/plugins/personal/environment/class_logonManagementDialog.inc +++ b/plugins/personal/environment/class_logonManagementDialog.inc @@ -84,6 +84,22 @@ class logonManagementDialog extends plugin } } + function check() + { + $message = array(); + + if(preg_match("/[^a-z]/",$this->LogonName)){ + $message[] = _("Specified name is invalid."); + } + + if(preg_match("/[^a-z0-9,\.-;:_\(\)!\? ]/i",$this->LogonDescription)){ + $message[] = _("Specified decription contains invalid characters."); + } + + return $message; + } + + function save() { $a_return= array(); -- 2.30.2