From 239531b5ff8faaa9ea5fee4d9b752f650006ee94 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 19:47:57 +0000 Subject: [PATCH 01/44] chore(deps): update dependency svelte to v4.2.13 --- frontend/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ff6e24d..d0aea84 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1574,9 +1574,9 @@ } }, "node_modules/svelte": { - "version": "4.2.12", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.12.tgz", - "integrity": "sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug==", + "version": "4.2.13", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.13.tgz", + "integrity": "sha512-jtVt2KXLbQnsWN93Zd7EVboNh8Tqexes4rZfXNP7nYRjd9+JjubTD8BXloUmU1OUYpc6pdd1aKBhCV+b2ZKoMg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.1", From c9abb12b627d64ff924e2f762bd70eea027c4b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Thu, 11 Apr 2024 18:05:45 +0200 Subject: [PATCH 02/44] fix(backend): fix redirect url to request --- backend/internal/handlers/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/handlers/auth.go b/backend/internal/handlers/auth.go index 5097ef1..4c5c774 100644 --- a/backend/internal/handlers/auth.go +++ b/backend/internal/handlers/auth.go @@ -218,7 +218,7 @@ func (h *Handler) HandleAuthenticate(w http.ResponseWriter, r *http.Request) { if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { // Return 401 if the user is not authorized for the requested siteURL - http.Redirect(w, r, "api/request", http.StatusSeeOther) + http.Redirect(w, r, "/request", http.StatusSeeOther) return } h.logError(w, "Database error while checking user authorization", err, http.StatusInternalServerError) From 4e6c16ad7fe2802474159ad3a19c191adbe22a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Thu, 11 Apr 2024 18:05:57 +0200 Subject: [PATCH 03/44] fix(frontend): include cookies --- frontend/src/Register.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/Register.svelte b/frontend/src/Register.svelte index 1d87a35..0084eac 100644 --- a/frontend/src/Register.svelte +++ b/frontend/src/Register.svelte @@ -13,6 +13,7 @@ try { const response = await fetch('/api/register', { method: 'POST', + credentials: "include", headers: { 'Content-Type': 'application/json' }, From f62dc85a8c981959d32abfa8d68685e336f53818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Thu, 11 Apr 2024 18:25:33 +0200 Subject: [PATCH 04/44] fix(frontend): include cookies in request --- frontend/src/Requests.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/Requests.svelte b/frontend/src/Requests.svelte index 330745d..286737f 100644 --- a/frontend/src/Requests.svelte +++ b/frontend/src/Requests.svelte @@ -9,7 +9,10 @@ async function fetchRequests() { try { - const response = await fetch('/api/requests'); + const response = await fetch('/api/requests', + { + credentials: "include" + }); if (response.ok) { requests = await response.json(); } else { From 47ca00d9d9d696be8ace1bdaf822df9f9509b5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Thu, 11 Apr 2024 18:38:02 +0200 Subject: [PATCH 05/44] fix(frontend): fix request display --- frontend/Request.svelte | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/Request.svelte b/frontend/Request.svelte index 479cdc2..0d75eb7 100644 --- a/frontend/Request.svelte +++ b/frontend/Request.svelte @@ -1,6 +1,16 @@