diff --git a/CHANGELOG.md b/CHANGELOG.md index 83db5fc7..fd16e7b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.9.2-hotfix.1](https://github.com/Automattic/newspack-popups/compare/v2.9.1...v2.9.2-hotfix.1) (2022-12-20) + + +### Bug Fixes + +* prevent API bot exit without referer ([b9f5c56](https://github.com/Automattic/newspack-popups/commit/b9f5c5646580f7f354dac1279a33a7398bc6491c)) + ## [2.9.1](https://github.com/Automattic/newspack-popups/compare/v2.9.0...v2.9.1) (2022-12-20) diff --git a/api/classes/class-lightweight-api.php b/api/classes/class-lightweight-api.php index 4afa8aed..178d5449 100644 --- a/api/classes/class-lightweight-api.php +++ b/api/classes/class-lightweight-api.php @@ -78,7 +78,7 @@ class Lightweight_API { * @codeCoverageIgnore */ public function __construct( $nonce = null, $ignore_referer_validation = false ) { - if ( $this->is_a_web_crawler() ) { + if ( $this->is_a_web_crawler() && ! $ignore_referer_validation ) { header( 'X-Robots-Tag: noindex' ); exit; } diff --git a/includes/class-newspack-popups-segmentation.php b/includes/class-newspack-popups-segmentation.php index fe29bad2..2e5c7662 100644 --- a/includes/class-newspack-popups-segmentation.php +++ b/includes/class-newspack-popups-segmentation.php @@ -67,9 +67,7 @@ public function __construct() { add_action( 'wp_footer', [ __CLASS__, 'insert_amp_analytics' ], 20 ); add_filter( 'newspack_custom_dimensions', [ __CLASS__, 'register_custom_dimensions' ] ); - // Temporarily removed this filter on 2022-12-20. It's causing blank pages to get cached intermittently on production sites. - // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar - // add_filter( 'newspack_custom_dimensions_values', [ __CLASS__, 'report_custom_dimensions' ] ); + add_filter( 'newspack_custom_dimensions_values', [ __CLASS__, 'report_custom_dimensions' ] ); // Data pruning CRON job. register_deactivation_hook( NEWSPACK_POPUPS_PLUGIN_FILE, [ __CLASS__, 'cron_deactivate' ] ); diff --git a/newspack-popups.php b/newspack-popups.php index a02376c8..569ce5b4 100755 --- a/newspack-popups.php +++ b/newspack-popups.php @@ -7,7 +7,7 @@ * Author URI: https://newspack.blog * Text Domain: newspack-popups * Domain Path: /languages - * Version: 2.9.1 + * Version: 2.9.2-hotfix.1 * * @package Newspack_Popups */ diff --git a/package-lock.json b/package-lock.json index c7bd0d74..8d1ef69f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "newspack-popups", - "version": "2.9.1", + "version": "2.9.2-hotfix.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "newspack-popups", - "version": "2.9.1", + "version": "2.9.2-hotfix.1", "dependencies": { "classnames": "^2.3.2", "intersection-observer": "^0.12.2", diff --git a/package.json b/package.json index ab133e94..b46e0eb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newspack-popups", - "version": "2.9.1", + "version": "2.9.2-hotfix.1", "main": "Gruntfile.js", "author": "Automattic", "scripts": {