Jake Vanderwerf
2026-08-28 a9654f00c8fbc9934289d761843ddd071025013f
inc/rest/RestRouteManager.php
@@ -71,10 +71,10 @@
     * @param string $nonceName nonce name to check
     * @param string|null $nonce optional additional nonce to check
     *
     * @return void|WP_Error
     */
    public function verifyNonce(WP_REST_Request $request, string $nonceName = 'wp_rest', string|null $nonce = null):mixed
    {
     * @return bool|WP_Error
    */
    public function verifyNonce(WP_REST_Request $request, string $nonceName = 'wp_rest', string|null $nonce = null): bool|WP_Error
   {
        $nonce = (!is_null($nonce)) ? $nonce :  $request->get_header('X-WP-Nonce');
        if (!wp_verify_nonce($nonce, $nonceName)) {
@@ -112,7 +112,7 @@
            return false;
        }
        // Verify nonces
        $this->verifyNonce($request, 'wp_rest');
        $this->verifyNonce($request);
        if ($this->action!=='') {
            $this->verifyNonce($request, $this->action . $user_id, $request->get_header('action_nonce'));
        }
@@ -925,7 +925,7 @@
            $context,
            'info'
         );
      } catch (\Exception $e) {
      } catch (Exception $e) {
         // Fallback to error_log if handler fails
         error_log("Security Audit: {$event} - " . json_encode($context));
      }