
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
WTForms-reCaptcha is a convenient field for WTForms <http://wtforms.simplecodes.com/>
_ that transparently handles
reCaptcha display and validation via corresponding widget and validator classes.
| To get an idea about reCaptcha see the docs <http://code.google.com/apis/recaptcha/intro.html>
.
| To start working with it, first get reCaptcha keys here <https://www.google.com/recaptcha/admin/create>
.
Get the distribution::
pip install wtforms-recaptcha
or if you want the latest::
pip install hg+http://bitbucket.org/excieve/wtforms-recaptcha#egg=wtforms-recaptcha
or get hg clone of the source code::
hg clone http://bitbucket.org/excieve/wtforms-recaptcha cd wtforms-recaptcha python setup.py install
It is mostly the usual WTForms field that needs some extra data and parameters. Here's a simple example::
from wtforms.form import Form from wtfrecaptcha.fields import RecaptchaField
class CaptchaForm(Form): captcha = RecaptchaField(public_key=RECAPTCHA_PUB_KEY, private_key=RECAPTCHA_PRIV_KEY, secure=True)
form = CaptchaForm(request.POST, captcha={'ip_address': request.META['REMOTE_ADDR']}) if form.validate(): print "Captcha response is correct" else: print form.errors['captcha']
Some description of field's parameters:
:public_key: Public key generated by reCaptcha service :private_key: Private key generated by reCaptcha service :secure: True if it should be served via HTTPS, False otherwise. Default: False. :http_proxy: URL of HTTP proxy for API calls
When form with RecaptchaField is instantiated with bound fields, it must include captcha keyword parameter with dict that has 'ip_address' element.
Accessing field as a string will get the widget code with URLs that depend on secure parameter passed to the field.
HTTP errors and errors that are indepentent of user input are logged. Others are handled as validation errors.
| WTForms-reCaptcha is released under BSD license. | Copyright (c) 2010-2012 Artem Gluvchynsky excieve@gmail.com and contributors.
See LICENSE for full licensing information.
FAQs
Custom WTForms field that handles reCaptcha display and validation
We found that wtforms-recaptcha demonstrated a healthy version release cadence and project activity because the last version was released less than 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
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.