??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/rosestpetronal.nl/wp-content/plugins/litespeed-cache/src/cloud-auth-ip.trait.php
⬅ Kembali
<?php
/**
* Cloud auth IP validation trait
*
* @package LiteSpeed
* @since 7.8
*/
namespace LiteSpeed;
defined( 'WPINC' ) || exit();
/**
* Trait Cloud_Auth_IP
*
* Handles QUIC.cloud IP validation and ping operations.
*/
trait Cloud_Auth_IP {
/**
* Request callback validation from Cloud
*
* @since 3.0
* @access public
*/
public function ip_validate() {
// phpcs:ignore WordPress.Security.NonceVerification.Missing
$hash = ! empty( $_POST['hash'] ) ? sanitize_text_field( wp_unslash( $_POST['hash'] ) ) : '';
if ( !$hash ) {
return self::err( 'lack_of_params' );
}
if ( md5( substr( $this->_summary['pk_b64'], 0, 4 ) ) !== $hash ) {
self::debug( '__callback IP request decryption failed' );
return self::err( 'err_hash' );
}
Control::set_nocache( 'Cloud IP hash validation' );
$resp_hash = md5( substr( $this->_summary['pk_b64'], 2, 4 ) );
self::debug( '__callback IP request hash: ' . $resp_hash );
return self::ok( [ 'hash' => $resp_hash ] );
}
/**
* Check if this visit is from cloud or not
*
* @since 3.0
*/
public function is_from_cloud() {
$check_point = time() - 86400 * self::TTL_IPS;
if ( empty( $this->_summary['ips'] ) || empty( $this->_summary['ips_ts'] ) || $this->_summary['ips_ts'] < $check_point ) {
self::debug( 'Force updating ip as ips_ts is older than ' . self::TTL_IPS . ' days' );
$this->_update_ips();
}
$res = $this->cls( 'Router' )->ip_access( $this->_summary['ips'] );
if ( ! $res ) {
self::debug( '❌ Not our cloud IP' );
// Auto check ip list again but need an interval limit safety.
if ( empty( $this->_summary['ips_ts_runner'] ) || time() - (int) $this->_summary['ips_ts_runner'] > 600 ) {
self::debug( 'Force updating ip as ips_ts_runner is older than 10mins' );
// Refresh IP list for future detection
$this->_update_ips();
$res = $this->cls( 'Router' )->ip_access( $this->_summary['ips'] );
if ( ! $res ) {
self::debug( '❌ 2nd time: Not our cloud IP' );
} else {
self::debug( '✅ Passed Cloud IP verification' );
}
return $res;
}
} else {
self::debug( '✅ Passed Cloud IP verification' );
}
return $res;
}
/**
* Update Cloud IP list
*
* @since 4.2
*
* @throws \Exception When fetching whitelist fails.
*/
private function _update_ips() {
self::debug( 'Load remote Cloud IP list from ' . $this->_cloud_ips );
// Prevent multiple call in a short period
self::save_summary([
'ips_ts' => time(),
'ips_ts_runner' => time(),
]);
$response = wp_safe_remote_get( $this->_cloud_ips . '?json' );
if ( is_wp_error( $response ) ) {
$error_message = $response->get_error_message();
self::debug( 'failed to get ip whitelist: ' . $error_message );
throw new \Exception( 'Failed to fetch QUIC.cloud whitelist ' . esc_html($error_message) );
}
$json = \json_decode( $response['body'], true );
self::debug( 'Load ips', $json );
self::save_summary( [ 'ips' => $json ] );
}
/**
* Return pong for ping to check PHP function availability
*
* @since 6.5
*
* @return array
*/
public function ping() {
$resp = [
'v_lscwp' => Core::VER,
'v_lscwp_db' => $this->conf( self::_VER ),
'v_php' => PHP_VERSION,
'v_wp' => $GLOBALS['wp_version'],
'home_url' => home_url(),
'site_url' => site_url(),
];
// phpcs:ignore WordPress.Security.NonceVerification.Missing
if ( ! empty( $_POST['funcs'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
foreach ( wp_unslash($_POST['funcs']) as $v ) {
$resp[ $v ] = function_exists( $v ) ? 'y' : 'n';
}
}
// phpcs:ignore WordPress.Security.NonceVerification.Missing
if ( ! empty( $_POST['classes'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
foreach ( wp_unslash($_POST['classes']) as $v ) {
$resp[ $v ] = class_exists( $v ) ? 'y' : 'n';
}
}
// phpcs:ignore WordPress.Security.NonceVerification.Missing
if ( ! empty( $_POST['consts'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
foreach ( wp_unslash($_POST['consts']) as $v ) {
$resp[ $v ] = defined( $v ) ? 'y' : 'n';
}
}
return self::ok( $resp );
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 cdn
dir
—
2026-06-22 10:09
📁 data_structure
dir
—
2026-06-22 10:09
🐘 activation.cls.php
php
17.3 KB
2026-04-01 20:54
🐘 admin-display.cls.php
php
48.5 KB
2026-04-01 20:54
🐘 admin-settings.cls.php
php
11.1 KB
2026-04-01 20:54
🐘 admin.cls.php
php
6.1 KB
2026-04-01 20:54
🐘 api.cls.php
php
10.4 KB
2026-04-01 20:54
🐘 avatar.cls.php
php
8.7 KB
2026-04-01 20:54
🐘 base.cls.php
php
37.7 KB
2026-04-01 20:54
🐘 cdn.cls.php
php
15.9 KB
2026-04-01 20:54
🐘 cloud-auth-callback.trait.php
php
10.4 KB
2026-04-01 20:54
🐘 cloud-auth-ip.trait.php
php
4.3 KB
2026-04-01 20:54
🐘 cloud-auth.trait.php
php
9.4 KB
2026-04-01 20:54
🐘 cloud-misc.trait.php
php
10.3 KB
2026-04-01 20:54
🐘 cloud-node.trait.php
php
5.9 KB
2026-04-01 20:54
🐘 cloud-request.trait.php
php
19.7 KB
2026-04-01 20:54
🐘 cloud.cls.php
php
7.3 KB
2026-04-01 20:54
🐘 conf.cls.php
php
19.5 KB
2026-04-01 20:54
🐘 control.cls.php
php
24.3 KB
2026-04-01 20:54
🐘 core.cls.php
php
21 KB
2026-04-01 20:54
🐘 crawler-map.cls.php
php
19.4 KB
2026-04-01 20:54
🐘 crawler.cls.php
php
44.7 KB
2026-04-01 20:54
🐘 css.cls.php
php
17.8 KB
2026-04-01 20:54
🐘 data.cls.php
php
22.2 KB
2026-04-01 20:54
🐘 data.upgrade.func.php
php
5.7 KB
2026-04-01 20:54
🐘 db-optm.cls.php
php
15.3 KB
2026-04-01 20:54
🐘 debug2.cls.php
php
18.4 KB
2026-04-01 20:54
🐘 doc.cls.php
php
5.4 KB
2026-04-01 20:54
🐘 error.cls.php
php
7.4 KB
2026-04-01 20:54
🐘 esi.cls.php
php
27.2 KB
2026-04-01 20:54
🐘 file.cls.php
php
10.6 KB
2026-04-01 20:54
🐘 guest.cls.php
php
2.8 KB
2026-04-01 20:54
🐘 gui.cls.php
php
36.6 KB
2026-04-01 20:54
🐘 health.cls.php
php
2.8 KB
2026-04-01 20:54
🐘 htaccess.cls.php
php
29.8 KB
2026-04-01 20:54
🐘 img-optm-manage.trait.php
php
30.8 KB
2026-04-01 20:54
🐘 img-optm-pull.trait.php
php
22.1 KB
2026-04-01 20:54
🐘 img-optm-send.trait.php
php
21.9 KB
2026-04-01 20:54
🐘 img-optm.cls.php
php
5.3 KB
2026-04-01 20:54
🐘 import.cls.php
php
4.3 KB
2026-04-01 20:54
🐘 import.preset.cls.php
php
5.5 KB
2026-04-01 20:54
🐘 lang.cls.php
php
17 KB
2026-04-01 20:54
🐘 localization.cls.php
php
4 KB
2026-04-01 20:54
🐘 media.cls.php
php
44.1 KB
2026-04-01 20:54
🐘 metabox.cls.php
php
5.3 KB
2026-04-01 20:54
🐘 object-cache-wp.cls.php
php
18.8 KB
2026-04-01 20:54
🐘 object-cache.cls.php
php
20.9 KB
2026-04-01 20:54
🐘 object.lib.php
php
14.2 KB
2026-04-01 20:54
🐘 optimize.cls.php
php
38.6 KB
2026-04-01 20:54
🐘 optimizer.cls.php
php
10.5 KB
2026-04-01 20:54
🐘 placeholder.cls.php
php
17.9 KB
2026-04-01 20:54
🐘 purge.cls.php
php
34.4 KB
2026-04-01 20:54
🐘 report.cls.php
php
6.1 KB
2026-04-01 20:54
🐘 rest.cls.php
php
9.1 KB
2026-04-01 20:54
🐘 root.cls.php
php
14.3 KB
2026-04-01 20:54
🐘 router.cls.php
php
20.8 KB
2026-04-01 20:54
🐘 str.cls.php
php
3.1 KB
2026-04-01 20:54
🐘 tag.cls.php
php
9.3 KB
2026-04-01 20:54
🐘 task.cls.php
php
7 KB
2026-04-01 20:54
🐘 tool.cls.php
php
4.2 KB
2026-04-01 20:54
🐘 ucss.cls.php
php
16.3 KB
2026-04-01 20:54
🐘 utility.cls.php
php
26 KB
2026-04-01 20:54
🐘 vary.cls.php
php
21.3 KB
2026-04-01 20:54
🐘 vpi.cls.php
php
9.4 KB
2026-04-01 20:54