coldfront icon indicating copy to clipboard operation
coldfront copied to clipboard

Bug: User Upgrade Account Issue

Open culbert opened this issue 1 year ago • 1 comments

What happened?

When one of our users requested an account upgrade, the underlying mail function returned an error. I expected an email to be successfully sent to our help desk.

The issue is that in core/user/views.py in the UserUpgradeAccount object's post method, the from argument used in the call to the send_email_template function specifies request.user.email. This is the email for the user requesting the upgrade. Unless the gateway used to send email is authorized to send mail for the request.user.email domain then the mail will fail to send.

You appear to handle this at other points in the code base by using the setting "EMAIL_SENDER" when sending email. I believe the same approach should be used here.

I'm patching around this issue in my production context with the attached patch.

view.patch.txt

Version

1.1.5

Component

Users

What browsers are you seeing the problem on?

Firefox

Relevant log output

No response

Tasks/ user tests when bug is fixed

  • [ ]

culbert avatar Feb 20 '24 22:02 culbert

@culbert thanks for reporting this. It's not something we've hit before but can definitely fix.

dsajdak avatar May 02 '24 16:05 dsajdak