From: hickert Date: Thu, 25 Oct 2007 14:13:38 +0000 (+0000) Subject: Added check for printer name X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c72d3aff0fe36b45d7665d31bf32b3623193835c;p=gosa.git Added check for printer name git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7664 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 04e78a407..86d13fa9f 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -640,7 +640,12 @@ class printgeneric extends plugin /* must: cn */ if(($this->BelongsTo == "Printer") && (empty($this->cn))){ - $message[]= "The required field 'Printer name' is not set."; + $message[]= _("The required field 'Printer name' is not set."); + } + + /* must: cn */ + if(($this->BelongsTo == "Printer") && !preg_match("/^[a-z0-9\.\-_]*$/i",$this->cn)){ + $message[]= _("Invalid character in printer name."); } if($this->BelongsTo == "Printer"){