Check checksum for plugin downloads

* Compare the MD5 checksum when downloading plugins
* Reduced log spam due to http requests
* Removed 'GetTempFileResponse' function from HttpClientManager
* Fixed caching for HttpClientManager
This commit is contained in:
Bond_009
2019-07-29 23:47:25 +02:00
parent 1ad67e223f
commit 5eaf5465a5
17 changed files with 142 additions and 420 deletions

View File

@@ -1528,8 +1528,6 @@ namespace Emby.Server.Implementations
{
Url = Url,
LogErrorResponseBody = false,
LogErrors = false,
LogRequest = false,
BufferContent = false,
CancellationToken = cancellationToken
}).ConfigureAwait(false))
@@ -1681,8 +1679,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;
}
@@ -1695,12 +1693,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(
@@ -1708,8 +1700,6 @@ namespace Emby.Server.Implementations
{
Url = apiUrl,
LogErrorResponseBody = false,
LogErrors = LogPing,
LogRequest = LogPing,
BufferContent = false,
CancellationToken = cancellationToken
}, HttpMethod.Post).ConfigureAwait(false))