Skip to content

Commit

Permalink
upgrade log4net and magick.net
Browse files Browse the repository at this point in the history
- google api upgrade didnt upgrade log4net to a high enough version to fix security issue, should now be fine
- upgraded magick.net because of those fun attempted to read or write protected memory errors
  • Loading branch information
michael-mason committed May 11, 2021
1 parent 2b03220 commit 20dca14
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 15 deletions.
13 changes: 9 additions & 4 deletions src/CollectionsOnline.Import/CollectionsOnline.Import.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,16 @@
<Reference Include="imu-1.0.03">
<HintPath>..\..\lib\IMu\imu-1.0.03.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.4\lib\net45-full\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.9.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
<HintPath>..\packages\log4net.2.0.10\lib\net45\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Magick.NET-Q16-HDRI-AnyCPU, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\packages\Magick.NET-Q16-HDRI-AnyCPU.7.0.1.101\lib\net40-client\Magick.NET-Q16-HDRI-AnyCPU.dll</HintPath>
<Reference Include="Magick.NET-Q16-HDRI-AnyCPU, Version=7.24.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec">
<HintPath>..\packages\Magick.NET-Q16-HDRI-AnyCPU.7.24.0\lib\net40\Magick.NET-Q16-HDRI-AnyCPU.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Magick.NET.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec">
<HintPath>..\packages\Magick.NET.Core.7.0.0\lib\net40\Magick.NET.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down Expand Up @@ -144,6 +148,7 @@
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=431cba815f6a8b5b, processorArchitecture=MSIL">
Expand Down
6 changes: 3 additions & 3 deletions src/CollectionsOnline.Import/Factories/ImageMediaFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public bool Make(ref ImageMedia imageMedia)
var destPath = PathFactory.MakeDestPath(imageMedia.Irn, ".jpg", imageMediaJob.FileDerivativeType);
var uriPath = PathFactory.BuildUriPath(imageMedia.Irn, ".jpg", imageMediaJob.FileDerivativeType);

using (var image = imageMediaJob.Transform(imageMedia, originalImage.Clone(), result))
using (var image = imageMediaJob.Transform(imageMedia, originalImage.Clone() as MagickImage, result))
{
// Write image to disk
image.Write(destPath);
Expand Down Expand Up @@ -300,7 +300,7 @@ private void AddImageProfile(ImageMedia imageMedia, MagickImage magickImage, boo

// Add original profile back
if (profile != null)
magickImage.AddProfile(profile);
magickImage.SetProfile(profile);

if (addIptcProfile)
{
Expand All @@ -314,7 +314,7 @@ private void AddImageProfile(ImageMedia imageMedia, MagickImage magickImage, boo
if(imageMedia.Sources.Any())
iptcProfile.SetValue(IptcTag.Source, imageMedia.Sources.Concatenate(", "));

magickImage.AddProfile(iptcProfile);
magickImage.SetProfile(iptcProfile);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/CollectionsOnline.Import/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<package id="Google.Apis.Auth" version="1.51.0" targetFramework="net451" />
<package id="Google.Apis.Core" version="1.51.0" targetFramework="net451" />
<package id="Google.Apis.YouTube.v3" version="1.51.0.2294" targetFramework="net451" />
<package id="log4net" version="2.0.4" targetFramework="net451" />
<package id="Magick.NET-Q16-HDRI-AnyCPU" version="7.0.1.101" targetFramework="net461" />
<package id="Magick.NET-Q16-HDRI-AnyCPU" version="7.24.0" targetFramework="net472" />
<package id="Magick.NET.Core" version="7.0.0" targetFramework="net472" />
<package id="log4net" version="2.0.10" targetFramework="net472" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net451" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net451" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net451" />
Expand Down
13 changes: 9 additions & 4 deletions src/CollectionsOnline.Tests/CollectionsOnline.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,16 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\IMu\imu-1.0.03.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.4\lib\net45-full\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.9.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
<HintPath>..\packages\log4net.2.0.10\lib\net45\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Magick.NET-Q16-HDRI-AnyCPU, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\packages\Magick.NET-Q16-HDRI-AnyCPU.7.0.1.101\lib\net40-client\Magick.NET-Q16-HDRI-AnyCPU.dll</HintPath>
<Reference Include="Magick.NET-Q16-HDRI-AnyCPU, Version=7.24.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec">
<HintPath>..\packages\Magick.NET-Q16-HDRI-AnyCPU.7.24.0\lib\net40\Magick.NET-Q16-HDRI-AnyCPU.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Magick.NET.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec">
<HintPath>..\packages\Magick.NET.Core.7.0.0\lib\net40\Magick.NET.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down Expand Up @@ -175,6 +179,7 @@
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
Expand Down
5 changes: 3 additions & 2 deletions src/CollectionsOnline.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<package id="Google.Apis.Auth" version="1.51.0" targetFramework="net451" />
<package id="Google.Apis.Core" version="1.51.0" targetFramework="net451" />
<package id="Google.Apis.YouTube.v3" version="1.51.0.2294" targetFramework="net451" />
<package id="log4net" version="2.0.4" targetFramework="net451" />
<package id="Magick.NET-Q16-HDRI-AnyCPU" version="7.0.1.101" targetFramework="net461" />
<package id="Magick.NET-Q16-HDRI-AnyCPU" version="7.24.0" targetFramework="net472" />
<package id="Magick.NET.Core" version="7.0.0" targetFramework="net472" />
<package id="log4net" version="2.0.10" targetFramework="net472" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net451" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net451" />
Expand Down

0 comments on commit 20dca14

Please sign in to comment.