Skip to content

Commit

Permalink
Update EntityFramework to version 6.5 to fix CVE (#200)
Browse files Browse the repository at this point in the history
* Update EntityFramework to version 6.5 to fix CVE

* .
  • Loading branch information
StefH authored Jun 15, 2024
1 parent 6ef8b0e commit 3293d8c
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EntityFramework">
<Version>6.3.0</Version>
<Version>6.5.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore">
<Version>2.1.11</Version>
Expand Down
108 changes: 52 additions & 56 deletions src/LinqKit.EntityFramework/LinqKit.EntityFramework.csproj
Original file line number Diff line number Diff line change
@@ -1,59 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../version.xml" />

<PropertyGroup>
<Version>1.2.$(PatchVersion)</Version>
<Description>LinqKit.EntityFramework contains extensions for LINQ to SQL and Entity Framework. Include(...) and IAsync are supported.</Description>
<AssemblyTitle>LinqKit for EntityFramework with Include(...) and IAsync support.</AssemblyTitle>
<Authors>Joseph Albahari;Tomas Petricek;Scott Smith;Tuomas Hietanen;Stef Heyenrath</Authors>
<TargetFrameworks>net45;netstandard2.1</TargetFrameworks>
<DefineConstants>$(DefineConstants);EF</DefineConstants>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>LinqKit.EntityFramework</AssemblyName>
<AssemblyOriginatorKeyFile>LinqKit.EntityFramework.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>LinqKit.EntityFramework</PackageId>
<PackageTags>linq;EF;EntityFramework;Entity;Framework</PackageTags>
<PackageProjectUrl>https://github.com/scottksmith95/LINQKit</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/scottksmith95/LINQKit</RepositoryUrl>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' or '$(Configuration)' == 'ReleaseForGithubActions' ">
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\LinqKit.Core\Extensions.cs;..\LinqKit.Core\ExpandableQuery.cs;..\LinqKit.Core\ExpandableDbAsyncEnumerator.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Timestamp" Version="1.0.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="EntityFramework" Version="6.2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="EntityFramework" Version="6.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LinqKit.Core\LinqKit.Core.csproj" />
</ItemGroup>
<Import Project="../../version.xml" />

<PropertyGroup>
<Version>1.2.$(PatchVersion)</Version>
<Description>LinqKit.EntityFramework contains extensions for LINQ to SQL and Entity Framework. Include(...) and IAsync are supported.</Description>
<AssemblyTitle>LinqKit for EntityFramework with Include(...) and IAsync support.</AssemblyTitle>
<Authors>Joseph Albahari;Tomas Petricek;Scott Smith;Tuomas Hietanen;Stef Heyenrath</Authors>
<TargetFrameworks>net45;netstandard2.1</TargetFrameworks>
<DefineConstants>$(DefineConstants);EF</DefineConstants>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>LinqKit.EntityFramework</AssemblyName>
<AssemblyOriginatorKeyFile>LinqKit.EntityFramework.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>LinqKit.EntityFramework</PackageId>
<PackageTags>linq;EF;EntityFramework;Entity;Framework</PackageTags>
<PackageProjectUrl>https://github.com/scottksmith95/LINQKit</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/scottksmith95/LINQKit</RepositoryUrl>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' or '$(Configuration)' == 'ReleaseForGithubActions' ">
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\LinqKit.Core\Extensions.cs;..\LinqKit.Core\ExpandableQuery.cs;..\LinqKit.Core\ExpandableDbAsyncEnumerator.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Timestamp" Version="1.0.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="EntityFramework" Version="6.5.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LinqKit.Core\LinqKit.Core.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/LinqKit.Net45/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
Expand Down
22 changes: 18 additions & 4 deletions src/LinqKit.Net45/LinqKit.Net45.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.props" Condition="Exists('..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.props')" />
<Import Project="..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.props" Condition="Exists('..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -36,6 +38,8 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -64,12 +68,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\EntityFramework.6.5.0\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.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\EntityFramework.6.5.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="JetBrains.Annotations, Version=4242.42.42.42, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
<HintPath>..\..\packages\JetBrains.Annotations.2022.1.0\lib\net20\JetBrains.Annotations.dll</HintPath>
Expand Down Expand Up @@ -129,6 +131,7 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="content\net40\App.config" />
<None Include="LinqKit.snk" />
<None Include="packages.config" />
</ItemGroup>
Expand All @@ -151,6 +154,17 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<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.5.0\build\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.props'))" />
<Error Condition="!Exists('..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.targets'))" />
</Target>
<Import Project="..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.targets" Condition="Exists('..\..\packages\EntityFramework.6.5.0\build\build\EntityFramework.targets')" />
<Import Project="..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.targets" Condition="Exists('..\..\packages\EntityFramework.6.5.0\build\build\net6.0\EntityFramework.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
12 changes: 12 additions & 0 deletions src/LinqKit.Net45/content/net40/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
2 changes: 1 addition & 1 deletion src/LinqKit.Net45/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="EntityFramework" version="6.5.0" targetFramework="net45" />
<package id="JetBrains.Annotations" version="2022.1.0" targetFramework="net45" />
<package id="System.Runtime" version="4.0.0" targetFramework="net45" />
</packages>
6 changes: 1 addition & 5 deletions src/LinqKit/LinqKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,12 @@
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="EntityFramework" Version="6.5.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="EntityFramework" Version="6.2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="EntityFramework" Version="6.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Authors>Stef Heyenrath</Authors>
<TargetFramework>net452</TargetFramework>
<AssemblyName>LinqKit.Microsoft.EntityFrameworkCore.Tests</AssemblyName>
<PackageId>LinqKit.Microsoft.EntityFrameworkCore.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>
<PropertyGroup>
<Authors>Stef Heyenrath</Authors>
<TargetFramework>net452</TargetFramework>
<AssemblyName>LinqKit.Microsoft.EntityFrameworkCore.Tests</AssemblyName>
<PackageId>LinqKit.Microsoft.EntityFrameworkCore.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\LinqKit.Tests.Net452\*.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\LinqKit.Tests.Net452\*.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\LinqKit.EntityFramework\LinqKit.EntityFramework.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\LinqKit.EntityFramework\LinqKit.EntityFramework.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="EntityFramework" Version="6.5.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<PackageReference Include="EntityFramework" Version="6.2.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

</Project>

0 comments on commit 3293d8c

Please sign in to comment.