From a5eea431b6b3ee3cdc24dd09f18231e15316ce08 Mon Sep 17 00:00:00 2001 From: Dan0sz <18595395+Dan0sz@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:59:52 +0100 Subject: [PATCH] Fixed: wp_verify_nonce didn't do anything. --- includes/class-caos.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-caos.php b/includes/class-caos.php index cc305d9..039cfd0 100644 --- a/includes/class-caos.php +++ b/includes/class-caos.php @@ -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;