From bd5a827593de557142a3ca574e041194d33eb4f3 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Wed, 3 Nov 2021 16:37:37 -0400 Subject: [PATCH] fix #1746 - SQL Server installation needs to allow configuration of encryption setting on .NET 6 --- .../Installer/Controls/SqlServerConfig.razor | 21 ++++++++++++------- .../Installer/Controls/SqlServerConfig.resx | 6 ++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Oqtane.Client/Installer/Controls/SqlServerConfig.razor b/Oqtane.Client/Installer/Controls/SqlServerConfig.razor index 905f80062..28192be0a 100644 --- a/Oqtane.Client/Installer/Controls/SqlServerConfig.razor +++ b/Oqtane.Client/Installer/Controls/SqlServerConfig.razor @@ -1,6 +1,7 @@ @namespace Oqtane.Installer.Controls @implements Oqtane.Interfaces.IDatabaseConfigControl @inject IStringLocalizer Localizer +@inject IStringLocalizer SharedLocalizer
@@ -38,6 +39,15 @@
} +
+ +
+ +
+
@code { private string _server = String.Empty; @@ -45,6 +55,7 @@ private string _security = "integrated"; private string _uid = String.Empty; private string _pwd = String.Empty; + private string _encryption = "false"; public string GetConnectionString() { @@ -61,15 +72,9 @@ } else { - if (!String.IsNullOrEmpty(_uid) && !String.IsNullOrEmpty(_pwd)) - { - connectionString += $"User ID={_uid};Password={_pwd};"; - } - else - { - connectionString = String.Empty; - } + connectionString += $"User ID={_uid};Password={_pwd};"; } + connectionString += $"Encrypt={_encryption};"; return connectionString; } diff --git a/Oqtane.Client/Resources/Installer/Controls/SqlServerConfig.resx b/Oqtane.Client/Resources/Installer/Controls/SqlServerConfig.resx index b37a64875..0f4ca4ac2 100644 --- a/Oqtane.Client/Resources/Installer/Controls/SqlServerConfig.resx +++ b/Oqtane.Client/Resources/Installer/Controls/SqlServerConfig.resx @@ -153,4 +153,10 @@ Integrated + + Encryption: + + + Specify if you are using an encrypted database connection. It is highly recommended to use encryption in a production environment. + \ No newline at end of file