Skip to content
Snippets Groups Projects
Commit f8064a21 authored by Michael Lee's avatar Michael Lee
Browse files

Merge branch 'recaptcha_v3' into lee5151

parents 77ca65dd 99034d68
No related branches found
No related tags found
No related merge requests found
......@@ -6575,28 +6575,28 @@
},
{
"name": "drupal/recaptcha_v3",
"version": "1.4.0",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/recaptcha_v3.git",
"reference": "8.x-1.4"
"reference": "8.x-1.7"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/recaptcha_v3-8.x-1.4.zip",
"reference": "8.x-1.4",
"shasum": "2f4624076ebb94ad0f49a957d0b4b77094a2bf69"
"url": "https://ftp.drupal.org/files/projects/recaptcha_v3-8.x-1.7.zip",
"reference": "8.x-1.7",
"shasum": "69ce7ca77612e8f0890295d4c69281bdc26569ea"
},
"require": {
"drupal/captcha": "^1.0.0-beta4",
"drupal/core": "^8 || ^9",
"drupal/core": "^9.1 || ^10",
"google/recaptcha": "^1.2"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.4",
"datestamp": "1610128917",
"version": "8.x-1.7",
"datestamp": "1665472068",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
......
......@@ -6808,29 +6808,29 @@
},
{
"name": "drupal/recaptcha_v3",
"version": "1.4.0",
"version_normalized": "1.4.0.0",
"version": "1.7.0",
"version_normalized": "1.7.0.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/recaptcha_v3.git",
"reference": "8.x-1.4"
"reference": "8.x-1.7"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/recaptcha_v3-8.x-1.4.zip",
"reference": "8.x-1.4",
"shasum": "2f4624076ebb94ad0f49a957d0b4b77094a2bf69"
"url": "https://ftp.drupal.org/files/projects/recaptcha_v3-8.x-1.7.zip",
"reference": "8.x-1.7",
"shasum": "69ce7ca77612e8f0890295d4c69281bdc26569ea"
},
"require": {
"drupal/captcha": "^1.0.0-beta4",
"drupal/core": "^8 || ^9",
"drupal/core": "^9.1 || ^10",
"google/recaptcha": "^1.2"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.4",
"datestamp": "1610128897",
"version": "8.x-1.7",
"datestamp": "1665472068",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
......
......@@ -1118,9 +1118,9 @@
'dev_requirement' => false,
),
'drupal/recaptcha_v3' => array(
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'reference' => '8.x-1.4',
'pretty_version' => '1.7.0',
'version' => '1.7.0.0',
'reference' => '8.x-1.7',
'type' => 'drupal-module',
'install_path' => __DIR__ . '/../../web/modules/recaptcha_v3',
'aliases' => array(),
......
CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Recommended modules
......@@ -12,69 +12,69 @@ INTRODUCTION
------------
This module enables you to easily configure reCaptcha v3
and a fallback challenge (captcha/recaptcha v2 e.g).
In case user fails reCaptcha v3,
he can be prompted with an additional challenge to prove.
and a fallback challenge (captcha/recaptcha v2 e.g).
In case user fails reCaptcha v3,
he can be prompted with an additional challenge to prove.
This is an ideal way to maximize security without any user friction.
We no more rely on the reCAPTCHA module for the use of the `recaptcha-php`
library which is included in this module, and make use of
library which is included in this module, and make use of
Composer instead of keeping a duplicating code.
* For a full description of the module, visit the project page:
https://www.drupal.org/project/admin_menu
https://www.drupal.org/project/recaptcha_v3
* To submit bug reports and feature suggestions, or track changes:
https://www.drupal.org/project/issues/admin_menu
https://www.drupal.org/project/issues/recaptcha_v3
REQUIREMENTS
------------
This module requires the following module:
* Captcha (https://www.drupal.org/project/captcha)
This module requires the following library:
* google/recaptacha (https://github.com/google/recaptcha)
* google/recaptacha (https://github.com/google/recaptcha)
RECOMMENDED MODULES
-------------------
* reCAPTCHA (https://www.drupal.org/project/recaptcha):
When enabled, reCAPTCHA v2 becomes available as fallback challenge.
When enabled, reCAPTCHA v2 becomes available as fallback challenge.
INSTALLATION
------------
* Install as you would normally install a contributed Drupal module. Visit
https://www.drupal.org/documentation/install/modules-themes/modules-8
for further information.
* If not using Composer,
* If not using Composer,
install the google/recaptacha (https://github.com/google/recaptcha) library.
CONFIGURATION
-------------
* Register reCAPTCHA v3 keys (https://www.google.com/recaptcha/admin/create).
- The documentation for Google reCaptcha V3
The documentation can be found here
https://developers.google.com/recaptcha/docs/v3),
with information regarding keys registration.
- The documentation for Google reCaptcha V3
The documentation can be found here
https://developers.google.com/recaptcha/docs/v3),
with information regarding keys registration.
* Create at least one action:
- Populate action name
- Choose score threshold
- Select action on user verification fail
* Use the action you created above as a challenge in captcha form settings.
MAINTAINERS
-----------
......
......@@ -51,8 +51,7 @@
*/
Drupal.behaviors.reCaptchaV3 = {
attach: function (context) {
$('.recaptcha-v3-token', context).once('recaptcha-v3-token').each(function () {
var element = this;
once('recaptcha-v3-token', '.recaptcha-v3-token', context).forEach(function (element) {
updateTokenElement(element);
......
{
"require": {
"google/recaptcha": {
"version": "v1.2.4",
"url": "https://github.com/google/recaptcha/archive/1.2.4.zip"
}
}
}
name: 'reCAPTCHA v3'
type: module
description: 'The reCaptcha V3 module provides integration with Google reCaptcha V3 and CAPTCHA module.'
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^9.1 || ^10
package: Spam control
configure: recaptcha_v3.settings
dependencies:
- captcha:captcha
# Information added by Drupal.org packaging script on 2021-01-08
version: '8.x-1.4'
# Information added by Drupal.org packaging script on 2022-10-11
version: '8.x-1.7'
project: 'recaptcha_v3'
datestamp: 1610128899
datestamp: 1665471996
......@@ -14,5 +14,6 @@ recaptcha_v3:
js/recaptcha_v3.js: { weight: 0 }
dependencies:
- core/drupal
- core/jquery.once
- core/jquery
- core/once
- recaptcha_v3/google.recaptcha
......@@ -187,7 +187,7 @@ function recaptcha_v3_post_captcha_element_process(array &$element, FormStateInt
}
// Hide description for the recaptcha v3 captcha element.
if (!empty($element['captcha_widgets']['captcha_response']['#recaptcha_v3'])) {
unset($element['#description']);
unset($element['#description'], $element['#attributes']['aria-describedby']);
}
return $element;
}
......
......@@ -45,16 +45,15 @@ public function testListBuilder() {
// Sign in as a captcha administrator.
$this->drupalLogIn($this->createUser(['administer CAPTCHA settings']));
$this->drupalGet($add_form);
// Add an action.
$this->drupalPostForm(
$add_form, [
'label' => 'Test action',
'id' => 'test_action',
'threshold' => '.5',
'challenge' => 'default',
],
'Save');
$this->submitForm([
'label' => 'Test action',
'id' => 'test_action',
'threshold' => '.5',
'challenge' => 'default',
], 'Save');
// Check that the collection contains the new action.
$this->drupalGet($collection);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment