Skip to content

Commit 9fa0c90

Browse files
authored
Investigate removing no longer necessary dependencies while investigating #2577 (#2578)
* Remove no longer necessary dependencies while investigating #2577 * Surgically re-injecting the dependency * Fixing the CVE-2021-24112 in the sample apps by updating Redis * Adding .NET 8 targets * Suppressions for .NET 8
1 parent 495970e commit 9fa0c90

File tree

13 files changed

+123
-43
lines changed

13 files changed

+123
-43
lines changed

Directory.Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<!--This should be passed from the VSTS build-->
44
<!-- This needs to be greater than or equal to the validation baseline version -->
5-
<ClientSemVer Condition="'$(ClientSemVer)' == ''">2.7.0-localbuild</ClientSemVer>
5+
<ClientSemVer Condition="'$(ClientSemVer)' == ''">2.15.4-localbuild</ClientSemVer>
66
<!--This will generate AssemblyVersion, AssemblyFileVersion and AssemblyInformationVersion-->
77
<Version>$(ClientSemVer)</Version>
88

@@ -86,9 +86,7 @@
8686
<MicrosoftGraphVersion>4.34.0</MicrosoftGraphVersion>
8787
<MicrosoftGraphBetaVersion>4.50.0-preview</MicrosoftGraphBetaVersion>
8888
<MicrosoftExtensionsHttpVersion>3.1.3</MicrosoftExtensionsHttpVersion>
89-
<MicrosoftIdentityAbstractions>5.0.0</MicrosoftIdentityAbstractions>
90-
<!--CVE-2021-24112-->
91-
<SystemDrawingCommon>4.7.2</SystemDrawingCommon>
89+
<MicrosoftIdentityAbstractions>5.0.0</MicrosoftIdentityAbstractions>
9290
</PropertyGroup>
9391

9492
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
@@ -176,5 +174,7 @@
176174
<MicrosoftExtensionsLoggingVersion>3.1.30</MicrosoftExtensionsLoggingVersion>
177175
<MicrosoftExtensionsConfigurationBinderVersion>3.1.30</MicrosoftExtensionsConfigurationBinderVersion>
178176
<MicrosoftExtensionsDependencyInjectionVersion>3.1.30</MicrosoftExtensionsDependencyInjectionVersion>
177+
<!--CVE-2021-24112 from ASpNetCore.Protection, and Redis-->
178+
<SystemDrawingCommon>4.7.2</SystemDrawingCommon>
179179
</PropertyGroup>
180180
</Project>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
3+
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
<Suppression>
5+
<DiagnosticId>CP0002</DiagnosticId>
6+
<Target>M:Microsoft.Identity.Web.AzureIdentityForKubernetesClientAssertion.#ctor</Target>
7+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.Certificateless.dll</Left>
8+
<Right>lib/netstandard2.0/Microsoft.Identity.Web.Certificateless.dll</Right>
9+
<IsBaselineSuppression>true</IsBaselineSuppression>
10+
</Suppression>
11+
<Suppression>
12+
<DiagnosticId>CP0002</DiagnosticId>
13+
<Target>M:Microsoft.Identity.Web.AzureIdentityForKubernetesClientAssertion.#ctor(System.String)</Target>
14+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.Certificateless.dll</Left>
15+
<Right>lib/netstandard2.0/Microsoft.Identity.Web.Certificateless.dll</Right>
16+
<IsBaselineSuppression>true</IsBaselineSuppression>
17+
</Suppression>
18+
</Suppressions>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
3+
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
<Suppression>
5+
<DiagnosticId>CP0001</DiagnosticId>
6+
<Target>T:Microsoft.Identity.Web.OpenIdConnectOptions</Target>
7+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.TokenAcquisition.dll</Left>
8+
<Right>lib/netcoreapp3.1/Microsoft.Identity.Web.TokenAcquisition.dll</Right>
9+
</Suppression>
10+
<Suppression>
11+
<DiagnosticId>CP0002</DiagnosticId>
12+
<Target>M:Microsoft.Identity.Web.MicrosoftIdentityOptions.get_ErrorPath</Target>
13+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.TokenAcquisition.dll</Left>
14+
<Right>lib/netcoreapp3.1/Microsoft.Identity.Web.TokenAcquisition.dll</Right>
15+
</Suppression>
16+
<Suppression>
17+
<DiagnosticId>CP0002</DiagnosticId>
18+
<Target>M:Microsoft.Identity.Web.MicrosoftIdentityOptions.get_ResetPasswordPath</Target>
19+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.TokenAcquisition.dll</Left>
20+
<Right>lib/netcoreapp3.1/Microsoft.Identity.Web.TokenAcquisition.dll</Right>
21+
</Suppression>
22+
<Suppression>
23+
<DiagnosticId>CP0006</DiagnosticId>
24+
<Target>M:Microsoft.Identity.Web.ITokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeader(System.Collections.Generic.IEnumerable{System.String},Microsoft.Identity.Client.MsalUiRequiredException,System.String,Microsoft.AspNetCore.Http.HttpResponse)</Target>
25+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.TokenAcquisition.dll</Left>
26+
<Right>lib/netcoreapp3.1/Microsoft.Identity.Web.TokenAcquisition.dll</Right>
27+
</Suppression>
28+
<Suppression>
29+
<DiagnosticId>CP0006</DiagnosticId>
30+
<Target>M:Microsoft.Identity.Web.ITokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeaderAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Identity.Client.MsalUiRequiredException,Microsoft.AspNetCore.Http.HttpResponse)</Target>
31+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.TokenAcquisition.dll</Left>
32+
<Right>lib/netcoreapp3.1/Microsoft.Identity.Web.TokenAcquisition.dll</Right>
33+
</Suppression>
34+
<Suppression>
35+
<DiagnosticId>CP0007</DiagnosticId>
36+
<Target>T:Microsoft.Identity.Web.MicrosoftIdentityOptions</Target>
37+
<Left>lib/netstandard2.0/Microsoft.Identity.Web.TokenAcquisition.dll</Left>
38+
<Right>lib/netcoreapp3.1/Microsoft.Identity.Web.TokenAcquisition.dll</Right>
39+
</Suppression>
40+
</Suppressions>

