mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 11:46:49 +00:00
fix(accounts): mailing an OTP QR code waits at most 10 seconds for the SMTP server
EMAIL_TIMEOUT was not set, and Django's SMTP connection then waits for a server without end: one that accepts the connection and stops answering held the request's thread for good, also on the login page's Email OTP form, which anyone may post. The settings template sets 10 seconds. An administrator whose mail fails is told why on the account page instead of getting an error page.
This commit is contained in:
parent
686c926a30
commit
cbd4374f4f
8 changed files with 37 additions and 14 deletions
|
|
@ -401,6 +401,8 @@ EMAIL_PORT = int(os.getenv("EMAIL_PORT", "587"))
|
|||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", "")
|
||||
## password associated with above email-id
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD", "")
|
||||
# seconds an SMTP server may take to answer; without it a server that stops answering holds the request for good
|
||||
EMAIL_TIMEOUT = 10
|
||||
|
||||
# LDAP Config
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue