Fix SQL error message display when invalid categories selected
This commit is contained in:
parent
f8ba3a8a0c
commit
90b8af7cd5
@ -80,6 +80,11 @@ Version 1.2 ()
|
||||
Version 1.1.2 ()
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
* Fix showing SQL error message when an empty category is selected
|
||||
for viewing. Fixes an issue reported by Samenspender that was
|
||||
falsely declard as SQL injection. In fact, no invalid SQL code
|
||||
can be injected. (garvinhicking)
|
||||
|
||||
* Better checks to see if the local PEAR inclusion is required
|
||||
(garvinhicking)
|
||||
|
||||
|
@ -69,6 +69,10 @@ function serendipity_getMultiCategoriesSQL($cats, $invert = false) {
|
||||
$cat_sql_array[] = " (c.category_left " . ($invert ? " NOT " : "") . " BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange($categoryid)) . ')';
|
||||
}
|
||||
}
|
||||
|
||||
if (count($cat_sql_array) < 1) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return '(' . implode(($invert ? ' AND ' : ' OR '), $cat_sql_array) . ')';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user