PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | modules/subscriptions/jetpack-user-content-link-redirection.php +5 -7 13.6.216.3-a.1 View file →
@@ -25,9 +25,9 @@
25 25 function jetpack_user_content_link_redirection() {
26 26 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
27 27 if ( empty( $_SERVER['QUERY_STRING'] ) || empty( $_SERVER['HTTP_HOST'] ) || empty( $_GET['blog_id'] ) ) {
28 28 wp_safe_redirect( get_home_url() );
29 - exit();
29 + exit( 0 );
30 30 }
31 31
32 32 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
33 33 $request_blog_id = intval( sanitize_text_field( wp_unslash( $_GET['blog_id'] ) ) );
@@ -34,16 +34,15 @@
34 34 $actual_blog_id = Connection_Manager::get_site_id( true );
35 35
36 36 if ( $actual_blog_id !== $request_blog_id ) {
37 37 wp_die( esc_html__( 'Invalid link.', 'jetpack' ), 400 );
38 - exit();
38 + exit( 0 );
39 39 }
40 40
41 41 $query_params = sanitize_text_field( wp_unslash( $_SERVER['QUERY_STRING'] ) );
42 42 $iframe_url = "https://subscribe.wordpress.com/?$query_params";
43 43
44 - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
45 - echo <<<EOF
44 + echo <<<'EOF'
46 45 <!DOCTYPE html>
47 46 <html>
48 47 <head>
49 48 <script>
@@ -61,14 +60,13 @@
61 60 </head>
62 61 <body>
63 62 EOF;
64 63 echo '<iframe id="user-content-link-redirection" hidden aria-hidden="true" tabindex="-1" width="0" height="0" style="display: none" src="' . esc_url( $iframe_url ) . '"></iframe>';
65 - echo <<<EOF
64 + echo <<<'EOF'
66 65 </body>
67 66 </html>
68 67 EOF;
69 - // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
70 - exit;
68 + exit( 0 );
71 69 }
72 70
73 71 // The WPCOM_USER_CONTENT_LINK_REDIRECTION flag prevents this redirection logic from running
74 72 // on Atomic in case we'd like to override the redirection logic on the Atomic end.