mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-27 04:16:47 +00:00
disable nuget package restore
This commit is contained in:
parent
76cabe8226
commit
f1a602f5a8
32 changed files with 218 additions and 151 deletions
|
|
@ -68,7 +68,10 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
|||
if (!string.IsNullOrWhiteSpace(auth.Token) ||
|
||||
!_config.Configuration.InsecureApps2.Contains(auth.Client ?? string.Empty, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
SessionManager.ValidateSecurityToken(auth.Token);
|
||||
if (!IsValidConnectKey(auth.Token))
|
||||
{
|
||||
SessionManager.ValidateSecurityToken(auth.Token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,6 +118,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
|||
}
|
||||
}
|
||||
|
||||
private bool IsValidConnectKey(string token)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
return UserManager.Users.Any(u => string.Equals(token, u.ConnectAccessKey, StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(u.ConnectAccessKey));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool DoHtmlRedirectIfConfigured(IRequest req, IResponse res, bool includeRedirectParam = false)
|
||||
{
|
||||
var htmlRedirect = this.HtmlRedirect ?? AuthenticateService.HtmlRedirect;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue