#4884 add comment: email-related infinite loop and accidental DoS
Opened 3 years ago by midipix. Modified 3 years ago

In the event that delivering one or more comment-triggered email notifications has failed, repeated attempts will be made not only to deliver the email notifications, but also to add the comment "from scratch" to the database.

When failure to deliver email notifications is fatal, for instance due to client misconfiguration or server unavailability, this will eventually lead to a "flooded" database table.

From an end-user perspective, this appears to be a typical "hanging" accompanied by an hourglass, where closing the browser is the only way to escape.

One possible solution would be to only make the database operation (adding a record to the pull_request_comments table) synchronous, and accordingly re-implement the delivery of email notifications as a server-side asynchronous operation.


Metadata Update from @ngompa:
- Issue tagged with: bug, email

3 years ago

So if I remember correctly, this situation was caused by https://pagure.io/pagure/c/a5a0e792e8491f416d3188c42861ba0c62e94a79?branch=master where before that commit we assumed the variable existed while it's not in the default configuration.

So I've tried to replicate this on my local dev instance by just setting a random pagure_config["foobar"] in the code. And I'm ending up with a 500 error which is what I would expect.
So I'll need to spend a little more time to reproduce this issue and from there see if I can fix it (break the "loop" effect).

Login to comment on this ticket.

Metadata