Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit 8f0c32c

Browse files
committed
Update dependencies to address external security vulnerabilities
1 parent 98e6a9b commit 8f0c32c

File tree

6 files changed

+40
-26
lines changed

6 files changed

+40
-26
lines changed

src/FeedGenerator/FeedGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Octokit" Version="4.0.3" />
16+
<PackageReference Include="Octokit" Version="13.0.1" />
1717
</ItemGroup>
1818
</Project>

src/Web/Models/ErrorEntity.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
1+
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
22

33
namespace WixToolset.Web.Models
44
{
55
using System;
6-
using Microsoft.WindowsAzure.Storage.Table;
6+
using Azure;
7+
using Azure.Data.Tables;
78

8-
public class ErrorEntity : TableEntity
9+
public class ErrorEntity : ITableEntity
910
{
1011
public ErrorEntity()
1112
{
@@ -17,6 +18,14 @@ public ErrorEntity(string site, string key = null)
1718
this.RowKey = key ?? DateTime.UtcNow.ToString("yyyy-MM-ddTHH-mm-ss-ffff") + "-" + Guid.NewGuid().ToString("N");
1819
}
1920

21+
public string PartitionKey { get; set; }
22+
23+
public string RowKey { get; set; }
24+
25+
public ETag ETag { get; set; } = ETag.All;
26+
27+
public DateTimeOffset? Timestamp { get; set; }
28+
2029
public int StatusCode { get; set; }
2130

2231
public string IP { get; set; }
@@ -31,4 +40,4 @@ public ErrorEntity(string site, string key = null)
3140

3241
public string Text { get; set; }
3342
}
34-
}
43+
}

src/Web/Models/VisitEntity.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
1+
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
22

33
namespace WixToolset.Web.Models
44
{
55
using System;
6-
using Microsoft.WindowsAzure.Storage.Table;
6+
using Azure;
7+
using Azure.Data.Tables;
78

8-
public class VisitEntity : TableEntity
9+
public class VisitEntity : ITableEntity
910
{
1011
public VisitEntity()
1112
{
@@ -19,6 +20,14 @@ public VisitEntity(string site, string purpose, string key = null)
1920
this.Purpose = purpose;
2021
}
2122

23+
public string PartitionKey { get; set; }
24+
25+
public string RowKey { get; set; }
26+
27+
public ETag ETag { get; set; } = ETag.All;
28+
29+
public DateTimeOffset? Timestamp { get; set; }
30+
2231
public string Method { get; set; }
2332

2433
public string IP { get; set; }

src/Web/Services/StorageService.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
1+
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
22

33
namespace WixToolset.Web.Services
44
{
55
using System;
66
using System.Diagnostics;
77
using System.Threading.Tasks;
8-
using Microsoft.WindowsAzure.Storage;
9-
using Microsoft.WindowsAzure.Storage.Table;
8+
using Azure.Data.Tables;
109
using WixToolset.Web.Models;
1110

1211
public class StorageService : IStorageService
@@ -18,10 +17,10 @@ public StorageService(string connectionString)
1817
throw new ArgumentNullException(nameof(connectionString));
1918
}
2019

21-
this.Storage = CloudStorageAccount.Parse(connectionString);
20+
this.Storage = new TableServiceClient(connectionString);
2221
}
2322

24-
private CloudStorageAccount Storage { get; }
23+
private TableServiceClient Storage { get; }
2524

2625
public async Task LogErrorAsync(int code, string ip, string page, string referrer, Exception exception)
2726
{
@@ -47,15 +46,11 @@ public async Task WriteToTableStorage(string tableName, ITableEntity entity)
4746
{
4847
try
4948
{
50-
var op = TableOperation.Insert(entity);
51-
52-
var client = this.Storage.CreateCloudTableClient();
53-
54-
var table = client.GetTableReference(tableName);
49+
var table = this.Storage.GetTableClient(tableName);
5550

5651
await table.CreateIfNotExistsAsync();
5752

58-
await table.ExecuteAsync(op);
53+
await table.AddEntityAsync(entity);
5954
}
6055
catch (Exception e)
6156
{

src/Web/Web.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk.Web">
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="WindowsAzure.Storage" Version="8.1.4" />
8+
<PackageReference Include="Azure.Data.Tables" Version="12.9.1" />
9+
<PackageReference Include="System.Text.Json" Version="6.0.11" />
910
</ItemGroup>
1011

1112
<ItemGroup>
12-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.194" PrivateAssets="all" />
13+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" PrivateAssets="all" />
1314
</ItemGroup>
1415
</Project>

src/test/XsdToMarkDownTests/XsdToMarkdownTests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Markdig" Version="0.20.0" />
17+
<PackageReference Include="Markdig" Version="0.38.0" />
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" PrivateAssets="All" />
22-
<PackageReference Include="xunit" Version="2.4.1" PrivateAssets="All" />
23-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" PrivateAssets="All" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" PrivateAssets="All" />
22+
<PackageReference Include="xunit" Version="2.9.2" PrivateAssets="All" />
23+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" PrivateAssets="All" />
2424
</ItemGroup>
2525

2626
</Project>

0 commit comments

Comments
 (0)