diff options
| author | Cody Robibero <cody@robibe.ro> | 2024-04-14 08:18:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-14 08:18:36 -0600 |
| commit | 6fb6b5f1766a1f37a61b9faaa40209bab995bf30 (patch) | |
| tree | f169e72afeda371db2ffeb1b47c4dd88a03b4744 /Jellyfin.Api/Controllers/VideoAttachmentsController.cs | |
| parent | 9a4db8008593647cb6728b10317680dd3152c934 (diff) | |
Validate item access (#11171)
Diffstat (limited to 'Jellyfin.Api/Controllers/VideoAttachmentsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/VideoAttachmentsController.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/VideoAttachmentsController.cs b/Jellyfin.Api/Controllers/VideoAttachmentsController.cs index 23b9ba46f..b67c6fdb7 100644 --- a/Jellyfin.Api/Controllers/VideoAttachmentsController.cs +++ b/Jellyfin.Api/Controllers/VideoAttachmentsController.cs @@ -4,7 +4,10 @@ using System.Net.Mime; using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Attributes; +using Jellyfin.Api.Extensions; +using Jellyfin.Api.Helpers; using MediaBrowser.Common.Extensions; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.MediaEncoding; using Microsoft.AspNetCore.Http; @@ -54,7 +57,7 @@ public class VideoAttachmentsController : BaseJellyfinApiController { try { - var item = _libraryManager.GetItemById(videoId); + var item = _libraryManager.GetItemById<BaseItem>(videoId, User.GetUserId()); if (item is null) { return NotFound(); |
