Skip to content

Commit

Permalink
Merged PR 675: Chem4Word 2022 - Release 15 (V3.2.19)
Browse files Browse the repository at this point in the history
- BugFix: Prevent html input in searchers
- UX: Prohibit import of binary files
- BugFix: User unable to hide Hydrogens in Renderer (seen in Word document)
- Security: Update NuGet packages (Microsoft Security Advisory CVE-2024-30105)

Related work items: #1153
  • Loading branch information
MikeWilliams-UK committed Aug 7, 2024
1 parent a248e7a commit d1b29bb
Show file tree
Hide file tree
Showing 91 changed files with 1,262 additions and 676 deletions.
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For more information see the [.NET Foundation Code of Conduct](https://dotnetfou

## Getting Started
1. Installation process see $/docs/Chem4Word-Version3-2-Developer-SetUp.docx
2. Software dependencies Office 2010/2013/2016/2019/2021/365 (Installed on Desktop)
2. Software dependencies Office 2010/2013/2016/2019/2021/2024/365 (Installed on Desktop)
3. Recomeded screen resolution 1920x1080 (minimum 1366x768)
4. Git Clone of main branch

Expand All @@ -24,37 +24,38 @@ Azure Devops Build must be set to use VS2022 build agent
| Package | Version | Licence | Reference Count |
|--|--|--|--|
|Azure.Core.Amqp|1.3.0|MIT|2|
|Azure.Core|1.36.0|MIT|2|
|Azure.Messaging.ServiceBus|7.17.1|MIT|2|
|DocumentFormat.OpenXml.Framework|3.0.0||2|
|DocumentFormat.OpenXml|3.0.0|MIT|2|
|Azure.Core|1.41.0|MIT|2|
|Azure.Messaging.ServiceBus|7.17.5|MIT|2|
|DocumentFormat.OpenXml.Framework|3.0.2|MIT|2|
|DocumentFormat.OpenXml|3.0.2|MIT|2|
|DotNetProjects.WpfToolkit.Input|6.1.94|MS-PL|1|
|EntityFramework|6.4.4|Apache-2.0|2|
|EntityFramework|6.5.1|Apache-2.0|2|
|Jacobslusser.ScintillaNET|3.6.3|MIT|1|
|Microsoft.Azure.Amqp|2.6.4|MIT|2|
|Microsoft.Azure.Amqp|2.6.9|MIT|2|
|Microsoft.Bcl.AsyncInterfaces|8.0.0|MIT|2|
|Microsoft.NETCore.Platforms|7.0.4|MIT|2|
|Microsoft.TestPlatform.ObjectModel|17.8.0||1|
|Microsoft.Xaml.Behaviors.Wpf|1.1.77|MIT|1|
|Microsoft.TestPlatform.ObjectModel|17.10.0|MIT|1|
|Microsoft.Xaml.Behaviors.Wpf|1.1.122|MIT|1|
|Microsoft_VisualStudio_QualityTools_UnitTestFramework.STW|12.0.21005.1|Microsoft|1|
|Newtonsoft.Json|13.0.3|MIT|15|
|NuGet.Frameworks|6.8.0||1|
|NuGet.Frameworks|6.10.1|Apache 2.0|1|
|Ookii.Dialogs.WinForms|4.0.0|Public Domain|1|
|Stub.System.Data.SQLite.Core.NetFramework|1.0.118.0|Public Domain|2|
|System.Buffers|4.5.1|MIT|4|
|System.ClientModel|1.0.0|MIT|2|
|System.Collections.Immutable|8.0.0|MIT|2|
|System.Data.SQLite.Core|1.0.118.0|Public Domain|2|
|System.Data.SQLite.EF6|1.0.118.0|Public Domain|2|
|System.Data.SQLite.Linq|1.0.118.0|Public Domain|2|
|System.Data.SQLite|1.0.118.0|Public Domain|2|
|System.Diagnostics.DiagnosticSource|8.0.0|Public Domain|2|
|System.Diagnostics.DiagnosticSource|8.0.1|Public Domain|2|
|System.IO.FileSystem.Primitives|4.3.0|MS-.NET-Library|2|
|System.IO.Packaging|8.0.0|MIT|2|
|System.Memory.Data|8.0.0|MIT|2|
|System.Memory|4.5.5|MIT|4|
|System.Net.Http|4.3.4|MS-.NET-Library|9|
|System.Numerics.Vectors|4.5.0|MIT|4|
|System.Reflection.Metadata|8.0.0||1|
|System.Reflection.Metadata|8.0.0|MIT|1|
|System.Resources.Extensions|8.0.0|MIT|1|
|System.Runtime.CompilerServices.Unsafe|6.0.0|MIT|4|
|System.Runtime.InteropServices.RuntimeInformation|4.3.0|MS-.NET-Library|2|
Expand All @@ -63,19 +64,19 @@ Azure Devops Build must be set to use VS2022 build agent
|System.Security.Cryptography.Primitives|4.3.0|MS-.NET-Library|9|
|System.Security.Cryptography.X509Certificates|4.3.2|MS-.NET-Library|9|
|System.Text.Encodings.Web|8.0.0|MIT|2|
|System.Text.Json|8.0.0|MIT|2|
|System.Text.Json|8.0.4|MIT|2|
|System.Threading.Tasks.Extensions|4.5.4|MIT|2|
|System.ValueTuple|4.5.0|MIT|6|
|Unofficial.Ionic.Zip|1.9.1.8|Unknown ?|3|
|xunit.abstractions|2.0.3|Apache-2.0|1|
|xunit.analyzers|1.7.0|Apache-2.0|1|
|xunit.assert|2.6.3|Apache-2.0|1|
|xunit.core|2.6.3|Apache-2.0|1|
|xunit.extensibility.core|2.6.3|Apache-2.0|1|
|xunit.extensibility.execution|2.6.3|Apache-2.0|1|
|xunit.runner.console|2.6.3|Apache-2.0|1|
|xunit.runner.visualstudio|2.5.5|Apache-2.0|1|
|xunit|2.6.3|Apache-2.0|1|
|xunit.analyzers|1.15.0|Apache-2.0|1|
|xunit.assert|2.9.0|Apache-2.0|1|
|xunit.core|2.9.0|Apache-2.0|1|
|xunit.extensibility.core|2.9.0|Apache-2.0|1|
|xunit.extensibility.execution|2.9.0|Apache-2.0|1|
|xunit.runner.console|2.9.0|Apache-2.0|1|
|xunit.runner.visualstudio|2.8.2|Apache-2.0|1|
|xunit|2.9.0|Apache-2.0|1|

## Acknowledgements
1. [CEVOpen](https://github.com/petermr/CEVOpen) - This data represents about 2100 unique chemical names of volatile plant chemicals (essential oils) from the EssoilDB 1.0 database (compiled from the scientific literature over about 10 years in Dr Yadav's laboratory). They are made available for re-use by anyone for any purpose (CC0). We would appreciate acknowledgement of EssoilDB and the following people who extracted and cleaned the data during 2019. (Gitanjali Yadav, Ambarish Kumar, Peter Murray-Rust).
Expand Down
59 changes: 32 additions & 27 deletions src/Chem4Word.V3/Chem4Word.V3.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<!--
This section defines project-level properties.
Expand Down Expand Up @@ -52,10 +52,14 @@
<FriendlyName>Chem4word.V3</FriendlyName>
<OfficeApplicationDescription />
<LoadBehavior>3</LoadBehavior>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -156,33 +160,33 @@
-->
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="Azure.Core, Version=1.36.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Core.1.36.0\lib\net461\Azure.Core.dll</HintPath>
<Reference Include="Azure.Core, Version=1.41.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Core.1.41.0\lib\net461\Azure.Core.dll</HintPath>
</Reference>
<Reference Include="Azure.Core.Amqp, Version=1.3.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Core.Amqp.1.3.0\lib\netstandard2.0\Azure.Core.Amqp.dll</HintPath>
</Reference>
<Reference Include="Azure.Messaging.ServiceBus, Version=7.17.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Messaging.ServiceBus.7.17.1\lib\netstandard2.0\Azure.Messaging.ServiceBus.dll</HintPath>
<Reference Include="Azure.Messaging.ServiceBus, Version=7.17.5.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Messaging.ServiceBus.7.17.5\lib\netstandard2.0\Azure.Messaging.ServiceBus.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.0.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.0.0\lib\net40\DocumentFormat.OpenXml.dll</HintPath>
<Reference Include="DocumentFormat.OpenXml, Version=3.0.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.0.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.0.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.0.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.0.2\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip">
<HintPath>..\packages\Unofficial.Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Amqp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Amqp.2.6.4\lib\net45\Microsoft.Azure.Amqp.dll</HintPath>
<Reference Include="Microsoft.Azure.Amqp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.Amqp.2.6.9\lib\net45\Microsoft.Azure.Amqp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
Expand Down Expand Up @@ -219,6 +223,9 @@
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ClientModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\System.ClientModel.1.0.0\lib\netstandard2.0\System.ClientModel.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.118.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
Expand All @@ -231,8 +238,8 @@
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.118.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Design" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
Expand All @@ -250,10 +257,8 @@
<HintPath>..\packages\System.Memory.Data.8.0.0\lib\net462\System.Memory.Data.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Reference Include="System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Numerics" />
Expand Down Expand Up @@ -296,8 +301,8 @@
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll</HintPath>
<Reference Include="System.Text.Json, Version=8.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.4\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
Expand Down Expand Up @@ -699,10 +704,10 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" />
</Project>
30 changes: 30 additions & 0 deletions src/Chem4Word.V3/Chem4WordV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,8 @@ private void LoadPlugIns(bool mustBeSigned)

public IChem4WordEditor GetEditorPlugIn(string name)
{
var module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";

IChem4WordEditor plugin = null;

if (!string.IsNullOrEmpty(name))
Expand All @@ -892,16 +894,26 @@ public IChem4WordEditor GetEditorPlugIn(string name)
plugin.Telemetry = Telemetry;
plugin.SettingsPath = AddInInfo.ProductAppDataPath;
plugin.TopLeft = WordTopLeft;

break;
}
}
}

