From 0c693d8f7c8cbf6a50134e482e974a87ddb6b8a2 Mon Sep 17 00:00:00 2001 From: Jan Kellermann <jan.kellermann@werk21.de> Date: Wed, 4 Dec 2024 20:10:24 +0100 Subject: [PATCH 1/5] #3491706: Add config for blocking reCaptcha. --- .../klaro.klaro_app.google_recaptcha.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 config/install/klaro.klaro_app.google_recaptcha.yml diff --git a/config/install/klaro.klaro_app.google_recaptcha.yml b/config/install/klaro.klaro_app.google_recaptcha.yml new file mode 100644 index 0000000..06a4cef --- /dev/null +++ b/config/install/klaro.klaro_app.google_recaptcha.yml @@ -0,0 +1,22 @@ +langcode: en +status: false +dependencies: { } +id: google_recaptcha +label: 'Google ReCaptcha' +description: 'Captcha Service from Google Inc.' +default: false +purposes: + - security +cookies: { } +required: false +opt_out: false +only_once: false +info_url: 'https://www.google.com/recaptcha/about/' +privacy_policy_url: 'https://policies.google.com/privacy' +javascripts: + - 'https://www.google.com/recaptcha/api.js' + - recaptcha.js +callback_code: "var el = document.getElementsByClassName('g-recaptcha')\r\nfor (var i = 0; i < el.length; i++) {\r\n el[i].setAttribute(\"data-name\", \"google_recaptcha\");\r\n}" +wrapper_identifier: { } +attachments: { } +weight: 0 -- GitLab From b8785821206624019ccc764b79320c97de89ae3d Mon Sep 17 00:00:00 2001 From: Jan Kellermann <44717-werk21@users.noreply.drupalcode.org> Date: Thu, 5 Dec 2024 15:16:06 +0000 Subject: [PATCH 2/5] Use wrapper_identifier instead of callback_code (Update klaro.klaro_app.google_recaptcha.yml) --- config/install/klaro.klaro_app.google_recaptcha.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/install/klaro.klaro_app.google_recaptcha.yml b/config/install/klaro.klaro_app.google_recaptcha.yml index 06a4cef..58ab836 100644 --- a/config/install/klaro.klaro_app.google_recaptcha.yml +++ b/config/install/klaro.klaro_app.google_recaptcha.yml @@ -16,7 +16,8 @@ privacy_policy_url: 'https://policies.google.com/privacy' javascripts: - 'https://www.google.com/recaptcha/api.js' - recaptcha.js -callback_code: "var el = document.getElementsByClassName('g-recaptcha')\r\nfor (var i = 0; i < el.length; i++) {\r\n el[i].setAttribute(\"data-name\", \"google_recaptcha\");\r\n}" -wrapper_identifier: { } +callback_code: '' +wrapper_identifier: + - .g-recaptcha attachments: { } weight: 0 -- GitLab From cbc31be8b390c42b989b6896ffa96007db41eae0 Mon Sep 17 00:00:00 2001 From: Jan Kellermann <44717-werk21@users.noreply.drupalcode.org> Date: Thu, 5 Dec 2024 21:30:45 +0000 Subject: [PATCH 3/5] Update klaro.klaro_app.google_recaptcha.yml --- config/install/klaro.klaro_app.google_recaptcha.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/install/klaro.klaro_app.google_recaptcha.yml b/config/install/klaro.klaro_app.google_recaptcha.yml index 58ab836..5820d60 100644 --- a/config/install/klaro.klaro_app.google_recaptcha.yml +++ b/config/install/klaro.klaro_app.google_recaptcha.yml @@ -2,8 +2,8 @@ langcode: en status: false dependencies: { } id: google_recaptcha -label: 'Google ReCaptcha' -description: 'Captcha Service from Google Inc.' +label: 'Google reCAPTCHA' +description: 'reCAPTCHA is a CAPTCHA system owned by Google LLC.' default: false purposes: - security -- GitLab From a3498234efe7a0d08791e92398ede0f75e1f7c26 Mon Sep 17 00:00:00 2001 From: Jan Kellermann <44717-werk21@users.noreply.drupalcode.org> Date: Fri, 13 Dec 2024 14:00:47 +0000 Subject: [PATCH 4/5] Update klaro.klaro_app.google_recaptcha.yml --- config/install/klaro.klaro_app.google_recaptcha.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/install/klaro.klaro_app.google_recaptcha.yml b/config/install/klaro.klaro_app.google_recaptcha.yml index 5820d60..812acf5 100644 --- a/config/install/klaro.klaro_app.google_recaptcha.yml +++ b/config/install/klaro.klaro_app.google_recaptcha.yml @@ -15,6 +15,7 @@ info_url: 'https://www.google.com/recaptcha/about/' privacy_policy_url: 'https://policies.google.com/privacy' javascripts: - 'https://www.google.com/recaptcha/api.js' + - 'https://www.recaptcha.net/recaptcha/api.js' - recaptcha.js callback_code: '' wrapper_identifier: -- GitLab From f055cf8133dc3431137961544c32d1dacf470f9a Mon Sep 17 00:00:00 2001 From: Jan Kellermann <44717-werk21@users.noreply.drupalcode.org> Date: Fri, 13 Dec 2024 14:07:53 +0000 Subject: [PATCH 5/5] Added recaptcha to .cspell-project-words.txt --- .cspell-project-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.cspell-project-words.txt b/.cspell-project-words.txt index 633e10f..bd87fa8 100644 --- a/.cspell-project-words.txt +++ b/.cspell-project-words.txt @@ -24,6 +24,7 @@ NOERROR oembeds PBLLC piwik +recaptcha Sascha sascha screenreaders -- GitLab