ady/captcha-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ady/captcha-bundle

Composer 安装命令:

composer require ady/captcha-bundle

包简介

User and privacy friendly captcha for your Symfony project

README 文档

README

CaptchaBundle

[![pipeline status](https://gitlab.com/adynemo/captchabundle/badges/main/pipeline.svg)](https://gitlab.com/adynemo/captchabundle/-/commits/main) [![coverage report](https://gitlab.com/adynemo/captchabundle/badges/main/coverage.svg)](https://gitlab.com/adynemo/captchabundle/-/commits/main)

Overview

Make your website more secure and keep the robots away!

This bundle allows you to add a simple and privacy-friendly captcha to your Symfony's forms.

No Google dependency or other third party. This is just a simple challenge, a random question that the user have to answer to validate the form.

Requirements

SupportVersion
Symfony^4.0 / ^5.0
PHP^7.2 / ^8.0

Installation

composer require ady/captcha-bundle --prefer-dist

Use

Add field

Add a new field to your form with CaptchaType. Some options are recommended:

  • mapped should set to false if your form is mapped to an entity
  • required should set to true

So, your captcha field looks like:

use Ady\Bundle\CaptchaBundle\Form\CaptchaType;

->add('captcha', CaptchaType::class, [
    'mapped' => false,
    'required' => true,
])

Available challenges

  • Consonant

Question: What is the third consonant of the word BARBITURIQUE?

Answer: B

  • Letter

Question: What is the fifth letter of the word ESCARPOLETTE?

Answer: R

  • Vowel

Question: What is the first vowel of the word JACTANCE?

Answer: A

Mechanism

The question is design like What is the %index% %letter% of the word %word%?. The challenge is chosen randomly among available challenges. The chosen challenge defines the %letter% and set at random the %index%. Then, the %word% is also pick off randomly from batch of words (see Dictionary).

New captcha

You can create your own captcha. It should extend AbstractCaptcha and it must implement CaptchaInterface, that's it!

Contributing

You can propose new captcha or any improvement. To do that, thanks to fork this repository and to submit one merge request. Add some unit test is appreciated. Be sure to run composer test before submitting your code.

Also, if you have any issue, please submit it on:

统计信息

  • 总下载量: 2.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固