if (plugin == null)
{
Telemetry.Write(module, "Warning", $"Could not find editor plug in {name}");
Debug.WriteLine($"Could not find editor plug in {name}");
Debugger.Break();
}

return plugin;
}

public IChem4WordRenderer GetRendererPlugIn(string name)
{
var module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";

IChem4WordRenderer plugin = null;

if (!string.IsNullOrEmpty(name))
Expand All @@ -914,16 +926,26 @@ public IChem4WordRenderer GetRendererPlugIn(string name)
plugin.Telemetry = Telemetry;
plugin.SettingsPath = AddInInfo.ProductAppDataPath;
plugin.TopLeft = WordTopLeft;

break;
}
}
}

if (plugin == null)
{
Telemetry.Write(module, "Warning", $"Could not find renderer plug in {name}");
Debug.WriteLine($"Could not find renderer plug in {name}");
Debugger.Break();
}

return plugin;
}

public IChem4WordSearcher GetSearcherPlugIn(string name)
{
var module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";

IChem4WordSearcher plugin = null;

if (!string.IsNullOrEmpty(name))
Expand All @@ -936,11 +958,19 @@ public IChem4WordSearcher GetSearcherPlugIn(string name)
plugin.Telemetry = Telemetry;
plugin.SettingsPath = AddInInfo.ProductAppDataPath;
plugin.TopLeft = WordTopLeft;

break;
}
}
}

