Skip to main content

collective.recaptcha

This package provides an integration of the Recaptcha service into Zope. Recaptcha is a third-party CAPTCHA service provided by Carnegie Mellon University. One of its most interesting features is that the act of users answering CAPTCHAs contributes to efforts to digitize books.

The API is based on collective.captcha and is provided via a “@@captcha” browser view, so these two packages can be swapped for each other relatively simply. Use collective.captcha if you need to not be dependent on an external service; use collective.recaptcha for a slightly better user experience.

Installation and Configuration

Simply make sure that the ZCML for this package is loaded. (You cannot configure this package at the same time as collective.captcha, because the ‘@@captcha’ browser view registration will conflict.)

Before the service will work, you must obtain a public and private key from http://recaptcha.net, and configure them at http://path/to/site/@@recaptcha-settings

Usage

You can insert a Recaptcha using the following TAL:

<tal:block tal:replace="structure context/@@captcha/image_tag"/>

You can verify Recaptcha input by testing the return value of:

context.restrictedTraverse('@@captcha').verify()

Differences between this package’s API and collective.captcha

Because the simplest form of Recaptcha is rendered entirely via a remote call to the service, we couldn’t implement the ICaptchaView interface from collective.captcha exactly as it was defined there. Differences include:

* The image_tag method returns the HTML for the entire CAPTCHA widget,
  including text entry and audio link, not just the tag for the CAPTCHA
  image.

* The audio_url method returns None

* The verify method does not require the input parameter, as a standard
  form input name is used and the value can be found in the request.

* There is an additional method, external, which simply returns True.
  This is a bit of a hack so that a template requiring captcha can
  adjust to the different semantics of the @@captcha view in this
  package as compared to collective.captcha.

Changelog

1.1 (2010-11-18)

  • Use the recaptcha settings from plone.formwidget.recaptcha if it is installed, since it overrides our recaptcha-settings view. [davisagli]

1.0.1 (2009-08-05)

  • Disallowed dependency on broken release of recaptcha-client (1.0.4). [davisagli]

1.0 (2009-05-04)

  • Fixed method signature for verify method so that the vestigial input parameter from collective.captcha’s ICaptchaView is no longer required. [davisagli]

  • Added documentation. [davisagli]

1.0b2 (2009-01-14)

  • Correctly handle comma-delimited values in the HTTP_X_FORWARDED_FOR header. [davisagli]

  • Added support for verifying the captcha multiple times within the same request. [davisagli]

  • Added security declarations on the view methods so they can be called from restricted Python. [davisagli]

1.0b1 (2009-01-14)

  • Initial release

Release files for collective.recaptcha 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.recaptcha 1.1
File Size Uploaded
collective.recaptcha-1.1.zip 14.8 kB Details

Release files / collective.recaptcha-1.1.zip

Download URL collective.recaptcha-1.1.zip
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5e2864cdcc511464d9d660336924c8758f146e127428907daddf1f125314b63a
BLAKE2b-256 checksum
How to use checksums
2166d4078125704a9ad1324cb155f47d9c811ef536b9e057f41f55809496f7eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

This release

1.1 This release

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page