HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/hanode/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/config.php
<?php
if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) {

/**
 * Class wfWAFConfig provides a convenience interface for accessing the WAF's configuration
 * that does not throw exceptions. All exceptions are caught and, if WFWAF_DEBUG is true, logged 
 * to the server error log.
 */
class wfWAFConfig {
	public static function set($key, $val, $waf = null, $category = '') {
		if (!($waf instanceof wfWAF)) {
			$waf = wfWAF::getInstance();
		}
		
		try {
			$waf->getStorageEngine()->setConfig($key, $val, $category);
		}
		catch (Exception $e) {
			if (WFWAF_DEBUG) {
				error_log("Exception in " . __CLASS__ . "->" . __FUNCTION__ . ": " . $e->getMessage());
			}
		}
	}
	
	public static function get($key, $default = null, $waf = null, $category = '') {
		if (!($waf instanceof wfWAF)) {
			$waf = wfWAF::getInstance();
		}
		
		try {
			return $waf->getStorageEngine()->getConfig($key, $default, $category);
		}
		catch (Exception $e) {
			if (WFWAF_DEBUG) {
				error_log("Exception in " . __CLASS__ . "->" . __FUNCTION__ . ": " . $e->getMessage());
			}
		}
		return $default;
	}
	
	public static function unsetKey($key, $waf = null, $category = '') {
		if (!($waf instanceof wfWAF)) {
			$waf = wfWAF::getInstance();
		}
		
		try {
			$waf->getStorageEngine()->unsetConfig($key, $category);
		}
		catch (Exception $e) {
			if (WFWAF_DEBUG) {
				error_log("Exception in " . __CLASS__ . "->" . __FUNCTION__ . ": " . $e->getMessage());
			}
		}
	}
	
	public static function isInLearningMode($waf = null) {
		if (!($waf instanceof wfWAF)) {
			$waf = wfWAF::getInstance();
		}
		
		try {
			return $waf->getStorageEngine()->isInLearningMode();
		}
		catch (Exception $e) {
			if (WFWAF_DEBUG) {
				error_log("Exception in " . __CLASS__ . "->" . __FUNCTION__ . ": " . $e->getMessage());
			}
		}
		return false;
	}
	
	public static function isDisabled($waf = null) {
		if (!($waf instanceof wfWAF)) {
			$waf = wfWAF::getInstance();
		}
		
		try {
			return $waf->getStorageEngine()->isDisabled();
		}
		catch (Exception $e) {
			if (WFWAF_DEBUG) {
				error_log("Exception in " . __CLASS__ . "->" . __FUNCTION__ . ": " . $e->getMessage());
			}
		}
		return true;
	}
}
}