Skip to content

Commit

Permalink
Fixed: wp_verify_nonce didn't do anything.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Dec 12, 2023
1 parent 71da5c8 commit a5eea43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/class-caos.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,12 @@ public function update_settings() {
return;
}

$action = $_GET[ 'tab' ] ?? 'caos-basic-settings';
$action = $_GET[ 'tab' ] ? $_GET[ 'tab' ] . '-options' : 'caos-basic-settings-options';
$nonce = $_POST[ '_wpnonce' ] ?? '';

wp_verify_nonce( $nonce, $action );
if ( wp_verify_nonce( $nonce, $action ) < 1 ) {
return;
}

if ( ! current_user_can( 'manage_options' ) ) {
return;
Expand Down

0 comments on commit a5eea43

Please sign in to comment.