Plone 3.x的CAPTCHA替代方案
项目描述
简介
CAPTCHA存在一些缺点,如可用性和可能的安全感。随着有关CAPTCHA易于破解的白皮书越来越普遍,安全问题越来越引起关注。
Humanator依靠不同的方法来确定用户是否是人类。Humanator小部件不是依靠图像(和音频),而是向用户提问,例如
What is six plus 9? Type the word 'human' in all capital letters. What is the best programming language of all time?
用户提供正确答案,然后表单被验证。
这些问题由内容编辑器创建,并存储为名为HumanatorQuestions的自定义内容对象。小部件对已发布的HumanatorQuestions进行随机门户目录搜索,并将结果提供给用户。
Products.humanator没有依赖项。
基本用法 - 创建问题
管理问题很简单
安装Humanator(见下文)。
在Plone文件夹内创建一个HumanatorFolder。
在HumanatorFolder内添加一个HumanatorQuestion(包括答案)。
发布新的HumanatorQuestion。
基本用法 - 添加到表单中
应该遵循以下模式
from zope.interface import Interface from zope.schema import TextLine from Products.humanator.form import Humanator class ITestForm(Interface): """ Test form """ name = TextLine(title=_(u'Name'), description=_(u'Your name'), required=True) humanator = Humanator(title = _('Answer the following question'), description = _('Humanity Check'))
安装Humanator
此包需要Plone 3.x或更高版本。
无buildout安装
将此包安装到您的系统路径包或Zope实例的lib/python目录中。您可以使用easy_install或通过setup.py脚本来完成此操作。
安装包后,需要在您的Zope实例中注册它。可以通过在etc/package-includes目录中放置一个Products.humanator-configure.zcml文件来完成此操作,其内容如下
<include package="Products.humanator" />
或者,您可以将其添加到已注册的包或产品的 configure.zcml 文件中。
使用 buildout 安装
如果您使用 buildout 来管理您的实例,安装 Products.humanator 将更加简单。您可以通过将其添加到实例的 eggs 行来安装 Products.humanator。
[instance] eggs = Products.humanator zcml = Products.humanator
最后一行告诉 buildout 生成一个 zcml 片段,告知 Zope 配置 Products.humanator。
如果另一个包依赖于 Products.humanator egg 或直接包含其 zcml,您在 buildout 配置中无需指定任何内容:buildout 将自动检测。
更新配置后,您需要运行“bin/buildout”,这将负责更新您的系统。
项目详情
Products.humanator-0.6.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | cc9c46ef5cc9a62eaa35150732d09406f950a8b40707edfadb5fa88ec7e8693f |
|
MD5 | c45844f73b9ef69921126b430f2343c8 |
|
BLAKE2b-256 | f1305d04877dcbf48207fcc9c7b73c3cdc2ec67af58ee010fb406064756b56fd |