
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
= textcaptcha
textcaptcha utilizies the textcaptcha.com API to help prevent SPAM. The idea behind the library is to be framework agnostic.
== Configuring If you've not yet obtained an API key for textcaptcha.com, do so at http://textcaptcha.com/register. Textcaptcha.configure do |config| config.api_key = 'yourapikeyhere' end
== Retrieving a textCAPTCHA captcha = Textcaptcha.obtain # => { :question => "What's eight - 7?", :answers => [ "c4ca4238a0b923820dcc509a6f75849b", "f97c5d29941bfb1b2fdab0874906ab82" ] }
== Validating an answer Validate the user's answer compared to the answers retrieved from Textcaptcha.obtain captcha = Textcaptcha.obtain # => { :question => "What's eight - 7?", :answers => [ "c4ca4238a0b923820dcc509a6f75849b", "f97c5d29941bfb1b2fdab0874906ab82" ] } Textcaptcha.valid? 'sixteen', captcha[:answers] # => false
== Rails 3 Implementation Since textcaptcha remains framework agnostic, there's a bit more work to implement it, yet minimal.
On the sign up form, retrieve the question and answer(s).
def new Textcaptcha.configure do |config| config.api_key = 'yourapikeyhere' end
captcha = Textcaptcha.obtain
session[:captcha_answers] = captcha[:answers]
@captcha_question = captcha[:question]
@user = User.new
end
def create user = User.new(params[:user]) if Textcaptcha.valid?(params[:captcha_answer], session[:captcha_answers]) && user.save # ... end end
In your view.
<%= label_tag 'captcha_answer', @captcha_question %> <%= text_field_tag 'captcha_answer' %>
== Contributing Be a hero in helping with the battle against spam.
Or
FAQs
Unknown package
We found that textcaptcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.