SecurityException should return 403

This commit is contained in:
cvium 2020-10-05 08:28:37 +02:00
parent 2a575dd67e
commit df75c1cd9c

View File

@ -125,8 +125,8 @@ namespace Jellyfin.Server.Middleware
switch (ex) switch (ex)
{ {
case ArgumentException _: return StatusCodes.Status400BadRequest; case ArgumentException _: return StatusCodes.Status400BadRequest;
case AuthenticationException _: case AuthenticationException _: return StatusCodes.Status401Unauthorized;
case SecurityException _: return StatusCodes.Status401Unauthorized; case SecurityException _: return StatusCodes.Status403Forbidden;
case DirectoryNotFoundException _: case DirectoryNotFoundException _:
case FileNotFoundException _: case FileNotFoundException _:
case ResourceNotFoundException _: return StatusCodes.Status404NotFound; case ResourceNotFoundException _: return StatusCodes.Status404NotFound;