PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Controllers/AuthController.php +13 -0 3.0.5.1 → 3.0.16 View file →
@@ -293,8 +293,21 @@
293 293 'message' => __('New customer registration is disabled.', 'yatra'),
294 294 ], 403);
295 295 }
296 296
297 + // reCAPTCHA v3 (no-op unless the registration form is protected in settings).
298 + $recaptcha = \Yatra\Services\RecaptchaService::verifyForm(
299 + 'registration',
300 + (string) ($request->get_param('recaptcha_token') ?? ''),
301 + $_SERVER['REMOTE_ADDR'] ?? null
302 + );
303 + if (empty($recaptcha['success'])) {
304 + return new \WP_REST_Response([
305 + 'success' => false,
306 + 'message' => $recaptcha['message'] ?? __('reCAPTCHA verification failed.', 'yatra'),
307 + ], 400);
308 + }
309 +
297 310 $first_name = sanitize_text_field($request->get_param('first_name') ?? '');
298 311 $last_name = sanitize_text_field($request->get_param('last_name') ?? '');
299 312 $email = sanitize_email($request->get_param('email') ?? '');
300 313 $phone = sanitize_text_field($request->get_param('phone') ?? '');