added sanity check for editing Header filters
authorbbice <bbice@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 13 Apr 2002 07:41:08 +0000 (07:41 +0000)
committerbbice <bbice@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 13 Apr 2002 07:41:08 +0000 (07:41 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2718 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/filters/options.php

index cbf2c15..ec836f6 100644 (file)
       $filter_what = str_replace("\\\"", "\"", $filter_what);
       $filter_what = str_replace("\"", "&quot;", $filter_what);
 
+      if (($filter_where == 'Header') && (strchr($filter_what,':') == '')) {
+         print ('WARNING! Header filters should be of the format "Header: value"<BR>');
+        $action = 'edit';
+      }
       setPref($data_dir, $username, "filter".$theid, $filter_where.",".$filter_what.",".$filter_folder);
       $filters[$theid]["where"] = $filter_where;
       $filters[$theid]["what"] = $filter_what;