Skip to:
Content

bbPress.org

Opened 8 years ago

Closed 8 years ago

#2243 closed defect (fixed)

Add a Spam Check After Edit Topic or Reply

Reported by: alex-ye Owned by:
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.2.3
Component: Extend - Akismet Keywords: has-patch needs-testing
Cc: nashwan.doaqan@…

Description

Hi , It's another bug we founded yesterday .

Bug reproduce steps :
1 - Write a spam topic .
2 - Unspam the topic by your keymaster account .
3 - Edit the unspamed topic from the back-end and Click Save ( you don't need to change anything ) .
You will found that the topic have a 'spam' status again :D
5 - Unspam the topic .
Suprize ! , the topic being draft :|


Bug description :

bbPress check the spam when a topic/reply publish or edit .. so when Akismet said that the topic/reply is spam bbPress change the status to spam and save the previous status in _bbp_spam_meta_status .

The error is when topic or reply edited and Akismet mark them as a spam , bbPress doesn't save the previous status ... so when you unspam it ( step 5 ) it returned to the default status ( draft ) .

Another point I want to make a discussion about it , If the key-master edit a non-spam topic for another user , Is there any need to check it by Akismet ? , even if the key-master make the new content a very spam and random content .


The Patch

In the patch I attached below I added the spam check after topic/reply updated , but I am not sure enough so it needs more testing , and another point there is a code duplication in bbPress insert/update functions but I think it's another ticket maybe for 2.4

Thank You for Reading :)

Attachments (2)

replies-functions.patch (1.6 KB) - added by alex-ye 8 years ago.
topics-functions.patch (1.2 KB) - added by alex-ye 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @alex-ye
8 years ago

  • Cc nashwan.doaqan@… added

Typo : founded = found

#2 @johnjamesjacoby
8 years ago

  • Milestone changed from Awaiting Review to 2.3

I feel like we do this already, but worth verifying.

#3 @johnjamesjacoby
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4810]) When unspamming a topic or reply, check for empty prespam status, and default to public. Fixes #2243.

Note: See TracTickets for help on using tickets.