From 42375a6b3f43bdc258dd414306386cf9a5e18e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pauli=20=C3=98ster=C3=B8?= Date: Wed, 10 Apr 2019 13:32:18 -0200 Subject: [PATCH 01/36] Update .Net Framework to 4.7.2 --- Composite.Workflows/Composite.Workflows.csproj | 2 +- Composite/Composite.csproj | 2 +- Website/DebugBuild.Web.config | 2 +- Website/ReleaseBuild.Web.config | 2 +- Website/WebSite.csproj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Composite.Workflows/Composite.Workflows.csproj b/Composite.Workflows/Composite.Workflows.csproj index a8f8223d6c..a9da8b4933 100644 --- a/Composite.Workflows/Composite.Workflows.csproj +++ b/Composite.Workflows/Composite.Workflows.csproj @@ -11,7 +11,7 @@ Composite Composite.Workflows {14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - v4.7.1 + v4.7.2 512 SAK SAK diff --git a/Composite/Composite.csproj b/Composite/Composite.csproj index 794277cddf..e7db0494f0 100644 --- a/Composite/Composite.csproj +++ b/Composite/Composite.csproj @@ -11,7 +11,7 @@ Composite {14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 - v4.7.1 + v4.7.2 SAK SAK SAK diff --git a/Website/DebugBuild.Web.config b/Website/DebugBuild.Web.config index cc15d41f19..4512a906ab 100644 --- a/Website/DebugBuild.Web.config +++ b/Website/DebugBuild.Web.config @@ -29,7 +29,7 @@ - + diff --git a/Website/ReleaseBuild.Web.config b/Website/ReleaseBuild.Web.config index c271a9b782..3d6b736258 100644 --- a/Website/ReleaseBuild.Web.config +++ b/Website/ReleaseBuild.Web.config @@ -29,7 +29,7 @@ - + diff --git a/Website/WebSite.csproj b/Website/WebSite.csproj index 2667746362..58236bcbda 100644 --- a/Website/WebSite.csproj +++ b/Website/WebSite.csproj @@ -11,7 +11,7 @@ Library Composite Composite.Website - v4.7.1 + v4.7.2 SAK SAK SAK From 43525985b2e2d94caf2038f14fce17747c7e6895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pauli=20=C3=98ster=C3=B8?= Date: Wed, 10 Apr 2019 13:32:47 -0200 Subject: [PATCH 02/36] Automatically configure WebObjectActivator --- Composite/AspNet/WebObjectActivator.cs | 34 +++++++++++++++++++ Composite/Composite.csproj | 1 + .../ApplicationLevelEventHandlers.cs | 1 + 3 files changed, 36 insertions(+) create mode 100644 Composite/AspNet/WebObjectActivator.cs diff --git a/Composite/AspNet/WebObjectActivator.cs b/Composite/AspNet/WebObjectActivator.cs new file mode 100644 index 0000000000..f8f32431fa --- /dev/null +++ b/Composite/AspNet/WebObjectActivator.cs @@ -0,0 +1,34 @@ +using System; + +using Microsoft.Extensions.DependencyInjection; + +namespace Composite.AspNet +{ + internal class WebObjectActivator : IServiceProvider + { + private readonly IServiceProvider _inner; + + public WebObjectActivator(IServiceProvider inner) + { + _inner = inner; + } + + public object GetService(Type serviceType) + { + var service = _inner.GetService(serviceType); + if (service == null) + { + try + { + service = ActivatorUtilities.CreateInstance(_inner, serviceType); + } + catch (InvalidOperationException) + { + service = Activator.CreateInstance(serviceType, true); + } + } + + return service; + } + } +} diff --git a/Composite/Composite.csproj b/Composite/Composite.csproj index e7db0494f0..20f2f00d4e 100644 --- a/Composite/Composite.csproj +++ b/Composite/Composite.csproj @@ -210,6 +210,7 @@ + diff --git a/Composite/Core/WebClient/ApplicationLevelEventHandlers.cs b/Composite/Core/WebClient/ApplicationLevelEventHandlers.cs index 081dcdf881..f6ce6f52b4 100644 --- a/Composite/Core/WebClient/ApplicationLevelEventHandlers.cs +++ b/Composite/Core/WebClient/ApplicationLevelEventHandlers.cs @@ -351,6 +351,7 @@ public static void ApplicationStartInitialize(bool displayDebugInfo = false) ServiceLocator.BuildServiceProvider(); ServiceLocator.CreateRequestServicesScope(HttpContext.Current); + HttpRuntime.WebObjectActivator = new WebObjectActivator(ServiceLocator.ServiceProvider); ApplicationStartupFacade.FireBeforeSystemInitialize(ServiceLocator.ServiceProvider); } From 4db4a89258b27e2a671523c0eb5141face0834e1 Mon Sep 17 00:00:00 2001 From: David Abitbol Date: Fri, 29 Jan 2021 11:20:33 -0500 Subject: [PATCH 03/36] Create main.yml --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..e71f72250e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + + +# Controls when the action will run. +on: + issues: + types: + [opened] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: danhellem/github-actions-issue-to-work-item@master + env: + ado_token: "2fkdmowxykpxbjdesotpjddpvzodif5rd5vdsfrpxxsgrhuwmyiq" + github_token: "df9367d03c44f7cbae7cf24cbc20766fc165d4df" + ado_organization: "ockestra001" + ado_project: "OrckestraCommerce" + ado_area_path: "OrckestraCommerce" + ado_iteration_path: "OrckestraCommerce" + ado_wit: "Issue" + ado_new_state: "New" + ado_active_state: "Active" + ado_close_state: "Closed" + ado_bypassrules: true From 5910700d39e1de05ce851f06c9a13628988795f5 Mon Sep 17 00:00:00 2001 From: David Abitbol Date: Fri, 29 Jan 2021 11:24:59 -0500 Subject: [PATCH 04/36] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e71f72250e..1c8f192aba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: env: ado_token: "2fkdmowxykpxbjdesotpjddpvzodif5rd5vdsfrpxxsgrhuwmyiq" github_token: "df9367d03c44f7cbae7cf24cbc20766fc165d4df" - ado_organization: "ockestra001" + ado_organization: "orckestra001" ado_project: "OrckestraCommerce" ado_area_path: "OrckestraCommerce" ado_iteration_path: "OrckestraCommerce" From 6f01a471b8a3c7fb291779bedb1b42327f1250dc Mon Sep 17 00:00:00 2001 From: Dmitry Dzygin Date: Wed, 16 Jun 2021 11:53:54 +0200 Subject: [PATCH 05/36] FileLogger - fixing an unnecessary blocking when an instance isn't capable of opening a log file --- .../FileLogTraceListener/FileLogger.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Composite/Plugins/Logging/LogTraceListeners/FileLogTraceListener/FileLogger.cs b/Composite/Plugins/Logging/LogTraceListeners/FileLogTraceListener/FileLogger.cs index debff4ec2f..5229366b19 100644 --- a/Composite/Plugins/Logging/LogTraceListeners/FileLogTraceListener/FileLogger.cs +++ b/Composite/Plugins/Logging/LogTraceListeners/FileLogTraceListener/FileLogger.cs @@ -1,4 +1,4 @@ -//#define UseLockFiles +//#define UseLockFiles using System; using System.Collections.Generic; @@ -22,6 +22,9 @@ namespace Composite.Plugins.Logging.LogTraceListeners.FileLogTraceListener /// internal class FileLogger : IDisposable { + private const int MaxLogFiles = 10; + private bool _initializationFailed; + #if UseLockFiles private static readonly TimeSpan LockFileUpdateFrequency = TimeSpan.FromSeconds(20); private static readonly TimeSpan OldLockFilesPreservationTime = TimeSpan.FromSeconds(60); @@ -115,6 +118,8 @@ public DateTime StartupTime public void WriteEntry(LogEntry entry) { + if (_initializationFailed) return; + string logLine = entry.ToString(); byte[] bytes = Encoding.UTF8.GetBytes(logLine + "\n"); @@ -133,6 +138,7 @@ public void WriteEntry(LogEntry entry) } EnsureInitialize(); + if (_initializationFailed) return; FileConnection.NewEntries.Add(entry); @@ -326,7 +332,7 @@ private void EnsureInitialize() string fileNamePrefix = creationDate.ToString("yyyyMMdd"); - for (int i = 0; i < 10; i++) + for (int i = 0; i < MaxLogFiles; i++) { var fileName = fileNamePrefix + (i > 0 ? "_" + i : string.Empty) + ".txt"; string filePath = Path.Combine(_logDirectoryPath, fileName); @@ -377,7 +383,7 @@ private void EnsureInitialize() return; } - throw new InvalidOperationException("Failed to open/create a log file"); + _initializationFailed = true; } } From 0b11fd4734485fd5c83b20c7d03df5196d28c674 Mon Sep 17 00:00:00 2001 From: Dmitry Dzygin Date: Fri, 18 Jun 2021 13:45:44 +0200 Subject: [PATCH 06/36] SiteMapHandler should take EnforceHttps property of an HTTP binding into account --- Composite/AspNet/SiteMapHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composite/AspNet/SiteMapHandler.cs b/Composite/AspNet/SiteMapHandler.cs index 435fd4b55d..f3d22b5ffb 100644 --- a/Composite/AspNet/SiteMapHandler.cs +++ b/Composite/AspNet/SiteMapHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -188,7 +188,7 @@ private void WriteSiteMapList(XmlWriter writer, IEnumerable } else { - hostnameUrl = "http://" + binding.Hostname; + hostnameUrl = $"{(binding.EnforceHttps ? "https" : "http")}://{binding.Hostname}"; } writer.WriteString(hostnameUrl + "{0}/{1}{2}/sitemap.xml".FormatWith( From c0d320e6bcb9774df98a984da8b222454e1ede5d Mon Sep 17 00:00:00 2001 From: Dmitry Dzygin Date: Mon, 9 Aug 2021 11:35:44 +0200 Subject: [PATCH 07/36] XHTML indexing - making sure the content of a