aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-10-05 10:34:10 +0200
committerGitHub <noreply@github.com>2020-10-05 10:34:10 +0200
commit14042d51b06560bba62342603cc8c63f11a3b9ad (patch)
tree4bc2f1e1ebe70f6eb3f5631592b3b0ae71aa1ce8
parent2a575dd67e9841719c6296ef606b69f16690829c (diff)
parentdf75c1cd9c8fdcec8302a848c05d3ee36b0f7a58 (diff)
Merge pull request #4276 from cvium/fix_403
SecurityException should return 403
-rw-r--r--Jellyfin.Server/Middleware/ExceptionMiddleware.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server/Middleware/ExceptionMiddleware.cs b/Jellyfin.Server/Middleware/ExceptionMiddleware.cs
index fb1ee3b2b..f6c76e4d9 100644
--- a/Jellyfin.Server/Middleware/ExceptionMiddleware.cs
+++ b/Jellyfin.Server/Middleware/ExceptionMiddleware.cs
@@ -125,8 +125,8 @@ namespace Jellyfin.Server.Middleware
switch (ex)
{
case ArgumentException _: return StatusCodes.Status400BadRequest;
- case AuthenticationException _:
- case SecurityException _: return StatusCodes.Status401Unauthorized;
+ case AuthenticationException _: return StatusCodes.Status401Unauthorized;
+ case SecurityException _: return StatusCodes.Status403Forbidden;
case DirectoryNotFoundException _:
case FileNotFoundException _:
case ResourceNotFoundException _: return StatusCodes.Status404NotFound;