Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x

- name: Run Unit Tests
run: |
Expand Down
16 changes: 8 additions & 8 deletions deploy/Dockerfile-login
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/9.0/alpine3.19/amd64/Dockerfile
# cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/10.0/alpine3.21/amd64/Dockerfile

ARG REPO=mcr.microsoft.com/dotnet/runtime
FROM $REPO:9.0.5-alpine3.21-amd64
FROM $REPO:10.0.1-alpine3.21-amd64

# .NET globalization APIs will use invariant mode by default because DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true is set
# by the base runtime-deps image. See https://aka.ms/dotnet-globalization-alpine-containers for more information.

# ASP.NET Core version
ENV ASPNET_VERSION=9.0.5
ENV ASPNET_VERSION=10.0.1
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

# Install ASP.NET Core
RUN wget -O aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \
&& aspnetcore_sha512='880d6c516af46dda0686c0e56a55cad5d8c34bfe3cacdbee68a9d21a5ff9e9ee93a6c427ef0aabd4c45ab95aa772edc9b89927f38d07619db6219c93e6f6e43b' \
&& aspnetcore_sha512='ef84b8bcfb323a11acc57e54068e1ff7daa400bd5c8aeb89c65fb13fb2ad9e302986647495561a0c4fda5eb4c0836a67e5e7e591d58661f20cd6ddff97d6d4c9' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -oxzf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz

# Update package list and install libicu (ICU libraries) for Alpine
RUN apk update \
&& apk add --no-cache icu-libs
COPY ./build/net9.0 /app/build/net9.0

COPY ./build/net10.0 /app/build/net10.0
COPY ./configuration /app/configuration

WORKDIR /app/build/net9.0
WORKDIR /app/build/net10.0

EXPOSE 4002

Expand Down
16 changes: 8 additions & 8 deletions deploy/Dockerfile-master
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/9.0/alpine3.19/amd64/Dockerfile
# cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/10.0/alpine3.21/amd64/Dockerfile

ARG REPO=mcr.microsoft.com/dotnet/runtime
FROM $REPO:9.0.5-alpine3.21-amd64
FROM $REPO:10.0.1-alpine3.21-amd64

# .NET globalization APIs will use invariant mode by default because DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true is set
# by the base runtime-deps image. See https://aka.ms/dotnet-globalization-alpine-containers for more information.

# ASP.NET Core version
ENV ASPNET_VERSION=9.0.5
ENV ASPNET_VERSION=10.0.1
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

# Install ASP.NET Core
RUN wget -O aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \
&& aspnetcore_sha512='880d6c516af46dda0686c0e56a55cad5d8c34bfe3cacdbee68a9d21a5ff9e9ee93a6c427ef0aabd4c45ab95aa772edc9b89927f38d07619db6219c93e6f6e43b' \
&& aspnetcore_sha512='ef84b8bcfb323a11acc57e54068e1ff7daa400bd5c8aeb89c65fb13fb2ad9e302986647495561a0c4fda5eb4c0836a67e5e7e591d58661f20cd6ddff97d6d4c9' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -oxzf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz

# Update package list and install libicu (ICU libraries) for Alpine
RUN apk update \
&& apk add --no-cache icu-libs
COPY ./build/net9.0 /app/build/net9.0

COPY ./build/net10.0 /app/build/net10.0
COPY ./configuration /app/configuration

WORKDIR /app/build/net9.0
WORKDIR /app/build/net10.0

EXPOSE 5000 6969

Expand Down
14 changes: 7 additions & 7 deletions deploy/Dockerfile-world
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/9.0/alpine3.19/amd64/Dockerfile
# cf https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/10.0/alpine3.21/amd64/Dockerfile

ARG REPO=mcr.microsoft.com/dotnet/runtime
FROM $REPO:9.0.5-alpine3.21-amd64
FROM $REPO:10.0.1-alpine3.21-amd64

# .NET globalization APIs will use invariant mode by default because DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true is set
# by the base runtime-deps image. See https://aka.ms/dotnet-globalization-alpine-containers for more information.

# ASP.NET Core version
ENV ASPNET_VERSION=9.0.5
ENV ASPNET_VERSION=10.0.1
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

