mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-04-19 19:14:51 +00:00
Update to .NET 8 and C# 12 (#952)
* Initial SDK and dependency bumps * Bump Pomelo.EntityFrameworkCore.MySql to 8.0.0-beta.2 Should fix the MissingMethodException error in unit tests * Update CI workflow to use .NET 8 * Apply suggested change from compile time warnings * Fix digest tests * Bump dependencies once more * Update xunit * Remove obsolete ISystemClock from TokenAuthHandler * Update dependencies * Add digest debug preprocessors back * Maybe don't break #966 * Bump EF Driver and update various NET7 references * Fix warnings in digest middleware tests --------- Co-authored-by: Slendy <josh@slendy.pw>
This commit is contained in:
parent
a2eaedc85b
commit
01e6fa191a
20 changed files with 104 additions and 110 deletions
|
@ -1 +1,3 @@
|
||||||
**/data
|
**/data
|
||||||
|
**/bin
|
||||||
|
**/obj
|
||||||
|
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -34,10 +34,10 @@ jobs:
|
||||||
if: ${{ matrix.os.database }}
|
if: ${{ matrix.os.database }}
|
||||||
run: mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -h 127.0.0.1 -e "CREATE DATABASE ${{ env.DB_DATABASE }};";
|
run: mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -h 127.0.0.1 -e "CREATE DATABASE ${{ env.DB_DATABASE }};";
|
||||||
|
|
||||||
- name: Install .NET 7.0
|
- name: Install .NET 8.0
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: "7.0.x"
|
dotnet-version: "8.0.x"
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: |
|
run: |
|
||||||
|
@ -59,7 +59,7 @@ jobs:
|
||||||
if: ${{ matrix.os.webTest }}
|
if: ${{ matrix.os.webTest }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: dotnet test -c Release --no-build --logger "trx;LogFileName=${{github.workspace}}/TestResults-${{matrix.os.prettyName}}-WebsiteTests.trx" ProjectLighthouse.Tests.WebsiteTests
|
run: dotnet test -c Release --no-build --logger "trx;LogFileName=${{github.workspace}}/TestResults-${{matrix.os.prettyName}}-WebsiteTests.trx" ProjectLighthouse.Tests.WebsiteTests
|
||||||
|
|
||||||
# Attempt to upload results even if test fails.
|
# Attempt to upload results even if test fails.
|
||||||
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always
|
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always
|
||||||
- name: Upload Test Results
|
- name: Upload Test Results
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Development Databases" type="docker-deploy" factoryName="docker-compose.yml"
|
|
||||||
server-name="Docker">
|
|
||||||
<deployment type="docker-compose.yml">
|
|
||||||
<settings>
|
|
||||||
<option name="envFilePath" value=""/>
|
|
||||||
<option name="sourceFilePath" value="docker-compose.yml"/>
|
|
||||||
</settings>
|
|
||||||
</deployment>
|
|
||||||
<EXTENSION ID="com.jetbrains.rider.docker.debug" isFastModeEnabled="true" isPublishEnabled="true"/>
|
|
||||||
<method v="2"/>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
|
@ -1,6 +1,6 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Lighthouse API" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="Lighthouse API" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/ProjectLighthouse.Servers.API/bin/Debug/net7.0/LBPUnion.ProjectLighthouse.Servers.API" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/ProjectLighthouse.Servers.API/bin/Debug/net8.0/LBPUnion.ProjectLighthouse.Servers.API" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ProjectLighthouse" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ProjectLighthouse" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
@ -15,9 +15,8 @@
|
||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value="net7.0" />
|
<option name="PROJECT_TFM" value="net8.0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Development Databases" run_configuration_type="docker-deploy" />
|
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Lighthouse Gameserver" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="Lighthouse Gameserver" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/ProjectLighthouse.Servers.GameServer/bin/Debug/net7.0/LBPUnion.ProjectLighthouse.Servers.GameServer" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/ProjectLighthouse.Servers.GameServer/bin/Debug/net8.0/LBPUnion.ProjectLighthouse.Servers.GameServer" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ProjectLighthouse" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ProjectLighthouse" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
@ -15,9 +15,8 @@
|
||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value="net7.0" />
|
<option name="PROJECT_TFM" value="net8.0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Development Databases" run_configuration_type="docker-deploy" />
|
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
|
@ -1,6 +1,6 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Lighthouse Website" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="Lighthouse Website" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/ProjectLighthouse.Servers.Website/bin/Debug/net7.0/LBPUnion.ProjectLighthouse.Servers.Website" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/ProjectLighthouse.Servers.Website/bin/Debug/net8.0/LBPUnion.ProjectLighthouse.Servers.Website" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ProjectLighthouse" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ProjectLighthouse" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
@ -15,9 +15,8 @@
|
||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value="net7.0" />
|
<option name="PROJECT_TFM" value="net8.0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Development Databases" run_configuration_type="docker-deploy" />
|
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
|
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
|
||||||
WORKDIR /ProjectLighthouse
|
WORKDIR /ProjectLighthouse
|
||||||
COPY *.sln ./
|
COPY *.sln ./
|
||||||
COPY **/*.csproj ./
|
COPY **/*.csproj ./
|
||||||
|
@ -13,10 +13,10 @@ RUN dotnet sln list | grep ".csproj" \
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN dotnet publish -c Release --property:OutputPath=/ProjectLighthouse/publish/ --no-restore
|
RUN dotnet publish -c Release --property:OutputPath=/ProjectLighthouse/out/ --no-restore
|
||||||
|
|
||||||
# Final running container
|
# Final running container
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS final
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
|
||||||
|
|
||||||
# Add non-root user
|
# Add non-root user
|
||||||
RUN addgroup -S lighthouse --gid 1001 && \
|
RUN addgroup -S lighthouse --gid 1001 && \
|
||||||
|
@ -29,7 +29,7 @@ apk add --no-cache icu-libs su-exec tzdata
|
||||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
|
|
||||||
# Copy build files
|
# Copy build files
|
||||||
COPY --from=build /ProjectLighthouse/publish /lighthouse/app
|
COPY --from=build /ProjectLighthouse/out/publish /lighthouse/app
|
||||||
COPY --from=build /ProjectLighthouse/ProjectLighthouse/StaticFiles /lighthouse/temp/StaticFiles
|
COPY --from=build /ProjectLighthouse/ProjectLighthouse/StaticFiles /lighthouse/temp/StaticFiles
|
||||||
COPY --from=build /ProjectLighthouse/scripts-and-tools/docker-entrypoint.sh /lighthouse
|
COPY --from=build /ProjectLighthouse/scripts-and-tools/docker-entrypoint.sh /lighthouse
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<RootNamespace>LBPUnion.ProjectLighthouse.Localization</RootNamespace>
|
<RootNamespace>LBPUnion.ProjectLighthouse.Localization</RootNamespace>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<AssemblyName>LBPUnion.ProjectLighthouse.Servers.API</AssemblyName>
|
<AssemblyName>LBPUnion.ProjectLighthouse.Servers.API</AssemblyName>
|
||||||
|
|
|
@ -33,8 +33,7 @@ public class DigestMiddleware : Middleware
|
||||||
public override async Task InvokeAsync(HttpContext context)
|
public override async Task InvokeAsync(HttpContext context)
|
||||||
{
|
{
|
||||||
// Client digest check.
|
// Client digest check.
|
||||||
if (!context.Request.Cookies.TryGetValue("MM_AUTH", out string? authCookie))
|
if (!context.Request.Cookies.TryGetValue("MM_AUTH", out string? authCookie)) authCookie = string.Empty;
|
||||||
authCookie = string.Empty;
|
|
||||||
string digestPath = context.Request.Path;
|
string digestPath = context.Request.Path;
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
const string url = "/LITTLEBIGPLANETPS3_XML";
|
const string url = "/LITTLEBIGPLANETPS3_XML";
|
||||||
|
@ -55,8 +54,11 @@ public class DigestMiddleware : Middleware
|
||||||
excludeBodyFromDigest = true;
|
excludeBodyFromDigest = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
string clientRequestDigest = CryptoHelper.ComputeDigest
|
string clientRequestDigest = CryptoHelper.ComputeDigest(digestPath,
|
||||||
(digestPath, authCookie, bodyBytes, ServerConfiguration.Instance.DigestKey.PrimaryDigestKey, excludeBodyFromDigest);
|
authCookie,
|
||||||
|
bodyBytes,
|
||||||
|
ServerConfiguration.Instance.DigestKey.PrimaryDigestKey,
|
||||||
|
excludeBodyFromDigest);
|
||||||
|
|
||||||
// Check the digest we've just calculated against the digest header if the game set the header. They should match.
|
// Check the digest we've just calculated against the digest header if the game set the header. They should match.
|
||||||
if (context.Request.Headers.TryGetValue(digestHeaderKey, out StringValues sentDigest))
|
if (context.Request.Headers.TryGetValue(digestHeaderKey, out StringValues sentDigest))
|
||||||
|
@ -66,8 +68,11 @@ public class DigestMiddleware : Middleware
|
||||||
// If we got here, the normal ServerDigestKey failed to validate. Lets try again with the alternate digest key.
|
// If we got here, the normal ServerDigestKey failed to validate. Lets try again with the alternate digest key.
|
||||||
usedAlternateDigestKey = true;
|
usedAlternateDigestKey = true;
|
||||||
|
|
||||||
clientRequestDigest = CryptoHelper.ComputeDigest
|
clientRequestDigest = CryptoHelper.ComputeDigest(digestPath,
|
||||||
(digestPath, authCookie, bodyBytes, ServerConfiguration.Instance.DigestKey.AlternateDigestKey, excludeBodyFromDigest);
|
authCookie,
|
||||||
|
bodyBytes,
|
||||||
|
ServerConfiguration.Instance.DigestKey.AlternateDigestKey,
|
||||||
|
excludeBodyFromDigest);
|
||||||
if (clientRequestDigest != sentDigest)
|
if (clientRequestDigest != sentDigest)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
@ -82,9 +87,10 @@ public class DigestMiddleware : Middleware
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
// The game doesn't start sending digests until after the announcement so if it's not one of those requests
|
// The game doesn't start sending digests until after the announcement so if it's not one of those requests
|
||||||
// and it doesn't include a digest we need to reject the request
|
// and it doesn't include a digest we need to reject the request
|
||||||
else if (!exemptPathList.Contains(strippedPath))
|
else if (!exemptPathList.Contains(strippedPath))
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = 403;
|
context.Response.StatusCode = 403;
|
||||||
|
@ -92,7 +98,7 @@ public class DigestMiddleware : Middleware
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
context.Response.Headers.Add("X-Digest-B", clientRequestDigest);
|
context.Response.Headers.Append("X-Digest-B", clientRequestDigest);
|
||||||
context.Request.Body.Position = 0;
|
context.Request.Body.Position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,19 +110,21 @@ public class DigestMiddleware : Middleware
|
||||||
await this.next(context); // Handle the request so we can get the server digest hash
|
await this.next(context); // Handle the request so we can get the server digest hash
|
||||||
responseBuffer.Position = 0;
|
responseBuffer.Position = 0;
|
||||||
|
|
||||||
if (responseBuffer.Length > 1000 && context.Request.Headers.AcceptEncoding.Contains("deflate") && (context.Response.ContentType ?? string.Empty).Contains("text/xml"))
|
if (responseBuffer.Length > 1000 &&
|
||||||
|
context.Request.Headers.AcceptEncoding.Contains("deflate") &&
|
||||||
|
(context.Response.ContentType ?? string.Empty).Contains("text/xml"))
|
||||||
{
|
{
|
||||||
context.Response.Headers.Add("X-Original-Content-Length", responseBuffer.Length.ToString());
|
context.Response.Headers.Append("X-Original-Content-Length", responseBuffer.Length.ToString());
|
||||||
context.Response.Headers.Add("Vary", "Accept-Encoding");
|
context.Response.Headers.Append("Vary", "Accept-Encoding");
|
||||||
MemoryStream resultStream = new();
|
MemoryStream resultStream = new();
|
||||||
const int defaultCompressionLevel = 6;
|
const int defaultCompressionLevel = 6;
|
||||||
await using ZOutputStreamLeaveOpen stream = new(resultStream, defaultCompressionLevel);
|
await using ZOutputStreamLeaveOpen stream = new(resultStream, defaultCompressionLevel);
|
||||||
await stream.WriteAsync(responseBuffer.ToArray());
|
await stream.WriteAsync(responseBuffer.ToArray());
|
||||||
stream.Finish();
|
stream.Finish();
|
||||||
|
|
||||||
resultStream.Position = 0;
|
resultStream.Position = 0;
|
||||||
context.Response.Headers.Add("Content-Length", resultStream.Length.ToString());
|
context.Response.Headers.Append("Content-Length", resultStream.Length.ToString());
|
||||||
context.Response.Headers.Add("Content-Encoding", "deflate");
|
context.Response.Headers.Append("Content-Encoding", "deflate");
|
||||||
responseBuffer.SetLength(0);
|
responseBuffer.SetLength(0);
|
||||||
await resultStream.CopyToAsync(responseBuffer);
|
await resultStream.CopyToAsync(responseBuffer);
|
||||||
}
|
}
|
||||||
|
@ -125,7 +133,7 @@ public class DigestMiddleware : Middleware
|
||||||
string headerName = !context.Response.Headers.ContentLength.HasValue
|
string headerName = !context.Response.Headers.ContentLength.HasValue
|
||||||
? "Content-Length"
|
? "Content-Length"
|
||||||
: "X-Original-Content-Length";
|
: "X-Original-Content-Length";
|
||||||
context.Response.Headers.Add(headerName, responseBuffer.Length.ToString());
|
context.Response.Headers.Append(headerName, responseBuffer.Length.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the server digest hash.
|
// Compute the server digest hash.
|
||||||
|
@ -138,8 +146,9 @@ public class DigestMiddleware : Middleware
|
||||||
: ServerConfiguration.Instance.DigestKey.PrimaryDigestKey;
|
: ServerConfiguration.Instance.DigestKey.PrimaryDigestKey;
|
||||||
|
|
||||||
// Compute the digest for the response.
|
// Compute the digest for the response.
|
||||||
string serverDigest = CryptoHelper.ComputeDigest(context.Request.Path, authCookie, responseBuffer.ToArray(), digestKey);
|
string serverDigest =
|
||||||
context.Response.Headers.Add("X-Digest-A", serverDigest);
|
CryptoHelper.ComputeDigest(context.Request.Path, authCookie, responseBuffer.ToArray(), digestKey);
|
||||||
|
context.Response.Headers.Append("X-Digest-A", serverDigest);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the buffered response to the actual response stream.
|
// Copy the buffered response to the actual response stream.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<AssemblyName>LBPUnion.ProjectLighthouse.Servers.GameServer</AssemblyName>
|
<AssemblyName>LBPUnion.ProjectLighthouse.Servers.GameServer</AssemblyName>
|
||||||
|
|
|
@ -17,10 +17,8 @@ public class TokenAuthHandler : AuthenticationHandler<AuthenticationSchemeOption
|
||||||
(
|
(
|
||||||
IOptionsMonitor<AuthenticationSchemeOptions> options,
|
IOptionsMonitor<AuthenticationSchemeOptions> options,
|
||||||
UrlEncoder encoder,
|
UrlEncoder encoder,
|
||||||
ISystemClock clock,
|
|
||||||
DatabaseContext database
|
DatabaseContext database
|
||||||
// I said I don't want any damn vegetables (logs)
|
) : base(options, new NullLoggerFactory(), encoder)
|
||||||
) : base(options, new NullLoggerFactory(), encoder, clock)
|
|
||||||
{
|
{
|
||||||
this.database = database;
|
this.database = database;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<AssemblyName>LBPUnion.ProjectLighthouse.Servers.Website</AssemblyName>
|
<AssemblyName>LBPUnion.ProjectLighthouse.Servers.Website</AssemblyName>
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.13" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.13">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
<PackageReference Include="xunit" Version="2.5.3" />
|
<PackageReference Include="xunit" Version="2.6.6" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -145,8 +145,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "df619790a2579a077eae4a6b6864966ff4768723";
|
const string expectedClientDigest = "df619790a2579a077eae4a6b6864966ff4768723";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
}
|
}
|
||||||
|
@ -182,8 +182,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "9243acecfa83ac25bdfefe97f5681b439c003f1e";
|
const string expectedClientDigest = "9243acecfa83ac25bdfefe97f5681b439c003f1e";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"]);
|
||||||
}
|
}
|
||||||
|
@ -219,8 +219,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "0a06d25662c2d3bab2a767c0c504898df2385e62";
|
const string expectedClientDigest = "0a06d25662c2d3bab2a767c0c504898df2385e62";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
}
|
}
|
||||||
|
@ -257,8 +257,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "df619790a2579a077eae4a6b6864966ff4768723";
|
const string expectedClientDigest = "df619790a2579a077eae4a6b6864966ff4768723";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
}
|
}
|
||||||
|
@ -295,8 +295,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "3105059f9283773f7982a4d79455bcc97c330f10";
|
const string expectedClientDigest = "3105059f9283773f7982a4d79455bcc97c330f10";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
}
|
}
|
||||||
|
@ -333,8 +333,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "3105059f9283773f7982a4d79455bcc97c330f10";
|
const string expectedClientDigest = "3105059f9283773f7982a4d79455bcc97c330f10";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
}
|
}
|
||||||
|
@ -371,8 +371,8 @@ public class DigestMiddlewareTests
|
||||||
const string expectedClientDigest = "2e54cd2bc69ff8c1ff85dd3b4f62e0a0e27d9e23";
|
const string expectedClientDigest = "2e54cd2bc69ff8c1ff85dd3b4f62e0a0e27d9e23";
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
}
|
}
|
||||||
|
@ -414,18 +414,19 @@ public class DigestMiddlewareTests
|
||||||
const string expectedServerDigest = "404e589cafbff7886fe9fc5ee8a5454b57d9cb50";
|
const string expectedServerDigest = "404e589cafbff7886fe9fc5ee8a5454b57d9cb50";
|
||||||
const string expectedClientDigest = "80714c0936408855d86d47a650320f91895812d0";
|
const string expectedClientDigest = "80714c0936408855d86d47a650320f91895812d0";
|
||||||
const string expectedContentLen = "2000";
|
const string expectedContentLen = "2000";
|
||||||
|
const string expectedContentEncoding = "deflate";
|
||||||
const string expectedCompressedContentLen = "23";
|
const string expectedCompressedContentLen = "23";
|
||||||
const string expectedData = "783F4B4C1C053F60143F3F51300A463F500700643F3F";
|
const string expectedData = "783F4B4C1C053F60143F3F51300A463F500700643F3F3F";
|
||||||
|
|
||||||
context.Response.Body.Position = 0;
|
context.Response.Body.Position = 0;
|
||||||
string output = await new StreamReader(context.Response.Body).ReadToEndAsync();
|
string output = await new StreamReader(context.Response.Body).ReadToEndAsync();
|
||||||
string outputBytes = Convert.ToHexString(Encoding.ASCII.GetBytes(output));
|
string outputBytes = Convert.ToHexString(Encoding.ASCII.GetBytes(output));
|
||||||
|
|
||||||
Assert.Equal(expectedCode, context.Response.StatusCode);
|
Assert.Equal(expectedCode, context.Response.StatusCode);
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-A"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Digest-B"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["Content-Encoding"]);
|
Assert.True(context.Response.Headers.TryGetValue("X-Original-Content-Length", out _));
|
||||||
Assert.NotEmpty(context.Response.Headers["X-Original-Content-Length"]);
|
Assert.Equal(expectedContentEncoding, context.Response.Headers.ContentEncoding);
|
||||||
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]);
|
||||||
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]);
|
||||||
Assert.Equal(expectedContentLen, context.Response.Headers["X-Original-Content-Length"][0]);
|
Assert.Equal(expectedContentLen, context.Response.Headers["X-Original-Content-Length"][0]);
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.13" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.13">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver" Version="4.14.1" />
|
<PackageReference Include="Selenium.WebDriver" Version="4.17.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="118.0.5993.7000" />
|
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="121.0.6167.8500" />
|
||||||
<PackageReference Include="xunit" Version="2.5.3" />
|
<PackageReference Include="xunit" Version="2.6.6" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<ProjectReference Include="..\ProjectLighthouse.Servers.Website\ProjectLighthouse.Servers.Website.csproj" />
|
<ProjectReference Include="..\ProjectLighthouse.Servers.Website\ProjectLighthouse.Servers.Website.csproj" />
|
||||||
<ProjectReference Include="..\ProjectLighthouse.Tests\ProjectLighthouse.Tests.csproj" />
|
<ProjectReference Include="..\ProjectLighthouse.Tests\ProjectLighthouse.Tests.csproj" />
|
||||||
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
|
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
|
||||||
<ProjectReference Include="..\ProjectLighthouse.Localization\ProjectLighthouse.Localization.csproj"/>
|
<ProjectReference Include="..\ProjectLighthouse.Localization\ProjectLighthouse.Localization.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
|
||||||
<AssemblyName>LBPUnion.ProjectLighthouse.Tests</AssemblyName>
|
<AssemblyName>LBPUnion.ProjectLighthouse.Tests</AssemblyName>
|
||||||
|
|
||||||
|
@ -13,15 +13,15 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.13" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.13">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
<PackageReference Include="xunit" Version="2.5.3" />
|
<PackageReference Include="xunit" Version="2.6.6" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -29,8 +29,8 @@
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Moq" Version="4.20.69" />
|
<PackageReference Include="Moq" Version="4.20.70" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.13" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<AssemblyName>LBPUnion.ProjectLighthouse</AssemblyName>
|
<AssemblyName>LBPUnion.ProjectLighthouse</AssemblyName>
|
||||||
<RootNamespace>LBPUnion.ProjectLighthouse</RootNamespace>
|
<RootNamespace>LBPUnion.ProjectLighthouse</RootNamespace>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
|
@ -15,20 +15,20 @@
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Pfim" Version="0.11.2" />
|
<PackageReference Include="Pfim" Version="0.11.2" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.0.2" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
|
||||||
<PackageReference Include="Discord.Net.Webhook" Version="3.12.0" />
|
<PackageReference Include="Discord.Net.Webhook" Version="3.13.0" />
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.13" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.13" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.13">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.0" />
|
||||||
<PackageReference Include="Redis.OM" Version="0.5.4" />
|
<PackageReference Include="Redis.OM" Version="0.6.1" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="YamlDotNet" Version="13.7.1" />
|
<PackageReference Include="YamlDotNet" Version="15.1.0" />
|
||||||
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
|
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
|
||||||
<PackageReference Include="DistributedLock.MySql" Version="1.0.1" />
|
<PackageReference Include="DistributedLock.MySql" Version="1.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0.0",
|
"version": "8.0.0",
|
||||||
"rollForward": "latestMajor",
|
"rollForward": "latestMajor",
|
||||||
"allowPrerelease": true
|
"allowPrerelease": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@ cd "$HOME"/data || (echo "Data directory not found, pls create one~" && exit 1)
|
||||||
echo "Running..."
|
echo "Running..."
|
||||||
|
|
||||||
# Normally this requires ASPNETCORE_URLS but we override that in the configuration
|
# Normally this requires ASPNETCORE_URLS but we override that in the configuration
|
||||||
dotnet ../project-lighthouse/ProjectLighthouse.Servers."$1"/bin/Release/net7.0/LBPUnion.ProjectLighthouse.Servers."$1".dll
|
dotnet ../project-lighthouse/ProjectLighthouse.Servers."$1"/bin/Release/net8.0/LBPUnion.ProjectLighthouse.Servers."$1".dll
|
||||||
|
|
||||||
exit $? # Expose error code from dotnet command
|
exit $? # Expose error code from dotnet command
|
Loading…
Add table
Reference in a new issue