summaryrefslogtreecommitdiffstats
path: root/lib/Db
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-01-28 17:24:15 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commitb27226d4ae011a130f07433683606e139424a201 (patch)
tree82a2f9497b3e01a0d032400d6c3db61c1169405d /lib/Db
parente78153c051b7f62a657ade7129dcca2d0cbe9f3d (diff)
🚑 Fix bug - other user feeds show for shared item
- findAllFeeds doesn't return feeds of shared articles - Disable feed cache handling for shared items Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib/Db')
-rw-r--r--lib/Db/FeedMapper.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Db/FeedMapper.php b/lib/Db/FeedMapper.php
index 45901b8d0..917e282c4 100644
--- a/lib/Db/FeedMapper.php
+++ b/lib/Db/FeedMapper.php
@@ -76,9 +76,7 @@ class FeedMapper extends NewsMapper
// POSSIBLE SQL INJECTION RISK WHEN MODIFIED WITHOUT THOUGHT.
// think twice when changing this
'AND `items`.`unread` = ? ' .
- 'WHERE (`feeds`.`user_id` = ? OR `feeds`.`id` IN (' .
- 'SELECT `feed_id` FROM `*PREFIX*news_items` WHERE `shared_with` = ?)' .
- ') ' .
+ 'WHERE `feeds`.`user_id` = ? ' .
'AND (`feeds`.`folder_id` IS NULL ' .
'OR `folders`.`deleted_at` = 0 ' .
') ' .
@@ -86,7 +84,7 @@ class FeedMapper extends NewsMapper
'GROUP BY `feeds`.`id` ' .
') `item_numbers` ' .
'ON `item_numbers`.`id` = `feeds`.`id` ';
- $params = [true, $userId, $userId];
+ $params = [true, $userId];
return $this->findEntities($sql, $params);
}