CAPTCHA widget disappears after form submission
How To articles are not official guidelines or officially
supporteddocumentation. They are community-contributed content and may
not alwaysreflect the latest updates to Liferay DXP. We welcome your
feedback toimprove How to articles!
While we make every effort to ensure this Knowledge Base is accurate,
itmay not always reflect the most recent updates or official
guidelines.We appreciate your understanding and encourage you to reach
out with anyfeedback or concerns.
Legacy Article
You are viewing an article from our legacy
"FastTrack"publication program, made available for
informational purposes. Articlesin this program were published without a
requirement for independentediting or verification and are provided
"as is" withoutguarantee.
Before using any information from this article, independently verify
itssuitability for your situation and project.
Issue
- For a form with the CAPTCHA enabled for submission, after the form is submitted, the CAPTCHA will disappear. This issue only occurs for a user who is logged in. If the guest user is submitting the form (i.e. no user is logged in), the CAPTCHA will reappear after each submission.
Environment
- This issue affects Liferay 7.1+
Resolution
- The reason this occurs is that Liferay sets the maximum number of CAPTCHA checks that are required per portal session. By default, this value is set to 1, which means that if you are logged in to the site, during that portal session, you will only have to submit the CAPTCHA 1 time.
- You can control the maximum number of CAPTCHA checks per portal session by going to Control Panel -> System Settings -> Security Tools and changing the value for Maximum Challenges.
- If you set this value to 0, it will always run a CAPTCHA check on every form submission.
- If you set the value to a number less than 0, it will never run a CAPTCHA check for form submission for authenticated users.
- Unauthenticated users will always be checked on every form submission if CAPTCHA checks is enabled.
Did this article resolve your issue ?