Changeset 3337887
- Timestamp:
- 08/01/2025 03:11:47 PM (8 months ago)
- Location:
- wpcommand/trunk
- Files:
-
- 3 edited
-
plugin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wpcac.api.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpcommand/trunk/plugin.php
r2949600 r3337887 4 4 Plugin Name: WP Command and Control 5 5 Description: Manage your WordPress site with <a href="https://wpcommandcontrol.com/">WP Command and Control</a>. <strong>Deactivate to clear your API Key.</strong> 6 Version: 2.3. 5.26 Version: 2.3.6 7 7 Author: SoJu Studios 8 8 Author URI: http://supersoju.com/ -
wpcommand/trunk/readme.txt
r2949600 r3337887 2 2 Contributors: supersoju 3 3 Tags: wpcommand, wpcontrol, remote administration, multiple wordpress 4 Requires at least: 3.15 Tested up to: 6. 36 Stable tag: 2.3. 5.24 Requires at least: 5.0 5 Tested up to: 6.8.2 6 Stable tag: 2.3.6 7 7 8 8 WP Command and Control allows you to manage multiple WordPress installs from a single dashboard. -
wpcommand/trunk/wpcac.api.php
r2949600 r3337887 26 26 exit; 27 27 } 28 29 $all_ips = array(); 30 if (!empty($_SERVER['REMOTE_ADDR'])) { 31 $all_ips[] = $_SERVER['REMOTE_ADDR']; 32 } 33 $proxy_headers = array( 34 'HTTP_CF_CONNECTING_IP', // Cloudflare original IP 35 'HTTP_X_FORWARDED_FOR', // Standard proxy chain 36 'HTTP_X_REAL_IP', // Nginx proxy 37 'HTTP_CLIENT_IP' // Some proxies 38 ); 39 foreach ($proxy_headers as $header) { 40 if (!empty($_SERVER[$header])) { 41 $header_ips = array_map('trim', explode(',', $_SERVER[$header])); 42 foreach ($header_ips as $ip) { 43 if (filter_var($ip, FILTER_VALIDATE_IP) && !in_array($ip, $all_ips)) { 44 $all_ips[] = $ip; 45 } 46 } 47 } 48 } 49 $req_ip = implode(',', $all_ips); 28 50 29 51 $response = wp_remote_post( 'https://wpcommandcontrol.com/client/api/verify_request', [ … … 35 57 'action' => 'verify_ips', 36 58 'verify' => $verify, 37 'req_ip' => $ _SERVER['REMOTE_ADDR'],59 'req_ip' => $req_ip, 38 60 ], 39 61 ]);
Note: See TracChangeset
for help on using the changeset viewer.