From dd06eeea9959503905af1b47b7487d0090dcdb29 Mon Sep 17 00:00:00 2001 From: Thomas Heidrich Date: Tue, 7 Feb 2017 20:24:33 +0100 Subject: [PATCH] makes sure that only strings are being processed in searchTerm; strip_tags crashes in case it's getting an array --- serendipity_config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index 0d872268..59604965 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -427,7 +427,7 @@ if (!isset($serendipity['GET']['adminAction'])) { // Make sure this variable is always properly sanitized. Previously in compat.inc.php, but there LANG_CHARSET was not defined. if (isset($serendipity['GET']['searchTerm'])) { - $serendipity['GET']['searchTerm'] = serendipity_specialchars(strip_tags($serendipity['GET']['searchTerm'])); + $serendipity['GET']['searchTerm'] = (is_string($serendipity['GET']['searchTerm']) ? serendipity_specialchars(strip_tags($serendipity['GET']['searchTerm'])) : ''); } // Some stuff...