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/Hooks/ReviewHooks.php +10 -0 3.0.6 → 3.0.16 View file →
@@ -139,8 +139,18 @@
139 139 if (!wp_verify_nonce($_POST['nonce'] ?? '', 'yatra_enquiry_nonce')) {
140 140 wp_send_json_error(['message' => __('Security check failed.', 'yatra')]);
141 141 }
142 142
143 + // reCAPTCHA v3 (no-op unless the enquiry form is protected in settings).
144 + $recaptcha = \Yatra\Services\RecaptchaService::verifyForm(
145 + 'enquiry',
146 + (string) ($_POST['recaptcha_token'] ?? ''),
147 + $_SERVER['REMOTE_ADDR'] ?? null
148 + );
149 + if (empty($recaptcha['success'])) {
150 + wp_send_json_error(['message' => $recaptcha['message'] ?? __('reCAPTCHA verification failed.', 'yatra')]);
151 + }
152 +
143 153 // Validate required fields
144 154 $name = sanitize_text_field($_POST['name'] ?? '');
145 155 $email = sanitize_email($_POST['email'] ?? '');
146 156 $phone = sanitize_text_field($_POST['phone'] ?? '');