✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.42
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/plugins/wordpress-seo/admin//class-my-yoast-proxy.php
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * Loads the MyYoast proxy.
 *
 * This class registers a proxy page on `admin.php`. Which is reached with the `page=PAGE_IDENTIFIER` parameter.
 * It will read external files and serves them like they are located locally.
 */
class WPSEO_MyYoast_Proxy implements WPSEO_WordPress_Integration {

	/**
	 * The page identifier used in WordPress to register the MyYoast proxy page.
	 *
	 * @var string
	 */
	public const PAGE_IDENTIFIER = 'wpseo_myyoast_proxy';

	/**
	 * The cache control's max age. Used in the header of a successful proxy response.
	 *
	 * @var int
	 */
	public const CACHE_CONTROL_MAX_AGE = DAY_IN_SECONDS;

	/**
	 * Registers the hooks when the user is on the right page.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function register_hooks() {
		if ( ! $this->is_proxy_page() ) {
			return;
		}

		// Register the page for the proxy.
		add_action( 'admin_menu', [ $this, 'add_proxy_page' ] );
		add_action( 'admin_init', [ $this, 'handle_proxy_page' ] );
	}

	/**
	 * Registers the proxy page. It does not actually add a link to the dashboard.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function add_proxy_page() {
		add_dashboard_page( '', '', 'read', self::PAGE_IDENTIFIER, '' );
	}

	/**
	 * Renders the requested proxy page and exits to prevent the WordPress UI from loading.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function handle_proxy_page() {
		$this->render_proxy_page();

		// Prevent the WordPress UI from loading.
		exit();
	}

	/**
	 * Renders the requested proxy page.
	 *
	 * This is separated from the exits to be able to test it.
	 *
	 * @return void
	 */
	public function render_proxy_page() {
		$proxy_options = $this->determine_proxy_options();
		if ( $proxy_options === [] ) {
			// Do not accept any other file than implemented.
			$this->set_header( 'HTTP/1.0 501 Requested file not implemented' );
			return;
		}

		// Set the headers before serving the remote file.
		$this->set_header( 'Content-Type: ' . $proxy_options['content_type'] );
		$this->set_header( 'Cache-Control: max-age=' . self::CACHE_CONTROL_MAX_AGE );

		try {
			echo $this->get_remote_url_body( $proxy_options['url'] );
		} catch ( Exception $e ) {
			/*
			 * Reset the file headers because the loading failed.
			 *
			 * Note: Due to supporting PHP 5.2 `header_remove` can not be used here.
			 * Overwrite the headers instead.
			 */
			$this->set_header( 'Content-Type: text/plain' );
			$this->set_header( 'Cache-Control: max-age=0' );

			$this->set_header( 'HTTP/1.0 500 ' . $e->getMessage() );
		}
	}

	/**
	 * Tries to load the given url via `wp_remote_get`.
	 *
	 * @codeCoverageIgnore
	 *
	 * @param string $url The url to load.
	 *
	 * @return string The body of the response.
	 *
	 * @throws Exception When `wp_remote_get` returned an error.
	 * @throws Exception When the response code is not 200.
	 */
	protected function get_remote_url_body( $url ) {
		$response = wp_remote_get( $url );

		if ( $response instanceof WP_Error ) {
			throw new Exception( 'Unable to retrieve file from MyYoast' );
		}

		if ( wp_remote_retrieve_response_code( $response ) !== 200 ) {
			throw new Exception( 'Received unexpected response from MyYoast' );
		}

		return wp_remote_retrieve_body( $response );
	}

	/**
	 * Determines the proxy options based on the file and plugin version arguments.
	 *
	 * When the file is known it returns an array like this:
	 * <code>
	 * $array = array(
	 *  'content_type' => 'the content type'
	 *  'url'          => 'the url, possibly with the plugin version'
	 * )
	 * </code>
	 *
	 * @return array Empty for an unknown file. See format above for known files.
	 */
	protected function determine_proxy_options() {
		if ( $this->get_proxy_file() === 'research-webworker' ) {
			return [
				'content_type' => 'text/javascript; charset=UTF-8',
				'url'          => 'https://my.yoast.com/api/downloads/file/analysis-worker?plugin_version=' . $this->get_plugin_version(),
			];
		}

		return [];
	}

