Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-13814

User Self Service reCAPTCHA Feature Broken

    XMLWordPrintable

    Details

    • 2018.14 - Bronze

      Description

      The reCAPTCHA feature built into User Self Service is currently broken in multiple places, both client and API.

      Steps to Reproduce

      1. Create a new realm.
      2. Create a User Self Service on the new realm (using defaults, and enable User Registration)
      3. Enter the test reCAPTCHA site and secret key as detailed in https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do
      4. Enable reCAPTCHA for User Registration
      5. Logout, and in a new browser session navigate to the login page for the newly created realm
      6. Click "Register as a new User" and you will be navigated to reCAPTCHA page
      7. Click the reCAPTCHA check box

      Expected Behaviour
      After a short pause, you are redirected to the User Details pages.

      Actual Behaviour
      A JavaScript promise error is thrown from the reCAPTCHA library.
      When the JS error is resolved, the API throws a HTTP 500 error during submission is the form.

      Workaround
      None.

      Code Analysis
      For the client side, the handleCaptchaCallback function within the captcha templates makes use of old RequireJS require which no longer works in AM 6+. No tests cover this functionality so this was never detected. The client requires a simple change to use native JS to resolve this issue.

      For the API, I was unable to go back far enough to find if this worked pre-Webpack changes (building 5.5.0 wasn't possible).

        Attachments

          Activity

            People

            phil.ostler Phil Ostler [X] (Inactive)
            phil.ostler Phil Ostler [X] (Inactive)
            Filip Kubáň [X] Filip Kubáň [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: