hCaptcha / hcaptcha-wordpress-plugin

hCaptcha.com support for Wordpress (Plugin)
GNU General Public License v2.0
79 stars 32 forks source link

Checkbox not loaded in Firefox in some scenarios - likely user plugin related #342

Closed emp-irium closed 1 month ago

emp-irium commented 3 months ago

Hello,

We've recently implemented your plugin on one of our client websites and it work properly in Edge, Chrome/Brave, but doesn't seem to work at all in Firefox. For example, when attempting to login to the WP dashboard via Firefox you cannot do it as it never shows the hcaptcha that otherwise is shown in other browsers. The same is true when trying to comment on forms - attempting to post a comment simply loads a new page and shows an error message.

We've contacted your support and they forwarded us to your github. They told us to include the HAR files of the site. Since HAR is not supported we printed it into PDF through Notepad++

BRAVE-stelacavric.com.pdf EDGE-stelacavric.com.pdf FIREFOX-stelacavric.com.pdf

If you need any further information, let us know :)!

kagg-design commented 3 months ago

I tried the page https://stelacavric.com/wp-login.php in Firefox and saw that it is working. It contains hidden forced hCaptcha, and I saw the hCaptcha upon the click on the Log In button:

image

Could you clarify the issue?

P.S. Also, you can try to deactivate temporary some plugins on your website, to understand the culprit.

emp-irium commented 3 months ago

Hello,

Nope, still not working on our side. The pop up with images never shows and it just says incorrect username / password. We also visited this site here that uses hcaptcha: Link

All of the captchas in Firefox just look like this (image below), unable to be used (the same way it would look on the stelacavric website if the captcha wasn't set as hidden):

Screenshot 2024-06-16 at 11-07-35 Contact Form 7 Module – Divi Supreme

We'll try again with disabling plugins 🤔

kagg-design commented 3 months ago

I see the issue. Firefox does not react to mouse events and the hCaptcha API script is not loaded. As a workaround, set the "Delay showing hCaptcha, ms" to 0 or any positive value.

image

A working example is on my test site.

I will try to fix the Firefox issue.

kagg-design commented 3 months ago

Let us not discuss 3rd-party sites which we do not have access to. The https://divisupreme.com/features/contact-form-7-module/ page is built using wp rocket, whose lazy load feature often breaks the script loading sequence. See errors in the console:

ReferenceError: wp is not defined (without wp global object nothing can work) [hCaptcha] Callback 'hCaptchaOnLoad' is not defined. (broken script loading order)

kagg-design commented 3 months ago

I have fixed the issue. It will be published at the beginning of July. So far, you can check it here: https://test.kagg.eu/wp-login.php

Thank you for reporting!

kagg-design commented 2 months ago

v4.3.1 with the relevant fix is released.

emp-irium commented 1 month ago

Hello again,

We waited for the update and to check out the situation for quite some time - even waited for another update - but the issue persists. We are unable to verify that hcaptcha works while using Firefox. Even the login link you presented results in this screen:

screenshot-issue

In other words, the hcaptcha frame cannot be interacted with and thus makes it impossible to verify any login or comment reply through forms.

What else can be done?

kagg-design commented 1 month ago

Screenshot from the link mentioned above made right now:

image

Do you have errors in the Firefox console? Which version of Firefox do you use? Could you try to turn off all browser extensions?

emp-irium commented 1 month ago

Hello, you were correct it was related to extensions within Firefox.

For some reason the "NoScript" plugin disabled the hcaptcha from working properly even though it was allowed within the options that can be accessed while on the main screen of Firefox. The only way to truly bypass it was to go within the settings of the NoScript extension and individually make hcaptcha "trusted".

On a side note, the extension Ghostery removes the notice on the bottom of the page "By proceeding you understand...", just to let people know if they experience the same thing.

🔎 To conclude:

First, there was the issue with Firefox not properly reacting with delay as you said (resulting in hcaptcha not loading at all or being responsive on interaction), the second part was an extension issue within Firefox.

Overall, it seems to work now 👏 Thank you a lot for taking the time to look into this issue 🤗

📧 Please look into the MailPoet issue we also opened - it started appearing with the latest update of both plugins (hcaptcha and mailpoet)