POTD: StopForumSpam API for Java

There’s an on-going spam problem in Jenkins wiki. We have capture, but either that was broken, or more likely, spamming is done manually.

One of the suggestions was to integrate StopForumSpam service. To that end, I wrote a simple Java client library for their API. The usage would be something like this:

    for (Answer a : new StopForumSpam().build().ip(ip).email(email).query()) {
        if (a.isAppears()) {
            LOGGER.warning("Rejecting, likely spam: "+a);
            throw new UserError("Due to the spam problem, we need additional verification for your sign-up request. Please contact jenkinsci-dev@googlegroups.com");
        }
    }

My hats off to them for providing a great service, and here is hoping that this will help make the dent. We’ll see.

comments powered by Disqus