From 58610b7cdd41a200fff6f194f8f21aa592d33311 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Thu, 5 Nov 2020 12:02:56 +0530 Subject: [PATCH] Ensure that the parsed favorites collection is owned by the user --- lib/services/favorites_service.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/favorites_service.dart b/lib/services/favorites_service.dart index 7a996adb5..4c4c20792 100644 --- a/lib/services/favorites_service.dart +++ b/lib/services/favorites_service.dart @@ -56,7 +56,8 @@ class FavoritesService { if (_cachedFavoritesCollectionID == null) { final collections = _collectionsService.getCollections(); for (final collection in collections) { - if (collection.type == CollectionType.favorites) { + if (collection.owner.id == _config.getUserID() && + collection.type == CollectionType.favorites) { _cachedFavoritesCollectionID = collection.id; return collection; }