diff --git a/plugins/woocommerce/changelog/fix-xss-review-dismiss-notice b/plugins/woocommerce/changelog/fix-xss-review-dismiss-notice new file mode 100644 index 00000000000..bd2040e7d3e --- /dev/null +++ b/plugins/woocommerce/changelog/fix-xss-review-dismiss-notice @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Remove the potential for a Reflected XSS attack in relation to a dismissable notice in the edit comments screen. diff --git a/plugins/woocommerce/src/Internal/Admin/ProductReviews/ReviewsCommentsOverrides.php b/plugins/woocommerce/src/Internal/Admin/ProductReviews/ReviewsCommentsOverrides.php index b54e9c10b3a..f1e46bb139f 100644 --- a/plugins/woocommerce/src/Internal/Admin/ProductReviews/ReviewsCommentsOverrides.php +++ b/plugins/woocommerce/src/Internal/Admin/ProductReviews/ReviewsCommentsOverrides.php @@ -73,26 +73,32 @@ class ReviewsCommentsOverrides { * @return void */ protected function display_reviews_moved_notice() : void { - $dismiss_url = wp_nonce_url( - add_query_arg( - [ - 'wc-hide-notice' => urlencode( static::REVIEWS_MOVED_NOTICE_ID ), - ] - ), - 'woocommerce_hide_notices_nonce', - '_wc_notice_nonce' - ); ?> -

Reviews.', 'woocommerce' ); ?>

- -
+
+ + + + + + + + + + + + + +
+ assertStringContainsString( '
', $output ); $this->assertStringContainsString( '', $output ); - $this->assertStringContainsString( '