Configuring reCAPTCHA v2 in Liferay Portal 6.2 EE

This article outlines how to configure reCAPTCHA version 2 in Liferay Portal 6.2.  Google is sunsetting reCAPTCHA v1 and as of March 2018 all v1 API calls will no longer work.

In response to this "End of Life" announcement, Liferay Portal 6.2 EE has been updated in LPS-55941 (LPE-16253) to include reCAPTCHA version 2.  Liferay Digital Enterprise already utilizes reCAPTCHA v2.


To Utilize reCAPTCHA v2 in Liferay Portal 6.2 EE

  1. Install Fix Pack Portal-164 

  2. Stop the server and install fixpack portal-164 or higher.  Do not restart the server.

  3. If this is a production site, request a public and private key from Google for your specific domain by completing the instructions here:

  4. If this is a non-production environment, please visit Google’s reCAPTCHA support site to receive testing keys:

  5. Backup the existing file.

  6. Modify the to utilize the reCAPTCHA engine and the Google provided keys from step 2 or 3 (The captcha.engine.recaptcha.url.* properties are modified as part of the upgrade and are included below for reference.  These properties do not require user configuration).

       # Set the engine used to generate captchas. reCAPTCHA uses an external
       # service that must be configured independently but provides an audible
       # alternative which makes the captcha accessible to the visually impaired.
       # See for details.
       # reCAPTCHA
  7. If captcha is desired for account creation, password resets, or message board activity, then modify the portal-ext to configure the desired captcha checks.  The default portal properties are listed below and should be modified to fit your needs:
       # Set the maximum number of captcha checks per portlet session. Set this
       # value to 0 to always check. Set this value to a number less than 0 to
       # never check. Unauthenticated users will always be checked on every request
       # if captcha checks is enabled.
       # Set whether or not to use captcha checks for the following actions.
  8. Save the portal-ext file and restart the server.

  9. If this is the first time interacting with a reCAPTCHA request after installing the fixpack, then users must clear their browser cache to ensure the request functions properly.

Note: If it is necessary to uninstall Fix Pack Portal-164, then restoring the previous version of the portal-ext is also necessary.  The v1 reCAPTCHA keys will need to replace the v2 reCAPTCHA keys added in step 6 for reCAPTCHA requests to function properly.

1 人中有 1 人觉得有帮助