	/**
	 * Checks if the current page is the MyYoast proxy page.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return bool True when the page request parameter equals the proxy page.
	 */
	protected function is_proxy_page() {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
		$page = isset( $_GET['page'] ) && is_string( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
		return $page === self::PAGE_IDENTIFIER;
	}

	/**
	 * Returns the proxy file from the HTTP request parameters.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return string The sanitized file request parameter or an empty string if it does not exist.
	 */
	protected function get_proxy_file() {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
		if ( isset( $_GET['file'] ) && is_string( $_GET['file'] ) ) {
			// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
			return sanitize_text_field( wp_unslash( $_GET['file'] ) );
		}
		return '';
	}

	/**
	 * Returns the plugin version from the HTTP request parameters.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return string The sanitized plugin_version request parameter or an empty string if it does not exist.
	 */
	protected function get_plugin_version() {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
		if ( isset( $_GET['plugin_version'] ) && is_string( $_GET['plugin_version'] ) ) {
			// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
			$plugin_version = sanitize_text_field( wp_unslash( $_GET['plugin_version'] ) );
			// Replace slashes to secure against requiring a file from another path.
			return str_replace( [ '/', '\\' ], '_', $plugin_version );
		}
		return '';
	}

	/**
	 * Sets the HTTP header.
	 *
	 * This is a tiny helper function to enable better testing.
	 *
	 * @codeCoverageIgnore
	 *
	 * @param string $header The header to set.
	 *
	 * @return void
	 */
	protected function set_header( $header ) {
		header( $header );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
4 Sep 2026 2.27 AM
docteuh / users
0755
ajax
--
4 Sep 2026 2.19 AM
docteuh / users
0755
capabilities
--
3 Sep 2026 10.59 PM
docteuh / users
0755
endpoints
--
4 Sep 2026 1.53 AM
docteuh / users
0755
exceptions
--
4 Sep 2026 1.54 AM
docteuh / users
0755
filters
--
27 Aug 2026 8.19 AM
docteuh / users
0755
formatter
--
31 Aug 2026 4.23 AM
docteuh / users
0755
import
--
4 Sep 2026 1.53 AM
docteuh / users
0755
listeners
--
30 Aug 2026 5.44 PM
docteuh / users
0755
menu
--
4 Sep 2026 12.43 AM
docteuh / users
0755
metabox
--
29 Aug 2026 2.23 AM
docteuh / users
0755
notifiers
--
4 Sep 2026 12.44 AM
docteuh / users
0755
roles
--
4 Sep 2026 2.26 AM
docteuh / users
0755
services
--
3 Sep 2026 11.44 PM
docteuh / users
0755
statistics
--
4 Sep 2026 12.48 AM
docteuh / users
0755
taxonomy
--
31 Aug 2026 4.23 AM
docteuh / users
0755
tracking
--
3 Sep 2026 10.51 PM
docteuh / users
0755
views
--
3 Sep 2026 10.49 PM
docteuh / users
0755
watchers
--
28 Aug 2026 11.27 AM
docteuh / users
0755
admin-conditional.php
0.323 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
admin-settings-changed-listener.php
2.388 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
ajax-20260831023342.php
11.161 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
breadcrumbs-generator.php
12.619 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
check-required-version-conditional.php
0.367 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-asset-analysis-worker-location.php
1.807 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-asset-dev-server-location.php
1.605 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-asset-location.php
0.477 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-editor-specific-replace-vars.php
6.347 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-gutenberg-compatibility-notification.php
2.551 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-help-panel.php
2.697 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-init.php
10.717 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-user-profile.php
3.058 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin-utils.php
2.149 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-admin.php
12.73 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-asset.php
4.302 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-bulk-description-editor-list-table.php
2.052 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-capability-manager-vip.php
1.906 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-config-20260827214815.php
4.927 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-config-20260831023334.php
4.927 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-config.php
4.927 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-database-proxy.php
7.508 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-export-20260831023401.php
3.462 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-export.php
3.462 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-gutenberg-compatibility.php
2.47 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-meta-columns.php
27.304 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-my-yoast-proxy.php
6.14 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-myyoast-bad-request-exception.php
0.183 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-option-tab.php
2.215 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-option-tabs.php
2.257 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-paper-presenter.php
3.516 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-premium-popup.php
2.808 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-premium-upsell-admin-block.php
7.832 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-primary-term-admin.php
7.318 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-product-upsell-notice.php
5.754 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-remote-request.php
3.128 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-suggested-plugins.php
4.328 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-columns-20260831023321.php
3.521 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-columns.php
3.521 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-dashboard-widget.php
3.928 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-form.php
35.727 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-network-settings-api.php
4.143 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-notification.php
10.098 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-yoast-notifications.php
7.63 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
classes-surface.php
0.795 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
functions.php
0.681 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827050547-20260827184109.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827050547.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827050548-20260827184108.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827050548.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
index.php
0.037 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
interface-collection-20260828053340.php
0.251 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
interface-collection.php
0.251 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
interface-installable.php
0.248 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
migrations-conditional.php
0.796 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
plugin-headers.php
0.723 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
string-helper.php
1.189 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
wpml-config-20260827125957.xml
2.081 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF