WordFence reports file differences between repository and installed plugin
-
I just got a message from Wordfence flagging four or five files in Yoast. They are located in:
wp-content/plugins/wordpress-seo/vendor/autoload.php
wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader.php
wp-content/plugins/wordpress-seo/vendor/composer/autoload_classmap.php
wp-content/plugins/wordpress-seo/vendor/composer/autoload_real.php
wp-content/plugins/wordpress-seo/vendor/composer/autoload_static.phpIt also flagged a couple of non-yoast ones, but those were clearly not an issue. These I don’t understand. What’s going on?
The page I need help with: [log in to see the link]
-
Hello @thetravelgal!
Can you please provide us the complete report you got from Wordfence? Also, while the Yoast SEO plugin you’re running is updated, your WordPress is not. You may need to update it to the latest version first.
Filename: wp-content/plugins/wordpress-seo/vendor/autoload.php
File Type: Plugin
Details: This file belongs to plugin “Yoast SEO” version “16.0.1” and has been modified from the file that is distributed by www.remarpro.com for this version. Please use the link to see how the file has changed. If you have modified this file yourself, you can safely ignore this warning. If you see a lot of changed files in a plugin that have been made by the author, then try uninstalling and reinstalling the plugin to force an upgrade. Doing this is a workaround for plugin authors who don’t manage their code correctly. Learn MoreThe Original Version of the file The Modified Version on your WordPress system
4 4
5 require_once __DIR__ . ‘/composer/autoload_real.php’; 5 require_once __DIR__ . ‘/composer/autoload_real.php’;
6 6
7 return ComposerAutoloaderInit493313135e52c303e811a2a95cb84956::getLoader(); 7 return ComposerAutoloaderInit9603a17442dbea876364a259286a4803::getLoader();
8Filename: wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader.php
File Type: Plugin
Details: This file belongs to plugin “Yoast SEO” version “16.0.1” and has been modified from the file that is distributed by www.remarpro.com for this version. Please use the link to see how the file has changed. If you have modified this file yourself, you can safely ignore this warning. If you see a lot of changed files in a plugin that have been made by the author, then try uninstalling and reinstalling the plugin to force an upgrade. Doing this is a workaround for plugin authors who don’t manage their code correctly. Learn MoreThe Original Version of the file The Modified Version on your WordPress system 37 * 37 * 38 * @author Fabien Potencier <[email protected]> 38 * @author Fabien Potencier <[email protected]> 39 * @author Jordi Boggiano <[email protected]> 39 * @author Jordi Boggiano <[email protected]> 40 * @see https://www.php-fig.org/psr/psr-0/ 40 * @see https://www.php-fig.org/psr/psr-0/ 41 * @see https://www.php-fig.org/psr/psr-4/ 41 * @see https://www.php-fig.org/psr/psr-4/ 42 */ 42 */ 43 class ClassLoader 43 class ClassLoader 44 { 44 { 45 private $vendorDir; 46 45 // PSR-4 47 // PSR-4 46 private $prefixLengthsPsr4 = array(); 48 private $prefixLengthsPsr4 = array(); 47 private $prefixDirsPsr4 = array(); 49 private $prefixDirsPsr4 = array(); … … 57 private $missingClasses = array(); 59 private $missingClasses = array(); 58 private $apcuPrefix; 60 private $apcuPrefix; 59 61 62 private static $registeredLoaders = array(); 63 64 public function __construct($vendorDir = null) 65 { 66 $this->vendorDir = $vendorDir; 67 } 68 60 public function getPrefixes() 69 public function getPrefixes() 61 { 70 { 62 if (!empty($this->prefixesPsr0)) { 71 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', $this->prefixesPsr0); 63 return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); 64 } 73 } 65 74 66 return array(); 75 return array(); … … 279 */ 288 */ 280 public function setApcuPrefix($apcuPrefix) 289 public function setApcuPrefix($apcuPrefix) 281 { 290 { 282 $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; 282 $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; 283 } 292 } 284 293 285 /** 294 /** … … 300 public function register($prepend = false) 309 public function register($prepend = false) 301 { 310 { 302 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 311 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 312 313 if (null === $this->vendorDir) { 314 return; 315 } 316 317 if ($prepend) { 318 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; 319 } else { 320 unset(self::$registeredLoaders[$this->vendorDir]); 321 self::$registeredLoaders[$this->vendorDir] = $this; 322 } 303 } 323 } 304 324 305 /** 325 /** … … 308 public function unregister() 328 public function unregister() 309 { 329 { 310 spl_autoload_unregister(array($this, 'loadClass')); 330 spl_autoload_unregister(array($this, 'loadClass')); 331 332 if (null !== $this->vendorDir) { 333 unset(self::$registeredLoaders[$this->vendorDir]); 334 } 311 } 335 } 312 336 313 /** 337 /** … … 365 } 389 } 366 390 367 return $file; 391 return $file; 392 } 393 394 /** 395 * Returns the currently registered loaders indexed by their corresponding vendor directories. 396 * 397 * @return self[] 398 */ 399 public static function getRegisteredLoaders() 400 { 401 return self::$registeredLoaders; 368 } 402 } 369 403 370 private function findFileWithExtension($class, $ext) 404 private function findFileWithExtension($class, $ext) … … 377 $subPath = $class; 411 $subPath = $class; 378 while (false !== $lastPos = strrpos($subPath, '\\')) { 412 while (false !== $lastPos = strrpos($subPath, '\\')) { 379 $subPath = substr($subPath, 0, $lastPos); 413 $subPath = substr($subPath, 0, $lastPos); 380 $search = $subPath.'\\'; 380 $search = $subPath . '\\'; 381 if (isset($this->prefixDirsPsr4[$search])) { 415 if (isset($this->prefixDirsPsr4[$search])) { 416 $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); 382 foreach ($this->prefixDirsPsr4[$search] as $dir) { 417 foreach ($this->prefixDirsPsr4[$search] as $dir) { 383 $length = $this->prefixLengthsPsr4[$first][$search]; 383 if (file_exists($file = $dir . $pathEnd)) { 384 if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { 385 return $file; 419 return $file; 386 } 420 } 387 } 421 }
And so on.
I’m assuming it’s pulling errors from the latest version of Yoast, since I updated this morning. But it would be nice to confirm that so I don’t need to delete the whole plugin. The last update of Yoast indicated it was 100% compatible with both versions of WordPress.
I most definitely will NOT be updating WordPress anytime soon.
We can see you are a Yoast SEO Premium user. As these forums are for our free users, we will contact you directly from our [email protected] email. Please keep a look out in your inbox for a message from us.
It would come from the email address we have on file.
- The topic ‘WordFence reports file differences between repository and installed plugin’ is closed to new replies.