Skip to content

Commit

Permalink
Merge pull request #317 from AndreasReitberger/master
Browse files Browse the repository at this point in the history
Fixed `LiteDB` security issue
  • Loading branch information
bezysoftware authored Sep 19, 2023
2 parents 9a96756 + 3db88f6 commit dfbe20c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Firebase/Firebase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LiteDB" Version="4.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Reactive" Version="4.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

</Project>
4 changes: 3 additions & 1 deletion src/Firebase/Offline/ConcurrentOfflineDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ public void Add(KeyValuePair<string, OfflineEntry> item)
public void Clear()
{
this.ccache.Clear();
this.db.Delete<OfflineEntry>(Query.All());
// Only works for v4, v5 see https://github.com/mbdavid/LiteDB/issues/1478
//this.db.Delete<OfflineEntry>(Query.All());
this.db.DeleteMany<OfflineEntry>(_ => true);
}

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion src/Firebase/Offline/OfflineDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ public void Add(KeyValuePair<string, OfflineEntry> item)
public void Clear()
{
this.cache.Clear();
this.db.Delete<OfflineEntry>(Query.All());
// Only works for v4, v5 see https://github.com/mbdavid/LiteDB/issues/1478
//this.db.Delete<OfflineEntry>(Query.All());
this.db.DeleteMany<OfflineEntry>(_ => true);
}

/// <summary>
Expand Down

0 comments on commit dfbe20c

Please sign in to comment.