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

mail notifications for releases are send for user with deactivated e-mail #18950

Closed
r10r opened this issue Mar 1, 2022 · 3 comments · Fixed by #19131 or #19142
Closed

mail notifications for releases are send for user with deactivated e-mail #18950

r10r opened this issue Mar 1, 2022 · 3 comments · Fixed by #19131 or #19142
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Milestone

Comments

@r10r
Copy link

r10r commented Mar 1, 2022

Gitea Version

1.16.1

Git Version

No response

Operating System

No response

How are you running Gitea?

Gitea helm chart

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

I have created a (bot) user with a fake e-mail adress but deactivated the e-mail address in the administration settings.
But when I create a release of a project a e-mail notification is send to this user.
Since the user doesn't have a valid mailbox a bounce message is generated
and sent to the mail system administrator.

How can I disable all e-mail notifications for a bot user ?

Screenshots

Screenshot 2022-03-01 at 09 27 05

@Gusted
Copy link
Contributor

Gusted commented Mar 2, 2022

It seems like that none of the sending mail functions is taking into account if a email address might be de-activated... Marking as bug.

@Gusted Gusted added type/bug issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented labels Mar 2, 2022
@r10r
Copy link
Author

r10r commented Mar 18, 2022

@Gusted Can you please give me a link to the relevant code section ?
I look forward to get this fixed - maybe I can send a pull request.

@Gusted
Copy link
Contributor

Gusted commented Mar 18, 2022

There too many code paths that eventually lead to sending a mail and many more functions, which uses those function and can access the user/database and can see if a email is inactive. If it was a general function it would be easier, but the code is quite cluttered.

zeripath added a commit to zeripath/gitea that referenced this issue Mar 18, 2022
Emails should not be sent to inactive users except for Activate and ResetPassword
messages.

Fix go-gitea#18950

Signed-off-by: Andrew Thornton <[email protected]>
lunny pushed a commit that referenced this issue Mar 19, 2022
Emails should not be sent to inactive users except for Activate and ResetPassword
messages.

Fix #18950

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 19, 2022
Backport go-gitea#19131

Emails should not be sent to inactive users except for Activate and ResetPassword
messages.

Fix go-gitea#18950

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added this to the 1.16.5 milestone Mar 19, 2022
zeripath added a commit to zeripath/gitea that referenced this issue Mar 19, 2022
Unfortunately fixing changes to `mail_issue.go` did not get included in go-gitea#19131.

We also need to not send issue comment mails to deactivated users.

Fix go-gitea#18950

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 19, 2022
Unfortunately fixing changes to `mail_issue.go` did not get included in go-gitea#19131.

We also need to not send issue comment mails to deactivated users.

Fix go-gitea#18950

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit that referenced this issue Mar 19, 2022
Unfortunately fixing changes to `mail_issue.go` did not get included in #19131.

We also need to not send issue comment mails to deactivated users.

Fix #18950

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit that referenced this issue Mar 19, 2022
Backport #19131
Backport #19142

Emails should not be sent to inactive users except for Activate and ResetPassword
messages.

Fix #18950

Signed-off-by: Andrew Thornton <[email protected]>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
Emails should not be sent to inactive users except for Activate and ResetPassword
messages.

Fix go-gitea#18950

Signed-off-by: Andrew Thornton <[email protected]>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
Unfortunately fixing changes to `mail_issue.go` did not get included in go-gitea#19131.

We also need to not send issue comment mails to deactivated users.

Fix go-gitea#18950

Signed-off-by: Andrew Thornton <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
3 participants