Plugin Directory

Changeset 3013867


Ignore:
Timestamp:
12/24/2023 08:58:40 PM (2 years ago)
Author:
mdalabar
Message:

Releasing v2.4.7 (vulnerability fixed)

Location:
byconsole-woo-order-delivery-time/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • byconsole-woo-order-delivery-time/trunk/ByConsoleWooODT.php

    r2961224 r3013867  
    1212* Description: Let your buyers to choose if order to deliver or pickup along with their chosen date and time (Need to have Woocommerce installed first).
    1313
    14 * Version: 2.4.6
     14* Version: 2.4.7
    1515
    1616* Author: ByConsole
     
    20882088while(parseInt(next_slot_start_time_hour) <= parseInt(byc_delivery_end_time_hour)){
    20892089
    2090     console.log('inside while');
    2091 
    20922090    next_slot_end_time_minute = parseInt(next_slot_start_time_minute) + 30;
    20932091
    2094     console.log(next_slot_end_time_minute);
    2095 
    20962092    if(parseInt(next_slot_end_time_minute) > 60){
    20972093
     
    21262122            next_slot_end_time_minute = next_slot_end_time_minute;
    21272123
    2128             console.log('-----check here------');
    2129 
    2130             console.log(next_slot_end_time_minute);
    2131 
    21322124            }else{
    21332125
     
    21552147
    21562148        };
    2157 
    2158 console.log(object_literal);
    2159 
    2160 console.log('---------------------------------');       
    2161 
    21622149       
    21632150
     
    21732160
    21742161    }
    2175 
    2176 console.log('Printing final object');
    21772162
    21782163}//ByConsoleWooODTCreateSlot
     
    34353420add_action( 'admin_footer', 'ajax_without_file' );
    34363421
    3437 function ajax_without_file() { ?>
     3422function ajax_without_file() {
     3423
     3424$nonce_ajax_update_option=wp_create_nonce('nonce_ajax_update_option');
     3425
     3426?>
    34383427
    34393428    <script type="text/javascript" >
     
    34553444            var bycwooodt_field_name = jQuery(this).attr('name');
    34563445
    3457             //window.open('<?php echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit');
    3458 
    3459             //window.location ='<?php echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit';
     3446            //window.open('<?php //echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit');
     3447
     3448            //window.location ='<?php //echo get_admin_url();?>post.php?post=+'bycwooodt_field_name'+&action=edit';
    34603449
    34613450        });
     
    34653454            var byconsolewooodt_admin_fields_array = jQuery("form.byconsolewooodt_fields_form").serialize();           
    34663455
    3467             console.log(byconsolewooodt_admin_fields_array);   
     3456            //console.log(byconsolewooodt_admin_fields_array); 
    34683457
    34693458            var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id');   
     
    34833472            var byconsolewooodt_admin_fields_array = jQuery('form.byconsolewooodt_holiday_fields_form').serialize();           
    34843473
    3485             console.log(byconsolewooodt_admin_fields_array);   
     3474            //console.log(byconsolewooodt_admin_fields_array); 
    34863475
    34873476            var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id');   
     
    35033492            var byconsolewooodt_admin_fields_array = jQuery('form.byconsolewooodt_location_fields_form').serialize();           
    35043493
    3505             console.log(byconsolewooodt_admin_fields_array);
     3494            //console.log(byconsolewooodt_admin_fields_array);
    35063495
    35073496            var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id');
     
    35233512            var byconsolewooodt_admin_fields_array = jQuery("form.byconsolewooodt_language_fields_form").serialize();           
    35243513
    3525             console.log(byconsolewooodt_admin_fields_array);   
     3514            //console.log(byconsolewooodt_admin_fields_array); 
    35263515
    35273516            var bycwooodt_loader_image_id = jQuery(this).closest('label').find('.bycwooodt_admin_form_loader_display_image').attr('id');   
     
    35683557   
    35693558
    3570     function bycwooodt_all_fields_setting_function(byconsolewooodt_admin_fields_array,bycwooodt_admin_fields,bycwooodt_loader_image_id,bycwooodt_update_succesfully_image_id){
     3559    function bycwooodt_all_fields_setting_function(byconsolewooodt_admin_fields_array,bycwooodt_admin_fields,bycwooodt_loader_image_id,bycwooodt_update_succesfully_image_id,nonce_ajax_update_option){
    35713560
    35723561       
     
    36043593                'bycwooodt_admin_fields': bycwooodt_admin_fields ,// some additional data to send
    36053594
    3606                 'bycwooodt_admin_fields_val_array': byconsolewooodt_admin_fields_array
    3607 
     3595                'bycwooodt_admin_fields_val_array': byconsolewooodt_admin_fields_array,
     3596
     3597                'security': '<?php echo $nonce_ajax_update_option;?>'
     3598
     3599            };
     3600
     3601            //alert('Hi...' + bycwooodt_loader_image_id);
     3602
     3603            jQuery.ajax({
     3604
     3605                url: ajaxurl, // this will point to admin-ajax.php
     3606
     3607                type: 'POST',
     3608
     3609                data: dataVariable,
     3610
     3611                success: function (response) {
     3612
     3613                    console.log(response);
     3614
     3615                    jQuery("#"+bycwooodt_loader_image_id).css("display","none");
     3616
     3617                    jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","block");
     3618
     3619                    setTimeout(function() {
     3620
     3621                        jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","none");
     3622
     3623                    }, 4000);
     3624
     3625                   
     3626
     3627                }
     3628
     3629            });
     3630
     3631    }
     3632
     3633    </script>
     3634
     3635    <?php
     3636
     3637}
     3638
     3639add_action("wp_ajax_byconsolewooodt_admin_fields_setting_files" , "byconsolewooodt_admin_fields_setting_files");
     3640
     3641
     3642function byconsolewooodt_admin_fields_setting_files(){
     3643
     3644    global $wpdb;
     3645
     3646    global $woocommerce;   
     3647   
     3648    check_ajax_referer('nonce_ajax_update_option','security'); //@since 2.4.7
     3649   
     3650    $bycwooodt_admin_fields = $_POST['bycwooodt_admin_fields'];
     3651   
     3652    $bycwooodt_admin_fields = sanitize_text_field($bycwooodt_admin_fields);
     3653   
     3654   
     3655    $current_user = wp_get_current_user();
     3656   
     3657    if ( $current_user->has_cap('manage_options') ) { //@since 2.4.7
     3658       
     3659        if(in_array($bycwooodt_admin_fields,array("byconsolewooodt_odt_setting","byconsolewooodt_holidays_setting","byconsolewooodt_location_setting","bycwooodt_language_translate","byconsolewooodt_extra_options"))){   
     3660       
     3661        $bycwooodt_admin_fields_val_array = $_POST['bycwooodt_admin_fields_val_array'];
     3662       
     3663        parse_str($bycwooodt_admin_fields_val_array,$output);
     3664       
     3665        $santized_array = array();
     3666       
     3667        foreach($output as $key=>$val){
     3668           
     3669            $sanitized_key = sanitize_key($key);
     3670           
     3671            if(gettype($val)=='array'){
    36083672               
    3609 
    3610             };
    3611 
    3612             //alert('Hi...' + bycwooodt_loader_image_id);
    3613 
    3614             jQuery.ajax({
    3615 
    3616                 url: ajaxurl, // this will point to admin-ajax.php
    3617 
    3618                 type: 'POST',
    3619 
    3620                 data: dataVariable,
    3621 
    3622                 success: function (response) {
    3623 
    3624                     console.log(response);
    3625 
    3626                     jQuery("#"+bycwooodt_loader_image_id).css("display","none");
    3627 
    3628                     jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","block");
    3629 
    3630                     setTimeout(function() {
    3631 
    3632                         jQuery("#"+bycwooodt_update_succesfully_image_id).css("display","none");
    3633 
    3634                     }, 4000);
    3635 
     3673                $santized_array_array = array();
     3674               
     3675                foreach($val as $val_key=>$val_val){
    36363676                   
    3637 
    3638                 }
    3639 
    3640             });
     3677                    $sanitized_val_key = sanitize_key($val_key);
     3678                     
     3679                   
     3680                   
     3681                    if(gettype($val_val)=='array'){
     3682                       
     3683                        $santized_array_array_array = array();
     3684                       
     3685                        foreach($val_val as $val_val_kay=>$val_val_val){
     3686                           
     3687                            $sanitized_val_val_key = sanitize_key($val_val_key);
     3688           
     3689                            $sanitized_val_val_val = sanitize_text_field($val_val_val);
     3690                     
     3691                            $santized_array_array_array[$val_val_key] = $sanitized_val_val_val;
     3692                           
     3693                            }
     3694                           
     3695                            $sanitized_val_val = $santized_array_array_array; //////////////////
     3696                       
     3697                        }else{
     3698                           
     3699                            $sanitized_val_val = sanitize_text_field($val_val);
     3700                           
     3701                            }
     3702                           
     3703                        $santized_array_array[$val_key] = $sanitized_val_val;
     3704                   
     3705                    }
     3706                   
     3707                $sanitized_val = $santized_array_array; ////////////////////////
     3708               
     3709                }else{
     3710                   
     3711                    $sanitized_val = sanitize_text_field($val);
     3712                   
     3713                    }
     3714           
     3715            $santized_array[$sanitized_key] = $sanitized_val;
     3716           
     3717            }
     3718           
     3719       
     3720        $serialized_santized_array=serialize($santized_array);
     3721       
     3722        if(!is_serialized($serialized_santized_array)){ //@since 2.4.7
     3723           
     3724            $bycwooodt_admin_fields_val_array=maybe_serialize($serialized_santized_array);
     3725            }
     3726
     3727        update_option($bycwooodt_admin_fields, $bycwooodt_admin_fields_val_array );
     3728       
     3729        wp_die();
     3730   
     3731        }
    36413732
    36423733    }
    36433734
    3644     </script>
    3645 
    3646     <?php
    3647 
    3648 }
    3649 
    3650 
    3651 add_action("wp_ajax_byconsolewooodt_admin_fields_setting_files" , "byconsolewooodt_admin_fields_setting_files");
    3652 
    3653 function byconsolewooodt_admin_fields_setting_files(){
    3654 
    3655     global $wpdb;
    3656 
    3657     global $woocommerce;   
    3658 
    3659     //echo json_encode($_POST);
    3660 
    3661     $bycwooodt_admin_fields = $_POST['bycwooodt_admin_fields'];
    3662 
    3663     $_POST['bycwooodt_admin_fields_val_array'];
    3664 
    3665     update_option($bycwooodt_admin_fields, $_POST['bycwooodt_admin_fields_val_array'] );
    3666 
    3667     wp_die();
    3668 
    3669 }
    3670 
    3671 
    3672 ?>
     3735}
     3736
     3737
     3738?>
  • byconsole-woo-order-delivery-time/trunk/inc/bycwooodt_language_fields_setting.php

    r2761126 r3013867  
    22
    33
    4 
    54parse_str($bycwooodt_language_translate, $bycwooodt_language_translate_array);
    65
  • byconsole-woo-order-delivery-time/trunk/readme.txt

    r2961224 r3013867  
    44Tags:  WooCommerce, Delivery Date, Pickup Date, Delivery Time, Delivery Slot, Pickup Slot, Pickup Location, WooCommerce Delivery Date, WooCommerce Pickup Date, Delivery Time, Pickup Time, WooCommerce Delivery Time, WooCommerce Pickup Time, Delivery Date Time, WooODT, WooODT Lite.
    55Requires at least: 3.5
    6 Tested up to: 6.3
    7 Stable tag: 2.4.6
     6Tested up to: 6.4.2
     7Stable tag: 2.4.7
    88Requires PHP: 7.4
    99WC requires at least: 2.6
    10 WC tested up to: 8.0.1
     10WC tested up to: 8.4.0
    1111License: GPLv2 or later
    1212License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    345345== Change log ==
    346346
     347= 2.4.7(25/12/2023) =
     348i)  Vulnerability fixed.
     349
    347350= 2.4.6(31/08/2023) =
    348351i) Undefined index notice resolved on checkout page when "Time field validation" checkbox is unchecked on "ODT Settings" tab on backend at "ODT Management" menu settings page.
     
    600603== Upgrade Notice ==
    601604
    602 = 2.4.6(31/08/2023) =
    603 i) Undefined index notice resolved on checkout page when "Time field validation" checkbox is unchecked on "ODT Settings" tab on backend at "ODT Management" menu settings page.
     605= 2.4.7(25/12/2023) =
     606i)  Vulnerability fixed.
Note: See TracChangeset for help on using the changeset viewer.