aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/PlaylistsController.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2024-04-14 08:18:36 -0600
committerGitHub <noreply@github.com>2024-04-14 08:18:36 -0600
commit6fb6b5f1766a1f37a61b9faaa40209bab995bf30 (patch)
treef169e72afeda371db2ffeb1b47c4dd88a03b4744 /Jellyfin.Api/Controllers/PlaylistsController.cs
parent9a4db8008593647cb6728b10317680dd3152c934 (diff)
Validate item access (#11171)
Diffstat (limited to 'Jellyfin.Api/Controllers/PlaylistsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/PlaylistsController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/PlaylistsController.cs b/Jellyfin.Api/Controllers/PlaylistsController.cs
index 1100f85cf..abf94a32f 100644
--- a/Jellyfin.Api/Controllers/PlaylistsController.cs
+++ b/Jellyfin.Api/Controllers/PlaylistsController.cs
@@ -482,8 +482,13 @@ public class PlaylistsController : BaseJellyfinApiController
var user = userId.IsNullOrEmpty()
? null
: _userManager.GetUserById(userId.Value);
+ var item = _libraryManager.GetItemById<Playlist>(playlistId, user);
+ if (item is null)
+ {
+ return NotFound();
+ }
- var items = playlist.GetManageableItems().ToArray();
+ var items = item.GetManageableItems().ToArray();
var count = items.Length;
if (startIndex.HasValue)
{