Rescue icon indicating copy to clipboard operation
Rescue copied to clipboard

Place all the confidential information in .environement variables

Open harshakhmk opened this issue 3 years ago • 9 comments

Describe the bug

  • Emergency button is responding with 500 Internal Server Error and it is unable to send emails with bad credentials, I think we should handle the cases for not sending the emails and sending appropriate error messages for bad credentials.
  • Also storing all the credentials in the environment variables(in the .env file) would be safe.

Emergency Bug Image

harshakhmk avatar May 09 '21 11:05 harshakhmk

Hi 😄, thanks for creating your first issue at RESCUE, do read and follow the Code of Conduct and the Contribution Guidelines while contributing. 🚀

github-actions[bot] avatar May 09 '21 11:05 github-actions[bot]

@harshakhmk You have to add your email and password in the mail.py file and set your Gmail account to enable less secure apps then this will resolve. If you have done this and then also it's showing, then please let me know.

swapnilsparsh avatar May 10 '21 05:05 swapnilsparsh

As I mentioned, we can have a .env file where it would be storing all the email and passwords and other confidential information and we can handle the cases where the required field is empty or invalid, by raising error messages and only send emails when all the credentials are valid, so that load on the sending the mails will be less and that will solve the scalability issues, as Gmail SMTP server can send 500 emails per day when logged into their web interface. Also, It would be good enough if Rescue Team has its own email, and sending emails from it seems more reasonable

harshakhmk avatar May 10 '21 06:05 harshakhmk

@harshakhmk You have to add your email and password in the mail.py file and set your Gmail account to enable less secure apps then this will resolve. If you have done this and then also it's showing, then please let me know.

Emergency functionality is working fine

coding-geek21 avatar May 10 '21 11:05 coding-geek21

As I mentioned, we can have a .env file where it would be storing all the email and passwords and other confidential information and we can handle the cases where the required field is empty or invalid, by raising error messages and only send emails when all the credentials are valid, so that load on the sending the mails will be less and that will solve the scalability issues, as Gmail SMTP server can send 500 emails per day when logged into their web interface. Also, It would be good enough if Rescue Team has its own email, and sending emails from it seems more reasonable

Do you want to work on this issue then please rephrase the issue and then let me know?

swapnilsparsh avatar May 11 '21 11:05 swapnilsparsh

As I mentioned, we can have a .env file where it would be storing all the email and passwords and other confidential information and we can handle the cases where the required field is empty or invalid, by raising error messages and only send emails when all the credentials are valid, so that load on the sending the mails will be less and that will solve the scalability issues, as Gmail SMTP server can send 500 emails per day when logged into their web interface. Also, It would be good enough if Rescue Team has its own email, and sending emails from it seems more reasonable

Do you want to work on this issue then please rephrase the issue and then let me know?

Yeah I would like to work on this issue, where the rephrased issue is place all the confidential information in .env file

harshakhmk avatar May 11 '21 14:05 harshakhmk

Why EMAIL_BACKEND EMAIL_HOST EMAIL_PORT EMAIL_USE_TLS EMAIL_HOST_USER EMAIL_HOST_PASSWORD DEFAULT_FROM_EMAIL are declared 2 times?

harshakhmk avatar May 14 '21 13:05 harshakhmk

Why EMAIL_BACKEND EMAIL_HOST EMAIL_PORT EMAIL_USE_TLS EMAIL_HOST_USER EMAIL_HOST_PASSWORD DEFAULT_FROM_EMAIL are declared 2 times?

Can you please specify the file where it is specified two times?

swapnilsparsh avatar May 14 '21 17:05 swapnilsparsh

Why EMAIL_BACKEND EMAIL_HOST EMAIL_PORT EMAIL_USE_TLS EMAIL_HOST_USER EMAIL_HOST_PASSWORD DEFAULT_FROM_EMAIL are declared 2 times?

Can you please specify the file where it is specified two times?

in mysite/settings.py I have created a PR 302 review it @swapnilsparsh

harshakhmk avatar May 14 '21 18:05 harshakhmk