Plugin Directory

Changeset 3452003


Ignore:
Timestamp:
02/02/2026 11:33:18 AM (5 weeks ago)
Author:
quantumcloud
Message:

Improved security

Location:
chatbot
Files:
388 added
7 edited

Legend:

Unmodified
Added
Removed
  • chatbot/trunk/functions.php

    r3421666 r3452003  
    17041704function qcld_wb_chatbot_session_count(){
    17051705    // Nonce is checked, get the POST data and sign user on
     1706    check_ajax_referer( 'wp_chatbot', 'nonce' );
    17061707    global $wpdb;
    17071708    $wpdb->show_errors = true;
  • chatbot/trunk/includes/integration/gemini/qcld-bot-gemini.php

    r3438380 r3452003  
    115115                    wp_send_json(array('success' => false, 'msg' => esc_html__('Failed in Security check', 'chatbot')));
    116116                    wp_die();
    117                 } else {
     117                } elseif ( ! current_user_can( 'manage_options' ) ) {
     118                    wp_send_json( array( 'success' => false, 'msg' => esc_html__( 'Unauthorized user', 'chatbot' ) ) );
     119                    wp_die();
     120                } else {
    118121                    $gemini_api_key = sanitize_text_field($_POST['gemini_api_key']);
    119122                    $gemini_enabled = sanitize_text_field($_POST['gemini_enabled']);
  • chatbot/trunk/includes/integration/openai/qcld-bot-openai.php

    r3444025 r3452003  
    835835                wp_die();
    836836
     837            } elseif ( ! current_user_can( 'manage_options' ) ) {
     838                wp_send_json(
     839                    array(
     840                        'success' => false,
     841                        'msg'     => esc_html__( 'Unauthorized user', 'chatbot' ),
     842                    )
     843                );
     844                wp_die();
    837845            } else {
    838846                $gptkeyword = array();
  • chatbot/trunk/includes/integration/openrouter/qcld-bot-openrouter.php

    r3438380 r3452003  
    117117                    wp_send_json(array('success' => false, 'msg' => esc_html__('Failed in Security check', 'chatbot')));
    118118                    wp_die();
    119                 } else {
     119                } elseif ( ! current_user_can( 'manage_options' ) ) {
     120                    wp_send_json( array( 'success' => false, 'msg' => esc_html__( 'Unauthorized user', 'chatbot' ) ) );
     121                    wp_die();
     122                } else {
    120123                    $openrouter_api_key = sanitize_text_field($_POST['openrouter_api_key']);
    121124                    $openrouter_model = sanitize_text_field($_POST['openrouter_model']);
  • chatbot/trunk/qc-rating-feature/qc-rating-class.php

    r3404982 r3452003  
    3333       
    3434        public function blackfriday_notice_dismiss(){
     35            if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wp_chatbot' ) ) {
     36                wp_send_json_error( array( 'message' => 'Security check failed.' ) );
     37            }
     38            if ( ! current_user_can( 'manage_options' ) ) {
     39                wp_send_json_error( array( 'message' => 'Unauthorized.' ) );
     40            }
    3541            update_option('wpbot-admin-notice-blackfriday', 'hide');
    3642            die(0);
    3743        }
    3844        public function notice_dismiss(){
     45            if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wp_chatbot' ) ) {
     46                wp_send_json_error( array( 'message' => 'Security check failed.' ) );
     47            }
     48            if ( ! current_user_can( 'manage_options' ) ) {
     49                wp_send_json_error( array( 'message' => 'Unauthorized.' ) );
     50            }
    3951            update_option('wpbot-admin-notice-oninstallation', 'hide');
    4052            die(0);
  • chatbot/trunk/qcld-wpwbot.php

    r3445532 r3452003  
    55 * Description: ChatBot is a native WordPress ChatBot plugin to provide live chat support and lead generation
    66 * Donate link: https://www.wpbot.pro/
    7  * Version: 7.7.3
     7 * Version: 7.7.4
    88 * @author    QuantumCloud
    99 * Author: ChatBot for WordPress - WPBot
     
    4242
    4343if ( ! defined( 'QCLD_wpCHATBOT_VERSION' ) ) {
    44     define('QCLD_wpCHATBOT_VERSION', '7.7.3');
     44    define('QCLD_wpCHATBOT_VERSION', '7.7.4');
    4545}
    4646if ( ! defined( 'QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION' ) ) {
  • chatbot/trunk/readme.txt

    r3445532 r3452003  
    55Requires at least: 4.6
    66Tested up to: 6.9
    7 Stable tag: 7.7.3
     7Stable tag: 7.7.4
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    360360== Changelog ==
    361361
     362= 7.7.4 =
     363# Improved security
     364
    362365= 7.7.3 =
    363366# Fixed some CSS conflicts
Note: See TracChangeset for help on using the changeset viewer.