aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/PluginsController.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-07-17 16:51:19 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-07-17 17:08:59 +0200
commit21801e8ba138af71c4c58489ea33534adf7426c5 (patch)
treeab6e3584f7d7917a12af292e963c86fa56312631 /Jellyfin.Api/Controllers/PluginsController.cs
parent1a45fc82b5c0b7c7623be4117d15140cda020387 (diff)
Harden remaining path-construction sinks against traversal
Diffstat (limited to 'Jellyfin.Api/Controllers/PluginsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/PluginsController.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/PluginsController.cs b/Jellyfin.Api/Controllers/PluginsController.cs
index 0105ecf7a7..3bb8bb7077 100644
--- a/Jellyfin.Api/Controllers/PluginsController.cs
+++ b/Jellyfin.Api/Controllers/PluginsController.cs
@@ -6,6 +6,7 @@ using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Jellyfin.Api.Attributes;
+using Jellyfin.Extensions;
using Jellyfin.Extensions.Json;
using MediaBrowser.Common.Api;
using MediaBrowser.Common.Plugins;
@@ -228,8 +229,8 @@ public class PluginsController : BaseJellyfinApiController
if (!string.IsNullOrEmpty(plugin.Manifest.ImagePath))
{
- var imagePath = Path.Combine(plugin.Path, plugin.Manifest.ImagePath);
- if (!System.IO.File.Exists(imagePath))
+ var imagePath = Path.GetFullPath(Path.Combine(plugin.Path, plugin.Manifest.ImagePath));
+ if (!PathHelper.IsContainedIn(plugin.Path, imagePath) || !System.IO.File.Exists(imagePath))
{
return NotFound();
}