src/Microsoft.Identity.Web.TokenCache/Microsoft.Identity.Web.TokenCache.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
12-
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommon)" />
1312
</ItemGroup>
1413

1514
<ItemGroup Condition="'$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0'">
@@ -34,6 +33,7 @@
3433
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingVersion)" />
3534
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="$(MicrosoftAspNetCoreDataProtectionVersion)" />
3635
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="$(SystemSecurityCryptographyPkcsVersion)" />
36+
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommon)" />
3737
</ItemGroup>
3838

3939
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

src/Microsoft.Identity.Web/CompatibilitySuppressions.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
44
<Suppression>
55
<DiagnosticId>CP0002</DiagnosticId>
6-
<!-- ISystemClock is Obsolete in net8 -->
76
<Target>M:Microsoft.Identity.Web.AppServicesAuthenticationHandler.#ctor(Microsoft.Extensions.Options.IOptionsMonitor{Microsoft.Identity.Web.AppServicesAuthenticationOptions},Microsoft.Extensions.Logging.ILoggerFactory,System.Text.Encodings.Web.UrlEncoder,Microsoft.AspNetCore.Authentication.ISystemClock)</Target>
87
<Left>lib/net7.0/Microsoft.Identity.Web.dll</Left>
98
<Right>lib/net8.0/Microsoft.Identity.Web.dll</Right>

src/Microsoft.Identity.Web/Microsoft.Identity.Web.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(IdentityModelVersion)" />
2323
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(IdentityModelVersion)" />
2424
<PackageReference Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsHttpVersion)" />
25-
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommon)" />
2625
</ItemGroup>
2726

2827
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

tests/DevApps/B2CWebAppCallsWebApi/Client/TodoListClient.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
<ItemGroup>
2424
<!--<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="3.1.1" />-->
25-
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
26-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
25+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2726
</ItemGroup>
2827

2928
<ItemGroup>
Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
<Project>
22

33
<PropertyGroup>
4-
<TargetFrameworks Condition="'$(TargetNet8)' == 'True'">net6.0; net7.0; net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(TargetNet8)' != 'True'">net6.0; net7.0</TargetFrameworks>
6-
<UseWip>true</UseWip>
7-
<IsPackable>false</IsPackable>
8-
<LangVersion>11</LangVersion>
4+
<TargetFrameworks Condition="'$(TargetNet8)' == 'True'">net6.0; net7.0; net8.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(TargetNet8)' != 'True'">net6.0; net7.0</TargetFrameworks>
6+
<UseWip>true</UseWip>
7+
<IsPackable>false</IsPackable>
8+
<LangVersion>11</LangVersion>
9+
</PropertyGroup>
10+
11+
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
12+
<!--CVE-2021-24112 from ASpNetCore.Protection, and Redis-->
13+
<SystemDrawingCommon>6.0.0</SystemDrawingCommon>
14+
</PropertyGroup>
15+
16+
<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
17+
<!--CVE-2021-24112 from ASpNetCore.Protection, and Redis-->
18+
<SystemDrawingCommon>7.0.0</SystemDrawingCommon>
19+
</PropertyGroup>
20+
21+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
22+
<!--CVE-2021-24112 from ASpNetCore.Protection, and Redis-->
23+
<SystemDrawingCommon>8.0.0-rc.2.23479.14</SystemDrawingCommon>
924
</PropertyGroup>
1025

1126
</Project>

tests/DevApps/WebAppCallsWebApiCallsGraph/Client/TodoListClient.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<UserSecretsId>aspnet-WebApp_OpenIDConnect_DotNet-81EA87AD-E64D-4755-A1CC-5EA47F49B5D0</UserSecretsId>
@@ -28,10 +28,9 @@
2828
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2929
</PackageReference>
3030
<!--<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="3.1.1" />-->
31-
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
31+
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="7.0.13" />
3232
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
33-
<!--CVE-2021-24112-->
34-
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
33+
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommon)" />
3534
</ItemGroup>
3635

3736
<ItemGroup>

tests/DevApps/WebAppCallsWebApiCallsGraph/TodoListService/TodoListService.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
<ItemGroup>
99
<ProjectReference Include="..\..\..\..\src\Microsoft.Identity.Web.MicrosoftGraph\Microsoft.Identity.Web.MicrosoftGraph.csproj" />
1010
<ProjectReference Include="..\..\..\..\src\Microsoft.Identity.Web\Microsoft.Identity.Web.csproj" />
11-
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
12-
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
13-
<!--CVE-2021-24112-->
14-
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
11+
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="7.0.13" />
12+
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommon)" />
1513
</ItemGroup>
1614

1715
</Project>

0 commit comments

Comments
 (0)