Merge pull request #1584 from Bond-009/checksum

Check checksum for plugin downloads
This commit is contained in:
dkanada
2019-08-15 01:00:33 -07:00
committed by GitHub
17 changed files with 143 additions and 427 deletions

View File

@@ -1537,8 +1537,6 @@ namespace Emby.Server.Implementations
{
Url = Url,
LogErrorResponseBody = false,
LogErrors = false,
LogRequest = false,
BufferContent = false,
CancellationToken = cancellationToken
}).ConfigureAwait(false))
@@ -1690,8 +1688,8 @@ namespace Emby.Server.Implementations
private async Task<bool> IsIpAddressValidAsync(IPAddress address, CancellationToken cancellationToken)
{
if (address.Equals(IPAddress.Loopback) ||
address.Equals(IPAddress.IPv6Loopback))
if (address.Equals(IPAddress.Loopback)
|| address.Equals(IPAddress.IPv6Loopback))
{
return true;
}
@@ -1704,12 +1702,6 @@ namespace Emby.Server.Implementations
return cachedResult;
}
#if DEBUG
const bool LogPing = true;
#else
const bool LogPing = false;
#endif
try
{
using (var response = await HttpClient.SendAsync(
@@ -1717,8 +1709,6 @@ namespace Emby.Server.Implementations
{
Url = apiUrl,
LogErrorResponseBody = false,
LogErrors = LogPing,
LogRequest = LogPing,
BufferContent = false,
CancellationToken = cancellationToken
}, HttpMethod.Post).ConfigureAwait(false))