Plugin Directory

Changeset 3276469


Ignore:
Timestamp:
04/18/2025 09:29:36 AM (12 months ago)
Author:
arsyntax
Message:

fixed nonce issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ar-quick-view/trunk/public/inc/class.frontend.php

    r3252076 r3276469  
    1717   
    1818   public function arqvww_get_variation_image_by_id(){
     19
     20    // Nonce check
     21    if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field(wp_unslash($_POST['nonce'])), 'arqvww_nonce' ) ) {
     22        wp_die( esc_html__( 'Security check failed. Please try again.', 'ar-quick-view' ) );
     23    }
    1924
    2025    if(isset($_POST['variation_image_id']) && !empty($_POST['variation_image_id'])){
     
    177182
    178183    public function arqvww_get_quick_view_contents() {
    179         // phpcs:disable WordPress.Security.NonceVerification.Recommended
     184   
     185
     186        // Nonce check
     187        if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field(wp_unslash($_POST['nonce'])), 'arqvww_nonce' ) ) {
     188            wp_die( esc_html__( 'Security check failed. Please try again.', 'ar-quick-view' ) );
     189        }
     190
    180191        if ( ! isset( $_REQUEST['product_id'] ) ) {
    181192            die();
     
    199210
    200211        die();
    201         // phpcs:enable WordPress.Security.NonceVerification.Recommended
     212       
    202213    }
    203214
Note: See TracChangeset for help on using the changeset viewer.