# Install ASP.NET Core
RUN wget -O aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \
&& aspnetcore_sha512='880d6c516af46dda0686c0e56a55cad5d8c34bfe3cacdbee68a9d21a5ff9e9ee93a6c427ef0aabd4c45ab95aa772edc9b89927f38d07619db6219c93e6f6e43b' \
&& aspnetcore_sha512='ef84b8bcfb323a11acc57e54068e1ff7daa400bd5c8aeb89c65fb13fb2ad9e302986647495561a0c4fda5eb4c0836a67e5e7e591d58661f20cd6ddff97d6d4c9' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -oxzf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz

# Update package list and install libicu (ICU libraries) for Alpine
RUN apk update \
&& apk add --no-cache icu-libs
COPY ./build/net9.0 /app/build/net9.0

COPY ./build/net10.0 /app/build/net10.0
COPY ./configuration /app/configuration

WORKDIR /app/build/net9.0
WORKDIR /app/build/net10.0

EXPOSE 1337 5001

Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
networks:
- noscore-network
volumes:
- ./build/net9.0/linux-musl-x64:/app/build/net9.0
- ./build/net10.0/linux-musl-x64:/app/build/net10.0
- ./configuration/:/app/build/configuration

world:
Expand All @@ -70,7 +70,7 @@ services:
networks:
- noscore-network
volumes:
- ./build/net9.0/linux-musl-x64:/app/build/net9.0
- ./build/net10.0/linux-musl-x64:/app/build/net10.0
- ./configuration/:/app/build/configuration

login:
Expand All @@ -91,7 +91,7 @@ services:
networks:
- noscore-network
volumes:
- ./build/net9.0/linux-musl-x64:/app/build/net9.0
- ./build/net10.0/linux-musl-x64:/app/build/net10.0
- ./configuration/:/app/build/configuration

networks:
Expand Down
7 changes: 4 additions & 3 deletions src/NosCore.Core/Encryption/Pbkdf2Hasher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ public string Hash(string inputString, string? salt)
{
var saltBytes = Convert.FromBase64String(Convert.ToBase64String(Encoding.Default.GetBytes(salt ?? "")));

using var pbkdf2 = new Rfc2898DeriveBytes(
var hashBytes = Rfc2898DeriveBytes.Pbkdf2(
Encoding.Default.GetBytes(inputString),
saltBytes,
150000,
HashAlgorithmName.SHA512);
return string.Concat(pbkdf2.GetBytes(64).Select(item => item.ToString("x2", CultureInfo.CurrentCulture)));
HashAlgorithmName.SHA512,
64);
return string.Concat(hashBytes.Select(item => item.ToString("x2", CultureInfo.CurrentCulture)));
}

public string Hash(string password) => throw new NotImplementedException();
Expand Down
34 changes: 16 additions & 18 deletions src/NosCore.Core/NosCore.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<TieredCompilation>true</TieredCompilation>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
Expand All @@ -23,31 +23,29 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="8.2.0" />
<PackageReference Include="Autofac" Version="9.0.0" />
<PackageReference Include="AutofacSerilogIntegration" Version="5.0.0" />
<PackageReference Include="BCrypt.Net-Core" Version="1.6.0" />
<PackageReference Include="FastExpressionCompiler" Version="5.0.2" />
<PackageReference Include="JsonPatch.Net" Version="3.3.0" />
<PackageReference Include="FastExpressionCompiler" Version="5.3.0" />
<PackageReference Include="JsonPatch.Net" Version="4.0.1" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Mapster.JsonNet" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.2" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.2" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.3.0" />
<PackageReference Include="NosCore.Dao" Version="4.0.3" />
<PackageReference Include="NosCore.Networking" Version="6.0.0" />
<PackageReference Include="NosCore.Networking" Version="7.0.0" />
<PackageReference Include="NosCore.PathFinder" Version="2.0.1" />
<PackageReference Include="NosCore.Shared" Version="6.0.0" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Polly" Version="8.5.2" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.7.0" />
<PackageReference Include="System.Memory" Version="4.6.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.3" />
<PackageReference Include="System.Text.Json" Version="9.0.3" />
<PackageReference Include="Serilog" Version="4.3.0" />
<PackageReference Include="Polly" Version="8.6.5" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="10.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="10.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.15.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.2" />
<PackageReference Include="TwoFactorAuth.Net" Version="1.4.0" />
</ItemGroup>

Expand Down
Loading
Loading