NodeBB anti spam
-
@fantapop I just released a sort of working version,
https://www.npmjs.org/package/nodebb-plugin-spam-be-gone
this one only work with the Honeypot Project, i would appreciate some testing help. i didn't get a chance to actually test real IPs, only tested with127.0.0.1
which is close to useless. Tomorrow, I'll try to hardcode fake spammy IPs for better coverage.@julian, I got the Honeypot plugin to work, nice job on that nodejs module, but that only works for User registration, I was aiming for post creations as well,
I need a hook on
Post.create
and/orTopic.post or Topic.reply
to get a check with Akismet, but Akismet requires at least these 3user_ip: req.ip , user_agent: req.get('User-Agent'), blog: req.host,
I could also use
postData.user.username
andpostData.content
let me know what you think is the best approach and I can add the hooks and submit a PR.
-
So, I don't know if you want to plumb through the
req
object, or maybe implement the filter on a higher level, maybe at thePOST /api/{route}
handler -
Seems legit.
Topic.post
andTopic.reply
are both standalone functions, but to follow DRY,Topic.post
callsTopic.reply
Topic.reply
callsPosts.create
So I believe putting a hook in at the
Posts.create
level (here, as the first waterfall function) would be easiest.I suggest
filter:posts.check
orfilter:posts.validate
as a name.filter:posts.save
is already there, but the post creation process has already begun, so it is used mostly for munging data after it is destined to enter the database. -
ok i'll investigate and post back
-
okay.png
-