Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3441

portal:captcha ReCaptcha fails to render on ajax on Liferay 7.0 + FP81

    Details

      Description

      This issue is caused by the fact that the fix for MOJARRA #4345 is inadequate since it does not decode html entites that use character codes such as / or /.

      Steps to reproduce:

      1. Add the following config to portal-ext.properties:
        captcha.engine.impl=com.liferay.captcha.recaptcha.ReCaptchaImpl
        captcha.engine.recaptcha.key.private=#YOUR PRIVATE KEY#
        captcha.engine.recaptcha.key.public=#YOUR PUBLIC KEY#
        
      2. Deploy the Liferay Portal Showcase.
      3. Navigate to the portal:captcha General example.
      4. Click the ReCaptcha checkbox.
      5. Click submit.

      If the bug still exists, the ReCaptcha will not reapper and the following error message will appear in the logs:

      2019-05-14 16:53:55.120 ERROR [http-nio-8080-exec-1][render_portlet_jsp:131] null
      javax.faces.view.facelets.TagAttributeException: /views/component.xhtml @42,164 <ui:include src="/WEB-INF/component/#{selectedComponentPrefix}/#{selectedComponentLowerCaseName}/#{selectedComponentUseCaseName}/#{selectedComponentCamelCaseName}.xhtml"> Invalid path : /WEB-INF/component/portal/captcha/https&/captcha.xhtml
              at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:129)
              at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
              at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:106)
              at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:206)
              at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
              at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
              at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:111)
              at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
              at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
              at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
              at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
              at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
              at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
              at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
              at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
              at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
              at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
              at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
              at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
              at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:194)
      

      If the bug is fixed, the ReCaptcha will reappear and the error will not appear in the logs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kyle.stiemann Kyle Stiemann (Inactive)
                Reporter:
                kyle.stiemann Kyle Stiemann (Inactive)
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  portal-3.0.4