Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some users can't reset their password #6570

Open
kontrollanten opened this issue Sep 3, 2024 · 9 comments · May be fixed by #6648
Open

Some users can't reset their password #6570

kontrollanten opened this issue Sep 3, 2024 · 9 comments · May be fixed by #6648
Labels
Component: Email Status: To Reproduce Likely a bug but needs reproduction and/or extended log from the issuer Status: Waiting for answer Waiting issue author answer

Comments

@kontrollanten
Copy link
Contributor

Describe the current behavior

We get a lot of emails from users that says that they've requested a password reset, but they don't receive any email. When I search for their email, user id and username in the logs and audit log I can't find anything.

Relevant config:

log:
  level: 'info' # 'debug' | 'info' | 'warn' | 'error'

smtp:
  # smtp or sendmail
  transport: smtp
  # Path to sendmail command. Required if you use sendmail transport
  sendmail: null
  hostname: 'smtp.eu.mailgun.org'
  port: 587 # If you use StartTLS: 587

Whilst I know it works for other users. Possible causes:

  • Handling errors by the users / bad UX
  • Peertube fails to create the email job
  • Mailgun issue

To investigate this further we may need to add more logging to determine what's going wrong. As far as I can see there's no audit logs for password resets, can we add that? Also we could add some info log here to tell that an email is being prepared.

if (!options) return

Steps to reproduce

Describe the expected behavior

No response

Additional information

  • PeerTube instance:

    • URL:
    • Version: 6.2.1
    • NodeJS version:
    • Ffmpeg version:
  • Browser name, version and platforms on which you could reproduce the bug:

  • Link to browser console log if relevant:

  • Link to server log if relevant (journalctl or /var/www/peertube/storage/logs/):

@wickloww wickloww added Status: To Reproduce Likely a bug but needs reproduction and/or extended log from the issuer Component: Email labels Sep 3, 2024
@Chocobozzz
Copy link
Owner

Hi,

Can you check your local jobs of type email to see if there are errors?
We should also display errors in logs.

But I improved email logging in 99091da

@Chocobozzz Chocobozzz added the Status: Waiting for answer Waiting issue author answer label Sep 5, 2024
@kontrollanten
Copy link
Contributor Author

kontrollanten commented Sep 9, 2024

There's no failed jobs and I couldn't find any relevant information in the logs either.

I can't see that there's any email jobs created for the users who's reporting that they haven't got any email. So either Peertube fails to create the job or the users fails to reset their password.

@Chocobozzz
Copy link
Owner

I can't see that there's any email jobs created for the users who's reporting that they haven't got any email. So either Peertube fails to create the job or the users fails to reset their password.

Can you ask him/her to try again and check in your peertube or nginx logs if the /ask-reset-password endpoint is called? If yes, a subsequent email job type should be created with a Reset your account password email subject.

@Chocobozzz
Copy link
Owner

We need to redesign the audit log but in the meantime I added more "classic" logs in fc771a6

You can filter log entries using Parse logs:

sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info --tags users --tags api

Or by username (for example chocobozzz):

sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info --tags chocobozzz

@kontrollanten
Copy link
Contributor Author

Thanks. We'll upgrade to Peertube 6.3 as soon as it's released and see if we can debug further what happens.

@Sakrecoer
Copy link

It seems email stopped working for us in 6.2.1. No errors to be found in the logs. Will also upgrade to 6.3 see if it makes a difference.

@Chocobozzz
Copy link
Owner

It seems email stopped working for us in 6.2.1. No errors to be found in the logs. Will also upgrade to 6.3 see if it makes a difference.

Please create a dedicated issue with server debug logs enabled

@kontrollanten Do you have news?

@kontrollanten
Copy link
Contributor Author

No, we haven't updated yet

@kontrollanten
Copy link
Contributor Author

I may have found the reason causing this issue. We just had a user who tried to reset his email but it failed due to the registered email was capitalized, whilst he typed his email in lower case. Related to #6383

kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 1, 2024
In order to not force users to be case sensitive when asking for
password reset or resend email verification. When there's multiple
emails where the only difference in the local is the capitalized
letters, in those cases the users has to be case sensitive.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 1, 2024
In order to not force users to be case sensitive when asking for
password reset or resend email verification. When there's multiple
emails where the only difference in the local is the capitalized
letters, in those cases the users has to be case sensitive.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 1, 2024
Allow case insensitive email when there's no other candidate.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 2, 2024
In order to not force users to be case sensitive when asking for
password reset or resend email verification. When there's multiple
emails where the only difference in the local is the capitalized
letters, in those cases the users has to be case sensitive.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 2, 2024
Allow case insensitive email when there's no other candidate.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 2, 2024
In order to not force users to be case sensitive when asking for
password reset or resend email verification. When there's multiple
emails where the only difference in the local is the capitalized
letters, in those cases the users has to be case sensitive.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 2, 2024
Allow case insensitive email when there's no other candidate.

closes Chocobozzz#6570
kontrollanten added a commit to kontrollanten/PeerTube that referenced this issue Oct 2, 2024
Allow case insensitive email when there's no other candidate.

closes Chocobozzz#6570
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Email Status: To Reproduce Likely a bug but needs reproduction and/or extended log from the issuer Status: Waiting for answer Waiting issue author answer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants