@baris oh sweet! 🙂
NodeBB anti spam
@fantapop I just released a sort of working version,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 with
127.0.0.1which is close to useless. Tomorrow, I'll try to hardcode fake spammy IPs for better coverage.
I need a hook on
Topic.post or Topic.replyto get a check with Akismet, but Akismet requires at least these 3
user_ip: req.ip , user_agent: req.get('User-Agent'), blog: req.host,
I could also use
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
reqobject, or maybe implement the filter on a higher level, maybe at the
Topic.replyare both standalone functions, but to follow DRY,
So I believe putting a hook in at the
Posts.createlevel (here, as the first waterfall function) would be easiest.
filter:posts.validateas a name.
filter:posts.saveis 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.
Post.createsounds like a good place, but can I guarantee that the
reqobject is going to be plumbed in from all the paths?
Hm... since posting is done via web sockets, we don't have the same data we would have in req... would have to example the socket data and see what we have to work with...
ok i'll investigate and post back
I don't think we should put it in
Posts.createas that is the internal function used by importers as well, Topics.reply seems like a better place as it is the one that is called by users and Topics.post calls that too.
Haha good thing we have @baris watching out for the wrong things I say
@bentael Really glad to see the evolution of NodeBB's first anti-spam plugin!!