Are topic titles processed by the Akismet plugin?


(Seth) #1

I was wondering if the title of a new topic (first post) was being sent to Akismet along with the post body? I’ve noticed that most of the spam getting through currently seems to have the spam payload (phone number, what they are trying offer, etc) in the title rather than the body. In these cases the body just has a some random text but not what you would consider spam from a classical sense.

Profanity Filter - Not Working on Titles/Topic Subject Line
(Jeff Atwood) #2

Not sure, this is a question for @eviltrout? It is a good question though. Do we send titles to Akismet?

In the meantime @seth you may want to reduce the maximum allowed title length in site settings. Beware, if you have lots of titles longer than the maximum, they will behave weirdly on edit (e.g. you can no longer save an edit of the first post unless you reduce the title length)

(Seth) #3

Thanks for the suggestion about the topic length, the spam topics do have rather long titles. I will try reducing to 100 and see if that helps a bit.

(Robin Ward) #4

It looks like we do not. I think Akismet doesn’t support it:

(Seth) #5

That explains the high volume of spam getting through each night. When I first installed the Akismet plugin it was catching almost everything but the spammer caught on and started trying new techniques. It seems that lately the spam that gets through has the payload in the title rather than the body.

What about concatenating the title and the body together (perhaps separated by whitespace) and only doing this on the creation of a new topic? If it’s a reply to an existing topic then just use the post body instead.

(Jeff Atwood) #6

Yeah @sethtvn has the right idea here

We should make that change for new topics.

(Seth) #7

I can take a stab at it and submit a PR (I know Ruby). Assuming that everyone continues to think it’s a good approach.

(Sam Saffron) #8

Sure … go for it, we would like the change

(Seth) #9

I have installed it on my Discourse instance pointing to a new feature branch in my fork. I get a decent amount of spam every night from India so we’ll see plenty of real world testing. Once I get finish testing everything I’ll rebase off master and submit a PR.

(Jeff Atwood) #10

Excellent, thanks for your help on this!

(Seth) #11

You’re welcome, thank you all for providing this amazing platform. Pull request submitted.

100% of the spam messages were caught by Akismet last night.

(Régis Hanol) #12

Just merged it :wink:

(Régis Hanol) #13