From: bbice Date: Sat, 13 Apr 2002 07:41:08 +0000 (+0000) Subject: added sanity check for editing Header filters X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=8e485f9b9e7368c041e7a2f6c652e6bd71d6c666 added sanity check for editing Header filters git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2718 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/filters/options.php b/plugins/filters/options.php index cbf2c152..ec836f65 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -42,6 +42,10 @@ $filter_what = str_replace("\\\"", "\"", $filter_what); $filter_what = str_replace("\"", """, $filter_what); + if (($filter_where == 'Header') && (strchr($filter_what,':') == '')) { + print ('WARNING! Header filters should be of the format "Header: value"
'); + $action = 'edit'; + } setPref($data_dir, $username, "filter".$theid, $filter_where.",".$filter_what.",".$filter_folder); $filters[$theid]["where"] = $filter_where; $filters[$theid]["what"] = $filter_what;