mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Merge pull request #496 from chr33z/fix/api-auhorization-filter-495
fix: Prevent invalid authorization headers from accessing the API
This commit is contained in:
commit
33084e96c7
@ -33,6 +33,7 @@ namespace Remotely.Server.Auth
|
||||
if (headerComponents.Length < 2)
|
||||
{
|
||||
context.HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Result = new UnauthorizedResult();
|
||||
return;
|
||||
};
|
||||
|
||||
@ -49,6 +50,7 @@ namespace Remotely.Server.Auth
|
||||
if (authComponents.Length < 2)
|
||||
{
|
||||
context.HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Result = new UnauthorizedResult();
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user