Hcaptcha widget for Plone.
Project description
Introduction
plone.formwidget.hcaptcha is a z3c.form HCaptcha widget for use with Plone.
It is a re-work of the ‘plone.formwidget.recaptcha’_ package original written by Timo Stollenwerk.
Buildout Installation
Add the following code to your buildout.cfg to install plone.formwidget.hcaptcha:
[buildout]
...
[instance]
...
eggs =
...
plone.formwidget.hcaptcha
...
HCaptcha setup
There is a control panel at http://path/to/site/@@hcaptcha-settings to configure the Addon. HCaptcha provides test keys, that can be used to try out the hcaptcha form and documentation at https://docs.hcaptcha.com/.
Site key: 10000000-ffff-ffff-ffff-000000000001
Secret key: 0x0000000000000000000000000000000000000000
To actually use the service, you must obtain a site key and secret key from https://www.hcaptcha.com/signup-interstitial
Verification endpoint
According to the official hCaptcha documentation (https://docs.hcaptcha.com/#server), the token verification endpoint is:
https://api.hcaptcha.com/siteverify
This package now uses api.hcaptcha.com by default instead of hcaptcha.com. If you need to change the host (e.g. staging or internal testing), set the environment variable before starting your Plone instance:
HCAPTCHA_VERIFY_SERVER=api.hcaptcha.com
If the variable is not defined, the safe default (api.hcaptcha.com) will be used.
Usage
See the demo folder inside the distribution for an example usage.
Supermodel
You can add a captcha field in an XML model by adding something like this:
<field name="captcha" type="plone.formwidget.hcaptcha.HCaptchaWidget"> <title>Solve Captcha</title> <description></description> </field>
Source Code
Contributors please read the document Process for Plone core’s development
Sources are at the Plone code repository hosted at Github.
Changelog
1.0.4 (2025-11-14)
Bug fixes:
Fix hCaptcha verification to use the documented endpoint (api.hcaptcha.com/siteverify) and allow overriding the host via the HCAPTCHA_VERIFY_SERVER environment variable. @alexandreIFB (#13)
Fix CI. @wesleybl (#15)
1.0.3 (2024-03-28)
Bug fixes:
German translation for public validator error message. [ksuess] (#12)
1.0.2 (2022-06-23)
New features:
Add an adapter to show the controlpanel in Volto [erral] (#8)
Dutch translation for public validator error message. [fredvd] (#10)
Bug fixes:
Create translation files [erral] (#9)
1.0.1 (2022-02-20)
New features:
Move CI from TravisCI to Github Actions [jensens] (#29)
Bug fixes:
Verify against hcaptcha API with correct URL and api path, code was still checking against recaptcha siteverify api. [fredvd]
Remove IP from sent api call as it can be considered GDPR violation. [fredvd] (#2)
1.0.0 (2021-06-10)
Initial release. [andreasma]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plone_formwidget_hcaptcha-1.0.4.tar.gz.
File metadata
- Download URL: plone_formwidget_hcaptcha-1.0.4.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de638472918e092d377670208903ea24b9a36c192c4a09fbbaeb0e6c96068d81
|
|
| MD5 |
42c5f2f3071d749fda69166cdf631e22
|
|
| BLAKE2b-256 |
cabc758c587a5e164d1a9760362d2467bdd5ccfcc50bf250b3ec012f3e50c3ad
|
File details
Details for the file plone_formwidget_hcaptcha-1.0.4-py3-none-any.whl.
File metadata
- Download URL: plone_formwidget_hcaptcha-1.0.4-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2a4b2d2a0abeece1832d8d123a6a0ec44f4067d17c5da058ce48a1c01063ad6
|
|
| MD5 |
ae64345039e164eb6a5c34f6f5e8c83a
|
|
| BLAKE2b-256 |
54cc18c623765b8e479e3d33c9305168c296edfbc3e4a9023b2ca9573f1e340b
|