diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2026-04-06 09:37:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-06 09:37:59 -0400 |
| commit | 179db631f73a7e34e89acbdabc555a9d3b92ff6d (patch) | |
| tree | f3c202a880ee05241ad46c9e54e7a2076e303b9c /MediaBrowser.Controller/Entities | |
| parent | c008f28d3126186e0a646121a3f69bd1624e37f5 (diff) | |
| parent | 740e9f8749ccf54afe8c0c2b1ff39a9775ed305b (diff) | |
Merge pull request #16577 from Bond-009/security-backports
Backport security fixes
Diffstat (limited to 'MediaBrowser.Controller/Entities')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 8f89c1c797..e312e9d80b 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1171,11 +1171,18 @@ namespace MediaBrowser.Controller.Entities info.Video3DFormat = video.Video3DFormat; info.Timestamp = video.Timestamp; - if (video.IsShortcut) + if (video.IsShortcut && !string.IsNullOrEmpty(video.ShortcutPath)) { - info.IsRemote = true; - info.Path = video.ShortcutPath; - info.Protocol = MediaSourceManager.GetPathProtocol(info.Path); + var shortcutProtocol = MediaSourceManager.GetPathProtocol(video.ShortcutPath); + + // Only allow remote shortcut paths — local file paths in .strm files + // could be used to read arbitrary files from the server. + if (shortcutProtocol != MediaProtocol.File) + { + info.IsRemote = true; + info.Path = video.ShortcutPath; + info.Protocol = shortcutProtocol; + } } if (string.IsNullOrEmpty(info.Container)) |
