aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SessionController.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2023-02-04 17:56:12 +0100
committerBond_009 <bond.009@outlook.com>2023-02-04 20:11:08 +0100
commit52230d1c30b76f34132c8c3ad21a09deea72d9d8 (patch)
treed42c6cbb0ba99e2d6b4414b4aee4d454c5699d9f /Jellyfin.Api/Controllers/SessionController.cs
parent6bf34f8e22c6f72bde15cbb4b500fc6c4f3273b3 (diff)
Return NotFound when itemId isn't found
Diffstat (limited to 'Jellyfin.Api/Controllers/SessionController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SessionController.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs
index ef3364478..782fcadbb 100644
--- a/Jellyfin.Api/Controllers/SessionController.cs
+++ b/Jellyfin.Api/Controllers/SessionController.cs
@@ -75,6 +75,10 @@ public class SessionController : BaseJellyfinApiController
result = result.Where(i => i.SupportsRemoteControl);
var user = _userManager.GetUserById(controllableByUserId.Value);
+ if (user is null)
+ {
+ return NotFound();
+ }
if (!user.HasPermission(PermissionKind.EnableRemoteControlOfOtherUsers))
{