Captcha Alternative for Plone 3.X
Products.humanator的Python项目详细描述
简介
验证码有很多缺点,比如可用性和可能的错误 安全感。作为记录验证码容易破解的白皮书 越来越普遍,安全问题也越来越受到关注。
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没有依赖项。
基本用法-创建问题
管理问题很简单:
- Install Humanator (see below).
- Inside a Plone folder create a HumanatorFolder.
- Inside a HumanatorFolder add a HumanatorQuestion (including an answer).
- Publish the new 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或更高版本。
安装时无需构建
在系统路径包或lib/python中安装此包 Zope实例的目录。您可以使用简易安装或 通过setup.py脚本。
安装包之后,需要在zope实例中注册它。 这可以通过将products.humanator-configure.zcml文件放入 etc/package包含包含此内容的目录:
<include package="Products.humanator" />
或者,也可以将该行添加到包中的configure.zcml中,或者 已注册的产品。
安装时内置
如果使用buildout管理实例安装 products.humanator更简单。您可以通过以下方式安装products.humanator 为您的实例将其添加到“鸡蛋”行:
[instance] eggs = Products.humanator zcml = Products.humanator
最后一行告诉buildout生成一个zcml片段,告诉zope 配置products.humanator。
如果另一个包装取决于产品。人形蛋或包括其ZCML 直接不需要在构建配置中指定任何内容: BuildOut会自动检测到这一点。
更新配置后,需要运行“bin/buildout”,其中 将负责更新您的系统。