Skip to content

Abuse reports submitted against deleted users become orphaned

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Deleting a user which has an absue report associated with them, causes the abuse report to become orphaned.

Steps to reproduce

Steps to reproduce:

  1. Create two news users, User A and User B
  2. Add both users as members of a new project
  3. In the project User A should create a new issue and add a comment
  4. User B should report the said comment
  5. Login as a an Admin (root) user in GitLab and go to /admin/abuse_reports and verify the abuse report
  6. Delete User A from GitLab instance
  7. Wait a few minutes (so that Sidekiq runs the job of deleting User A)
  8. Go back to /admin/abuse_reports and observe that the abuse report is no longer listed in the list however the badge on the left hand side reports that there is an abuse report.

Example Project

What is the current bug behavior?

The abuse report and badge count is as expected image

User Simon who made the abusive comment and was subsequently deleted as a user, note the badge count remains at 4 whilst the abuse report has been removed without any interaction with the UI. The abuse report becomes orphaned/ invisible

image

What is the expected correct behavior?

The missing abuse report should either be deleted or if not then the badge count should match the number of abuse reports in the list

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

GitLab 16.11.2

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

You can delete the orphaned abuse report from the database directly gitlabhq_production=# Delete from abuse_reports where id=5;

Edited by 🤖 GitLab Bot 🤖