From 8e485f9b9e7368c041e7a2f6c652e6bd71d6c666 Mon Sep 17 00:00:00 2001 From: bbice Date: Sat, 13 Apr 2002 07:41:08 +0000 Subject: [PATCH] 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 --- plugins/filters/options.php | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.25.1