aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/Security
diff options
context:
space:
mode:
authoraled <aled@wibblr.com>2020-06-16 19:30:54 +0100
committeraled <aled@wibblr.com>2020-06-16 19:30:54 +0100
commit991b6fb73901f0fad72a14c69dbf011a9d4fa1c7 (patch)
treee796a26973a3a289d093589ba512c13a89f5befa /Emby.Server.Implementations/HttpServer/Security
parent05f736defb9b045ace57262d19ec3691414f8bfc (diff)
parent215ab39e00be3a79875351a76f0d836a9281ce6b (diff)
Merge remote-tracking branch 'upstream/master' into check-stored-password-exists
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/Security')
-rw-r--r--Emby.Server.Implementations/HttpServer/Security/AuthService.cs1
-rw-r--r--Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs2
2 files changed, 3 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs
index 72959003a..2e6ff65a6 100644
--- a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs
+++ b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs
@@ -140,6 +140,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
{
return true;
}
+
if (authAttribtues.AllowLocalOnly && request.IsLocal)
{
return true;
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index 4dffcd92d..bbade00ff 100644
--- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -71,6 +71,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
{
token = httpReq.Headers["X-MediaBrowser-Token"];
}
+
if (string.IsNullOrEmpty(token))
{
token = httpReq.QueryString["api_key"];
@@ -160,6 +161,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
_authRepo.Update(tokenInfo);
}
}
+
httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo;
}