From 62231baa2ad2a6444bbf2a557b53217a4eee93f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 17 Aug 2023 14:08:07 -0400 Subject: [PATCH 1/3] chore: up themes --- install/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/package.json b/install/package.json index ea60bdca28..99243a7955 100644 --- a/install/package.json +++ b/install/package.json @@ -102,10 +102,10 @@ "nodebb-plugin-ntfy": "1.4.0", "nodebb-plugin-spam-be-gone": "2.1.1", "nodebb-rewards-essentials": "0.2.3", - "nodebb-theme-harmony": "1.1.35", + "nodebb-theme-harmony": "1.1.38", "nodebb-theme-lavender": "7.1.3", - "nodebb-theme-peace": "2.1.10", - "nodebb-theme-persona": "13.2.17", + "nodebb-theme-peace": "2.1.12", + "nodebb-theme-persona": "13.2.19", "nodebb-widget-essentials": "7.0.13", "nodemailer": "6.9.4", "nprogress": "0.2.0", From 49bdb455eb910184945fce636c5705a66b38e284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 17 Aug 2023 15:04:08 -0400 Subject: [PATCH 2/3] hmm node 20, yummy --- .github/workflows/test.yaml | 8 +++----- src/start.js | 8 +++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c97b7fb8da..80e8d4e1ed 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,12 +5,10 @@ on: branches: - master - develop - - bootstrap5 pull_request: branches: - master - develop - - bootstrap5 defaults: run: @@ -29,19 +27,19 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node: [16, 18] + node: [16, 18, 20] database: [mongo-dev, mongo, redis, postgres] include: # only run coverage once - os: ubuntu-latest - node: 16 + node: 18 coverage: true # test under development once - database: mongo-dev test_env: development # only run eslint once - os: ubuntu-latest - node: 16 + node: 18 database: mongo-dev lint: true runs-on: ${{ matrix.os }} diff --git a/src/start.js b/src/start.js index f87f0b4ddf..94a785bcc7 100644 --- a/src/start.js +++ b/src/start.js @@ -95,8 +95,9 @@ function printStartupInfo() { } function addProcessHandlers() { - process.on('SIGTERM', shutdown); - process.on('SIGINT', shutdown); + ['SIGTERM', 'SIGINT', 'SIGQUIT'].forEach((signal) => { + process.on(signal, () => shutdown()); + }); process.on('SIGHUP', restart); process.on('uncaughtException', (err) => { winston.error(err.stack); @@ -130,7 +131,7 @@ function restart() { } async function shutdown(code) { - winston.info('[app] Shutdown (SIGTERM/SIGINT) Initialised.'); + winston.info('[app] Shutdown (SIGTERM/SIGINT/SIGQUIT) Initialised.'); try { await require('./webserver').destroy(); winston.info('[app] Web server closed to connections.'); @@ -142,6 +143,7 @@ async function shutdown(code) { process.exit(code || 0); } catch (err) { winston.error(err.stack); + return process.exit(code || 0); } } From 19e047e2d3929ba41e854d2f775493f59c4cbceb Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 17 Aug 2023 17:18:30 -0400 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20#11906,=20userData.sso=20=E2=80=94?= =?UTF-8?q?=20don't=20serve=20deauthUrl=20or=20non-associated=20url=20if?= =?UTF-8?q?=20caller=20uid=20is=20not=20same=20as=20target=20uid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/accounts/helpers.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/controllers/accounts/helpers.js b/src/controllers/accounts/helpers.js index 0d2b08eee8..4ac8042eba 100644 --- a/src/controllers/accounts/helpers.js +++ b/src/controllers/accounts/helpers.js @@ -104,7 +104,16 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID, query = {}) canViewInfo: canViewInfo, }); - userData.sso = results.sso.associations; + userData.sso = results.sso.associations.map((association) => { + if (!isSelf) { + delete association.deauthUrl; + if (!association.associated) { + delete association.url; + } + } + + return association; + }); userData.banned = Boolean(userData.banned); userData.muted = parseInt(userData.mutedUntil, 10) > Date.now(); userData.website = escape(userData.website);