You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/control-panel/settings/captcha.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,19 @@ This section of the Control Panel allows you to set the [CAPTCHA](security/captc
17
17
18
18
### Require CAPTCHA?
19
19
20
-
If you enable this preference, then site visitors will be required to pass a CAPTCHA to submit any front-end form, including Channel Form, comment forms, contact forms, and member registrations. If members are logged in, they will not have to enter a CAPTCHA unless the [Require CAPTCHA while logged in?](#require-captcha-while-logged-in) preference is enabled.
20
+
If you enable this preference, then site visitors will be required to pass a CAPTCHA to submit any front-end form, including [channel forms](security/captchas.md#channel-forms), [comment forms](security/captchas.md#comment-forms), contact and tell-a-friend email forms](#contact-and-tell-a-friend-email-forms), and [member registrations](security/captchas.md#member-registration-forms).
21
+
22
+
If members are logged in, they will not have to enter a CAPTCHA unless the [Require CAPTCHA while logged in?](#require-captcha-while-logged-in) preference is enabled.
23
+
24
+
Superadmins are not required to submit a captcha and are never shown one.
21
25
22
26
### Require CAPTCHA while logged in?
23
27
24
28
If you enable this preference, then even members who are logged in will need to fill out CAPTCHA information in order to post, for example, comments (assuming you've enabled CAPTCHA support for comment posting). If you disable this setting, then members who are logged in will bypass the CAPTCHA check.
25
29
26
30
### Use reCAPTCHA v3?
27
31
28
-
If you enable this preference then the system will use reCAPTCHA v3 in place of the built-in image based solution.
32
+
If you enable this preference then the system will use reCAPTCHA v3 in place of the built-in image based solution. You will also want to ensure that you [update any code](security/captchas.md#captcha-code) used to output CAPTCHAs on your site.
29
33
30
34
## Built-in CAPTCHA Settings
31
35
@@ -57,7 +61,9 @@ If you do not know what to use for your full server path, contact your Host or s
57
61
58
62
## reCAPTCHA v3 Settings
59
63
60
-
If you wish to use (Google reCAPTCHA v3)[https://cloud.google.com/security/products/recaptcha#how-it-works] as a replacement for the built-in functionality, you will need to ensure that the site is set up with Google with the required site key and secret. Note that there is currently a monthly limit on the number of free CAPTCHAs that Google provides. See https://www.google.com/recaptcha/admin/create
64
+
If you wish to use (Google reCAPTCHA v3)[https://cloud.google.com/security/products/recaptcha#how-it-works] as a replacement for the built-in functionality, you will need to ensure that the site is set up with Google with the required site key and secret.
65
+
66
+
Note that there is currently a monthly limit on the number of free CAPTCHAs that Google provides. See https://www.google.com/recaptcha/admin/create
Copy file name to clipboardExpand all lines: docs/security/captchas.md
+34-18
Original file line number
Diff line number
Diff line change
@@ -11,52 +11,68 @@
11
11
12
12
[TOC]
13
13
14
-
ExpressionEngine supports what are known as "CAPTCHAs", or Completely Automated Public Turing tests to tell Computers and Humans Apart. A CAPTCHA is a computer-generated test that humans can easily pass, but that is computationally difficult for a computer to do.
14
+
A CAPTCHA, as a general concept, is a computer-generated test that humans can easily pass, but that is computationally difficult for a computer to do. They are used when you want to ensure that a human is performing an action, not an automated script -- often to block spam.
15
15
16
-
So how does this work? An image is generated in real time for a user loading a web page. This image contains a word that the user must enter in a form. The concept is effective because computers are generally not very good at reading images, but it is something humans can do with little effort.
16
+
ExpressionEngine has built-in support for CAPTCHAs (Completely Automated Public Turing tests to tell Computers and Humans Apart), and can also use (Google's reCAPTCHA v3)[https://cloud.google.com/security/products/recaptcha].
17
+
18
+
So how does the built-in CAPTCHA functionality work?
19
+
20
+
When a user loads a web page with a form protected by a CAPTCHA, EE generates a unique image in real time. This image contains a word that the user must enter when they submit a form. The CAPTCHA is effective because computers are generally not very good at reading images, but it is something humans can do with little effort.
17
21
18
22
In ExpressionEngine, CAPTCHAs can be used in several places:
-[Contact and Tell-a-Friend Email Forms](#contact-and-tell-a-friend-email-forms)
24
-
-[CAPTCHA Code](#captcha-code)
25
-
-[Notes](#notes)
26
-
-[CAPTCHA Words](#captcha-words)
24
+
-[To submit a comment](#comment-forms)
25
+
-[To register a new member](#member-registration-forms)
26
+
-[In the Contact and Tell-a-Friend email forms](#contact-and-tell-a-friend-email-forms)
27
+
-[In Channel Forms](#channel-forms)
28
+
29
+
The settings to require CAPTCHAs for these forms are located at [`Settings --> CAPTCHA`](control-panel/settings/captcha.md) in the control panel.
27
30
28
-
The settings to require CAPTCHAs for these forms are located at `Settings --> CAPTCHA` in the control panel.
31
+
The CAPTCHA settings are applied site-wide. If you have CAPTCHAS required, they will be required for all of the following uses with the same settings. If other add-ons integrate the use of EE's captcha system, they will also be controlled by the same settings.
29
32
30
33
## Comment Forms
31
34
32
-
Once you have the preference turned on, you'll need to add the CAPTCHA code to your [Comment Submission Form](comment/form.md). See below for the [CAPTCHA Code](#captcha-code).
35
+
If you have CAPTCHAS required, you'll need to add the CAPTCHA code to your [Comment Submission Form](comment/form.md). See below for the [CAPTCHA Code](#captcha-code).
33
36
34
-
## Member Registration Form
37
+
## Member Registration Forms
35
38
36
39
The necessary CAPTCHA code already exists in the Member Templates by default, so you should not need to add it. If you have a version of ExpressionEngine from before the CAPTCHA feature was added or if you otherwise need the code, see below for the [CAPTCHA Code](#captcha-code).
37
40
38
41
## Contact and Tell-a-Friend Email Forms
39
42
40
-
Once you have the preference turned on, you'll need to add the CAPTCHA code. See below for the [CAPTCHA Code](#captcha-code).
43
+
If you have CAPTCHAS required, you'll need to add the CAPTCHA code to these forms in order to submit properly. See below for the [CAPTCHA Code](#captcha-code).
44
+
45
+
## Channel Forms
46
+
47
+
If you have CAPTCHAS required, you'll need to add the CAPTCHA code to your [Channel Entry Form](channels/channel-form/overview.md#captcha). See below for the [CAPTCHA Code](#captcha-code).
41
48
42
49
## CAPTCHA Code
43
50
51
+
This is the code for Comment forms, Contact forms, and Channel Entry forms.
52
+
44
53
{if captcha}
45
54
<p>Please enter the word you see in the image below:</p>
The contents of the conditional {if captcha} tag will only appear if you have the CAPTCHA preference turned on for either the comment or member registration forms.
59
+
The contents of the conditional `{if captcha}` tag will be displayed if you:
60
+
61
+
- have the CAPTCHA setting turned on
62
+
- are not logged in as a superadmin (Superadmins never have to pass a CAPTCHA test)
63
+
- are not logged in (only if you have "Require CAPTCHA while logged in?" enabled)
64
+
65
+
The `{captcha}` tag itself will be an image tag if you are using the built-in CAPTCHA.
50
66
51
-
The code used inside the Member Registration Form is very similar, with only the omission of the {captcha_word} variable:
67
+
The code used in the Member Registration Form is very similar, with only the omission of the {captcha_word} variable:
52
68
53
69
{if captcha}
54
70
<p>Please enter the word you see in the image below:</p>
If using using [reCAPTCHA v3](security/captchas.md), use a simplified tag that will output the required javascript, with the CAPTCHA otherwise invisible.
75
+
If you are using [Google's reCAPTCHA v3](security/captchas.md), use this simplified code in all cases. The `{captcha}` tag will output the required JavaScript, the CAPTCHA is invisible, and there is no need for an input field.
60
76
61
77
{if captcha}
62
78
{captcha}
@@ -72,7 +88,7 @@ For ExpressionEngine installations that power multiple domains or subdomains, yo
72
88
73
89
## CAPTCHA Words
74
90
75
-
The CAPTCHA system uses a default dictionary. You can override these by adding a special user config file and returning an array of words you want to use instead. Create a PHP file at `system/user/config/captcha.php` with the format:
91
+
The CAPTCHA system uses a default dictionary. You can override these by adding a special user config file that returns an array of words you want to use instead. Create a PHP file at `system/user/config/captcha.php` with the format:
0 commit comments