Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-8007

Captcha using Ajax does not take into account the current siteaccess

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Customer request
    • 3.3.37, 4.5.6, 4.6.2
    • None
    • None
    • Yes

    Description

      Steps to reproduce

      1. Install Ibexa DXP
      2. Configure captcha to use ajax
      form_builder: captcha: use_ajax: true  
      1. Configure siteaccess match 
      match: 
          Compound\LogicalAnd: 
              site: 
                  matchers: 
                      Map\Host: 
                          hostname: true
                      Map\URI: 
                          site: true  
      1. Create a Form with captcha
      2. Go to hostname/site/forms/name_form
      3. Check what link was used to generate the captcha

       

      Result

      To generate captacha we use URL /form/captcha/get-url/{id}. which in some cases may cause an error - for example, the main siteaccess requires login

       

      Expected

      We should include in URL siteaccess URI in this case: /site/form/captcha/get-url/{id} 

       

      Note

      Problem comes from ibexa/form-builder/src/bundle/Resources/public/js/fieldType/captcha.js. In this file we used hardcore URL: 

      const request = new Request(`/form/captcha/get-url/${fieldId}` 

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              mateusz.debinski@ibexa.co Mateusz Dębiński
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: