From 79013f3aa8acbf5794f16098e938af62de6790c9 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 5 Apr 2022 12:22:52 +0200 Subject: [PATCH 1/3] fixed config dist version to properly reflect new password reset url --- backend/.env.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/.env.dist b/backend/.env.dist index 0a95eda6c..f4ef4e3d4 100644 --- a/backend/.env.dist +++ b/backend/.env.dist @@ -41,7 +41,7 @@ EMAIL_PASSWORD=xxx EMAIL_SMTP_URL=gmail.com EMAIL_SMTP_PORT=587 EMAIL_LINK_VERIFICATION=http://localhost/checkEmail/{optin}{code} -EMAIL_LINK_SETPASSWORD=http://localhost/reset/{optin} +EMAIL_LINK_SETPASSWORD=http://localhost/reset-password/{optin} EMAIL_LINK_FORGOTPASSWORD=http://localhost/forgot-password EMAIL_CODE_VALID_TIME=1440 EMAIL_CODE_REQUEST_TIME=10 From 676beda15f31c3b4afb0fd86488cbd8833188e66 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 5 Apr 2022 12:25:40 +0200 Subject: [PATCH 2/3] also adjust bare_metal deployment `.env.dist` --- deployment/bare_metal/.env.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist index f2b0bcbb3..8e05b6a75 100644 --- a/deployment/bare_metal/.env.dist +++ b/deployment/bare_metal/.env.dist @@ -26,7 +26,7 @@ EMAIL_SENDER=peter@lustig.de EMAIL_PASSWORD=1234 EMAIL_SMTP_URL=smtp.lustig.de EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/{optin}{code} -EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset/{optin} +EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset-password/{optin} EMAIL_LINK_FORGOTPASSWORD=https://stage1.gradido.net/forgot-password EMAIL_CODE_VALID_TIME=1440 EMAIL_CODE_REQUEST_TIME=10 From 69dae586d8c6f02da33e63a81937ae1a18a2c672 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 5 Apr 2022 15:12:36 +0200 Subject: [PATCH 3/3] check that recipient user has activated account in send coins --- backend/src/graphql/resolver/TransactionResolver.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index aa1bba639..8747f14a3 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -263,6 +263,9 @@ export class TransactionResolver { if (recipientUser.deletedAt) { throw new Error('The recipient account was deleted') } + if (!recipientUser.emailChecked) { + throw new Error('The recipient account is not activated') + } if (!isHexPublicKey(recipientUser.pubKey.toString('hex'))) { throw new Error('invalid recipient public key') }