Bug 1733407 - comment_after_add_tag not being triggered
Summary: comment_after_add_tag not being triggered
Alias: None
Product: Bugzilla
Classification: Community
Component: Extensions
Version: 5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: 5.0-RH7
Assignee: Jeff Fearn 🐞
QA Contact: Lianghui Yu
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-26 03:04 UTC by Jeff Fearn 🐞
Modified: 2019-09-10 22:20 UTC (History)
1 user (show)

Fixed In Version: 5.0.4-rh29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-09-10 22:20:15 UTC

Attachments (Terms of Use)

Description Jeff Fearn 🐞 2019-07-26 03:04:46 UTC
Description of problem:
The antispam code relies on the comment_after_add_tag to disable spammer accounts this hook isn't being triggered and so comments marked as spam do not trigger disabling  accounts.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. setup an account with no groups
2. make 5 comments on one or bugs with that account
3. in an account in a privileged group tag all 5 comments as spam or abuse

Actual results:
The account is not disabled

Expected results:
The account is disabled

Additional info:

Comment 1 Jeff Fearn 🐞 2019-08-20 05:26:33 UTC
Hey Alasdair, thoughts?

Comment 2 Alasdair Kergon 2019-08-20 23:42:58 UTC
Go for it.

Comment 3 Lianghui Yu 2019-08-22 03:33:33 UTC
I'm getting Can't locate object method "is_new" via package "Bugzilla::User" at /var/www/html/bugzilla/extensions/AntiSpam/Extension.pm line 280.
while I tries to add abuse or spam to a comment, the function might be misspelled, please check the problem out.

Comment 4 Lianghui Yu 2019-08-23 05:53:00 UTC
I'm getting x Can't locate object method "comment_count" via package "Bugzilla::User" at /var/www/html/bugzilla/extensions/AntiSpam/Extension.pm line 287.
After the first problem been solved, Looks like it's hard for our server to count 5 :P

Comment 5 Lianghui Yu 2019-08-26 08:49:40 UTC
Verified on latest QE environment.
Result: PASS
tag user's comments as spam 5 times will disable that user without problem.

Comment 7 Jeff Fearn 🐞 2019-09-08 22:18:53 UTC
This change has been deployed to the pre-production infrastructure at https://partner-bugzilla.redhat.com

Comment 8 Jeff Fearn 🐞 2019-09-10 22:20:15 UTC
This change is now live. If there are any issues, do not reopen this
bug. Instead, you should create a new bug and reference this bug.

Note You need to log in before you can comment on or make changes to this bug.