跳转到主要内容

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没有依赖项。

基本用法 - 创建问题

管理问题很简单

  1. 安装Humanator(见下文)。

  2. 在Plone文件夹内创建一个HumanatorFolder。

  3. 在HumanatorFolder内添加一个HumanatorQuestion(包括答案)。

  4. 发布新的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 (18.8 kB 查看哈希值)

上传时间 源代码

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面