Plugin Directory

Changeset 2830879


Ignore:
Timestamp:
12/09/2022 02:37:10 AM (3 years ago)
Author:
Goback2
Message:

Edit ver 2.9.4

Location:
pardakht-delkhah
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • pardakht-delkhah/tags/2.9.4/admin-export.php

    r2829835 r2830879  
    1111        //any message to show?
    1212        if (isset($_POST['cupri_export_msg']) && !empty($_POST['cupri_export_msg'])) {
    13             $cupri_export_msg = esc_attr($_POST['cupri_export_msg']);
     13            $cupri_export_msg = sanitize_text_field($_POST['cupri_export_msg']);
    1414            echo '<div class="notice"><p>' . $cupri_export_msg . '</p></div>';
    1515
  • pardakht-delkhah/tags/2.9.4/admin-settings.php

    r2829835 r2830879  
    7373                    {
    7474                        $_POST['cupri_general']['form_color'] = sanitize_text_field($_POST['cupri_general']['form_color']);
    75                         $_POST['cupri_general']['form_color'] = esc_sql($_POST['cupri_general']['form_color']);
    76                         $_POST['cupri_general']['form_color'] = esc_html($_POST['cupri_general']['form_color']);
    77 
    7875                    }
    7976                    break;
  • pardakht-delkhah/tags/2.9.4/cupri.php

    r2829835 r2830879  
    430430        } else {
    431431            $min_price = $_cupri['min']['price'];
    432             $entered_price = $_POST['cupri_fprice'];
     432            $entered_price = sanitize_text_field($_POST['cupri_fprice']);
    433433            if (!empty($min_price) && $entered_price < $min_price) {
    434434                $errors[] = __('Minimum price is : ', 'cupri') . $min_price;
    435435            }
    436 //            if (!is_numeric(_wpm_persian_digit_to_eng($_POST['cupri_fprice']))) {
    437 //                $errors[] = __('Price value is not correct ', 'cupri') . $min_price;
    438 //            }
     436            if (!is_numeric(_wpm_persian_digit_to_eng($_POST['cupri_fprice']))) {
     437                $errors[] = __('Price value is not correct ', 'cupri') . $min_price;
     438            }
    439439        }
    440440
     
    458458        $cupri_femail = isset($_POST['cupri_femail']) ? sanitize_email($_POST['cupri_femail']) : '';
    459459        if ($_cupri['required'][$wc_cf_key] == 1 && isset($_POST['cupri_femail']) && !empty($_POST['cupri_femail'])) {
    460             $email = filter_var($_POST['cupri_femail'], FILTER_VALIDATE_EMAIL);
     460            $email = sanitize_email($_POST['cupri_femail']);
     461            $email = filter_var($email, FILTER_VALIDATE_EMAIL);
    461462            if (!$email) {
    462463                $errors[] = __('Entered email is not correct ', 'cupri');
     
    470471            echo '<ul class="alert alert-warning cupri-errors">';
    471472            foreach ($errors as $_err) {
    472                 echo('<li >- ' . $_err . '</li>');
     473                echo('<li >- ' . esc_html($_err) . '</li>');
    473474
    474475            }
  • pardakht-delkhah/tags/2.9.4/extra.php

    r2829835 r2830879  
    8282    if ($column == 'result_code') {
    8383        $result_code = get_post_meta($post_id, '_cupri_result_code', true);
    84         echo $result_code = (empty($result_code) ? '-' : $result_code);
     84        $result_code = (empty($result_code) ? '-' : $result_code);
     85        echo esc_html($result_code);
    8586
    8687
     
    542543    }
    543544    if (!isset($_POST['post_id'])) return;
    544     $post_id = $_POST['post_id'];
    545     if (empty($post_id)) return;
    546     $post_id = (int)$post_id;
     545    $post_id = (int)$_POST['post_id'];
     546    if (empty($post_id) || $post_id == 0) return;
    547547    echo json_encode(array('ok' => 'ok'));
    548548    wp_delete_post($post_id, true);
  • pardakht-delkhah/tags/2.9.4/readme.txt

    r2829835 r2830879  
    5959== Changelog ==
    6060= 2.9.4 =
    61 * some other security fix
     61* some other fix
    6262= 2.9.3 =
    63 * XSS security fix
     63* some fix
    6464= 2.9.2 =
    6565* بررسی وجود nusoap قبل از افزودن برای جلوگیری از تداخل با دیگر افزونه ها
  • pardakht-delkhah/tags/2.9.4/shortcode.php

    r2829835 r2830879  
    187187        echo '<label class="cupri_tbl cupri_f' . esc_html($wc_cf_key) . '">';
    188188        echo '<span class="cupri_input_title">';
    189         echo '<span>' . $_cupri['name'][$wc_cf_key];
     189        echo '<span>' . esc_html($_cupri['name'][$wc_cf_key]);
    190190        if ($required) {
    191191            echo '<span style="color:red;font-weigth:bold;">*</span>';
  • pardakht-delkhah/trunk/admin-export.php

    r2829835 r2830879  
    1111        //any message to show?
    1212        if (isset($_POST['cupri_export_msg']) && !empty($_POST['cupri_export_msg'])) {
    13             $cupri_export_msg = esc_attr($_POST['cupri_export_msg']);
     13            $cupri_export_msg = sanitize_text_field($_POST['cupri_export_msg']);
    1414            echo '<div class="notice"><p>' . $cupri_export_msg . '</p></div>';
    1515
  • pardakht-delkhah/trunk/admin-settings.php

    r2829835 r2830879  
    7373                    {
    7474                        $_POST['cupri_general']['form_color'] = sanitize_text_field($_POST['cupri_general']['form_color']);
    75                         $_POST['cupri_general']['form_color'] = esc_sql($_POST['cupri_general']['form_color']);
    76                         $_POST['cupri_general']['form_color'] = esc_html($_POST['cupri_general']['form_color']);
    77 
    7875                    }
    7976                    break;
  • pardakht-delkhah/trunk/cupri.php

    r2829835 r2830879  
    430430        } else {
    431431            $min_price = $_cupri['min']['price'];
    432             $entered_price = $_POST['cupri_fprice'];
     432            $entered_price = sanitize_text_field($_POST['cupri_fprice']);
    433433            if (!empty($min_price) && $entered_price < $min_price) {
    434434                $errors[] = __('Minimum price is : ', 'cupri') . $min_price;
    435435            }
    436 //            if (!is_numeric(_wpm_persian_digit_to_eng($_POST['cupri_fprice']))) {
    437 //                $errors[] = __('Price value is not correct ', 'cupri') . $min_price;
    438 //            }
     436            if (!is_numeric(_wpm_persian_digit_to_eng($_POST['cupri_fprice']))) {
     437                $errors[] = __('Price value is not correct ', 'cupri') . $min_price;
     438            }
    439439        }
    440440
     
    458458        $cupri_femail = isset($_POST['cupri_femail']) ? sanitize_email($_POST['cupri_femail']) : '';
    459459        if ($_cupri['required'][$wc_cf_key] == 1 && isset($_POST['cupri_femail']) && !empty($_POST['cupri_femail'])) {
    460             $email = filter_var($_POST['cupri_femail'], FILTER_VALIDATE_EMAIL);
     460            $email = sanitize_email($_POST['cupri_femail']);
     461            $email = filter_var($email, FILTER_VALIDATE_EMAIL);
    461462            if (!$email) {
    462463                $errors[] = __('Entered email is not correct ', 'cupri');
     
    470471            echo '<ul class="alert alert-warning cupri-errors">';
    471472            foreach ($errors as $_err) {
    472                 echo('<li >- ' . $_err . '</li>');
     473                echo('<li >- ' . esc_html($_err) . '</li>');
    473474
    474475            }
  • pardakht-delkhah/trunk/extra.php

    r2829835 r2830879  
    8282    if ($column == 'result_code') {
    8383        $result_code = get_post_meta($post_id, '_cupri_result_code', true);
    84         echo $result_code = (empty($result_code) ? '-' : $result_code);
     84        $result_code = (empty($result_code) ? '-' : $result_code);
     85        echo esc_html($result_code);
    8586
    8687
     
    542543    }
    543544    if (!isset($_POST['post_id'])) return;
    544     $post_id = $_POST['post_id'];
    545     if (empty($post_id)) return;
    546     $post_id = (int)$post_id;
     545    $post_id = (int)$_POST['post_id'];
     546    if (empty($post_id) || $post_id == 0) return;
    547547    echo json_encode(array('ok' => 'ok'));
    548548    wp_delete_post($post_id, true);
  • pardakht-delkhah/trunk/shortcode.php

    r2829835 r2830879  
    187187        echo '<label class="cupri_tbl cupri_f' . esc_html($wc_cf_key) . '">';
    188188        echo '<span class="cupri_input_title">';
    189         echo '<span>' . $_cupri['name'][$wc_cf_key];
     189        echo '<span>' . esc_html($_cupri['name'][$wc_cf_key]);
    190190        if ($required) {
    191191            echo '<span style="color:red;font-weigth:bold;">*</span>';
Note: See TracChangeset for help on using the changeset viewer.