OpenSanghaFoundation / OSF

Bug/Feature requests tracking and documentation managament
https://opensanghafoundation.org
0 stars 0 forks source link

Can't reset password via /password-reset page #29

Closed coiby closed 2 months ago

coiby commented 2 months ago

Describe the bug

A user can't reset his/her password using /password-reset page because no email is sent at all.

To Reproduce Steps to reproduce the behavior:

  1. Go to the login page
  2. Click Forgot your password?
  3. Input your username or email

Expected behavior

The user should receive an email containing the link to reset the password.

Additional context

  1. https://opensanghafoundation.org/newsite/wp-login.php?action=lostpassword still work and I can receive an email to intruct me to reset my password.
  2. Activity Log suggests a few users have failed to login into OSF because they forget their password and can't reset the password. Screenshot_2024-05-12_15-03-07
nowmichaelclark commented 2 months ago

@coiby @OSFOSF , not sure how to check what the Reset Password button links to. https://opensanghafoundation.org/newsite/password-reset/ I just see value="Reset Password". Where is this value defined? image

coiby commented 2 months ago

Solution

  1. Go to Ultimate Member -> Settings -> Emails -> Password Reset Email -> Manage -> toggle "Enable this email notification" on
  2. Go to Ultimate Member -> Settings -> Emails ; change "Admin Email Address" and "Mail appears from address" to wordpress@opensanghafoundation.org

Analysis

I notice Password Reset Email was disabled. But after enabling it, I still couldn't get an email so I decided to find any email logs. WP Mail SMTP - Dashboard shows there are some failed emails among which I found the failed Reset your password,

The following From address failed: admin@opensanghafoundation.org : MAIL FROM command failed,: Sender address rejected: not owned by user wordpress@opensanghafoundation.org
,553,5.7.1SMTP server error: MAIL FROM command failed Detail: : Sender address rejected: not owned by user wordpress@opensanghafoundation.org
SMTP code: 553 Additional SMTP info: 5.7.1SMTP server error: MAIL FROM command failed Detail: : Sender address rejected: not owned by user wordpress@opensanghafoundation.org
SMTP code: 553 Additional SMTP info: 5.7.1

I also looked at a successful email and found the difference is it's sent by wordpress@opensanghafoundation.org. OSF uses WP Mail SMTP and the "From Email" is wordpress@opensanghafoundation.org. So I went to Ultimate Member -> Settings -> Emails to change related settings.

coiby commented 2 months ago

@nowmichaelclark This button is for submitting a form so it won't have a URL. If you are interested to find out more, please check HTML button form Attribute.

nowmichaelclark commented 2 months ago

EDIT: Disregard the below comment. I just received a password reset e-mail! It took about 15-20 minutes to receive so this is why I wasn't sure if it was working.

Is this working for you now @coiby? I attempted a reset on this page with my account but have not received a password reset e-mail.

OSFOSF commented 2 months ago

Screenshot (1263) Screenshot (1264)

coiby commented 2 months ago

@nowmichaelclark @OSFOSF The email logs show the emails have been sent successfully, Screenshot_2024-05-17_22-57-29

I just received a password reset e-mail! It took about 15-20 minutes to receive so this is why I wasn't sure if it was working.

For me, I received the email very fast. I tried two times and both times I received the mail within a minute. Maybe you can send an email using another account to see there is anything wrong with the mail service you use.

OSFOSF commented 2 months ago

fixed already, that was an email problem not a password issue