Merge pull request #2926 from MediaBrowser/dev

Dev
pull/1154/head
Luke 7 years ago committed by GitHub
commit af78556e1f

@ -341,13 +341,6 @@ namespace Emby.Drawing.ImageMagick
{
get
{
// too heavy. seeing crashes on RPI.
if (_environment.SystemArchitecture == Architecture.Arm ||
_environment.SystemArchitecture == Architecture.Arm64)
{
return false;
}
return true;
}
}

@ -4,6 +4,7 @@ using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
@ -423,15 +424,18 @@ namespace Emby.Server.Implementations.HttpServer
return true;
}
private bool ValidateSsl(string remoteIp)
private bool ValidateSsl(string remoteIp, string urlString)
{
if (_config.Configuration.RequireHttps && _appHost.EnableHttps)
{
if (urlString.IndexOf("https://", StringComparison.OrdinalIgnoreCase) == -1)
{
if (!_networkManager.IsInLocalNetwork(remoteIp))
{
return false;
}
}
}
return true;
}
@ -466,9 +470,13 @@ namespace Emby.Server.Implementations.HttpServer
return;
}
if (!ValidateSsl(httpReq.RemoteIp))
if (!ValidateSsl(httpReq.RemoteIp, urlString))
{
RedirectToUrl(httpRes, urlString.Replace("http://", "https://", StringComparison.OrdinalIgnoreCase));
var httpsUrl = urlString
.Replace("http://", "https://", StringComparison.OrdinalIgnoreCase)
.Replace(":" + _config.Configuration.PublicPort.ToString(CultureInfo.InvariantCulture), ":" + _config.Configuration.PublicHttpsPort.ToString(CultureInfo.InvariantCulture), StringComparison.OrdinalIgnoreCase);
RedirectToUrl(httpRes, httpsUrl);
return;
}

@ -1,3 +1,3 @@
using System.Reflection;
[assembly: AssemblyVersion("3.2.32.12")]
[assembly: AssemblyVersion("3.2.32.13")]

Loading…
Cancel
Save