Filter more results by user ID.

This commit is contained in:
wn_
2025-08-25 16:00:44 +00:00
parent 2d12ced897
commit 9982871ac1
3 changed files with 29 additions and 18 deletions

View File

@@ -871,6 +871,15 @@ class Pref_Filters extends Handler_Protected {
/** @var array<int, int> */
$ids = array_map("intval", explode(",", clean($_REQUEST["ids"])));
// fail early if any provided filter IDs aren't owned by the current user
$unowned_filter_count = ORM::for_table('ttrss_filters2')
->where_in('id', $ids)
->where_not_equal('owner_uid', $_SESSION['uid'])
->count();
if ($unowned_filter_count)
return;
if (count($ids) > 1) {
$base_id = array_shift($ids);
$ids_qmarks = arr_qmarks($ids);