From 6fefd7cb8874b8f41282ffad46d6a052819c6c14 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 3 Feb 2010 03:09:23 +0100 Subject: [PATCH] LSsearch : Added initial check of predefinedFilters validity/syntax before use. --- public_html/includes/class/class.LSsearch.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public_html/includes/class/class.LSsearch.php b/public_html/includes/class/class.LSsearch.php index 44dd42eb..e575a25e 100644 --- a/public_html/includes/class/class.LSsearch.php +++ b/public_html/includes/class/class.LSsearch.php @@ -121,6 +121,13 @@ class LSsearch { */ private function loadConfig() { $this -> config = LSconfig::get("LSobjects.".$this -> LSobject.".LSsearch"); + if (is_array($this -> config['predefinedFilters'])) { + foreach(array_keys($this -> config['predefinedFilters']) as $key) { + if(!LSldap::isValidFilter($key)) { + unset($this -> config['predefinedFilters'][$key]); + } + } + } } /**