feat(captcha): add provider-based captcha support (Google v3 + Cloudflare Turnstile)#2364
Open
NullSablex wants to merge 1 commit intoLiveHelperChat:masterfrom
Open
feat(captcha): add provider-based captcha support (Google v3 + Cloudflare Turnstile)#2364NullSablex wants to merge 1 commit intoLiveHelperChat:masterfrom
NullSablex wants to merge 1 commit intoLiveHelperChat:masterfrom
Conversation
…lare Turnstile) - Add centralized captcha settings/validation methods in `erLhcoreClassUserValidator`: `getCaptchaSettings`, `validateAuthCaptcha`, `verifyGoogleRecaptchaV3`, `verifyCloudflareTurnstile`, and `postCaptchaVerifyRequest`. - Replace inline captcha verification in `modules/lhuser/login.php` and `modules/lhuser/forgotpassword.php` with shared validation. - Update auth captcha error handling to use the generic string `Captcha validation failed`. - Extend `system/recaptcha` admin handling with provider support (`google`/`turnstile`), new Turnstile fields, and CSRF redirect fix to `system/recaptcha`. - Update captcha admin template with provider selector and provider-specific sections; use shared key labels (`Site key` / `Secret key`) in both provider blocks. - Update shared captcha rendering template to support: Google v3 token flow and Cloudflare Turnstile widget flow. - Set explicit captcha actions in auth templates: `login_action` and `forgot_password_action`. - Update install defaults (`modules/lhinstall/install.php`, `cli/lib/install.php`) to include provider and Turnstile keys in `recaptcha_data`. - Update translation catalogs (`doc/translation_default/translation_web.ts`, `translations/*/translation.ts`, including `translations/en_EN/translation.ts`) with the new captcha-related keys used by these changes.
Author
|
Peço desculpas caso haja erros; esta é a minha primeira contribuição pública em algum projeto. I apologize in case there are any mistakes; this is my first public contribution to a project. |
Contributor
|
Hi, Thanks for effort, I'll try to review during this/next week :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
erLhcoreClassUserValidator:getCaptchaSettings,validateAuthCaptcha,verifyGoogleRecaptchaV3,verifyCloudflareTurnstile, andpostCaptchaVerifyRequest.modules/lhuser/login.phpandmodules/lhuser/forgotpassword.phpwith shared validation.Captcha validation failed.system/recaptchaadmin handling with provider support (google/turnstile),new Turnstile fields, and CSRF redirect fix to
system/recaptcha.use shared key labels (
Site key/Secret key) in both provider blocks.Google v3 token flow and Cloudflare Turnstile widget flow.
login_actionandforgot_password_action.modules/lhinstall/install.php,cli/lib/install.php)to include provider and Turnstile keys in
recaptcha_data.doc/translation_default/translation_web.ts,translations/*/translation.ts, includingtranslations/en_EN/translation.ts)with the new captcha-related keys used by these changes.