Plugin Directory

Changeset 2526542


Ignore:
Timestamp:
05/05/2021 10:01:53 AM (5 years ago)
Author:
simongomes02
Message:

CSRF security added for Settings form

Location:
parcel-tracker-ecourier
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • parcel-tracker-ecourier/tags/1.0.1/includes/Admin/Settings.php

    r2520787 r2526542  
    4646        }
    4747
    48         if ( isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'ecourier-settings' ) ) {
     48        if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'ecourier-settings' ) ) {
    4949            wp_die( 'Nope! I can\'t let you do this' );
    5050        }
  • parcel-tracker-ecourier/trunk/includes/Admin/Settings.php

    r2517826 r2526542  
    4646        }
    4747
    48         if ( isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'ecourier-settings' ) ) {
     48        if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'ecourier-settings' ) ) {
    4949            wp_die( 'Nope! I can\'t let you do this' );
    5050        }
Note: See TracChangeset for help on using the changeset viewer.