A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
rate limit email sending
ammarahm-edf0efe6bc89f3
diff --git a/apps/mobile/src/components/LoginDialog/index.js b/apps/mobile/src/components/LoginDialog/index.jsindex 9eb33976d..67dce98c7 100644--- a/apps/mobile/src/components/LoginDialog/index.js+++ b/apps/mobile/src/components/LoginDialog/index.js@@ -274,6 +274,14 @@ const LoginDialog = () => {return;}try {+ let lastRecoveryEmailTime = await MMKV.getItem('lastRecoveryEmailTime');+ if (+ lastRecoveryEmailTime &&+ Date.now() - JSON.parse(lastRecoveryEmailTime) < 60000 * 10+ ) {+ throw new Error('Please wait before requesting another email');+ }+ await MMKV.setItem('lastRecoveryEmailTime', JSON.stringify(Date.now()));await db.user.recoverAccount(email);} catch (e) {ToastEvent.show(e.message, 'error', 'local');