Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

collective.rercaptcha

Integration with captcha validator in Plone

Features

This project implements an event subscriber that catch every IBeforeTraverseEvent event and an expander for using the functionality from the frontend.

In order to be checked by the captcha service, a request:

  • has to be a POST request
  • has to be included in a list (configurable from the controlpanel)

The custom frontend form will send a request to an eternal captcha valdidator service and recieve a token that will be sent to the backend with all the POST payload. The backend will then verify the legitimacy of the request by checking the same external service for a confirmation.

All requests that are not POST will not be checked. All POST requests that are not on the configurable list will not be checked. All POST requests on the list that don't have the token in the payload will be blocked. All POST requests on the list that have a token not validated by the external service will be blocked.

Configuration

A custom controlpanel is added for easy configurability:

  • use_captcha, a boolean value that enables the checks
  • captcha_uri, the url to the external validator
  • whitelisted_routes, the routes (last portions of urls) that will be subject to the validator.
  • captcha_site_key and captcha_secret, used during the validator phase in the backend, in the shape shown below:
requests.post(
    f"{captcha_uri}/{captcha_site_key}/siteverify",
    data={"secret": captcha_secret, "response": token})

every custom form that implements this service will have to read the custom expander:

"rercaptcha-data": {
    "@id": ...,
    "captcha-url": captcha_uri,
    "captcha-site-key": captcha_site_key,
}

Installation

Install collective.rercaptcha with uv.

uv add collective.rercaptcha

Create the Plone site.

make create-site

Contribute

Prerequisites ✅

Installation 🔧

  1. Clone this repository.

    git clone git@github.com:collective/collective-rercaptcha.git
    cd collective-rercaptcha/backend
    
  2. Install this code base.

    make install
    

Add features using plonecli or bobtemplates.plone

This package provides markers as strings (<!-- extra stuff goes here -->) that are compatible with plonecli and bobtemplates.plone. These markers act as hooks to add all kinds of features through subtemplates, including behaviors, control panels, upgrade steps, or other subtemplates from bobtemplates.plone. plonecli is a command line client for bobtemplates.plone, adding autocompletion and other features.

To add a feature as a subtemplate to your package, use the following command pattern.

make add <template_name>

For example, you can add a content type to your package with the following command.

make add content_type

You can add a behavior with the following command.

make add behavior
You can check the list of available subtemplates in the [`bobtemplates.plone` `README.md` file](https://github.com/plone/bobtemplates.plone/?tab=readme-ov-file#provided-subtemplates).
See also the documentation of [Mockup and Patternslib](https://6.docs.plone.org/classic-ui/mockup.html) for how to build the UI toolkit for Classic UI.

License

The project is licensed under GPLv2.

Credits and acknowledgements 🙏

Generated from the cookieplone-templates template on 2026-03-02 13:59:22.. A special thanks to all contributors and supporters!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective_rercaptcha-1.0.0a10.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collective_rercaptcha-1.0.0a10-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file collective_rercaptcha-1.0.0a10.tar.gz.

File metadata

  • Download URL: collective_rercaptcha-1.0.0a10.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for collective_rercaptcha-1.0.0a10.tar.gz
Algorithm Hash digest
SHA256 522147deb610d031e80dd0cd76012083b9e3e1cfbf172267125308a195f668be
MD5 88c240fd9adf8b49f124ba736440c05b
BLAKE2b-256 5bd1b5b7d12f888f0f9c91b5ade2149d8843912da473515d95e3f0e7bf476ba4

See more details on using hashes here.

File details

Details for the file collective_rercaptcha-1.0.0a10-py3-none-any.whl.

File metadata

  • Download URL: collective_rercaptcha-1.0.0a10-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for collective_rercaptcha-1.0.0a10-py3-none-any.whl
Algorithm Hash digest
SHA256 1bcc76ac47e2af915832e7cb611ad7159448e7b61a59e564f2c8d309b883cdc0
MD5 9f883fd901eaf8e1262ef93485e86cf0
BLAKE2b-256 8f67cc0c0636b0ad91f82f2ca7f829d4ec47441948d56a7437082e1a4edb97d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page