mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #4276 from cvium/fix_403
SecurityException should return 403
This commit is contained in:
commit
14042d51b0
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user