if (plugin == null)
{
Telemetry.Write(module, "Warning", $"Could not find searcher plug in {name}");
Debug.WriteLine($"Could not find searcher plug in {name}");
Debugger.Break();
}

return plugin;
}

Expand Down
8 changes: 5 additions & 3 deletions src/Chem4Word.V3/Data/Chem4Word-Versions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<Version>
<Number>3.2.19 Release 15</Number>
<IsBeta>false</IsBeta>
<Released>01-Apr-2024</Released>
<Released>07-Aug-2024</Released>
<Changes>
<Change>...</Change>
<Change>...</Change>
<Change>BugFix: Prevent html input in searchers</Change>
<Change>UX: Prohibit import of binary files</Change>
<Change>BugFix: User unable to hide Hydrogens in Renderer (seen in Word document)</Change>
<Change>Security: Update NuGet packages (Microsoft Security Advisory CVE-2024-30105)</Change>
<Change>Please note any previous beta versions V3.2.4 and below will cease to allow insertion or editing of chemistry</Change>
<Change>If you like our product, please consider buying us a coffee at https://www.buymeacoffee.com/chem4word</Change>
<Change>Please download Chem4Word-Setup.exe via https://www.chem4word.co.uk/download/ if you encounter any difficulties updating</Change>
Expand Down
2 changes: 1 addition & 1 deletion src/Chem4Word.V3/Data/This-Version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<Version>
<Number>3.2.19 Release 15</Number>
<IsBeta>false</IsBeta>
<Released>01-Apr-2024</Released>
<Released>07-Aug-2024</Released>
</Version>
Loading

0 comments on commit d1b29bb

Please sign in to comment.