makes sure that only strings are being processed in searchTerm; strip_tags crashes in case it's getting an array

This commit is contained in:
Thomas Heidrich 2017-02-07 20:24:33 +01:00
parent 55ec5e4ab4
commit dd06eeea99

View File

@ -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...