Jump to content

Topics that are mod queued by the profanity filter still increase post count


Recommended Posts

If a topic is mod queued because the member has content moderation enabled, or if a post within an existing topic is mod queued by the profanity filter, the member's post count is not incremented. However, if a new topic gets mod queued by the profanity filter, the member's post count is still incremented. When the topic is approved, their post count is incremented a second time, and any subsequent approvals also result in additional post count increases.

To reproduce:

  • Add a word to the word filters, and set it to require moderator approval
  • Check your current post count ($n)
  • Post a new topic containing the banned word, so it becomes mod queued
  • Observe that your post count has increased to $n+1
  • Approve the topic
  • Observe that your post count has incremented a second time to $n+2
  • Edit the topic, but leave the banned word in, so it becomes mod queued again on submission
  • (post count is still $n+2)
  • Approve the topic again
  • Observe that your post count has incremented again, to $n+3
  • Continue editing the post ad nauseum to continue to boost the post count further

Aside from the obvious issue that this increases post counts too much, this is also an issue when there are spam prevention rules set up based on having a certain number of approved content items - if members need posts to be approved until they have a post count of 5, their first 5 topics will be mod queued but all subsequent ones will be immediately visible.

This is happening because \IPS\Content::checkProfanityFilters doesn't update $this->queued when $this is the first post in a topic, so the subsequent check of $obj->hidden() in \IPS\Content\Comment::create passes and the member's post count is incremented.

I believe this bug could also cause wider issues, although I'm not aware of any specifically - the code seems to generally expect that posts with queued=0 are in an unhidden topic, but that is not the case with posts in topics that get mod queued due to the profanity filter (both the first post and, if the first post is edited and gets reenqueued, all other posts in the topic).

Link to comment
Share on other sites

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...