Skip to content

Commit d22e3d3

Browse files
committed
4.7.8.2 Release
1 parent 5115c72 commit d22e3d3

File tree

93 files changed

+10952
-977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+10952
-977
lines changed

all_in_one_seo_pack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs, business sites, ecommerce sites, and much more. More than 100 million downloads since 2007.
66
* Author: All in One SEO Team
77
* Author URI: https://aioseo.com/
8-
* Version: 4.8.7.1
8+
* Version: 4.8.7.2
99
* Text Domain: all-in-one-seo-pack
1010
* Domain Path: /languages
1111
* License: GPL-3.0+

app/Common/Api/PostsTerms.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,19 @@ public static function loadPostDetailsColumn( $request ) {
284284
], 400 );
285285
}
286286

287-
if ( ! current_user_can( 'read_post', $ids[0] ) ) {
288-
return new \WP_REST_Response( [
289-
'success' => false,
290-
'message' => 'Unauthorized.'
291-
], 401 );
292-
}
293-
294287
$posts = [];
295288
foreach ( $ids as $postId ) {
289+
if ( ! current_user_can( 'read_post', $postId ) || post_password_required( $postId ) ) {
290+
$posts[] = [
291+
'id' => $postId,
292+
'titleParsed' => '',
293+
'descriptionParsed' => '',
294+
'headlineScore' => null
295+
];
296+
297+
continue;
298+
}
299+
296300
$postTitle = get_the_title( $postId );
297301
$headline = ! empty( $postTitle ) ? sanitize_text_field( $postTitle ) : ''; // We need this to achieve consistency for the score when using special characters in titles
298302
$headlineResult = aioseo()->standalone->headlineAnalyzer->getResult( $headline );

readme.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: SEO, Google Search Console, XML Sitemap, meta description, schema
44
Tested up to: 6.8
55
Requires at least: 5.4
66
Requires PHP: 7.2
7-
Stable tag: 4.8.7
7+
Stable tag: 4.8.7.2
88
License: GPLv3 or later
99
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
1010

@@ -234,6 +234,14 @@ AIOSEO® is a registered trademark of Semper Plugins LLC. When writing about
234234

235235
== Changelog ==
236236

237+
**New in Version 4.8.7.2**
238+
239+
* Updated: Added additional hardening to REST API routes.
240+
241+
**New in Version 4.8.7.1**
242+
243+
* Fixed: WooCommerce products being automatically added to the cart.
244+
237245
**New in Version 4.8.7**
238246

239247
* Updated: Hardened API routes to prevent unauthorized access.
@@ -429,6 +437,6 @@ Additionally, AIOSEO can also provide you with data on the most frequently used
429437

430438
== Upgrade Notice ==
431439

432-
= 4.8.7 =
440+
= 4.8.7.2 =
433441

434442
This update adds major improvements and bug fixes.

vendor/autoload.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414
echo $err;
1515
}
1616
}
17-
trigger_error(
18-
$err,
19-
E_USER_ERROR
20-
);
17+
throw new RuntimeException($err);
2118
}
2219

2320
require_once __DIR__ . '/composer/autoload_real.php';
2421

25-
return ComposerAutoloaderInit66b3c54d88e5e61397f1b6cb174129f9::getLoader();
22+
return ComposerAutoloaderInit7b1b5525a434eea7579fcd6c370bd123::getLoader();

vendor/composer/InstalledVersions.php

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,23 @@
2626
*/
2727
class InstalledVersions
2828
{
29+
/**
30+
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
31+
* @internal
32+
*/
33+
private static $selfDir = null;
34+
2935
/**
3036
* @var mixed[]|null
3137
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
3238
*/
3339
private static $installed;
3440

41+
/**
42+
* @var bool
43+
*/
44+
private static $installedIsLocalDir;
45+
3546
/**
3647
* @var bool|null
3748
*/
@@ -309,6 +320,24 @@ public static function reload($data)
309320
{
310321
self::$installed = $data;
311322
self::$installedByVendor = array();
323+
324+
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
325+
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
326+
// so we have to assume it does not, and that may result in duplicate data being returned when listing
327+
// all installed packages for example
328+
self::$installedIsLocalDir = false;
329+
}
330+
331+
/**
332+
* @return string
333+
*/
334+
private static function getSelfDir()
335+
{
336+
if (self::$selfDir === null) {
337+
self::$selfDir = strtr(__DIR__, '\\', '/');
338+
}
339+
340+
return self::$selfDir;
312341
}
313342

314343
/**
@@ -322,19 +351,27 @@ private static function getInstalled()
322351
}
323352

324353
$installed = array();
354+
$copiedLocalDir = false;
325355

326356
if (self::$canGetVendors) {
357+
$selfDir = self::getSelfDir();
327358
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
359+
$vendorDir = strtr($vendorDir, '\\', '/');
328360
if (isset(self::$installedByVendor[$vendorDir])) {
329361
$installed[] = self::$installedByVendor[$vendorDir];
330362
} elseif (is_file($vendorDir.'/composer/installed.php')) {
331363
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
332364
$required = require $vendorDir.'/composer/installed.php';
333-
$installed[] = self::$installedByVendor[$vendorDir] = $required;
334-
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
335-
self::$installed = $installed[count($installed) - 1];
365+
self::$installedByVendor[$vendorDir] = $required;
366+
$installed[] = $required;
367+
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
368+
self::$installed = $required;
369+
self::$installedIsLocalDir = true;
336370
}
337371
}
372+
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
373+
$copiedLocalDir = true;
374+
}
338375
}
339376
}
340377

@@ -350,7 +387,7 @@ private static function getInstalled()
350387
}
351388
}
352389

353-
if (self::$installed !== array()) {
390+
if (self::$installed !== array() && !$copiedLocalDir) {
354391
$installed[] = self::$installed;
355392
}
356393

0 commit comments

Comments
 (0)