Password reset (#448)

* Password reset

* Various improvements and fixes for password reset

- Reorganize src/mail.rs to make it  cleaner
- add a build_mail function
- only make the requests invalid after 2 hours
- avoid infintely-growing list of requests by deleting them once completed, or after 24 hours
- avoid sending many requests for the same user
- validate the password reset form

* Avoid locking so many times

Fix durations

* Remove old requests even if the current one is not valid

* Remove unused feature

* Also remove the custom_derive and plugin features while we are at it

* Forgot a 0 è_é

* Avoid panicking while owning a request lock

* Use master branch of lettre so that we can build with the latest OpenSSL

* Fix the debug mailer
This commit is contained in:
Baptiste Gelez
2019-02-27 13:29:26 +01:00
committed by GitHub
parent e28371bbe4
commit a2b9d7ec44
21 changed files with 927 additions and 15 deletions
+46 -3
View File
@@ -70,6 +70,22 @@ msgstr "تعديل {0}"
msgid "You need to be logged in order to reshare a post"
msgstr "يجب عليك تسجيل الدخول قصد الإعجاب بالمنشور"
#, fuzzy
msgid "Password reset"
msgstr "كلمة السر"
# src/routes/session.rs:156
msgid "Here is the link to reset your password: {0}"
msgstr ""
#, fuzzy
msgid "Your password was successfully reset."
msgstr "لا يمكن ترك خانة الكلمة السرية فارغة"
# src/routes/session.rs:214
msgid "Sorry, but the link expired. Try again"
msgstr ""
msgid "You need to be logged in order to access your dashboard"
msgstr "يجب عليك أولا تسجيل الدخول للوصول إلى لوح التحكم"
@@ -468,6 +484,36 @@ msgstr "الانتقال إلى معرضك"
msgid "No more result for your query"
msgstr ""
msgid "Reset your password"
msgstr ""
#, fuzzy
msgid "New password"
msgstr "كلمة السر"
#, fuzzy
msgid "Confirmation"
msgstr "الإعدادات"
#, fuzzy
msgid "Update password"
msgstr "تحديث الحساب"
msgid "Check your inbox!"
msgstr ""
msgid ""
"We sent a mail to the address you gave us, with a link to reset your "
"password."
msgstr ""
#, fuzzy
msgid "E-mail"
msgstr "البريد الالكتروني"
msgid "Send reset link"
msgstr ""
msgid "Login"
msgstr "تسجيل الدخول"
@@ -796,9 +842,6 @@ msgstr "استخدمها كصورة رمزية"
#~ msgid "We need an email or a username to identify you"
#~ msgstr "نحن بحاجة إلى عنوان بريد إلكتروني أو اسم مستخدم للتعرف عليك"
#~ msgid "Your password can't be empty"
#~ msgstr "لا يمكن ترك خانة الكلمة السرية فارغة"
#~ msgid "Passwords are not matching"
#~ msgstr "الكلمات السرية غير متشابهة"