Files
XC_VM/src/core
Divarion-D fc9d01709a fix(auth): make reCAPTCHA verification crash-proof and reachable
reCAPTCHA verification fetched Google's siteverify endpoint with
file_get_contents(). When the host could not reach Google the call
returned false and json_decode(false) threw a TypeError, white-screening
the admin and reseller login POST — resellers could fill the form but
never actually log in.

- Replace file_get_contents with cURL (works where the https stream
  wrapper / allow_url_fopen does not) with connect/total timeouts
- Guard against false/malformed responses; never fatal — fail closed
- Log the exact failure reason (Google error-codes or cURL error)
- Fix inverted bypass condition in admin login that left reCAPTCHA active
  on rescue/setup codes and disabled it on normal login
- Rewrite the login-button enable callback in vanilla JS (was depending
  on jQuery $) and add an expired-callback, on admin and reseller login
- Add `console.php tools recaptcha` to disable reCAPTCHA from the CLI as
  an emergency recovery path; show full tools help to any user

Fixes #119
2026-06-21 12:21:37 +03:00
..