From 5d583f42d4bc918256bcd50d26e555dcbd892e66 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 30 Sep 2017 13:40:42 -0400 Subject: [PATCH 1/3] update https redirect --- .../HttpServer/HttpListenerHost.cs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index acc247e458..737d4ceea0 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -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,13 +424,16 @@ 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 (!_networkManager.IsInLocalNetwork(remoteIp)) + if (urlString.IndexOf("https://", StringComparison.OrdinalIgnoreCase) == -1) { - return false; + if (!_networkManager.IsInLocalNetwork(remoteIp)) + { + return false; + } } } @@ -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; } @@ -487,7 +495,7 @@ namespace Emby.Server.Implementations.HttpServer enableLog = EnableLogging(urlString, localPath); urlToLog = urlString; - logHeaders = enableLog && urlToLog.IndexOf("/videos/", StringComparison.OrdinalIgnoreCase) != -1; + logHeaders = enableLog && urlToLog.IndexOf("/videos/", StringComparison.OrdinalIgnoreCase) != -1; if (enableLog) { From 15a34f261f182dc4d096798d9bb0d5fbc353e623 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 30 Sep 2017 13:40:59 -0400 Subject: [PATCH 2/3] re-enable collages for imagemagick on arm --- Emby.Drawing.ImageMagick/ImageMagickEncoder.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs index 24895b483e..04f916eb1b 100644 --- a/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs +++ b/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs @@ -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; } } From f2a5bd58ddc513a48850134eac4777ef985afcaa Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 30 Sep 2017 13:41:27 -0400 Subject: [PATCH 3/3] 3.2.32.13 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 62fd1f7ba7..60c2338f6b 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.32.12")] +[assembly: AssemblyVersion("3.2.32.13")]