Changeset 3372531
- Timestamp:
- 10/03/2025 05:36:40 PM (6 months ago)
- Location:
- all-in-one-seo-pack/trunk
- Files:
-
- 1 deleted
- 11 edited
-
all_in_one_seo_pack.php (modified) (1 diff)
-
app/Common/Admin/ConflictingPlugins.php (modified) (1 diff)
-
app/Common/Api/Ai.php (modified) (10 diffs)
-
app/Common/Api/Api.php (modified) (3 diffs)
-
app/Common/Api/Migration.php (deleted)
-
app/Common/Api/PostsTerms.php (modified) (9 diffs)
-
readme.txt (modified) (3 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_classmap.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (3 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
all-in-one-seo-pack/trunk/all_in_one_seo_pack.php
r3352761 r3372531 6 6 * Author: All in One SEO Team 7 7 * Author URI: https://aioseo.com/ 8 * Version: 4.8.7 8 * Version: 4.8.7.2 9 9 * Text Domain: all-in-one-seo-pack 10 10 * Domain Path: /languages -
all-in-one-seo-pack/trunk/app/Common/Admin/ConflictingPlugins.php
r3318750 r3372531 58 58 */ 59 59 public function init() { 60 if ( ! current_user_can( ' activate_plugins' ) ) {60 if ( ! current_user_can( 'deactivate_plugins' ) ) { 61 61 return; 62 62 } -
all-in-one-seo-pack/trunk/app/Common/Api/Ai.php
r3318750 r3372531 69 69 $titles = ! empty( $body['titles'] ) ? $body['titles'] : []; 70 70 $options = $body['options'] ?? []; 71 71 72 if ( ! $postContent || empty( $options ) ) { 72 73 return new \WP_REST_Response( [ … … 74 75 'message' => 'Missing required parameters.' 75 76 ], 400 ); 77 } 78 79 if ( ! current_user_can( 'edit_post', $postId ) ) { 80 return new \WP_REST_Response( [ 81 'success' => false, 82 'message' => 'Unauthorized.' 83 ], 401 ); 76 84 } 77 85 … … 154 162 $descriptions = ! empty( $body['descriptions'] ) ? $body['descriptions'] : []; 155 163 $options = $body['options'] ?? []; 164 156 165 if ( ! $postContent || empty( $options ) ) { 157 166 return new \WP_REST_Response( [ … … 159 168 'message' => 'Missing required parameters.' 160 169 ], 400 ); 170 } 171 172 if ( ! current_user_can( 'edit_post', $postId ) ) { 173 return new \WP_REST_Response( [ 174 'success' => false, 175 'message' => 'Unauthorized.' 176 ], 401 ); 161 177 } 162 178 … … 237 253 $permalink = ! empty( $body['permalink'] ) ? esc_url_raw( urldecode( $body['permalink'] ) ) : ''; 238 254 $options = $body['options'] ?? []; 255 239 256 if ( ! $postContent || ! $permalink || empty( $options['media'] ) ) { 240 257 return new \WP_REST_Response( [ … … 242 259 'message' => 'Missing required parameters.' 243 260 ], 400 ); 261 } 262 263 if ( ! current_user_can( 'edit_post', $postId ) ) { 264 return new \WP_REST_Response( [ 265 'success' => false, 266 'message' => 'Unauthorized.' 267 ], 401 ); 244 268 } 245 269 … … 331 355 $faqs = ! empty( $body['faqs'] ) ? $body['faqs'] : []; 332 356 $options = $body['options'] ?? []; 357 333 358 if ( ! $postContent || empty( $options ) ) { 334 359 return new \WP_REST_Response( [ … … 336 361 'message' => 'Missing required parameters.' 337 362 ], 400 ); 363 } 364 365 if ( ! current_user_can( 'edit_post', $postId ) ) { 366 return new \WP_REST_Response( [ 367 'success' => false, 368 'message' => 'Unauthorized.' 369 ], 401 ); 338 370 } 339 371 … … 416 448 $keyPoints = ! empty( $body['keyPoints'] ) ? $body['keyPoints'] : []; 417 449 $options = $body['options'] ?? []; 450 418 451 if ( ! $postContent || empty( $options ) ) { 419 452 return new \WP_REST_Response( [ … … 421 454 'message' => 'Missing required parameters.' 422 455 ], 400 ); 456 } 457 458 if ( ! current_user_can( 'edit_post', $postId ) ) { 459 return new \WP_REST_Response( [ 460 'success' => false, 461 'message' => 'Unauthorized.' 462 ], 401 ); 423 463 } 424 464 -
all-in-one-seo-pack/trunk/app/Common/Api/Api.php
r3352761 r3372531 85 85 'backup/restore' => [ 'callback' => [ 'Tools', 'restoreBackup' ], 'access' => 'aioseo_tools_settings' ], 86 86 'email-debug-info' => [ 'callback' => [ 'Tools', 'emailDebugInfo' ], 'access' => 'aioseo_tools_settings' ], 87 ' migration/fix-blank-formats' => [ 'callback' => [ 'Migration', 'fixBlankFormats' ], 'access' => 'any' ],87 'notification/email-reports-enable' => [ 'callback' => [ 'EmailSummary', 'enableEmailReports' ], 'access' => 'aioseo_general_settings' ], 88 88 'notification/blog-visibility-reminder' => [ 'callback' => [ 'Notifications', 'blogVisibilityReminder' ], 'access' => 'any' ], 89 89 'notification/conflicting-plugins-reminder' => [ 'callback' => [ 'Notifications', 'conflictingPluginsReminder' ], 'access' => 'any' ], 90 90 'notification/description-format-reminder' => [ 'callback' => [ 'Notifications', 'descriptionFormatReminder' ], 'access' => 'any' ], 91 'notification/email-reports-enable' => [ 'callback' => [ 'EmailSummary', 'enableEmailReports' ], 'access' => 'any' ],92 91 'notification/install-addons-reminder' => [ 'callback' => [ 'Notifications', 'installAddonsReminder' ], 'access' => 'any' ], 93 92 'notification/install-aioseo-image-seo-reminder' => [ 'callback' => [ 'Notifications', 'installImageSeoReminder' ], 'access' => 'any' ], … … 121 120 'settings/semrush-country' => [ 'callback' => [ 'Settings', 'changeSemrushCountry' ], 'access' => 'any' ], 122 121 'settings/do-task' => [ 'callback' => [ 'Settings', 'doTask' ], 'access' => 'aioseo_tools_settings' ], 123 'sitemap/deactivate-conflicting-plugins' => [ 'callback' => [ 'Sitemaps', 'deactivateConflictingPlugins' ], 'access' => ' any' ],122 'sitemap/deactivate-conflicting-plugins' => [ 'callback' => [ 'Sitemaps', 'deactivateConflictingPlugins' ], 'access' => 'deactivate_plugins' ], 124 123 'sitemap/delete-static-files' => [ 'callback' => [ 'Sitemaps', 'deleteStaticFiles' ], 'access' => 'aioseo_sitemap_settings' ], 125 124 'sitemap/validate-html-sitemap-slug' => [ 'callback' => [ 'Sitemaps', 'validateHtmlSitemapSlug' ], 'access' => 'aioseo_sitemap_settings' ], … … 161 160 'email-summary/send' => [ 162 161 'callback' => [ 'EmailSummary', 'send' ], 163 'access' => 'aioseo_ page_advanced_settings'162 'access' => 'aioseo_general_settings' 164 163 ], 165 164 'writing-assistant/process' => [ -
all-in-one-seo-pack/trunk/app/Common/Api/PostsTerms.php
r3352761 r3372531 178 178 } 179 179 180 if ( ! current_user_can( 'read_post', $args['postId'] ) ) { 181 return new \WP_REST_Response( [ 182 'success' => false, 183 'message' => 'Unauthorized.' 184 ], 401 ); 185 } 186 180 187 // Disable the cache. 181 188 aioseo()->social->image->useCache = false; … … 224 231 'message' => 'Post ID is missing.' 225 232 ], 400 ); 233 } 234 235 if ( ! aioseo()->access->hasCapability( 'aioseo_page_general_settings' ) || ! current_user_can( 'edit_post', $postId ) ) { 236 return new \WP_REST_Response( [ 237 'success' => false, 238 'message' => 'You are not allowed to update the post settings.' 239 ], 403 ); 226 240 } 227 241 … … 273 287 $posts = []; 274 288 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 275 300 $postTitle = get_the_title( $postId ); 276 301 $headline = ! empty( $postTitle ) ? sanitize_text_field( $postTitle ) : ''; // We need this to achieve consistency for the score when using special characters in titles … … 309 334 'message' => 'Post ID is missing.' 310 335 ], 400 ); 336 } 337 338 if ( ! aioseo()->access->hasCapability( 'aioseo_page_general_settings' ) || ! current_user_can( 'edit_post', $postId ) ) { 339 return new \WP_REST_Response( [ 340 'success' => false, 341 'message' => 'You are not allowed to update the post settings.' 342 ], 403 ); 311 343 } 312 344 … … 366 398 } 367 399 400 if ( ! aioseo()->access->hasCapability( 'aioseo_page_general_settings' ) || ! current_user_can( 'edit_post', $postId ) ) { 401 return new \WP_REST_Response( [ 402 'success' => false, 403 'message' => 'You are not allowed to update the post settings.' 404 ], 403 ); 405 } 406 368 407 $thePost = Models\Post::getPost( $postId ); 369 408 … … 413 452 } 414 453 454 if ( ! current_user_can( 'edit_post', $args['postId'] ) ) { 455 return new \WP_REST_Response( [ 456 'success' => false, 457 'message' => 'Unauthorized.' 458 ], 401 ); 459 } 460 415 461 $thePost = Models\Post::getPost( $args['postId'] ); 416 462 $thePost->options->primaryTerm->productEducationDismissed = true; … … 438 484 'message' => 'No post ID was provided.' 439 485 ], 400 ); 486 } 487 488 if ( ! current_user_can( 'edit_post', $args['postId'] ) ) { 489 return new \WP_REST_Response( [ 490 'success' => false, 491 'message' => 'Unauthorized.' 492 ], 401 ); 440 493 } 441 494 … … 469 522 } 470 523 524 if ( ! current_user_can( 'edit_post', $args['postId'] ) ) { 525 return new \WP_REST_Response( [ 526 'success' => false, 527 'message' => 'Unauthorized.' 528 ], 401 ); 529 } 530 471 531 $thePost = Models\Post::getPost( $args['postId'] ); 472 532 $thePost->options->linkFormat->internalLinkCount = $count; … … 497 557 } 498 558 559 if ( ! current_user_can( 'read_post', $args['postId'] ) || post_password_required( $args['postId'] ) ) { 560 return new \WP_REST_Response( [ 561 'success' => false, 562 'message' => 'Unauthorized.' 563 ], 401 ); 564 } 565 499 566 // Check if we can process it using a page builder integration. 500 567 $pageBuilder = aioseo()->helpers->getPostPageBuilderName( $args['postId'] ); -
all-in-one-seo-pack/trunk/readme.txt
r3352761 r3372531 5 5 Requires at least: 5.4 6 6 Requires PHP: 7.2 7 Stable tag: 4.8.7 7 Stable tag: 4.8.7.2 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.txt … … 234 234 235 235 == Changelog == 236 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. 236 244 237 245 **New in Version 4.8.7** … … 430 438 == Upgrade Notice == 431 439 432 = 4.8.7 =440 = 4.8.7.2 = 433 441 434 442 This update adds major improvements and bug fixes. -
all-in-one-seo-pack/trunk/vendor/autoload.php
r3352761 r3372531 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc::getLoader();25 return ComposerAutoloaderInit6d833ab4d20e6c5fec2c3f6dffe8964c::getLoader(); -
all-in-one-seo-pack/trunk/vendor/composer/autoload_classmap.php
r3352761 r3372531 35 35 'AIOSEO\\Plugin\\Common\\Api\\Integrations\\Semrush' => $baseDir . '/app/Common/Api/Integrations/Semrush.php', 36 36 'AIOSEO\\Plugin\\Common\\Api\\Integrations\\WpCode' => $baseDir . '/app/Common/Api/Integrations/WpCode.php', 37 'AIOSEO\\Plugin\\Common\\Api\\Migration' => $baseDir . '/app/Common/Api/Migration.php',38 37 'AIOSEO\\Plugin\\Common\\Api\\Network' => $baseDir . '/app/Common/Api/Network.php', 39 38 'AIOSEO\\Plugin\\Common\\Api\\Notifications' => $baseDir . '/app/Common/Api/Notifications.php', -
all-in-one-seo-pack/trunk/vendor/composer/autoload_real.php
r3352761 r3372531 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc5 class ComposerAutoloaderInit6d833ab4d20e6c5fec2c3f6dffe8964c 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit6d833ab4d20e6c5fec2c3f6dffe8964c', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit6d833ab4d20e6c5fec2c3f6dffe8964c', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit6d833ab4d20e6c5fec2c3f6dffe8964c::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
all-in-one-seo-pack/trunk/vendor/composer/autoload_static.php
r3352761 r3372531 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc7 class ComposerStaticInit6d833ab4d20e6c5fec2c3f6dffe8964c 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 60 60 'AIOSEO\\Plugin\\Common\\Api\\Integrations\\Semrush' => __DIR__ . '/../..' . '/app/Common/Api/Integrations/Semrush.php', 61 61 'AIOSEO\\Plugin\\Common\\Api\\Integrations\\WpCode' => __DIR__ . '/../..' . '/app/Common/Api/Integrations/WpCode.php', 62 'AIOSEO\\Plugin\\Common\\Api\\Migration' => __DIR__ . '/../..' . '/app/Common/Api/Migration.php',63 62 'AIOSEO\\Plugin\\Common\\Api\\Network' => __DIR__ . '/../..' . '/app/Common/Api/Network.php', 64 63 'AIOSEO\\Plugin\\Common\\Api\\Notifications' => __DIR__ . '/../..' . '/app/Common/Api/Notifications.php', … … 338 337 { 339 338 return \Closure::bind(function () use ($loader) { 340 $loader->prefixLengthsPsr4 = ComposerStaticInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc::$prefixLengthsPsr4;341 $loader->prefixDirsPsr4 = ComposerStaticInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc::$prefixDirsPsr4;342 $loader->prefixesPsr0 = ComposerStaticInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc::$prefixesPsr0;343 $loader->classMap = ComposerStaticInit f72cf5b2efb9ca7f7cd0d3ba28bdb8dc::$classMap;339 $loader->prefixLengthsPsr4 = ComposerStaticInit6d833ab4d20e6c5fec2c3f6dffe8964c::$prefixLengthsPsr4; 340 $loader->prefixDirsPsr4 = ComposerStaticInit6d833ab4d20e6c5fec2c3f6dffe8964c::$prefixDirsPsr4; 341 $loader->prefixesPsr0 = ComposerStaticInit6d833ab4d20e6c5fec2c3f6dffe8964c::$prefixesPsr0; 342 $loader->classMap = ComposerStaticInit6d833ab4d20e6c5fec2c3f6dffe8964c::$classMap; 344 343 345 344 }, null, ClassLoader::class); -
all-in-one-seo-pack/trunk/vendor/composer/installed.php
r3352761 r3372531 4 4 'pretty_version' => 'dev-develop', 5 5 'version' => 'dev-develop', 6 'reference' => ' 933e7e7c28398d253a84d9dd545ec6a958513a0a',6 'reference' => '6a5c0bbb4a81dfc24b44e3e86955c962ead9d47b', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-develop', 15 15 'version' => 'dev-develop', 16 'reference' => ' 933e7e7c28398d253a84d9dd545ec6a958513a0a',16 'reference' => '6a5c0bbb4a81dfc24b44e3e86955c962ead9d47b', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.