Google recaptcha reloading

Good afternoon.
I have the same problem.
Here are the logs when accessing the site.
The Docker container is new. I haven’t made any changes. I only added recaptcha keys.
At the end of the log, you can see how I am trying to pass the captcha from 188.127.255.9.
I click the “I am not a robot” button, but nothing happens.

Hi @Evgen, I can’t seem to find the logs you provided.

Here is a portion of the logs from docker compose logs.
If you require anything else, please let me know.

https://github.com/user-attachments/files/23448499/1.txt

https://github.com/user-attachments/files/23448498/docker-compose.yaml

Bug in the antibot.lua file (code fix)

File inside the container:
/usr/share/bunkerweb/core/antibot/antibot.lua

Fix A — incorrect variable when parsing the response

Find (approximately line 627):
if self.session_data.recaptcha_classic then

Replace with:
if self.variables[“ANTIBOT_RECAPTCHA_CLASSIC”] == “yes” then

Why: The source code checks self.session_data.recaptcha_classic, but this field is never set — it is always nil. Because of this, even in classic
mode, the response from Google is parsed as Enterprise format (tokenProperties.valid), and the classic API simply returns {“success”: true} — the parser does not find
tokenProperties and considers the challenge failed.

Fix B — default score for classic reCAPTCHA

Find (immediately after fix A, ~line 629):
score = rdata.score or 0

Replace with:
score = rdata.score or 1

Important: only the first occurrence needs to be changed (in the if … “yes” then branch for classic). Leave the second occurrence (in the else branch for Enterprise) as or 0.

Why: Classic reCAPTCHA v2 does not return the score field — only success: true/false. Without score, the default value is 0, which is below the threshold
ANTIBOT_RECAPTCHA_SCORE (default 0.7) — and the challenge fails even when success = true.


How to apply

1. Copy the file from the container

docker cp bunkerweb-bunkerweb-1:/usr/share/bunkerweb/core/antibot/antibot.lua /tmp/antibot.lua

2. Make corrections (manually or with sed)

Correction A:

sed -i ‘s/self.session_data.recaptcha_classic/self.variables[“ANTIBOT_RECAPTCHA_CLASSIC”] == “yes”/’ /tmp/antibot.lua

Fix B (only the first occurrence — in the classic branch):

Manually in the editor: find the first “score = rdata.score or 0” and replace 0 with 1

3. Copy back

docker cp /tmp/antibot.lua bunkerweb-bunkerweb-1:/usr/share/bunkerweb/core/antibot/antibot.lua

4. Restart nginx

docker exec bunkerweb-bunkerweb-1 nginx -s reload

Note: when recreating the container (docker compose up -d), the changes will be lost. For a permanent fix, mount the corrected file via volume in
docker-compose.yaml:

services:
bunkerweb:
volumes:

  • ./antibot.lua:/usr/share/bunkerweb/core/antibot/antibot.lua:ro

root@fire:/home/docker/bunkerweb# ls -la
total 76
-r-xr-x— 1 root lxd 29079 Feb 19 13:57 antibot.lua

Now root:nginx is the same as the other files. Restarting the container.