Code

Added value checks for sieve test elements
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Mar 2007 09:19:33 +0000 (09:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Mar 2007 09:19:33 +0000 (09:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5924 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveElement_If.inc

index fdda545c7efb90425daac002c1868e0736f6082f..9de56b29ad0ceeeb3106c52e0f938d2562254134 100644 (file)
@@ -643,6 +643,10 @@ class sieve_if
             $tmp2 = split(",",$vls);
             foreach($tmp2 as $val){
               $tmp[] = trim($val);
+  
+              if(preg_match("/\"/",$val)){
+                $parsed[$key]['LastError'] = _("Invalid character found in address attribute. Quotes are not allowed here.");
+              }
             }
             $parsed[$key]['Key_List'] = $tmp;
           }
@@ -655,6 +659,9 @@ class sieve_if
             $tmp2 = split(",",$vls);
             foreach($tmp2 as $val){
               $tmp[] = trim($val);
+              if(preg_match("/\"/",$val)){
+                $parsed[$key]['LastError'] = _("Invalid character found in value attribute. Quotes are not allowed here.");
+              }
             }
             $parsed[$key]['Value_List'] = $tmp;
           }