From c72d3aff0fe36b45d7665d31bf32b3623193835c Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 25 Oct 2007 14:13:38 +0000 Subject: [PATCH] Added check for printer name git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7664 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"){ -- 2.30.2