Skip to content

Commit

Permalink
CSRF security added for Settings form
Browse files Browse the repository at this point in the history
  • Loading branch information
simongomes committed May 5, 2021
1 parent e738fec commit 1ae887f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function ste_settings_form_handler() {
return;
}

if ( isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'ste-ecourier-settings' ) ) {
if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'ste-ecourier-settings' ) ) {
wp_die( 'Nope! I can\'t let you do this' );
}

Expand Down

0 comments on commit 1ae887f

Please sign in to comment.