From d88e7702b9362873aa4638db79c1d0fc98bc1a81 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 27 Feb 2024 22:07:43 +0800 Subject: [PATCH 1/2] Update axios from 0.27.x to 0.28.x (#4532) --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28a95267b..9f2bce05e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@louislam/ping": "~0.4.4-mod.1", "@louislam/sqlite3": "15.1.6", "args-parser": "~1.3.0", - "axios": "~0.27.0", + "axios": "~0.28.0", "axios-ntlm": "1.3.0", "badge-maker": "~3.3.1", "bcryptjs": "~2.4.3", @@ -5016,12 +5016,13 @@ "integrity": "sha512-aDczADvlvTGajTDjcjpJMqRkOF6Qdz3YbPZm/PyW6tKPkx2hlYBzxMhEywM/tU72HrVZjgl5VCdRuMlA7pZ8Gw==" }, "node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.28.0.tgz", + "integrity": "sha512-Tu7NYoGY4Yoc7I+Npf9HhUMtEEpV7ZiLH9yndTCoNhcpBH0kwcvFbzYN9/u5QKI5A6uefjsNNWaz5olJVYS62Q==", "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/axios-ntlm": { @@ -11266,8 +11267,7 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/psl": { "version": "1.9.0", diff --git a/package.json b/package.json index 64a59085b..0d2b19696 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@louislam/ping": "~0.4.4-mod.1", "@louislam/sqlite3": "15.1.6", "args-parser": "~1.3.0", - "axios": "~0.27.0", + "axios": "~0.28.0", "axios-ntlm": "1.3.0", "badge-maker": "~3.3.1", "bcryptjs": "~2.4.3", From c7b8bb9e4aef849cb3259b73f8c38148d72058ab Mon Sep 17 00:00:00 2001 From: Nelson Chan <3271800+chakflying@users.noreply.github.com> Date: Wed, 28 Feb 2024 18:57:58 +0800 Subject: [PATCH 2/2] Fix: Incorrect handling of status page not found (#4537) --- server/routers/status-page-router.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/routers/status-page-router.js b/server/routers/status-page-router.js index 29acaf8ea..42cccc942 100644 --- a/server/routers/status-page-router.js +++ b/server/routers/status-page-router.js @@ -40,16 +40,12 @@ router.get("/api/status-page/:slug", cache("5 minutes"), async (request, respons ]); if (!statusPage) { + sendHttpError(response, "Status Page Not Found"); return null; } let statusPageData = await StatusPage.getStatusPageData(statusPage); - if (!statusPageData) { - sendHttpError(response, "Not Found"); - return; - } - // Response response.json(statusPageData);