
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.
fastcaptcha is another image captcha solution. It's simple and very fast.
INSTALL:
sudo gem install fastcaptcha
REQUIREMENT:
USAGE:
require 'fastcaptcha' captcha = FastCaptcha.new # defaults to redis for caching and low complexity captchas. challenge = captcha.generate puts challenge.key puts challenge.image # PNG image data
require 'fastcaptcha' require 'moneta/memcache' captcha = FastCaptcha.new(Moneta::Memcache.new, 3) # use memcached instead & level 3 complexity challenge = captcha.generate puts challenge.key puts challenge.image # PNG image data
SINATRA HELPER:
Add the sinatra helper to your application:
require 'sinatra/captcha' class MyApp < Sinatra::Base # ttl of captcha before user has to respond. set :captcha_ttl, 30
# complexity 1 is simple, 4 is wicked hard (makes segmentation very difficult).
set :captcha_level, 2
# use memcached instead of redis (default).
# set :captcha_cache, Moneta::Memcache
register Sinatra::Captcha
end
Add the captcha to your form using the captcha helper:
captcha(ajax: true, id: 'captcha_div')
Validate the captcha on form submission:
if captcha_correct? do_something else do_something_else end
You can have multiple captchas in the same page within different
elements. Just make sure captcha element ids are unique.LICENSE:
GNU GPLv3, so its free and comes with no guarantees. If it brings down your website or burns down your house, I will not be held responsible. Use it at your own risk. You can read all about GNU here: http://www.gnu.org and GNU GPLv3 here: http://www.gnu.org/licenses/gpl.txt.
FAQs
Unknown package
We found that fastcaptcha 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.