Skip to content

Commit b65ab86

Browse files
claudiamurialdoBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:chore/security-package-updates' into beta
1 parent dec94e6 commit b65ab86

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

dotnet/src/dotnetcore/GxOffice/GxOffice.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<RootNamespace>GxOffice</RootNamespace>
77
<PackageTags>Office Excel Poi</PackageTags>
88
<PackageId>GeneXus.Office.Core</PackageId>
9-
<AcceptNPOIOSMFLicense>true</AcceptNPOIOSMFLicense>
109
</PropertyGroup>
1110
<ItemGroup>
1211
<Compile Include="..\..\dotnetframework\GxOffice\Constants.cs" Link="Constants.cs" />
@@ -43,9 +42,10 @@
4342

4443
<ItemGroup>
4544
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.2" />
46-
<PackageReference Include="NPOI" Version="2.8.0" />
45+
<PackageReference Include="NPOI" Version="2.7.3" />
4746
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
48-
<!-- Override NPOI's vulnerable transitive System.Security.Cryptography.Xml -->
47+
<!-- Override NPOI's vulnerable transitives (NPOI 2.7.x still depends on these older versions) -->
48+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
4949
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.3" Condition="'$(TargetFramework)' == 'net8.0'" />
5050
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.6" Condition="'$(TargetFramework)' == 'net10.0'" />
5151
</ItemGroup>

dotnet/src/dotnetframework/GxOffice/GxOffice.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
<RootNamespace>GxOffice</RootNamespace>
66
<PackageTags>Office Excel Poi</PackageTags>
77
<PackageId>GeneXus.Office</PackageId>
8-
<AcceptNPOIOSMFLicense>true</AcceptNPOIOSMFLicense>
9-
<!-- NPOI 2.8.0 pulls SkiaSharp; on net462 its native libs land in content/ instead of runtimes/ and pack flags NU5100/NU5118. Consumers still get SkiaSharp transitively via NPOI. -->
10-
<NoWarn>$(NoWarn);NU5100;NU5118</NoWarn>
118
</PropertyGroup>
129
<ItemGroup>
1310
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.2" />
1411
<PackageReference Include="EPPlus" Version="4.5.3.2" />
15-
<PackageReference Include="NPOI" Version="2.8.0" />
12+
<PackageReference Include="NPOI" Version="2.7.3" />
1613
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
14+
<!-- Override NPOI's vulnerable transitive SixLabors.ImageSharp (2.1.x line; 3.x doesn't support net462) -->
15+
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.13" />
1716
</ItemGroup>
1817

1918
<ItemGroup>

dotnet/src/dotnetframework/GxOffice/poi/xssf/ExcelCells.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System;
33
using GeneXus.MSOffice.Excel.Style;
44
using GeneXus.Utils;
5-
using NPOI.OOXML.XSSF.UserModel;
65
using NPOI.OpenXmlFormats.Spreadsheet;
76
using NPOI.SS.UserModel;
87
using NPOI.SS.Util;
@@ -796,7 +795,7 @@ public void SetColor(long value)
796795
rgb = new byte[] { (byte)red, (byte)green, (byte)blue }
797796
};
798797

799-
newColor = new XSSFColor(ctColor, new DefaultIndexedColorMap());
798+
newColor = new XSSFColor(ctColor);
800799

801800
newFont = (XSSFFont)pWorkbook.CreateFont();
802801
CopyPropertiesFont(newFont, fontCell);
@@ -823,7 +822,7 @@ public void SetColor(long value)
823822
rgb = new byte[] { (byte)red, (byte)green, (byte)blue }
824823
};
825824

826-
newColor = new XSSFColor(ctColor, new DefaultIndexedColorMap());
825+
newColor = new XSSFColor(ctColor);
827826

828827

829828
newFont = (XSSFFont)pWorkbook.CreateFont();
@@ -1074,7 +1073,7 @@ private XSSFColor ToColor(ExcelColor color)
10741073
rgb = new byte[] { (byte)color.Red, (byte)color.Green, (byte)color.Blue }
10751074
};
10761075

1077-
return new XSSFColor(ctColor, new DefaultIndexedColorMap());
1076+
return new XSSFColor(ctColor);
10781077
}
10791078
private XSSFCellStyle ApplyNewCellStyle(XSSFCellStyle cellStyle, ExcelStyle newCellStyle)
10801079
{

0 commit comments

Comments
 (0)