diff --git a/.github/workflows/build + test.yml b/.github/workflows/build + test.yml
index 69b7068..5b2fd6e 100644
--- a/.github/workflows/build + test.yml
+++ b/.github/workflows/build + test.yml
@@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Setup .NET
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 6.0.x
+ dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
diff --git a/ClubSite/Areas/Manager/Pages/Login.cshtml b/ClubSite/Areas/Manager/Pages/Login.cshtml
index aa920e2..29fae5c 100644
--- a/ClubSite/Areas/Manager/Pages/Login.cshtml
+++ b/ClubSite/Areas/Manager/Pages/Login.cshtml
@@ -69,8 +69,8 @@
(function () {
'use strict';
window.addEventListener('load', function () {
- var forms = document.getElementsByClassName('needs-validation');
- var validation = Array.prototype.filter.call(forms, function (form) {
+ const forms = document.getElementsByClassName('needs-validation');
+ const validation = Array.prototype.filter.call(forms, function (form) {
form.addEventListener('submit', function (event) {
if (form.checkValidity() === false) {
event.preventDefault();
diff --git a/ClubSite/ClubSite.csproj b/ClubSite/ClubSite.csproj
index 07db541..d7702bb 100644
--- a/ClubSite/ClubSite.csproj
+++ b/ClubSite/ClubSite.csproj
@@ -1,75 +1,65 @@
-
-
- net6.0
- enable
- latest
- 3.6.0
- axuno gGmbH
- The source code for https://www.volleyballclub.de/
- $([System.DateTime]::Now.ToString(yyyy))
- Copyright 2020-$(CurrentYear) axuno gGmbH and Contributors
- MIT
-
- en;de
-
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- StatusCodes.resx
-
-
- True
- True
- StatusDescriptions.resx
-
-
-
-
-
- PublicResXFileCodeGenerator
- StatusCodes.Designer.cs
-
-
- PublicResXFileCodeGenerator
- StatusDescriptions.Designer.cs
-
-
-
-
-
- Always
-
-
-
+
+ net8.0
+ enable
+ latest
+ 4.0.0
+ axuno gGmbH
+ The source code for https://www.volleyballclub.de/
+ $([System.DateTime]::Now.ToString(yyyy))
+ Copyright 2020-$(CurrentYear) axuno gGmbH and Contributors
+ MIT
+
+ en;de
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ StatusCodes.resx
+
+
+ True
+ True
+ StatusDescriptions.resx
+
+
+
+
+ PublicResXFileCodeGenerator
+ StatusCodes.Designer.cs
+
+
+ PublicResXFileCodeGenerator
+ StatusDescriptions.Designer.cs
+
+
+
+
+ Always
+
+
\ No newline at end of file
diff --git a/ClubSite/Controllers/Captcha.cs b/ClubSite/Controllers/Captcha.cs
index 1054a54..3300901 100644
--- a/ClubSite/Controllers/Captcha.cs
+++ b/ClubSite/Controllers/Captcha.cs
@@ -17,7 +17,7 @@ namespace ClubSite.Controllers;
[Route("captcha")]
public class Captcha : Controller
{
- async public Task Index()
+ public async Task Index()
{
return await GetSvgContent();
}
@@ -32,13 +32,14 @@ private Task GetSvgContent()
// Change the response headers to output an un-cached image.
HttpContext.Response.Clear();
- HttpContext.Response.Headers.Add("Expires", DateTime.UtcNow.Date.AddDays(-1).ToString("R"));
- HttpContext.Response.Headers.Add("Cache-Control", "no-store, no-cache, must-revalidate");
- HttpContext.Response.Headers.Add("Pragma", "no-cache");
+ // Don't use Headers.Add() here, as it will add multiple headers of the same type.
+ HttpContext.Response.Headers.Append("Expires", DateTime.UtcNow.Date.AddDays(-1).ToString("R"));
+ HttpContext.Response.Headers.Append("Cache-Control", "no-store, no-cache, must-revalidate");
+ HttpContext.Response.Headers.Append("Pragma", "no-cache");
HttpContext.Response.ContentType = "image/svg+xml";
return Task.FromResult(Content(ci.Image));
}
- private string CaptchaSessionKeyName => Library.CaptchaSvgGenerator.CaptchaSessionKeyName;
+ private static string CaptchaSessionKeyName => Library.CaptchaSvgGenerator.CaptchaSessionKeyName;
}
\ No newline at end of file
diff --git a/ClubSite/Pages/TournamentRegistration.cshtml.cs b/ClubSite/Pages/TournamentRegistration.cshtml.cs
index a709b41..9ca13d4 100644
--- a/ClubSite/Pages/TournamentRegistration.cshtml.cs
+++ b/ClubSite/Pages/TournamentRegistration.cshtml.cs
@@ -279,7 +279,7 @@ Vielen Dank!
Volleyballclub Neusäß e.V.
-Browser: {(Request.Headers.ContainsKey(HeaderNames.UserAgent) ? Request.Headers[HeaderNames.UserAgent].ToString() : "unbekannt")}
+Browser: {(Request.Headers.TryGetValue(HeaderNames.UserAgent, out var value) ? value.ToString() : "unbekannt")}
IP-Adresse: {HttpContext.Connection.RemoteIpAddress}
";
}
diff --git a/ClubSite/Pages/_Layout.cshtml b/ClubSite/Pages/_Layout.cshtml
index 2262e7e..9fbc61a 100644
--- a/ClubSite/Pages/_Layout.cshtml
+++ b/ClubSite/Pages/_Layout.cshtml
@@ -38,9 +38,7 @@
@if (!Env.IsDevelopment()) { }
-@* SRI Hash Generator: https://www.srihash.org/ *@
-
-
+
@await RenderSectionAsync("script", false)