PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.2.2
MxChat – AI Chatbot & Content Generation for WordPress v3.2.2
3.2.21 3.2.20 3.2.19 3.2.18 3.2.17 3.2.16 3.2.15 3.2.14 3.2.12 3.2.13 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 2.0.3 2.0.4 2.0.5 2.0.6 All 152 releases
← All changes | includes/class-mxchat-word-handler.php +2 -7 3.2.123.2.2 View file →
@@ -15,15 +15,10 @@
15 15 /**
16 16 * Handle Word document upload and processing
17 17 */
18 18 public function mxchat_handle_word_upload() {
19 - // Match the PDF handler's nonce verification: the widget sends the chat-send
20 - // nonce (action 'mxchat_chat_send'), which the old check_ajax_referer('mxchat_chat_nonce')
21 - // rejected with -1. mxchat_verify_chat_send_nonce accepts both chat-send and chat nonces.
22 - if (!isset($_POST['nonce']) || !MxChat_Integrator::mxchat_verify_chat_send_nonce(wp_unslash((string) $_POST['nonce']))) {
23 - wp_send_json_error(array('message' => esc_html__('Invalid nonce.', 'mxchat')), 403);
24 - }
25 -
19 + check_ajax_referer('mxchat_chat_nonce', 'nonce');
20 +
26 21 if (!isset($_FILES['word_file']) || !isset($_POST['session_id'])) {
27 22 wp_send_json_error(esc_html__('Missing required parameters.', 'mxchat'));
28 23 return;
29 24 }