Merge pull request #4276 from cvium/fix_403

SecurityException should return 403
pull/4277/head
Bond-009 4 years ago committed by GitHub
commit 14042d51b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

Loading…
Cancel
Save