Skip to content

Commit dfed363

Browse files
authored
Merge pull request #589 from zaanposni/zaanposni-patch-1
bumped npm and nuget packages to fix vulnerabilities
2 parents fc69594 + ed5e9f1 commit dfed363

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4731
-2716
lines changed

.github/workflows/docker_compose.yml

-29
This file was deleted.

backend/Dockerfile

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
22
WORKDIR /app
33

44
# Copy everything and build
55
COPY ./ ./
66
RUN dotnet publish -c Release -o ./bin
77

88
# Build runtime image
9-
FROM mcr.microsoft.com/dotnet/aspnet:6.0
9+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
1010
WORKDIR /app/bin
1111
COPY --from=build-env /app/bin/ .
1212

1313
# Set timezone
1414
ENV TZ=Europe/Berlin
1515
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1616

17-
ENTRYPOINT ["dotnet", "MASZ.dll"]
18-
EXPOSE 80
17+
EXPOSE 8080
18+
19+
USER app
20+
21+
ENTRYPOINT ["dotnet", "MASZ.dll"]

backend/MASZ/MASZ.csproj

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
32
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
54
<ImplicitUsings>enable</ImplicitUsings>
6-
<LangVersion>preview</LangVersion>
5+
<LangVersion>preview</LangVersion>
76
</PropertyGroup>
8-
97
<ItemGroup>
108
<Content Remove="Properties\launchSettingsExample.json" />
119
</ItemGroup>
12-
1310
<ItemGroup>
1411
<_WebToolingArtifacts Remove="Properties\launchSettings.json" />
1512
<_WebToolingArtifacts Remove="Properties\launchSettingsExample.json" />
1613
</ItemGroup>
17-
1814
<ItemGroup>
1915
<Content Include="Properties\launchSettings.json" />
2016
</ItemGroup>
21-
2217
<ItemGroup>
2318
<PackageReference Include="AspNet.Security.OAuth.Discord" Version="6.0.1" />
2419
<PackageReference Include="AspNetCoreRateLimit" Version="4.0.1" />
2520
<PackageReference Include="Discord.Net" Version="3.12.0" />
26-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
27-
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.1" />
28-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
29-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
21+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
22+
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.10" />
23+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
24+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
3025
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3126
<PrivateAssets>all</PrivateAssets>
3227
</PackageReference>
33-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
34-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
35-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
36-
<PackageReference Include="RestSharp" Version="108.0.3" />
28+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
29+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
30+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
31+
<PackageReference Include="RestSharp" Version="112.0.0" />
3732
<PackageReference Include="RestSharp.Serializers.NewtonsoftJson" Version="108.0.3" />
3833
<PackageReference Include="Scrutor" Version="3.3.0" />
39-
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="7.0.0" />
40-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.15.0" />
34+
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.1" />
35+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
4136
<PackageReference Include="Spectre.Console" Version="0.45.0" />
37+
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
38+
<PackageReference Include="Azure.Identity" Version="1.11.4" />
4239
</ItemGroup>
43-
</Project>
40+
</Project>

backend/MASZ/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
builder.Logging.AddProvider(new LoggerProvider());
2424

25-
builder.WebHost.UseUrls("http://0.0.0.0:80/");
25+
builder.WebHost.UseUrls("http://0.0.0.0:8080/");
2626

2727
string connectionString =
2828
$"Server={ Environment.GetEnvironmentVariable("MYSQL_HOST")};" +

backend/MASZ/Properties/launchSettingsExample.json

-31
This file was deleted.

backend/MASZ/Services/InternalConfiguration.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public string GetDeployMode()
152152

153153
public string GetVersion()
154154
{
155-
return "v3.7.0";
155+
return "v3.8.0";
156156
}
157157

158158
public string GetDiscordBotStatus()

nginx/Dockerfile

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
FROM node:16 AS compile-frontend
1+
FROM node:20 AS compile-frontend
22
WORKDIR /svelte
33

4-
COPY masz-svelte/ .
4+
COPY masz-svelte/package.json .
5+
COPY masz-svelte/package-lock.json .
56

67
RUN npm install
7-
RUN npm run build
88

9-
RUN apt update && apt install -y python3-pip
10-
RUN python3 hashbuild.py
9+
COPY masz-svelte/ .
10+
11+
RUN npm run build
1112

1213
FROM nginx:alpine
1314

1415
RUN rm -rf /usr/share/nginx/html/*
1516

1617
COPY static/ /var/www/data/static/
1718
COPY nginx.conf /etc/nginx/nginx.conf
18-
COPY --from=compile-frontend /svelte/public/ /var/www/data/
19+
COPY --from=compile-frontend /svelte/dist/ /var/www/data/
1920

2021
# Set timezone
2122
ENV TZ=UTC
2223
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2324

25+
RUN addgroup -S nginxgroup && adduser -S nginxuser -G nginxgroup
26+
RUN chmod 777 /var/cache/nginx /var/run /etc/nginx /var/log/nginx
27+
28+
USER nginxuser
29+
2430
CMD ["nginx", "-g", "daemon off;"]
2531

2632
EXPOSE 80

nginx/masz-svelte/hashbuild.py

-99
This file was deleted.

nginx/masz-svelte/index.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset='utf-8'>
6+
<meta name='viewport' content='width=device-width,initial-scale=1'>
7+
8+
<title id="tabtitle">MASZ</title>
9+
10+
<link id="tabicon" rel='icon' type='image/x-icon' href='/favicon.ico'>
11+
12+
<link rel='stylesheet' href='/global.css'>
13+
14+
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
15+
</head>
16+
17+
<body>
18+
<noscript>Please enable Javascript for this site to function.</noscript>
19+
<script type="module" src="/src/main.ts"></script>
20+
</body>
21+
22+
</html>

0 commit comments

Comments
 (0)