Giter VIP home page Giter VIP logo

captcha's Introduction

CAPTCHA

A CAPTCHA is a challenge-response test most often placed within web forms to determine whether the user is human. The purpose of CAPTCHA is to block form submissions by spambots, which are automated scripts that post spam content everywhere they can. The CAPTCHA module provides this feature to virtually any user facing web form on a Backdrop site.

INSTALLATION

  • Install this module using the official Backdrop CMS instructions at https://backdropcms.org/guide/modules

  • Go to Configuration > People > CAPTCHA (admin/config/people/captcha).

  • You can either use the default Math CAPTCHA or also enable the included Image CAPTCHA module.

  • This module allows for additional modules to extend its functionality, such as reCAPTCHA.

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

Current Maintainers

This module is currently seeking maintainers. In the meanwhile it will be maintained by Herb v/d Dool.

Credits

Ported to Backdrop by Herb v/d Dool (https://github.com/herbdool/)

This module was originally written for Drupal (https://drupal.org/project/captcha). Drupal maintainers are: wundo, soxofaan, elachlan, podarok, RobLoach.

captcha's People

Contributors

aries1980 avatar bugfolder avatar claudiu-cristea avatar davidlesieur avatar dww avatar elachlan avatar herbdool avatar podarok avatar robloach avatar wundo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

captcha's Issues

backdrop_sort fatal error when going to the settings page

When migrating a site to Backdrop that was upgraded from Drupal 6 to 7 and had captcha previously, I get this error on the settings page:

Catchable fatal error: Argument 1 passed to backdrop_sort() must be of the type array, null given, called in /home/backdrop/modules/contrib/captcha/captcha.inc on line 134 and defined in /home/backdrop/core/includes/common.inc on line 6812

Error message when I am in the Settings Captcha

Hello Webdeveloper,

I use Backdrop 1.2 and when I run it in the browser URL (/admin/config/people/captcha/captcha/settings), I see this error message.

Warning: htmlspecialchars () Expects parameter 1 to be string, object Given in check_plain () (line 1848 of /www/htdocs/xxxxxxxxxxx/cms/backdrop/core/includes/bootstrap.inc).

How can you eliminate? Thank you in advance.

config doesn't capchure form ids

I installed locally and configured for the user_register_form. Installed on remote, then exported config from local to remote. All settings transferred except the form id.

Captcha override by form_id selection box or list of available options feature request

The Captcha general settings at admin/config/people/captcha/captcha/settings includes option to override individual forms if desired. The form id must be entered correctly for this to work. For example to have no challenge on the user login one must enter user_login not user-login or user_login_form. It can be difficult to get the right id. It would be nice to have some help in the way of the available form ids or a selection box.

D7 upgrade results in Notice: Undefined offset: 1 in captcha_get_form_id_setting()

After upgrading a site from D7, there are many watchdog entries of the form

Notice: Undefined offset: 1 in captcha_get_form_id_setting() (line 100 of /mysite/modules/contrib/captcha/captcha.inc).

The root cause of these reports is because in the update hook captcha_update_1000(), the variable captcha_default_challenge is converted to a config variable of the same name. But in every other case, the variable prefix captcha_ is removed during the conversion to config, so by rights, variable captcha_default_challenge should have been converted to config variable default_challenge.

And indeed, there are many references to the latter in the module; in particular, the line in captcha_get_form_id_setting() that causes this error:

      list($module, $type) = explode('/', config_get('captcha.settings', 'default_challenge'));

The error is generated because there is no config setting of default_challenge. There is, instead, a config setting of captcha_default_challenge that never gets used.

The solution is straightforward, I think: add another update hook that converts the config variable captcha_default_challenge to default_challengeif it isn't already converted or set by the site admin.

PR to follow.

Notice: Undefined offset: 1 in captcha_get_form_id_setting

On an upgraded D7 site, I get this on the login screen:

Notice: Undefined offset: 1 in captcha_get_form_id_setting() (line 99 of /path/modules/captcha/captcha.inc).

When I go to the configuration page for Captcha, it looks like some of the settings from the D7 site were not transferred over (including default challenge type, form IDs, Captcha description). After I re-enter and save config, the notice no longer shows up.

Fatal error when trying to configure CAPTCHA 1.x-1.7.2

On Backdrop 1.24.1, Installed CAPTCHA 1.x-1.7.2. Installs OK, but going to configure for first time, at admin/config/people/captcha gives fatal error on screen:

Argument 1 passed to backdrop_sort() must be of the type array, null given, called in /app/modules/contrib/captcha/captcha.inc on line 132

Reported in site log as:

TypeError: Argument 1 passed to backdrop_sort() must be of the type array, null given, called in /app/modules/contrib/captcha/captcha.inc on line 132 in backdrop_sort() (line 7278 of /app/core/includes/common.inc).

Same error on local site and staging:

  • Local site is PHP 7.4.33
  • Staging site is: PHP 8.1.17

Fatal error when trying to configure captcha

Fatal error: Call to undefined function locale_language_list() in /home/www/backdrop/modules/captcha-1.x-1.x/captcha.admin.inc on line 159

In drupal 8 locale_language_list() was removed. See https://www.drupal.org/node/1414264

Changing to language_list() in line 159 and line 290 resolves the problem, but then I get many times the warning

Warning: htmlspecialchars() expects parameter 1 to be string, object given in check_plain() (line 1843 of /home/www/backdrop/core/includes/bootstrap.inc).

PHP fatal when $captcha_points is not an array.

I just downloaded and enabled both captcha and recaptcha with drush. Then when I went to the settings page for captcha I got a fatal error:

TypeError: Argument 1 passed to backdrop_sort() must be of the type array, null given, called in backdrop/modules/contrib/captcha/captcha.inc on line 131 in backdrop_sort() (line 7276 of backdrop/core/includes/common.inc). 

This line is called immediately after retrieving captcha_points from the config file. Is it possible that this doesn't get set on install, or gets set to something like FALSE, or ''?

I'm also seeing

Warning: Invalid argument supplied for foreach() in captcha_admin_settings() (line 103 of backdrop/modules/contrib/captcha/captcha.admin.inc). 

That line also assumes $captcha_points was set, and is an array.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.