From b4cea93c19a0b0d69e22c4221d9318dd3352e893 Mon Sep 17 00:00:00 2001 From: Santiago Date: Mon, 23 Sep 2024 10:51:43 -0300 Subject: [PATCH 1/5] restore commits from previous fix --- app/api/users/specs/users.spec.js | 11 ++++------- app/api/users/users.js | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/api/users/specs/users.spec.js b/app/api/users/specs/users.spec.js index b6e81ae9d8..45da5465a4 100644 --- a/app/api/users/specs/users.spec.js +++ b/app/api/users/specs/users.spec.js @@ -587,16 +587,13 @@ describe('Users', () => { }); describe('when the user does not exist with that email', () => { - it('should not create the entry in the database, should not send a mail, and return an error.', async () => { + it('should not create the entry in the database, should not send a mail, and return nothing', async () => { jest.spyOn(Date, 'now').mockReturnValue(1000); const key = unlockCode.generateUnlockCode(); let response; - try { - response = await users.recoverPassword('false@email.com'); - } catch (error) { - expect(error.code).toBe(403); - response = await passwordRecoveriesModel.get({ key }); - } + response = await users.recoverPassword('false@email.com'); + expect(response).toBe(undefined); + response = await passwordRecoveriesModel.get({ key }); expect(response.length).toBe(0); }); }); diff --git a/app/api/users/users.js b/app/api/users/users.js index f9f44d5827..523760c682 100644 --- a/app/api/users/users.js +++ b/app/api/users/users.js @@ -321,7 +321,7 @@ export default { }); } - return Promise.reject(createError('User not found', 403)); + return undefined; }); }, From c39020cbd660582b1a9608eb02ae5de7473ab09b Mon Sep 17 00:00:00 2001 From: Santiago Date: Mon, 23 Sep 2024 10:53:02 -0300 Subject: [PATCH 2/5] fix translations csv --- contents/ui-translations/ar.csv | 2 +- contents/ui-translations/en.csv | 2 +- contents/ui-translations/fr.csv | 2 +- contents/ui-translations/ko.csv | 2 +- contents/ui-translations/my.csv | 2 +- contents/ui-translations/ru.csv | 2 +- contents/ui-translations/th.csv | 2 +- contents/ui-translations/tr.csv | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contents/ui-translations/ar.csv b/contents/ui-translations/ar.csv index 5c6ff8644d..741b734090 100644 --- a/contents/ui-translations/ar.csv +++ b/contents/ui-translations/ar.csv @@ -399,7 +399,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,حروف التحقق غير صحيحة Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/en.csv b/contents/ui-translations/en.csv index a88651bb77..733fc7f506 100644 --- a/contents/ui-translations/en.csv +++ b/contents/ui-translations/en.csv @@ -402,7 +402,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,Invalid captcha Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/fr.csv b/contents/ui-translations/fr.csv index 179405940f..337f8edf3f 100644 --- a/contents/ui-translations/fr.csv +++ b/contents/ui-translations/fr.csv @@ -399,7 +399,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,Captcha invalide Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/ko.csv b/contents/ui-translations/ko.csv index 4c88129ba4..3376dbd08b 100644 --- a/contents/ui-translations/ko.csv +++ b/contents/ui-translations/ko.csv @@ -400,7 +400,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,잘못된 보안문자 Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/my.csv b/contents/ui-translations/my.csv index 80024ff6a9..09e619473c 100644 --- a/contents/ui-translations/my.csv +++ b/contents/ui-translations/my.csv @@ -400,7 +400,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,ကက်ပ်ချာ မှားနေသည် Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/ru.csv b/contents/ui-translations/ru.csv index d762661471..4574498114 100644 --- a/contents/ui-translations/ru.csv +++ b/contents/ui-translations/ru.csv @@ -397,7 +397,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,Неверная Captcha Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/th.csv b/contents/ui-translations/th.csv index 386ccdf887..5bcb9e3467 100644 --- a/contents/ui-translations/th.csv +++ b/contents/ui-translations/th.csv @@ -400,7 +400,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,captcha ไม่ถูกต้อง Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested diff --git a/contents/ui-translations/tr.csv b/contents/ui-translations/tr.csv index d6767488bf..f89cc66d05 100644 --- a/contents/ui-translations/tr.csv +++ b/contents/ui-translations/tr.csv @@ -400,7 +400,7 @@ Install browser extension (dynamic link),Install browser extension (dynamic link Install Language(s),Install Language(s) INSTALL the browser extension,INSTALL the browser extension "Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation.","Instructions on how to achieve this will vary according to the app used, please refer to the app's documentation." -Instructions to reset password,If the email address supplied is correct +Instructions to reset password,"If the email address supplied is correct, we will send instructions to reset the password." Instructions to reset the password were sent to the user,Instructions to reset the password were sent to the user Invalid captcha,Geçersiz güvenlik kodu Invalid csv: all the values for a row must be either nested or non-nested,Invalid csv: all the values for a row must be either nested or non-nested From f0be014b2e409379d6f914916f3cf5b005fd4dd5 Mon Sep 17 00:00:00 2001 From: Santiago Date: Mon, 23 Sep 2024 10:53:07 -0300 Subject: [PATCH 3/5] upped versions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ad31068e7..5d90cd1019 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.185.0", + "version": "1.185.1", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react" From 0eb30c6bdc1e6ff64db3935deae3466d3400d5fa Mon Sep 17 00:00:00 2001 From: Santiago Date: Mon, 23 Sep 2024 10:59:13 -0300 Subject: [PATCH 4/5] empty commit From fadb4846c3c6c7b44eb8adbffdfcc8107c5996c5 Mon Sep 17 00:00:00 2001 From: Daneryl Date: Mon, 23 Sep 2024 16:37:28 +0200 Subject: [PATCH 5/5] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d90cd1019..f37159a8e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.185.1", + "version": "1.185.2", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react"