From 43f4f3274ba7427e9d133a4d20700bc927e29b1e Mon Sep 17 00:00:00 2001 From: AntonV1211 Date: Thu, 3 Sep 2026 17:42:30 +0700 Subject: [PATCH] Fix. AltSession. Editing in rest alt session endpoint --- lib/Cleantalk/ApbctWP/RestController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Cleantalk/ApbctWP/RestController.php b/lib/Cleantalk/ApbctWP/RestController.php index 11e07e1c6..41682a0f3 100644 --- a/lib/Cleantalk/ApbctWP/RestController.php +++ b/lib/Cleantalk/ApbctWP/RestController.php @@ -41,7 +41,9 @@ public function register_routes() // phpcs:ignore PSR1.Methods.CamelCapsMethodNa 'required' => true, ), ), - 'permission_callback' => '__return_true', + 'permission_callback' => function (WP_REST_Request $request) { + return (bool) wp_verify_nonce(TT::toString($request->get_header('x_wp_nonce')), 'wp_rest'); + }, ) ));