From 77f2acaf65612b15d9a2bdfa9ee901beb16d3d75 Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Tue, 1 Feb 2022 12:00:01 +0000 Subject: [PATCH 1/6] Fix usage of "ghostMailer" in email verification trigger no issue Introduced bug when refactoring the verification trigger by referencing an undefined member. --- core/server/services/members/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/members/service.js b/core/server/services/members/service.js index 0e7cbe6c73..922ff77dcc 100644 --- a/core/server/services/members/service.js +++ b/core/server/services/members/service.js @@ -108,7 +108,7 @@ module.exports = { const fromAddress = config.get('user_email'); if (escalationAddress) { - this._ghostMailer.send({ + ghostMailer.send({ subject, html: tpl(message, { amountImported, From c3eb3cd567503754b2af58c820b1422d860b4d6e Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Tue, 1 Feb 2022 12:04:39 +0000 Subject: [PATCH 2/6] Fix imports triggering verification when below threshold no issue Swapped the variable names for importSize and importThreshold --- core/server/services/members/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/members/service.js b/core/server/services/members/service.js index 922ff77dcc..e378070503 100644 --- a/core/server/services/members/service.js +++ b/core/server/services/members/service.js @@ -60,7 +60,7 @@ const processImport = async (options) => { delete result.meta.originalImportSize; const importThreshold = await verificationTrigger.getImportThreshold(); - if (importThreshold > importSize) { + if (importSize > importThreshold) { await verificationTrigger.startVerificationProcess({ amountImported: importSize, throwOnTrigger: true From 805bb0b87a54a0bdd7c331745d36752f228b575f Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Tue, 1 Feb 2022 13:54:13 +0000 Subject: [PATCH 3/6] Fixed variable scoping issue with email verification no issue - `this` isn't referring to the correct `this` in this scope, and the library is an import of the file anyway, so this fixes the undefined function call as a result --- core/server/services/members/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/members/service.js b/core/server/services/members/service.js index e378070503..cc6f2512dd 100644 --- a/core/server/services/members/service.js +++ b/core/server/services/members/service.js @@ -112,7 +112,7 @@ module.exports = { subject, html: tpl(message, { amountImported, - siteUrl: this._urlUtils.getSiteUrl() + siteUrl: urlUtils.getSiteUrl() }), forceTextContent: true, from: fromAddress, From c7e0cc0bf2764771d8f2afb24d1fca3b3871d750 Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Tue, 1 Feb 2022 15:13:28 +0000 Subject: [PATCH 4/6] Fixed the TPL variable name used for verification trigger no issue - not nice but it get the job done for now --- core/server/services/members/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/members/service.js b/core/server/services/members/service.js index cc6f2512dd..e189086a13 100644 --- a/core/server/services/members/service.js +++ b/core/server/services/members/service.js @@ -111,7 +111,7 @@ module.exports = { ghostMailer.send({ subject, html: tpl(message, { - amountImported, + importedNumber: amountImported, siteUrl: urlUtils.getSiteUrl() }), forceTextContent: true, From 4714a957480fc6de4d40bc3d2decf00811194edc Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Tue, 1 Feb 2022 15:30:00 +0000 Subject: [PATCH 5/6] Updated Admin to v4.34.2 --- core/client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/client b/core/client index 15a82cc46c..fe9a33563f 160000 --- a/core/client +++ b/core/client @@ -1 +1 @@ -Subproject commit 15a82cc46cb5aae0cac833cdc42c8a76f20a3f36 +Subproject commit fe9a33563fa2d10e03749af6d89a7a9118a44b5b From 35ceb29915f036d571a53e66fc5caebb925525e0 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Tue, 1 Feb 2022 15:30:01 +0000 Subject: [PATCH 6/6] v4.34.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 62ae6a3e75..86ad1aca9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghost", - "version": "4.34.1", + "version": "4.34.2", "description": "The professional publishing platform", "author": "Ghost Foundation", "homepage": "https://ghost.org",