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:
parent
55ec5e4ab4
commit
dd06eeea99
@ -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.
|
// 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'])) {
|
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...
|
// Some stuff...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user