diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/.gitignore b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/.gitignore new file mode 100644 index 00000000..591254b0 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/.gitignore @@ -0,0 +1 @@ +env.php diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/CHANGELOG b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/CHANGELOG new file mode 100644 index 00000000..c9d8e4b2 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/CHANGELOG @@ -0,0 +1,8 @@ + Cleanup with pbcbf + Change style to PSR2 + Automatically log users in if they have an Okta session already + Use promises for sign-out + Remove templating from sign-in page + Log users out of Okta when they log out of Wordpress + Remove all hardcoded values + Validate OIDC tokens via /token endpoint diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/README.md b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/README.md new file mode 100644 index 00000000..d59f314a --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/README.md @@ -0,0 +1,41 @@ +# WordPress Okta Sign-In Widget + +This plugin replaces the WordPress login screen with the Okta sign-in widget. + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + +This plugin was created to demonstrate the capability of replacing the WordPress login screen with the Okta sign-in widget for [this 2018 blog post](https://developer.okta.com/blog/2018/10/30/wordpress-authentication-with-okta). + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + +This plugin is not supported by Okta, and not updated regularly. + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + +If you would like to use an officially supported Okta WordPress integration, please see [this guide](https://plugins.miniorange.com/okta-single-sign-on-wordpress-sso-oauth-openid-connect) to configuring the [miniOrange WordPress SSO Plugin](https://www.okta.com/integrations/wordpress-oauth-single-sign-on-sso-by-miniorange/) with Okta. + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + + +## Setup Instructions + +After dropping this folder into the WordPress plugins folder and activating the plugin, you should see a new Settings menu where you can configure your Okta settings to enable the plugin. + +Make sure your admin user in WordPress has an email address that matches an Okta user, or enable native WordPress logins, otherwise you'll be locked out of your WordPress after configuring the plugin. + +TODO: + +* Clean up the UX around installing the plugin, like making sure the admin user can still log in after the plugin is activated +* Handle errors better (or at all really) + +## Development Environment + +### Manual + +Install WordPress and move plugin to `wp-content/plugins` directory + +### Docker + +Install Docker and docker-compose and run `docker-compose up` + +Navigate to http://localhost:8080 diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/docker-compose.yml b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/docker-compose.yml new file mode 100644 index 00000000..e614de12 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.1' + +services: + wordpress: + image: wordpress + depends_on: + - mysql + ports: + - 8080:80 + environment: + WORDPRESS_DB_PASSWORD: password + volumes: + - .:/var/www/html/wp-content/plugins/okta-wordpress-sign-in-widget + + mysql: + image: mysql:5.7 + environment: + MYSQL_ROOT_PASSWORD: password diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/initialize-widget.js.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/initialize-widget.js.php new file mode 100644 index 00000000..65df41c2 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/initialize-widget.js.php @@ -0,0 +1,9 @@ + var oktaSignIn = new OktaSignIn({ + baseUrl: '', + redirectUri: '', + clientId: '', + scopes: ''.split(' '), + authParams: { + issuer: '' + } + }); diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/okta-admin.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/okta-admin.php new file mode 100644 index 00000000..b4f0f2b6 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/okta-admin.php @@ -0,0 +1,104 @@ + 'string', + 'show_in_rest' => false, + )); + add_settings_field( + 'okta-issuer-url', + 'Okta Issuer URI', + function() { $this->optionsPageTextInputAction('okta-issuer-url', 'text', 'e.g. https://youroktadomain.okta.com/oauth2/default', 'Find your Issuer URI in the Admin console under Security -> API, or in the Developer console under API -> Authorization Servers'); }, + 'okta-sign-in-widget', + 'okta-sign-in-widget-options-section' + ); + + register_setting('okta-sign-in-widget', 'okta-widget-client-id', array( + 'type' => 'string', + 'show_in_rest' => false, + )); + add_settings_field( + 'okta-widget-client-id', + 'Sign-In Widget Client ID', + function() { $this->optionsPageTextInputAction('okta-widget-client-id', 'text', null, 'Register a "SPA" app in Okta and provide its Client ID here. Set the Login redirect URI in Okta to '.wp_login_url().', and set the Logout redirect URI to '.home_url().''); }, + 'okta-sign-in-widget', + 'okta-sign-in-widget-options-section' + ); + + register_setting('okta-sign-in-widget', 'okta-allow-wordpress-login', array( + 'type' => 'boolean', + 'show_in_rest' => false, + )); + add_settings_field( + 'okta-allow-wordpress-login', + 'Allow Native WordPress Login', + function() { $this->optionsPageCheckboxInputAction('okta-allow-wordpress-login', 'checkbox', 'Check this to allow local WordPress users to log in with a password. When unchecked, Okta will be the only way users can log in. Make sure you have a WordPress admin user with an email address matching an Okta user already.'); }, + 'okta-sign-in-widget', + 'okta-sign-in-widget-options-section' + ); + } + + public function optionsMenuAction() { + add_options_page( + 'Okta Sign-In Widget Options', + 'Okta Sign-In Widget', + 'manage_options', + 'okta-sign-in-widget', + array($this, 'optionsPageAction') + ); + } + + public function optionsPageAction() { + if (current_user_can('manage_options')) { + include(plugin_dir_path(__FILE__)."../templates/options-form.php"); + } else { + wp_die( 'You do not have sufficient permissions to access this page.' ); + } + } + + public function optionsPageTextInputAction($option_name, $type, $placeholder=false, $description=false) { + $option_value = get_option($option_name, ''); + printf( + '', + esc_attr($type), + esc_attr($option_name), + esc_attr($option_name), + esc_attr($option_value), + esc_attr($placeholder) + ); + if($description) + echo '

'.$description.'

'; + } + + public function optionsPageCheckboxInputAction($option_name, $type, $description=false) { + $option_value = get_option($option_name, false); + printf( + '', + esc_attr($type), + esc_attr($option_name), + esc_attr($option_name), + $option_value ? 'checked="checked"' : '' + ); + if($description) + echo '

'.$description.'

'; + } + +} diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/widget.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/widget.php new file mode 100644 index 00000000..903cb03e --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/includes/widget.php @@ -0,0 +1,2 @@ + + diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/okta-widget.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/okta-widget.php new file mode 100644 index 00000000..5b2b52ed --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/okta-widget.php @@ -0,0 +1,226 @@ +OktaAdmin = new OktaAdmin; + + $this->setBaseUrl(); + + // https://developer.wordpress.org/reference/hooks/login_init/ + add_action('login_init', array($this, 'loginAction')); + + // This runs on every pageload to insert content into the HTML section + // https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head + add_action('wp_head', array($this, 'addLogInExistingSessionAction')); + + add_action('init', array($this, 'startSessionAction')); + } + + private function setBaseUrl() + { + if($issuer = get_option('okta-issuer-url')) { + $this->base_url = parse_url($issuer, PHP_URL_SCHEME).'://'.parse_url($issuer, PHP_URL_HOST); + } + } + + private function getIntrospectionEndpoint() { + if($this->introspection_endpoint) + return $this->introspection_endpoint; + + if(!$this->base_url) + return false; + + $response = wp_remote_get(get_option('okta-issuer-url').'/.well-known/openid-configuration'); + if(!$response) + return false; + + $metadata = json_decode($response['body'], true); + if(!$metadata) + return false; + + if(!isset($metadata['introspection_endpoint'])) + return false; + + return $this->introspection_endpoint = $metadata['introspection_endpoint']; + } + + public function startSessionAction() + { + if (session_status() != PHP_SESSION_ACTIVE) { + session_start(); + } + } + + public function addLogInExistingSessionAction() + { + if (!is_user_logged_in()) { + $this->startSessionAction(); + $_SESSION['redirect_to'] = $_SERVER['REQUEST_URI']; + include("templates/log-in-existing-session.php"); + } + } + + private function httpPost($url, $body) + { + $args = array( + 'headers' => array( + 'Accept' => 'application/json', + 'Content-Type' => 'application/x-www-form-urlencoded', + ), + 'body' => $body, + ); + return wp_remote_post($url, $args); + } + + public function loginAction() + { + // Support redirecting back to the page the user was on before they clicked log in + $redirect_to = false; + if (isset($_GET['redirect_to'])) { + $redirect_to = $_GET['redirect_to']; + $_SESSION['redirect_to'] = $_GET['redirect_to']; + } + + // When signing out of WordPress, tell the Okta JS library to log out of Okta as well + if (isset($_GET["action"]) && $_GET["action"] === "logout") { + $this->logUserOutOfOkta(); + } + + if (isset($_GET['log_in_from_id_token'])) { + $this->logUserIntoWordPressWithIDToken($_GET['log_in_from_id_token'], $redirect_to); + exit; + } + + if($this->useWordpressLogin()) { + return; + } + + // If there is no code in the query string, show the Okta sign-in widget + $template = plugin_dir_path(__FILE__) . 'templates/sign-in-form.php'; + load_template($template); + exit; + } + + private function useWordpressLogin() + { + // Always skip showing the Okta widget on POST requests + if($_SERVER['REQUEST_METHOD'] === 'POST') + return true; + + // If the plugin isn't configured yet, don't show the Okta widget + if(!$this->base_url) + return true; + + // null when plugin is not configured, "1"/"0" after + if(get_option('okta-allow-wordpress-login') === null || get_option('okta-allow-wordpress-login') === "1") + { + if(isset($_GET['wordpress_login']) && $_GET['wordpress_login'] == 'true') + return true; + + if(isset($_GET['action']) && $_GET['action'] == 'lostpassword') + return true; + + if(isset($_GET['checkemail'])) + return true; + } + + return false; + } + + private function logUserOutOfOkta() { + $user = wp_get_current_user(); + + wp_clear_auth_cookie(); + + $template = plugin_dir_path(__FILE__) . 'templates/sign-out.php'; + load_template($template); + exit; + } + + private function logUserIntoWordPressWithIDToken($id_token, $redirect_to) + { + $introspection_endpoint = $this->getIntrospectionEndpoint(); + + if(!$this->introspection_endpoint) + die("The plugin is not configured properly. Please double check the Issuer URI in the configuration."); + + /********************************************/ + // [jpf] TODO: Implement client-side id_token validation to speed up the verification process + // (~300ms for /introspect endpoint v. ~5ms for client-side validation) + $payload = array( + 'client_id' => get_option('okta-widget-client-id'), + 'token' => $id_token, + 'token_type_hint' => 'id_token' + ); + $response = $this->httpPost($this->introspection_endpoint, $payload); + if ($response === false) { + die("Invalid id_token received from Okta"); + } + $claims = json_decode($response['body'], true); + if (!$claims['active']) { + die("Okta reports that id_token is not active or client authentication failed:" . $claims['error_description']); + } + /********************************************/ + + $this->logUserIntoWordPressFromEmail($claims, $redirect_to); + } + + private function logUserIntoWordPressFromEmail($claims, $redirect_to) + { + $email = $claims['email']; + + // Find or create the WordPress user for this email address + $user = get_user_by('email', $email); + if (!$user) { + $random_password = wp_generate_password($length = 64, $include_standard_special_chars = false); + $user_id = wp_create_user($email, $random_password, $email); + $user = get_user_by('id', $user_id); + } else { + $user_id = $user->ID; + } + + do_action('okta_widget_before_login', $claims, $user); + + // Actually log the user in now + wp_set_current_user($user_id); + wp_set_auth_cookie($user_id); + error_log("Logging in WordPress user with ID of: " . $user_id); + + // See also: https://developer.wordpress.org/reference/functions/do_action/ + // Run the wp_login actions now that the user is logged in + do_action('wp_login', $user->user_login, $user); + + if (isset($_SESSION['redirect_to'])) { + $redirect_uri = $_SESSION['redirect_to']; + unset($_SESSION['redirect_to']); + } else { + $redirect_uri = home_url(); + } + wp_redirect($redirect_uri); + } +} + +$okta = new OktaSignIn(); diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/log-in-existing-session.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/log-in-existing-session.php new file mode 100644 index 00000000..bad1cc28 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/log-in-existing-session.php @@ -0,0 +1,17 @@ + + + diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/options-form.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/options-form.php new file mode 100644 index 00000000..d7014c3b --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/options-form.php @@ -0,0 +1,9 @@ +
+

Okta Sign-In Widget

+ +
+ + + +
+
diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/sign-in-form.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/sign-in-form.php new file mode 100644 index 00000000..b67256d2 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/sign-in-form.php @@ -0,0 +1,67 @@ + + + + + +
+

Error:

+

+
+ + +
+
+ +
Login via Wordpress
+ +
+ + diff --git a/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/sign-out.php b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/sign-out.php new file mode 100644 index 00000000..14402438 --- /dev/null +++ b/wp/wp-content/plugins/okta-wordpress-sign-in-widget-main/templates/sign-out.php @@ -0,0 +1,16 @@ + + + diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/autoload.php b/wp/wp-content/plugins/wordfence/crypto/vendor/autoload.php deleted file mode 100644 index f28c9c13..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/autoload.php +++ /dev/null @@ -1,9 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - private $vendorDir; - - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - private static $registeredLoaders = array(); - - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/InstalledVersions.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/InstalledVersions.php deleted file mode 100644 index b3a4e161..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,337 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require it's presence, you can require `composer-runtime-api ^2.0` - */ -class InstalledVersions -{ - private static $installed; - private static $canGetVendors; - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints($constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - $installed[] = self::$installed; - - return $installed; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/LICENSE b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/LICENSE deleted file mode 100644 index f27399a0..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_classmap.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_classmap.php deleted file mode 100644 index b26f1b13..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,10 +0,0 @@ - $vendorDir . '/composer/InstalledVersions.php', -); diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_files.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_files.php deleted file mode 100644 index e2ad6e07..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_files.php +++ /dev/null @@ -1,11 +0,0 @@ - $vendorDir . '/paragonie/random_compat/lib/random.php', - '3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php', -); diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_namespaces.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc0125..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInite213e65b2dafae4ad799b13fe0d36f8e::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInite213e65b2dafae4ad799b13fe0d36f8e::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequiree213e65b2dafae4ad799b13fe0d36f8e($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequiree213e65b2dafae4ad799b13fe0d36f8e($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_static.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_static.php deleted file mode 100644 index 9c0b7281..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/autoload_static.php +++ /dev/null @@ -1,25 +0,0 @@ - __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', - '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInite213e65b2dafae4ad799b13fe0d36f8e::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/installed.json b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/installed.json deleted file mode 100644 index 7f2cedcd..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/installed.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "packages": [ - { - "name": "paragonie/random_compat", - "version": "v2.0.21", - "version_normalized": "2.0.21.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", - "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "time": "2022-02-16T17:07:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "install-path": "../paragonie/random_compat" - }, - { - "name": "paragonie/sodium_compat", - "version": "v1.20.0", - "version_normalized": "1.20.0.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "e592a3e06d1fa0d43988c7c7d9948ca836f644b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/e592a3e06d1fa0d43988c7c7d9948ca836f644b6", - "reference": "e592a3e06d1fa0d43988c7c7d9948ca836f644b6", - "shasum": "" - }, - "require": { - "paragonie/random_compat": ">=1", - "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8" - }, - "require-dev": { - "phpunit/phpunit": "^3|^4|^5|^6|^7|^8|^9" - }, - "suggest": { - "ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.", - "ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security." - }, - "time": "2023-04-30T00:54:53+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "autoload.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com" - }, - { - "name": "Frank Denis", - "email": "jedisct1@pureftpd.org" - } - ], - "description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists", - "keywords": [ - "Authentication", - "BLAKE2b", - "ChaCha20", - "ChaCha20-Poly1305", - "Chapoly", - "Curve25519", - "Ed25519", - "EdDSA", - "Edwards-curve Digital Signature Algorithm", - "Elliptic Curve Diffie-Hellman", - "Poly1305", - "Pure-PHP cryptography", - "RFC 7748", - "RFC 8032", - "Salpoly", - "Salsa20", - "X25519", - "XChaCha20-Poly1305", - "XSalsa20-Poly1305", - "Xchacha20", - "Xsalsa20", - "aead", - "cryptography", - "ecdh", - "elliptic curve", - "elliptic curve cryptography", - "encryption", - "libsodium", - "php", - "public-key cryptography", - "secret-key cryptography", - "side-channel resistant" - ], - "support": { - "issues": "https://github.com/paragonie/sodium_compat/issues", - "source": "https://github.com/paragonie/sodium_compat/tree/v1.20.0" - }, - "install-path": "../paragonie/sodium_compat" - } - ], - "dev": true, - "dev-package-names": [] -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/installed.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/installed.php deleted file mode 100644 index 91a702ee..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/installed.php +++ /dev/null @@ -1,41 +0,0 @@ - array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => '4dbf15a23f788f9f3a3e57f5971bf957e5f9ba01', - 'name' => '__root__', - 'dev' => true, - ), - 'versions' => array( - '__root__' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => '4dbf15a23f788f9f3a3e57f5971bf957e5f9ba01', - 'dev_requirement' => false, - ), - 'paragonie/random_compat' => array( - 'pretty_version' => 'v2.0.21', - 'version' => '2.0.21.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../paragonie/random_compat', - 'aliases' => array(), - 'reference' => '96c132c7f2f7bc3230723b66e89f8f150b29d5ae', - 'dev_requirement' => false, - ), - 'paragonie/sodium_compat' => array( - 'pretty_version' => 'v1.20.0', - 'version' => '1.20.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../paragonie/sodium_compat', - 'aliases' => array(), - 'reference' => 'e592a3e06d1fa0d43988c7c7d9948ca836f644b6', - 'dev_requirement' => false, - ), - ), -); diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/platform_check.php b/wp/wp-content/plugins/wordfence/crypto/vendor/composer/platform_check.php deleted file mode 100644 index dd5ca483..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 50204)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 5.2.4". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/LICENSE b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/LICENSE deleted file mode 100644 index 45c7017d..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Paragon Initiative Enterprises - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey deleted file mode 100644 index eb50ebfc..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PUBLIC KEY----- -MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm -pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p -+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc ------END PUBLIC KEY----- diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc deleted file mode 100644 index 6a1d7f30..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (MingW32) - -iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip -QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg -1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW -NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA -NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV -JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= -=B6+8 ------END PGP SIGNATURE----- diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/byte_safe_strings.php deleted file mode 100644 index ea304d40..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/byte_safe_strings.php +++ /dev/null @@ -1,196 +0,0 @@ - RandomCompat_strlen($binary_string)) { - return ''; - } - - return (string) mb_substr( - (string) $binary_string, - (int) $start, - (int) $length, - '8bit' - ); - } - - } else { - - /** - * substr() implementation that isn't brittle to mbstring.func_overload - * - * This version just uses the default substr() - * - * @param string $binary_string - * @param int $start - * @param int|null $length (optional) - * - * @throws TypeError - * - * @return string - */ - function RandomCompat_substr($binary_string, $start, $length = null) - { - if (!is_string($binary_string)) { - throw new TypeError( - 'RandomCompat_substr(): First argument should be a string' - ); - } - - if (!is_int($start)) { - throw new TypeError( - 'RandomCompat_substr(): Second argument should be an integer' - ); - } - - if ($length !== null) { - if (!is_int($length)) { - throw new TypeError( - 'RandomCompat_substr(): Third argument should be an integer, or omitted' - ); - } - - return (string) substr( - (string )$binary_string, - (int) $start, - (int) $length - ); - } - - return (string) substr( - (string) $binary_string, - (int) $start - ); - } - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/cast_to_int.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/cast_to_int.php deleted file mode 100644 index 9eb9a029..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/cast_to_int.php +++ /dev/null @@ -1,78 +0,0 @@ - operators might accidentally let a float - * through. - * - * @param int|float $number The number we want to convert to an int - * @param bool $fail_open Set to true to not throw an exception - * - * @return float|int - * @psalm-suppress InvalidReturnType - * - * @throws TypeError - */ - function RandomCompat_intval($number, $fail_open = false) - { - if (is_int($number) || is_float($number)) { - $number += 0; - } elseif (is_numeric($number)) { - /** @psalm-suppress InvalidOperand */ - $number += 0; - } - /** @var int|float $number */ - - if ( - is_float($number) - && - $number > ~PHP_INT_MAX - && - $number < PHP_INT_MAX - ) { - $number = (int) $number; - } - - if (is_int($number)) { - return (int) $number; - } elseif (!$fail_open) { - throw new TypeError( - 'Expected an integer.' - ); - } - return $number; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/error_polyfill.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/error_polyfill.php deleted file mode 100644 index c5e2b7a0..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/error_polyfill.php +++ /dev/null @@ -1,50 +0,0 @@ -= 70000) { - return; -} - -if (!defined('RANDOM_COMPAT_READ_BUFFER')) { - define('RANDOM_COMPAT_READ_BUFFER', 8); -} - -$RandomCompatDIR = dirname(__FILE__); - -require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'byte_safe_strings.php'; -require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'cast_to_int.php'; -require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'error_polyfill.php'; - -if (!is_callable('random_bytes')) { - /** - * PHP 5.2.0 - 5.6.x way to implement random_bytes() - * - * We use conditional statements here to define the function in accordance - * to the operating environment. It's a micro-optimization. - * - * In order of preference: - * 1. Use libsodium if available. - * 2. fread() /dev/urandom if available (never on Windows) - * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) - * 4. COM('CAPICOM.Utilities.1')->GetRandom() - * - * See RATIONALE.md for our reasoning behind this particular order - */ - if (extension_loaded('libsodium')) { - // See random_bytes_libsodium.php - if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { - require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_libsodium.php'; - } elseif (method_exists('Sodium', 'randombytes_buf')) { - require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_libsodium_legacy.php'; - } - } - - /** - * Reading directly from /dev/urandom: - */ - if (DIRECTORY_SEPARATOR === '/') { - // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast - // way to exclude Windows. - $RandomCompatUrandom = true; - $RandomCompat_basedir = ini_get('open_basedir'); - - if (!empty($RandomCompat_basedir)) { - $RandomCompat_open_basedir = explode( - PATH_SEPARATOR, - strtolower($RandomCompat_basedir) - ); - $RandomCompatUrandom = (array() !== array_intersect( - array('/dev', '/dev/', '/dev/urandom'), - $RandomCompat_open_basedir - )); - $RandomCompat_open_basedir = null; - } - - if ( - !is_callable('random_bytes') - && - $RandomCompatUrandom - && - @is_readable('/dev/urandom') - ) { - // Error suppression on is_readable() in case of an open_basedir - // or safe_mode failure. All we care about is whether or not we - // can read it at this point. If the PHP environment is going to - // panic over trying to see if the file can be read in the first - // place, that is not helpful to us here. - - // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_dev_urandom.php'; - } - // Unset variables after use - $RandomCompat_basedir = null; - } else { - $RandomCompatUrandom = false; - } - - /** - * mcrypt_create_iv() - * - * We only want to use mcypt_create_iv() if: - * - * - random_bytes() hasn't already been defined - * - the mcrypt extensions is loaded - * - One of these two conditions is true: - * - We're on Windows (DIRECTORY_SEPARATOR !== '/') - * - We're not on Windows and /dev/urandom is readabale - * (i.e. we're not in a chroot jail) - * - Special case: - * - If we're not on Windows, but the PHP version is between - * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will - * hang indefinitely. This is bad. - * - If we're on Windows, we want to use PHP >= 5.3.7 or else - * we get insufficient entropy errors. - */ - if ( - !is_callable('random_bytes') - && - // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. - (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) - && - // Prevent this code from hanging indefinitely on non-Windows; - // see https://bugs.php.net/bug.php?id=69833 - ( - DIRECTORY_SEPARATOR !== '/' || - (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) - ) - && - extension_loaded('mcrypt') - ) { - // See random_bytes_mcrypt.php - require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_mcrypt.php'; - } - $RandomCompatUrandom = null; - - /** - * This is a Windows-specific fallback, for when the mcrypt extension - * isn't loaded. - */ - if ( - !is_callable('random_bytes') - && - extension_loaded('com_dotnet') - && - class_exists('COM') - ) { - $RandomCompat_disabled_classes = preg_split( - '#\s*,\s*#', - strtolower(ini_get('disable_classes')) - ); - - if (!in_array('com', $RandomCompat_disabled_classes)) { - try { - $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); - /** @psalm-suppress TypeDoesNotContainType */ - if (is_callable(array($RandomCompatCOMtest, 'GetRandom'))) { - // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_com_dotnet.php'; - } - } catch (com_exception $e) { - // Don't try to use it. - } - } - $RandomCompat_disabled_classes = null; - $RandomCompatCOMtest = null; - } - - /** - * throw new Exception - */ - if (!is_callable('random_bytes')) { - /** - * We don't have any more options, so let's throw an exception right now - * and hope the developer won't let it fail silently. - * - * @param mixed $length - * @psalm-suppress InvalidReturnType - * @throws Exception - * @return string - */ - function random_bytes($length) - { - unset($length); // Suppress "variable not used" warnings. - throw new Exception( - 'There is no suitable CSPRNG installed on your system' - ); - return ''; - } - } -} - -if (!is_callable('random_int')) { - require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_int.php'; -} - -$RandomCompatDIR = null; diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php deleted file mode 100644 index 8fdd0fa2..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +++ /dev/null @@ -1,92 +0,0 @@ -GetRandom($bytes, 0)); - if (RandomCompat_strlen($buf) >= $bytes) { - /** - * Return our random entropy buffer here: - */ - return (string) RandomCompat_substr($buf, 0, $bytes); - } - ++$execCount; - } while ($execCount < $bytes); - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php deleted file mode 100644 index 5472377c..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +++ /dev/null @@ -1,191 +0,0 @@ - $st */ - $st = fstat($fp); - if (($st['mode'] & 0170000) !== 020000) { - fclose($fp); - $fp = false; - } - } - } - - if (is_resource($fp)) { - /** - * stream_set_read_buffer() does not exist in HHVM - * - * If we don't set the stream's read buffer to 0, PHP will - * internally buffer 8192 bytes, which can waste entropy - * - * stream_set_read_buffer returns 0 on success - */ - if (is_callable('stream_set_read_buffer')) { - stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER); - } - if (is_callable('stream_set_chunk_size')) { - stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER); - } - } - } - - try { - /** @var int $bytes */ - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - - /** - * This if() block only runs if we managed to open a file handle - * - * It does not belong in an else {} block, because the above - * if (empty($fp)) line is logic that should only be run once per - * page load. - */ - if (is_resource($fp)) { - /** - * @var int - */ - $remaining = $bytes; - - /** - * @var string|bool - */ - $buf = ''; - - /** - * We use fread() in a loop to protect against partial reads - */ - do { - /** - * @var string|bool - */ - $read = fread($fp, $remaining); - if (!is_string($read)) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - * - * @var string|bool - */ - $buf = false; - break; - } - /** - * Decrease the number of bytes returned from remaining - */ - $remaining -= RandomCompat_strlen($read); - /** - * @var string $buf - */ - $buf .= $read; - } while ($remaining > 0); - - /** - * Is our result valid? - * @var string|bool $buf - */ - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - /** - * Return our random entropy buffer here: - */ - return $buf; - } - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Error reading from source device' - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php deleted file mode 100644 index b55fbbee..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ /dev/null @@ -1,92 +0,0 @@ - 2147483647) { - $buf = ''; - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= \Sodium\randombytes_buf($n); - } - } else { - /** @var string|bool $buf */ - $buf = \Sodium\randombytes_buf($bytes); - } - - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php deleted file mode 100644 index d4aa36ad..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php +++ /dev/null @@ -1,94 +0,0 @@ - 2147483647) { - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= Sodium::randombytes_buf((int) $n); - } - } else { - $buf .= Sodium::randombytes_buf((int) $bytes); - } - - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php deleted file mode 100644 index b7a4615a..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +++ /dev/null @@ -1,80 +0,0 @@ - operators might accidentally let a float - * through. - */ - - try { - /** @var int $min */ - $min = RandomCompat_intval($min); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $min must be an integer' - ); - } - - try { - /** @var int $max */ - $max = RandomCompat_intval($max); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $max must be an integer' - ); - } - - /** - * Now that we've verified our weak typing system has given us an integer, - * let's validate the logic then we can move forward with generating random - * integers along a given range. - */ - if ($min > $max) { - throw new Error( - 'Minimum value must be less than or equal to the maximum value' - ); - } - - if ($max === $min) { - return (int) $min; - } - - /** - * Initialize variables to 0 - * - * We want to store: - * $bytes => the number of random bytes we need - * $mask => an integer bitmask (for use with the &) operator - * so we can minimize the number of discards - */ - $attempts = $bits = $bytes = $mask = $valueShift = 0; - /** @var int $attempts */ - /** @var int $bits */ - /** @var int $bytes */ - /** @var int $mask */ - /** @var int $valueShift */ - - /** - * At this point, $range is a positive number greater than 0. It might - * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to - * a float and we will lose some precision. - * - * @var int|float $range - */ - $range = $max - $min; - - /** - * Test for integer overflow: - */ - if (!is_int($range)) { - - /** - * Still safely calculate wider ranges. - * Provided by @CodesInChaos, @oittaa - * - * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 - * - * We use ~0 as a mask in this case because it generates all 1s - * - * @ref https://eval.in/400356 (32-bit) - * @ref http://3v4l.org/XX9r5 (64-bit) - */ - $bytes = PHP_INT_SIZE; - /** @var int $mask */ - $mask = ~0; - - } else { - - /** - * $bits is effectively ceil(log($range, 2)) without dealing with - * type juggling - */ - while ($range > 0) { - if ($bits % 8 === 0) { - ++$bytes; - } - ++$bits; - $range >>= 1; - /** @var int $mask */ - $mask = $mask << 1 | 1; - } - $valueShift = $min; - } - - /** @var int $val */ - $val = 0; - /** - * Now that we have our parameters set up, let's begin generating - * random integers until one falls between $min and $max - */ - /** @psalm-suppress RedundantCondition */ - do { - /** - * The rejection probability is at most 0.5, so this corresponds - * to a failure probability of 2^-128 for a working RNG - */ - if ($attempts > 128) { - throw new Exception( - 'random_int: RNG is broken - too many rejections' - ); - } - - /** - * Let's grab the necessary number of random bytes - */ - $randomByteString = random_bytes($bytes); - - /** - * Let's turn $randomByteString into an integer - * - * This uses bitwise operators (<< and |) to build an integer - * out of the values extracted from ord() - * - * Example: [9F] | [6D] | [32] | [0C] => - * 159 + 27904 + 3276800 + 201326592 => - * 204631455 - */ - $val &= 0; - for ($i = 0; $i < $bytes; ++$i) { - $val |= ord($randomByteString[$i]) << ($i * 8); - } - /** @var int $val */ - - /** - * Apply mask - */ - $val &= $mask; - $val += $valueShift; - - ++$attempts; - /** - * If $val overflows to a floating point number, - * ... or is larger than $max, - * ... or smaller than $min, - * then try again. - */ - } while (!is_int($val) || $val > $max || $val < $min); - - return (int) $val; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/LICENSE b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/LICENSE deleted file mode 100644 index af760a7b..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) 2016-2023, Paragon Initiative Enterprises -Copyright (c) 2013-2019, Frank Denis - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/autoload-php7.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/autoload-php7.php deleted file mode 100644 index 5187c576..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/autoload-php7.php +++ /dev/null @@ -1,32 +0,0 @@ -= 50300) { - // Namespaces didn't exist before 5.3.0, so don't even try to use this - // unless PHP >= 5.3.0 - require_once dirname(__FILE__) . '/lib/namespaced.php'; - require_once dirname(__FILE__) . '/lib/sodium_compat.php'; -} else { - require_once dirname(__FILE__) . '/src/PHP52/SplFixedArray.php'; -} -if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) { - if (PHP_VERSION_ID >= 50300 && !defined('SODIUM_CRYPTO_SCALARMULT_BYTES')) { - require_once dirname(__FILE__) . '/lib/php72compat_const.php'; - } - if (PHP_VERSION_ID >= 70000) { - assert(class_exists('ParagonIE_Sodium_Compat'), 'Possible filesystem/autoloader bug?'); - } else { - assert(class_exists('ParagonIE_Sodium_Compat')); - } - require_once(dirname(__FILE__) . '/lib/php72compat.php'); -} elseif (!function_exists('sodium_crypto_stream_xchacha20_xor')) { - // Older versions of {PHP, ext/sodium} will not define these - require_once(dirname(__FILE__) . '/lib/php72compat.php'); -} -require_once(dirname(__FILE__) . '/lib/stream-xchacha20.php'); -require_once(dirname(__FILE__) . '/lib/ristretto255.php'); diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/composer-php52.json b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/composer-php52.json deleted file mode 100644 index 9547d0d1..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/composer-php52.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "paragonie/sodium_compat", - "description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists", - "keywords": [ - "PHP", - "cryptography", - "elliptic curve", - "elliptic curve cryptography", - "Pure-PHP cryptography", - "side-channel resistant", - "Curve25519", - "X25519", - "ECDH", - "Elliptic Curve Diffie-Hellman", - "Ed25519", - "RFC 7748", - "RFC 8032", - "EdDSA", - "Edwards-curve Digital Signature Algorithm", - "ChaCha20", - "Salsa20", - "Xchacha20", - "Xsalsa20", - "Poly1305", - "BLAKE2b", - "public-key cryptography", - "secret-key cryptography", - "AEAD", - "Chapoly", - "Salpoly", - "ChaCha20-Poly1305", - "XSalsa20-Poly1305", - "XChaCha20-Poly1305", - "encryption", - "authentication", - "libsodium" - ], - "license": "ISC", - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com" - }, - { - "name": "Frank Denis", - "email": "jedisct1@pureftpd.org" - } - ], - "autoload": { - "files": ["autoload.php"] - }, - "repositories": [ - { - "type": "git", - "url": "https://github.com/garex/phpunit" - }, - { - "type": "git", - "url": "https://github.com/garex/phpunit-mock-objects" - } - ], - "require": { - "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8", - "xrstf/composer-php52": "1.*", - "paragonie/random_compat": ">=1" - }, - "minimum-stability": "dev", - "require-dev": { - "phpunit/phpunit-php52": "dev-3.6.12-php52", - "phpunit/phpunit-mock-objects-php52": "dev-1.1.0-php52" - }, - "scripts": { - "post-install-cmd": [ - "xrstf\\Composer52\\Generator::onPostInstallCmd" - ], - "post-update-cmd": [ - "xrstf\\Composer52\\Generator::onPostInstallCmd" - ], - "post-autoload-dump": [ - "xrstf\\Composer52\\Generator::onPostInstallCmd" - ] - }, - "suggest": { - "ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.", - "ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security." - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/lib/constants.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/lib/constants.php deleted file mode 100644 index cfe03ac4..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/lib/constants.php +++ /dev/null @@ -1,53 +0,0 @@ -getMessage() === 'AES-256-GCM is not available')) { - throw $ex; - } - return false; - } - } -} -if (!is_callable('sodium_crypto_aead_aes256gcm_encrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt() - * @param string $message - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_aead_aes256gcm_encrypt($message, $additional_data, $nonce, $key) - { - return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt($message, $additional_data, $nonce, $key); - } -} -if (!is_callable('sodium_crypto_aead_aes256gcm_is_available')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available() - * @return bool - */ - function sodium_crypto_aead_aes256gcm_is_available() - { - return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available(); - } -} -if (!is_callable('sodium_crypto_aead_chacha20poly1305_decrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt() - * @param string $ciphertext - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string|bool - */ - function sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key) - { - try { - return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt( - $ciphertext, - $additional_data, - $nonce, - $key - ); - } catch (Error $ex) { - return false; - } catch (Exception $ex) { - return false; - } - } -} -if (!is_callable('sodium_crypto_aead_chacha20poly1305_encrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt() - * @param string $message - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key) - { - return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt( - $message, - $additional_data, - $nonce, - $key - ); - } -} -if (!is_callable('sodium_crypto_aead_chacha20poly1305_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_aead_chacha20poly1305_keygen() - { - return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_keygen(); - } -} -if (!is_callable('sodium_crypto_aead_chacha20poly1305_ietf_decrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt() - * @param string $message - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string|bool - */ - function sodium_crypto_aead_chacha20poly1305_ietf_decrypt($message, $additional_data, $nonce, $key) - { - try { - return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt( - $message, - $additional_data, - $nonce, - $key - ); - } catch (Error $ex) { - return false; - } catch (Exception $ex) { - return false; - } - } -} -if (!is_callable('sodium_crypto_aead_chacha20poly1305_ietf_encrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt() - * @param string $message - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key) - { - return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt( - $message, - $additional_data, - $nonce, - $key - ); - } -} -if (!is_callable('sodium_crypto_aead_chacha20poly1305_ietf_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_aead_chacha20poly1305_ietf_keygen() - { - return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_keygen(); - } -} -if (!is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_decrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt() - * @param string $ciphertext - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string|bool - */ - function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key) - { - try { - return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt( - $ciphertext, - $additional_data, - $nonce, - $key, - true - ); - } catch (Error $ex) { - return false; - } catch (Exception $ex) { - return false; - } - } -} -if (!is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_encrypt')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt() - * @param string $message - * @param string $additional_data - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt( - $message, - $additional_data, - $nonce, - $key - ) { - return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt( - $message, - $additional_data, - $nonce, - $key, - true - ); - } -} -if (!is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_aead_xchacha20poly1305_ietf_keygen() - { - return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_keygen(); - } -} -if (!is_callable('sodium_crypto_auth')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_auth() - * @param string $message - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_auth($message, $key) - { - return ParagonIE_Sodium_Compat::crypto_auth($message, $key); - } -} -if (!is_callable('sodium_crypto_auth_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_auth_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_auth_keygen() - { - return ParagonIE_Sodium_Compat::crypto_auth_keygen(); - } -} -if (!is_callable('sodium_crypto_auth_verify')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_auth_verify() - * @param string $mac - * @param string $message - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_auth_verify($mac, $message, $key) - { - return ParagonIE_Sodium_Compat::crypto_auth_verify($mac, $message, $key); - } -} -if (!is_callable('sodium_crypto_box')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box() - * @param string $message - * @param string $nonce - * @param string $key_pair - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box($message, $nonce, $key_pair) - { - return ParagonIE_Sodium_Compat::crypto_box($message, $nonce, $key_pair); - } -} -if (!is_callable('sodium_crypto_box_keypair')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_keypair() - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_keypair() - { - return ParagonIE_Sodium_Compat::crypto_box_keypair(); - } -} -if (!is_callable('sodium_crypto_box_keypair_from_secretkey_and_publickey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey() - * @param string $secret_key - * @param string $public_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_keypair_from_secretkey_and_publickey($secret_key, $public_key) - { - return ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey($secret_key, $public_key); - } -} -if (!is_callable('sodium_crypto_box_open')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_open() - * @param string $ciphertext - * @param string $nonce - * @param string $key_pair - * @return string|bool - */ - function sodium_crypto_box_open($ciphertext, $nonce, $key_pair) - { - try { - return ParagonIE_Sodium_Compat::crypto_box_open($ciphertext, $nonce, $key_pair); - } catch (Error $ex) { - return false; - } catch (Exception $ex) { - return false; - } - } -} -if (!is_callable('sodium_crypto_box_publickey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_publickey() - * @param string $key_pair - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_publickey($key_pair) - { - return ParagonIE_Sodium_Compat::crypto_box_publickey($key_pair); - } -} -if (!is_callable('sodium_crypto_box_publickey_from_secretkey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey() - * @param string $secret_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_publickey_from_secretkey($secret_key) - { - return ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey($secret_key); - } -} -if (!is_callable('sodium_crypto_box_seal')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_seal() - * @param string $message - * @param string $public_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_seal($message, $public_key) - { - return ParagonIE_Sodium_Compat::crypto_box_seal($message, $public_key); - } -} -if (!is_callable('sodium_crypto_box_seal_open')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_seal_open() - * @param string $message - * @param string $key_pair - * @return string|bool - * @throws SodiumException - */ - function sodium_crypto_box_seal_open($message, $key_pair) - { - try { - return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $key_pair); - } catch (SodiumException $ex) { - if ($ex->getMessage() === 'Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.') { - throw $ex; - } - return false; - } - } -} -if (!is_callable('sodium_crypto_box_secretkey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_secretkey() - * @param string $key_pair - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_secretkey($key_pair) - { - return ParagonIE_Sodium_Compat::crypto_box_secretkey($key_pair); - } -} -if (!is_callable('sodium_crypto_box_seed_keypair')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_box_seed_keypair() - * @param string $seed - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_box_seed_keypair($seed) - { - return ParagonIE_Sodium_Compat::crypto_box_seed_keypair($seed); - } -} -if (!is_callable('sodium_crypto_generichash')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_generichash() - * @param string $message - * @param string|null $key - * @param int $length - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_generichash($message, $key = null, $length = 32) - { - return ParagonIE_Sodium_Compat::crypto_generichash($message, $key, $length); - } -} -if (!is_callable('sodium_crypto_generichash_final')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_generichash_final() - * @param string|null $state - * @param int $outputLength - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_generichash_final(&$state, $outputLength = 32) - { - return ParagonIE_Sodium_Compat::crypto_generichash_final($state, $outputLength); - } -} -if (!is_callable('sodium_crypto_generichash_init')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_generichash_init() - * @param string|null $key - * @param int $length - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_generichash_init($key = null, $length = 32) - { - return ParagonIE_Sodium_Compat::crypto_generichash_init($key, $length); - } -} -if (!is_callable('sodium_crypto_generichash_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_generichash_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_generichash_keygen() - { - return ParagonIE_Sodium_Compat::crypto_generichash_keygen(); - } -} -if (!is_callable('sodium_crypto_generichash_update')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_generichash_update() - * @param string|null $state - * @param string $message - * @return void - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_generichash_update(&$state, $message = '') - { - ParagonIE_Sodium_Compat::crypto_generichash_update($state, $message); - } -} -if (!is_callable('sodium_crypto_kdf_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_kdf_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_kdf_keygen() - { - return ParagonIE_Sodium_Compat::crypto_kdf_keygen(); - } -} -if (!is_callable('sodium_crypto_kdf_derive_from_key')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_kdf_derive_from_key() - * @param int $subkey_length - * @param int $subkey_id - * @param string $context - * @param string $key - * @return string - * @throws Exception - */ - function sodium_crypto_kdf_derive_from_key($subkey_length, $subkey_id, $context, $key) - { - return ParagonIE_Sodium_Compat::crypto_kdf_derive_from_key( - $subkey_length, - $subkey_id, - $context, - $key - ); - } -} -if (!is_callable('sodium_crypto_kx')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_kx() - * @param string $my_secret - * @param string $their_public - * @param string $client_public - * @param string $server_public - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_kx($my_secret, $their_public, $client_public, $server_public) - { - return ParagonIE_Sodium_Compat::crypto_kx( - $my_secret, - $their_public, - $client_public, - $server_public - ); - } -} -if (!is_callable('sodium_crypto_kx_seed_keypair')) { - /** - * @param string $seed - * @return string - * @throws Exception - */ - function sodium_crypto_kx_seed_keypair($seed) - { - return ParagonIE_Sodium_Compat::crypto_kx_seed_keypair($seed); - } -} -if (!is_callable('sodium_crypto_kx_keypair')) { - /** - * @return string - * @throws Exception - */ - function sodium_crypto_kx_keypair() - { - return ParagonIE_Sodium_Compat::crypto_kx_keypair(); - } -} -if (!is_callable('sodium_crypto_kx_client_session_keys')) { - /** - * @param string $client_key_pair - * @param string $server_key - * @return array{0: string, 1: string} - * @throws SodiumException - */ - function sodium_crypto_kx_client_session_keys($client_key_pair, $server_key) - { - return ParagonIE_Sodium_Compat::crypto_kx_client_session_keys($client_key_pair, $server_key); - } -} -if (!is_callable('sodium_crypto_kx_server_session_keys')) { - /** - * @param string $server_key_pair - * @param string $client_key - * @return array{0: string, 1: string} - * @throws SodiumException - */ - function sodium_crypto_kx_server_session_keys($server_key_pair, $client_key) - { - return ParagonIE_Sodium_Compat::crypto_kx_server_session_keys($server_key_pair, $client_key); - } -} -if (!is_callable('sodium_crypto_kx_secretkey')) { - /** - * @param string $key_pair - * @return string - * @throws Exception - */ - function sodium_crypto_kx_secretkey($key_pair) - { - return ParagonIE_Sodium_Compat::crypto_kx_secretkey($key_pair); - } -} -if (!is_callable('sodium_crypto_kx_publickey')) { - /** - * @param string $key_pair - * @return string - * @throws Exception - */ - function sodium_crypto_kx_publickey($key_pair) - { - return ParagonIE_Sodium_Compat::crypto_kx_publickey($key_pair); - } -} -if (!is_callable('sodium_crypto_pwhash')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash() - * @param int $length - * @param string $passwd - * @param string $salt - * @param int $opslimit - * @param int $memlimit - * @param int|null $algo - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_pwhash($length, $passwd, $salt, $opslimit, $memlimit, $algo = null) - { - return ParagonIE_Sodium_Compat::crypto_pwhash($length, $passwd, $salt, $opslimit, $memlimit, $algo); - } -} -if (!is_callable('sodium_crypto_pwhash_str')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash_str() - * @param string $passwd - * @param int $opslimit - * @param int $memlimit - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_pwhash_str($passwd, $opslimit, $memlimit) - { - return ParagonIE_Sodium_Compat::crypto_pwhash_str($passwd, $opslimit, $memlimit); - } -} -if (!is_callable('sodium_crypto_pwhash_str_needs_rehash')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash_str_needs_rehash() - * @param string $hash - * @param int $opslimit - * @param int $memlimit - * @return bool - * - * @throws SodiumException - */ - function sodium_crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit) - { - return ParagonIE_Sodium_Compat::crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit); - } -} -if (!is_callable('sodium_crypto_pwhash_str_verify')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash_str_verify() - * @param string $passwd - * @param string $hash - * @return bool - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_pwhash_str_verify($passwd, $hash) - { - return ParagonIE_Sodium_Compat::crypto_pwhash_str_verify($passwd, $hash); - } -} -if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256() - * @param int $length - * @param string $passwd - * @param string $salt - * @param int $opslimit - * @param int $memlimit - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_pwhash_scryptsalsa208sha256($length, $passwd, $salt, $opslimit, $memlimit) - { - return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256( - $length, - $passwd, - $salt, - $opslimit, - $memlimit - ); - } -} -if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256_str')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str() - * @param string $passwd - * @param int $opslimit - * @param int $memlimit - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit) - { - return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit); - } -} -if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256_str_verify')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify() - * @param string $passwd - * @param string $hash - * @return bool - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash) - { - return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash); - } -} -if (!is_callable('sodium_crypto_scalarmult')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_scalarmult() - * @param string $n - * @param string $p - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_scalarmult($n, $p) - { - return ParagonIE_Sodium_Compat::crypto_scalarmult($n, $p); - } -} -if (!is_callable('sodium_crypto_scalarmult_base')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_scalarmult_base() - * @param string $n - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_scalarmult_base($n) - { - return ParagonIE_Sodium_Compat::crypto_scalarmult_base($n); - } -} -if (!is_callable('sodium_crypto_secretbox')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_secretbox() - * @param string $message - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_secretbox($message, $nonce, $key) - { - return ParagonIE_Sodium_Compat::crypto_secretbox($message, $nonce, $key); - } -} -if (!is_callable('sodium_crypto_secretbox_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_secretbox_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_secretbox_keygen() - { - return ParagonIE_Sodium_Compat::crypto_secretbox_keygen(); - } -} -if (!is_callable('sodium_crypto_secretbox_open')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_secretbox_open() - * @param string $ciphertext - * @param string $nonce - * @param string $key - * @return string|bool - */ - function sodium_crypto_secretbox_open($ciphertext, $nonce, $key) - { - try { - return ParagonIE_Sodium_Compat::crypto_secretbox_open($ciphertext, $nonce, $key); - } catch (Error $ex) { - return false; - } catch (Exception $ex) { - return false; - } - } -} -if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_init_push')) { - /** - * @param string $key - * @return array - * @throws SodiumException - */ - function sodium_crypto_secretstream_xchacha20poly1305_init_push($key) - { - return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_push($key); - } -} -if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_push')) { - /** - * @param string $state - * @param string $message - * @param string $additional_data - * @param int $tag - * @return string - * @throws SodiumException - */ - function sodium_crypto_secretstream_xchacha20poly1305_push( - &$state, - $message, - $additional_data = '', - $tag = 0 - ) { - return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_push( - $state, - $message, - $additional_data, - $tag - ); - } -} -if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_init_pull')) { - /** - * @param string $header - * @param string $key - * @return string - * @throws Exception - */ - function sodium_crypto_secretstream_xchacha20poly1305_init_pull($header, $key) - { - return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_pull($header, $key); - } -} -if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_pull')) { - /** - * @param string $state - * @param string $ciphertext - * @param string $additional_data - * @return bool|array{0: string, 1: int} - * @throws SodiumException - */ - function sodium_crypto_secretstream_xchacha20poly1305_pull(&$state, $ciphertext, $additional_data = '') - { - return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_pull( - $state, - $ciphertext, - $additional_data - ); - } -} -if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_rekey')) { - /** - * @param string $state - * @return void - * @throws SodiumException - */ - function sodium_crypto_secretstream_xchacha20poly1305_rekey(&$state) - { - ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_rekey($state); - } -} -if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_keygen')) { - /** - * @return string - * @throws Exception - */ - function sodium_crypto_secretstream_xchacha20poly1305_keygen() - { - return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_keygen(); - } -} -if (!is_callable('sodium_crypto_shorthash')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_shorthash() - * @param string $message - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_shorthash($message, $key = '') - { - return ParagonIE_Sodium_Compat::crypto_shorthash($message, $key); - } -} -if (!is_callable('sodium_crypto_shorthash_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_shorthash_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_shorthash_keygen() - { - return ParagonIE_Sodium_Compat::crypto_shorthash_keygen(); - } -} -if (!is_callable('sodium_crypto_sign')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign() - * @param string $message - * @param string $secret_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign($message, $secret_key) - { - return ParagonIE_Sodium_Compat::crypto_sign($message, $secret_key); - } -} -if (!is_callable('sodium_crypto_sign_detached')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_detached() - * @param string $message - * @param string $secret_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_detached($message, $secret_key) - { - return ParagonIE_Sodium_Compat::crypto_sign_detached($message, $secret_key); - } -} -if (!is_callable('sodium_crypto_sign_keypair_from_secretkey_and_publickey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_keypair_from_secretkey_and_publickey() - * @param string $secret_key - * @param string $public_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_keypair_from_secretkey_and_publickey($secret_key, $public_key) - { - return ParagonIE_Sodium_Compat::crypto_sign_keypair_from_secretkey_and_publickey($secret_key, $public_key); - } -} -if (!is_callable('sodium_crypto_sign_keypair')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_keypair() - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_keypair() - { - return ParagonIE_Sodium_Compat::crypto_sign_keypair(); - } -} -if (!is_callable('sodium_crypto_sign_open')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_open() - * @param string $signedMessage - * @param string $public_key - * @return string|bool - */ - function sodium_crypto_sign_open($signedMessage, $public_key) - { - try { - return ParagonIE_Sodium_Compat::crypto_sign_open($signedMessage, $public_key); - } catch (Error $ex) { - return false; - } catch (Exception $ex) { - return false; - } - } -} -if (!is_callable('sodium_crypto_sign_publickey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_publickey() - * @param string $key_pair - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_publickey($key_pair) - { - return ParagonIE_Sodium_Compat::crypto_sign_publickey($key_pair); - } -} -if (!is_callable('sodium_crypto_sign_publickey_from_secretkey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey() - * @param string $secret_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_publickey_from_secretkey($secret_key) - { - return ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey($secret_key); - } -} -if (!is_callable('sodium_crypto_sign_secretkey')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_secretkey() - * @param string $key_pair - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_secretkey($key_pair) - { - return ParagonIE_Sodium_Compat::crypto_sign_secretkey($key_pair); - } -} -if (!is_callable('sodium_crypto_sign_seed_keypair')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_seed_keypair() - * @param string $seed - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_seed_keypair($seed) - { - return ParagonIE_Sodium_Compat::crypto_sign_seed_keypair($seed); - } -} -if (!is_callable('sodium_crypto_sign_verify_detached')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_verify_detached() - * @param string $signature - * @param string $message - * @param string $public_key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_verify_detached($signature, $message, $public_key) - { - return ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $message, $public_key); - } -} -if (!is_callable('sodium_crypto_sign_ed25519_pk_to_curve25519')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519() - * @param string $public_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_ed25519_pk_to_curve25519($public_key) - { - return ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519($public_key); - } -} -if (!is_callable('sodium_crypto_sign_ed25519_sk_to_curve25519')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519() - * @param string $secret_key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_sign_ed25519_sk_to_curve25519($secret_key) - { - return ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519($secret_key); - } -} -if (!is_callable('sodium_crypto_stream')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_stream() - * @param int $length - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_stream($length, $nonce, $key) - { - return ParagonIE_Sodium_Compat::crypto_stream($length, $nonce, $key); - } -} -if (!is_callable('sodium_crypto_stream_keygen')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_stream_keygen() - * @return string - * @throws Exception - */ - function sodium_crypto_stream_keygen() - { - return ParagonIE_Sodium_Compat::crypto_stream_keygen(); - } -} -if (!is_callable('sodium_crypto_stream_xor')) { - /** - * @see ParagonIE_Sodium_Compat::crypto_stream_xor() - * @param string $message - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_crypto_stream_xor($message, $nonce, $key) - { - return ParagonIE_Sodium_Compat::crypto_stream_xor($message, $nonce, $key); - } -} -require_once dirname(__FILE__) . '/stream-xchacha20.php'; -if (!is_callable('sodium_hex2bin')) { - /** - * @see ParagonIE_Sodium_Compat::hex2bin() - * @param string $string - * @param string $ignore - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_hex2bin($string, $ignore = '') - { - return ParagonIE_Sodium_Compat::hex2bin($string, $ignore); - } -} -if (!is_callable('sodium_increment')) { - /** - * @see ParagonIE_Sodium_Compat::increment() - * @param string $string - * @return void - * @throws SodiumException - * @throws TypeError - */ - function sodium_increment(&$string) - { - ParagonIE_Sodium_Compat::increment($string); - } -} -if (!is_callable('sodium_library_version_major')) { - /** - * @see ParagonIE_Sodium_Compat::library_version_major() - * @return int - */ - function sodium_library_version_major() - { - return ParagonIE_Sodium_Compat::library_version_major(); - } -} -if (!is_callable('sodium_library_version_minor')) { - /** - * @see ParagonIE_Sodium_Compat::library_version_minor() - * @return int - */ - function sodium_library_version_minor() - { - return ParagonIE_Sodium_Compat::library_version_minor(); - } -} -if (!is_callable('sodium_version_string')) { - /** - * @see ParagonIE_Sodium_Compat::version_string() - * @return string - */ - function sodium_version_string() - { - return ParagonIE_Sodium_Compat::version_string(); - } -} -if (!is_callable('sodium_memcmp')) { - /** - * @see ParagonIE_Sodium_Compat::memcmp() - * @param string $string1 - * @param string $string2 - * @return int - * @throws SodiumException - * @throws TypeError - */ - function sodium_memcmp($string1, $string2) - { - return ParagonIE_Sodium_Compat::memcmp($string1, $string2); - } -} -if (!is_callable('sodium_memzero')) { - /** - * @see ParagonIE_Sodium_Compat::memzero() - * @param string $string - * @return void - * @throws SodiumException - * @throws TypeError - * - * @psalm-suppress ReferenceConstraintViolation - */ - function sodium_memzero(&$string) - { - ParagonIE_Sodium_Compat::memzero($string); - } -} -if (!is_callable('sodium_pad')) { - /** - * @see ParagonIE_Sodium_Compat::pad() - * @param string $unpadded - * @param int $block_size - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_pad($unpadded, $block_size) - { - return ParagonIE_Sodium_Compat::pad($unpadded, $block_size, true); - } -} -if (!is_callable('sodium_unpad')) { - /** - * @see ParagonIE_Sodium_Compat::pad() - * @param string $padded - * @param int $block_size - * @return string - * @throws SodiumException - * @throws TypeError - */ - function sodium_unpad($padded, $block_size) - { - return ParagonIE_Sodium_Compat::unpad($padded, $block_size, true); - } -} -if (!is_callable('sodium_randombytes_buf')) { - /** - * @see ParagonIE_Sodium_Compat::randombytes_buf() - * @param int $amount - * @return string - * @throws Exception - */ - function sodium_randombytes_buf($amount) - { - return ParagonIE_Sodium_Compat::randombytes_buf($amount); - } -} - -if (!is_callable('sodium_randombytes_uniform')) { - /** - * @see ParagonIE_Sodium_Compat::randombytes_uniform() - * @param int $upperLimit - * @return int - * @throws Exception - */ - function sodium_randombytes_uniform($upperLimit) - { - return ParagonIE_Sodium_Compat::randombytes_uniform($upperLimit); - } -} - -if (!is_callable('sodium_randombytes_random16')) { - /** - * @see ParagonIE_Sodium_Compat::randombytes_random16() - * @return int - * @throws Exception - */ - function sodium_randombytes_random16() - { - return ParagonIE_Sodium_Compat::randombytes_random16(); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/lib/php72compat_const.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/lib/php72compat_const.php deleted file mode 100644 index 576b4608..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/lib/php72compat_const.php +++ /dev/null @@ -1,93 +0,0 @@ ->= 8; - } - $val = ParagonIE_Sodium_Core_Util::intArrayToString($A); - } - - /** - * @param string $encoded - * @param int $variant - * @param string $ignore - * @return string - * @throws SodiumException - */ - public static function base642bin($encoded, $variant, $ignore = '') - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($encoded, 'string', 1); - - /** @var string $encoded */ - $encoded = (string) $encoded; - if (ParagonIE_Sodium_Core_Util::strlen($encoded) === 0) { - return ''; - } - - // Just strip before decoding - if (!empty($ignore)) { - $encoded = str_replace($ignore, '', $encoded); - } - - try { - switch ($variant) { - case self::BASE64_VARIANT_ORIGINAL: - return ParagonIE_Sodium_Core_Base64_Original::decode($encoded, true); - case self::BASE64_VARIANT_ORIGINAL_NO_PADDING: - return ParagonIE_Sodium_Core_Base64_Original::decode($encoded, false); - case self::BASE64_VARIANT_URLSAFE: - return ParagonIE_Sodium_Core_Base64_UrlSafe::decode($encoded, true); - case self::BASE64_VARIANT_URLSAFE_NO_PADDING: - return ParagonIE_Sodium_Core_Base64_UrlSafe::decode($encoded, false); - default: - throw new SodiumException('invalid base64 variant identifier'); - } - } catch (Exception $ex) { - if ($ex instanceof SodiumException) { - throw $ex; - } - throw new SodiumException('invalid base64 string'); - } - } - - /** - * @param string $decoded - * @param int $variant - * @return string - * @throws SodiumException - */ - public static function bin2base64($decoded, $variant) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($decoded, 'string', 1); - /** @var string $decoded */ - $decoded = (string) $decoded; - if (ParagonIE_Sodium_Core_Util::strlen($decoded) === 0) { - return ''; - } - - switch ($variant) { - case self::BASE64_VARIANT_ORIGINAL: - return ParagonIE_Sodium_Core_Base64_Original::encode($decoded); - case self::BASE64_VARIANT_ORIGINAL_NO_PADDING: - return ParagonIE_Sodium_Core_Base64_Original::encodeUnpadded($decoded); - case self::BASE64_VARIANT_URLSAFE: - return ParagonIE_Sodium_Core_Base64_UrlSafe::encode($decoded); - case self::BASE64_VARIANT_URLSAFE_NO_PADDING: - return ParagonIE_Sodium_Core_Base64_UrlSafe::encodeUnpadded($decoded); - default: - throw new SodiumException('invalid base64 variant identifier'); - } - } - - /** - * Cache-timing-safe implementation of bin2hex(). - * - * @param string $string A string (probably raw binary) - * @return string A hexadecimal-encoded string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function bin2hex($string) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($string, 'string', 1); - - if (self::useNewSodiumAPI()) { - return (string) sodium_bin2hex($string); - } - if (self::use_fallback('bin2hex')) { - return (string) call_user_func('\\Sodium\\bin2hex', $string); - } - return ParagonIE_Sodium_Core_Util::bin2hex($string); - } - - /** - * Compare two strings, in constant-time. - * Compared to memcmp(), compare() is more useful for sorting. - * - * @param string $left The left operand; must be a string - * @param string $right The right operand; must be a string - * @return int If < 0 if the left operand is less than the right - * If = 0 if both strings are equal - * If > 0 if the right operand is less than the left - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function compare($left, $right) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($left, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($right, 'string', 2); - - if (self::useNewSodiumAPI()) { - return (int) sodium_compare($left, $right); - } - if (self::use_fallback('compare')) { - return (int) call_user_func('\\Sodium\\compare', $left, $right); - } - return ParagonIE_Sodium_Core_Util::compare($left, $right); - } - - /** - * Is AES-256-GCM even available to use? - * - * @return bool - * @psalm-suppress UndefinedFunction - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_aead_aes256gcm_is_available() - { - if (self::useNewSodiumAPI()) { - return sodium_crypto_aead_aes256gcm_is_available(); - } - if (self::use_fallback('crypto_aead_aes256gcm_is_available')) { - return call_user_func('\\Sodium\\crypto_aead_aes256gcm_is_available'); - } - if (PHP_VERSION_ID < 70100) { - // OpenSSL doesn't support AEAD before 7.1.0 - return false; - } - if (!is_callable('openssl_encrypt') || !is_callable('openssl_decrypt')) { - // OpenSSL isn't installed - return false; - } - return (bool) in_array('aes-256-gcm', openssl_get_cipher_methods()); - } - - /** - * Authenticated Encryption with Associated Data: Decryption - * - * Algorithm: - * AES-256-GCM - * - * This mode uses a 64-bit random nonce with a 64-bit counter. - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * - * @param string $ciphertext Encrypted message (with Poly1305 MAC appended) - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * - * @return string|bool The original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_aead_aes256gcm_decrypt( - $ciphertext = '', - $assocData = '', - $nonce = '', - $key = '' - ) { - if (!self::crypto_aead_aes256gcm_is_available()) { - throw new SodiumException('AES-256-GCM is not available'); - } - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_AES256GCM_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_AES256GCM_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_AES256GCM_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_AES256GCM_KEYBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_AES256GCM_ABYTES) { - throw new SodiumException('Message must be at least CRYPTO_AEAD_AES256GCM_ABYTES long'); - } - if (!is_callable('openssl_decrypt')) { - throw new SodiumException('The OpenSSL extension is not installed, or openssl_decrypt() is not available'); - } - - /** @var string $ctext */ - $ctext = ParagonIE_Sodium_Core_Util::substr($ciphertext, 0, -self::CRYPTO_AEAD_AES256GCM_ABYTES); - /** @var string $authTag */ - $authTag = ParagonIE_Sodium_Core_Util::substr($ciphertext, -self::CRYPTO_AEAD_AES256GCM_ABYTES, 16); - return openssl_decrypt( - $ctext, - 'aes-256-gcm', - $key, - OPENSSL_RAW_DATA, - $nonce, - $authTag, - $assocData - ); - } - - /** - * Authenticated Encryption with Associated Data: Encryption - * - * Algorithm: - * AES-256-GCM - * - * @param string $plaintext Message to be encrypted - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * - * @return string Ciphertext with a 16-byte GCM message - * authentication code appended - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_aead_aes256gcm_encrypt( - $plaintext = '', - $assocData = '', - $nonce = '', - $key = '' - ) { - if (!self::crypto_aead_aes256gcm_is_available()) { - throw new SodiumException('AES-256-GCM is not available'); - } - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_AES256GCM_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_AES256GCM_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_AES256GCM_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_AES256GCM_KEYBYTES long'); - } - - if (!is_callable('openssl_encrypt')) { - throw new SodiumException('The OpenSSL extension is not installed, or openssl_encrypt() is not available'); - } - - $authTag = ''; - $ciphertext = openssl_encrypt( - $plaintext, - 'aes-256-gcm', - $key, - OPENSSL_RAW_DATA, - $nonce, - $authTag, - $assocData - ); - return $ciphertext . $authTag; - } - - /** - * Return a secure random key for use with the AES-256-GCM - * symmetric AEAD interface. - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_aead_aes256gcm_keygen() - { - return random_bytes(self::CRYPTO_AEAD_AES256GCM_KEYBYTES); - } - - /** - * Authenticated Encryption with Associated Data: Decryption - * - * Algorithm: - * ChaCha20-Poly1305 - * - * This mode uses a 64-bit random nonce with a 64-bit counter. - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * - * @param string $ciphertext Encrypted message (with Poly1305 MAC appended) - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * - * @return string The original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_aead_chacha20poly1305_decrypt( - $ciphertext = '', - $assocData = '', - $nonce = '', - $key = '' - ) { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES) { - throw new SodiumException('Message must be at least CRYPTO_AEAD_CHACHA20POLY1305_ABYTES long'); - } - - if (self::useNewSodiumAPI()) { - /** - * @psalm-suppress InvalidReturnStatement - * @psalm-suppress FalsableReturnStatement - */ - return sodium_crypto_aead_chacha20poly1305_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - if (self::use_fallback('crypto_aead_chacha20poly1305_decrypt')) { - return call_user_func( - '\\Sodium\\crypto_aead_chacha20poly1305_decrypt', - $ciphertext, - $assocData, - $nonce, - $key - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - - /** - * Authenticated Encryption with Associated Data - * - * Algorithm: - * ChaCha20-Poly1305 - * - * This mode uses a 64-bit random nonce with a 64-bit counter. - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * - * @param string $plaintext Message to be encrypted - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * - * @return string Ciphertext with a 16-byte Poly1305 message - * authentication code appended - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_aead_chacha20poly1305_encrypt( - $plaintext = '', - $assocData = '', - $nonce = '', - $key = '' - ) { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_aead_chacha20poly1305_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - if (self::use_fallback('crypto_aead_chacha20poly1305_encrypt')) { - return (string) call_user_func( - '\\Sodium\\crypto_aead_chacha20poly1305_encrypt', - $plaintext, - $assocData, - $nonce, - $key - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - - /** - * Authenticated Encryption with Associated Data: Decryption - * - * Algorithm: - * ChaCha20-Poly1305 - * - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * Regular mode uses a 64-bit random nonce with a 64-bit counter. - * - * @param string $ciphertext Encrypted message (with Poly1305 MAC appended) - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 12 bytes - * @param string $key Encryption key - * - * @return string The original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_aead_chacha20poly1305_ietf_decrypt( - $ciphertext = '', - $assocData = '', - $nonce = '', - $key = '' - ) { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES) { - throw new SodiumException('Message must be at least CRYPTO_AEAD_CHACHA20POLY1305_ABYTES long'); - } - - if (self::useNewSodiumAPI()) { - /** - * @psalm-suppress InvalidReturnStatement - * @psalm-suppress FalsableReturnStatement - */ - return sodium_crypto_aead_chacha20poly1305_ietf_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - if (self::use_fallback('crypto_aead_chacha20poly1305_ietf_decrypt')) { - return call_user_func( - '\\Sodium\\crypto_aead_chacha20poly1305_ietf_decrypt', - $ciphertext, - $assocData, - $nonce, - $key - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_ietf_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_ietf_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - - /** - * Return a secure random key for use with the ChaCha20-Poly1305 - * symmetric AEAD interface. - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_aead_chacha20poly1305_keygen() - { - return random_bytes(self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES); - } - - /** - * Authenticated Encryption with Associated Data - * - * Algorithm: - * ChaCha20-Poly1305 - * - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * Regular mode uses a 64-bit random nonce with a 64-bit counter. - * - * @param string $plaintext Message to be encrypted - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * - * @return string Ciphertext with a 16-byte Poly1305 message - * authentication code appended - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_aead_chacha20poly1305_ietf_encrypt( - $plaintext = '', - $assocData = '', - $nonce = '', - $key = '' - ) { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - if (!is_null($assocData)) { - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - } - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_aead_chacha20poly1305_ietf_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - if (self::use_fallback('crypto_aead_chacha20poly1305_ietf_encrypt')) { - return (string) call_user_func( - '\\Sodium\\crypto_aead_chacha20poly1305_ietf_encrypt', - $plaintext, - $assocData, - $nonce, - $key - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_ietf_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_ietf_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - - /** - * Return a secure random key for use with the ChaCha20-Poly1305 - * symmetric AEAD interface. (IETF version) - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_aead_chacha20poly1305_ietf_keygen() - { - return random_bytes(self::CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES); - } - - /** - * Authenticated Encryption with Associated Data: Decryption - * - * Algorithm: - * XChaCha20-Poly1305 - * - * This mode uses a 64-bit random nonce with a 64-bit counter. - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * - * @param string $ciphertext Encrypted message (with Poly1305 MAC appended) - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * @param bool $dontFallback Don't fallback to ext/sodium - * - * @return string|bool The original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_aead_xchacha20poly1305_ietf_decrypt( - $ciphertext = '', - $assocData = '', - $nonce = '', - $key = '', - $dontFallback = false - ) { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - if (!is_null($assocData)) { - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - } else { - $assocData = ''; - } - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES) { - throw new SodiumException('Message must be at least CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES long'); - } - if (self::useNewSodiumAPI() && !$dontFallback) { - if (is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_decrypt')) { - return sodium_crypto_aead_xchacha20poly1305_ietf_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - } - - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::aead_xchacha20poly1305_ietf_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - return ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_decrypt( - $ciphertext, - $assocData, - $nonce, - $key - ); - } - - /** - * Authenticated Encryption with Associated Data - * - * Algorithm: - * XChaCha20-Poly1305 - * - * This mode uses a 64-bit random nonce with a 64-bit counter. - * IETF mode uses a 96-bit random nonce with a 32-bit counter. - * - * @param string $plaintext Message to be encrypted - * @param string $assocData Authenticated Associated Data (unencrypted) - * @param string $nonce Number to be used only Once; must be 8 bytes - * @param string $key Encryption key - * @param bool $dontFallback Don't fallback to ext/sodium - * - * @return string Ciphertext with a 16-byte Poly1305 message - * authentication code appended - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_aead_xchacha20poly1305_ietf_encrypt( - $plaintext = '', - $assocData = '', - $nonce = '', - $key = '', - $dontFallback = false - ) { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - if (!is_null($assocData)) { - ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2); - } else { - $assocData = ''; - } - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES) { - throw new SodiumException('Nonce must be CRYPTO_AEAD_XCHACHA20POLY1305_NPUBBYTES long'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES) { - throw new SodiumException('Key must be CRYPTO_AEAD_XCHACHA20POLY1305_KEYBYTES long'); - } - if (self::useNewSodiumAPI() && !$dontFallback) { - if (is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_encrypt')) { - return sodium_crypto_aead_xchacha20poly1305_ietf_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - } - - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::aead_xchacha20poly1305_ietf_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - return ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_encrypt( - $plaintext, - $assocData, - $nonce, - $key - ); - } - - /** - * Return a secure random key for use with the XChaCha20-Poly1305 - * symmetric AEAD interface. - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_aead_xchacha20poly1305_ietf_keygen() - { - return random_bytes(self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES); - } - - /** - * Authenticate a message. Uses symmetric-key cryptography. - * - * Algorithm: - * HMAC-SHA512-256. Which is HMAC-SHA-512 truncated to 256 bits. - * Not to be confused with HMAC-SHA-512/256 which would use the - * SHA-512/256 hash function (uses different initial parameters - * but still truncates to 256 bits to sidestep length-extension - * attacks). - * - * @param string $message Message to be authenticated - * @param string $key Symmetric authentication key - * @return string Message authentication code - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_auth($message, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AUTH_KEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_AUTH_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_auth($message, $key); - } - if (self::use_fallback('crypto_auth')) { - return (string) call_user_func('\\Sodium\\crypto_auth', $message, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::auth($message, $key); - } - return ParagonIE_Sodium_Crypto::auth($message, $key); - } - - /** - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_auth_keygen() - { - return random_bytes(self::CRYPTO_AUTH_KEYBYTES); - } - - /** - * Verify the MAC of a message previously authenticated with crypto_auth. - * - * @param string $mac Message authentication code - * @param string $message Message whose authenticity you are attempting to - * verify (with a given MAC and key) - * @param string $key Symmetric authentication key - * @return bool TRUE if authenticated, FALSE otherwise - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_auth_verify($mac, $message, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($mac, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($mac) !== self::CRYPTO_AUTH_BYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_AUTH_BYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AUTH_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_AUTH_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (bool) sodium_crypto_auth_verify($mac, $message, $key); - } - if (self::use_fallback('crypto_auth_verify')) { - return (bool) call_user_func('\\Sodium\\crypto_auth_verify', $mac, $message, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::auth_verify($mac, $message, $key); - } - return ParagonIE_Sodium_Crypto::auth_verify($mac, $message, $key); - } - - /** - * Authenticated asymmetric-key encryption. Both the sender and recipient - * may decrypt messages. - * - * Algorithm: X25519-XSalsa20-Poly1305. - * X25519: Elliptic-Curve Diffie Hellman over Curve25519. - * XSalsa20: Extended-nonce variant of salsa20. - * Poyl1305: Polynomial MAC for one-time message authentication. - * - * @param string $plaintext The message to be encrypted - * @param string $nonce A Number to only be used Once; must be 24 bytes - * @param string $keypair Your secret key and your recipient's public key - * @return string Ciphertext with 16-byte Poly1305 MAC - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box($plaintext, $nonce, $keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_BOX_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_BOX_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box($plaintext, $nonce, $keypair); - } - if (self::use_fallback('crypto_box')) { - return (string) call_user_func('\\Sodium\\crypto_box', $plaintext, $nonce, $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box($plaintext, $nonce, $keypair); - } - return ParagonIE_Sodium_Crypto::box($plaintext, $nonce, $keypair); - } - - /** - * Anonymous public-key encryption. Only the recipient may decrypt messages. - * - * Algorithm: X25519-XSalsa20-Poly1305, as with crypto_box. - * The sender's X25519 keypair is ephemeral. - * Nonce is generated from the BLAKE2b hash of both public keys. - * - * This provides ciphertext integrity. - * - * @param string $plaintext Message to be sealed - * @param string $publicKey Your recipient's public key - * @return string Sealed message that only your recipient can - * decrypt - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box_seal($plaintext, $publicKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_BOX_PUBLICKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_seal($plaintext, $publicKey); - } - if (self::use_fallback('crypto_box_seal')) { - return (string) call_user_func('\\Sodium\\crypto_box_seal', $plaintext, $publicKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_seal($plaintext, $publicKey); - } - return ParagonIE_Sodium_Crypto::box_seal($plaintext, $publicKey); - } - - /** - * Opens a message encrypted with crypto_box_seal(). Requires - * the recipient's keypair (sk || pk) to decrypt successfully. - * - * This validates ciphertext integrity. - * - * @param string $ciphertext Sealed message to be opened - * @param string $keypair Your crypto_box keypair - * @return string The original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_box_seal_open($ciphertext, $keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - /** - * @psalm-suppress InvalidReturnStatement - * @psalm-suppress FalsableReturnStatement - */ - return sodium_crypto_box_seal_open($ciphertext, $keypair); - } - if (self::use_fallback('crypto_box_seal_open')) { - return call_user_func('\\Sodium\\crypto_box_seal_open', $ciphertext, $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_seal_open($ciphertext, $keypair); - } - return ParagonIE_Sodium_Crypto::box_seal_open($ciphertext, $keypair); - } - - /** - * Generate a new random X25519 keypair. - * - * @return string A 64-byte string; the first 32 are your secret key, while - * the last 32 are your public key. crypto_box_secretkey() - * and crypto_box_publickey() exist to separate them so you - * don't accidentally get them mixed up! - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box_keypair() - { - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_keypair(); - } - if (self::use_fallback('crypto_box_keypair')) { - return (string) call_user_func('\\Sodium\\crypto_box_keypair'); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_keypair(); - } - return ParagonIE_Sodium_Crypto::box_keypair(); - } - - /** - * Combine two keys into a keypair for use in library methods that expect - * a keypair. This doesn't necessarily have to be the same person's keys. - * - * @param string $secretKey Secret key - * @param string $publicKey Public key - * @return string Keypair - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box_keypair_from_secretkey_and_publickey($secretKey, $publicKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_BOX_PUBLICKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_keypair_from_secretkey_and_publickey($secretKey, $publicKey); - } - if (self::use_fallback('crypto_box_keypair_from_secretkey_and_publickey')) { - return (string) call_user_func('\\Sodium\\crypto_box_keypair_from_secretkey_and_publickey', $secretKey, $publicKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_keypair_from_secretkey_and_publickey($secretKey, $publicKey); - } - return ParagonIE_Sodium_Crypto::box_keypair_from_secretkey_and_publickey($secretKey, $publicKey); - } - - /** - * Decrypt a message previously encrypted with crypto_box(). - * - * @param string $ciphertext Encrypted message - * @param string $nonce Number to only be used Once; must be 24 bytes - * @param string $keypair Your secret key and the sender's public key - * @return string The original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_box_open($ciphertext, $nonce, $keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_BOX_MACBYTES) { - throw new SodiumException('Argument 1 must be at least CRYPTO_BOX_MACBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_BOX_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_BOX_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - /** - * @psalm-suppress InvalidReturnStatement - * @psalm-suppress FalsableReturnStatement - */ - return sodium_crypto_box_open($ciphertext, $nonce, $keypair); - } - if (self::use_fallback('crypto_box_open')) { - return call_user_func('\\Sodium\\crypto_box_open', $ciphertext, $nonce, $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_open($ciphertext, $nonce, $keypair); - } - return ParagonIE_Sodium_Crypto::box_open($ciphertext, $nonce, $keypair); - } - - /** - * Extract the public key from a crypto_box keypair. - * - * @param string $keypair Keypair containing secret and public key - * @return string Your crypto_box public key - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box_publickey($keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_publickey($keypair); - } - if (self::use_fallback('crypto_box_publickey')) { - return (string) call_user_func('\\Sodium\\crypto_box_publickey', $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_publickey($keypair); - } - return ParagonIE_Sodium_Crypto::box_publickey($keypair); - } - - /** - * Calculate the X25519 public key from a given X25519 secret key. - * - * @param string $secretKey Any X25519 secret key - * @return string The corresponding X25519 public key - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box_publickey_from_secretkey($secretKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_publickey_from_secretkey($secretKey); - } - if (self::use_fallback('crypto_box_publickey_from_secretkey')) { - return (string) call_user_func('\\Sodium\\crypto_box_publickey_from_secretkey', $secretKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_publickey_from_secretkey($secretKey); - } - return ParagonIE_Sodium_Crypto::box_publickey_from_secretkey($secretKey); - } - - /** - * Extract the secret key from a crypto_box keypair. - * - * @param string $keypair - * @return string Your crypto_box secret key - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_box_secretkey($keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_secretkey($keypair); - } - if (self::use_fallback('crypto_box_secretkey')) { - return (string) call_user_func('\\Sodium\\crypto_box_secretkey', $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_secretkey($keypair); - } - return ParagonIE_Sodium_Crypto::box_secretkey($keypair); - } - - /** - * Generate an X25519 keypair from a seed. - * - * @param string $seed - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress UndefinedFunction - */ - public static function crypto_box_seed_keypair($seed) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($seed, 'string', 1); - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_box_seed_keypair($seed); - } - if (self::use_fallback('crypto_box_seed_keypair')) { - return (string) call_user_func('\\Sodium\\crypto_box_seed_keypair', $seed); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::box_seed_keypair($seed); - } - return ParagonIE_Sodium_Crypto::box_seed_keypair($seed); - } - - /** - * Calculates a BLAKE2b hash, with an optional key. - * - * @param string $message The message to be hashed - * @param string|null $key If specified, must be a string between 16 - * and 64 bytes long - * @param int $length Output length in bytes; must be between 16 - * and 64 (default = 32) - * @return string Raw binary - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_generichash($message, $key = '', $length = self::CRYPTO_GENERICHASH_BYTES) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - if (is_null($key)) { - $key = ''; - } - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 3); - - /* Input validation: */ - if (!empty($key)) { - if (ParagonIE_Sodium_Core_Util::strlen($key) < self::CRYPTO_GENERICHASH_KEYBYTES_MIN) { - throw new SodiumException('Unsupported key size. Must be at least CRYPTO_GENERICHASH_KEYBYTES_MIN bytes long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) > self::CRYPTO_GENERICHASH_KEYBYTES_MAX) { - throw new SodiumException('Unsupported key size. Must be at most CRYPTO_GENERICHASH_KEYBYTES_MAX bytes long.'); - } - } - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_generichash($message, $key, $length); - } - if (self::use_fallback('crypto_generichash')) { - return (string) call_user_func('\\Sodium\\crypto_generichash', $message, $key, $length); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::generichash($message, $key, $length); - } - return ParagonIE_Sodium_Crypto::generichash($message, $key, $length); - } - - /** - * Get the final BLAKE2b hash output for a given context. - * - * @param string $ctx BLAKE2 hashing context. Generated by crypto_generichash_init(). - * @param int $length Hash output size. - * @return string Final BLAKE2b hash. - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress ReferenceConstraintViolation - * @psalm-suppress ConflictingReferenceConstraint - */ - public static function crypto_generichash_final(&$ctx, $length = self::CRYPTO_GENERICHASH_BYTES) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ctx, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 2); - - if (self::useNewSodiumAPI()) { - return sodium_crypto_generichash_final($ctx, $length); - } - if (self::use_fallback('crypto_generichash_final')) { - $func = '\\Sodium\\crypto_generichash_final'; - return (string) $func($ctx, $length); - } - if ($length < 1) { - try { - self::memzero($ctx); - } catch (SodiumException $ex) { - unset($ctx); - } - return ''; - } - if (PHP_INT_SIZE === 4) { - $result = ParagonIE_Sodium_Crypto32::generichash_final($ctx, $length); - } else { - $result = ParagonIE_Sodium_Crypto::generichash_final($ctx, $length); - } - try { - self::memzero($ctx); - } catch (SodiumException $ex) { - unset($ctx); - } - return $result; - } - - /** - * Initialize a BLAKE2b hashing context, for use in a streaming interface. - * - * @param string|null $key If specified must be a string between 16 and 64 bytes - * @param int $length The size of the desired hash output - * @return string A BLAKE2 hashing context, encoded as a string - * (To be 100% compatible with ext/libsodium) - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_generichash_init($key = '', $length = self::CRYPTO_GENERICHASH_BYTES) - { - /* Type checks: */ - if (is_null($key)) { - $key = ''; - } - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 2); - - /* Input validation: */ - if (!empty($key)) { - if (ParagonIE_Sodium_Core_Util::strlen($key) < self::CRYPTO_GENERICHASH_KEYBYTES_MIN) { - throw new SodiumException('Unsupported key size. Must be at least CRYPTO_GENERICHASH_KEYBYTES_MIN bytes long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) > self::CRYPTO_GENERICHASH_KEYBYTES_MAX) { - throw new SodiumException('Unsupported key size. Must be at most CRYPTO_GENERICHASH_KEYBYTES_MAX bytes long.'); - } - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_generichash_init($key, $length); - } - if (self::use_fallback('crypto_generichash_init')) { - return (string) call_user_func('\\Sodium\\crypto_generichash_init', $key, $length); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::generichash_init($key, $length); - } - return ParagonIE_Sodium_Crypto::generichash_init($key, $length); - } - - /** - * Initialize a BLAKE2b hashing context, for use in a streaming interface. - * - * @param string|null $key If specified must be a string between 16 and 64 bytes - * @param int $length The size of the desired hash output - * @param string $salt Salt (up to 16 bytes) - * @param string $personal Personalization string (up to 16 bytes) - * @return string A BLAKE2 hashing context, encoded as a string - * (To be 100% compatible with ext/libsodium) - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_generichash_init_salt_personal( - $key = '', - $length = self::CRYPTO_GENERICHASH_BYTES, - $salt = '', - $personal = '' - ) { - /* Type checks: */ - if (is_null($key)) { - $key = ''; - } - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($salt, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($personal, 'string', 4); - $salt = str_pad($salt, 16, "\0", STR_PAD_RIGHT); - $personal = str_pad($personal, 16, "\0", STR_PAD_RIGHT); - - /* Input validation: */ - if (!empty($key)) { - /* - if (ParagonIE_Sodium_Core_Util::strlen($key) < self::CRYPTO_GENERICHASH_KEYBYTES_MIN) { - throw new SodiumException('Unsupported key size. Must be at least CRYPTO_GENERICHASH_KEYBYTES_MIN bytes long.'); - } - */ - if (ParagonIE_Sodium_Core_Util::strlen($key) > self::CRYPTO_GENERICHASH_KEYBYTES_MAX) { - throw new SodiumException('Unsupported key size. Must be at most CRYPTO_GENERICHASH_KEYBYTES_MAX bytes long.'); - } - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::generichash_init_salt_personal($key, $length, $salt, $personal); - } - return ParagonIE_Sodium_Crypto::generichash_init_salt_personal($key, $length, $salt, $personal); - } - - /** - * Update a BLAKE2b hashing context with additional data. - * - * @param string $ctx BLAKE2 hashing context. Generated by crypto_generichash_init(). - * $ctx is passed by reference and gets updated in-place. - * @param-out string $ctx - * @param string $message The message to append to the existing hash state. - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress ReferenceConstraintViolation - */ - public static function crypto_generichash_update(&$ctx, $message) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ctx, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2); - - if (self::useNewSodiumAPI()) { - sodium_crypto_generichash_update($ctx, $message); - return; - } - if (self::use_fallback('crypto_generichash_update')) { - $func = '\\Sodium\\crypto_generichash_update'; - $func($ctx, $message); - return; - } - if (PHP_INT_SIZE === 4) { - $ctx = ParagonIE_Sodium_Crypto32::generichash_update($ctx, $message); - } else { - $ctx = ParagonIE_Sodium_Crypto::generichash_update($ctx, $message); - } - } - - /** - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_generichash_keygen() - { - return random_bytes(self::CRYPTO_GENERICHASH_KEYBYTES); - } - - /** - * @param int $subkey_len - * @param int $subkey_id - * @param string $context - * @param string $key - * @return string - * @throws SodiumException - */ - public static function crypto_kdf_derive_from_key( - $subkey_len, - $subkey_id, - $context, - $key - ) { - ParagonIE_Sodium_Core_Util::declareScalarType($subkey_len, 'int', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($subkey_id, 'int', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($context, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - $subkey_id = (int) $subkey_id; - $subkey_len = (int) $subkey_len; - $context = (string) $context; - $key = (string) $key; - - if ($subkey_len < self::CRYPTO_KDF_BYTES_MIN) { - throw new SodiumException('subkey cannot be smaller than SODIUM_CRYPTO_KDF_BYTES_MIN'); - } - if ($subkey_len > self::CRYPTO_KDF_BYTES_MAX) { - throw new SodiumException('subkey cannot be larger than SODIUM_CRYPTO_KDF_BYTES_MAX'); - } - if ($subkey_id < 0) { - throw new SodiumException('subkey_id cannot be negative'); - } - if (ParagonIE_Sodium_Core_Util::strlen($context) !== self::CRYPTO_KDF_CONTEXTBYTES) { - throw new SodiumException('context should be SODIUM_CRYPTO_KDF_CONTEXTBYTES bytes'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_KDF_KEYBYTES) { - throw new SodiumException('key should be SODIUM_CRYPTO_KDF_KEYBYTES bytes'); - } - - $salt = ParagonIE_Sodium_Core_Util::store64_le($subkey_id); - $state = self::crypto_generichash_init_salt_personal( - $key, - $subkey_len, - $salt, - $context - ); - return self::crypto_generichash_final($state, $subkey_len); - } - - /** - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_kdf_keygen() - { - return random_bytes(self::CRYPTO_KDF_KEYBYTES); - } - - /** - * Perform a key exchange, between a designated client and a server. - * - * Typically, you would designate one machine to be the client and the - * other to be the server. The first two keys are what you'd expect for - * scalarmult() below, but the latter two public keys don't swap places. - * - * | ALICE | BOB | - * | Client | Server | - * |--------------------------------|-------------------------------------| - * | shared = crypto_kx( | shared = crypto_kx( | - * | alice_sk, | bob_sk, | <- contextual - * | bob_pk, | alice_pk, | <- contextual - * | alice_pk, | alice_pk, | <----- static - * | bob_pk | bob_pk | <----- static - * | ) | ) | - * - * They are used along with the scalarmult product to generate a 256-bit - * BLAKE2b hash unique to the client and server keys. - * - * @param string $my_secret - * @param string $their_public - * @param string $client_public - * @param string $server_public - * @param bool $dontFallback - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_kx($my_secret, $their_public, $client_public, $server_public, $dontFallback = false) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($my_secret, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($their_public, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($client_public, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($server_public, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($my_secret) !== self::CRYPTO_BOX_SECRETKEYBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($their_public) !== self::CRYPTO_BOX_PUBLICKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($client_public) !== self::CRYPTO_BOX_PUBLICKEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_BOX_PUBLICKEYBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($server_public) !== self::CRYPTO_BOX_PUBLICKEYBYTES) { - throw new SodiumException('Argument 4 must be CRYPTO_BOX_PUBLICKEYBYTES long.'); - } - - if (self::useNewSodiumAPI() && !$dontFallback) { - if (is_callable('sodium_crypto_kx')) { - return (string) sodium_crypto_kx( - $my_secret, - $their_public, - $client_public, - $server_public - ); - } - } - if (self::use_fallback('crypto_kx')) { - return (string) call_user_func( - '\\Sodium\\crypto_kx', - $my_secret, - $their_public, - $client_public, - $server_public - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::keyExchange( - $my_secret, - $their_public, - $client_public, - $server_public - ); - } - return ParagonIE_Sodium_Crypto::keyExchange( - $my_secret, - $their_public, - $client_public, - $server_public - ); - } - - /** - * @param string $seed - * @return string - * @throws SodiumException - */ - public static function crypto_kx_seed_keypair($seed) - { - ParagonIE_Sodium_Core_Util::declareScalarType($seed, 'string', 1); - - $seed = (string) $seed; - - if (ParagonIE_Sodium_Core_Util::strlen($seed) !== self::CRYPTO_KX_SEEDBYTES) { - throw new SodiumException('seed must be SODIUM_CRYPTO_KX_SEEDBYTES bytes'); - } - - $sk = self::crypto_generichash($seed, '', self::CRYPTO_KX_SECRETKEYBYTES); - $pk = self::crypto_scalarmult_base($sk); - return $sk . $pk; - } - - /** - * @return string - * @throws Exception - */ - public static function crypto_kx_keypair() - { - $sk = self::randombytes_buf(self::CRYPTO_KX_SECRETKEYBYTES); - $pk = self::crypto_scalarmult_base($sk); - return $sk . $pk; - } - - /** - * @param string $keypair - * @param string $serverPublicKey - * @return array{0: string, 1: string} - * @throws SodiumException - */ - public static function crypto_kx_client_session_keys($keypair, $serverPublicKey) - { - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($serverPublicKey, 'string', 2); - - $keypair = (string) $keypair; - $serverPublicKey = (string) $serverPublicKey; - - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_KX_KEYPAIRBYTES) { - throw new SodiumException('keypair should be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes'); - } - if (ParagonIE_Sodium_Core_Util::strlen($serverPublicKey) !== self::CRYPTO_KX_PUBLICKEYBYTES) { - throw new SodiumException('public keys must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes'); - } - - $sk = self::crypto_kx_secretkey($keypair); - $pk = self::crypto_kx_publickey($keypair); - $h = self::crypto_generichash_init(null, self::CRYPTO_KX_SESSIONKEYBYTES * 2); - self::crypto_generichash_update($h, self::crypto_scalarmult($sk, $serverPublicKey)); - self::crypto_generichash_update($h, $pk); - self::crypto_generichash_update($h, $serverPublicKey); - $sessionKeys = self::crypto_generichash_final($h, self::CRYPTO_KX_SESSIONKEYBYTES * 2); - return array( - ParagonIE_Sodium_Core_Util::substr( - $sessionKeys, - 0, - self::CRYPTO_KX_SESSIONKEYBYTES - ), - ParagonIE_Sodium_Core_Util::substr( - $sessionKeys, - self::CRYPTO_KX_SESSIONKEYBYTES, - self::CRYPTO_KX_SESSIONKEYBYTES - ) - ); - } - - /** - * @param string $keypair - * @param string $clientPublicKey - * @return array{0: string, 1: string} - * @throws SodiumException - */ - public static function crypto_kx_server_session_keys($keypair, $clientPublicKey) - { - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($clientPublicKey, 'string', 2); - - $keypair = (string) $keypair; - $clientPublicKey = (string) $clientPublicKey; - - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_KX_KEYPAIRBYTES) { - throw new SodiumException('keypair should be SODIUM_CRYPTO_KX_KEYPAIRBYTES bytes'); - } - if (ParagonIE_Sodium_Core_Util::strlen($clientPublicKey) !== self::CRYPTO_KX_PUBLICKEYBYTES) { - throw new SodiumException('public keys must be SODIUM_CRYPTO_KX_PUBLICKEYBYTES bytes'); - } - - $sk = self::crypto_kx_secretkey($keypair); - $pk = self::crypto_kx_publickey($keypair); - $h = self::crypto_generichash_init(null, self::CRYPTO_KX_SESSIONKEYBYTES * 2); - self::crypto_generichash_update($h, self::crypto_scalarmult($sk, $clientPublicKey)); - self::crypto_generichash_update($h, $clientPublicKey); - self::crypto_generichash_update($h, $pk); - $sessionKeys = self::crypto_generichash_final($h, self::CRYPTO_KX_SESSIONKEYBYTES * 2); - return array( - ParagonIE_Sodium_Core_Util::substr( - $sessionKeys, - self::CRYPTO_KX_SESSIONKEYBYTES, - self::CRYPTO_KX_SESSIONKEYBYTES - ), - ParagonIE_Sodium_Core_Util::substr( - $sessionKeys, - 0, - self::CRYPTO_KX_SESSIONKEYBYTES - ) - ); - } - - /** - * @param string $kp - * @return string - * @throws SodiumException - */ - public static function crypto_kx_secretkey($kp) - { - return ParagonIE_Sodium_Core_Util::substr( - $kp, - 0, - self::CRYPTO_KX_SECRETKEYBYTES - ); - } - - /** - * @param string $kp - * @return string - * @throws SodiumException - */ - public static function crypto_kx_publickey($kp) - { - return ParagonIE_Sodium_Core_Util::substr( - $kp, - self::CRYPTO_KX_SECRETKEYBYTES, - self::CRYPTO_KX_PUBLICKEYBYTES - ); - } - - /** - * @param int $outlen - * @param string $passwd - * @param string $salt - * @param int $opslimit - * @param int $memlimit - * @param int|null $alg - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit, $alg = null) - { - ParagonIE_Sodium_Core_Util::declareScalarType($outlen, 'int', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($salt, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 4); - ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 5); - - if (self::useNewSodiumAPI()) { - if (!is_null($alg)) { - ParagonIE_Sodium_Core_Util::declareScalarType($alg, 'int', 6); - return sodium_crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit, $alg); - } - return sodium_crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit); - } - if (self::use_fallback('crypto_pwhash')) { - return (string) call_user_func('\\Sodium\\crypto_pwhash', $outlen, $passwd, $salt, $opslimit, $memlimit); - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP' - ); - } - - /** - * !Exclusive to sodium_compat! - * - * This returns TRUE if the native crypto_pwhash API is available by libsodium. - * This returns FALSE if only sodium_compat is available. - * - * @return bool - */ - public static function crypto_pwhash_is_available() - { - if (self::useNewSodiumAPI()) { - return true; - } - if (self::use_fallback('crypto_pwhash')) { - return true; - } - return false; - } - - /** - * @param string $passwd - * @param int $opslimit - * @param int $memlimit - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_pwhash_str($passwd, $opslimit, $memlimit) - { - ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 3); - - if (self::useNewSodiumAPI()) { - return sodium_crypto_pwhash_str($passwd, $opslimit, $memlimit); - } - if (self::use_fallback('crypto_pwhash_str')) { - return (string) call_user_func('\\Sodium\\crypto_pwhash_str', $passwd, $opslimit, $memlimit); - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP' - ); - } - - /** - * Do we need to rehash this password? - * - * @param string $hash - * @param int $opslimit - * @param int $memlimit - * @return bool - * @throws SodiumException - */ - public static function crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit) - { - ParagonIE_Sodium_Core_Util::declareScalarType($hash, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 3); - - // Just grab the first 4 pieces. - $pieces = explode('$', (string) $hash); - $prefix = implode('$', array_slice($pieces, 0, 4)); - - // Rebuild the expected header. - /** @var int $ops */ - $ops = (int) $opslimit; - /** @var int $mem */ - $mem = (int) $memlimit >> 10; - $encoded = self::CRYPTO_PWHASH_STRPREFIX . 'v=19$m=' . $mem . ',t=' . $ops . ',p=1'; - - // Do they match? If so, we don't need to rehash, so return false. - return !ParagonIE_Sodium_Core_Util::hashEquals($encoded, $prefix); - } - - /** - * @param string $passwd - * @param string $hash - * @return bool - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_pwhash_str_verify($passwd, $hash) - { - ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($hash, 'string', 2); - - if (self::useNewSodiumAPI()) { - return (bool) sodium_crypto_pwhash_str_verify($passwd, $hash); - } - if (self::use_fallback('crypto_pwhash_str_verify')) { - return (bool) call_user_func('\\Sodium\\crypto_pwhash_str_verify', $passwd, $hash); - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP' - ); - } - - /** - * @param int $outlen - * @param string $passwd - * @param string $salt - * @param int $opslimit - * @param int $memlimit - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit) - { - ParagonIE_Sodium_Core_Util::declareScalarType($outlen, 'int', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($salt, 'string', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 4); - ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 5); - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_pwhash_scryptsalsa208sha256( - (int) $outlen, - (string) $passwd, - (string) $salt, - (int) $opslimit, - (int) $memlimit - ); - } - if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256')) { - return (string) call_user_func( - '\\Sodium\\crypto_pwhash_scryptsalsa208sha256', - (int) $outlen, - (string) $passwd, - (string) $salt, - (int) $opslimit, - (int) $memlimit - ); - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented, as it is not possible to implement Scrypt with acceptable performance in pure-PHP' - ); - } - - /** - * !Exclusive to sodium_compat! - * - * This returns TRUE if the native crypto_pwhash API is available by libsodium. - * This returns FALSE if only sodium_compat is available. - * - * @return bool - */ - public static function crypto_pwhash_scryptsalsa208sha256_is_available() - { - if (self::useNewSodiumAPI()) { - return true; - } - if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256')) { - return true; - } - return false; - } - - /** - * @param string $passwd - * @param int $opslimit - * @param int $memlimit - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit) - { - ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 3); - - if (self::useNewSodiumAPI()) { - return (string) sodium_crypto_pwhash_scryptsalsa208sha256_str( - (string) $passwd, - (int) $opslimit, - (int) $memlimit - ); - } - if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256_str')) { - return (string) call_user_func( - '\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str', - (string) $passwd, - (int) $opslimit, - (int) $memlimit - ); - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented, as it is not possible to implement Scrypt with acceptable performance in pure-PHP' - ); - } - - /** - * @param string $passwd - * @param string $hash - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash) - { - ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($hash, 'string', 2); - - if (self::useNewSodiumAPI()) { - return (bool) sodium_crypto_pwhash_scryptsalsa208sha256_str_verify( - (string) $passwd, - (string) $hash - ); - } - if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256_str_verify')) { - return (bool) call_user_func( - '\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str_verify', - (string) $passwd, - (string) $hash - ); - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented, as it is not possible to implement Scrypt with acceptable performance in pure-PHP' - ); - } - - /** - * Calculate the shared secret between your secret key and your - * recipient's public key. - * - * Algorithm: X25519 (ECDH over Curve25519) - * - * @param string $secretKey - * @param string $publicKey - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_scalarmult($secretKey, $publicKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_BOX_PUBLICKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_scalarmult($secretKey, $publicKey); - } - if (self::use_fallback('crypto_scalarmult')) { - return (string) call_user_func('\\Sodium\\crypto_scalarmult', $secretKey, $publicKey); - } - - /* Output validation: Forbid all-zero keys */ - if (ParagonIE_Sodium_Core_Util::hashEquals($secretKey, str_repeat("\0", self::CRYPTO_BOX_SECRETKEYBYTES))) { - throw new SodiumException('Zero secret key is not allowed'); - } - if (ParagonIE_Sodium_Core_Util::hashEquals($publicKey, str_repeat("\0", self::CRYPTO_BOX_PUBLICKEYBYTES))) { - throw new SodiumException('Zero public key is not allowed'); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::scalarmult($secretKey, $publicKey); - } - return ParagonIE_Sodium_Crypto::scalarmult($secretKey, $publicKey); - } - - /** - * Calculate an X25519 public key from an X25519 secret key. - * - * @param string $secretKey - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress TooFewArguments - * @psalm-suppress MixedArgument - */ - public static function crypto_scalarmult_base($secretKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_scalarmult_base($secretKey); - } - if (self::use_fallback('crypto_scalarmult_base')) { - return (string) call_user_func('\\Sodium\\crypto_scalarmult_base', $secretKey); - } - if (ParagonIE_Sodium_Core_Util::hashEquals($secretKey, str_repeat("\0", self::CRYPTO_BOX_SECRETKEYBYTES))) { - throw new SodiumException('Zero secret key is not allowed'); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::scalarmult_base($secretKey); - } - return ParagonIE_Sodium_Crypto::scalarmult_base($secretKey); - } - - /** - * Authenticated symmetric-key encryption. - * - * Algorithm: XSalsa20-Poly1305 - * - * @param string $plaintext The message you're encrypting - * @param string $nonce A Number to be used Once; must be 24 bytes - * @param string $key Symmetric encryption key - * @return string Ciphertext with Poly1305 MAC - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_secretbox($plaintext, $nonce, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_secretbox($plaintext, $nonce, $key); - } - if (self::use_fallback('crypto_secretbox')) { - return (string) call_user_func('\\Sodium\\crypto_secretbox', $plaintext, $nonce, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretbox($plaintext, $nonce, $key); - } - return ParagonIE_Sodium_Crypto::secretbox($plaintext, $nonce, $key); - } - - /** - * Decrypts a message previously encrypted with crypto_secretbox(). - * - * @param string $ciphertext Ciphertext with Poly1305 MAC - * @param string $nonce A Number to be used Once; must be 24 bytes - * @param string $key Symmetric encryption key - * @return string Original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_secretbox_open($ciphertext, $nonce, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - /** - * @psalm-suppress InvalidReturnStatement - * @psalm-suppress FalsableReturnStatement - */ - return sodium_crypto_secretbox_open($ciphertext, $nonce, $key); - } - if (self::use_fallback('crypto_secretbox_open')) { - return call_user_func('\\Sodium\\crypto_secretbox_open', $ciphertext, $nonce, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretbox_open($ciphertext, $nonce, $key); - } - return ParagonIE_Sodium_Crypto::secretbox_open($ciphertext, $nonce, $key); - } - - /** - * Return a secure random key for use with crypto_secretbox - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_secretbox_keygen() - { - return random_bytes(self::CRYPTO_SECRETBOX_KEYBYTES); - } - - /** - * Authenticated symmetric-key encryption. - * - * Algorithm: XChaCha20-Poly1305 - * - * @param string $plaintext The message you're encrypting - * @param string $nonce A Number to be used Once; must be 24 bytes - * @param string $key Symmetric encryption key - * @return string Ciphertext with Poly1305 MAC - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_secretbox_xchacha20poly1305($plaintext, $nonce, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.'); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretbox_xchacha20poly1305($plaintext, $nonce, $key); - } - return ParagonIE_Sodium_Crypto::secretbox_xchacha20poly1305($plaintext, $nonce, $key); - } - /** - * Decrypts a message previously encrypted with crypto_secretbox_xchacha20poly1305(). - * - * @param string $ciphertext Ciphertext with Poly1305 MAC - * @param string $nonce A Number to be used Once; must be 24 bytes - * @param string $key Symmetric encryption key - * @return string Original plaintext message - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.'); - } - - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key); - } - return ParagonIE_Sodium_Crypto::secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key); - } - - /** - * @param string $key - * @return array Returns a state and a header. - * @throws Exception - * @throws SodiumException - */ - public static function crypto_secretstream_xchacha20poly1305_init_push($key) - { - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_init_push($key); - } - return ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_push($key); - } - - /** - * @param string $header - * @param string $key - * @return string Returns a state. - * @throws Exception - */ - public static function crypto_secretstream_xchacha20poly1305_init_pull($header, $key) - { - if (ParagonIE_Sodium_Core_Util::strlen($header) < self::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES) { - throw new SodiumException( - 'header size should be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES bytes' - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_init_pull($key, $header); - } - return ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_pull($key, $header); - } - - /** - * @param string $state - * @param string $msg - * @param string $aad - * @param int $tag - * @return string - * @throws SodiumException - */ - public static function crypto_secretstream_xchacha20poly1305_push(&$state, $msg, $aad = '', $tag = 0) - { - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_push( - $state, - $msg, - $aad, - $tag - ); - } - return ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_push( - $state, - $msg, - $aad, - $tag - ); - } - - /** - * @param string $state - * @param string $msg - * @param string $aad - * @return bool|array{0: string, 1: int} - * @throws SodiumException - */ - public static function crypto_secretstream_xchacha20poly1305_pull(&$state, $msg, $aad = '') - { - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_pull( - $state, - $msg, - $aad - ); - } - return ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_pull( - $state, - $msg, - $aad - ); - } - - /** - * @return string - * @throws Exception - */ - public static function crypto_secretstream_xchacha20poly1305_keygen() - { - return random_bytes(self::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES); - } - - /** - * @param string $state - * @return void - * @throws SodiumException - */ - public static function crypto_secretstream_xchacha20poly1305_rekey(&$state) - { - if (PHP_INT_SIZE === 4) { - ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_rekey($state); - } else { - ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_rekey($state); - } - } - - /** - * Calculates a SipHash-2-4 hash of a message for a given key. - * - * @param string $message Input message - * @param string $key SipHash-2-4 key - * @return string Hash - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_shorthash($message, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SHORTHASH_KEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SHORTHASH_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_shorthash($message, $key); - } - if (self::use_fallback('crypto_shorthash')) { - return (string) call_user_func('\\Sodium\\crypto_shorthash', $message, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_SipHash::sipHash24($message, $key); - } - return ParagonIE_Sodium_Core_SipHash::sipHash24($message, $key); - } - - /** - * Return a secure random key for use with crypto_shorthash - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_shorthash_keygen() - { - return random_bytes(self::CRYPTO_SHORTHASH_KEYBYTES); - } - - /** - * Returns a signed message. You probably want crypto_sign_detached() - * instead, which only returns the signature. - * - * Algorithm: Ed25519 (EdDSA over Curve25519) - * - * @param string $message Message to be signed. - * @param string $secretKey Secret signing key. - * @return string Signed message (signature is prefixed). - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_sign($message, $secretKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_SIGN_SECRETKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SIGN_SECRETKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign($message, $secretKey); - } - if (self::use_fallback('crypto_sign')) { - return (string) call_user_func('\\Sodium\\crypto_sign', $message, $secretKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::sign($message, $secretKey); - } - return ParagonIE_Sodium_Crypto::sign($message, $secretKey); - } - - /** - * Validates a signed message then returns the message. - * - * @param string $signedMessage A signed message - * @param string $publicKey A public key - * @return string The original message (if the signature is - * valid for this public key) - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress MixedReturnStatement - */ - public static function crypto_sign_open($signedMessage, $publicKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($signedMessage, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($signedMessage) < self::CRYPTO_SIGN_BYTES) { - throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_BYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_SIGN_PUBLICKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SIGN_PUBLICKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - /** - * @psalm-suppress InvalidReturnStatement - * @psalm-suppress FalsableReturnStatement - */ - return sodium_crypto_sign_open($signedMessage, $publicKey); - } - if (self::use_fallback('crypto_sign_open')) { - return call_user_func('\\Sodium\\crypto_sign_open', $signedMessage, $publicKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::sign_open($signedMessage, $publicKey); - } - return ParagonIE_Sodium_Crypto::sign_open($signedMessage, $publicKey); - } - - /** - * Generate a new random Ed25519 keypair. - * - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_sign_keypair() - { - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_keypair(); - } - if (self::use_fallback('crypto_sign_keypair')) { - return (string) call_user_func('\\Sodium\\crypto_sign_keypair'); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_Ed25519::keypair(); - } - return ParagonIE_Sodium_Core_Ed25519::keypair(); - } - - /** - * @param string $sk - * @param string $pk - * @return string - * @throws SodiumException - */ - public static function crypto_sign_keypair_from_secretkey_and_publickey($sk, $pk) - { - ParagonIE_Sodium_Core_Util::declareScalarType($sk, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($pk, 'string', 1); - $sk = (string) $sk; - $pk = (string) $pk; - - if (ParagonIE_Sodium_Core_Util::strlen($sk) !== self::CRYPTO_SIGN_SECRETKEYBYTES) { - throw new SodiumException('secretkey should be SODIUM_CRYPTO_SIGN_SECRETKEYBYTES bytes'); - } - if (ParagonIE_Sodium_Core_Util::strlen($pk) !== self::CRYPTO_SIGN_PUBLICKEYBYTES) { - throw new SodiumException('publickey should be SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES bytes'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_keypair_from_secretkey_and_publickey($sk, $pk); - } - return $sk . $pk; - } - - /** - * Generate an Ed25519 keypair from a seed. - * - * @param string $seed Input seed - * @return string Keypair - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_seed_keypair($seed) - { - ParagonIE_Sodium_Core_Util::declareScalarType($seed, 'string', 1); - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_seed_keypair($seed); - } - if (self::use_fallback('crypto_sign_keypair')) { - return (string) call_user_func('\\Sodium\\crypto_sign_seed_keypair', $seed); - } - $publicKey = ''; - $secretKey = ''; - if (PHP_INT_SIZE === 4) { - ParagonIE_Sodium_Core32_Ed25519::seed_keypair($publicKey, $secretKey, $seed); - } else { - ParagonIE_Sodium_Core_Ed25519::seed_keypair($publicKey, $secretKey, $seed); - } - return $secretKey . $publicKey; - } - - /** - * Extract an Ed25519 public key from an Ed25519 keypair. - * - * @param string $keypair Keypair - * @return string Public key - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_publickey($keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_SIGN_KEYPAIRBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_SIGN_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_publickey($keypair); - } - if (self::use_fallback('crypto_sign_publickey')) { - return (string) call_user_func('\\Sodium\\crypto_sign_publickey', $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_Ed25519::publickey($keypair); - } - return ParagonIE_Sodium_Core_Ed25519::publickey($keypair); - } - - /** - * Calculate an Ed25519 public key from an Ed25519 secret key. - * - * @param string $secretKey Your Ed25519 secret key - * @return string The corresponding Ed25519 public key - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_publickey_from_secretkey($secretKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_SIGN_SECRETKEYBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_SIGN_SECRETKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_publickey_from_secretkey($secretKey); - } - if (self::use_fallback('crypto_sign_publickey_from_secretkey')) { - return (string) call_user_func('\\Sodium\\crypto_sign_publickey_from_secretkey', $secretKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_Ed25519::publickey_from_secretkey($secretKey); - } - return ParagonIE_Sodium_Core_Ed25519::publickey_from_secretkey($secretKey); - } - - /** - * Extract an Ed25519 secret key from an Ed25519 keypair. - * - * @param string $keypair Keypair - * @return string Secret key - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_secretkey($keypair) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_SIGN_KEYPAIRBYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_SIGN_KEYPAIRBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_secretkey($keypair); - } - if (self::use_fallback('crypto_sign_secretkey')) { - return (string) call_user_func('\\Sodium\\crypto_sign_secretkey', $keypair); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_Ed25519::secretkey($keypair); - } - return ParagonIE_Sodium_Core_Ed25519::secretkey($keypair); - } - - /** - * Calculate the Ed25519 signature of a message and return ONLY the signature. - * - * Algorithm: Ed25519 (EdDSA over Curve25519) - * - * @param string $message Message to be signed - * @param string $secretKey Secret signing key - * @return string Digital signature - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_detached($message, $secretKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 2); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_SIGN_SECRETKEYBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SIGN_SECRETKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_detached($message, $secretKey); - } - if (self::use_fallback('crypto_sign_detached')) { - return (string) call_user_func('\\Sodium\\crypto_sign_detached', $message, $secretKey); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::sign_detached($message, $secretKey); - } - return ParagonIE_Sodium_Crypto::sign_detached($message, $secretKey); - } - - /** - * Verify the Ed25519 signature of a message. - * - * @param string $signature Digital sginature - * @param string $message Message to be verified - * @param string $publicKey Public key - * @return bool TRUE if this signature is good for this public key; - * FALSE otherwise - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_verify_detached($signature, $message, $publicKey) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($signature, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($signature) !== self::CRYPTO_SIGN_BYTES) { - throw new SodiumException('Argument 1 must be CRYPTO_SIGN_BYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_SIGN_PUBLICKEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SIGN_PUBLICKEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_sign_verify_detached($signature, $message, $publicKey); - } - if (self::use_fallback('crypto_sign_verify_detached')) { - return (bool) call_user_func( - '\\Sodium\\crypto_sign_verify_detached', - $signature, - $message, - $publicKey - ); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Crypto32::sign_verify_detached($signature, $message, $publicKey); - } - return ParagonIE_Sodium_Crypto::sign_verify_detached($signature, $message, $publicKey); - } - - /** - * Convert an Ed25519 public key to a Curve25519 public key - * - * @param string $pk - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_ed25519_pk_to_curve25519($pk) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($pk, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($pk) < self::CRYPTO_SIGN_PUBLICKEYBYTES) { - throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_PUBLICKEYBYTES long.'); - } - if (self::useNewSodiumAPI()) { - if (is_callable('crypto_sign_ed25519_pk_to_curve25519')) { - return (string) sodium_crypto_sign_ed25519_pk_to_curve25519($pk); - } - } - if (self::use_fallback('crypto_sign_ed25519_pk_to_curve25519')) { - return (string) call_user_func('\\Sodium\\crypto_sign_ed25519_pk_to_curve25519', $pk); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_Ed25519::pk_to_curve25519($pk); - } - return ParagonIE_Sodium_Core_Ed25519::pk_to_curve25519($pk); - } - - /** - * Convert an Ed25519 secret key to a Curve25519 secret key - * - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_sign_ed25519_sk_to_curve25519($sk) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($sk, 'string', 1); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($sk) < self::CRYPTO_SIGN_SEEDBYTES) { - throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_SEEDBYTES long.'); - } - if (self::useNewSodiumAPI()) { - if (is_callable('crypto_sign_ed25519_sk_to_curve25519')) { - return sodium_crypto_sign_ed25519_sk_to_curve25519($sk); - } - } - if (self::use_fallback('crypto_sign_ed25519_sk_to_curve25519')) { - return (string) call_user_func('\\Sodium\\crypto_sign_ed25519_sk_to_curve25519', $sk); - } - - $h = hash('sha512', ParagonIE_Sodium_Core_Util::substr($sk, 0, 32), true); - $h[0] = ParagonIE_Sodium_Core_Util::intToChr( - ParagonIE_Sodium_Core_Util::chrToInt($h[0]) & 248 - ); - $h[31] = ParagonIE_Sodium_Core_Util::intToChr( - (ParagonIE_Sodium_Core_Util::chrToInt($h[31]) & 127) | 64 - ); - return ParagonIE_Sodium_Core_Util::substr($h, 0, 32); - } - - /** - * Expand a key and nonce into a keystream of pseudorandom bytes. - * - * @param int $len Number of bytes desired - * @param string $nonce Number to be used Once; must be 24 bytes - * @param string $key XSalsa20 key - * @return string Pseudorandom stream that can be XORed with messages - * to provide encryption (but not authentication; see - * Poly1305 or crypto_auth() for that, which is not - * optional for security) - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_stream($len, $nonce, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($len, 'int', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_STREAM_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_stream($len, $nonce, $key); - } - if (self::use_fallback('crypto_stream')) { - return (string) call_user_func('\\Sodium\\crypto_stream', $len, $nonce, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_XSalsa20::xsalsa20($len, $nonce, $key); - } - return ParagonIE_Sodium_Core_XSalsa20::xsalsa20($len, $nonce, $key); - } - - /** - * DANGER! UNAUTHENTICATED ENCRYPTION! - * - * Unless you are following expert advice, do not use this feature. - * - * Algorithm: XSalsa20 - * - * This DOES NOT provide ciphertext integrity. - * - * @param string $message Plaintext message - * @param string $nonce Number to be used Once; must be 24 bytes - * @param string $key Encryption key - * @return string Encrypted text which is vulnerable to chosen- - * ciphertext attacks unless you implement some - * other mitigation to the ciphertext (i.e. - * Encrypt then MAC) - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_stream_xor($message, $nonce, $key) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI()) { - return sodium_crypto_stream_xor($message, $nonce, $key); - } - if (self::use_fallback('crypto_stream_xor')) { - return (string) call_user_func('\\Sodium\\crypto_stream_xor', $message, $nonce, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_XSalsa20::xsalsa20_xor($message, $nonce, $key); - } - return ParagonIE_Sodium_Core_XSalsa20::xsalsa20_xor($message, $nonce, $key); - } - - /** - * Return a secure random key for use with crypto_stream - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_stream_keygen() - { - return random_bytes(self::CRYPTO_STREAM_KEYBYTES); - } - - - /** - * Expand a key and nonce into a keystream of pseudorandom bytes. - * - * @param int $len Number of bytes desired - * @param string $nonce Number to be used Once; must be 24 bytes - * @param string $key XChaCha20 key - * @param bool $dontFallback - * @return string Pseudorandom stream that can be XORed with messages - * to provide encryption (but not authentication; see - * Poly1305 or crypto_auth() for that, which is not - * optional for security) - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_stream_xchacha20($len, $nonce, $key, $dontFallback = false) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($len, 'int', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_XCHACHA20_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_XCHACHA20_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_XCHACHA20_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_STREAM_XCHACHA20_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_stream_xchacha20($len, $nonce, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_XChaCha20::stream($len, $nonce, $key); - } - return ParagonIE_Sodium_Core_XChaCha20::stream($len, $nonce, $key); - } - - /** - * DANGER! UNAUTHENTICATED ENCRYPTION! - * - * Unless you are following expert advice, do not use this feature. - * - * Algorithm: XChaCha20 - * - * This DOES NOT provide ciphertext integrity. - * - * @param string $message Plaintext message - * @param string $nonce Number to be used Once; must be 24 bytes - * @param string $key Encryption key - * @return string Encrypted text which is vulnerable to chosen- - * ciphertext attacks unless you implement some - * other mitigation to the ciphertext (i.e. - * Encrypt then MAC) - * @param bool $dontFallback - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_stream_xchacha20_xor($message, $nonce, $key, $dontFallback = false) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_XCHACHA20_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_XCHACHA20_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_XCHACHA20_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_XCHACHA20_KEYBYTES long.'); - } - - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_stream_xchacha20_xor($message, $nonce, $key); - } - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_XChaCha20::streamXorIc($message, $nonce, $key); - } - return ParagonIE_Sodium_Core_XChaCha20::streamXorIc($message, $nonce, $key); - } - - /** - * DANGER! UNAUTHENTICATED ENCRYPTION! - * - * Unless you are following expert advice, do not use this feature. - * - * Algorithm: XChaCha20 - * - * This DOES NOT provide ciphertext integrity. - * - * @param string $message Plaintext message - * @param string $nonce Number to be used Once; must be 24 bytes - * @param int $counter - * @param string $key Encryption key - * @return string Encrypted text which is vulnerable to chosen- - * ciphertext attacks unless you implement some - * other mitigation to the ciphertext (i.e. - * Encrypt then MAC) - * @param bool $dontFallback - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key, $dontFallback = false) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2); - ParagonIE_Sodium_Core_Util::declareScalarType($counter, 'int', 3); - ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4); - - /* Input validation: */ - if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_XCHACHA20_NONCEBYTES) { - throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_XCHACHA20_NONCEBYTES long.'); - } - if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_XCHACHA20_KEYBYTES) { - throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_XCHACHA20_KEYBYTES long.'); - } - - if (is_callable('sodium_crypto_stream_xchacha20_xor_ic') && !$dontFallback) { - return sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key); - } - - $ic = ParagonIE_Sodium_Core_Util::store64_le($counter); - if (PHP_INT_SIZE === 4) { - return ParagonIE_Sodium_Core32_XChaCha20::streamXorIc($message, $nonce, $key, $ic); - } - return ParagonIE_Sodium_Core_XChaCha20::streamXorIc($message, $nonce, $key, $ic); - } - - /** - * Return a secure random key for use with crypto_stream_xchacha20 - * - * @return string - * @throws Exception - * @throws Error - */ - public static function crypto_stream_xchacha20_keygen() - { - return random_bytes(self::CRYPTO_STREAM_XCHACHA20_KEYBYTES); - } - - /** - * Cache-timing-safe implementation of hex2bin(). - * - * @param string $string Hexadecimal string - * @param string $ignore List of characters to ignore; useful for whitespace - * @return string Raw binary string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress TooFewArguments - * @psalm-suppress MixedArgument - */ - public static function hex2bin($string, $ignore = '') - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($string, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($ignore, 'string', 2); - - if (self::useNewSodiumAPI()) { - if (is_callable('sodium_hex2bin')) { - return (string) sodium_hex2bin($string, $ignore); - } - } - if (self::use_fallback('hex2bin')) { - return (string) call_user_func('\\Sodium\\hex2bin', $string, $ignore); - } - return ParagonIE_Sodium_Core_Util::hex2bin($string, $ignore); - } - - /** - * Increase a string (little endian) - * - * @param string $var - * - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function increment(&$var) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($var, 'string', 1); - - if (self::useNewSodiumAPI()) { - sodium_increment($var); - return; - } - if (self::use_fallback('increment')) { - $func = '\\Sodium\\increment'; - $func($var); - return; - } - - $len = ParagonIE_Sodium_Core_Util::strlen($var); - $c = 1; - $copy = ''; - for ($i = 0; $i < $len; ++$i) { - $c += ParagonIE_Sodium_Core_Util::chrToInt( - ParagonIE_Sodium_Core_Util::substr($var, $i, 1) - ); - $copy .= ParagonIE_Sodium_Core_Util::intToChr($c); - $c >>= 8; - } - $var = $copy; - } - - /** - * @param string $str - * @return bool - * - * @throws SodiumException - */ - public static function is_zero($str) - { - $d = 0; - for ($i = 0; $i < 32; ++$i) { - $d |= ParagonIE_Sodium_Core_Util::chrToInt($str[$i]); - } - return ((($d - 1) >> 31) & 1) === 1; - } - - /** - * The equivalent to the libsodium minor version we aim to be compatible - * with (sans pwhash and memzero). - * - * @return int - */ - public static function library_version_major() - { - if (self::useNewSodiumAPI() && defined('SODIUM_LIBRARY_MAJOR_VERSION')) { - return SODIUM_LIBRARY_MAJOR_VERSION; - } - if (self::use_fallback('library_version_major')) { - /** @psalm-suppress UndefinedFunction */ - return (int) call_user_func('\\Sodium\\library_version_major'); - } - return self::LIBRARY_VERSION_MAJOR; - } - - /** - * The equivalent to the libsodium minor version we aim to be compatible - * with (sans pwhash and memzero). - * - * @return int - */ - public static function library_version_minor() - { - if (self::useNewSodiumAPI() && defined('SODIUM_LIBRARY_MINOR_VERSION')) { - return SODIUM_LIBRARY_MINOR_VERSION; - } - if (self::use_fallback('library_version_minor')) { - /** @psalm-suppress UndefinedFunction */ - return (int) call_user_func('\\Sodium\\library_version_minor'); - } - return self::LIBRARY_VERSION_MINOR; - } - - /** - * Compare two strings. - * - * @param string $left - * @param string $right - * @return int - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - */ - public static function memcmp($left, $right) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($left, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($right, 'string', 2); - - if (self::useNewSodiumAPI()) { - return sodium_memcmp($left, $right); - } - if (self::use_fallback('memcmp')) { - return (int) call_user_func('\\Sodium\\memcmp', $left, $right); - } - /** @var string $left */ - /** @var string $right */ - return ParagonIE_Sodium_Core_Util::memcmp($left, $right); - } - - /** - * It's actually not possible to zero memory buffers in PHP. You need the - * native library for that. - * - * @param string|null $var - * @param-out string|null $var - * - * @return void - * @throws SodiumException (Unless libsodium is installed) - * @throws TypeError - * @psalm-suppress TooFewArguments - */ - public static function memzero(&$var) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($var, 'string', 1); - - if (self::useNewSodiumAPI()) { - /** @psalm-suppress MixedArgument */ - sodium_memzero($var); - return; - } - if (self::use_fallback('memzero')) { - $func = '\\Sodium\\memzero'; - $func($var); - if ($var === null) { - return; - } - } - // This is the best we can do. - throw new SodiumException( - 'This is not implemented in sodium_compat, as it is not possible to securely wipe memory from PHP. ' . - 'To fix this error, make sure libsodium is installed and the PHP extension is enabled.' - ); - } - - /** - * @param string $unpadded - * @param int $blockSize - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function pad($unpadded, $blockSize, $dontFallback = false) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($unpadded, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($blockSize, 'int', 2); - - $unpadded = (string) $unpadded; - $blockSize = (int) $blockSize; - - if (self::useNewSodiumAPI() && !$dontFallback) { - return (string) sodium_pad($unpadded, $blockSize); - } - - if ($blockSize <= 0) { - throw new SodiumException( - 'block size cannot be less than 1' - ); - } - $unpadded_len = ParagonIE_Sodium_Core_Util::strlen($unpadded); - $xpadlen = ($blockSize - 1); - if (($blockSize & ($blockSize - 1)) === 0) { - $xpadlen -= $unpadded_len & ($blockSize - 1); - } else { - $xpadlen -= $unpadded_len % $blockSize; - } - - $xpadded_len = $unpadded_len + $xpadlen; - $padded = str_repeat("\0", $xpadded_len - 1); - if ($unpadded_len > 0) { - $st = 1; - $i = 0; - $k = $unpadded_len; - for ($j = 0; $j <= $xpadded_len; ++$j) { - $i = (int) $i; - $k = (int) $k; - $st = (int) $st; - if ($j >= $unpadded_len) { - $padded[$j] = "\0"; - } else { - $padded[$j] = $unpadded[$j]; - } - /** @var int $k */ - $k -= $st; - $st = (int) (~( - ( - ( - ($k >> 48) - | - ($k >> 32) - | - ($k >> 16) - | - $k - ) - 1 - ) >> 16 - ) - ) & 1; - $i += $st; - } - } - - $mask = 0; - $tail = $xpadded_len; - for ($i = 0; $i < $blockSize; ++$i) { - # barrier_mask = (unsigned char) - # (((i ^ xpadlen) - 1U) >> ((sizeof(size_t) - 1U) * CHAR_BIT)); - $barrier_mask = (($i ^ $xpadlen) -1) >> ((PHP_INT_SIZE << 3) - 1); - # tail[-i] = (tail[-i] & mask) | (0x80 & barrier_mask); - $padded[$tail - $i] = ParagonIE_Sodium_Core_Util::intToChr( - (ParagonIE_Sodium_Core_Util::chrToInt($padded[$tail - $i]) & $mask) - | - (0x80 & $barrier_mask) - ); - # mask |= barrier_mask; - $mask |= $barrier_mask; - } - return $padded; - } - - /** - * @param string $padded - * @param int $blockSize - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function unpad($padded, $blockSize, $dontFallback = false) - { - /* Type checks: */ - ParagonIE_Sodium_Core_Util::declareScalarType($padded, 'string', 1); - ParagonIE_Sodium_Core_Util::declareScalarType($blockSize, 'int', 2); - - $padded = (string) $padded; - $blockSize = (int) $blockSize; - - if (self::useNewSodiumAPI() && !$dontFallback) { - return (string) sodium_unpad($padded, $blockSize); - } - if ($blockSize <= 0) { - throw new SodiumException('block size cannot be less than 1'); - } - $padded_len = ParagonIE_Sodium_Core_Util::strlen($padded); - if ($padded_len < $blockSize) { - throw new SodiumException('invalid padding'); - } - - # tail = &padded[padded_len - 1U]; - $tail = $padded_len - 1; - - $acc = 0; - $valid = 0; - $pad_len = 0; - - $found = 0; - for ($i = 0; $i < $blockSize; ++$i) { - # c = tail[-i]; - $c = ParagonIE_Sodium_Core_Util::chrToInt($padded[$tail - $i]); - - # is_barrier = - # (( (acc - 1U) & (pad_len - 1U) & ((c ^ 0x80) - 1U) ) >> 8) & 1U; - $is_barrier = ( - ( - ($acc - 1) & ($pad_len - 1) & (($c ^ 80) - 1) - ) >> 7 - ) & 1; - $is_barrier &= ~$found; - $found |= $is_barrier; - - # acc |= c; - $acc |= $c; - - # pad_len |= i & (1U + ~is_barrier); - $pad_len |= $i & (1 + ~$is_barrier); - - # valid |= (unsigned char) is_barrier; - $valid |= ($is_barrier & 0xff); - } - # unpadded_len = padded_len - 1U - pad_len; - $unpadded_len = $padded_len - 1 - $pad_len; - if ($valid !== 1) { - throw new SodiumException('invalid padding'); - } - return ParagonIE_Sodium_Core_Util::substr($padded, 0, $unpadded_len); - } - - /** - * Will sodium_compat run fast on the current hardware and PHP configuration? - * - * @return bool - */ - public static function polyfill_is_fast() - { - if (extension_loaded('sodium')) { - return true; - } - if (extension_loaded('libsodium')) { - return true; - } - return PHP_INT_SIZE === 8; - } - - /** - * Generate a string of bytes from the kernel's CSPRNG. - * Proudly uses /dev/urandom (if getrandom(2) is not available). - * - * @param int $numBytes - * @return string - * @throws Exception - * @throws TypeError - */ - public static function randombytes_buf($numBytes) - { - /* Type checks: */ - if (!is_int($numBytes)) { - if (is_numeric($numBytes)) { - $numBytes = (int) $numBytes; - } else { - throw new TypeError( - 'Argument 1 must be an integer, ' . gettype($numBytes) . ' given.' - ); - } - } - /** @var positive-int $numBytes */ - if (self::use_fallback('randombytes_buf')) { - return (string) call_user_func('\\Sodium\\randombytes_buf', $numBytes); - } - if ($numBytes < 0) { - throw new SodiumException("Number of bytes must be a positive integer"); - } - return random_bytes($numBytes); - } - - /** - * Generate an integer between 0 and $range (non-inclusive). - * - * @param int $range - * @return int - * @throws Exception - * @throws Error - * @throws TypeError - */ - public static function randombytes_uniform($range) - { - /* Type checks: */ - if (!is_int($range)) { - if (is_numeric($range)) { - $range = (int) $range; - } else { - throw new TypeError( - 'Argument 1 must be an integer, ' . gettype($range) . ' given.' - ); - } - } - if (self::use_fallback('randombytes_uniform')) { - return (int) call_user_func('\\Sodium\\randombytes_uniform', $range); - } - return random_int(0, $range - 1); - } - - /** - * Generate a random 16-bit integer. - * - * @return int - * @throws Exception - * @throws Error - * @throws TypeError - */ - public static function randombytes_random16() - { - if (self::use_fallback('randombytes_random16')) { - return (int) call_user_func('\\Sodium\\randombytes_random16'); - } - return random_int(0, 65535); - } - - /** - * @param string $p - * @param bool $dontFallback - * @return bool - * @throws SodiumException - */ - public static function ristretto255_is_valid_point($p, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_is_valid_point($p); - } - try { - $r = ParagonIE_Sodium_Core_Ristretto255::ristretto255_frombytes($p); - return $r['res'] === 0 && - ParagonIE_Sodium_Core_Ristretto255::ristretto255_point_is_canonical($p) === 1; - } catch (SodiumException $ex) { - if ($ex->getMessage() === 'S is not canonical') { - return false; - } - throw $ex; - } - } - - /** - * @param string $p - * @param string $q - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_add($p, $q, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_add($p, $q); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_add($p, $q); - } - - /** - * @param string $p - * @param string $q - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_sub($p, $q, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_sub($p, $q); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_sub($p, $q); - } - - /** - * @param string $r - * @param bool $dontFallback - * @return string - * - * @throws SodiumException - */ - public static function ristretto255_from_hash($r, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_from_hash($r); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_from_hash($r); - } - - /** - * @param bool $dontFallback - * @return string - * - * @throws SodiumException - */ - public static function ristretto255_random($dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_random(); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_random(); - } - - /** - * @param bool $dontFallback - * @return string - * - * @throws SodiumException - */ - public static function ristretto255_scalar_random($dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_random(); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_random(); - } - - /** - * @param string $s - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_invert($s, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_invert($s); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_invert($s); - } - /** - * @param string $s - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_negate($s, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_negate($s); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_negate($s); - } - - /** - * @param string $s - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_complement($s, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_complement($s); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_complement($s); - } - - /** - * @param string $x - * @param string $y - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_add($x, $y, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_add($x, $y); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_add($x, $y); - } - - /** - * @param string $x - * @param string $y - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_sub($x, $y, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_sub($x, $y); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_sub($x, $y); - } - - /** - * @param string $x - * @param string $y - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_mul($x, $y, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_mul($x, $y); - } - return ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_mul($x, $y); - } - - /** - * @param string $n - * @param string $p - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function scalarmult_ristretto255($n, $p, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_scalarmult_ristretto255($n, $p); - } - return ParagonIE_Sodium_Core_Ristretto255::scalarmult_ristretto255($n, $p); - } - - /** - * @param string $n - * @param string $p - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function scalarmult_ristretto255_base($n, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_scalarmult_ristretto255_base($n); - } - return ParagonIE_Sodium_Core_Ristretto255::scalarmult_ristretto255_base($n); - } - - /** - * @param string $s - * @param bool $dontFallback - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_reduce($s, $dontFallback = false) - { - if (self::useNewSodiumAPI() && !$dontFallback) { - return sodium_crypto_core_ristretto255_scalar_reduce($s); - } - return ParagonIE_Sodium_Core_Ristretto255::sc_reduce($s); - } - - /** - * Runtime testing method for 32-bit platforms. - * - * Usage: If runtime_speed_test() returns FALSE, then our 32-bit - * implementation is to slow to use safely without risking timeouts. - * If this happens, install sodium from PECL to get acceptable - * performance. - * - * @param int $iterations Number of multiplications to attempt - * @param int $maxTimeout Milliseconds - * @return bool TRUE if we're fast enough, FALSE is not - * @throws SodiumException - */ - public static function runtime_speed_test($iterations, $maxTimeout) - { - if (self::polyfill_is_fast()) { - return true; - } - /** @var float $end */ - $end = 0.0; - /** @var float $start */ - $start = microtime(true); - /** @var ParagonIE_Sodium_Core32_Int64 $a */ - $a = ParagonIE_Sodium_Core32_Int64::fromInt(random_int(3, 1 << 16)); - for ($i = 0; $i < $iterations; ++$i) { - /** @var ParagonIE_Sodium_Core32_Int64 $b */ - $b = ParagonIE_Sodium_Core32_Int64::fromInt(random_int(3, 1 << 16)); - $a->mulInt64($b); - } - /** @var float $end */ - $end = microtime(true); - /** @var int $diff */ - $diff = (int) ceil(($end - $start) * 1000); - return $diff < $maxTimeout; - } - - /** - * Add two numbers (little-endian unsigned), storing the value in the first - * parameter. - * - * This mutates $val. - * - * @param string $val - * @param string $addv - * @return void - * @throws SodiumException - */ - public static function sub(&$val, $addv) - { - $val_len = ParagonIE_Sodium_Core_Util::strlen($val); - $addv_len = ParagonIE_Sodium_Core_Util::strlen($addv); - if ($val_len !== $addv_len) { - throw new SodiumException('values must have the same length'); - } - $A = ParagonIE_Sodium_Core_Util::stringToIntArray($val); - $B = ParagonIE_Sodium_Core_Util::stringToIntArray($addv); - - $c = 0; - for ($i = 0; $i < $val_len; $i++) { - $c = ($A[$i] - $B[$i] - $c); - $A[$i] = ($c & 0xff); - $c = ($c >> 8) & 1; - } - $val = ParagonIE_Sodium_Core_Util::intArrayToString($A); - } - - /** - * This emulates libsodium's version_string() function, except ours is - * prefixed with 'polyfill-'. - * - * @return string - * @psalm-suppress MixedInferredReturnType - * @psalm-suppress UndefinedFunction - */ - public static function version_string() - { - if (self::useNewSodiumAPI()) { - return (string) sodium_version_string(); - } - if (self::use_fallback('version_string')) { - return (string) call_user_func('\\Sodium\\version_string'); - } - return (string) self::VERSION_STRING; - } - - /** - * Should we use the libsodium core function instead? - * This is always a good idea, if it's available. (Unless we're in the - * middle of running our unit test suite.) - * - * If ext/libsodium is available, use it. Return TRUE. - * Otherwise, we have to use the code provided herein. Return FALSE. - * - * @param string $sodium_func_name - * - * @return bool - */ - protected static function use_fallback($sodium_func_name = '') - { - static $res = null; - if ($res === null) { - $res = extension_loaded('libsodium') && PHP_VERSION_ID >= 50300; - } - if ($res === false) { - // No libsodium installed - return false; - } - if (self::$disableFallbackForUnitTests) { - // Don't fallback. Use the PHP implementation. - return false; - } - if (!empty($sodium_func_name)) { - return is_callable('\\Sodium\\' . $sodium_func_name); - } - return true; - } - - /** - * Libsodium as implemented in PHP 7.2 - * and/or ext/sodium (via PECL) - * - * @ref https://wiki.php.net/rfc/libsodium - * @return bool - */ - protected static function useNewSodiumAPI() - { - static $res = null; - if ($res === null) { - $res = PHP_VERSION_ID >= 70000 && extension_loaded('sodium'); - } - if (self::$disableFallbackForUnitTests) { - // Don't fallback. Use the PHP implementation. - return false; - } - return (bool) $res; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php deleted file mode 100644 index 6c8e3cd6..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php +++ /dev/null @@ -1,798 +0,0 @@ -> - */ - protected static $sigma = array( - array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), - array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3), - array( 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4), - array( 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8), - array( 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13), - array( 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9), - array( 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11), - array( 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10), - array( 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5), - array( 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0), - array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), - array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3) - ); - - const BLOCKBYTES = 128; - const OUTBYTES = 64; - const KEYBYTES = 64; - - /** - * Turn two 32-bit integers into a fixed array representing a 64-bit integer. - * - * @internal You should not use this directly from another application - * - * @param int $high - * @param int $low - * @return SplFixedArray - * @psalm-suppress MixedAssignment - */ - public static function new64($high, $low) - { - if (PHP_INT_SIZE === 4) { - throw new SodiumException("Error, use 32-bit"); - } - $i64 = new SplFixedArray(2); - $i64[0] = $high & 0xffffffff; - $i64[1] = $low & 0xffffffff; - return $i64; - } - - /** - * Convert an arbitrary number into an SplFixedArray of two 32-bit integers - * that represents a 64-bit integer. - * - * @internal You should not use this directly from another application - * - * @param int $num - * @return SplFixedArray - */ - protected static function to64($num) - { - list($hi, $lo) = self::numericTo64BitInteger($num); - return self::new64($hi, $lo); - } - - /** - * Adds two 64-bit integers together, returning their sum as a SplFixedArray - * containing two 32-bit integers (representing a 64-bit integer). - * - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param SplFixedArray $y - * @return SplFixedArray - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedOperand - */ - protected static function add64($x, $y) - { - if (PHP_INT_SIZE === 4) { - throw new SodiumException("Error, use 32-bit"); - } - $l = ($x[1] + $y[1]) & 0xffffffff; - return self::new64( - (int) ($x[0] + $y[0] + ( - ($l < $x[1]) ? 1 : 0 - )), - (int) $l - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param SplFixedArray $y - * @param SplFixedArray $z - * @return SplFixedArray - */ - protected static function add364($x, $y, $z) - { - return self::add64($x, self::add64($y, $z)); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param SplFixedArray $y - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - */ - protected static function xor64(SplFixedArray $x, SplFixedArray $y) - { - if (PHP_INT_SIZE === 4) { - throw new SodiumException("Error, use 32-bit"); - } - if (!is_numeric($x[0])) { - throw new SodiumException('x[0] is not an integer'); - } - if (!is_numeric($x[1])) { - throw new SodiumException('x[1] is not an integer'); - } - if (!is_numeric($y[0])) { - throw new SodiumException('y[0] is not an integer'); - } - if (!is_numeric($y[1])) { - throw new SodiumException('y[1] is not an integer'); - } - return self::new64( - (int) (($x[0] ^ $y[0]) & 0xffffffff), - (int) (($x[1] ^ $y[1]) & 0xffffffff) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param int $c - * @return SplFixedArray - * @psalm-suppress MixedAssignment - */ - public static function rotr64($x, $c) - { - if (PHP_INT_SIZE === 4) { - throw new SodiumException("Error, use 32-bit"); - } - if ($c >= 64) { - $c %= 64; - } - if ($c >= 32) { - /** @var int $tmp */ - $tmp = $x[0]; - $x[0] = $x[1]; - $x[1] = $tmp; - $c -= 32; - } - if ($c === 0) { - return $x; - } - - $l0 = 0; - $c = 64 - $c; - - /** @var int $c */ - if ($c < 32) { - $h0 = ((int) ($x[0]) << $c) | ( - ( - (int) ($x[1]) & ((1 << $c) - 1) - << - (32 - $c) - ) >> (32 - $c) - ); - $l0 = (int) ($x[1]) << $c; - } else { - $h0 = (int) ($x[1]) << ($c - 32); - } - - $h1 = 0; - $c1 = 64 - $c; - - if ($c1 < 32) { - $h1 = (int) ($x[0]) >> $c1; - $l1 = ((int) ($x[1]) >> $c1) | ((int) ($x[0]) & ((1 << $c1) - 1)) << (32 - $c1); - } else { - $l1 = (int) ($x[0]) >> ($c1 - 32); - } - - return self::new64($h0 | $h1, $l0 | $l1); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @return int - * @psalm-suppress MixedOperand - */ - protected static function flatten64($x) - { - return (int) ($x[0] * 4294967296 + $x[1]); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param int $i - * @return SplFixedArray - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayOffset - */ - protected static function load64(SplFixedArray $x, $i) - { - /** @var int $l */ - $l = (int) ($x[$i]) - | ((int) ($x[$i+1]) << 8) - | ((int) ($x[$i+2]) << 16) - | ((int) ($x[$i+3]) << 24); - /** @var int $h */ - $h = (int) ($x[$i+4]) - | ((int) ($x[$i+5]) << 8) - | ((int) ($x[$i+6]) << 16) - | ((int) ($x[$i+7]) << 24); - return self::new64($h, $l); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param int $i - * @param SplFixedArray $u - * @return void - * @psalm-suppress MixedAssignment - */ - protected static function store64(SplFixedArray $x, $i, SplFixedArray $u) - { - $maxLength = $x->getSize() - 1; - for ($j = 0; $j < 8; ++$j) { - /* - [0, 1, 2, 3, 4, 5, 6, 7] - ... becomes ... - [0, 0, 0, 0, 1, 1, 1, 1] - */ - /** @var int $uIdx */ - $uIdx = ((7 - $j) & 4) >> 2; - $x[$i] = ((int) ($u[$uIdx]) & 0xff); - if (++$i > $maxLength) { - return; - } - /** @psalm-suppress MixedOperand */ - $u[$uIdx] >>= 8; - } - } - - /** - * This just sets the $iv static variable. - * - * @internal You should not use this directly from another application - * - * @return void - */ - public static function pseudoConstructor() - { - static $called = false; - if ($called) { - return; - } - self::$iv = new SplFixedArray(8); - self::$iv[0] = self::new64(0x6a09e667, 0xf3bcc908); - self::$iv[1] = self::new64(0xbb67ae85, 0x84caa73b); - self::$iv[2] = self::new64(0x3c6ef372, 0xfe94f82b); - self::$iv[3] = self::new64(0xa54ff53a, 0x5f1d36f1); - self::$iv[4] = self::new64(0x510e527f, 0xade682d1); - self::$iv[5] = self::new64(0x9b05688c, 0x2b3e6c1f); - self::$iv[6] = self::new64(0x1f83d9ab, 0xfb41bd6b); - self::$iv[7] = self::new64(0x5be0cd19, 0x137e2179); - - $called = true; - } - - /** - * Returns a fresh BLAKE2 context. - * - * @internal You should not use this directly from another application - * - * @return SplFixedArray - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - */ - protected static function context() - { - $ctx = new SplFixedArray(6); - $ctx[0] = new SplFixedArray(8); // h - $ctx[1] = new SplFixedArray(2); // t - $ctx[2] = new SplFixedArray(2); // f - $ctx[3] = new SplFixedArray(256); // buf - $ctx[4] = 0; // buflen - $ctx[5] = 0; // last_node (uint8_t) - - for ($i = 8; $i--;) { - $ctx[0][$i] = self::$iv[$i]; - } - for ($i = 256; $i--;) { - $ctx[3][$i] = 0; - } - - $zero = self::new64(0, 0); - $ctx[1][0] = $zero; - $ctx[1][1] = $zero; - $ctx[2][0] = $zero; - $ctx[2][1] = $zero; - - return $ctx; - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param SplFixedArray $buf - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - */ - protected static function compress(SplFixedArray $ctx, SplFixedArray $buf) - { - $m = new SplFixedArray(16); - $v = new SplFixedArray(16); - - for ($i = 16; $i--;) { - $m[$i] = self::load64($buf, $i << 3); - } - - for ($i = 8; $i--;) { - $v[$i] = $ctx[0][$i]; - } - - $v[ 8] = self::$iv[0]; - $v[ 9] = self::$iv[1]; - $v[10] = self::$iv[2]; - $v[11] = self::$iv[3]; - - $v[12] = self::xor64($ctx[1][0], self::$iv[4]); - $v[13] = self::xor64($ctx[1][1], self::$iv[5]); - $v[14] = self::xor64($ctx[2][0], self::$iv[6]); - $v[15] = self::xor64($ctx[2][1], self::$iv[7]); - - for ($r = 0; $r < 12; ++$r) { - $v = self::G($r, 0, 0, 4, 8, 12, $v, $m); - $v = self::G($r, 1, 1, 5, 9, 13, $v, $m); - $v = self::G($r, 2, 2, 6, 10, 14, $v, $m); - $v = self::G($r, 3, 3, 7, 11, 15, $v, $m); - $v = self::G($r, 4, 0, 5, 10, 15, $v, $m); - $v = self::G($r, 5, 1, 6, 11, 12, $v, $m); - $v = self::G($r, 6, 2, 7, 8, 13, $v, $m); - $v = self::G($r, 7, 3, 4, 9, 14, $v, $m); - } - - for ($i = 8; $i--;) { - $ctx[0][$i] = self::xor64( - $ctx[0][$i], self::xor64($v[$i], $v[$i+8]) - ); - } - } - - /** - * @internal You should not use this directly from another application - * - * @param int $r - * @param int $i - * @param int $a - * @param int $b - * @param int $c - * @param int $d - * @param SplFixedArray $v - * @param SplFixedArray $m - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayOffset - */ - public static function G($r, $i, $a, $b, $c, $d, SplFixedArray $v, SplFixedArray $m) - { - $v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][$i << 1]]); - $v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 32); - $v[$c] = self::add64($v[$c], $v[$d]); - $v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 24); - $v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][($i << 1) + 1]]); - $v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 16); - $v[$c] = self::add64($v[$c], $v[$d]); - $v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 63); - return $v; - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param int $inc - * @return void - * @throws SodiumException - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - */ - public static function increment_counter($ctx, $inc) - { - if ($inc < 0) { - throw new SodiumException('Increasing by a negative number makes no sense.'); - } - $t = self::to64($inc); - # S->t is $ctx[1] in our implementation - - # S->t[0] = ( uint64_t )( t >> 0 ); - $ctx[1][0] = self::add64($ctx[1][0], $t); - - # S->t[1] += ( S->t[0] < inc ); - if (self::flatten64($ctx[1][0]) < $inc) { - $ctx[1][1] = self::add64($ctx[1][1], self::to64(1)); - } - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param SplFixedArray $p - * @param int $plen - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - * @psalm-suppress MixedOperand - */ - public static function update(SplFixedArray $ctx, SplFixedArray $p, $plen) - { - self::pseudoConstructor(); - - $offset = 0; - while ($plen > 0) { - $left = $ctx[4]; - $fill = 256 - $left; - - if ($plen > $fill) { - # memcpy( S->buf + left, in, fill ); /* Fill buffer */ - for ($i = $fill; $i--;) { - $ctx[3][$i + $left] = $p[$i + $offset]; - } - - # S->buflen += fill; - $ctx[4] += $fill; - - # blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); - self::increment_counter($ctx, 128); - - # blake2b_compress( S, S->buf ); /* Compress */ - self::compress($ctx, $ctx[3]); - - # memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); /* Shift buffer left */ - for ($i = 128; $i--;) { - $ctx[3][$i] = $ctx[3][$i + 128]; - } - - # S->buflen -= BLAKE2B_BLOCKBYTES; - $ctx[4] -= 128; - - # in += fill; - $offset += $fill; - - # inlen -= fill; - $plen -= $fill; - } else { - for ($i = $plen; $i--;) { - $ctx[3][$i + $left] = $p[$i + $offset]; - } - $ctx[4] += $plen; - $offset += $plen; - $plen -= $plen; - } - } - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param SplFixedArray $out - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - * @psalm-suppress MixedOperand - */ - public static function finish(SplFixedArray $ctx, SplFixedArray $out) - { - self::pseudoConstructor(); - if ($ctx[4] > 128) { - self::increment_counter($ctx, 128); - self::compress($ctx, $ctx[3]); - $ctx[4] -= 128; - if ($ctx[4] > 128) { - throw new SodiumException('Failed to assert that buflen <= 128 bytes'); - } - for ($i = $ctx[4]; $i--;) { - $ctx[3][$i] = $ctx[3][$i + 128]; - } - } - - self::increment_counter($ctx, $ctx[4]); - $ctx[2][0] = self::new64(0xffffffff, 0xffffffff); - - for ($i = 256 - $ctx[4]; $i--;) { - $ctx[3][$i+$ctx[4]] = 0; - } - - self::compress($ctx, $ctx[3]); - - $i = (int) (($out->getSize() - 1) / 8); - for (; $i >= 0; --$i) { - self::store64($out, $i << 3, $ctx[0][$i]); - } - return $out; - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray|null $key - * @param int $outlen - * @param SplFixedArray|null $salt - * @param SplFixedArray|null $personal - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - */ - public static function init( - $key = null, - $outlen = 64, - $salt = null, - $personal = null - ) { - self::pseudoConstructor(); - $klen = 0; - - if ($key !== null) { - if (count($key) > 64) { - throw new SodiumException('Invalid key size'); - } - $klen = count($key); - } - - if ($outlen > 64) { - throw new SodiumException('Invalid output size'); - } - - $ctx = self::context(); - - $p = new SplFixedArray(64); - // Zero our param buffer... - for ($i = 64; --$i;) { - $p[$i] = 0; - } - - $p[0] = $outlen; // digest_length - $p[1] = $klen; // key_length - $p[2] = 1; // fanout - $p[3] = 1; // depth - - if ($salt instanceof SplFixedArray) { - // salt: [32] through [47] - for ($i = 0; $i < 16; ++$i) { - $p[32 + $i] = (int) $salt[$i]; - } - } - if ($personal instanceof SplFixedArray) { - // personal: [48] through [63] - for ($i = 0; $i < 16; ++$i) { - $p[48 + $i] = (int) $personal[$i]; - } - } - - $ctx[0][0] = self::xor64( - $ctx[0][0], - self::load64($p, 0) - ); - if ($salt instanceof SplFixedArray || $personal instanceof SplFixedArray) { - // We need to do what blake2b_init_param() does: - for ($i = 1; $i < 8; ++$i) { - $ctx[0][$i] = self::xor64( - $ctx[0][$i], - self::load64($p, $i << 3) - ); - } - } - - if ($klen > 0 && $key instanceof SplFixedArray) { - $block = new SplFixedArray(128); - for ($i = 128; $i--;) { - $block[$i] = 0; - } - for ($i = $klen; $i--;) { - $block[$i] = $key[$i]; - } - self::update($ctx, $block, 128); - $ctx[4] = 128; - } - - return $ctx; - } - - /** - * Convert a string into an SplFixedArray of integers - * - * @internal You should not use this directly from another application - * - * @param string $str - * @return SplFixedArray - * @psalm-suppress MixedArgumentTypeCoercion - */ - public static function stringToSplFixedArray($str = '') - { - $values = unpack('C*', $str); - return SplFixedArray::fromArray(array_values($values)); - } - - /** - * Convert an SplFixedArray of integers into a string - * - * @internal You should not use this directly from another application - * - * @param SplFixedArray $a - * @return string - * @throws TypeError - */ - public static function SplFixedArrayToString(SplFixedArray $a) - { - /** - * @var array $arr - */ - $arr = $a->toArray(); - $c = $a->count(); - array_unshift($arr, str_repeat('C', $c)); - return (string) (call_user_func_array('pack', $arr)); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @return string - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - * @psalm-suppress MixedMethodCall - */ - public static function contextToString(SplFixedArray $ctx) - { - $str = ''; - /** @var array> $ctxA */ - $ctxA = $ctx[0]->toArray(); - - # uint64_t h[8]; - for ($i = 0; $i < 8; ++$i) { - $str .= self::store32_le($ctxA[$i][1]); - $str .= self::store32_le($ctxA[$i][0]); - } - - # uint64_t t[2]; - # uint64_t f[2]; - for ($i = 1; $i < 3; ++$i) { - $ctxA = $ctx[$i]->toArray(); - $str .= self::store32_le($ctxA[0][1]); - $str .= self::store32_le($ctxA[0][0]); - $str .= self::store32_le($ctxA[1][1]); - $str .= self::store32_le($ctxA[1][0]); - } - - # uint8_t buf[2 * 128]; - $str .= self::SplFixedArrayToString($ctx[3]); - - /** @var int $ctx4 */ - $ctx4 = (int) $ctx[4]; - - # size_t buflen; - $str .= implode('', array( - self::intToChr($ctx4 & 0xff), - self::intToChr(($ctx4 >> 8) & 0xff), - self::intToChr(($ctx4 >> 16) & 0xff), - self::intToChr(($ctx4 >> 24) & 0xff), - self::intToChr(($ctx4 >> 32) & 0xff), - self::intToChr(($ctx4 >> 40) & 0xff), - self::intToChr(($ctx4 >> 48) & 0xff), - self::intToChr(($ctx4 >> 56) & 0xff) - )); - # uint8_t last_node; - return $str . self::intToChr($ctx[5]) . str_repeat("\x00", 23); - } - - /** - * Creates an SplFixedArray containing other SplFixedArray elements, from - * a string (compatible with \Sodium\crypto_generichash_{init, update, final}) - * - * @internal You should not use this directly from another application - * - * @param string $string - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAssignment - */ - public static function stringToContext($string) - { - $ctx = self::context(); - - # uint64_t h[8]; - for ($i = 0; $i < 8; ++$i) { - $ctx[0][$i] = SplFixedArray::fromArray( - array( - self::load_4( - self::substr($string, (($i << 3) + 4), 4) - ), - self::load_4( - self::substr($string, (($i << 3) + 0), 4) - ) - ) - ); - } - - # uint64_t t[2]; - # uint64_t f[2]; - for ($i = 1; $i < 3; ++$i) { - $ctx[$i][1] = SplFixedArray::fromArray( - array( - self::load_4(self::substr($string, 76 + (($i - 1) << 4), 4)), - self::load_4(self::substr($string, 72 + (($i - 1) << 4), 4)) - ) - ); - $ctx[$i][0] = SplFixedArray::fromArray( - array( - self::load_4(self::substr($string, 68 + (($i - 1) << 4), 4)), - self::load_4(self::substr($string, 64 + (($i - 1) << 4), 4)) - ) - ); - } - - # uint8_t buf[2 * 128]; - $ctx[3] = self::stringToSplFixedArray(self::substr($string, 96, 256)); - - # uint8_t buf[2 * 128]; - $int = 0; - for ($i = 0; $i < 8; ++$i) { - $int |= self::chrToInt($string[352 + $i]) << ($i << 3); - } - $ctx[4] = $int; - - return $ctx; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Base64/Original.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Base64/Original.php deleted file mode 100644 index 1dd908fe..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Base64/Original.php +++ /dev/null @@ -1,249 +0,0 @@ - $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 3)); - $b0 = $chunk[1]; - $b1 = $chunk[2]; - $b2 = $chunk[3]; - - $dest .= - self::encode6Bits( $b0 >> 2 ) . - self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . - self::encode6Bits((($b1 << 2) | ($b2 >> 6)) & 63) . - self::encode6Bits( $b2 & 63); - } - // The last chunk, which may have padding: - if ($i < $srcLen) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i)); - $b0 = $chunk[1]; - if ($i + 1 < $srcLen) { - $b1 = $chunk[2]; - $dest .= - self::encode6Bits($b0 >> 2) . - self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . - self::encode6Bits(($b1 << 2) & 63); - if ($pad) { - $dest .= '='; - } - } else { - $dest .= - self::encode6Bits( $b0 >> 2) . - self::encode6Bits(($b0 << 4) & 63); - if ($pad) { - $dest .= '=='; - } - } - } - return $dest; - } - - /** - * decode from base64 into binary - * - * Base64 character set "./[A-Z][a-z][0-9]" - * - * @param string $src - * @param bool $strictPadding - * @return string - * @throws RangeException - * @throws TypeError - * @psalm-suppress RedundantCondition - */ - public static function decode($src, $strictPadding = false) - { - // Remove padding - $srcLen = ParagonIE_Sodium_Core_Util::strlen($src); - if ($srcLen === 0) { - return ''; - } - - if ($strictPadding) { - if (($srcLen & 3) === 0) { - if ($src[$srcLen - 1] === '=') { - $srcLen--; - if ($src[$srcLen - 1] === '=') { - $srcLen--; - } - } - } - if (($srcLen & 3) === 1) { - throw new RangeException( - 'Incorrect padding' - ); - } - if ($src[$srcLen - 1] === '=') { - throw new RangeException( - 'Incorrect padding' - ); - } - } else { - $src = rtrim($src, '='); - $srcLen = ParagonIE_Sodium_Core_Util::strlen($src); - } - - $err = 0; - $dest = ''; - // Main loop (no padding): - for ($i = 0; $i + 4 <= $srcLen; $i += 4) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 4)); - $c0 = self::decode6Bits($chunk[1]); - $c1 = self::decode6Bits($chunk[2]); - $c2 = self::decode6Bits($chunk[3]); - $c3 = self::decode6Bits($chunk[4]); - - $dest .= pack( - 'CCC', - ((($c0 << 2) | ($c1 >> 4)) & 0xff), - ((($c1 << 4) | ($c2 >> 2)) & 0xff), - ((($c2 << 6) | $c3) & 0xff) - ); - $err |= ($c0 | $c1 | $c2 | $c3) >> 8; - } - // The last chunk, which may have padding: - if ($i < $srcLen) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i)); - $c0 = self::decode6Bits($chunk[1]); - - if ($i + 2 < $srcLen) { - $c1 = self::decode6Bits($chunk[2]); - $c2 = self::decode6Bits($chunk[3]); - $dest .= pack( - 'CC', - ((($c0 << 2) | ($c1 >> 4)) & 0xff), - ((($c1 << 4) | ($c2 >> 2)) & 0xff) - ); - $err |= ($c0 | $c1 | $c2) >> 8; - } elseif ($i + 1 < $srcLen) { - $c1 = self::decode6Bits($chunk[2]); - $dest .= pack( - 'C', - ((($c0 << 2) | ($c1 >> 4)) & 0xff) - ); - $err |= ($c0 | $c1) >> 8; - } elseif ($i < $srcLen && $strictPadding) { - $err |= 1; - } - } - /** @var bool $check */ - $check = ($err === 0); - if (!$check) { - throw new RangeException( - 'Base64::decode() only expects characters in the correct base64 alphabet' - ); - } - return $dest; - } - // COPY ParagonIE_Sodium_Core_Base64_Common ENDING HERE - - /** - * Uses bitwise operators instead of table-lookups to turn 6-bit integers - * into 8-bit integers. - * - * Base64 character set: - * [A-Z] [a-z] [0-9] + / - * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f - * - * @param int $src - * @return int - */ - protected static function decode6Bits($src) - { - $ret = -1; - - // if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64 - $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 64); - - // if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70 - $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 70); - - // if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5 - $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src + 5); - - // if ($src == 0x2b) $ret += 62 + 1; - $ret += (((0x2a - $src) & ($src - 0x2c)) >> 8) & 63; - - // if ($src == 0x2f) ret += 63 + 1; - $ret += (((0x2e - $src) & ($src - 0x30)) >> 8) & 64; - - return $ret; - } - - /** - * Uses bitwise operators instead of table-lookups to turn 8-bit integers - * into 6-bit integers. - * - * @param int $src - * @return string - */ - protected static function encode6Bits($src) - { - $diff = 0x41; - - // if ($src > 25) $diff += 0x61 - 0x41 - 26; // 6 - $diff += ((25 - $src) >> 8) & 6; - - // if ($src > 51) $diff += 0x30 - 0x61 - 26; // -75 - $diff -= ((51 - $src) >> 8) & 75; - - // if ($src > 61) $diff += 0x2b - 0x30 - 10; // -15 - $diff -= ((61 - $src) >> 8) & 15; - - // if ($src > 62) $diff += 0x2f - 0x2b - 1; // 3 - $diff += ((62 - $src) >> 8) & 3; - - return pack('C', $src + $diff); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php deleted file mode 100644 index 1a60d8f4..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php +++ /dev/null @@ -1,248 +0,0 @@ - $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 3)); - $b0 = $chunk[1]; - $b1 = $chunk[2]; - $b2 = $chunk[3]; - - $dest .= - self::encode6Bits( $b0 >> 2 ) . - self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . - self::encode6Bits((($b1 << 2) | ($b2 >> 6)) & 63) . - self::encode6Bits( $b2 & 63); - } - // The last chunk, which may have padding: - if ($i < $srcLen) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i)); - $b0 = $chunk[1]; - if ($i + 1 < $srcLen) { - $b1 = $chunk[2]; - $dest .= - self::encode6Bits($b0 >> 2) . - self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) . - self::encode6Bits(($b1 << 2) & 63); - if ($pad) { - $dest .= '='; - } - } else { - $dest .= - self::encode6Bits( $b0 >> 2) . - self::encode6Bits(($b0 << 4) & 63); - if ($pad) { - $dest .= '=='; - } - } - } - return $dest; - } - - /** - * decode from base64 into binary - * - * Base64 character set "./[A-Z][a-z][0-9]" - * - * @param string $src - * @param bool $strictPadding - * @return string - * @throws RangeException - * @throws TypeError - * @psalm-suppress RedundantCondition - */ - public static function decode($src, $strictPadding = false) - { - // Remove padding - $srcLen = ParagonIE_Sodium_Core_Util::strlen($src); - if ($srcLen === 0) { - return ''; - } - - if ($strictPadding) { - if (($srcLen & 3) === 0) { - if ($src[$srcLen - 1] === '=') { - $srcLen--; - if ($src[$srcLen - 1] === '=') { - $srcLen--; - } - } - } - if (($srcLen & 3) === 1) { - throw new RangeException( - 'Incorrect padding' - ); - } - if ($src[$srcLen - 1] === '=') { - throw new RangeException( - 'Incorrect padding' - ); - } - } else { - $src = rtrim($src, '='); - $srcLen = ParagonIE_Sodium_Core_Util::strlen($src); - } - - $err = 0; - $dest = ''; - // Main loop (no padding): - for ($i = 0; $i + 4 <= $srcLen; $i += 4) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 4)); - $c0 = self::decode6Bits($chunk[1]); - $c1 = self::decode6Bits($chunk[2]); - $c2 = self::decode6Bits($chunk[3]); - $c3 = self::decode6Bits($chunk[4]); - - $dest .= pack( - 'CCC', - ((($c0 << 2) | ($c1 >> 4)) & 0xff), - ((($c1 << 4) | ($c2 >> 2)) & 0xff), - ((($c2 << 6) | $c3) & 0xff) - ); - $err |= ($c0 | $c1 | $c2 | $c3) >> 8; - } - // The last chunk, which may have padding: - if ($i < $srcLen) { - /** @var array $chunk */ - $chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i)); - $c0 = self::decode6Bits($chunk[1]); - - if ($i + 2 < $srcLen) { - $c1 = self::decode6Bits($chunk[2]); - $c2 = self::decode6Bits($chunk[3]); - $dest .= pack( - 'CC', - ((($c0 << 2) | ($c1 >> 4)) & 0xff), - ((($c1 << 4) | ($c2 >> 2)) & 0xff) - ); - $err |= ($c0 | $c1 | $c2) >> 8; - } elseif ($i + 1 < $srcLen) { - $c1 = self::decode6Bits($chunk[2]); - $dest .= pack( - 'C', - ((($c0 << 2) | ($c1 >> 4)) & 0xff) - ); - $err |= ($c0 | $c1) >> 8; - } elseif ($i < $srcLen && $strictPadding) { - $err |= 1; - } - } - /** @var bool $check */ - $check = ($err === 0); - if (!$check) { - throw new RangeException( - 'Base64::decode() only expects characters in the correct base64 alphabet' - ); - } - return $dest; - } - // COPY ParagonIE_Sodium_Core_Base64_Common ENDING HERE - /** - * Uses bitwise operators instead of table-lookups to turn 6-bit integers - * into 8-bit integers. - * - * Base64 character set: - * [A-Z] [a-z] [0-9] + / - * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f - * - * @param int $src - * @return int - */ - protected static function decode6Bits($src) - { - $ret = -1; - - // if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64 - $ret += (((0x40 - $src) & ($src - 0x5b)) >> 8) & ($src - 64); - - // if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70 - $ret += (((0x60 - $src) & ($src - 0x7b)) >> 8) & ($src - 70); - - // if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5 - $ret += (((0x2f - $src) & ($src - 0x3a)) >> 8) & ($src + 5); - - // if ($src == 0x2c) $ret += 62 + 1; - $ret += (((0x2c - $src) & ($src - 0x2e)) >> 8) & 63; - - // if ($src == 0x5f) ret += 63 + 1; - $ret += (((0x5e - $src) & ($src - 0x60)) >> 8) & 64; - - return $ret; - } - - /** - * Uses bitwise operators instead of table-lookups to turn 8-bit integers - * into 6-bit integers. - * - * @param int $src - * @return string - */ - protected static function encode6Bits($src) - { - $diff = 0x41; - - // if ($src > 25) $diff += 0x61 - 0x41 - 26; // 6 - $diff += ((25 - $src) >> 8) & 6; - - // if ($src > 51) $diff += 0x30 - 0x61 - 26; // -75 - $diff -= ((51 - $src) >> 8) & 75; - - // if ($src > 61) $diff += 0x2d - 0x30 - 10; // -13 - $diff -= ((61 - $src) >> 8) & 13; - - // if ($src > 62) $diff += 0x5f - 0x2b - 1; // 3 - $diff += ((62 - $src) >> 8) & 49; - - return pack('C', $src + $diff); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20.php deleted file mode 100644 index d496b612..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20.php +++ /dev/null @@ -1,396 +0,0 @@ -> (32 - $n)) - ) - ); - } - - /** - * The ChaCha20 quarter round function. Works on four 32-bit integers. - * - * @internal You should not use this directly from another application - * - * @param int $a - * @param int $b - * @param int $c - * @param int $d - * @return array - */ - protected static function quarterRound($a, $b, $c, $d) - { - # a = PLUS(a,b); d = ROTATE(XOR(d,a),16); - /** @var int $a */ - $a = ($a + $b) & 0xffffffff; - $d = self::rotate($d ^ $a, 16); - - # c = PLUS(c,d); b = ROTATE(XOR(b,c),12); - /** @var int $c */ - $c = ($c + $d) & 0xffffffff; - $b = self::rotate($b ^ $c, 12); - - # a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); - /** @var int $a */ - $a = ($a + $b) & 0xffffffff; - $d = self::rotate($d ^ $a, 8); - - # c = PLUS(c,d); b = ROTATE(XOR(b,c), 7); - /** @var int $c */ - $c = ($c + $d) & 0xffffffff; - $b = self::rotate($b ^ $c, 7); - return array((int) $a, (int) $b, (int) $c, (int) $d); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_ChaCha20_Ctx $ctx - * @param string $message - * - * @return string - * @throws TypeError - * @throws SodiumException - */ - public static function encryptBytes( - ParagonIE_Sodium_Core_ChaCha20_Ctx $ctx, - $message = '' - ) { - $bytes = self::strlen($message); - - /* - j0 = ctx->input[0]; - j1 = ctx->input[1]; - j2 = ctx->input[2]; - j3 = ctx->input[3]; - j4 = ctx->input[4]; - j5 = ctx->input[5]; - j6 = ctx->input[6]; - j7 = ctx->input[7]; - j8 = ctx->input[8]; - j9 = ctx->input[9]; - j10 = ctx->input[10]; - j11 = ctx->input[11]; - j12 = ctx->input[12]; - j13 = ctx->input[13]; - j14 = ctx->input[14]; - j15 = ctx->input[15]; - */ - $j0 = (int) $ctx[0]; - $j1 = (int) $ctx[1]; - $j2 = (int) $ctx[2]; - $j3 = (int) $ctx[3]; - $j4 = (int) $ctx[4]; - $j5 = (int) $ctx[5]; - $j6 = (int) $ctx[6]; - $j7 = (int) $ctx[7]; - $j8 = (int) $ctx[8]; - $j9 = (int) $ctx[9]; - $j10 = (int) $ctx[10]; - $j11 = (int) $ctx[11]; - $j12 = (int) $ctx[12]; - $j13 = (int) $ctx[13]; - $j14 = (int) $ctx[14]; - $j15 = (int) $ctx[15]; - - $c = ''; - for (;;) { - if ($bytes < 64) { - $message .= str_repeat("\x00", 64 - $bytes); - } - - $x0 = (int) $j0; - $x1 = (int) $j1; - $x2 = (int) $j2; - $x3 = (int) $j3; - $x4 = (int) $j4; - $x5 = (int) $j5; - $x6 = (int) $j6; - $x7 = (int) $j7; - $x8 = (int) $j8; - $x9 = (int) $j9; - $x10 = (int) $j10; - $x11 = (int) $j11; - $x12 = (int) $j12; - $x13 = (int) $j13; - $x14 = (int) $j14; - $x15 = (int) $j15; - - # for (i = 20; i > 0; i -= 2) { - for ($i = 20; $i > 0; $i -= 2) { - # QUARTERROUND( x0, x4, x8, x12) - list($x0, $x4, $x8, $x12) = self::quarterRound($x0, $x4, $x8, $x12); - - # QUARTERROUND( x1, x5, x9, x13) - list($x1, $x5, $x9, $x13) = self::quarterRound($x1, $x5, $x9, $x13); - - # QUARTERROUND( x2, x6, x10, x14) - list($x2, $x6, $x10, $x14) = self::quarterRound($x2, $x6, $x10, $x14); - - # QUARTERROUND( x3, x7, x11, x15) - list($x3, $x7, $x11, $x15) = self::quarterRound($x3, $x7, $x11, $x15); - - # QUARTERROUND( x0, x5, x10, x15) - list($x0, $x5, $x10, $x15) = self::quarterRound($x0, $x5, $x10, $x15); - - # QUARTERROUND( x1, x6, x11, x12) - list($x1, $x6, $x11, $x12) = self::quarterRound($x1, $x6, $x11, $x12); - - # QUARTERROUND( x2, x7, x8, x13) - list($x2, $x7, $x8, $x13) = self::quarterRound($x2, $x7, $x8, $x13); - - # QUARTERROUND( x3, x4, x9, x14) - list($x3, $x4, $x9, $x14) = self::quarterRound($x3, $x4, $x9, $x14); - } - /* - x0 = PLUS(x0, j0); - x1 = PLUS(x1, j1); - x2 = PLUS(x2, j2); - x3 = PLUS(x3, j3); - x4 = PLUS(x4, j4); - x5 = PLUS(x5, j5); - x6 = PLUS(x6, j6); - x7 = PLUS(x7, j7); - x8 = PLUS(x8, j8); - x9 = PLUS(x9, j9); - x10 = PLUS(x10, j10); - x11 = PLUS(x11, j11); - x12 = PLUS(x12, j12); - x13 = PLUS(x13, j13); - x14 = PLUS(x14, j14); - x15 = PLUS(x15, j15); - */ - /** @var int $x0 */ - $x0 = ($x0 & 0xffffffff) + $j0; - /** @var int $x1 */ - $x1 = ($x1 & 0xffffffff) + $j1; - /** @var int $x2 */ - $x2 = ($x2 & 0xffffffff) + $j2; - /** @var int $x3 */ - $x3 = ($x3 & 0xffffffff) + $j3; - /** @var int $x4 */ - $x4 = ($x4 & 0xffffffff) + $j4; - /** @var int $x5 */ - $x5 = ($x5 & 0xffffffff) + $j5; - /** @var int $x6 */ - $x6 = ($x6 & 0xffffffff) + $j6; - /** @var int $x7 */ - $x7 = ($x7 & 0xffffffff) + $j7; - /** @var int $x8 */ - $x8 = ($x8 & 0xffffffff) + $j8; - /** @var int $x9 */ - $x9 = ($x9 & 0xffffffff) + $j9; - /** @var int $x10 */ - $x10 = ($x10 & 0xffffffff) + $j10; - /** @var int $x11 */ - $x11 = ($x11 & 0xffffffff) + $j11; - /** @var int $x12 */ - $x12 = ($x12 & 0xffffffff) + $j12; - /** @var int $x13 */ - $x13 = ($x13 & 0xffffffff) + $j13; - /** @var int $x14 */ - $x14 = ($x14 & 0xffffffff) + $j14; - /** @var int $x15 */ - $x15 = ($x15 & 0xffffffff) + $j15; - - /* - x0 = XOR(x0, LOAD32_LE(m + 0)); - x1 = XOR(x1, LOAD32_LE(m + 4)); - x2 = XOR(x2, LOAD32_LE(m + 8)); - x3 = XOR(x3, LOAD32_LE(m + 12)); - x4 = XOR(x4, LOAD32_LE(m + 16)); - x5 = XOR(x5, LOAD32_LE(m + 20)); - x6 = XOR(x6, LOAD32_LE(m + 24)); - x7 = XOR(x7, LOAD32_LE(m + 28)); - x8 = XOR(x8, LOAD32_LE(m + 32)); - x9 = XOR(x9, LOAD32_LE(m + 36)); - x10 = XOR(x10, LOAD32_LE(m + 40)); - x11 = XOR(x11, LOAD32_LE(m + 44)); - x12 = XOR(x12, LOAD32_LE(m + 48)); - x13 = XOR(x13, LOAD32_LE(m + 52)); - x14 = XOR(x14, LOAD32_LE(m + 56)); - x15 = XOR(x15, LOAD32_LE(m + 60)); - */ - $x0 ^= self::load_4(self::substr($message, 0, 4)); - $x1 ^= self::load_4(self::substr($message, 4, 4)); - $x2 ^= self::load_4(self::substr($message, 8, 4)); - $x3 ^= self::load_4(self::substr($message, 12, 4)); - $x4 ^= self::load_4(self::substr($message, 16, 4)); - $x5 ^= self::load_4(self::substr($message, 20, 4)); - $x6 ^= self::load_4(self::substr($message, 24, 4)); - $x7 ^= self::load_4(self::substr($message, 28, 4)); - $x8 ^= self::load_4(self::substr($message, 32, 4)); - $x9 ^= self::load_4(self::substr($message, 36, 4)); - $x10 ^= self::load_4(self::substr($message, 40, 4)); - $x11 ^= self::load_4(self::substr($message, 44, 4)); - $x12 ^= self::load_4(self::substr($message, 48, 4)); - $x13 ^= self::load_4(self::substr($message, 52, 4)); - $x14 ^= self::load_4(self::substr($message, 56, 4)); - $x15 ^= self::load_4(self::substr($message, 60, 4)); - - /* - j12 = PLUSONE(j12); - if (!j12) { - j13 = PLUSONE(j13); - } - */ - ++$j12; - if ($j12 & 0xf0000000) { - throw new SodiumException('Overflow'); - } - - /* - STORE32_LE(c + 0, x0); - STORE32_LE(c + 4, x1); - STORE32_LE(c + 8, x2); - STORE32_LE(c + 12, x3); - STORE32_LE(c + 16, x4); - STORE32_LE(c + 20, x5); - STORE32_LE(c + 24, x6); - STORE32_LE(c + 28, x7); - STORE32_LE(c + 32, x8); - STORE32_LE(c + 36, x9); - STORE32_LE(c + 40, x10); - STORE32_LE(c + 44, x11); - STORE32_LE(c + 48, x12); - STORE32_LE(c + 52, x13); - STORE32_LE(c + 56, x14); - STORE32_LE(c + 60, x15); - */ - $block = self::store32_le((int) ($x0 & 0xffffffff)) . - self::store32_le((int) ($x1 & 0xffffffff)) . - self::store32_le((int) ($x2 & 0xffffffff)) . - self::store32_le((int) ($x3 & 0xffffffff)) . - self::store32_le((int) ($x4 & 0xffffffff)) . - self::store32_le((int) ($x5 & 0xffffffff)) . - self::store32_le((int) ($x6 & 0xffffffff)) . - self::store32_le((int) ($x7 & 0xffffffff)) . - self::store32_le((int) ($x8 & 0xffffffff)) . - self::store32_le((int) ($x9 & 0xffffffff)) . - self::store32_le((int) ($x10 & 0xffffffff)) . - self::store32_le((int) ($x11 & 0xffffffff)) . - self::store32_le((int) ($x12 & 0xffffffff)) . - self::store32_le((int) ($x13 & 0xffffffff)) . - self::store32_le((int) ($x14 & 0xffffffff)) . - self::store32_le((int) ($x15 & 0xffffffff)); - - /* Partial block */ - if ($bytes < 64) { - $c .= self::substr($block, 0, $bytes); - break; - } - - /* Full block */ - $c .= $block; - $bytes -= 64; - if ($bytes <= 0) { - break; - } - $message = self::substr($message, 64); - } - /* end for(;;) loop */ - - $ctx[12] = $j12; - $ctx[13] = $j13; - return $c; - } - - /** - * @internal You should not use this directly from another application - * - * @param int $len - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function stream($len = 64, $nonce = '', $key = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core_ChaCha20_Ctx($key, $nonce), - str_repeat("\x00", $len) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $len - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ietfStream($len, $nonce = '', $key = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core_ChaCha20_IetfCtx($key, $nonce), - str_repeat("\x00", $len) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $nonce - * @param string $key - * @param string $ic - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ietfStreamXorIc($message, $nonce = '', $key = '', $ic = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core_ChaCha20_IetfCtx($key, $nonce, $ic), - $message - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $nonce - * @param string $key - * @param string $ic - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function streamXorIc($message, $nonce = '', $key = '', $ic = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core_ChaCha20_Ctx($key, $nonce, $ic), - $message - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php deleted file mode 100644 index 46a9e136..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php +++ /dev/null @@ -1,124 +0,0 @@ - - */ - protected $container; - - /** - * ParagonIE_Sodium_Core_ChaCha20_Ctx constructor. - * - * @internal You should not use this directly from another application - * - * @param string $key ChaCha20 key. - * @param string $iv Initialization Vector (a.k.a. nonce). - * @param string $counter The initial counter value. - * Defaults to 8 0x00 bytes. - * @throws InvalidArgumentException - * @throws TypeError - */ - public function __construct($key = '', $iv = '', $counter = '') - { - if (self::strlen($key) !== 32) { - throw new InvalidArgumentException('ChaCha20 expects a 256-bit key.'); - } - if (self::strlen($iv) !== 8) { - throw new InvalidArgumentException('ChaCha20 expects a 64-bit nonce.'); - } - $this->container = new SplFixedArray(16); - - /* "expand 32-byte k" as per ChaCha20 spec */ - $this->container[0] = 0x61707865; - $this->container[1] = 0x3320646e; - $this->container[2] = 0x79622d32; - $this->container[3] = 0x6b206574; - $this->container[4] = self::load_4(self::substr($key, 0, 4)); - $this->container[5] = self::load_4(self::substr($key, 4, 4)); - $this->container[6] = self::load_4(self::substr($key, 8, 4)); - $this->container[7] = self::load_4(self::substr($key, 12, 4)); - $this->container[8] = self::load_4(self::substr($key, 16, 4)); - $this->container[9] = self::load_4(self::substr($key, 20, 4)); - $this->container[10] = self::load_4(self::substr($key, 24, 4)); - $this->container[11] = self::load_4(self::substr($key, 28, 4)); - - if (empty($counter)) { - $this->container[12] = 0; - $this->container[13] = 0; - } else { - $this->container[12] = self::load_4(self::substr($counter, 0, 4)); - $this->container[13] = self::load_4(self::substr($counter, 4, 4)); - } - $this->container[14] = self::load_4(self::substr($iv, 0, 4)); - $this->container[15] = self::load_4(self::substr($iv, 4, 4)); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @param int $value - * @return void - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (!is_int($offset)) { - throw new InvalidArgumentException('Expected an integer'); - } - if (!is_int($value)) { - throw new InvalidArgumentException('Expected an integer'); - } - $this->container[$offset] = $value; - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return bool - */ - #[ReturnTypeWillChange] - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return void - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return mixed|null - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - return isset($this->container[$offset]) - ? $this->container[$offset] - : null; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php deleted file mode 100644 index 2510de0e..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php +++ /dev/null @@ -1,39 +0,0 @@ -container[12] = self::load_4(self::substr($counter, 0, 4)); - } - $this->container[13] = self::load_4(self::substr($iv, 0, 4)); - $this->container[14] = self::load_4(self::substr($iv, 4, 4)); - $this->container[15] = self::load_4(self::substr($iv, 8, 4)); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519.php deleted file mode 100644 index 2d861df0..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519.php +++ /dev/null @@ -1,3837 +0,0 @@ - $arr */ - $arr = array(); - for ($i = 0; $i < 10; ++$i) { - $arr[$i] = (int) ($f[$i] + $g[$i]); - } - return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($arr); - } - - /** - * Constant-time conditional move. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @param ParagonIE_Sodium_Core_Curve25519_Fe $g - * @param int $b - * @return ParagonIE_Sodium_Core_Curve25519_Fe - * @psalm-suppress MixedAssignment - */ - public static function fe_cmov( - ParagonIE_Sodium_Core_Curve25519_Fe $f, - ParagonIE_Sodium_Core_Curve25519_Fe $g, - $b = 0 - ) { - /** @var array $h */ - $h = array(); - $b *= -1; - for ($i = 0; $i < 10; ++$i) { - $x = (($f[$i] ^ $g[$i]) & $b); - $h[$i] = ($f[$i]) ^ $x; - } - return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($h); - } - - /** - * Create a copy of a field element. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_copy(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - $h = clone $f; - return $h; - } - - /** - * Give: 32-byte string. - * Receive: A field element object to use for internal calculations. - * - * @internal You should not use this directly from another application - * - * @param string $s - * @return ParagonIE_Sodium_Core_Curve25519_Fe - * @throws RangeException - * @throws TypeError - */ - public static function fe_frombytes($s) - { - if (self::strlen($s) !== 32) { - throw new RangeException('Expected a 32-byte string.'); - } - $h0 = self::load_4($s); - $h1 = self::load_3(self::substr($s, 4, 3)) << 6; - $h2 = self::load_3(self::substr($s, 7, 3)) << 5; - $h3 = self::load_3(self::substr($s, 10, 3)) << 3; - $h4 = self::load_3(self::substr($s, 13, 3)) << 2; - $h5 = self::load_4(self::substr($s, 16, 4)); - $h6 = self::load_3(self::substr($s, 20, 3)) << 7; - $h7 = self::load_3(self::substr($s, 23, 3)) << 5; - $h8 = self::load_3(self::substr($s, 26, 3)) << 4; - $h9 = (self::load_3(self::substr($s, 29, 3)) & 8388607) << 2; - - $carry9 = ($h9 + (1 << 24)) >> 25; - $h0 += self::mul($carry9, 19, 5); - $h9 -= $carry9 << 25; - $carry1 = ($h1 + (1 << 24)) >> 25; - $h2 += $carry1; - $h1 -= $carry1 << 25; - $carry3 = ($h3 + (1 << 24)) >> 25; - $h4 += $carry3; - $h3 -= $carry3 << 25; - $carry5 = ($h5 + (1 << 24)) >> 25; - $h6 += $carry5; - $h5 -= $carry5 << 25; - $carry7 = ($h7 + (1 << 24)) >> 25; - $h8 += $carry7; - $h7 -= $carry7 << 25; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - $carry2 = ($h2 + (1 << 25)) >> 26; - $h3 += $carry2; - $h2 -= $carry2 << 26; - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - $carry6 = ($h6 + (1 << 25)) >> 26; - $h7 += $carry6; - $h6 -= $carry6 << 26; - $carry8 = ($h8 + (1 << 25)) >> 26; - $h9 += $carry8; - $h8 -= $carry8 << 26; - - return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( - array( - (int) $h0, - (int) $h1, - (int) $h2, - (int) $h3, - (int) $h4, - (int) $h5, - (int) $h6, - (int) $h7, - (int) $h8, - (int) $h9 - ) - ); - } - - /** - * Convert a field element to a byte string. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $h - * @return string - */ - public static function fe_tobytes(ParagonIE_Sodium_Core_Curve25519_Fe $h) - { - $h0 = (int) $h[0]; - $h1 = (int) $h[1]; - $h2 = (int) $h[2]; - $h3 = (int) $h[3]; - $h4 = (int) $h[4]; - $h5 = (int) $h[5]; - $h6 = (int) $h[6]; - $h7 = (int) $h[7]; - $h8 = (int) $h[8]; - $h9 = (int) $h[9]; - - $q = (self::mul($h9, 19, 5) + (1 << 24)) >> 25; - $q = ($h0 + $q) >> 26; - $q = ($h1 + $q) >> 25; - $q = ($h2 + $q) >> 26; - $q = ($h3 + $q) >> 25; - $q = ($h4 + $q) >> 26; - $q = ($h5 + $q) >> 25; - $q = ($h6 + $q) >> 26; - $q = ($h7 + $q) >> 25; - $q = ($h8 + $q) >> 26; - $q = ($h9 + $q) >> 25; - - $h0 += self::mul($q, 19, 5); - - $carry0 = $h0 >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - $carry1 = $h1 >> 25; - $h2 += $carry1; - $h1 -= $carry1 << 25; - $carry2 = $h2 >> 26; - $h3 += $carry2; - $h2 -= $carry2 << 26; - $carry3 = $h3 >> 25; - $h4 += $carry3; - $h3 -= $carry3 << 25; - $carry4 = $h4 >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - $carry5 = $h5 >> 25; - $h6 += $carry5; - $h5 -= $carry5 << 25; - $carry6 = $h6 >> 26; - $h7 += $carry6; - $h6 -= $carry6 << 26; - $carry7 = $h7 >> 25; - $h8 += $carry7; - $h7 -= $carry7 << 25; - $carry8 = $h8 >> 26; - $h9 += $carry8; - $h8 -= $carry8 << 26; - $carry9 = $h9 >> 25; - $h9 -= $carry9 << 25; - - /** - * @var array - */ - $s = array( - (int) (($h0 >> 0) & 0xff), - (int) (($h0 >> 8) & 0xff), - (int) (($h0 >> 16) & 0xff), - (int) ((($h0 >> 24) | ($h1 << 2)) & 0xff), - (int) (($h1 >> 6) & 0xff), - (int) (($h1 >> 14) & 0xff), - (int) ((($h1 >> 22) | ($h2 << 3)) & 0xff), - (int) (($h2 >> 5) & 0xff), - (int) (($h2 >> 13) & 0xff), - (int) ((($h2 >> 21) | ($h3 << 5)) & 0xff), - (int) (($h3 >> 3) & 0xff), - (int) (($h3 >> 11) & 0xff), - (int) ((($h3 >> 19) | ($h4 << 6)) & 0xff), - (int) (($h4 >> 2) & 0xff), - (int) (($h4 >> 10) & 0xff), - (int) (($h4 >> 18) & 0xff), - (int) (($h5 >> 0) & 0xff), - (int) (($h5 >> 8) & 0xff), - (int) (($h5 >> 16) & 0xff), - (int) ((($h5 >> 24) | ($h6 << 1)) & 0xff), - (int) (($h6 >> 7) & 0xff), - (int) (($h6 >> 15) & 0xff), - (int) ((($h6 >> 23) | ($h7 << 3)) & 0xff), - (int) (($h7 >> 5) & 0xff), - (int) (($h7 >> 13) & 0xff), - (int) ((($h7 >> 21) | ($h8 << 4)) & 0xff), - (int) (($h8 >> 4) & 0xff), - (int) (($h8 >> 12) & 0xff), - (int) ((($h8 >> 20) | ($h9 << 6)) & 0xff), - (int) (($h9 >> 2) & 0xff), - (int) (($h9 >> 10) & 0xff), - (int) (($h9 >> 18) & 0xff) - ); - return self::intArrayToString($s); - } - - /** - * Is a field element negative? (1 = yes, 0 = no. Used in calculations.) - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return int - * @throws SodiumException - * @throws TypeError - */ - public static function fe_isnegative(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - $str = self::fe_tobytes($f); - return (int) (self::chrToInt($str[0]) & 1); - } - - /** - * Returns 0 if this field element results in all NUL bytes. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function fe_isnonzero(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - static $zero; - if ($zero === null) { - $zero = str_repeat("\x00", 32); - } - /** @var string $zero */ - /** @var string $str */ - $str = self::fe_tobytes($f); - return !self::verify_32($str, (string) $zero); - } - - /** - * Multiply two field elements - * - * h = f * g - * - * @internal You should not use this directly from another application - * - * @security Is multiplication a source of timing leaks? If so, can we do - * anything to prevent that from happening? - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @param ParagonIE_Sodium_Core_Curve25519_Fe $g - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_mul( - ParagonIE_Sodium_Core_Curve25519_Fe $f, - ParagonIE_Sodium_Core_Curve25519_Fe $g - ) { - // Ensure limbs aren't oversized. - $f = self::fe_normalize($f); - $g = self::fe_normalize($g); - $f0 = $f[0]; - $f1 = $f[1]; - $f2 = $f[2]; - $f3 = $f[3]; - $f4 = $f[4]; - $f5 = $f[5]; - $f6 = $f[6]; - $f7 = $f[7]; - $f8 = $f[8]; - $f9 = $f[9]; - $g0 = $g[0]; - $g1 = $g[1]; - $g2 = $g[2]; - $g3 = $g[3]; - $g4 = $g[4]; - $g5 = $g[5]; - $g6 = $g[6]; - $g7 = $g[7]; - $g8 = $g[8]; - $g9 = $g[9]; - $g1_19 = self::mul($g1, 19, 5); - $g2_19 = self::mul($g2, 19, 5); - $g3_19 = self::mul($g3, 19, 5); - $g4_19 = self::mul($g4, 19, 5); - $g5_19 = self::mul($g5, 19, 5); - $g6_19 = self::mul($g6, 19, 5); - $g7_19 = self::mul($g7, 19, 5); - $g8_19 = self::mul($g8, 19, 5); - $g9_19 = self::mul($g9, 19, 5); - $f1_2 = $f1 << 1; - $f3_2 = $f3 << 1; - $f5_2 = $f5 << 1; - $f7_2 = $f7 << 1; - $f9_2 = $f9 << 1; - $f0g0 = self::mul($f0, $g0, 26); - $f0g1 = self::mul($f0, $g1, 25); - $f0g2 = self::mul($f0, $g2, 26); - $f0g3 = self::mul($f0, $g3, 25); - $f0g4 = self::mul($f0, $g4, 26); - $f0g5 = self::mul($f0, $g5, 25); - $f0g6 = self::mul($f0, $g6, 26); - $f0g7 = self::mul($f0, $g7, 25); - $f0g8 = self::mul($f0, $g8, 26); - $f0g9 = self::mul($f0, $g9, 26); - $f1g0 = self::mul($f1, $g0, 26); - $f1g1_2 = self::mul($f1_2, $g1, 25); - $f1g2 = self::mul($f1, $g2, 26); - $f1g3_2 = self::mul($f1_2, $g3, 25); - $f1g4 = self::mul($f1, $g4, 26); - $f1g5_2 = self::mul($f1_2, $g5, 25); - $f1g6 = self::mul($f1, $g6, 26); - $f1g7_2 = self::mul($f1_2, $g7, 25); - $f1g8 = self::mul($f1, $g8, 26); - $f1g9_38 = self::mul($g9_19, $f1_2, 26); - $f2g0 = self::mul($f2, $g0, 26); - $f2g1 = self::mul($f2, $g1, 25); - $f2g2 = self::mul($f2, $g2, 26); - $f2g3 = self::mul($f2, $g3, 25); - $f2g4 = self::mul($f2, $g4, 26); - $f2g5 = self::mul($f2, $g5, 25); - $f2g6 = self::mul($f2, $g6, 26); - $f2g7 = self::mul($f2, $g7, 25); - $f2g8_19 = self::mul($g8_19, $f2, 26); - $f2g9_19 = self::mul($g9_19, $f2, 26); - $f3g0 = self::mul($f3, $g0, 26); - $f3g1_2 = self::mul($f3_2, $g1, 25); - $f3g2 = self::mul($f3, $g2, 26); - $f3g3_2 = self::mul($f3_2, $g3, 25); - $f3g4 = self::mul($f3, $g4, 26); - $f3g5_2 = self::mul($f3_2, $g5, 25); - $f3g6 = self::mul($f3, $g6, 26); - $f3g7_38 = self::mul($g7_19, $f3_2, 26); - $f3g8_19 = self::mul($g8_19, $f3, 25); - $f3g9_38 = self::mul($g9_19, $f3_2, 26); - $f4g0 = self::mul($f4, $g0, 26); - $f4g1 = self::mul($f4, $g1, 25); - $f4g2 = self::mul($f4, $g2, 26); - $f4g3 = self::mul($f4, $g3, 25); - $f4g4 = self::mul($f4, $g4, 26); - $f4g5 = self::mul($f4, $g5, 25); - $f4g6_19 = self::mul($g6_19, $f4, 26); - $f4g7_19 = self::mul($g7_19, $f4, 26); - $f4g8_19 = self::mul($g8_19, $f4, 26); - $f4g9_19 = self::mul($g9_19, $f4, 26); - $f5g0 = self::mul($f5, $g0, 26); - $f5g1_2 = self::mul($f5_2, $g1, 25); - $f5g2 = self::mul($f5, $g2, 26); - $f5g3_2 = self::mul($f5_2, $g3, 25); - $f5g4 = self::mul($f5, $g4, 26); - $f5g5_38 = self::mul($g5_19, $f5_2, 26); - $f5g6_19 = self::mul($g6_19, $f5, 25); - $f5g7_38 = self::mul($g7_19, $f5_2, 26); - $f5g8_19 = self::mul($g8_19, $f5, 25); - $f5g9_38 = self::mul($g9_19, $f5_2, 26); - $f6g0 = self::mul($f6, $g0, 26); - $f6g1 = self::mul($f6, $g1, 25); - $f6g2 = self::mul($f6, $g2, 26); - $f6g3 = self::mul($f6, $g3, 25); - $f6g4_19 = self::mul($g4_19, $f6, 26); - $f6g5_19 = self::mul($g5_19, $f6, 26); - $f6g6_19 = self::mul($g6_19, $f6, 26); - $f6g7_19 = self::mul($g7_19, $f6, 26); - $f6g8_19 = self::mul($g8_19, $f6, 26); - $f6g9_19 = self::mul($g9_19, $f6, 26); - $f7g0 = self::mul($f7, $g0, 26); - $f7g1_2 = self::mul($f7_2, $g1, 25); - $f7g2 = self::mul($f7, $g2, 26); - $f7g3_38 = self::mul($g3_19, $f7_2, 26); - $f7g4_19 = self::mul($g4_19, $f7, 26); - $f7g5_38 = self::mul($g5_19, $f7_2, 26); - $f7g6_19 = self::mul($g6_19, $f7, 25); - $f7g7_38 = self::mul($g7_19, $f7_2, 26); - $f7g8_19 = self::mul($g8_19, $f7, 25); - $f7g9_38 = self::mul($g9_19,$f7_2, 26); - $f8g0 = self::mul($f8, $g0, 26); - $f8g1 = self::mul($f8, $g1, 25); - $f8g2_19 = self::mul($g2_19, $f8, 26); - $f8g3_19 = self::mul($g3_19, $f8, 26); - $f8g4_19 = self::mul($g4_19, $f8, 26); - $f8g5_19 = self::mul($g5_19, $f8, 26); - $f8g6_19 = self::mul($g6_19, $f8, 26); - $f8g7_19 = self::mul($g7_19, $f8, 26); - $f8g8_19 = self::mul($g8_19, $f8, 26); - $f8g9_19 = self::mul($g9_19, $f8, 26); - $f9g0 = self::mul($f9, $g0, 26); - $f9g1_38 = self::mul($g1_19, $f9_2, 26); - $f9g2_19 = self::mul($g2_19, $f9, 25); - $f9g3_38 = self::mul($g3_19, $f9_2, 26); - $f9g4_19 = self::mul($g4_19, $f9, 25); - $f9g5_38 = self::mul($g5_19, $f9_2, 26); - $f9g6_19 = self::mul($g6_19, $f9, 25); - $f9g7_38 = self::mul($g7_19, $f9_2, 26); - $f9g8_19 = self::mul($g8_19, $f9, 25); - $f9g9_38 = self::mul($g9_19, $f9_2, 26); - - $h0 = $f0g0 + $f1g9_38 + $f2g8_19 + $f3g7_38 + $f4g6_19 + $f5g5_38 + $f6g4_19 + $f7g3_38 + $f8g2_19 + $f9g1_38; - $h1 = $f0g1 + $f1g0 + $f2g9_19 + $f3g8_19 + $f4g7_19 + $f5g6_19 + $f6g5_19 + $f7g4_19 + $f8g3_19 + $f9g2_19; - $h2 = $f0g2 + $f1g1_2 + $f2g0 + $f3g9_38 + $f4g8_19 + $f5g7_38 + $f6g6_19 + $f7g5_38 + $f8g4_19 + $f9g3_38; - $h3 = $f0g3 + $f1g2 + $f2g1 + $f3g0 + $f4g9_19 + $f5g8_19 + $f6g7_19 + $f7g6_19 + $f8g5_19 + $f9g4_19; - $h4 = $f0g4 + $f1g3_2 + $f2g2 + $f3g1_2 + $f4g0 + $f5g9_38 + $f6g8_19 + $f7g7_38 + $f8g6_19 + $f9g5_38; - $h5 = $f0g5 + $f1g4 + $f2g3 + $f3g2 + $f4g1 + $f5g0 + $f6g9_19 + $f7g8_19 + $f8g7_19 + $f9g6_19; - $h6 = $f0g6 + $f1g5_2 + $f2g4 + $f3g3_2 + $f4g2 + $f5g1_2 + $f6g0 + $f7g9_38 + $f8g8_19 + $f9g7_38; - $h7 = $f0g7 + $f1g6 + $f2g5 + $f3g4 + $f4g3 + $f5g2 + $f6g1 + $f7g0 + $f8g9_19 + $f9g8_19; - $h8 = $f0g8 + $f1g7_2 + $f2g6 + $f3g5_2 + $f4g4 + $f5g3_2 + $f6g2 + $f7g1_2 + $f8g0 + $f9g9_38; - $h9 = $f0g9 + $f1g8 + $f2g7 + $f3g6 + $f4g5 + $f5g4 + $f6g3 + $f7g2 + $f8g1 + $f9g0 ; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - - $carry1 = ($h1 + (1 << 24)) >> 25; - $h2 += $carry1; - $h1 -= $carry1 << 25; - $carry5 = ($h5 + (1 << 24)) >> 25; - $h6 += $carry5; - $h5 -= $carry5 << 25; - - $carry2 = ($h2 + (1 << 25)) >> 26; - $h3 += $carry2; - $h2 -= $carry2 << 26; - $carry6 = ($h6 + (1 << 25)) >> 26; - $h7 += $carry6; - $h6 -= $carry6 << 26; - - $carry3 = ($h3 + (1 << 24)) >> 25; - $h4 += $carry3; - $h3 -= $carry3 << 25; - $carry7 = ($h7 + (1 << 24)) >> 25; - $h8 += $carry7; - $h7 -= $carry7 << 25; - - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - $carry8 = ($h8 + (1 << 25)) >> 26; - $h9 += $carry8; - $h8 -= $carry8 << 26; - - $carry9 = ($h9 + (1 << 24)) >> 25; - $h0 += self::mul($carry9, 19, 5); - $h9 -= $carry9 << 25; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - - return self::fe_normalize( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( - array( - (int) $h0, - (int) $h1, - (int) $h2, - (int) $h3, - (int) $h4, - (int) $h5, - (int) $h6, - (int) $h7, - (int) $h8, - (int) $h9 - ) - ) - ); - } - - /** - * Get the negative values for each piece of the field element. - * - * h = -f - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core_Curve25519_Fe - * @psalm-suppress MixedAssignment - */ - public static function fe_neg(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - $h = new ParagonIE_Sodium_Core_Curve25519_Fe(); - for ($i = 0; $i < 10; ++$i) { - $h[$i] = -$f[$i]; - } - return self::fe_normalize($h); - } - - /** - * Square a field element - * - * h = f * f - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_sq(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - $f = self::fe_normalize($f); - $f0 = (int) $f[0]; - $f1 = (int) $f[1]; - $f2 = (int) $f[2]; - $f3 = (int) $f[3]; - $f4 = (int) $f[4]; - $f5 = (int) $f[5]; - $f6 = (int) $f[6]; - $f7 = (int) $f[7]; - $f8 = (int) $f[8]; - $f9 = (int) $f[9]; - - $f0_2 = $f0 << 1; - $f1_2 = $f1 << 1; - $f2_2 = $f2 << 1; - $f3_2 = $f3 << 1; - $f4_2 = $f4 << 1; - $f5_2 = $f5 << 1; - $f6_2 = $f6 << 1; - $f7_2 = $f7 << 1; - $f5_38 = self::mul($f5, 38, 6); - $f6_19 = self::mul($f6, 19, 5); - $f7_38 = self::mul($f7, 38, 6); - $f8_19 = self::mul($f8, 19, 5); - $f9_38 = self::mul($f9, 38, 6); - $f0f0 = self::mul($f0, $f0, 26); - $f0f1_2 = self::mul($f0_2, $f1, 26); - $f0f2_2 = self::mul($f0_2, $f2, 26); - $f0f3_2 = self::mul($f0_2, $f3, 26); - $f0f4_2 = self::mul($f0_2, $f4, 26); - $f0f5_2 = self::mul($f0_2, $f5, 26); - $f0f6_2 = self::mul($f0_2, $f6, 26); - $f0f7_2 = self::mul($f0_2, $f7, 26); - $f0f8_2 = self::mul($f0_2, $f8, 26); - $f0f9_2 = self::mul($f0_2, $f9, 26); - $f1f1_2 = self::mul($f1_2, $f1, 26); - $f1f2_2 = self::mul($f1_2, $f2, 26); - $f1f3_4 = self::mul($f1_2, $f3_2, 26); - $f1f4_2 = self::mul($f1_2, $f4, 26); - $f1f5_4 = self::mul($f1_2, $f5_2, 26); - $f1f6_2 = self::mul($f1_2, $f6, 26); - $f1f7_4 = self::mul($f1_2, $f7_2, 26); - $f1f8_2 = self::mul($f1_2, $f8, 26); - $f1f9_76 = self::mul($f9_38, $f1_2, 27); - $f2f2 = self::mul($f2, $f2, 27); - $f2f3_2 = self::mul($f2_2, $f3, 27); - $f2f4_2 = self::mul($f2_2, $f4, 27); - $f2f5_2 = self::mul($f2_2, $f5, 27); - $f2f6_2 = self::mul($f2_2, $f6, 27); - $f2f7_2 = self::mul($f2_2, $f7, 27); - $f2f8_38 = self::mul($f8_19, $f2_2, 27); - $f2f9_38 = self::mul($f9_38, $f2, 26); - $f3f3_2 = self::mul($f3_2, $f3, 26); - $f3f4_2 = self::mul($f3_2, $f4, 26); - $f3f5_4 = self::mul($f3_2, $f5_2, 26); - $f3f6_2 = self::mul($f3_2, $f6, 26); - $f3f7_76 = self::mul($f7_38, $f3_2, 26); - $f3f8_38 = self::mul($f8_19, $f3_2, 26); - $f3f9_76 = self::mul($f9_38, $f3_2, 26); - $f4f4 = self::mul($f4, $f4, 26); - $f4f5_2 = self::mul($f4_2, $f5, 26); - $f4f6_38 = self::mul($f6_19, $f4_2, 27); - $f4f7_38 = self::mul($f7_38, $f4, 26); - $f4f8_38 = self::mul($f8_19, $f4_2, 27); - $f4f9_38 = self::mul($f9_38, $f4, 26); - $f5f5_38 = self::mul($f5_38, $f5, 26); - $f5f6_38 = self::mul($f6_19, $f5_2, 26); - $f5f7_76 = self::mul($f7_38, $f5_2, 26); - $f5f8_38 = self::mul($f8_19, $f5_2, 26); - $f5f9_76 = self::mul($f9_38, $f5_2, 26); - $f6f6_19 = self::mul($f6_19, $f6, 26); - $f6f7_38 = self::mul($f7_38, $f6, 26); - $f6f8_38 = self::mul($f8_19, $f6_2, 27); - $f6f9_38 = self::mul($f9_38, $f6, 26); - $f7f7_38 = self::mul($f7_38, $f7, 26); - $f7f8_38 = self::mul($f8_19, $f7_2, 26); - $f7f9_76 = self::mul($f9_38, $f7_2, 26); - $f8f8_19 = self::mul($f8_19, $f8, 26); - $f8f9_38 = self::mul($f9_38, $f8, 26); - $f9f9_38 = self::mul($f9_38, $f9, 26); - $h0 = $f0f0 + $f1f9_76 + $f2f8_38 + $f3f7_76 + $f4f6_38 + $f5f5_38; - $h1 = $f0f1_2 + $f2f9_38 + $f3f8_38 + $f4f7_38 + $f5f6_38; - $h2 = $f0f2_2 + $f1f1_2 + $f3f9_76 + $f4f8_38 + $f5f7_76 + $f6f6_19; - $h3 = $f0f3_2 + $f1f2_2 + $f4f9_38 + $f5f8_38 + $f6f7_38; - $h4 = $f0f4_2 + $f1f3_4 + $f2f2 + $f5f9_76 + $f6f8_38 + $f7f7_38; - $h5 = $f0f5_2 + $f1f4_2 + $f2f3_2 + $f6f9_38 + $f7f8_38; - $h6 = $f0f6_2 + $f1f5_4 + $f2f4_2 + $f3f3_2 + $f7f9_76 + $f8f8_19; - $h7 = $f0f7_2 + $f1f6_2 + $f2f5_2 + $f3f4_2 + $f8f9_38; - $h8 = $f0f8_2 + $f1f7_4 + $f2f6_2 + $f3f5_4 + $f4f4 + $f9f9_38; - $h9 = $f0f9_2 + $f1f8_2 + $f2f7_2 + $f3f6_2 + $f4f5_2; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - - $carry1 = ($h1 + (1 << 24)) >> 25; - $h2 += $carry1; - $h1 -= $carry1 << 25; - $carry5 = ($h5 + (1 << 24)) >> 25; - $h6 += $carry5; - $h5 -= $carry5 << 25; - - $carry2 = ($h2 + (1 << 25)) >> 26; - $h3 += $carry2; - $h2 -= $carry2 << 26; - $carry6 = ($h6 + (1 << 25)) >> 26; - $h7 += $carry6; - $h6 -= $carry6 << 26; - - $carry3 = ($h3 + (1 << 24)) >> 25; - $h4 += $carry3; - $h3 -= $carry3 << 25; - $carry7 = ($h7 + (1 << 24)) >> 25; - $h8 += $carry7; - $h7 -= $carry7 << 25; - - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - $carry8 = ($h8 + (1 << 25)) >> 26; - $h9 += $carry8; - $h8 -= $carry8 << 26; - - $carry9 = ($h9 + (1 << 24)) >> 25; - $h0 += self::mul($carry9, 19, 5); - $h9 -= $carry9 << 25; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - - return self::fe_normalize( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( - array( - (int) $h0, - (int) $h1, - (int) $h2, - (int) $h3, - (int) $h4, - (int) $h5, - (int) $h6, - (int) $h7, - (int) $h8, - (int) $h9 - ) - ) - ); - } - - - /** - * Square and double a field element - * - * h = 2 * f * f - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_sq2(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - $f = self::fe_normalize($f); - $f0 = (int) $f[0]; - $f1 = (int) $f[1]; - $f2 = (int) $f[2]; - $f3 = (int) $f[3]; - $f4 = (int) $f[4]; - $f5 = (int) $f[5]; - $f6 = (int) $f[6]; - $f7 = (int) $f[7]; - $f8 = (int) $f[8]; - $f9 = (int) $f[9]; - - $f0_2 = $f0 << 1; - $f1_2 = $f1 << 1; - $f2_2 = $f2 << 1; - $f3_2 = $f3 << 1; - $f4_2 = $f4 << 1; - $f5_2 = $f5 << 1; - $f6_2 = $f6 << 1; - $f7_2 = $f7 << 1; - $f5_38 = self::mul($f5, 38, 6); /* 1.959375*2^30 */ - $f6_19 = self::mul($f6, 19, 5); /* 1.959375*2^30 */ - $f7_38 = self::mul($f7, 38, 6); /* 1.959375*2^30 */ - $f8_19 = self::mul($f8, 19, 5); /* 1.959375*2^30 */ - $f9_38 = self::mul($f9, 38, 6); /* 1.959375*2^30 */ - $f0f0 = self::mul($f0, $f0, 24); - $f0f1_2 = self::mul($f0_2, $f1, 24); - $f0f2_2 = self::mul($f0_2, $f2, 24); - $f0f3_2 = self::mul($f0_2, $f3, 24); - $f0f4_2 = self::mul($f0_2, $f4, 24); - $f0f5_2 = self::mul($f0_2, $f5, 24); - $f0f6_2 = self::mul($f0_2, $f6, 24); - $f0f7_2 = self::mul($f0_2, $f7, 24); - $f0f8_2 = self::mul($f0_2, $f8, 24); - $f0f9_2 = self::mul($f0_2, $f9, 24); - $f1f1_2 = self::mul($f1_2, $f1, 24); - $f1f2_2 = self::mul($f1_2, $f2, 24); - $f1f3_4 = self::mul($f1_2, $f3_2, 24); - $f1f4_2 = self::mul($f1_2, $f4, 24); - $f1f5_4 = self::mul($f1_2, $f5_2, 24); - $f1f6_2 = self::mul($f1_2, $f6, 24); - $f1f7_4 = self::mul($f1_2, $f7_2, 24); - $f1f8_2 = self::mul($f1_2, $f8, 24); - $f1f9_76 = self::mul($f9_38, $f1_2, 24); - $f2f2 = self::mul($f2, $f2, 24); - $f2f3_2 = self::mul($f2_2, $f3, 24); - $f2f4_2 = self::mul($f2_2, $f4, 24); - $f2f5_2 = self::mul($f2_2, $f5, 24); - $f2f6_2 = self::mul($f2_2, $f6, 24); - $f2f7_2 = self::mul($f2_2, $f7, 24); - $f2f8_38 = self::mul($f8_19, $f2_2, 25); - $f2f9_38 = self::mul($f9_38, $f2, 24); - $f3f3_2 = self::mul($f3_2, $f3, 24); - $f3f4_2 = self::mul($f3_2, $f4, 24); - $f3f5_4 = self::mul($f3_2, $f5_2, 24); - $f3f6_2 = self::mul($f3_2, $f6, 24); - $f3f7_76 = self::mul($f7_38, $f3_2, 24); - $f3f8_38 = self::mul($f8_19, $f3_2, 24); - $f3f9_76 = self::mul($f9_38, $f3_2, 24); - $f4f4 = self::mul($f4, $f4, 24); - $f4f5_2 = self::mul($f4_2, $f5, 24); - $f4f6_38 = self::mul($f6_19, $f4_2, 25); - $f4f7_38 = self::mul($f7_38, $f4, 24); - $f4f8_38 = self::mul($f8_19, $f4_2, 25); - $f4f9_38 = self::mul($f9_38, $f4, 24); - $f5f5_38 = self::mul($f5_38, $f5, 24); - $f5f6_38 = self::mul($f6_19, $f5_2, 24); - $f5f7_76 = self::mul($f7_38, $f5_2, 24); - $f5f8_38 = self::mul($f8_19, $f5_2, 24); - $f5f9_76 = self::mul($f9_38, $f5_2, 24); - $f6f6_19 = self::mul($f6_19, $f6, 24); - $f6f7_38 = self::mul($f7_38, $f6, 24); - $f6f8_38 = self::mul($f8_19, $f6_2, 25); - $f6f9_38 = self::mul($f9_38, $f6, 24); - $f7f7_38 = self::mul($f7_38, $f7, 24); - $f7f8_38 = self::mul($f8_19, $f7_2, 24); - $f7f9_76 = self::mul($f9_38, $f7_2, 24); - $f8f8_19 = self::mul($f8_19, $f8, 24); - $f8f9_38 = self::mul($f9_38, $f8, 24); - $f9f9_38 = self::mul($f9_38, $f9, 24); - - $h0 = (int) ($f0f0 + $f1f9_76 + $f2f8_38 + $f3f7_76 + $f4f6_38 + $f5f5_38) << 1; - $h1 = (int) ($f0f1_2 + $f2f9_38 + $f3f8_38 + $f4f7_38 + $f5f6_38) << 1; - $h2 = (int) ($f0f2_2 + $f1f1_2 + $f3f9_76 + $f4f8_38 + $f5f7_76 + $f6f6_19) << 1; - $h3 = (int) ($f0f3_2 + $f1f2_2 + $f4f9_38 + $f5f8_38 + $f6f7_38) << 1; - $h4 = (int) ($f0f4_2 + $f1f3_4 + $f2f2 + $f5f9_76 + $f6f8_38 + $f7f7_38) << 1; - $h5 = (int) ($f0f5_2 + $f1f4_2 + $f2f3_2 + $f6f9_38 + $f7f8_38) << 1; - $h6 = (int) ($f0f6_2 + $f1f5_4 + $f2f4_2 + $f3f3_2 + $f7f9_76 + $f8f8_19) << 1; - $h7 = (int) ($f0f7_2 + $f1f6_2 + $f2f5_2 + $f3f4_2 + $f8f9_38) << 1; - $h8 = (int) ($f0f8_2 + $f1f7_4 + $f2f6_2 + $f3f5_4 + $f4f4 + $f9f9_38) << 1; - $h9 = (int) ($f0f9_2 + $f1f8_2 + $f2f7_2 + $f3f6_2 + $f4f5_2) << 1; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - - $carry1 = ($h1 + (1 << 24)) >> 25; - $h2 += $carry1; - $h1 -= $carry1 << 25; - $carry5 = ($h5 + (1 << 24)) >> 25; - $h6 += $carry5; - $h5 -= $carry5 << 25; - - $carry2 = ($h2 + (1 << 25)) >> 26; - $h3 += $carry2; - $h2 -= $carry2 << 26; - $carry6 = ($h6 + (1 << 25)) >> 26; - $h7 += $carry6; - $h6 -= $carry6 << 26; - - $carry3 = ($h3 + (1 << 24)) >> 25; - $h4 += $carry3; - $h3 -= $carry3 << 25; - $carry7 = ($h7 + (1 << 24)) >> 25; - $h8 += $carry7; - $h7 -= $carry7 << 25; - - $carry4 = ($h4 + (1 << 25)) >> 26; - $h5 += $carry4; - $h4 -= $carry4 << 26; - $carry8 = ($h8 + (1 << 25)) >> 26; - $h9 += $carry8; - $h8 -= $carry8 << 26; - - $carry9 = ($h9 + (1 << 24)) >> 25; - $h0 += self::mul($carry9, 19, 5); - $h9 -= $carry9 << 25; - - $carry0 = ($h0 + (1 << 25)) >> 26; - $h1 += $carry0; - $h0 -= $carry0 << 26; - - return self::fe_normalize( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( - array( - (int) $h0, - (int) $h1, - (int) $h2, - (int) $h3, - (int) $h4, - (int) $h5, - (int) $h6, - (int) $h7, - (int) $h8, - (int) $h9 - ) - ) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $Z - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_invert(ParagonIE_Sodium_Core_Curve25519_Fe $Z) - { - $z = clone $Z; - $t0 = self::fe_sq($z); - $t1 = self::fe_sq($t0); - $t1 = self::fe_sq($t1); - $t1 = self::fe_mul($z, $t1); - $t0 = self::fe_mul($t0, $t1); - $t2 = self::fe_sq($t0); - $t1 = self::fe_mul($t1, $t2); - $t2 = self::fe_sq($t1); - for ($i = 1; $i < 5; ++$i) { - $t2 = self::fe_sq($t2); - } - $t1 = self::fe_mul($t2, $t1); - $t2 = self::fe_sq($t1); - for ($i = 1; $i < 10; ++$i) { - $t2 = self::fe_sq($t2); - } - $t2 = self::fe_mul($t2, $t1); - $t3 = self::fe_sq($t2); - for ($i = 1; $i < 20; ++$i) { - $t3 = self::fe_sq($t3); - } - $t2 = self::fe_mul($t3, $t2); - $t2 = self::fe_sq($t2); - for ($i = 1; $i < 10; ++$i) { - $t2 = self::fe_sq($t2); - } - $t1 = self::fe_mul($t2, $t1); - $t2 = self::fe_sq($t1); - for ($i = 1; $i < 50; ++$i) { - $t2 = self::fe_sq($t2); - } - $t2 = self::fe_mul($t2, $t1); - $t3 = self::fe_sq($t2); - for ($i = 1; $i < 100; ++$i) { - $t3 = self::fe_sq($t3); - } - $t2 = self::fe_mul($t3, $t2); - $t2 = self::fe_sq($t2); - for ($i = 1; $i < 50; ++$i) { - $t2 = self::fe_sq($t2); - } - $t1 = self::fe_mul($t2, $t1); - $t1 = self::fe_sq($t1); - for ($i = 1; $i < 5; ++$i) { - $t1 = self::fe_sq($t1); - } - return self::fe_mul($t1, $t0); - } - - /** - * @internal You should not use this directly from another application - * - * @ref https://github.com/jedisct1/libsodium/blob/68564326e1e9dc57ef03746f85734232d20ca6fb/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c#L1054-L1106 - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $z - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_pow22523(ParagonIE_Sodium_Core_Curve25519_Fe $z) - { - $z = self::fe_normalize($z); - # fe_sq(t0, z); - # fe_sq(t1, t0); - # fe_sq(t1, t1); - # fe_mul(t1, z, t1); - # fe_mul(t0, t0, t1); - # fe_sq(t0, t0); - # fe_mul(t0, t1, t0); - # fe_sq(t1, t0); - $t0 = self::fe_sq($z); - $t1 = self::fe_sq($t0); - $t1 = self::fe_sq($t1); - $t1 = self::fe_mul($z, $t1); - $t0 = self::fe_mul($t0, $t1); - $t0 = self::fe_sq($t0); - $t0 = self::fe_mul($t1, $t0); - $t1 = self::fe_sq($t0); - - # for (i = 1; i < 5; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 5; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t0, t1, t0); - # fe_sq(t1, t0); - $t0 = self::fe_mul($t1, $t0); - $t1 = self::fe_sq($t0); - - # for (i = 1; i < 10; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 10; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t1, t1, t0); - # fe_sq(t2, t1); - $t1 = self::fe_mul($t1, $t0); - $t2 = self::fe_sq($t1); - - # for (i = 1; i < 20; ++i) { - # fe_sq(t2, t2); - # } - for ($i = 1; $i < 20; ++$i) { - $t2 = self::fe_sq($t2); - } - - # fe_mul(t1, t2, t1); - # fe_sq(t1, t1); - $t1 = self::fe_mul($t2, $t1); - $t1 = self::fe_sq($t1); - - # for (i = 1; i < 10; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 10; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t0, t1, t0); - # fe_sq(t1, t0); - $t0 = self::fe_mul($t1, $t0); - $t1 = self::fe_sq($t0); - - # for (i = 1; i < 50; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 50; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t1, t1, t0); - # fe_sq(t2, t1); - $t1 = self::fe_mul($t1, $t0); - $t2 = self::fe_sq($t1); - - # for (i = 1; i < 100; ++i) { - # fe_sq(t2, t2); - # } - for ($i = 1; $i < 100; ++$i) { - $t2 = self::fe_sq($t2); - } - - # fe_mul(t1, t2, t1); - # fe_sq(t1, t1); - $t1 = self::fe_mul($t2, $t1); - $t1 = self::fe_sq($t1); - - # for (i = 1; i < 50; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 50; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t0, t1, t0); - # fe_sq(t0, t0); - # fe_sq(t0, t0); - # fe_mul(out, t0, z); - $t0 = self::fe_mul($t1, $t0); - $t0 = self::fe_sq($t0); - $t0 = self::fe_sq($t0); - return self::fe_mul($t0, $z); - } - - /** - * Subtract two field elements. - * - * h = f - g - * - * Preconditions: - * |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - * |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - * - * Postconditions: - * |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @param ParagonIE_Sodium_Core_Curve25519_Fe $g - * @return ParagonIE_Sodium_Core_Curve25519_Fe - * @psalm-suppress MixedOperand - */ - public static function fe_sub(ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g) - { - return self::fe_normalize( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( - array( - (int) ($f[0] - $g[0]), - (int) ($f[1] - $g[1]), - (int) ($f[2] - $g[2]), - (int) ($f[3] - $g[3]), - (int) ($f[4] - $g[4]), - (int) ($f[5] - $g[5]), - (int) ($f[6] - $g[6]), - (int) ($f[7] - $g[7]), - (int) ($f[8] - $g[8]), - (int) ($f[9] - $g[9]) - ) - ) - ); - } - - /** - * Add two group elements. - * - * r = p + q - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 - */ - public static function ge_add( - ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q - ) { - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1(); - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->YplusX); - $r->Y = self::fe_mul($r->Y, $q->YminusX); - $r->T = self::fe_mul($q->T2d, $p->T); - $r->X = self::fe_mul($p->Z, $q->Z); - $t0 = self::fe_add($r->X, $r->X); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_add($t0, $r->T); - $r->T = self::fe_sub($t0, $r->T); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @ref https://github.com/jedisct1/libsodium/blob/157c4a80c13b117608aeae12178b2d38825f9f8f/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c#L1185-L1215 - * @param string $a - * @return array - * @throws SodiumException - * @throws TypeError - */ - public static function slide($a) - { - if (self::strlen($a) < 256) { - if (self::strlen($a) < 16) { - $a = str_pad($a, 256, '0', STR_PAD_RIGHT); - } - } - /** @var array $r */ - $r = array(); - - /** @var int $i */ - for ($i = 0; $i < 256; ++$i) { - $r[$i] = (int) ( - 1 & ( - self::chrToInt($a[(int) ($i >> 3)]) - >> - ($i & 7) - ) - ); - } - - for ($i = 0;$i < 256;++$i) { - if ($r[$i]) { - for ($b = 1;$b <= 6 && $i + $b < 256;++$b) { - if ($r[$i + $b]) { - if ($r[$i] + ($r[$i + $b] << $b) <= 15) { - $r[$i] += $r[$i + $b] << $b; - $r[$i + $b] = 0; - } elseif ($r[$i] - ($r[$i + $b] << $b) >= -15) { - $r[$i] -= $r[$i + $b] << $b; - for ($k = $i + $b; $k < 256; ++$k) { - if (!$r[$k]) { - $r[$k] = 1; - break; - } - $r[$k] = 0; - } - } else { - break; - } - } - } - } - } - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $s - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_frombytes_negate_vartime($s) - { - static $d = null; - if (!$d) { - $d = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$d); - } - - # fe_frombytes(h->Y,s); - # fe_1(h->Z); - $h = new ParagonIE_Sodium_Core_Curve25519_Ge_P3( - self::fe_0(), - self::fe_frombytes($s), - self::fe_1() - ); - - # fe_sq(u,h->Y); - # fe_mul(v,u,d); - # fe_sub(u,u,h->Z); /* u = y^2-1 */ - # fe_add(v,v,h->Z); /* v = dy^2+1 */ - $u = self::fe_sq($h->Y); - /** @var ParagonIE_Sodium_Core_Curve25519_Fe $d */ - $v = self::fe_mul($u, $d); - $u = self::fe_sub($u, $h->Z); /* u = y^2 - 1 */ - $v = self::fe_add($v, $h->Z); /* v = dy^2 + 1 */ - - # fe_sq(v3,v); - # fe_mul(v3,v3,v); /* v3 = v^3 */ - # fe_sq(h->X,v3); - # fe_mul(h->X,h->X,v); - # fe_mul(h->X,h->X,u); /* x = uv^7 */ - $v3 = self::fe_sq($v); - $v3 = self::fe_mul($v3, $v); /* v3 = v^3 */ - $h->X = self::fe_sq($v3); - $h->X = self::fe_mul($h->X, $v); - $h->X = self::fe_mul($h->X, $u); /* x = uv^7 */ - - # fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */ - # fe_mul(h->X,h->X,v3); - # fe_mul(h->X,h->X,u); /* x = uv^3(uv^7)^((q-5)/8) */ - $h->X = self::fe_pow22523($h->X); /* x = (uv^7)^((q-5)/8) */ - $h->X = self::fe_mul($h->X, $v3); - $h->X = self::fe_mul($h->X, $u); /* x = uv^3(uv^7)^((q-5)/8) */ - - # fe_sq(vxx,h->X); - # fe_mul(vxx,vxx,v); - # fe_sub(check,vxx,u); /* vx^2-u */ - $vxx = self::fe_sq($h->X); - $vxx = self::fe_mul($vxx, $v); - $check = self::fe_sub($vxx, $u); /* vx^2 - u */ - - # if (fe_isnonzero(check)) { - # fe_add(check,vxx,u); /* vx^2+u */ - # if (fe_isnonzero(check)) { - # return -1; - # } - # fe_mul(h->X,h->X,sqrtm1); - # } - if (self::fe_isnonzero($check)) { - $check = self::fe_add($vxx, $u); /* vx^2 + u */ - if (self::fe_isnonzero($check)) { - throw new RangeException('Internal check failed.'); - } - $h->X = self::fe_mul( - $h->X, - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqrtm1) - ); - } - - # if (fe_isnegative(h->X) == (s[31] >> 7)) { - # fe_neg(h->X,h->X); - # } - $i = self::chrToInt($s[31]); - if (self::fe_isnegative($h->X) === ($i >> 7)) { - $h->X = self::fe_neg($h->X); - } - - # fe_mul(h->T,h->X,h->Y); - $h->T = self::fe_mul($h->X, $h->Y); - return $h; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 - */ - public static function ge_madd( - ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R, - ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q - ) { - $r = clone $R; - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->yplusx); - $r->Y = self::fe_mul($r->Y, $q->yminusx); - $r->T = self::fe_mul($q->xy2d, $p->T); - $t0 = self::fe_add(clone $p->Z, clone $p->Z); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_add($t0, $r->T); - $r->T = self::fe_sub($t0, $r->T); - - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 - */ - public static function ge_msub( - ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R, - ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q - ) { - $r = clone $R; - - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->yminusx); - $r->Y = self::fe_mul($r->Y, $q->yplusx); - $r->T = self::fe_mul($q->xy2d, $p->T); - $t0 = self::fe_add($p->Z, $p->Z); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_sub($t0, $r->T); - $r->T = self::fe_add($t0, $r->T); - - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P2 - */ - public static function ge_p1p1_to_p2(ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p) - { - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_P2(); - $r->X = self::fe_mul($p->X, $p->T); - $r->Y = self::fe_mul($p->Y, $p->Z); - $r->Z = self::fe_mul($p->Z, $p->T); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - */ - public static function ge_p1p1_to_p3(ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p) - { - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_P3(); - $r->X = self::fe_mul($p->X, $p->T); - $r->Y = self::fe_mul($p->Y, $p->Z); - $r->Z = self::fe_mul($p->Z, $p->T); - $r->T = self::fe_mul($p->X, $p->Y); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P2 - */ - public static function ge_p2_0() - { - return new ParagonIE_Sodium_Core_Curve25519_Ge_P2( - self::fe_0(), - self::fe_1(), - self::fe_1() - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P2 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 - */ - public static function ge_p2_dbl(ParagonIE_Sodium_Core_Curve25519_Ge_P2 $p) - { - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1(); - - $r->X = self::fe_sq($p->X); - $r->Z = self::fe_sq($p->Y); - $r->T = self::fe_sq2($p->Z); - $r->Y = self::fe_add($p->X, $p->Y); - $t0 = self::fe_sq($r->Y); - $r->Y = self::fe_add($r->Z, $r->X); - $r->Z = self::fe_sub($r->Z, $r->X); - $r->X = self::fe_sub($t0, $r->Y); - $r->T = self::fe_sub($r->T, $r->Z); - - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - */ - public static function ge_p3_0() - { - return new ParagonIE_Sodium_Core_Curve25519_Ge_P3( - self::fe_0(), - self::fe_1(), - self::fe_1(), - self::fe_0() - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_Cached - */ - public static function ge_p3_to_cached(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p) - { - static $d2 = null; - if ($d2 === null) { - $d2 = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$d2); - } - /** @var ParagonIE_Sodium_Core_Curve25519_Fe $d2 */ - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached(); - $r->YplusX = self::fe_add($p->Y, $p->X); - $r->YminusX = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_copy($p->Z); - $r->T2d = self::fe_mul($p->T, $d2); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P2 - */ - public static function ge_p3_to_p2(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p) - { - return new ParagonIE_Sodium_Core_Curve25519_Ge_P2( - self::fe_copy($p->X), - self::fe_copy($p->Y), - self::fe_copy($p->Z) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p3_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h) - { - $recip = self::fe_invert($h->Z); - $x = self::fe_mul($h->X, $recip); - $y = self::fe_mul($h->Y, $recip); - $s = self::fe_tobytes($y); - $s[31] = self::intToChr( - self::chrToInt($s[31]) ^ (self::fe_isnegative($x) << 7) - ); - return $s; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 - */ - public static function ge_p3_dbl(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p) - { - $q = self::ge_p3_to_p2($p); - return self::ge_p2_dbl($q); - } - - /** - * @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp - */ - public static function ge_precomp_0() - { - return new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp( - self::fe_1(), - self::fe_1(), - self::fe_0() - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $b - * @param int $c - * @return int - */ - public static function equal($b, $c) - { - return (int) ((($b ^ $c) - 1) >> 31) & 1; - } - - /** - * @internal You should not use this directly from another application - * - * @param int|string $char - * @return int (1 = yes, 0 = no) - * @throws SodiumException - * @throws TypeError - */ - public static function negative($char) - { - if (is_int($char)) { - return ($char >> 63) & 1; - } - $x = self::chrToInt(self::substr($char, 0, 1)); - return (int) ($x >> 63); - } - - /** - * Conditional move - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $t - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $u - * @param int $b - * @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp - */ - public static function cmov( - ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $t, - ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $u, - $b - ) { - if (!is_int($b)) { - throw new InvalidArgumentException('Expected an integer.'); - } - return new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp( - self::fe_cmov($t->yplusx, $u->yplusx, $b), - self::fe_cmov($t->yminusx, $u->yminusx, $b), - self::fe_cmov($t->xy2d, $u->xy2d, $b) - ); - } - - /** - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached $t - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached $u - * @param int $b - * @return ParagonIE_Sodium_Core_Curve25519_Ge_Cached - */ - public static function ge_cmov_cached( - ParagonIE_Sodium_Core_Curve25519_Ge_Cached $t, - ParagonIE_Sodium_Core_Curve25519_Ge_Cached $u, - $b - ) { - $b &= 1; - $ret = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached(); - $ret->YplusX = self::fe_cmov($t->YplusX, $u->YplusX, $b); - $ret->YminusX = self::fe_cmov($t->YminusX, $u->YminusX, $b); - $ret->Z = self::fe_cmov($t->Z, $u->Z, $b); - $ret->T2d = self::fe_cmov($t->T2d, $u->T2d, $b); - return $ret; - } - - /** - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached[] $cached - * @param int $b - * @return ParagonIE_Sodium_Core_Curve25519_Ge_Cached - * @throws SodiumException - */ - public static function ge_cmov8_cached(array $cached, $b) - { - // const unsigned char bnegative = negative(b); - // const unsigned char babs = b - (((-bnegative) & b) * ((signed char) 1 << 1)); - $bnegative = self::negative($b); - $babs = $b - (((-$bnegative) & $b) << 1); - - // ge25519_cached_0(t); - $t = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached( - self::fe_1(), - self::fe_1(), - self::fe_1(), - self::fe_0() - ); - - // ge25519_cmov_cached(t, &cached[0], equal(babs, 1)); - // ge25519_cmov_cached(t, &cached[1], equal(babs, 2)); - // ge25519_cmov_cached(t, &cached[2], equal(babs, 3)); - // ge25519_cmov_cached(t, &cached[3], equal(babs, 4)); - // ge25519_cmov_cached(t, &cached[4], equal(babs, 5)); - // ge25519_cmov_cached(t, &cached[5], equal(babs, 6)); - // ge25519_cmov_cached(t, &cached[6], equal(babs, 7)); - // ge25519_cmov_cached(t, &cached[7], equal(babs, 8)); - for ($x = 0; $x < 8; ++$x) { - $t = self::ge_cmov_cached($t, $cached[$x], self::equal($babs, $x + 1)); - } - - // fe25519_copy(minust.YplusX, t->YminusX); - // fe25519_copy(minust.YminusX, t->YplusX); - // fe25519_copy(minust.Z, t->Z); - // fe25519_neg(minust.T2d, t->T2d); - $minust = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached( - self::fe_copy($t->YminusX), - self::fe_copy($t->YplusX), - self::fe_copy($t->Z), - self::fe_neg($t->T2d) - ); - return self::ge_cmov_cached($t, $minust, $bnegative); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $pos - * @param int $b - * @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayOffset - */ - public static function ge_select($pos = 0, $b = 0) - { - static $base = null; - if ($base === null) { - $base = array(); - /** @var int $i */ - foreach (self::$base as $i => $bas) { - for ($j = 0; $j < 8; ++$j) { - $base[$i][$j] = new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($bas[$j][0]), - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($bas[$j][1]), - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($bas[$j][2]) - ); - } - } - } - /** @var array> $base */ - if (!is_int($pos)) { - throw new InvalidArgumentException('Position must be an integer'); - } - if ($pos < 0 || $pos > 31) { - throw new RangeException('Position is out of range [0, 31]'); - } - - $bnegative = self::negative($b); - $babs = $b - (((-$bnegative) & $b) << 1); - - $t = self::ge_precomp_0(); - for ($i = 0; $i < 8; ++$i) { - $t = self::cmov( - $t, - $base[$pos][$i], - self::equal($babs, $i + 1) - ); - } - $minusT = new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp( - self::fe_copy($t->yminusx), - self::fe_copy($t->yplusx), - self::fe_neg($t->xy2d) - ); - return self::cmov($t, $minusT, $bnegative); - } - - /** - * Subtract two group elements. - * - * r = p - q - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 - */ - public static function ge_sub( - ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q - ) { - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1(); - - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->YminusX); - $r->Y = self::fe_mul($r->Y, $q->YplusX); - $r->T = self::fe_mul($q->T2d, $p->T); - $r->X = self::fe_mul($p->Z, $q->Z); - $t0 = self::fe_add($r->X, $r->X); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_sub($t0, $r->T); - $r->T = self::fe_add($t0, $r->T); - - return $r; - } - - /** - * Convert a group element to a byte string. - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P2 $h - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ge_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P2 $h) - { - $recip = self::fe_invert($h->Z); - $x = self::fe_mul($h->X, $recip); - $y = self::fe_mul($h->Y, $recip); - $s = self::fe_tobytes($y); - $s[31] = self::intToChr( - self::chrToInt($s[31]) ^ (self::fe_isnegative($x) << 7) - ); - return $s; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $a - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A - * @param string $b - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P2 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayAccess - */ - public static function ge_double_scalarmult_vartime( - $a, - ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A, - $b - ) { - /** @var array $Ai */ - $Ai = array(); - - /** @var array $Bi */ - static $Bi = array(); - if (!$Bi) { - for ($i = 0; $i < 8; ++$i) { - $Bi[$i] = new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$base2[$i][0]), - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$base2[$i][1]), - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$base2[$i][2]) - ); - } - } - for ($i = 0; $i < 8; ++$i) { - $Ai[$i] = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached( - self::fe_0(), - self::fe_0(), - self::fe_0(), - self::fe_0() - ); - } - - # slide(aslide,a); - # slide(bslide,b); - /** @var array $aslide */ - $aslide = self::slide($a); - /** @var array $bslide */ - $bslide = self::slide($b); - - # ge_p3_to_cached(&Ai[0],A); - # ge_p3_dbl(&t,A); ge_p1p1_to_p3(&A2,&t); - $Ai[0] = self::ge_p3_to_cached($A); - $t = self::ge_p3_dbl($A); - $A2 = self::ge_p1p1_to_p3($t); - - # ge_add(&t,&A2,&Ai[0]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[1],&u); - # ge_add(&t,&A2,&Ai[1]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[2],&u); - # ge_add(&t,&A2,&Ai[2]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[3],&u); - # ge_add(&t,&A2,&Ai[3]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[4],&u); - # ge_add(&t,&A2,&Ai[4]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[5],&u); - # ge_add(&t,&A2,&Ai[5]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[6],&u); - # ge_add(&t,&A2,&Ai[6]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[7],&u); - for ($i = 0; $i < 7; ++$i) { - $t = self::ge_add($A2, $Ai[$i]); - $u = self::ge_p1p1_to_p3($t); - $Ai[$i + 1] = self::ge_p3_to_cached($u); - } - - # ge_p2_0(r); - $r = self::ge_p2_0(); - - # for (i = 255;i >= 0;--i) { - # if (aslide[i] || bslide[i]) break; - # } - $i = 255; - for (; $i >= 0; --$i) { - if ($aslide[$i] || $bslide[$i]) { - break; - } - } - - # for (;i >= 0;--i) { - for (; $i >= 0; --$i) { - # ge_p2_dbl(&t,r); - $t = self::ge_p2_dbl($r); - - # if (aslide[i] > 0) { - if ($aslide[$i] > 0) { - # ge_p1p1_to_p3(&u,&t); - # ge_add(&t,&u,&Ai[aslide[i]/2]); - $u = self::ge_p1p1_to_p3($t); - $t = self::ge_add( - $u, - $Ai[(int) floor($aslide[$i] / 2)] - ); - # } else if (aslide[i] < 0) { - } elseif ($aslide[$i] < 0) { - # ge_p1p1_to_p3(&u,&t); - # ge_sub(&t,&u,&Ai[(-aslide[i])/2]); - $u = self::ge_p1p1_to_p3($t); - $t = self::ge_sub( - $u, - $Ai[(int) floor(-$aslide[$i] / 2)] - ); - } - - # if (bslide[i] > 0) { - if ($bslide[$i] > 0) { - /** @var int $index */ - $index = (int) floor($bslide[$i] / 2); - # ge_p1p1_to_p3(&u,&t); - # ge_madd(&t,&u,&Bi[bslide[i]/2]); - $u = self::ge_p1p1_to_p3($t); - $t = self::ge_madd($t, $u, $Bi[$index]); - # } else if (bslide[i] < 0) { - } elseif ($bslide[$i] < 0) { - /** @var int $index */ - $index = (int) floor(-$bslide[$i] / 2); - # ge_p1p1_to_p3(&u,&t); - # ge_msub(&t,&u,&Bi[(-bslide[i])/2]); - $u = self::ge_p1p1_to_p3($t); - $t = self::ge_msub($t, $u, $Bi[$index]); - } - # ge_p1p1_to_p2(r,&t); - $r = self::ge_p1p1_to_p2($t); - } - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $a - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedOperand - */ - public static function ge_scalarmult($a, $p) - { - $e = array_fill(0, 64, 0); - - /** @var ParagonIE_Sodium_Core_Curve25519_Ge_Cached[] $pi */ - $pi = array(); - - // ge25519_p3_to_cached(&pi[1 - 1], p); /* p */ - $pi[0] = self::ge_p3_to_cached($p); - - // ge25519_p3_dbl(&t2, p); - // ge25519_p1p1_to_p3(&p2, &t2); - // ge25519_p3_to_cached(&pi[2 - 1], &p2); /* 2p = 2*p */ - $t2 = self::ge_p3_dbl($p); - $p2 = self::ge_p1p1_to_p3($t2); - $pi[1] = self::ge_p3_to_cached($p2); - - // ge25519_add_cached(&t3, p, &pi[2 - 1]); - // ge25519_p1p1_to_p3(&p3, &t3); - // ge25519_p3_to_cached(&pi[3 - 1], &p3); /* 3p = 2p+p */ - $t3 = self::ge_add($p, $pi[1]); - $p3 = self::ge_p1p1_to_p3($t3); - $pi[2] = self::ge_p3_to_cached($p3); - - // ge25519_p3_dbl(&t4, &p2); - // ge25519_p1p1_to_p3(&p4, &t4); - // ge25519_p3_to_cached(&pi[4 - 1], &p4); /* 4p = 2*2p */ - $t4 = self::ge_p3_dbl($p2); - $p4 = self::ge_p1p1_to_p3($t4); - $pi[3] = self::ge_p3_to_cached($p4); - - // ge25519_add_cached(&t5, p, &pi[4 - 1]); - // ge25519_p1p1_to_p3(&p5, &t5); - // ge25519_p3_to_cached(&pi[5 - 1], &p5); /* 5p = 4p+p */ - $t5 = self::ge_add($p, $pi[3]); - $p5 = self::ge_p1p1_to_p3($t5); - $pi[4] = self::ge_p3_to_cached($p5); - - // ge25519_p3_dbl(&t6, &p3); - // ge25519_p1p1_to_p3(&p6, &t6); - // ge25519_p3_to_cached(&pi[6 - 1], &p6); /* 6p = 2*3p */ - $t6 = self::ge_p3_dbl($p3); - $p6 = self::ge_p1p1_to_p3($t6); - $pi[5] = self::ge_p3_to_cached($p6); - - // ge25519_add_cached(&t7, p, &pi[6 - 1]); - // ge25519_p1p1_to_p3(&p7, &t7); - // ge25519_p3_to_cached(&pi[7 - 1], &p7); /* 7p = 6p+p */ - $t7 = self::ge_add($p, $pi[5]); - $p7 = self::ge_p1p1_to_p3($t7); - $pi[6] = self::ge_p3_to_cached($p7); - - // ge25519_p3_dbl(&t8, &p4); - // ge25519_p1p1_to_p3(&p8, &t8); - // ge25519_p3_to_cached(&pi[8 - 1], &p8); /* 8p = 2*4p */ - $t8 = self::ge_p3_dbl($p4); - $p8 = self::ge_p1p1_to_p3($t8); - $pi[7] = self::ge_p3_to_cached($p8); - - - // for (i = 0; i < 32; ++i) { - // e[2 * i + 0] = (a[i] >> 0) & 15; - // e[2 * i + 1] = (a[i] >> 4) & 15; - // } - for ($i = 0; $i < 32; ++$i) { - $e[($i << 1) ] = self::chrToInt($a[$i]) & 15; - $e[($i << 1) + 1] = (self::chrToInt($a[$i]) >> 4) & 15; - } - // /* each e[i] is between 0 and 15 */ - // /* e[63] is between 0 and 7 */ - - // carry = 0; - // for (i = 0; i < 63; ++i) { - // e[i] += carry; - // carry = e[i] + 8; - // carry >>= 4; - // e[i] -= carry * ((signed char) 1 << 4); - // } - $carry = 0; - for ($i = 0; $i < 63; ++$i) { - $e[$i] += $carry; - $carry = $e[$i] + 8; - $carry >>= 4; - $e[$i] -= $carry << 4; - } - // e[63] += carry; - // /* each e[i] is between -8 and 8 */ - $e[63] += $carry; - - // ge25519_p3_0(h); - $h = self::ge_p3_0(); - - // for (i = 63; i != 0; i--) { - for ($i = 63; $i != 0; --$i) { - // ge25519_cmov8_cached(&t, pi, e[i]); - $t = self::ge_cmov8_cached($pi, $e[$i]); - // ge25519_add_cached(&r, h, &t); - $r = self::ge_add($h, $t); - - // ge25519_p1p1_to_p2(&s, &r); - // ge25519_p2_dbl(&r, &s); - // ge25519_p1p1_to_p2(&s, &r); - // ge25519_p2_dbl(&r, &s); - // ge25519_p1p1_to_p2(&s, &r); - // ge25519_p2_dbl(&r, &s); - // ge25519_p1p1_to_p2(&s, &r); - // ge25519_p2_dbl(&r, &s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - - // ge25519_p1p1_to_p3(h, &r); /* *16 */ - $h = self::ge_p1p1_to_p3($r); /* *16 */ - } - - // ge25519_cmov8_cached(&t, pi, e[i]); - // ge25519_add_cached(&r, h, &t); - // ge25519_p1p1_to_p3(h, &r); - $t = self::ge_cmov8_cached($pi, $e[0]); - $r = self::ge_add($h, $t); - return self::ge_p1p1_to_p3($r); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $a - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedOperand - */ - public static function ge_scalarmult_base($a) - { - /** @var array $e */ - $e = array(); - $r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1(); - - for ($i = 0; $i < 32; ++$i) { - $dbl = (int) $i << 1; - $e[$dbl] = (int) self::chrToInt($a[$i]) & 15; - $e[$dbl + 1] = (int) (self::chrToInt($a[$i]) >> 4) & 15; - } - - $carry = 0; - for ($i = 0; $i < 63; ++$i) { - $e[$i] += $carry; - $carry = $e[$i] + 8; - $carry >>= 4; - $e[$i] -= $carry << 4; - } - $e[63] += (int) $carry; - - $h = self::ge_p3_0(); - - for ($i = 1; $i < 64; $i += 2) { - $t = self::ge_select((int) floor($i / 2), (int) $e[$i]); - $r = self::ge_madd($r, $h, $t); - $h = self::ge_p1p1_to_p3($r); - } - - $r = self::ge_p3_dbl($h); - - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - - $h = self::ge_p1p1_to_p3($r); - - for ($i = 0; $i < 64; $i += 2) { - $t = self::ge_select($i >> 1, (int) $e[$i]); - $r = self::ge_madd($r, $h, $t); - $h = self::ge_p1p1_to_p3($r); - } - return $h; - } - - /** - * Calculates (ab + c) mod l - * where l = 2^252 + 27742317777372353535851937790883648493 - * - * @internal You should not use this directly from another application - * - * @param string $a - * @param string $b - * @param string $c - * @return string - * @throws TypeError - */ - public static function sc_muladd($a, $b, $c) - { - $a0 = 2097151 & self::load_3(self::substr($a, 0, 3)); - $a1 = 2097151 & (self::load_4(self::substr($a, 2, 4)) >> 5); - $a2 = 2097151 & (self::load_3(self::substr($a, 5, 3)) >> 2); - $a3 = 2097151 & (self::load_4(self::substr($a, 7, 4)) >> 7); - $a4 = 2097151 & (self::load_4(self::substr($a, 10, 4)) >> 4); - $a5 = 2097151 & (self::load_3(self::substr($a, 13, 3)) >> 1); - $a6 = 2097151 & (self::load_4(self::substr($a, 15, 4)) >> 6); - $a7 = 2097151 & (self::load_3(self::substr($a, 18, 3)) >> 3); - $a8 = 2097151 & self::load_3(self::substr($a, 21, 3)); - $a9 = 2097151 & (self::load_4(self::substr($a, 23, 4)) >> 5); - $a10 = 2097151 & (self::load_3(self::substr($a, 26, 3)) >> 2); - $a11 = (self::load_4(self::substr($a, 28, 4)) >> 7); - - $b0 = 2097151 & self::load_3(self::substr($b, 0, 3)); - $b1 = 2097151 & (self::load_4(self::substr($b, 2, 4)) >> 5); - $b2 = 2097151 & (self::load_3(self::substr($b, 5, 3)) >> 2); - $b3 = 2097151 & (self::load_4(self::substr($b, 7, 4)) >> 7); - $b4 = 2097151 & (self::load_4(self::substr($b, 10, 4)) >> 4); - $b5 = 2097151 & (self::load_3(self::substr($b, 13, 3)) >> 1); - $b6 = 2097151 & (self::load_4(self::substr($b, 15, 4)) >> 6); - $b7 = 2097151 & (self::load_3(self::substr($b, 18, 3)) >> 3); - $b8 = 2097151 & self::load_3(self::substr($b, 21, 3)); - $b9 = 2097151 & (self::load_4(self::substr($b, 23, 4)) >> 5); - $b10 = 2097151 & (self::load_3(self::substr($b, 26, 3)) >> 2); - $b11 = (self::load_4(self::substr($b, 28, 4)) >> 7); - - $c0 = 2097151 & self::load_3(self::substr($c, 0, 3)); - $c1 = 2097151 & (self::load_4(self::substr($c, 2, 4)) >> 5); - $c2 = 2097151 & (self::load_3(self::substr($c, 5, 3)) >> 2); - $c3 = 2097151 & (self::load_4(self::substr($c, 7, 4)) >> 7); - $c4 = 2097151 & (self::load_4(self::substr($c, 10, 4)) >> 4); - $c5 = 2097151 & (self::load_3(self::substr($c, 13, 3)) >> 1); - $c6 = 2097151 & (self::load_4(self::substr($c, 15, 4)) >> 6); - $c7 = 2097151 & (self::load_3(self::substr($c, 18, 3)) >> 3); - $c8 = 2097151 & self::load_3(self::substr($c, 21, 3)); - $c9 = 2097151 & (self::load_4(self::substr($c, 23, 4)) >> 5); - $c10 = 2097151 & (self::load_3(self::substr($c, 26, 3)) >> 2); - $c11 = (self::load_4(self::substr($c, 28, 4)) >> 7); - - /* Can't really avoid the pyramid here: */ - $s0 = $c0 + self::mul($a0, $b0, 24); - $s1 = $c1 + self::mul($a0, $b1, 24) + self::mul($a1, $b0, 24); - $s2 = $c2 + self::mul($a0, $b2, 24) + self::mul($a1, $b1, 24) + self::mul($a2, $b0, 24); - $s3 = $c3 + self::mul($a0, $b3, 24) + self::mul($a1, $b2, 24) + self::mul($a2, $b1, 24) + self::mul($a3, $b0, 24); - $s4 = $c4 + self::mul($a0, $b4, 24) + self::mul($a1, $b3, 24) + self::mul($a2, $b2, 24) + self::mul($a3, $b1, 24) + - self::mul($a4, $b0, 24); - $s5 = $c5 + self::mul($a0, $b5, 24) + self::mul($a1, $b4, 24) + self::mul($a2, $b3, 24) + self::mul($a3, $b2, 24) + - self::mul($a4, $b1, 24) + self::mul($a5, $b0, 24); - $s6 = $c6 + self::mul($a0, $b6, 24) + self::mul($a1, $b5, 24) + self::mul($a2, $b4, 24) + self::mul($a3, $b3, 24) + - self::mul($a4, $b2, 24) + self::mul($a5, $b1, 24) + self::mul($a6, $b0, 24); - $s7 = $c7 + self::mul($a0, $b7, 24) + self::mul($a1, $b6, 24) + self::mul($a2, $b5, 24) + self::mul($a3, $b4, 24) + - self::mul($a4, $b3, 24) + self::mul($a5, $b2, 24) + self::mul($a6, $b1, 24) + self::mul($a7, $b0, 24); - $s8 = $c8 + self::mul($a0, $b8, 24) + self::mul($a1, $b7, 24) + self::mul($a2, $b6, 24) + self::mul($a3, $b5, 24) + - self::mul($a4, $b4, 24) + self::mul($a5, $b3, 24) + self::mul($a6, $b2, 24) + self::mul($a7, $b1, 24) + - self::mul($a8, $b0, 24); - $s9 = $c9 + self::mul($a0, $b9, 24) + self::mul($a1, $b8, 24) + self::mul($a2, $b7, 24) + self::mul($a3, $b6, 24) + - self::mul($a4, $b5, 24) + self::mul($a5, $b4, 24) + self::mul($a6, $b3, 24) + self::mul($a7, $b2, 24) + - self::mul($a8, $b1, 24) + self::mul($a9, $b0, 24); - $s10 = $c10 + self::mul($a0, $b10, 24) + self::mul($a1, $b9, 24) + self::mul($a2, $b8, 24) + self::mul($a3, $b7, 24) + - self::mul($a4, $b6, 24) + self::mul($a5, $b5, 24) + self::mul($a6, $b4, 24) + self::mul($a7, $b3, 24) + - self::mul($a8, $b2, 24) + self::mul($a9, $b1, 24) + self::mul($a10, $b0, 24); - $s11 = $c11 + self::mul($a0, $b11, 24) + self::mul($a1, $b10, 24) + self::mul($a2, $b9, 24) + self::mul($a3, $b8, 24) + - self::mul($a4, $b7, 24) + self::mul($a5, $b6, 24) + self::mul($a6, $b5, 24) + self::mul($a7, $b4, 24) + - self::mul($a8, $b3, 24) + self::mul($a9, $b2, 24) + self::mul($a10, $b1, 24) + self::mul($a11, $b0, 24); - $s12 = self::mul($a1, $b11, 24) + self::mul($a2, $b10, 24) + self::mul($a3, $b9, 24) + self::mul($a4, $b8, 24) + - self::mul($a5, $b7, 24) + self::mul($a6, $b6, 24) + self::mul($a7, $b5, 24) + self::mul($a8, $b4, 24) + - self::mul($a9, $b3, 24) + self::mul($a10, $b2, 24) + self::mul($a11, $b1, 24); - $s13 = self::mul($a2, $b11, 24) + self::mul($a3, $b10, 24) + self::mul($a4, $b9, 24) + self::mul($a5, $b8, 24) + - self::mul($a6, $b7, 24) + self::mul($a7, $b6, 24) + self::mul($a8, $b5, 24) + self::mul($a9, $b4, 24) + - self::mul($a10, $b3, 24) + self::mul($a11, $b2, 24); - $s14 = self::mul($a3, $b11, 24) + self::mul($a4, $b10, 24) + self::mul($a5, $b9, 24) + self::mul($a6, $b8, 24) + - self::mul($a7, $b7, 24) + self::mul($a8, $b6, 24) + self::mul($a9, $b5, 24) + self::mul($a10, $b4, 24) + - self::mul($a11, $b3, 24); - $s15 = self::mul($a4, $b11, 24) + self::mul($a5, $b10, 24) + self::mul($a6, $b9, 24) + self::mul($a7, $b8, 24) + - self::mul($a8, $b7, 24) + self::mul($a9, $b6, 24) + self::mul($a10, $b5, 24) + self::mul($a11, $b4, 24); - $s16 = self::mul($a5, $b11, 24) + self::mul($a6, $b10, 24) + self::mul($a7, $b9, 24) + self::mul($a8, $b8, 24) + - self::mul($a9, $b7, 24) + self::mul($a10, $b6, 24) + self::mul($a11, $b5, 24); - $s17 = self::mul($a6, $b11, 24) + self::mul($a7, $b10, 24) + self::mul($a8, $b9, 24) + self::mul($a9, $b8, 24) + - self::mul($a10, $b7, 24) + self::mul($a11, $b6, 24); - $s18 = self::mul($a7, $b11, 24) + self::mul($a8, $b10, 24) + self::mul($a9, $b9, 24) + self::mul($a10, $b8, 24) + - self::mul($a11, $b7, 24); - $s19 = self::mul($a8, $b11, 24) + self::mul($a9, $b10, 24) + self::mul($a10, $b9, 24) + self::mul($a11, $b8, 24); - $s20 = self::mul($a9, $b11, 24) + self::mul($a10, $b10, 24) + self::mul($a11, $b9, 24); - $s21 = self::mul($a10, $b11, 24) + self::mul($a11, $b10, 24); - $s22 = self::mul($a11, $b11, 24); - $s23 = 0; - - $carry0 = ($s0 + (1 << 20)) >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry2 = ($s2 + (1 << 20)) >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry4 = ($s4 + (1 << 20)) >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - $carry12 = ($s12 + (1 << 20)) >> 21; - $s13 += $carry12; - $s12 -= $carry12 << 21; - $carry14 = ($s14 + (1 << 20)) >> 21; - $s15 += $carry14; - $s14 -= $carry14 << 21; - $carry16 = ($s16 + (1 << 20)) >> 21; - $s17 += $carry16; - $s16 -= $carry16 << 21; - $carry18 = ($s18 + (1 << 20)) >> 21; - $s19 += $carry18; - $s18 -= $carry18 << 21; - $carry20 = ($s20 + (1 << 20)) >> 21; - $s21 += $carry20; - $s20 -= $carry20 << 21; - $carry22 = ($s22 + (1 << 20)) >> 21; - $s23 += $carry22; - $s22 -= $carry22 << 21; - - $carry1 = ($s1 + (1 << 20)) >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry3 = ($s3 + (1 << 20)) >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry5 = ($s5 + (1 << 20)) >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - $carry13 = ($s13 + (1 << 20)) >> 21; - $s14 += $carry13; - $s13 -= $carry13 << 21; - $carry15 = ($s15 + (1 << 20)) >> 21; - $s16 += $carry15; - $s15 -= $carry15 << 21; - $carry17 = ($s17 + (1 << 20)) >> 21; - $s18 += $carry17; - $s17 -= $carry17 << 21; - $carry19 = ($s19 + (1 << 20)) >> 21; - $s20 += $carry19; - $s19 -= $carry19 << 21; - $carry21 = ($s21 + (1 << 20)) >> 21; - $s22 += $carry21; - $s21 -= $carry21 << 21; - - $s11 += self::mul($s23, 666643, 20); - $s12 += self::mul($s23, 470296, 19); - $s13 += self::mul($s23, 654183, 20); - $s14 -= self::mul($s23, 997805, 20); - $s15 += self::mul($s23, 136657, 18); - $s16 -= self::mul($s23, 683901, 20); - - $s10 += self::mul($s22, 666643, 20); - $s11 += self::mul($s22, 470296, 19); - $s12 += self::mul($s22, 654183, 20); - $s13 -= self::mul($s22, 997805, 20); - $s14 += self::mul($s22, 136657, 18); - $s15 -= self::mul($s22, 683901, 20); - - $s9 += self::mul($s21, 666643, 20); - $s10 += self::mul($s21, 470296, 19); - $s11 += self::mul($s21, 654183, 20); - $s12 -= self::mul($s21, 997805, 20); - $s13 += self::mul($s21, 136657, 18); - $s14 -= self::mul($s21, 683901, 20); - - $s8 += self::mul($s20, 666643, 20); - $s9 += self::mul($s20, 470296, 19); - $s10 += self::mul($s20, 654183, 20); - $s11 -= self::mul($s20, 997805, 20); - $s12 += self::mul($s20, 136657, 18); - $s13 -= self::mul($s20, 683901, 20); - - $s7 += self::mul($s19, 666643, 20); - $s8 += self::mul($s19, 470296, 19); - $s9 += self::mul($s19, 654183, 20); - $s10 -= self::mul($s19, 997805, 20); - $s11 += self::mul($s19, 136657, 18); - $s12 -= self::mul($s19, 683901, 20); - - $s6 += self::mul($s18, 666643, 20); - $s7 += self::mul($s18, 470296, 19); - $s8 += self::mul($s18, 654183, 20); - $s9 -= self::mul($s18, 997805, 20); - $s10 += self::mul($s18, 136657, 18); - $s11 -= self::mul($s18, 683901, 20); - - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - $carry12 = ($s12 + (1 << 20)) >> 21; - $s13 += $carry12; - $s12 -= $carry12 << 21; - $carry14 = ($s14 + (1 << 20)) >> 21; - $s15 += $carry14; - $s14 -= $carry14 << 21; - $carry16 = ($s16 + (1 << 20)) >> 21; - $s17 += $carry16; - $s16 -= $carry16 << 21; - - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - $carry13 = ($s13 + (1 << 20)) >> 21; - $s14 += $carry13; - $s13 -= $carry13 << 21; - $carry15 = ($s15 + (1 << 20)) >> 21; - $s16 += $carry15; - $s15 -= $carry15 << 21; - - $s5 += self::mul($s17, 666643, 20); - $s6 += self::mul($s17, 470296, 19); - $s7 += self::mul($s17, 654183, 20); - $s8 -= self::mul($s17, 997805, 20); - $s9 += self::mul($s17, 136657, 18); - $s10 -= self::mul($s17, 683901, 20); - - $s4 += self::mul($s16, 666643, 20); - $s5 += self::mul($s16, 470296, 19); - $s6 += self::mul($s16, 654183, 20); - $s7 -= self::mul($s16, 997805, 20); - $s8 += self::mul($s16, 136657, 18); - $s9 -= self::mul($s16, 683901, 20); - - $s3 += self::mul($s15, 666643, 20); - $s4 += self::mul($s15, 470296, 19); - $s5 += self::mul($s15, 654183, 20); - $s6 -= self::mul($s15, 997805, 20); - $s7 += self::mul($s15, 136657, 18); - $s8 -= self::mul($s15, 683901, 20); - - $s2 += self::mul($s14, 666643, 20); - $s3 += self::mul($s14, 470296, 19); - $s4 += self::mul($s14, 654183, 20); - $s5 -= self::mul($s14, 997805, 20); - $s6 += self::mul($s14, 136657, 18); - $s7 -= self::mul($s14, 683901, 20); - - $s1 += self::mul($s13, 666643, 20); - $s2 += self::mul($s13, 470296, 19); - $s3 += self::mul($s13, 654183, 20); - $s4 -= self::mul($s13, 997805, 20); - $s5 += self::mul($s13, 136657, 18); - $s6 -= self::mul($s13, 683901, 20); - - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - $s12 = 0; - - $carry0 = ($s0 + (1 << 20)) >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry2 = ($s2 + (1 << 20)) >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry4 = ($s4 + (1 << 20)) >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - - $carry1 = ($s1 + (1 << 20)) >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry3 = ($s3 + (1 << 20)) >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry5 = ($s5 + (1 << 20)) >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - $s12 = 0; - - $carry0 = $s0 >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry1 = $s1 >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry2 = $s2 >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry3 = $s3 >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry4 = $s4 >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry5 = $s5 >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry6 = $s6 >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry7 = $s7 >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry8 = $s8 >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry9 = $s9 >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry10 = $s10 >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - $carry11 = $s11 >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - - $carry0 = $s0 >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry1 = $s1 >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry2 = $s2 >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry3 = $s3 >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry4 = $s4 >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry5 = $s5 >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry6 = $s6 >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry7 = $s7 >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry8 = $s8 >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry9 = $s9 >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry10 = $s10 >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - - /** - * @var array - */ - $arr = array( - (int) (0xff & ($s0 >> 0)), - (int) (0xff & ($s0 >> 8)), - (int) (0xff & (($s0 >> 16) | $s1 << 5)), - (int) (0xff & ($s1 >> 3)), - (int) (0xff & ($s1 >> 11)), - (int) (0xff & (($s1 >> 19) | $s2 << 2)), - (int) (0xff & ($s2 >> 6)), - (int) (0xff & (($s2 >> 14) | $s3 << 7)), - (int) (0xff & ($s3 >> 1)), - (int) (0xff & ($s3 >> 9)), - (int) (0xff & (($s3 >> 17) | $s4 << 4)), - (int) (0xff & ($s4 >> 4)), - (int) (0xff & ($s4 >> 12)), - (int) (0xff & (($s4 >> 20) | $s5 << 1)), - (int) (0xff & ($s5 >> 7)), - (int) (0xff & (($s5 >> 15) | $s6 << 6)), - (int) (0xff & ($s6 >> 2)), - (int) (0xff & ($s6 >> 10)), - (int) (0xff & (($s6 >> 18) | $s7 << 3)), - (int) (0xff & ($s7 >> 5)), - (int) (0xff & ($s7 >> 13)), - (int) (0xff & ($s8 >> 0)), - (int) (0xff & ($s8 >> 8)), - (int) (0xff & (($s8 >> 16) | $s9 << 5)), - (int) (0xff & ($s9 >> 3)), - (int) (0xff & ($s9 >> 11)), - (int) (0xff & (($s9 >> 19) | $s10 << 2)), - (int) (0xff & ($s10 >> 6)), - (int) (0xff & (($s10 >> 14) | $s11 << 7)), - (int) (0xff & ($s11 >> 1)), - (int) (0xff & ($s11 >> 9)), - 0xff & ($s11 >> 17) - ); - return self::intArrayToString($arr); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $s - * @return string - * @throws TypeError - */ - public static function sc_reduce($s) - { - $s0 = 2097151 & self::load_3(self::substr($s, 0, 3)); - $s1 = 2097151 & (self::load_4(self::substr($s, 2, 4)) >> 5); - $s2 = 2097151 & (self::load_3(self::substr($s, 5, 3)) >> 2); - $s3 = 2097151 & (self::load_4(self::substr($s, 7, 4)) >> 7); - $s4 = 2097151 & (self::load_4(self::substr($s, 10, 4)) >> 4); - $s5 = 2097151 & (self::load_3(self::substr($s, 13, 3)) >> 1); - $s6 = 2097151 & (self::load_4(self::substr($s, 15, 4)) >> 6); - $s7 = 2097151 & (self::load_3(self::substr($s, 18, 4)) >> 3); - $s8 = 2097151 & self::load_3(self::substr($s, 21, 3)); - $s9 = 2097151 & (self::load_4(self::substr($s, 23, 4)) >> 5); - $s10 = 2097151 & (self::load_3(self::substr($s, 26, 3)) >> 2); - $s11 = 2097151 & (self::load_4(self::substr($s, 28, 4)) >> 7); - $s12 = 2097151 & (self::load_4(self::substr($s, 31, 4)) >> 4); - $s13 = 2097151 & (self::load_3(self::substr($s, 34, 3)) >> 1); - $s14 = 2097151 & (self::load_4(self::substr($s, 36, 4)) >> 6); - $s15 = 2097151 & (self::load_3(self::substr($s, 39, 4)) >> 3); - $s16 = 2097151 & self::load_3(self::substr($s, 42, 3)); - $s17 = 2097151 & (self::load_4(self::substr($s, 44, 4)) >> 5); - $s18 = 2097151 & (self::load_3(self::substr($s, 47, 3)) >> 2); - $s19 = 2097151 & (self::load_4(self::substr($s, 49, 4)) >> 7); - $s20 = 2097151 & (self::load_4(self::substr($s, 52, 4)) >> 4); - $s21 = 2097151 & (self::load_3(self::substr($s, 55, 3)) >> 1); - $s22 = 2097151 & (self::load_4(self::substr($s, 57, 4)) >> 6); - $s23 = 0x1fffffff & (self::load_4(self::substr($s, 60, 4)) >> 3); - - $s11 += self::mul($s23, 666643, 20); - $s12 += self::mul($s23, 470296, 19); - $s13 += self::mul($s23, 654183, 20); - $s14 -= self::mul($s23, 997805, 20); - $s15 += self::mul($s23, 136657, 18); - $s16 -= self::mul($s23, 683901, 20); - - $s10 += self::mul($s22, 666643, 20); - $s11 += self::mul($s22, 470296, 19); - $s12 += self::mul($s22, 654183, 20); - $s13 -= self::mul($s22, 997805, 20); - $s14 += self::mul($s22, 136657, 18); - $s15 -= self::mul($s22, 683901, 20); - - $s9 += self::mul($s21, 666643, 20); - $s10 += self::mul($s21, 470296, 19); - $s11 += self::mul($s21, 654183, 20); - $s12 -= self::mul($s21, 997805, 20); - $s13 += self::mul($s21, 136657, 18); - $s14 -= self::mul($s21, 683901, 20); - - $s8 += self::mul($s20, 666643, 20); - $s9 += self::mul($s20, 470296, 19); - $s10 += self::mul($s20, 654183, 20); - $s11 -= self::mul($s20, 997805, 20); - $s12 += self::mul($s20, 136657, 18); - $s13 -= self::mul($s20, 683901, 20); - - $s7 += self::mul($s19, 666643, 20); - $s8 += self::mul($s19, 470296, 19); - $s9 += self::mul($s19, 654183, 20); - $s10 -= self::mul($s19, 997805, 20); - $s11 += self::mul($s19, 136657, 18); - $s12 -= self::mul($s19, 683901, 20); - - $s6 += self::mul($s18, 666643, 20); - $s7 += self::mul($s18, 470296, 19); - $s8 += self::mul($s18, 654183, 20); - $s9 -= self::mul($s18, 997805, 20); - $s10 += self::mul($s18, 136657, 18); - $s11 -= self::mul($s18, 683901, 20); - - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - $carry12 = ($s12 + (1 << 20)) >> 21; - $s13 += $carry12; - $s12 -= $carry12 << 21; - $carry14 = ($s14 + (1 << 20)) >> 21; - $s15 += $carry14; - $s14 -= $carry14 << 21; - $carry16 = ($s16 + (1 << 20)) >> 21; - $s17 += $carry16; - $s16 -= $carry16 << 21; - - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - $carry13 = ($s13 + (1 << 20)) >> 21; - $s14 += $carry13; - $s13 -= $carry13 << 21; - $carry15 = ($s15 + (1 << 20)) >> 21; - $s16 += $carry15; - $s15 -= $carry15 << 21; - - $s5 += self::mul($s17, 666643, 20); - $s6 += self::mul($s17, 470296, 19); - $s7 += self::mul($s17, 654183, 20); - $s8 -= self::mul($s17, 997805, 20); - $s9 += self::mul($s17, 136657, 18); - $s10 -= self::mul($s17, 683901, 20); - - $s4 += self::mul($s16, 666643, 20); - $s5 += self::mul($s16, 470296, 19); - $s6 += self::mul($s16, 654183, 20); - $s7 -= self::mul($s16, 997805, 20); - $s8 += self::mul($s16, 136657, 18); - $s9 -= self::mul($s16, 683901, 20); - - $s3 += self::mul($s15, 666643, 20); - $s4 += self::mul($s15, 470296, 19); - $s5 += self::mul($s15, 654183, 20); - $s6 -= self::mul($s15, 997805, 20); - $s7 += self::mul($s15, 136657, 18); - $s8 -= self::mul($s15, 683901, 20); - - $s2 += self::mul($s14, 666643, 20); - $s3 += self::mul($s14, 470296, 19); - $s4 += self::mul($s14, 654183, 20); - $s5 -= self::mul($s14, 997805, 20); - $s6 += self::mul($s14, 136657, 18); - $s7 -= self::mul($s14, 683901, 20); - - $s1 += self::mul($s13, 666643, 20); - $s2 += self::mul($s13, 470296, 19); - $s3 += self::mul($s13, 654183, 20); - $s4 -= self::mul($s13, 997805, 20); - $s5 += self::mul($s13, 136657, 18); - $s6 -= self::mul($s13, 683901, 20); - - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - $s12 = 0; - - $carry0 = ($s0 + (1 << 20)) >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry2 = ($s2 + (1 << 20)) >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry4 = ($s4 + (1 << 20)) >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - - $carry1 = ($s1 + (1 << 20)) >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry3 = ($s3 + (1 << 20)) >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry5 = ($s5 + (1 << 20)) >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - $s12 = 0; - - $carry0 = $s0 >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry1 = $s1 >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry2 = $s2 >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry3 = $s3 >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry4 = $s4 >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry5 = $s5 >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry6 = $s6 >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry7 = $s7 >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry8 = $s8 >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry9 = $s9 >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry10 = $s10 >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - $carry11 = $s11 >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - - $carry0 = $s0 >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - $carry1 = $s1 >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - $carry2 = $s2 >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - $carry3 = $s3 >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - $carry4 = $s4 >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - $carry5 = $s5 >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - $carry6 = $s6 >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - $carry7 = $s7 >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - $carry8 = $s8 >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - $carry9 = $s9 >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - $carry10 = $s10 >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - - /** - * @var array - */ - $arr = array( - (int) ($s0 >> 0), - (int) ($s0 >> 8), - (int) (($s0 >> 16) | $s1 << 5), - (int) ($s1 >> 3), - (int) ($s1 >> 11), - (int) (($s1 >> 19) | $s2 << 2), - (int) ($s2 >> 6), - (int) (($s2 >> 14) | $s3 << 7), - (int) ($s3 >> 1), - (int) ($s3 >> 9), - (int) (($s3 >> 17) | $s4 << 4), - (int) ($s4 >> 4), - (int) ($s4 >> 12), - (int) (($s4 >> 20) | $s5 << 1), - (int) ($s5 >> 7), - (int) (($s5 >> 15) | $s6 << 6), - (int) ($s6 >> 2), - (int) ($s6 >> 10), - (int) (($s6 >> 18) | $s7 << 3), - (int) ($s7 >> 5), - (int) ($s7 >> 13), - (int) ($s8 >> 0), - (int) ($s8 >> 8), - (int) (($s8 >> 16) | $s9 << 5), - (int) ($s9 >> 3), - (int) ($s9 >> 11), - (int) (($s9 >> 19) | $s10 << 2), - (int) ($s10 >> 6), - (int) (($s10 >> 14) | $s11 << 7), - (int) ($s11 >> 1), - (int) ($s11 >> 9), - (int) $s11 >> 17 - ); - return self::intArrayToString($arr); - } - - /** - * multiply by the order of the main subgroup l = 2^252+27742317777372353535851937790883648493 - * - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - */ - public static function ge_mul_l(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A) - { - $aslide = array( - 13, 0, 0, 0, 0, -1, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, - 0, 0, 0, -3, 0, 0, 0, 0, -13, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, -13, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, -1, - 0, 0, 0, 0, 3, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 - ); - - /** @var array $Ai size 8 */ - $Ai = array(); - - # ge_p3_to_cached(&Ai[0], A); - $Ai[0] = self::ge_p3_to_cached($A); - # ge_p3_dbl(&t, A); - $t = self::ge_p3_dbl($A); - # ge_p1p1_to_p3(&A2, &t); - $A2 = self::ge_p1p1_to_p3($t); - - for ($i = 1; $i < 8; ++$i) { - # ge_add(&t, &A2, &Ai[0]); - $t = self::ge_add($A2, $Ai[$i - 1]); - # ge_p1p1_to_p3(&u, &t); - $u = self::ge_p1p1_to_p3($t); - # ge_p3_to_cached(&Ai[i], &u); - $Ai[$i] = self::ge_p3_to_cached($u); - } - - $r = self::ge_p3_0(); - for ($i = 252; $i >= 0; --$i) { - $t = self::ge_p3_dbl($r); - if ($aslide[$i] > 0) { - # ge_p1p1_to_p3(&u, &t); - $u = self::ge_p1p1_to_p3($t); - # ge_add(&t, &u, &Ai[aslide[i] / 2]); - $t = self::ge_add($u, $Ai[(int)($aslide[$i] / 2)]); - } elseif ($aslide[$i] < 0) { - # ge_p1p1_to_p3(&u, &t); - $u = self::ge_p1p1_to_p3($t); - # ge_sub(&t, &u, &Ai[(-aslide[i]) / 2]); - $t = self::ge_sub($u, $Ai[(int)(-$aslide[$i] / 2)]); - } - } - - # ge_p1p1_to_p3(r, &t); - return self::ge_p1p1_to_p3($t); - } - - /** - * @param string $a - * @param string $b - * @return string - */ - public static function sc25519_mul($a, $b) - { - // int64_t a0 = 2097151 & load_3(a); - // int64_t a1 = 2097151 & (load_4(a + 2) >> 5); - // int64_t a2 = 2097151 & (load_3(a + 5) >> 2); - // int64_t a3 = 2097151 & (load_4(a + 7) >> 7); - // int64_t a4 = 2097151 & (load_4(a + 10) >> 4); - // int64_t a5 = 2097151 & (load_3(a + 13) >> 1); - // int64_t a6 = 2097151 & (load_4(a + 15) >> 6); - // int64_t a7 = 2097151 & (load_3(a + 18) >> 3); - // int64_t a8 = 2097151 & load_3(a + 21); - // int64_t a9 = 2097151 & (load_4(a + 23) >> 5); - // int64_t a10 = 2097151 & (load_3(a + 26) >> 2); - // int64_t a11 = (load_4(a + 28) >> 7); - $a0 = 2097151 & self::load_3(self::substr($a, 0, 3)); - $a1 = 2097151 & (self::load_4(self::substr($a, 2, 4)) >> 5); - $a2 = 2097151 & (self::load_3(self::substr($a, 5, 3)) >> 2); - $a3 = 2097151 & (self::load_4(self::substr($a, 7, 4)) >> 7); - $a4 = 2097151 & (self::load_4(self::substr($a, 10, 4)) >> 4); - $a5 = 2097151 & (self::load_3(self::substr($a, 13, 3)) >> 1); - $a6 = 2097151 & (self::load_4(self::substr($a, 15, 4)) >> 6); - $a7 = 2097151 & (self::load_3(self::substr($a, 18, 3)) >> 3); - $a8 = 2097151 & self::load_3(self::substr($a, 21, 3)); - $a9 = 2097151 & (self::load_4(self::substr($a, 23, 4)) >> 5); - $a10 = 2097151 & (self::load_3(self::substr($a, 26, 3)) >> 2); - $a11 = (self::load_4(self::substr($a, 28, 4)) >> 7); - - // int64_t b0 = 2097151 & load_3(b); - // int64_t b1 = 2097151 & (load_4(b + 2) >> 5); - // int64_t b2 = 2097151 & (load_3(b + 5) >> 2); - // int64_t b3 = 2097151 & (load_4(b + 7) >> 7); - // int64_t b4 = 2097151 & (load_4(b + 10) >> 4); - // int64_t b5 = 2097151 & (load_3(b + 13) >> 1); - // int64_t b6 = 2097151 & (load_4(b + 15) >> 6); - // int64_t b7 = 2097151 & (load_3(b + 18) >> 3); - // int64_t b8 = 2097151 & load_3(b + 21); - // int64_t b9 = 2097151 & (load_4(b + 23) >> 5); - // int64_t b10 = 2097151 & (load_3(b + 26) >> 2); - // int64_t b11 = (load_4(b + 28) >> 7); - $b0 = 2097151 & self::load_3(self::substr($b, 0, 3)); - $b1 = 2097151 & (self::load_4(self::substr($b, 2, 4)) >> 5); - $b2 = 2097151 & (self::load_3(self::substr($b, 5, 3)) >> 2); - $b3 = 2097151 & (self::load_4(self::substr($b, 7, 4)) >> 7); - $b4 = 2097151 & (self::load_4(self::substr($b, 10, 4)) >> 4); - $b5 = 2097151 & (self::load_3(self::substr($b, 13, 3)) >> 1); - $b6 = 2097151 & (self::load_4(self::substr($b, 15, 4)) >> 6); - $b7 = 2097151 & (self::load_3(self::substr($b, 18, 3)) >> 3); - $b8 = 2097151 & self::load_3(self::substr($b, 21, 3)); - $b9 = 2097151 & (self::load_4(self::substr($b, 23, 4)) >> 5); - $b10 = 2097151 & (self::load_3(self::substr($b, 26, 3)) >> 2); - $b11 = (self::load_4(self::substr($b, 28, 4)) >> 7); - - // s0 = a0 * b0; - // s1 = a0 * b1 + a1 * b0; - // s2 = a0 * b2 + a1 * b1 + a2 * b0; - // s3 = a0 * b3 + a1 * b2 + a2 * b1 + a3 * b0; - // s4 = a0 * b4 + a1 * b3 + a2 * b2 + a3 * b1 + a4 * b0; - // s5 = a0 * b5 + a1 * b4 + a2 * b3 + a3 * b2 + a4 * b1 + a5 * b0; - // s6 = a0 * b6 + a1 * b5 + a2 * b4 + a3 * b3 + a4 * b2 + a5 * b1 + a6 * b0; - // s7 = a0 * b7 + a1 * b6 + a2 * b5 + a3 * b4 + a4 * b3 + a5 * b2 + - // a6 * b1 + a7 * b0; - // s8 = a0 * b8 + a1 * b7 + a2 * b6 + a3 * b5 + a4 * b4 + a5 * b3 + - // a6 * b2 + a7 * b1 + a8 * b0; - // s9 = a0 * b9 + a1 * b8 + a2 * b7 + a3 * b6 + a4 * b5 + a5 * b4 + - // a6 * b3 + a7 * b2 + a8 * b1 + a9 * b0; - // s10 = a0 * b10 + a1 * b9 + a2 * b8 + a3 * b7 + a4 * b6 + a5 * b5 + - // a6 * b4 + a7 * b3 + a8 * b2 + a9 * b1 + a10 * b0; - // s11 = a0 * b11 + a1 * b10 + a2 * b9 + a3 * b8 + a4 * b7 + a5 * b6 + - // a6 * b5 + a7 * b4 + a8 * b3 + a9 * b2 + a10 * b1 + a11 * b0; - // s12 = a1 * b11 + a2 * b10 + a3 * b9 + a4 * b8 + a5 * b7 + a6 * b6 + - // a7 * b5 + a8 * b4 + a9 * b3 + a10 * b2 + a11 * b1; - // s13 = a2 * b11 + a3 * b10 + a4 * b9 + a5 * b8 + a6 * b7 + a7 * b6 + - // a8 * b5 + a9 * b4 + a10 * b3 + a11 * b2; - // s14 = a3 * b11 + a4 * b10 + a5 * b9 + a6 * b8 + a7 * b7 + a8 * b6 + - // a9 * b5 + a10 * b4 + a11 * b3; - // s15 = a4 * b11 + a5 * b10 + a6 * b9 + a7 * b8 + a8 * b7 + a9 * b6 + - // a10 * b5 + a11 * b4; - // s16 = - // a5 * b11 + a6 * b10 + a7 * b9 + a8 * b8 + a9 * b7 + a10 * b6 + a11 * b5; - // s17 = a6 * b11 + a7 * b10 + a8 * b9 + a9 * b8 + a10 * b7 + a11 * b6; - // s18 = a7 * b11 + a8 * b10 + a9 * b9 + a10 * b8 + a11 * b7; - // s19 = a8 * b11 + a9 * b10 + a10 * b9 + a11 * b8; - // s20 = a9 * b11 + a10 * b10 + a11 * b9; - // s21 = a10 * b11 + a11 * b10; - // s22 = a11 * b11; - // s23 = 0; - $s0 = self::mul($a0, $b0, 22); - $s1 = self::mul($a0, $b1, 22) + self::mul($a1, $b0, 22); - $s2 = self::mul($a0, $b2, 22) + self::mul($a1, $b1, 22) + self::mul($a2, $b0, 22); - $s3 = self::mul($a0, $b3, 22) + self::mul($a1, $b2, 22) + self::mul($a2, $b1, 22) + self::mul($a3, $b0, 22); - $s4 = self::mul($a0, $b4, 22) + self::mul($a1, $b3, 22) + self::mul($a2, $b2, 22) + self::mul($a3, $b1, 22) + - self::mul($a4, $b0, 22); - $s5 = self::mul($a0, $b5, 22) + self::mul($a1, $b4, 22) + self::mul($a2, $b3, 22) + self::mul($a3, $b2, 22) + - self::mul($a4, $b1, 22) + self::mul($a5, $b0, 22); - $s6 = self::mul($a0, $b6, 22) + self::mul($a1, $b5, 22) + self::mul($a2, $b4, 22) + self::mul($a3, $b3, 22) + - self::mul($a4, $b2, 22) + self::mul($a5, $b1, 22) + self::mul($a6, $b0, 22); - $s7 = self::mul($a0, $b7, 22) + self::mul($a1, $b6, 22) + self::mul($a2, $b5, 22) + self::mul($a3, $b4, 22) + - self::mul($a4, $b3, 22) + self::mul($a5, $b2, 22) + self::mul($a6, $b1, 22) + self::mul($a7, $b0, 22); - $s8 = self::mul($a0, $b8, 22) + self::mul($a1, $b7, 22) + self::mul($a2, $b6, 22) + self::mul($a3, $b5, 22) + - self::mul($a4, $b4, 22) + self::mul($a5, $b3, 22) + self::mul($a6, $b2, 22) + self::mul($a7, $b1, 22) + - self::mul($a8, $b0, 22); - $s9 = self::mul($a0, $b9, 22) + self::mul($a1, $b8, 22) + self::mul($a2, $b7, 22) + self::mul($a3, $b6, 22) + - self::mul($a4, $b5, 22) + self::mul($a5, $b4, 22) + self::mul($a6, $b3, 22) + self::mul($a7, $b2, 22) + - self::mul($a8, $b1, 22) + self::mul($a9, $b0, 22); - $s10 = self::mul($a0, $b10, 22) + self::mul($a1, $b9, 22) + self::mul($a2, $b8, 22) + self::mul($a3, $b7, 22) + - self::mul($a4, $b6, 22) + self::mul($a5, $b5, 22) + self::mul($a6, $b4, 22) + self::mul($a7, $b3, 22) + - self::mul($a8, $b2, 22) + self::mul($a9, $b1, 22) + self::mul($a10, $b0, 22); - $s11 = self::mul($a0, $b11, 22) + self::mul($a1, $b10, 22) + self::mul($a2, $b9, 22) + self::mul($a3, $b8, 22) + - self::mul($a4, $b7, 22) + self::mul($a5, $b6, 22) + self::mul($a6, $b5, 22) + self::mul($a7, $b4, 22) + - self::mul($a8, $b3, 22) + self::mul($a9, $b2, 22) + self::mul($a10, $b1, 22) + self::mul($a11, $b0, 22); - $s12 = self::mul($a1, $b11, 22) + self::mul($a2, $b10, 22) + self::mul($a3, $b9, 22) + self::mul($a4, $b8, 22) + - self::mul($a5, $b7, 22) + self::mul($a6, $b6, 22) + self::mul($a7, $b5, 22) + self::mul($a8, $b4, 22) + - self::mul($a9, $b3, 22) + self::mul($a10, $b2, 22) + self::mul($a11, $b1, 22); - $s13 = self::mul($a2, $b11, 22) + self::mul($a3, $b10, 22) + self::mul($a4, $b9, 22) + self::mul($a5, $b8, 22) + - self::mul($a6, $b7, 22) + self::mul($a7, $b6, 22) + self::mul($a8, $b5, 22) + self::mul($a9, $b4, 22) + - self::mul($a10, $b3, 22) + self::mul($a11, $b2, 22); - $s14 = self::mul($a3, $b11, 22) + self::mul($a4, $b10, 22) + self::mul($a5, $b9, 22) + self::mul($a6, $b8, 22) + - self::mul($a7, $b7, 22) + self::mul($a8, $b6, 22) + self::mul($a9, $b5, 22) + self::mul($a10, $b4, 22) + - self::mul($a11, $b3, 22); - $s15 = self::mul($a4, $b11, 22) + self::mul($a5, $b10, 22) + self::mul($a6, $b9, 22) + self::mul($a7, $b8, 22) + - self::mul($a8, $b7, 22) + self::mul($a9, $b6, 22) + self::mul($a10, $b5, 22) + self::mul($a11, $b4, 22); - $s16 = - self::mul($a5, $b11, 22) + self::mul($a6, $b10, 22) + self::mul($a7, $b9, 22) + self::mul($a8, $b8, 22) + - self::mul($a9, $b7, 22) + self::mul($a10, $b6, 22) + self::mul($a11, $b5, 22); - $s17 = self::mul($a6, $b11, 22) + self::mul($a7, $b10, 22) + self::mul($a8, $b9, 22) + self::mul($a9, $b8, 22) + - self::mul($a10, $b7, 22) + self::mul($a11, $b6, 22); - $s18 = self::mul($a7, $b11, 22) + self::mul($a8, $b10, 22) + self::mul($a9, $b9, 22) + self::mul($a10, $b8, 22) - + self::mul($a11, $b7, 22); - $s19 = self::mul($a8, $b11, 22) + self::mul($a9, $b10, 22) + self::mul($a10, $b9, 22) + - self::mul($a11, $b8, 22); - $s20 = self::mul($a9, $b11, 22) + self::mul($a10, $b10, 22) + self::mul($a11, $b9, 22); - $s21 = self::mul($a10, $b11, 22) + self::mul($a11, $b10, 22); - $s22 = self::mul($a11, $b11, 22); - $s23 = 0; - - // carry0 = (s0 + (int64_t) (1L << 20)) >> 21; - // s1 += carry0; - // s0 -= carry0 * ((uint64_t) 1L << 21); - $carry0 = ($s0 + (1 << 20)) >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - // carry2 = (s2 + (int64_t) (1L << 20)) >> 21; - // s3 += carry2; - // s2 -= carry2 * ((uint64_t) 1L << 21); - $carry2 = ($s2 + (1 << 20)) >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - // carry4 = (s4 + (int64_t) (1L << 20)) >> 21; - // s5 += carry4; - // s4 -= carry4 * ((uint64_t) 1L << 21); - $carry4 = ($s4 + (1 << 20)) >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - // carry6 = (s6 + (int64_t) (1L << 20)) >> 21; - // s7 += carry6; - // s6 -= carry6 * ((uint64_t) 1L << 21); - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - // carry8 = (s8 + (int64_t) (1L << 20)) >> 21; - // s9 += carry8; - // s8 -= carry8 * ((uint64_t) 1L << 21); - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - // carry10 = (s10 + (int64_t) (1L << 20)) >> 21; - // s11 += carry10; - // s10 -= carry10 * ((uint64_t) 1L << 21); - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - // carry12 = (s12 + (int64_t) (1L << 20)) >> 21; - // s13 += carry12; - // s12 -= carry12 * ((uint64_t) 1L << 21); - $carry12 = ($s12 + (1 << 20)) >> 21; - $s13 += $carry12; - $s12 -= $carry12 << 21; - // carry14 = (s14 + (int64_t) (1L << 20)) >> 21; - // s15 += carry14; - // s14 -= carry14 * ((uint64_t) 1L << 21); - $carry14 = ($s14 + (1 << 20)) >> 21; - $s15 += $carry14; - $s14 -= $carry14 << 21; - // carry16 = (s16 + (int64_t) (1L << 20)) >> 21; - // s17 += carry16; - // s16 -= carry16 * ((uint64_t) 1L << 21); - $carry16 = ($s16 + (1 << 20)) >> 21; - $s17 += $carry16; - $s16 -= $carry16 << 21; - // carry18 = (s18 + (int64_t) (1L << 20)) >> 21; - // s19 += carry18; - // s18 -= carry18 * ((uint64_t) 1L << 21); - $carry18 = ($s18 + (1 << 20)) >> 21; - $s19 += $carry18; - $s18 -= $carry18 << 21; - // carry20 = (s20 + (int64_t) (1L << 20)) >> 21; - // s21 += carry20; - // s20 -= carry20 * ((uint64_t) 1L << 21); - $carry20 = ($s20 + (1 << 20)) >> 21; - $s21 += $carry20; - $s20 -= $carry20 << 21; - // carry22 = (s22 + (int64_t) (1L << 20)) >> 21; - // s23 += carry22; - // s22 -= carry22 * ((uint64_t) 1L << 21); - $carry22 = ($s22 + (1 << 20)) >> 21; - $s23 += $carry22; - $s22 -= $carry22 << 21; - - // carry1 = (s1 + (int64_t) (1L << 20)) >> 21; - // s2 += carry1; - // s1 -= carry1 * ((uint64_t) 1L << 21); - $carry1 = ($s1 + (1 << 20)) >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - // carry3 = (s3 + (int64_t) (1L << 20)) >> 21; - // s4 += carry3; - // s3 -= carry3 * ((uint64_t) 1L << 21); - $carry3 = ($s3 + (1 << 20)) >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - // carry5 = (s5 + (int64_t) (1L << 20)) >> 21; - // s6 += carry5; - // s5 -= carry5 * ((uint64_t) 1L << 21); - $carry5 = ($s5 + (1 << 20)) >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - // carry7 = (s7 + (int64_t) (1L << 20)) >> 21; - // s8 += carry7; - // s7 -= carry7 * ((uint64_t) 1L << 21); - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - // carry9 = (s9 + (int64_t) (1L << 20)) >> 21; - // s10 += carry9; - // s9 -= carry9 * ((uint64_t) 1L << 21); - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - // carry11 = (s11 + (int64_t) (1L << 20)) >> 21; - // s12 += carry11; - // s11 -= carry11 * ((uint64_t) 1L << 21); - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - // carry13 = (s13 + (int64_t) (1L << 20)) >> 21; - // s14 += carry13; - // s13 -= carry13 * ((uint64_t) 1L << 21); - $carry13 = ($s13 + (1 << 20)) >> 21; - $s14 += $carry13; - $s13 -= $carry13 << 21; - // carry15 = (s15 + (int64_t) (1L << 20)) >> 21; - // s16 += carry15; - // s15 -= carry15 * ((uint64_t) 1L << 21); - $carry15 = ($s15 + (1 << 20)) >> 21; - $s16 += $carry15; - $s15 -= $carry15 << 21; - // carry17 = (s17 + (int64_t) (1L << 20)) >> 21; - // s18 += carry17; - // s17 -= carry17 * ((uint64_t) 1L << 21); - $carry17 = ($s17 + (1 << 20)) >> 21; - $s18 += $carry17; - $s17 -= $carry17 << 21; - // carry19 = (s19 + (int64_t) (1L << 20)) >> 21; - // s20 += carry19; - // s19 -= carry19 * ((uint64_t) 1L << 21); - $carry19 = ($s19 + (1 << 20)) >> 21; - $s20 += $carry19; - $s19 -= $carry19 << 21; - // carry21 = (s21 + (int64_t) (1L << 20)) >> 21; - // s22 += carry21; - // s21 -= carry21 * ((uint64_t) 1L << 21); - $carry21 = ($s21 + (1 << 20)) >> 21; - $s22 += $carry21; - $s21 -= $carry21 << 21; - - // s11 += s23 * 666643; - // s12 += s23 * 470296; - // s13 += s23 * 654183; - // s14 -= s23 * 997805; - // s15 += s23 * 136657; - // s16 -= s23 * 683901; - $s11 += self::mul($s23, 666643, 20); - $s12 += self::mul($s23, 470296, 19); - $s13 += self::mul($s23, 654183, 20); - $s14 -= self::mul($s23, 997805, 20); - $s15 += self::mul($s23, 136657, 18); - $s16 -= self::mul($s23, 683901, 20); - - // s10 += s22 * 666643; - // s11 += s22 * 470296; - // s12 += s22 * 654183; - // s13 -= s22 * 997805; - // s14 += s22 * 136657; - // s15 -= s22 * 683901; - $s10 += self::mul($s22, 666643, 20); - $s11 += self::mul($s22, 470296, 19); - $s12 += self::mul($s22, 654183, 20); - $s13 -= self::mul($s22, 997805, 20); - $s14 += self::mul($s22, 136657, 18); - $s15 -= self::mul($s22, 683901, 20); - - // s9 += s21 * 666643; - // s10 += s21 * 470296; - // s11 += s21 * 654183; - // s12 -= s21 * 997805; - // s13 += s21 * 136657; - // s14 -= s21 * 683901; - $s9 += self::mul($s21, 666643, 20); - $s10 += self::mul($s21, 470296, 19); - $s11 += self::mul($s21, 654183, 20); - $s12 -= self::mul($s21, 997805, 20); - $s13 += self::mul($s21, 136657, 18); - $s14 -= self::mul($s21, 683901, 20); - - // s8 += s20 * 666643; - // s9 += s20 * 470296; - // s10 += s20 * 654183; - // s11 -= s20 * 997805; - // s12 += s20 * 136657; - // s13 -= s20 * 683901; - $s8 += self::mul($s20, 666643, 20); - $s9 += self::mul($s20, 470296, 19); - $s10 += self::mul($s20, 654183, 20); - $s11 -= self::mul($s20, 997805, 20); - $s12 += self::mul($s20, 136657, 18); - $s13 -= self::mul($s20, 683901, 20); - - // s7 += s19 * 666643; - // s8 += s19 * 470296; - // s9 += s19 * 654183; - // s10 -= s19 * 997805; - // s11 += s19 * 136657; - // s12 -= s19 * 683901; - $s7 += self::mul($s19, 666643, 20); - $s8 += self::mul($s19, 470296, 19); - $s9 += self::mul($s19, 654183, 20); - $s10 -= self::mul($s19, 997805, 20); - $s11 += self::mul($s19, 136657, 18); - $s12 -= self::mul($s19, 683901, 20); - - // s6 += s18 * 666643; - // s7 += s18 * 470296; - // s8 += s18 * 654183; - // s9 -= s18 * 997805; - // s10 += s18 * 136657; - // s11 -= s18 * 683901; - $s6 += self::mul($s18, 666643, 20); - $s7 += self::mul($s18, 470296, 19); - $s8 += self::mul($s18, 654183, 20); - $s9 -= self::mul($s18, 997805, 20); - $s10 += self::mul($s18, 136657, 18); - $s11 -= self::mul($s18, 683901, 20); - - // carry6 = (s6 + (int64_t) (1L << 20)) >> 21; - // s7 += carry6; - // s6 -= carry6 * ((uint64_t) 1L << 21); - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - // carry8 = (s8 + (int64_t) (1L << 20)) >> 21; - // s9 += carry8; - // s8 -= carry8 * ((uint64_t) 1L << 21); - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - // carry10 = (s10 + (int64_t) (1L << 20)) >> 21; - // s11 += carry10; - // s10 -= carry10 * ((uint64_t) 1L << 21); - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - // carry12 = (s12 + (int64_t) (1L << 20)) >> 21; - // s13 += carry12; - // s12 -= carry12 * ((uint64_t) 1L << 21); - $carry12 = ($s12 + (1 << 20)) >> 21; - $s13 += $carry12; - $s12 -= $carry12 << 21; - // carry14 = (s14 + (int64_t) (1L << 20)) >> 21; - // s15 += carry14; - // s14 -= carry14 * ((uint64_t) 1L << 21); - $carry14 = ($s14 + (1 << 20)) >> 21; - $s15 += $carry14; - $s14 -= $carry14 << 21; - // carry16 = (s16 + (int64_t) (1L << 20)) >> 21; - // s17 += carry16; - // s16 -= carry16 * ((uint64_t) 1L << 21); - $carry16 = ($s16 + (1 << 20)) >> 21; - $s17 += $carry16; - $s16 -= $carry16 << 21; - - // carry7 = (s7 + (int64_t) (1L << 20)) >> 21; - // s8 += carry7; - // s7 -= carry7 * ((uint64_t) 1L << 21); - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - // carry9 = (s9 + (int64_t) (1L << 20)) >> 21; - // s10 += carry9; - // s9 -= carry9 * ((uint64_t) 1L << 21); - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - // carry11 = (s11 + (int64_t) (1L << 20)) >> 21; - // s12 += carry11; - // s11 -= carry11 * ((uint64_t) 1L << 21); - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - // carry13 = (s13 + (int64_t) (1L << 20)) >> 21; - // s14 += carry13; - // s13 -= carry13 * ((uint64_t) 1L << 21); - $carry13 = ($s13 + (1 << 20)) >> 21; - $s14 += $carry13; - $s13 -= $carry13 << 21; - // carry15 = (s15 + (int64_t) (1L << 20)) >> 21; - // s16 += carry15; - // s15 -= carry15 * ((uint64_t) 1L << 21); - $carry15 = ($s15 + (1 << 20)) >> 21; - $s16 += $carry15; - $s15 -= $carry15 << 21; - - // s5 += s17 * 666643; - // s6 += s17 * 470296; - // s7 += s17 * 654183; - // s8 -= s17 * 997805; - // s9 += s17 * 136657; - // s10 -= s17 * 683901; - $s5 += self::mul($s17, 666643, 20); - $s6 += self::mul($s17, 470296, 19); - $s7 += self::mul($s17, 654183, 20); - $s8 -= self::mul($s17, 997805, 20); - $s9 += self::mul($s17, 136657, 18); - $s10 -= self::mul($s17, 683901, 20); - - // s4 += s16 * 666643; - // s5 += s16 * 470296; - // s6 += s16 * 654183; - // s7 -= s16 * 997805; - // s8 += s16 * 136657; - // s9 -= s16 * 683901; - $s4 += self::mul($s16, 666643, 20); - $s5 += self::mul($s16, 470296, 19); - $s6 += self::mul($s16, 654183, 20); - $s7 -= self::mul($s16, 997805, 20); - $s8 += self::mul($s16, 136657, 18); - $s9 -= self::mul($s16, 683901, 20); - - // s3 += s15 * 666643; - // s4 += s15 * 470296; - // s5 += s15 * 654183; - // s6 -= s15 * 997805; - // s7 += s15 * 136657; - // s8 -= s15 * 683901; - $s3 += self::mul($s15, 666643, 20); - $s4 += self::mul($s15, 470296, 19); - $s5 += self::mul($s15, 654183, 20); - $s6 -= self::mul($s15, 997805, 20); - $s7 += self::mul($s15, 136657, 18); - $s8 -= self::mul($s15, 683901, 20); - - // s2 += s14 * 666643; - // s3 += s14 * 470296; - // s4 += s14 * 654183; - // s5 -= s14 * 997805; - // s6 += s14 * 136657; - // s7 -= s14 * 683901; - $s2 += self::mul($s14, 666643, 20); - $s3 += self::mul($s14, 470296, 19); - $s4 += self::mul($s14, 654183, 20); - $s5 -= self::mul($s14, 997805, 20); - $s6 += self::mul($s14, 136657, 18); - $s7 -= self::mul($s14, 683901, 20); - - // s1 += s13 * 666643; - // s2 += s13 * 470296; - // s3 += s13 * 654183; - // s4 -= s13 * 997805; - // s5 += s13 * 136657; - // s6 -= s13 * 683901; - $s1 += self::mul($s13, 666643, 20); - $s2 += self::mul($s13, 470296, 19); - $s3 += self::mul($s13, 654183, 20); - $s4 -= self::mul($s13, 997805, 20); - $s5 += self::mul($s13, 136657, 18); - $s6 -= self::mul($s13, 683901, 20); - - // s0 += s12 * 666643; - // s1 += s12 * 470296; - // s2 += s12 * 654183; - // s3 -= s12 * 997805; - // s4 += s12 * 136657; - // s5 -= s12 * 683901; - // s12 = 0; - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - $s12 = 0; - - // carry0 = (s0 + (int64_t) (1L << 20)) >> 21; - // s1 += carry0; - // s0 -= carry0 * ((uint64_t) 1L << 21); - $carry0 = ($s0 + (1 << 20)) >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - // carry2 = (s2 + (int64_t) (1L << 20)) >> 21; - // s3 += carry2; - // s2 -= carry2 * ((uint64_t) 1L << 21); - $carry2 = ($s2 + (1 << 20)) >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - // carry4 = (s4 + (int64_t) (1L << 20)) >> 21; - // s5 += carry4; - // s4 -= carry4 * ((uint64_t) 1L << 21); - $carry4 = ($s4 + (1 << 20)) >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - // carry6 = (s6 + (int64_t) (1L << 20)) >> 21; - // s7 += carry6; - // s6 -= carry6 * ((uint64_t) 1L << 21); - $carry6 = ($s6 + (1 << 20)) >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - // carry8 = (s8 + (int64_t) (1L << 20)) >> 21; - // s9 += carry8; - // s8 -= carry8 * ((uint64_t) 1L << 21); - $carry8 = ($s8 + (1 << 20)) >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - // carry10 = (s10 + (int64_t) (1L << 20)) >> 21; - // s11 += carry10; - // s10 -= carry10 * ((uint64_t) 1L << 21); - $carry10 = ($s10 + (1 << 20)) >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - - // carry1 = (s1 + (int64_t) (1L << 20)) >> 21; - // s2 += carry1; - // s1 -= carry1 * ((uint64_t) 1L << 21); - $carry1 = ($s1 + (1 << 20)) >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - // carry3 = (s3 + (int64_t) (1L << 20)) >> 21; - // s4 += carry3; - // s3 -= carry3 * ((uint64_t) 1L << 21); - $carry3 = ($s3 + (1 << 20)) >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - // carry5 = (s5 + (int64_t) (1L << 20)) >> 21; - // s6 += carry5; - // s5 -= carry5 * ((uint64_t) 1L << 21); - $carry5 = ($s5 + (1 << 20)) >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - // carry7 = (s7 + (int64_t) (1L << 20)) >> 21; - // s8 += carry7; - // s7 -= carry7 * ((uint64_t) 1L << 21); - $carry7 = ($s7 + (1 << 20)) >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - // carry9 = (s9 + (int64_t) (1L << 20)) >> 21; - // s10 += carry9; - // s9 -= carry9 * ((uint64_t) 1L << 21); - $carry9 = ($s9 + (1 << 20)) >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - // carry11 = (s11 + (int64_t) (1L << 20)) >> 21; - // s12 += carry11; - // s11 -= carry11 * ((uint64_t) 1L << 21); - $carry11 = ($s11 + (1 << 20)) >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - - // s0 += s12 * 666643; - // s1 += s12 * 470296; - // s2 += s12 * 654183; - // s3 -= s12 * 997805; - // s4 += s12 * 136657; - // s5 -= s12 * 683901; - // s12 = 0; - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - $s12 = 0; - - // carry0 = s0 >> 21; - // s1 += carry0; - // s0 -= carry0 * ((uint64_t) 1L << 21); - $carry0 = $s0 >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - // carry1 = s1 >> 21; - // s2 += carry1; - // s1 -= carry1 * ((uint64_t) 1L << 21); - $carry1 = $s1 >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - // carry2 = s2 >> 21; - // s3 += carry2; - // s2 -= carry2 * ((uint64_t) 1L << 21); - $carry2 = $s2 >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - // carry3 = s3 >> 21; - // s4 += carry3; - // s3 -= carry3 * ((uint64_t) 1L << 21); - $carry3 = $s3 >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - // carry4 = s4 >> 21; - // s5 += carry4; - // s4 -= carry4 * ((uint64_t) 1L << 21); - $carry4 = $s4 >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - // carry5 = s5 >> 21; - // s6 += carry5; - // s5 -= carry5 * ((uint64_t) 1L << 21); - $carry5 = $s5 >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - // carry6 = s6 >> 21; - // s7 += carry6; - // s6 -= carry6 * ((uint64_t) 1L << 21); - $carry6 = $s6 >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - // carry7 = s7 >> 21; - // s8 += carry7; - // s7 -= carry7 * ((uint64_t) 1L << 21); - $carry7 = $s7 >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - // carry8 = s8 >> 21; - // s9 += carry8; - // s8 -= carry8 * ((uint64_t) 1L << 21); - $carry8 = $s8 >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - // carry9 = s9 >> 21; - // s10 += carry9; - // s9 -= carry9 * ((uint64_t) 1L << 21); - $carry9 = $s9 >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - // carry10 = s10 >> 21; - // s11 += carry10; - // s10 -= carry10 * ((uint64_t) 1L << 21); - $carry10 = $s10 >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - // carry11 = s11 >> 21; - // s12 += carry11; - // s11 -= carry11 * ((uint64_t) 1L << 21); - $carry11 = $s11 >> 21; - $s12 += $carry11; - $s11 -= $carry11 << 21; - - // s0 += s12 * 666643; - // s1 += s12 * 470296; - // s2 += s12 * 654183; - // s3 -= s12 * 997805; - // s4 += s12 * 136657; - // s5 -= s12 * 683901; - $s0 += self::mul($s12, 666643, 20); - $s1 += self::mul($s12, 470296, 19); - $s2 += self::mul($s12, 654183, 20); - $s3 -= self::mul($s12, 997805, 20); - $s4 += self::mul($s12, 136657, 18); - $s5 -= self::mul($s12, 683901, 20); - - // carry0 = s0 >> 21; - // s1 += carry0; - // s0 -= carry0 * ((uint64_t) 1L << 21); - $carry0 = $s0 >> 21; - $s1 += $carry0; - $s0 -= $carry0 << 21; - // carry1 = s1 >> 21; - // s2 += carry1; - // s1 -= carry1 * ((uint64_t) 1L << 21); - $carry1 = $s1 >> 21; - $s2 += $carry1; - $s1 -= $carry1 << 21; - // carry2 = s2 >> 21; - // s3 += carry2; - // s2 -= carry2 * ((uint64_t) 1L << 21); - $carry2 = $s2 >> 21; - $s3 += $carry2; - $s2 -= $carry2 << 21; - // carry3 = s3 >> 21; - // s4 += carry3; - // s3 -= carry3 * ((uint64_t) 1L << 21); - $carry3 = $s3 >> 21; - $s4 += $carry3; - $s3 -= $carry3 << 21; - // carry4 = s4 >> 21; - // s5 += carry4; - // s4 -= carry4 * ((uint64_t) 1L << 21); - $carry4 = $s4 >> 21; - $s5 += $carry4; - $s4 -= $carry4 << 21; - // carry5 = s5 >> 21; - // s6 += carry5; - // s5 -= carry5 * ((uint64_t) 1L << 21); - $carry5 = $s5 >> 21; - $s6 += $carry5; - $s5 -= $carry5 << 21; - // carry6 = s6 >> 21; - // s7 += carry6; - // s6 -= carry6 * ((uint64_t) 1L << 21); - $carry6 = $s6 >> 21; - $s7 += $carry6; - $s6 -= $carry6 << 21; - // carry7 = s7 >> 21; - // s8 += carry7; - // s7 -= carry7 * ((uint64_t) 1L << 21); - $carry7 = $s7 >> 21; - $s8 += $carry7; - $s7 -= $carry7 << 21; - // carry8 = s8 >> 21; - // s9 += carry8; - // s8 -= carry8 * ((uint64_t) 1L << 21); - $carry8 = $s8 >> 21; - $s9 += $carry8; - $s8 -= $carry8 << 21; - // carry9 = s9 >> 21; - // s10 += carry9; - // s9 -= carry9 * ((uint64_t) 1L << 21); - $carry9 = $s9 >> 21; - $s10 += $carry9; - $s9 -= $carry9 << 21; - // carry10 = s10 >> 21; - // s11 += carry10; - // s10 -= carry10 * ((uint64_t) 1L << 21); - $carry10 = $s10 >> 21; - $s11 += $carry10; - $s10 -= $carry10 << 21; - - $s = array_fill(0, 32, 0); - // s[0] = s0 >> 0; - $s[0] = $s0 >> 0; - // s[1] = s0 >> 8; - $s[1] = $s0 >> 8; - // s[2] = (s0 >> 16) | (s1 * ((uint64_t) 1 << 5)); - $s[2] = ($s0 >> 16) | ($s1 << 5); - // s[3] = s1 >> 3; - $s[3] = $s1 >> 3; - // s[4] = s1 >> 11; - $s[4] = $s1 >> 11; - // s[5] = (s1 >> 19) | (s2 * ((uint64_t) 1 << 2)); - $s[5] = ($s1 >> 19) | ($s2 << 2); - // s[6] = s2 >> 6; - $s[6] = $s2 >> 6; - // s[7] = (s2 >> 14) | (s3 * ((uint64_t) 1 << 7)); - $s[7] = ($s2 >> 14) | ($s3 << 7); - // s[8] = s3 >> 1; - $s[8] = $s3 >> 1; - // s[9] = s3 >> 9; - $s[9] = $s3 >> 9; - // s[10] = (s3 >> 17) | (s4 * ((uint64_t) 1 << 4)); - $s[10] = ($s3 >> 17) | ($s4 << 4); - // s[11] = s4 >> 4; - $s[11] = $s4 >> 4; - // s[12] = s4 >> 12; - $s[12] = $s4 >> 12; - // s[13] = (s4 >> 20) | (s5 * ((uint64_t) 1 << 1)); - $s[13] = ($s4 >> 20) | ($s5 << 1); - // s[14] = s5 >> 7; - $s[14] = $s5 >> 7; - // s[15] = (s5 >> 15) | (s6 * ((uint64_t) 1 << 6)); - $s[15] = ($s5 >> 15) | ($s6 << 6); - // s[16] = s6 >> 2; - $s[16] = $s6 >> 2; - // s[17] = s6 >> 10; - $s[17] = $s6 >> 10; - // s[18] = (s6 >> 18) | (s7 * ((uint64_t) 1 << 3)); - $s[18] = ($s6 >> 18) | ($s7 << 3); - // s[19] = s7 >> 5; - $s[19] = $s7 >> 5; - // s[20] = s7 >> 13; - $s[20] = $s7 >> 13; - // s[21] = s8 >> 0; - $s[21] = $s8 >> 0; - // s[22] = s8 >> 8; - $s[22] = $s8 >> 8; - // s[23] = (s8 >> 16) | (s9 * ((uint64_t) 1 << 5)); - $s[23] = ($s8 >> 16) | ($s9 << 5); - // s[24] = s9 >> 3; - $s[24] = $s9 >> 3; - // s[25] = s9 >> 11; - $s[25] = $s9 >> 11; - // s[26] = (s9 >> 19) | (s10 * ((uint64_t) 1 << 2)); - $s[26] = ($s9 >> 19) | ($s10 << 2); - // s[27] = s10 >> 6; - $s[27] = $s10 >> 6; - // s[28] = (s10 >> 14) | (s11 * ((uint64_t) 1 << 7)); - $s[28] = ($s10 >> 14) | ($s11 << 7); - // s[29] = s11 >> 1; - $s[29] = $s11 >> 1; - // s[30] = s11 >> 9; - $s[30] = $s11 >> 9; - // s[31] = s11 >> 17; - $s[31] = $s11 >> 17; - return self::intArrayToString($s); - } - - /** - * @param string $s - * @return string - */ - public static function sc25519_sq($s) - { - return self::sc25519_mul($s, $s); - } - - /** - * @param string $s - * @param int $n - * @param string $a - * @return string - */ - public static function sc25519_sqmul($s, $n, $a) - { - for ($i = 0; $i < $n; ++$i) { - $s = self::sc25519_sq($s); - } - return self::sc25519_mul($s, $a); - } - - /** - * @param string $s - * @return string - */ - public static function sc25519_invert($s) - { - $_10 = self::sc25519_sq($s); - $_11 = self::sc25519_mul($s, $_10); - $_100 = self::sc25519_mul($s, $_11); - $_1000 = self::sc25519_sq($_100); - $_1010 = self::sc25519_mul($_10, $_1000); - $_1011 = self::sc25519_mul($s, $_1010); - $_10000 = self::sc25519_sq($_1000); - $_10110 = self::sc25519_sq($_1011); - $_100000 = self::sc25519_mul($_1010, $_10110); - $_100110 = self::sc25519_mul($_10000, $_10110); - $_1000000 = self::sc25519_sq($_100000); - $_1010000 = self::sc25519_mul($_10000, $_1000000); - $_1010011 = self::sc25519_mul($_11, $_1010000); - $_1100011 = self::sc25519_mul($_10000, $_1010011); - $_1100111 = self::sc25519_mul($_100, $_1100011); - $_1101011 = self::sc25519_mul($_100, $_1100111); - $_10010011 = self::sc25519_mul($_1000000, $_1010011); - $_10010111 = self::sc25519_mul($_100, $_10010011); - $_10111101 = self::sc25519_mul($_100110, $_10010111); - $_11010011 = self::sc25519_mul($_10110, $_10111101); - $_11100111 = self::sc25519_mul($_1010000, $_10010111); - $_11101011 = self::sc25519_mul($_100, $_11100111); - $_11110101 = self::sc25519_mul($_1010, $_11101011); - - $recip = self::sc25519_mul($_1011, $_11110101); - $recip = self::sc25519_sqmul($recip, 126, $_1010011); - $recip = self::sc25519_sqmul($recip, 9, $_10); - $recip = self::sc25519_mul($recip, $_11110101); - $recip = self::sc25519_sqmul($recip, 7, $_1100111); - $recip = self::sc25519_sqmul($recip, 9, $_11110101); - $recip = self::sc25519_sqmul($recip, 11, $_10111101); - $recip = self::sc25519_sqmul($recip, 8, $_11100111); - $recip = self::sc25519_sqmul($recip, 9, $_1101011); - $recip = self::sc25519_sqmul($recip, 6, $_1011); - $recip = self::sc25519_sqmul($recip, 14, $_10010011); - $recip = self::sc25519_sqmul($recip, 10, $_1100011); - $recip = self::sc25519_sqmul($recip, 9, $_10010111); - $recip = self::sc25519_sqmul($recip, 10, $_11110101); - $recip = self::sc25519_sqmul($recip, 8, $_11010011); - return self::sc25519_sqmul($recip, 8, $_11101011); - } - - /** - * @param string $s - * @return string - */ - public static function clamp($s) - { - $s_ = self::stringToIntArray($s); - $s_[0] &= 248; - $s_[31] |= 64; - $s_[31] &= 128; - return self::intArrayToString($s_); - } - - /** - * Ensure limbs are less than 28 bits long to prevent float promotion. - * - * This uses a constant-time conditional swap under the hood. - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function fe_normalize(ParagonIE_Sodium_Core_Curve25519_Fe $f) - { - $x = (PHP_INT_SIZE << 3) - 1; // 31 or 63 - - $g = self::fe_copy($f); - for ($i = 0; $i < 10; ++$i) { - $mask = -(($g[$i] >> $x) & 1); - - /* - * Get two candidate normalized values for $g[$i], depending on the sign of $g[$i]: - */ - $a = $g[$i] & 0x7ffffff; - $b = -((-$g[$i]) & 0x7ffffff); - - /* - * Return the appropriate candidate value, based on the sign of the original input: - * - * The following is equivalent to this ternary: - * - * $g[$i] = (($g[$i] >> $x) & 1) ? $a : $b; - * - * Except what's written doesn't contain timing leaks. - */ - $g[$i] = ($a ^ (($a ^ $b) & $mask)); - } - return $g; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Fe.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Fe.php deleted file mode 100644 index f3832f69..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Fe.php +++ /dev/null @@ -1,128 +0,0 @@ - - */ - protected $container = array(); - - /** - * @var int - */ - protected $size = 10; - - /** - * @internal You should not use this directly from another application - * - * @param array $array - * @param bool $save_indexes - * @return self - */ - public static function fromArray($array, $save_indexes = null) - { - $count = count($array); - if ($save_indexes) { - $keys = array_keys($array); - } else { - $keys = range(0, $count - 1); - } - $array = array_values($array); - /** @var array $keys */ - - $obj = new ParagonIE_Sodium_Core_Curve25519_Fe(); - if ($save_indexes) { - for ($i = 0; $i < $count; ++$i) { - $obj->offsetSet($keys[$i], $array[$i]); - } - } else { - for ($i = 0; $i < $count; ++$i) { - $obj->offsetSet($i, $array[$i]); - } - } - return $obj; - } - - /** - * @internal You should not use this directly from another application - * - * @param int|null $offset - * @param int $value - * @return void - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (!is_int($value)) { - throw new InvalidArgumentException('Expected an integer'); - } - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return bool - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return void - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return int - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - if (!isset($this->container[$offset])) { - $this->container[$offset] = 0; - } - return (int) ($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @return array - */ - public function __debugInfo() - { - return array(implode(', ', $this->container)); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php deleted file mode 100644 index c84bcb1f..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php +++ /dev/null @@ -1,66 +0,0 @@ -YplusX = $YplusX; - if ($YminusX === null) { - $YminusX = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->YminusX = $YminusX; - if ($Z === null) { - $Z = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Z = $Z; - if ($T2d === null) { - $T2d = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->T2d = $T2d; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php deleted file mode 100644 index 93c0909a..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php +++ /dev/null @@ -1,65 +0,0 @@ -X = $x; - if ($y === null) { - $y = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Y = $y; - if ($z === null) { - $z = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Z = $z; - if ($t === null) { - $t = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->T = $t; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php deleted file mode 100644 index 6d1c5416..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php +++ /dev/null @@ -1,55 +0,0 @@ -X = $x; - if ($y === null) { - $y = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Y = $y; - if ($z === null) { - $z = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Z = $z; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php deleted file mode 100644 index 52920000..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php +++ /dev/null @@ -1,66 +0,0 @@ -X = $x; - if ($y === null) { - $y = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Y = $y; - if ($z === null) { - $z = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->Z = $z; - if ($t === null) { - $t = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->T = $t; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php deleted file mode 100644 index 7540bf7e..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php +++ /dev/null @@ -1,55 +0,0 @@ -yplusx = $yplusx; - if ($yminusx === null) { - $yminusx = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->yminusx = $yminusx; - if ($xy2d === null) { - $xy2d = new ParagonIE_Sodium_Core_Curve25519_Fe(); - } - $this->xy2d = $xy2d; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/H.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/H.php deleted file mode 100644 index 186d05f5..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Curve25519/H.php +++ /dev/null @@ -1,1550 +0,0 @@ ->>> Basically, int[32][8][3][10] - */ - protected static $base = array( - array( - array( - array(25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605), - array(-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378), - array(-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546), - ), - array( - array(-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303), - array(-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081), - array(26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697), - ), - array( - array(15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024), - array(16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574), - array(30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357), - ), - array( - array(-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540), - array(23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397), - array(7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325), - ), - array( - array(10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380), - array(4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306), - array(19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942), - ), - array( - array(-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777), - array(-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737), - array(-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652), - ), - array( - array(5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766), - array(-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701), - array(28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300), - ), - array( - array(14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726), - array(-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955), - array(27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425), - ), - ), - array( - array( - array(-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171), - array(27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510), - array(17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660), - ), - array( - array(-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639), - array(29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963), - array(5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950), - ), - array( - array(-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568), - array(12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335), - array(25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628), - ), - array( - array(-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007), - array(-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772), - array(-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653), - ), - array( - array(2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567), - array(13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686), - array(21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372), - ), - array( - array(-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887), - array(-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954), - array(-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953), - ), - array( - array(24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833), - array(-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532), - array(-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876), - ), - array( - array(2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268), - array(33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214), - array(1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038), - ), - ), - array( - array( - array(6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800), - array(4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645), - array(-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664), - ), - array( - array(1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933), - array(-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182), - array(-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222), - ), - array( - array(-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991), - array(20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880), - array(9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092), - ), - array( - array(-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295), - array(19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788), - array(8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553), - ), - array( - array(-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026), - array(11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347), - array(-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033), - ), - array( - array(-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395), - array(-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278), - array(1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890), - ), - array( - array(32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995), - array(-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596), - array(-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891), - ), - array( - array(31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060), - array(11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608), - array(-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606), - ), - ), - array( - array( - array(7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389), - array(-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016), - array(-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341), - ), - array( - array(-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505), - array(14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553), - array(-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655), - ), - array( - array(15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220), - array(12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631), - array(-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099), - ), - array( - array(26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556), - array(14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749), - array(236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930), - ), - array( - array(1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391), - array(5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253), - array(20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066), - ), - array( - array(24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958), - array(-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082), - array(-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383), - ), - array( - array(-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521), - array(-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807), - array(23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948), - ), - array( - array(9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134), - array(-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455), - array(27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629), - ), - ), - array( - array( - array(-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069), - array(-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746), - array(24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919), - ), - array( - array(11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837), - array(8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906), - array(-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771), - ), - array( - array(-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817), - array(10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098), - array(10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409), - ), - array( - array(-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504), - array(-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727), - array(28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420), - ), - array( - array(-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003), - array(-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605), - array(-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384), - ), - array( - array(-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701), - array(-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683), - array(29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708), - ), - array( - array(-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563), - array(-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260), - array(-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387), - ), - array( - array(-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672), - array(23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686), - array(-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665), - ), - ), - array( - array( - array(11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182), - array(-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277), - array(14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628), - ), - array( - array(-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474), - array(-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539), - array(-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822), - ), - array( - array(-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970), - array(19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756), - array(-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508), - ), - array( - array(-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683), - array(-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655), - array(-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158), - ), - array( - array(-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125), - array(-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839), - array(-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664), - ), - array( - array(27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294), - array(-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899), - array(-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070), - ), - array( - array(3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294), - array(-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949), - array(-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083), - ), - array( - array(31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420), - array(-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940), - array(29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396), - ), - ), - array( - array( - array(-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567), - array(20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127), - array(-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294), - ), - array( - array(-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887), - array(22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964), - array(16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195), - ), - array( - array(9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244), - array(24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999), - array(-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762), - ), - array( - array(-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274), - array(-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236), - array(-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605), - ), - array( - array(-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761), - array(-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884), - array(-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482), - ), - array( - array(-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638), - array(-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490), - array(-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170), - ), - array( - array(5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736), - array(10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124), - array(-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392), - ), - array( - array(8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029), - array(6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048), - array(28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958), - ), - ), - array( - array( - array(24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593), - array(26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071), - array(-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692), - ), - array( - array(11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687), - array(-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441), - array(-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001), - ), - array( - array(-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460), - array(-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007), - array(-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762), - ), - array( - array(15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005), - array(-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674), - array(4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035), - ), - array( - array(7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590), - array(-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957), - array(-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812), - ), - array( - array(33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740), - array(-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122), - array(-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158), - ), - array( - array(8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885), - array(26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140), - array(19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857), - ), - array( - array(801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155), - array(19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260), - array(19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483), - ), - ), - array( - array( - array(-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677), - array(32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815), - array(22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751), - ), - array( - array(-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203), - array(-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208), - array(1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230), - ), - array( - array(16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850), - array(-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389), - array(-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968), - ), - array( - array(-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689), - array(14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880), - array(5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304), - ), - array( - array(30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632), - array(-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412), - array(20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566), - ), - array( - array(-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038), - array(-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232), - array(-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943), - ), - array( - array(17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856), - array(23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738), - array(15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971), - ), - array( - array(-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718), - array(-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697), - array(-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883), - ), - ), - array( - array( - array(5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912), - array(-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358), - array(3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849), - ), - array( - array(29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307), - array(-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977), - array(-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335), - ), - array( - array(-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644), - array(-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616), - array(-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735), - ), - array( - array(-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099), - array(29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341), - array(-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336), - ), - array( - array(-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646), - array(31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425), - array(-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388), - ), - array( - array(-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743), - array(-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822), - array(-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462), - ), - array( - array(18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985), - array(9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702), - array(-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797), - ), - array( - array(21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293), - array(27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100), - array(19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688), - ), - ), - array( - array( - array(12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186), - array(2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610), - array(-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707), - ), - array( - array(7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220), - array(915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025), - array(32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044), - ), - array( - array(32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992), - array(-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027), - array(21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197), - ), - array( - array(8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901), - array(31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952), - array(19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878), - ), - array( - array(-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390), - array(32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730), - array(2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730), - ), - array( - array(-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180), - array(-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272), - array(-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715), - ), - array( - array(-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970), - array(-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772), - array(-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865), - ), - array( - array(15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750), - array(20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373), - array(32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348), - ), - ), - array( - array( - array(9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144), - array(-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195), - array(5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086), - ), - array( - array(-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684), - array(-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518), - array(-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233), - ), - array( - array(-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793), - array(-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794), - array(580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435), - ), - array( - array(23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921), - array(13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518), - array(2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563), - ), - array( - array(14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278), - array(-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024), - array(4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030), - ), - array( - array(10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783), - array(27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717), - array(6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844), - ), - array( - array(14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333), - array(16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048), - array(22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760), - ), - array( - array(-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760), - array(-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757), - array(-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112), - ), - ), - array( - array( - array(-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468), - array(3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184), - array(10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289), - ), - array( - array(15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066), - array(24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882), - array(13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226), - ), - array( - array(16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101), - array(29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279), - array(-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811), - ), - array( - array(27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709), - array(20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714), - array(-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121), - ), - array( - array(9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464), - array(12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847), - array(13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400), - ), - array( - array(4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414), - array(-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158), - array(17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045), - ), - array( - array(-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415), - array(-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459), - array(-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079), - ), - array( - array(21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412), - array(-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743), - array(-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836), - ), - ), - array( - array( - array(12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022), - array(18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429), - array(-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065), - ), - array( - array(30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861), - array(10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000), - array(-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101), - ), - array( - array(32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815), - array(29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642), - array(10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966), - ), - array( - array(25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574), - array(-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742), - array(-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689), - ), - array( - array(12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020), - array(-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772), - array(3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982), - ), - array( - array(-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953), - array(-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218), - array(-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265), - ), - array( - array(29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073), - array(-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325), - array(-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798), - ), - array( - array(-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870), - array(-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863), - array(-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927), - ), - ), - array( - array( - array(-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267), - array(-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663), - array(22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862), - ), - array( - array(-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673), - array(15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943), - array(15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020), - ), - array( - array(-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238), - array(11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064), - array(14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795), - ), - array( - array(15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052), - array(-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904), - array(29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531), - ), - array( - array(-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979), - array(-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841), - array(10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431), - ), - array( - array(10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324), - array(-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940), - array(10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320), - ), - array( - array(-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184), - array(14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114), - array(30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878), - ), - array( - array(12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784), - array(-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091), - array(-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585), - ), - ), - array( - array( - array(-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208), - array(10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864), - array(17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661), - ), - array( - array(7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233), - array(26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212), - array(-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525), - ), - array( - array(-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068), - array(9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397), - array(-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988), - ), - array( - array(5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889), - array(32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038), - array(14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697), - ), - array( - array(20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875), - array(-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905), - array(-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656), - ), - array( - array(11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818), - array(27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714), - array(10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203), - ), - array( - array(20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931), - array(-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024), - array(-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084), - ), - array( - array(-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204), - array(20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817), - array(27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667), - ), - ), - array( - array( - array(11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504), - array(-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768), - array(-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255), - ), - array( - array(6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790), - array(1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438), - array(-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333), - ), - array( - array(17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971), - array(31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905), - array(29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409), - ), - array( - array(12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409), - array(6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499), - array(-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363), - ), - array( - array(28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664), - array(-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324), - array(-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940), - ), - array( - array(13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990), - array(-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914), - array(-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290), - ), - array( - array(24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257), - array(-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433), - array(-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236), - ), - array( - array(-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045), - array(11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093), - array(-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347), - ), - ), - array( - array( - array(-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191), - array(-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507), - array(-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906), - ), - array( - array(3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018), - array(-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109), - array(-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926), - ), - array( - array(-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528), - array(8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625), - array(-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286), - ), - array( - array(2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033), - array(27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866), - array(21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896), - ), - array( - array(30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075), - array(26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347), - array(-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437), - ), - array( - array(-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165), - array(-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588), - array(-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193), - ), - array( - array(-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017), - array(-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883), - array(21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961), - ), - array( - array(8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043), - array(29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663), - array(-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362), - ), - ), - array( - array( - array(-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860), - array(2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466), - array(-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063), - ), - array( - array(-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997), - array(-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295), - array(-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369), - ), - array( - array(9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385), - array(18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109), - array(2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906), - ), - array( - array(4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424), - array(-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185), - array(7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962), - ), - array( - array(-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325), - array(10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593), - array(696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404), - ), - array( - array(-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644), - array(17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801), - array(26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804), - ), - array( - array(-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884), - array(-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577), - array(-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849), - ), - array( - array(32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473), - array(-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644), - array(-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319), - ), - ), - array( - array( - array(-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599), - array(-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768), - array(-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084), - ), - array( - array(-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328), - array(-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369), - array(20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920), - ), - array( - array(12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815), - array(-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025), - array(-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397), - ), - array( - array(-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448), - array(6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981), - array(30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165), - ), - array( - array(32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501), - array(17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073), - array(-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861), - ), - array( - array(14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845), - array(-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211), - array(18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870), - ), - array( - array(10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096), - array(33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803), - array(-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168), - ), - array( - array(30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965), - array(-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505), - array(18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598), - ), - ), - array( - array( - array(5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782), - array(5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900), - array(-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479), - ), - array( - array(-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208), - array(8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232), - array(17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719), - ), - array( - array(16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271), - array(-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326), - array(-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132), - ), - array( - array(14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300), - array(8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570), - array(15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670), - ), - array( - array(-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994), - array(-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913), - array(31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317), - ), - array( - array(-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730), - array(842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096), - array(-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078), - ), - array( - array(-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411), - array(-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905), - array(-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654), - ), - array( - array(-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870), - array(-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498), - array(12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579), - ), - ), - array( - array( - array(14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677), - array(10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647), - array(-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743), - ), - array( - array(-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468), - array(21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375), - array(-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155), - ), - array( - array(6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725), - array(-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612), - array(-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943), - ), - array( - array(-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944), - array(30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928), - array(9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406), - ), - array( - array(22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139), - array(-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963), - array(-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693), - ), - array( - array(1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734), - array(-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680), - array(-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410), - ), - array( - array(-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931), - array(-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654), - array(22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710), - ), - array( - array(29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180), - array(-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684), - array(-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895), - ), - ), - array( - array( - array(22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501), - array(-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413), - array(6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880), - ), - array( - array(-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874), - array(22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962), - array(-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899), - ), - array( - array(21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152), - array(9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063), - array(7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080), - ), - array( - array(-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146), - array(-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183), - array(-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133), - ), - array( - array(-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421), - array(-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622), - array(-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197), - ), - array( - array(2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663), - array(31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753), - array(4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755), - ), - array( - array(-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862), - array(-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118), - array(26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171), - ), - array( - array(15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380), - array(16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824), - array(28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270), - ), - ), - array( - array( - array(-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438), - array(-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584), - array(-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562), - ), - array( - array(30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471), - array(18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610), - array(19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269), - ), - array( - array(-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650), - array(14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369), - array(19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461), - ), - array( - array(30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462), - array(-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793), - array(-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218), - ), - array( - array(-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226), - array(18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019), - array(-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037), - ), - array( - array(31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171), - array(-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132), - array(-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841), - ), - array( - array(21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181), - array(-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210), - array(-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040), - ), - array( - array(3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935), - array(24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105), - array(-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814), - ), - ), - array( - array( - array(793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852), - array(5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581), - array(-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646), - ), - array( - array(10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844), - array(10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025), - array(27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453), - ), - array( - array(-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068), - array(4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192), - array(-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921), - ), - array( - array(-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259), - array(-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426), - array(-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072), - ), - array( - array(-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305), - array(13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832), - array(28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943), - ), - array( - array(-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011), - array(24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447), - array(17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494), - ), - array( - array(-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245), - array(-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859), - array(28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915), - ), - array( - array(16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707), - array(10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848), - array(-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224), - ), - ), - array( - array( - array(-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391), - array(15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215), - array(-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101), - ), - array( - array(23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713), - array(21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849), - array(-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930), - ), - array( - array(-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940), - array(-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031), - array(-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404), - ), - array( - array(-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243), - array(-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116), - array(-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525), - ), - array( - array(-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509), - array(-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883), - array(15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865), - ), - array( - array(-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660), - array(4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273), - array(-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138), - ), - array( - array(-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560), - array(-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135), - array(2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941), - ), - array( - array(-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739), - array(18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756), - array(-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819), - ), - ), - array( - array( - array(-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347), - array(-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028), - array(21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075), - ), - array( - array(16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799), - array(-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609), - array(-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817), - ), - array( - array(-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989), - array(-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523), - array(4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278), - ), - array( - array(31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045), - array(19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377), - array(24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480), - ), - array( - array(17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016), - array(510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426), - array(18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525), - ), - array( - array(13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396), - array(9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080), - array(12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892), - ), - array( - array(15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275), - array(11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074), - array(20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140), - ), - array( - array(-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717), - array(-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101), - array(24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127), - ), - ), - array( - array( - array(-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632), - array(-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415), - array(-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160), - ), - array( - array(31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876), - array(22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625), - array(-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478), - ), - array( - array(27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164), - array(26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595), - array(-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248), - ), - array( - array(-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858), - array(15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193), - array(8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184), - ), - array( - array(-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942), - array(-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635), - array(21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948), - ), - array( - array(11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935), - array(-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415), - array(-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416), - ), - array( - array(-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018), - array(4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778), - array(366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659), - ), - array( - array(-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385), - array(18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503), - array(476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329), - ), - ), - array( - array( - array(20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056), - array(-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838), - array(24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948), - ), - array( - array(-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691), - array(-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118), - array(-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517), - ), - array( - array(-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269), - array(-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904), - array(-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589), - ), - array( - array(-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193), - array(-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910), - array(-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930), - ), - array( - array(-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667), - array(25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481), - array(-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876), - ), - array( - array(22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640), - array(-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278), - array(-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112), - ), - array( - array(26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272), - array(17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012), - array(-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221), - ), - array( - array(30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046), - array(13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345), - array(-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310), - ), - ), - array( - array( - array(19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937), - array(31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636), - array(-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008), - ), - array( - array(-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429), - array(-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576), - array(31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066), - ), - array( - array(-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490), - array(-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104), - array(33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053), - ), - array( - array(31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275), - array(-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511), - array(22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095), - ), - array( - array(-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439), - array(23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939), - array(-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424), - ), - array( - array(2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310), - array(3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608), - array(-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079), - ), - array( - array(-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101), - array(21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418), - array(18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576), - ), - array( - array(30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356), - array(9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996), - array(-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099), - ), - ), - array( - array( - array(-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728), - array(-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658), - array(-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242), - ), - array( - array(-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001), - array(-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766), - array(18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373), - ), - array( - array(26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458), - array(-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628), - array(-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657), - ), - array( - array(-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062), - array(25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616), - array(31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014), - ), - array( - array(24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383), - array(-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814), - array(-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718), - ), - array( - array(30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417), - array(2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222), - array(33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444), - ), - array( - array(-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597), - array(23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970), - array(1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799), - ), - array( - array(-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647), - array(13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511), - array(-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032), - ), - ), - array( - array( - array(9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834), - array(-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461), - array(29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062), - ), - array( - array(-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516), - array(-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547), - array(-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240), - ), - array( - array(-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038), - array(-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741), - array(16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103), - ), - array( - array(-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747), - array(-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323), - array(31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016), - ), - array( - array(-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373), - array(15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228), - array(-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141), - ), - array( - array(16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399), - array(11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831), - array(-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376), - ), - array( - array(-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313), - array(-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958), - array(-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577), - ), - array( - array(-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743), - array(29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684), - array(-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476), - ), - ) - ); - - /** - * See: libsodium's crypto_core/curve25519/ref10/base2.h - * - * @var array basically int[8][3] - */ - protected static $base2 = array( - array( - array(25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605), - array(-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378), - array(-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546), - ), - array( - array(15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024), - array(16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574), - array(30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357), - ), - array( - array(10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380), - array(4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306), - array(19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942), - ), - array( - array(5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766), - array(-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701), - array(28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300), - ), - array( - array(-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877), - array(-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951), - array(4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784), - ), - array( - array(-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436), - array(25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918), - array(23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877), - ), - array( - array(-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800), - array(-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305), - array(-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300), - ), - array( - array(-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876), - array(-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619), - array(-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683), - ) - ); - - /** - * 37095705934669439343138083508754565189542113879843219016388785533085940283555 - * - * @var array - */ - protected static $d = array( - -10913610, - 13857413, - -15372611, - 6949391, - 114729, - -8787816, - -6275908, - -3247719, - -18696448, - -12055116 - ); - - /** - * 2 * d = 16295367250680780974490674513165176452449235426866156013048779062215315747161 - * - * @var array - */ - protected static $d2 = array( - -21827239, - -5839606, - -30745221, - 13898782, - 229458, - 15978800, - -12551817, - -6495438, - 29715968, - 9444199 - ); - - /** - * sqrt(-1) - * - * @var array - */ - protected static $sqrtm1 = array( - -32595792, - -7943725, - 9377950, - 3500415, - 12389472, - -272473, - -25146209, - -2005654, - 326686, - 11406482 - ); - - /** - * 1 / sqrt(a - d) - * - * @var array - */ - protected static $invsqrtamd = array( - 6111485, - 4156064, - -27798727, - 12243468, - -25904040, - 120897, - 20826367, - -7060776, - 6093568, - -1986012 - ); - - /** - * sqrt(ad - 1) with a = -1 (mod p) - * - * @var array - */ - protected static $sqrtadm1 = array( - 24849947, - -153582, - -23613485, - 6347715, - -21072328, - -667138, - -25271143, - -15367704, - -870347, - 14525639 - ); - - /** - * 1 - d ^ 2 - * - * @var array - */ - protected static $onemsqd = array( - 6275446, - -16617371, - -22938544, - -3773710, - 11667077, - 7397348, - -27922721, - 1766195, - -24433858, - 672203 - ); - - /** - * (d - 1) ^ 2 - * @var array - */ - protected static $sqdmone = array( - 15551795, - -11097455, - -13425098, - -10125071, - -11896535, - 10178284, - -26634327, - 4729244, - -5282110, - -10116402 - ); - - - /* - * 2^252+27742317777372353535851937790883648493 - static const unsigned char L[] = { - 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, - 0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 - }; - */ - const L = "\xed\xd3\xf5\x5c\x1a\x63\x12\x58\xd6\x9c\xf7\xa2\xde\xf9\xde\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10"; -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Ed25519.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Ed25519.php deleted file mode 100644 index fca6e7c7..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Ed25519.php +++ /dev/null @@ -1,555 +0,0 @@ -X)) { - throw new SodiumException('Unexpected zero result'); - } - - # fe_1(one_minus_y); - # fe_sub(one_minus_y, one_minus_y, A.Y); - # fe_invert(one_minus_y, one_minus_y); - $one_minux_y = self::fe_invert( - self::fe_sub( - self::fe_1(), - $A->Y - ) - ); - - # fe_1(x); - # fe_add(x, x, A.Y); - # fe_mul(x, x, one_minus_y); - $x = self::fe_mul( - self::fe_add(self::fe_1(), $A->Y), - $one_minux_y - ); - - # fe_tobytes(curve25519_pk, x); - return self::fe_tobytes($x); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sk_to_pk($sk) - { - return self::ge_p3_tobytes( - self::ge_scalarmult_base( - self::substr($sk, 0, 32) - ) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign($message, $sk) - { - /** @var string $signature */ - $signature = self::sign_detached($message, $sk); - return $signature . $message; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message A signed message - * @param string $pk Public key - * @return string Message (without signature) - * @throws SodiumException - * @throws TypeError - */ - public static function sign_open($message, $pk) - { - /** @var string $signature */ - $signature = self::substr($message, 0, 64); - - /** @var string $message */ - $message = self::substr($message, 64); - - if (self::verify_detached($signature, $message, $pk)) { - return $message; - } - throw new SodiumException('Invalid signature'); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign_detached($message, $sk) - { - # crypto_hash_sha512(az, sk, 32); - $az = hash('sha512', self::substr($sk, 0, 32), true); - - # az[0] &= 248; - # az[31] &= 63; - # az[31] |= 64; - $az[0] = self::intToChr(self::chrToInt($az[0]) & 248); - $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64); - - # crypto_hash_sha512_init(&hs); - # crypto_hash_sha512_update(&hs, az + 32, 32); - # crypto_hash_sha512_update(&hs, m, mlen); - # crypto_hash_sha512_final(&hs, nonce); - $hs = hash_init('sha512'); - hash_update($hs, self::substr($az, 32, 32)); - hash_update($hs, $message); - $nonceHash = hash_final($hs, true); - - # memmove(sig + 32, sk + 32, 32); - $pk = self::substr($sk, 32, 32); - - # sc_reduce(nonce); - # ge_scalarmult_base(&R, nonce); - # ge_p3_tobytes(sig, &R); - $nonce = self::sc_reduce($nonceHash) . self::substr($nonceHash, 32); - $sig = self::ge_p3_tobytes( - self::ge_scalarmult_base($nonce) - ); - - # crypto_hash_sha512_init(&hs); - # crypto_hash_sha512_update(&hs, sig, 64); - # crypto_hash_sha512_update(&hs, m, mlen); - # crypto_hash_sha512_final(&hs, hram); - $hs = hash_init('sha512'); - hash_update($hs, self::substr($sig, 0, 32)); - hash_update($hs, self::substr($pk, 0, 32)); - hash_update($hs, $message); - $hramHash = hash_final($hs, true); - - # sc_reduce(hram); - # sc_muladd(sig + 32, hram, az, nonce); - $hram = self::sc_reduce($hramHash); - $sigAfter = self::sc_muladd($hram, $az, $nonce); - $sig = self::substr($sig, 0, 32) . self::substr($sigAfter, 0, 32); - - try { - ParagonIE_Sodium_Compat::memzero($az); - } catch (SodiumException $ex) { - $az = null; - } - return $sig; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $sig - * @param string $message - * @param string $pk - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function verify_detached($sig, $message, $pk) - { - if (self::strlen($sig) < 64) { - throw new SodiumException('Signature is too short'); - } - if ((self::chrToInt($sig[63]) & 240) && self::check_S_lt_L(self::substr($sig, 32, 32))) { - throw new SodiumException('S < L - Invalid signature'); - } - if (self::small_order($sig)) { - throw new SodiumException('Signature is on too small of an order'); - } - if ((self::chrToInt($sig[63]) & 224) !== 0) { - throw new SodiumException('Invalid signature'); - } - $d = 0; - for ($i = 0; $i < 32; ++$i) { - $d |= self::chrToInt($pk[$i]); - } - if ($d === 0) { - throw new SodiumException('All zero public key'); - } - - /** @var bool The original value of ParagonIE_Sodium_Compat::$fastMult */ - $orig = ParagonIE_Sodium_Compat::$fastMult; - - // Set ParagonIE_Sodium_Compat::$fastMult to true to speed up verification. - ParagonIE_Sodium_Compat::$fastMult = true; - - /** @var ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A */ - $A = self::ge_frombytes_negate_vartime($pk); - - /** @var string $hDigest */ - $hDigest = hash( - 'sha512', - self::substr($sig, 0, 32) . - self::substr($pk, 0, 32) . - $message, - true - ); - - /** @var string $h */ - $h = self::sc_reduce($hDigest) . self::substr($hDigest, 32); - - /** @var ParagonIE_Sodium_Core_Curve25519_Ge_P2 $R */ - $R = self::ge_double_scalarmult_vartime( - $h, - $A, - self::substr($sig, 32) - ); - - /** @var string $rcheck */ - $rcheck = self::ge_tobytes($R); - - // Reset ParagonIE_Sodium_Compat::$fastMult to what it was before. - ParagonIE_Sodium_Compat::$fastMult = $orig; - - return self::verify_32($rcheck, self::substr($sig, 0, 32)); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $S - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function check_S_lt_L($S) - { - if (self::strlen($S) < 32) { - throw new SodiumException('Signature must be 32 bytes'); - } - $L = array( - 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, - 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 - ); - $c = 0; - $n = 1; - $i = 32; - - /** @var array $L */ - do { - --$i; - $x = self::chrToInt($S[$i]); - $c |= ( - (($x - $L[$i]) >> 8) & $n - ); - $n &= ( - (($x ^ $L[$i]) - 1) >> 8 - ); - } while ($i !== 0); - - return $c === 0; - } - - /** - * @param string $R - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function small_order($R) - { - /** @var array> $blocklist */ - $blocklist = array( - /* 0 (order 4) */ - array( - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - ), - /* 1 (order 1) */ - array( - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - ), - /* 2707385501144840649318225287225658788936804267575313519463743609750303402022 (order 8) */ - array( - 0x26, 0xe8, 0x95, 0x8f, 0xc2, 0xb2, 0x27, 0xb0, - 0x45, 0xc3, 0xf4, 0x89, 0xf2, 0xef, 0x98, 0xf0, - 0xd5, 0xdf, 0xac, 0x05, 0xd3, 0xc6, 0x33, 0x39, - 0xb1, 0x38, 0x02, 0x88, 0x6d, 0x53, 0xfc, 0x05 - ), - /* 55188659117513257062467267217118295137698188065244968500265048394206261417927 (order 8) */ - array( - 0xc7, 0x17, 0x6a, 0x70, 0x3d, 0x4d, 0xd8, 0x4f, - 0xba, 0x3c, 0x0b, 0x76, 0x0d, 0x10, 0x67, 0x0f, - 0x2a, 0x20, 0x53, 0xfa, 0x2c, 0x39, 0xcc, 0xc6, - 0x4e, 0xc7, 0xfd, 0x77, 0x92, 0xac, 0x03, 0x7a - ), - /* p-1 (order 2) */ - array( - 0x13, 0xe8, 0x95, 0x8f, 0xc2, 0xb2, 0x27, 0xb0, - 0x45, 0xc3, 0xf4, 0x89, 0xf2, 0xef, 0x98, 0xf0, - 0xd5, 0xdf, 0xac, 0x05, 0xd3, 0xc6, 0x33, 0x39, - 0xb1, 0x38, 0x02, 0x88, 0x6d, 0x53, 0xfc, 0x85 - ), - /* p (order 4) */ - array( - 0xb4, 0x17, 0x6a, 0x70, 0x3d, 0x4d, 0xd8, 0x4f, - 0xba, 0x3c, 0x0b, 0x76, 0x0d, 0x10, 0x67, 0x0f, - 0x2a, 0x20, 0x53, 0xfa, 0x2c, 0x39, 0xcc, 0xc6, - 0x4e, 0xc7, 0xfd, 0x77, 0x92, 0xac, 0x03, 0xfa - ), - /* p+1 (order 1) */ - array( - 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f - ), - /* p+2707385501144840649318225287225658788936804267575313519463743609750303402022 (order 8) */ - array( - 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f - ), - /* p+55188659117513257062467267217118295137698188065244968500265048394206261417927 (order 8) */ - array( - 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f - ), - /* 2p-1 (order 2) */ - array( - 0xd9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - ), - /* 2p (order 4) */ - array( - 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - ), - /* 2p+1 (order 1) */ - array( - 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - ) - ); - /** @var int $countBlocklist */ - $countBlocklist = count($blocklist); - - for ($i = 0; $i < $countBlocklist; ++$i) { - $c = 0; - for ($j = 0; $j < 32; ++$j) { - $c |= self::chrToInt($R[$j]) ^ (int) $blocklist[$i][$j]; - } - if ($c === 0) { - return true; - } - } - return false; - } - - /** - * @param string $s - * @return string - * @throws SodiumException - */ - public static function scalar_complement($s) - { - $t_ = self::L . str_repeat("\x00", 32); - sodium_increment($t_); - $s_ = $s . str_repeat("\x00", 32); - ParagonIE_Sodium_Compat::sub($t_, $s_); - return self::sc_reduce($t_); - } - - /** - * @return string - * @throws SodiumException - */ - public static function scalar_random() - { - do { - $r = ParagonIE_Sodium_Compat::randombytes_buf(self::SCALAR_BYTES); - $r[self::SCALAR_BYTES - 1] = self::intToChr( - self::chrToInt($r[self::SCALAR_BYTES - 1]) & 0x1f - ); - } while ( - !self::check_S_lt_L($r) || ParagonIE_Sodium_Compat::is_zero($r) - ); - return $r; - } - - /** - * @param string $s - * @return string - * @throws SodiumException - */ - public static function scalar_negate($s) - { - $t_ = self::L . str_repeat("\x00", 32) ; - $s_ = $s . str_repeat("\x00", 32) ; - ParagonIE_Sodium_Compat::sub($t_, $s_); - return self::sc_reduce($t_); - } - - /** - * @param string $a - * @param string $b - * @return string - * @throws SodiumException - */ - public static function scalar_add($a, $b) - { - $a_ = $a . str_repeat("\x00", 32); - $b_ = $b . str_repeat("\x00", 32); - ParagonIE_Sodium_Compat::add($a_, $b_); - return self::sc_reduce($a_); - } - - /** - * @param string $x - * @param string $y - * @return string - * @throws SodiumException - */ - public static function scalar_sub($x, $y) - { - $yn = self::scalar_negate($y); - return self::scalar_add($x, $yn); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/HChaCha20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/HChaCha20.php deleted file mode 100644 index bc2efe7c..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/HChaCha20.php +++ /dev/null @@ -1,109 +0,0 @@ - 0; $i -= 2) { - $x4 ^= self::rotate($x0 + $x12, 7); - $x8 ^= self::rotate($x4 + $x0, 9); - $x12 ^= self::rotate($x8 + $x4, 13); - $x0 ^= self::rotate($x12 + $x8, 18); - $x9 ^= self::rotate($x5 + $x1, 7); - $x13 ^= self::rotate($x9 + $x5, 9); - $x1 ^= self::rotate($x13 + $x9, 13); - $x5 ^= self::rotate($x1 + $x13, 18); - $x14 ^= self::rotate($x10 + $x6, 7); - $x2 ^= self::rotate($x14 + $x10, 9); - $x6 ^= self::rotate($x2 + $x14, 13); - $x10 ^= self::rotate($x6 + $x2, 18); - $x3 ^= self::rotate($x15 + $x11, 7); - $x7 ^= self::rotate($x3 + $x15, 9); - $x11 ^= self::rotate($x7 + $x3, 13); - $x15 ^= self::rotate($x11 + $x7, 18); - $x1 ^= self::rotate($x0 + $x3, 7); - $x2 ^= self::rotate($x1 + $x0, 9); - $x3 ^= self::rotate($x2 + $x1, 13); - $x0 ^= self::rotate($x3 + $x2, 18); - $x6 ^= self::rotate($x5 + $x4, 7); - $x7 ^= self::rotate($x6 + $x5, 9); - $x4 ^= self::rotate($x7 + $x6, 13); - $x5 ^= self::rotate($x4 + $x7, 18); - $x11 ^= self::rotate($x10 + $x9, 7); - $x8 ^= self::rotate($x11 + $x10, 9); - $x9 ^= self::rotate($x8 + $x11, 13); - $x10 ^= self::rotate($x9 + $x8, 18); - $x12 ^= self::rotate($x15 + $x14, 7); - $x13 ^= self::rotate($x12 + $x15, 9); - $x14 ^= self::rotate($x13 + $x12, 13); - $x15 ^= self::rotate($x14 + $x13, 18); - } - - return self::store32_le($x0) . - self::store32_le($x5) . - self::store32_le($x10) . - self::store32_le($x15) . - self::store32_le($x6) . - self::store32_le($x7) . - self::store32_le($x8) . - self::store32_le($x9); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Poly1305.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Poly1305.php deleted file mode 100644 index 14f13c44..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Poly1305.php +++ /dev/null @@ -1,64 +0,0 @@ -update($m) - ->finish(); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $mac - * @param string $m - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function onetimeauth_verify($mac, $m, $key) - { - if (self::strlen($key) < 32) { - throw new InvalidArgumentException( - 'Key must be 32 bytes long.' - ); - } - $state = new ParagonIE_Sodium_Core_Poly1305_State( - self::substr($key, 0, 32) - ); - $calc = $state - ->update($m) - ->finish(); - return self::verify_16($calc, $mac); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Poly1305/State.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Poly1305/State.php deleted file mode 100644 index 451800ce..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Poly1305/State.php +++ /dev/null @@ -1,446 +0,0 @@ - - */ - protected $buffer = array(); - - /** - * @var bool - */ - protected $final = false; - - /** - * @var array - */ - public $h; - - /** - * @var int - */ - protected $leftover = 0; - - /** - * @var int[] - */ - public $r; - - /** - * @var int[] - */ - public $pad; - - /** - * ParagonIE_Sodium_Core_Poly1305_State constructor. - * - * @internal You should not use this directly from another application - * - * @param string $key - * @throws InvalidArgumentException - * @throws TypeError - */ - public function __construct($key = '') - { - if (self::strlen($key) < 32) { - throw new InvalidArgumentException( - 'Poly1305 requires a 32-byte key' - ); - } - /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ - $this->r = array( - (int) ((self::load_4(self::substr($key, 0, 4))) & 0x3ffffff), - (int) ((self::load_4(self::substr($key, 3, 4)) >> 2) & 0x3ffff03), - (int) ((self::load_4(self::substr($key, 6, 4)) >> 4) & 0x3ffc0ff), - (int) ((self::load_4(self::substr($key, 9, 4)) >> 6) & 0x3f03fff), - (int) ((self::load_4(self::substr($key, 12, 4)) >> 8) & 0x00fffff) - ); - - /* h = 0 */ - $this->h = array(0, 0, 0, 0, 0); - - /* save pad for later */ - $this->pad = array( - self::load_4(self::substr($key, 16, 4)), - self::load_4(self::substr($key, 20, 4)), - self::load_4(self::substr($key, 24, 4)), - self::load_4(self::substr($key, 28, 4)), - ); - - $this->leftover = 0; - $this->final = false; - } - - /** - * Zero internal buffer upon destruction - */ - public function __destruct() - { - $this->r[0] ^= $this->r[0]; - $this->r[1] ^= $this->r[1]; - $this->r[2] ^= $this->r[2]; - $this->r[3] ^= $this->r[3]; - $this->r[4] ^= $this->r[4]; - $this->h[0] ^= $this->h[0]; - $this->h[1] ^= $this->h[1]; - $this->h[2] ^= $this->h[2]; - $this->h[3] ^= $this->h[3]; - $this->h[4] ^= $this->h[4]; - $this->pad[0] ^= $this->pad[0]; - $this->pad[1] ^= $this->pad[1]; - $this->pad[2] ^= $this->pad[2]; - $this->pad[3] ^= $this->pad[3]; - $this->leftover = 0; - $this->final = true; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @return self - * @throws SodiumException - * @throws TypeError - */ - public function update($message = '') - { - $bytes = self::strlen($message); - if ($bytes < 1) { - return $this; - } - - /* handle leftover */ - if ($this->leftover) { - $want = ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - $this->leftover; - if ($want > $bytes) { - $want = $bytes; - } - for ($i = 0; $i < $want; ++$i) { - $mi = self::chrToInt($message[$i]); - $this->buffer[$this->leftover + $i] = $mi; - } - // We snip off the leftmost bytes. - $message = self::substr($message, $want); - $bytes = self::strlen($message); - $this->leftover += $want; - if ($this->leftover < ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) { - // We still don't have enough to run $this->blocks() - return $this; - } - - $this->blocks( - self::intArrayToString($this->buffer), - ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - ); - $this->leftover = 0; - } - - /* process full blocks */ - if ($bytes >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) { - /** @var int $want */ - $want = $bytes & ~(ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - 1); - if ($want >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) { - $block = self::substr($message, 0, $want); - if (self::strlen($block) >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) { - $this->blocks($block, $want); - $message = self::substr($message, $want); - $bytes = self::strlen($message); - } - } - } - - /* store leftover */ - if ($bytes) { - for ($i = 0; $i < $bytes; ++$i) { - $mi = self::chrToInt($message[$i]); - $this->buffer[$this->leftover + $i] = $mi; - } - $this->leftover = (int) $this->leftover + $bytes; - } - return $this; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param int $bytes - * @return self - * @throws TypeError - */ - public function blocks($message, $bytes) - { - if (self::strlen($message) < 16) { - $message = str_pad($message, 16, "\x00", STR_PAD_RIGHT); - } - /** @var int $hibit */ - $hibit = $this->final ? 0 : 1 << 24; /* 1 << 128 */ - $r0 = (int) $this->r[0]; - $r1 = (int) $this->r[1]; - $r2 = (int) $this->r[2]; - $r3 = (int) $this->r[3]; - $r4 = (int) $this->r[4]; - - $s1 = self::mul($r1, 5, 3); - $s2 = self::mul($r2, 5, 3); - $s3 = self::mul($r3, 5, 3); - $s4 = self::mul($r4, 5, 3); - - $h0 = $this->h[0]; - $h1 = $this->h[1]; - $h2 = $this->h[2]; - $h3 = $this->h[3]; - $h4 = $this->h[4]; - - while ($bytes >= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE) { - /* h += m[i] */ - $h0 += self::load_4(self::substr($message, 0, 4)) & 0x3ffffff; - $h1 += (self::load_4(self::substr($message, 3, 4)) >> 2) & 0x3ffffff; - $h2 += (self::load_4(self::substr($message, 6, 4)) >> 4) & 0x3ffffff; - $h3 += (self::load_4(self::substr($message, 9, 4)) >> 6) & 0x3ffffff; - $h4 += (self::load_4(self::substr($message, 12, 4)) >> 8) | $hibit; - - /* h *= r */ - $d0 = ( - self::mul($h0, $r0, 27) + - self::mul($s4, $h1, 27) + - self::mul($s3, $h2, 27) + - self::mul($s2, $h3, 27) + - self::mul($s1, $h4, 27) - ); - - $d1 = ( - self::mul($h0, $r1, 27) + - self::mul($h1, $r0, 27) + - self::mul($s4, $h2, 27) + - self::mul($s3, $h3, 27) + - self::mul($s2, $h4, 27) - ); - - $d2 = ( - self::mul($h0, $r2, 27) + - self::mul($h1, $r1, 27) + - self::mul($h2, $r0, 27) + - self::mul($s4, $h3, 27) + - self::mul($s3, $h4, 27) - ); - - $d3 = ( - self::mul($h0, $r3, 27) + - self::mul($h1, $r2, 27) + - self::mul($h2, $r1, 27) + - self::mul($h3, $r0, 27) + - self::mul($s4, $h4, 27) - ); - - $d4 = ( - self::mul($h0, $r4, 27) + - self::mul($h1, $r3, 27) + - self::mul($h2, $r2, 27) + - self::mul($h3, $r1, 27) + - self::mul($h4, $r0, 27) - ); - - /* (partial) h %= p */ - /** @var int $c */ - $c = $d0 >> 26; - /** @var int $h0 */ - $h0 = $d0 & 0x3ffffff; - $d1 += $c; - - /** @var int $c */ - $c = $d1 >> 26; - /** @var int $h1 */ - $h1 = $d1 & 0x3ffffff; - $d2 += $c; - - /** @var int $c */ - $c = $d2 >> 26; - /** @var int $h2 */ - $h2 = $d2 & 0x3ffffff; - $d3 += $c; - - /** @var int $c */ - $c = $d3 >> 26; - /** @var int $h3 */ - $h3 = $d3 & 0x3ffffff; - $d4 += $c; - - /** @var int $c */ - $c = $d4 >> 26; - /** @var int $h4 */ - $h4 = $d4 & 0x3ffffff; - $h0 += (int) self::mul($c, 5, 3); - - /** @var int $c */ - $c = $h0 >> 26; - /** @var int $h0 */ - $h0 &= 0x3ffffff; - $h1 += $c; - - // Chop off the left 32 bytes. - $message = self::substr( - $message, - ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - ); - $bytes -= ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE; - } - - $this->h = array( - (int) ($h0 & 0xffffffff), - (int) ($h1 & 0xffffffff), - (int) ($h2 & 0xffffffff), - (int) ($h3 & 0xffffffff), - (int) ($h4 & 0xffffffff) - ); - return $this; - } - - /** - * @internal You should not use this directly from another application - * - * @return string - * @throws TypeError - */ - public function finish() - { - /* process the remaining block */ - if ($this->leftover) { - $i = $this->leftover; - $this->buffer[$i++] = 1; - for (; $i < ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE; ++$i) { - $this->buffer[$i] = 0; - } - $this->final = true; - $this->blocks( - self::substr( - self::intArrayToString($this->buffer), - 0, - ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - ), - ParagonIE_Sodium_Core_Poly1305::BLOCK_SIZE - ); - } - - $h0 = (int) $this->h[0]; - $h1 = (int) $this->h[1]; - $h2 = (int) $this->h[2]; - $h3 = (int) $this->h[3]; - $h4 = (int) $this->h[4]; - - /** @var int $c */ - $c = $h1 >> 26; - /** @var int $h1 */ - $h1 &= 0x3ffffff; - /** @var int $h2 */ - $h2 += $c; - /** @var int $c */ - $c = $h2 >> 26; - /** @var int $h2 */ - $h2 &= 0x3ffffff; - $h3 += $c; - /** @var int $c */ - $c = $h3 >> 26; - $h3 &= 0x3ffffff; - $h4 += $c; - /** @var int $c */ - $c = $h4 >> 26; - $h4 &= 0x3ffffff; - /** @var int $h0 */ - $h0 += self::mul($c, 5, 3); - /** @var int $c */ - $c = $h0 >> 26; - /** @var int $h0 */ - $h0 &= 0x3ffffff; - /** @var int $h1 */ - $h1 += $c; - - /* compute h + -p */ - /** @var int $g0 */ - $g0 = $h0 + 5; - /** @var int $c */ - $c = $g0 >> 26; - /** @var int $g0 */ - $g0 &= 0x3ffffff; - - /** @var int $g1 */ - $g1 = $h1 + $c; - /** @var int $c */ - $c = $g1 >> 26; - $g1 &= 0x3ffffff; - - /** @var int $g2 */ - $g2 = $h2 + $c; - /** @var int $c */ - $c = $g2 >> 26; - /** @var int $g2 */ - $g2 &= 0x3ffffff; - - /** @var int $g3 */ - $g3 = $h3 + $c; - /** @var int $c */ - $c = $g3 >> 26; - /** @var int $g3 */ - $g3 &= 0x3ffffff; - - /** @var int $g4 */ - $g4 = ($h4 + $c - (1 << 26)) & 0xffffffff; - - /* select h if h < p, or h + -p if h >= p */ - /** @var int $mask */ - $mask = ($g4 >> 31) - 1; - - $g0 &= $mask; - $g1 &= $mask; - $g2 &= $mask; - $g3 &= $mask; - $g4 &= $mask; - - /** @var int $mask */ - $mask = ~$mask & 0xffffffff; - /** @var int $h0 */ - $h0 = ($h0 & $mask) | $g0; - /** @var int $h1 */ - $h1 = ($h1 & $mask) | $g1; - /** @var int $h2 */ - $h2 = ($h2 & $mask) | $g2; - /** @var int $h3 */ - $h3 = ($h3 & $mask) | $g3; - /** @var int $h4 */ - $h4 = ($h4 & $mask) | $g4; - - /* h = h % (2^128) */ - /** @var int $h0 */ - $h0 = (($h0) | ($h1 << 26)) & 0xffffffff; - /** @var int $h1 */ - $h1 = (($h1 >> 6) | ($h2 << 20)) & 0xffffffff; - /** @var int $h2 */ - $h2 = (($h2 >> 12) | ($h3 << 14)) & 0xffffffff; - /** @var int $h3 */ - $h3 = (($h3 >> 18) | ($h4 << 8)) & 0xffffffff; - - /* mac = (h + pad) % (2^128) */ - $f = (int) ($h0 + $this->pad[0]); - $h0 = (int) $f; - $f = (int) ($h1 + $this->pad[1] + ($f >> 32)); - $h1 = (int) $f; - $f = (int) ($h2 + $this->pad[2] + ($f >> 32)); - $h2 = (int) $f; - $f = (int) ($h3 + $this->pad[3] + ($f >> 32)); - $h3 = (int) $f; - - return self::store32_le($h0 & 0xffffffff) . - self::store32_le($h1 & 0xffffffff) . - self::store32_le($h2 & 0xffffffff) . - self::store32_le($h3 & 0xffffffff); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Ristretto255.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Ristretto255.php deleted file mode 100644 index 9497a796..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Ristretto255.php +++ /dev/null @@ -1,708 +0,0 @@ -> 31) & 1; - } - - - /** - * @param ParagonIE_Sodium_Core_Curve25519_Fe $u - * @param ParagonIE_Sodium_Core_Curve25519_Fe $v - * @return array{x: ParagonIE_Sodium_Core_Curve25519_Fe, nonsquare: int} - * - * @throws SodiumException - */ - public static function ristretto255_sqrt_ratio_m1( - ParagonIE_Sodium_Core_Curve25519_Fe $u, - ParagonIE_Sodium_Core_Curve25519_Fe $v - ) { - $sqrtm1 = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqrtm1); - - $v3 = self::fe_mul( - self::fe_sq($v), - $v - ); /* v3 = v^3 */ - $x = self::fe_mul( - self::fe_mul( - self::fe_sq($v3), - $u - ), - $v - ); /* x = uv^7 */ - - $x = self::fe_mul( - self::fe_mul( - self::fe_pow22523($x), /* x = (uv^7)^((q-5)/8) */ - $v3 - ), - $u - ); /* x = uv^3(uv^7)^((q-5)/8) */ - - $vxx = self::fe_mul( - self::fe_sq($x), - $v - ); /* vx^2 */ - - $m_root_check = self::fe_sub($vxx, $u); /* vx^2-u */ - $p_root_check = self::fe_add($vxx, $u); /* vx^2+u */ - $f_root_check = self::fe_mul($u, $sqrtm1); /* u*sqrt(-1) */ - $f_root_check = self::fe_add($vxx, $f_root_check); /* vx^2+u*sqrt(-1) */ - - $has_m_root = self::fe_iszero($m_root_check); - $has_p_root = self::fe_iszero($p_root_check); - $has_f_root = self::fe_iszero($f_root_check); - - $x_sqrtm1 = self::fe_mul($x, $sqrtm1); /* x*sqrt(-1) */ - - $x = self::fe_abs( - self::fe_cmov($x, $x_sqrtm1, $has_p_root | $has_f_root) - ); - return array( - 'x' => $x, - 'nonsquare' => $has_m_root | $has_p_root - ); - } - - /** - * @param string $s - * @return int - * @throws SodiumException - */ - public static function ristretto255_point_is_canonical($s) - { - $c = (self::chrToInt($s[31]) & 0x7f) ^ 0x7f; - for ($i = 30; $i > 0; --$i) { - $c |= self::chrToInt($s[$i]) ^ 0xff; - } - $c = ($c - 1) >> 8; - $d = (0xed - 1 - self::chrToInt($s[0])) >> 8; - $e = self::chrToInt($s[31]) >> 7; - - return 1 - ((($c & $d) | $e | self::chrToInt($s[0])) & 1); - } - - /** - * @param string $s - * @param bool $skipCanonicalCheck - * @return array{h: ParagonIE_Sodium_Core_Curve25519_Ge_P3, res: int} - * @throws SodiumException - */ - public static function ristretto255_frombytes($s, $skipCanonicalCheck = false) - { - if (!$skipCanonicalCheck) { - if (!self::ristretto255_point_is_canonical($s)) { - throw new SodiumException('S is not canonical'); - } - } - - $s_ = self::fe_frombytes($s); - $ss = self::fe_sq($s_); /* ss = s^2 */ - - $u1 = self::fe_sub(self::fe_1(), $ss); /* u1 = 1-ss */ - $u1u1 = self::fe_sq($u1); /* u1u1 = u1^2 */ - - $u2 = self::fe_add(self::fe_1(), $ss); /* u2 = 1+ss */ - $u2u2 = self::fe_sq($u2); /* u2u2 = u2^2 */ - - $v = self::fe_mul( - ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$d), - $u1u1 - ); /* v = d*u1^2 */ - $v = self::fe_neg($v); /* v = -d*u1^2 */ - $v = self::fe_sub($v, $u2u2); /* v = -(d*u1^2)-u2^2 */ - $v_u2u2 = self::fe_mul($v, $u2u2); /* v_u2u2 = v*u2^2 */ - - // fe25519_1(one); - // notsquare = ristretto255_sqrt_ratio_m1(inv_sqrt, one, v_u2u2); - $one = self::fe_1(); - $result = self::ristretto255_sqrt_ratio_m1($one, $v_u2u2); - $inv_sqrt = $result['x']; - $notsquare = $result['nonsquare']; - - $h = new ParagonIE_Sodium_Core_Curve25519_Ge_P3(); - - $h->X = self::fe_mul($inv_sqrt, $u2); - $h->Y = self::fe_mul(self::fe_mul($inv_sqrt, $h->X), $v); - - $h->X = self::fe_mul($h->X, $s_); - $h->X = self::fe_abs( - self::fe_add($h->X, $h->X) - ); - $h->Y = self::fe_mul($u1, $h->Y); - $h->Z = self::fe_1(); - $h->T = self::fe_mul($h->X, $h->Y); - - $res = - ((1 - $notsquare) | self::fe_isnegative($h->T) | self::fe_iszero($h->Y)); - return array('h' => $h, 'res' => $res); - } - - /** - * @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h - * @return string - * @throws SodiumException - */ - public static function ristretto255_p3_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h) - { - $sqrtm1 = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqrtm1); - $invsqrtamd = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$invsqrtamd); - - $u1 = self::fe_add($h->Z, $h->Y); /* u1 = Z+Y */ - $zmy = self::fe_sub($h->Z, $h->Y); /* zmy = Z-Y */ - $u1 = self::fe_mul($u1, $zmy); /* u1 = (Z+Y)*(Z-Y) */ - $u2 = self::fe_mul($h->X, $h->Y); /* u2 = X*Y */ - - $u1_u2u2 = self::fe_mul(self::fe_sq($u2), $u1); /* u1_u2u2 = u1*u2^2 */ - $one = self::fe_1(); - - // fe25519_1(one); - // (void) ristretto255_sqrt_ratio_m1(inv_sqrt, one, u1_u2u2); - $result = self::ristretto255_sqrt_ratio_m1($one, $u1_u2u2); - $inv_sqrt = $result['x']; - - $den1 = self::fe_mul($inv_sqrt, $u1); /* den1 = inv_sqrt*u1 */ - $den2 = self::fe_mul($inv_sqrt, $u2); /* den2 = inv_sqrt*u2 */ - $z_inv = self::fe_mul($h->T, self::fe_mul($den1, $den2)); /* z_inv = den1*den2*T */ - - $ix = self::fe_mul($h->X, $sqrtm1); /* ix = X*sqrt(-1) */ - $iy = self::fe_mul($h->Y, $sqrtm1); /* iy = Y*sqrt(-1) */ - $eden = self::fe_mul($den1, $invsqrtamd); - - $t_z_inv = self::fe_mul($h->T, $z_inv); /* t_z_inv = T*z_inv */ - $rotate = self::fe_isnegative($t_z_inv); - - $x_ = self::fe_copy($h->X); - $y_ = self::fe_copy($h->Y); - $den_inv = self::fe_copy($den2); - - $x_ = self::fe_cmov($x_, $iy, $rotate); - $y_ = self::fe_cmov($y_, $ix, $rotate); - $den_inv = self::fe_cmov($den_inv, $eden, $rotate); - - $x_z_inv = self::fe_mul($x_, $z_inv); - $y_ = self::fe_cneg($y_, self::fe_isnegative($x_z_inv)); - - - // fe25519_sub(s_, h->Z, y_); - // fe25519_mul(s_, den_inv, s_); - // fe25519_abs(s_, s_); - // fe25519_tobytes(s, s_); - return self::fe_tobytes( - self::fe_abs( - self::fe_mul( - $den_inv, - self::fe_sub($h->Z, $y_) - ) - ) - ); - } - - /** - * @param ParagonIE_Sodium_Core_Curve25519_Fe $t - * @return ParagonIE_Sodium_Core_Curve25519_Ge_P3 - * - * @throws SodiumException - */ - public static function ristretto255_elligator(ParagonIE_Sodium_Core_Curve25519_Fe $t) - { - $sqrtm1 = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqrtm1); - $onemsqd = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$onemsqd); - $d = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$d); - $sqdmone = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqdmone); - $sqrtadm1 = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqrtadm1); - - $one = self::fe_1(); - $r = self::fe_mul($sqrtm1, self::fe_sq($t)); /* r = sqrt(-1)*t^2 */ - $u = self::fe_mul(self::fe_add($r, $one), $onemsqd); /* u = (r+1)*(1-d^2) */ - $c = self::fe_neg(self::fe_1()); /* c = -1 */ - $rpd = self::fe_add($r, $d); /* rpd = r+d */ - - $v = self::fe_mul( - self::fe_sub( - $c, - self::fe_mul($r, $d) - ), - $rpd - ); /* v = (c-r*d)*(r+d) */ - - $result = self::ristretto255_sqrt_ratio_m1($u, $v); - $s = $result['x']; - $wasnt_square = 1 - $result['nonsquare']; - - $s_prime = self::fe_neg( - self::fe_abs( - self::fe_mul($s, $t) - ) - ); /* s_prime = -|s*t| */ - $s = self::fe_cmov($s, $s_prime, $wasnt_square); - $c = self::fe_cmov($c, $r, $wasnt_square); - - // fe25519_sub(n, r, one); /* n = r-1 */ - // fe25519_mul(n, n, c); /* n = c*(r-1) */ - // fe25519_mul(n, n, ed25519_sqdmone); /* n = c*(r-1)*(d-1)^2 */ - // fe25519_sub(n, n, v); /* n = c*(r-1)*(d-1)^2-v */ - $n = self::fe_sub( - self::fe_mul( - self::fe_mul( - self::fe_sub($r, $one), - $c - ), - $sqdmone - ), - $v - ); /* n = c*(r-1)*(d-1)^2-v */ - - $w0 = self::fe_mul( - self::fe_add($s, $s), - $v - ); /* w0 = 2s*v */ - - $w1 = self::fe_mul($n, $sqrtadm1); /* w1 = n*sqrt(ad-1) */ - $ss = self::fe_sq($s); /* ss = s^2 */ - $w2 = self::fe_sub($one, $ss); /* w2 = 1-s^2 */ - $w3 = self::fe_add($one, $ss); /* w3 = 1+s^2 */ - - return new ParagonIE_Sodium_Core_Curve25519_Ge_P3( - self::fe_mul($w0, $w3), - self::fe_mul($w2, $w1), - self::fe_mul($w1, $w3), - self::fe_mul($w0, $w2) - ); - } - - /** - * @param string $h - * @return string - * @throws SodiumException - */ - public static function ristretto255_from_hash($h) - { - if (self::strlen($h) !== 64) { - throw new SodiumException('Hash must be 64 bytes'); - } - //fe25519_frombytes(r0, h); - //fe25519_frombytes(r1, h + 32); - $r0 = self::fe_frombytes(self::substr($h, 0, 32)); - $r1 = self::fe_frombytes(self::substr($h, 32, 32)); - - //ristretto255_elligator(&p0, r0); - //ristretto255_elligator(&p1, r1); - $p0 = self::ristretto255_elligator($r0); - $p1 = self::ristretto255_elligator($r1); - - //ge25519_p3_to_cached(&p1_cached, &p1); - //ge25519_add_cached(&p_p1p1, &p0, &p1_cached); - $p_p1p1 = self::ge_add( - $p0, - self::ge_p3_to_cached($p1) - ); - - //ge25519_p1p1_to_p3(&p, &p_p1p1); - //ristretto255_p3_tobytes(s, &p); - return self::ristretto255_p3_tobytes( - self::ge_p1p1_to_p3($p_p1p1) - ); - } - - /** - * @param string $p - * @return int - * @throws SodiumException - */ - public static function is_valid_point($p) - { - $result = self::ristretto255_frombytes($p); - if ($result['res'] !== 0) { - return 0; - } - return 1; - } - - /** - * @param string $p - * @param string $q - * @return string - * @throws SodiumException - */ - public static function ristretto255_add($p, $q) - { - $p_res = self::ristretto255_frombytes($p); - $q_res = self::ristretto255_frombytes($q); - if ($p_res['res'] !== 0 || $q_res['res'] !== 0) { - throw new SodiumException('Could not add points'); - } - $p_p3 = $p_res['h']; - $q_p3 = $q_res['h']; - $q_cached = self::ge_p3_to_cached($q_p3); - $r_p1p1 = self::ge_add($p_p3, $q_cached); - $r_p3 = self::ge_p1p1_to_p3($r_p1p1); - return self::ristretto255_p3_tobytes($r_p3); - } - - /** - * @param string $p - * @param string $q - * @return string - * @throws SodiumException - */ - public static function ristretto255_sub($p, $q) - { - $p_res = self::ristretto255_frombytes($p); - $q_res = self::ristretto255_frombytes($q); - if ($p_res['res'] !== 0 || $q_res['res'] !== 0) { - throw new SodiumException('Could not add points'); - } - $p_p3 = $p_res['h']; - $q_p3 = $q_res['h']; - $q_cached = self::ge_p3_to_cached($q_p3); - $r_p1p1 = self::ge_sub($p_p3, $q_cached); - $r_p3 = self::ge_p1p1_to_p3($r_p1p1); - return self::ristretto255_p3_tobytes($r_p3); - } - - - /** - * @param int $hLen - * @param ?string $ctx - * @param string $msg - * @return string - * @throws SodiumException - * @psalm-suppress PossiblyInvalidArgument hash API - */ - protected static function h2c_string_to_hash_sha256($hLen, $ctx, $msg) - { - $h = array_fill(0, $hLen, 0); - $ctx_len = !is_null($ctx) ? self::strlen($ctx) : 0; - if ($hLen > 0xff) { - throw new SodiumException('Hash must be less than 256 bytes'); - } - - if ($ctx_len > 0xff) { - $st = hash_init('sha256'); - self::hash_update($st, "H2C-OVERSIZE-DST-"); - self::hash_update($st, $ctx); - $ctx = hash_final($st, true); - $ctx_len = 32; - } - $t = array(0, $hLen, 0); - $ux = str_repeat("\0", 64); - $st = hash_init('sha256'); - self::hash_update($st, $ux); - self::hash_update($st, $msg); - self::hash_update($st, self::intArrayToString($t)); - self::hash_update($st, $ctx); - self::hash_update($st, self::intToChr($ctx_len)); - $u0 = hash_final($st, true); - - for ($i = 0; $i < $hLen; $i += 64) { - $ux = self::xorStrings($ux, $u0); - ++$t[2]; - $st = hash_init('sha256'); - self::hash_update($st, $ux); - self::hash_update($st, self::intToChr($t[2])); - self::hash_update($st, $ctx); - self::hash_update($st, self::intToChr($ctx_len)); - $ux = hash_final($st, true); - $amount = min($hLen - $i, 64); - for ($j = 0; $j < $amount; ++$j) { - $h[$i + $j] = self::chrToInt($ux[$i]); - } - } - return self::intArrayToString(array_slice($h, 0, $hLen)); - } - - /** - * @param int $hLen - * @param ?string $ctx - * @param string $msg - * @return string - * @throws SodiumException - * @psalm-suppress PossiblyInvalidArgument hash API - */ - protected static function h2c_string_to_hash_sha512($hLen, $ctx, $msg) - { - $h = array_fill(0, $hLen, 0); - $ctx_len = !is_null($ctx) ? self::strlen($ctx) : 0; - if ($hLen > 0xff) { - throw new SodiumException('Hash must be less than 256 bytes'); - } - - if ($ctx_len > 0xff) { - $st = hash_init('sha256'); - self::hash_update($st, "H2C-OVERSIZE-DST-"); - self::hash_update($st, $ctx); - $ctx = hash_final($st, true); - $ctx_len = 32; - } - $t = array(0, $hLen, 0); - $ux = str_repeat("\0", 128); - $st = hash_init('sha512'); - self::hash_update($st, $ux); - self::hash_update($st, $msg); - self::hash_update($st, self::intArrayToString($t)); - self::hash_update($st, $ctx); - self::hash_update($st, self::intToChr($ctx_len)); - $u0 = hash_final($st, true); - - for ($i = 0; $i < $hLen; $i += 128) { - $ux = self::xorStrings($ux, $u0); - ++$t[2]; - $st = hash_init('sha512'); - self::hash_update($st, $ux); - self::hash_update($st, self::intToChr($t[2])); - self::hash_update($st, $ctx); - self::hash_update($st, self::intToChr($ctx_len)); - $ux = hash_final($st, true); - $amount = min($hLen - $i, 128); - for ($j = 0; $j < $amount; ++$j) { - $h[$i + $j] = self::chrToInt($ux[$i]); - } - } - return self::intArrayToString(array_slice($h, 0, $hLen)); - } - - /** - * @param int $hLen - * @param ?string $ctx - * @param string $msg - * @param int $hash_alg - * @return string - * @throws SodiumException - */ - public static function h2c_string_to_hash($hLen, $ctx, $msg, $hash_alg) - { - switch ($hash_alg) { - case self::CORE_H2C_SHA256: - return self::h2c_string_to_hash_sha256($hLen, $ctx, $msg); - case self::CORE_H2C_SHA512: - return self::h2c_string_to_hash_sha512($hLen, $ctx, $msg); - default: - throw new SodiumException('Invalid H2C hash algorithm'); - } - } - - /** - * @param ?string $ctx - * @param string $msg - * @param int $hash_alg - * @return string - * @throws SodiumException - */ - protected static function _string_to_element($ctx, $msg, $hash_alg) - { - return self::ristretto255_from_hash( - self::h2c_string_to_hash(self::crypto_core_ristretto255_HASHBYTES, $ctx, $msg, $hash_alg) - ); - } - - /** - * @return string - * @throws SodiumException - * @throws Exception - */ - public static function ristretto255_random() - { - return self::ristretto255_from_hash( - ParagonIE_Sodium_Compat::randombytes_buf(self::crypto_core_ristretto255_HASHBYTES) - ); - } - - /** - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_random() - { - return self::scalar_random(); - } - - /** - * @param string $s - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_complement($s) - { - return self::scalar_complement($s); - } - - - /** - * @param string $s - * @return string - */ - public static function ristretto255_scalar_invert($s) - { - return self::sc25519_invert($s); - } - - /** - * @param string $s - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_negate($s) - { - return self::scalar_negate($s); - } - - /** - * @param string $x - * @param string $y - * @return string - */ - public static function ristretto255_scalar_add($x, $y) - { - return self::scalar_add($x, $y); - } - - /** - * @param string $x - * @param string $y - * @return string - */ - public static function ristretto255_scalar_sub($x, $y) - { - return self::scalar_sub($x, $y); - } - - /** - * @param string $x - * @param string $y - * @return string - */ - public static function ristretto255_scalar_mul($x, $y) - { - return self::sc25519_mul($x, $y); - } - - /** - * @param string $ctx - * @param string $msg - * @param int $hash_alg - * @return string - * @throws SodiumException - */ - public static function ristretto255_scalar_from_string($ctx, $msg, $hash_alg) - { - $h = array_fill(0, 64, 0); - $h_be = self::stringToIntArray( - self::h2c_string_to_hash( - self::HASH_SC_L, $ctx, $msg, $hash_alg - ) - ); - - for ($i = 0; $i < self::HASH_SC_L; ++$i) { - $h[$i] = $h_be[self::HASH_SC_L - 1 - $i]; - } - return self::ristretto255_scalar_reduce(self::intArrayToString($h)); - } - - /** - * @param string $s - * @return string - */ - public static function ristretto255_scalar_reduce($s) - { - return self::sc_reduce($s); - } - - /** - * @param string $n - * @param string $p - * @return string - * @throws SodiumException - */ - public static function scalarmult_ristretto255($n, $p) - { - if (self::strlen($n) !== 32) { - throw new SodiumException('Scalar must be 32 bytes, ' . self::strlen($p) . ' given.'); - } - if (self::strlen($p) !== 32) { - throw new SodiumException('Point must be 32 bytes, ' . self::strlen($p) . ' given.'); - } - $result = self::ristretto255_frombytes($p); - if ($result['res'] !== 0) { - throw new SodiumException('Could not multiply points'); - } - $P = $result['h']; - - $t = self::stringToIntArray($n); - $t[31] &= 0x7f; - $Q = self::ge_scalarmult(self::intArrayToString($t), $P); - $q = self::ristretto255_p3_tobytes($Q); - if (ParagonIE_Sodium_Compat::is_zero($q)) { - throw new SodiumException('An unknown error has occurred'); - } - return $q; - } - - /** - * @param string $n - * @return string - * @throws SodiumException - */ - public static function scalarmult_ristretto255_base($n) - { - $t = self::stringToIntArray($n); - $t[31] &= 0x7f; - $Q = self::ge_scalarmult_base(self::intArrayToString($t)); - $q = self::ristretto255_p3_tobytes($Q); - if (ParagonIE_Sodium_Compat::is_zero($q)) { - throw new SodiumException('An unknown error has occurred'); - } - return $q; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Salsa20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Salsa20.php deleted file mode 100644 index eb40c632..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Salsa20.php +++ /dev/null @@ -1,274 +0,0 @@ - 0; $i -= 2) { - $x4 ^= self::rotate($x0 + $x12, 7); - $x8 ^= self::rotate($x4 + $x0, 9); - $x12 ^= self::rotate($x8 + $x4, 13); - $x0 ^= self::rotate($x12 + $x8, 18); - - $x9 ^= self::rotate($x5 + $x1, 7); - $x13 ^= self::rotate($x9 + $x5, 9); - $x1 ^= self::rotate($x13 + $x9, 13); - $x5 ^= self::rotate($x1 + $x13, 18); - - $x14 ^= self::rotate($x10 + $x6, 7); - $x2 ^= self::rotate($x14 + $x10, 9); - $x6 ^= self::rotate($x2 + $x14, 13); - $x10 ^= self::rotate($x6 + $x2, 18); - - $x3 ^= self::rotate($x15 + $x11, 7); - $x7 ^= self::rotate($x3 + $x15, 9); - $x11 ^= self::rotate($x7 + $x3, 13); - $x15 ^= self::rotate($x11 + $x7, 18); - - $x1 ^= self::rotate($x0 + $x3, 7); - $x2 ^= self::rotate($x1 + $x0, 9); - $x3 ^= self::rotate($x2 + $x1, 13); - $x0 ^= self::rotate($x3 + $x2, 18); - - $x6 ^= self::rotate($x5 + $x4, 7); - $x7 ^= self::rotate($x6 + $x5, 9); - $x4 ^= self::rotate($x7 + $x6, 13); - $x5 ^= self::rotate($x4 + $x7, 18); - - $x11 ^= self::rotate($x10 + $x9, 7); - $x8 ^= self::rotate($x11 + $x10, 9); - $x9 ^= self::rotate($x8 + $x11, 13); - $x10 ^= self::rotate($x9 + $x8, 18); - - $x12 ^= self::rotate($x15 + $x14, 7); - $x13 ^= self::rotate($x12 + $x15, 9); - $x14 ^= self::rotate($x13 + $x12, 13); - $x15 ^= self::rotate($x14 + $x13, 18); - } - - $x0 += $j0; - $x1 += $j1; - $x2 += $j2; - $x3 += $j3; - $x4 += $j4; - $x5 += $j5; - $x6 += $j6; - $x7 += $j7; - $x8 += $j8; - $x9 += $j9; - $x10 += $j10; - $x11 += $j11; - $x12 += $j12; - $x13 += $j13; - $x14 += $j14; - $x15 += $j15; - - return self::store32_le($x0) . - self::store32_le($x1) . - self::store32_le($x2) . - self::store32_le($x3) . - self::store32_le($x4) . - self::store32_le($x5) . - self::store32_le($x6) . - self::store32_le($x7) . - self::store32_le($x8) . - self::store32_le($x9) . - self::store32_le($x10) . - self::store32_le($x11) . - self::store32_le($x12) . - self::store32_le($x13) . - self::store32_le($x14) . - self::store32_le($x15); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $len - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function salsa20($len, $nonce, $key) - { - if (self::strlen($key) !== 32) { - throw new RangeException('Key must be 32 bytes long'); - } - $kcopy = '' . $key; - $in = self::substr($nonce, 0, 8) . str_repeat("\0", 8); - $c = ''; - while ($len >= 64) { - $c .= self::core_salsa20($in, $kcopy, null); - $u = 1; - // Internal counter. - for ($i = 8; $i < 16; ++$i) { - $u += self::chrToInt($in[$i]); - $in[$i] = self::intToChr($u & 0xff); - $u >>= 8; - } - $len -= 64; - } - if ($len > 0) { - $c .= self::substr( - self::core_salsa20($in, $kcopy, null), - 0, - $len - ); - } - try { - ParagonIE_Sodium_Compat::memzero($kcopy); - } catch (SodiumException $ex) { - $kcopy = null; - } - return $c; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $m - * @param string $n - * @param int $ic - * @param string $k - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function salsa20_xor_ic($m, $n, $ic, $k) - { - $mlen = self::strlen($m); - if ($mlen < 1) { - return ''; - } - $kcopy = self::substr($k, 0, 32); - $in = self::substr($n, 0, 8); - // Initialize the counter - $in .= ParagonIE_Sodium_Core_Util::store64_le($ic); - - $c = ''; - while ($mlen >= 64) { - $block = self::core_salsa20($in, $kcopy, null); - $c .= self::xorStrings( - self::substr($m, 0, 64), - self::substr($block, 0, 64) - ); - $u = 1; - for ($i = 8; $i < 16; ++$i) { - $u += self::chrToInt($in[$i]); - $in[$i] = self::intToChr($u & 0xff); - $u >>= 8; - } - - $mlen -= 64; - $m = self::substr($m, 64); - } - - if ($mlen) { - $block = self::core_salsa20($in, $kcopy, null); - $c .= self::xorStrings( - self::substr($m, 0, $mlen), - self::substr($block, 0, $mlen) - ); - } - try { - ParagonIE_Sodium_Compat::memzero($block); - ParagonIE_Sodium_Compat::memzero($kcopy); - } catch (SodiumException $ex) { - $block = null; - $kcopy = null; - } - - return $c; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function salsa20_xor($message, $nonce, $key) - { - return self::xorStrings( - $message, - self::salsa20( - self::strlen($message), - $nonce, - $key - ) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $u - * @param int $c - * @return int - */ - public static function rotate($u, $c) - { - $u &= 0xffffffff; - $c %= 32; - return (int) (0xffffffff & ( - ($u << $c) - | - ($u >> (32 - $c)) - ) - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/SecretStream/State.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/SecretStream/State.php deleted file mode 100644 index accafb30..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/SecretStream/State.php +++ /dev/null @@ -1,164 +0,0 @@ -key = $key; - $this->counter = 1; - if (is_null($nonce)) { - $nonce = str_repeat("\0", 12); - } - $this->nonce = str_pad($nonce, 12, "\0", STR_PAD_RIGHT);; - $this->_pad = str_repeat("\0", 4); - } - - /** - * @return self - */ - public function counterReset() - { - $this->counter = 1; - $this->_pad = str_repeat("\0", 4); - return $this; - } - - /** - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * @return string - */ - public function getCounter() - { - return ParagonIE_Sodium_Core_Util::store32_le($this->counter); - } - - /** - * @return string - */ - public function getNonce() - { - if (!is_string($this->nonce)) { - $this->nonce = str_repeat("\0", 12); - } - if (ParagonIE_Sodium_Core_Util::strlen($this->nonce) !== 12) { - $this->nonce = str_pad($this->nonce, 12, "\0", STR_PAD_RIGHT); - } - return $this->nonce; - } - - /** - * @return string - */ - public function getCombinedNonce() - { - return $this->getCounter() . - ParagonIE_Sodium_Core_Util::substr($this->getNonce(), 0, 8); - } - - /** - * @return self - */ - public function incrementCounter() - { - ++$this->counter; - return $this; - } - - /** - * @return bool - */ - public function needsRekey() - { - return ($this->counter & 0xffff) === 0; - } - - /** - * @param string $newKeyAndNonce - * @return self - */ - public function rekey($newKeyAndNonce) - { - $this->key = ParagonIE_Sodium_Core_Util::substr($newKeyAndNonce, 0, 32); - $this->nonce = str_pad( - ParagonIE_Sodium_Core_Util::substr($newKeyAndNonce, 32), - 12, - "\0", - STR_PAD_RIGHT - ); - return $this; - } - - /** - * @param string $str - * @return self - */ - public function xorNonce($str) - { - $this->nonce = ParagonIE_Sodium_Core_Util::xorStrings( - $this->getNonce(), - str_pad( - ParagonIE_Sodium_Core_Util::substr($str, 0, 8), - 12, - "\0", - STR_PAD_RIGHT - ) - ); - return $this; - } - - /** - * @param string $string - * @return self - */ - public static function fromString($string) - { - $state = new ParagonIE_Sodium_Core_SecretStream_State( - ParagonIE_Sodium_Core_Util::substr($string, 0, 32) - ); - $state->counter = ParagonIE_Sodium_Core_Util::load_4( - ParagonIE_Sodium_Core_Util::substr($string, 32, 4) - ); - $state->nonce = ParagonIE_Sodium_Core_Util::substr($string, 36, 12); - $state->_pad = ParagonIE_Sodium_Core_Util::substr($string, 48, 8); - return $state; - } - - /** - * @return string - */ - public function toString() - { - return $this->key . - $this->getCounter() . - $this->nonce . - $this->_pad; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/SipHash.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/SipHash.php deleted file mode 100644 index 3cac5d8d..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/SipHash.php +++ /dev/null @@ -1,307 +0,0 @@ - - */ - public static function add(array $a, array $b) - { - /** @var int $x1 */ - $x1 = $a[1] + $b[1]; - /** @var int $c */ - $c = $x1 >> 32; // Carry if ($a + $b) > 0xffffffff - /** @var int $x0 */ - $x0 = $a[0] + $b[0] + $c; - return array( - $x0 & 0xffffffff, - $x1 & 0xffffffff - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $int0 - * @param int $int1 - * @param int $c - * @return array - */ - public static function rotl_64($int0, $int1, $c) - { - $int0 &= 0xffffffff; - $int1 &= 0xffffffff; - $c &= 63; - if ($c === 32) { - return array($int1, $int0); - } - if ($c > 31) { - $tmp = $int1; - $int1 = $int0; - $int0 = $tmp; - $c &= 31; - } - if ($c === 0) { - return array($int0, $int1); - } - return array( - 0xffffffff & ( - ($int0 << $c) - | - ($int1 >> (32 - $c)) - ), - 0xffffffff & ( - ($int1 << $c) - | - ($int0 >> (32 - $c)) - ), - ); - } - - /** - * Implements Siphash-2-4 using only 32-bit numbers. - * - * When we split an int into two, the higher bits go to the lower index. - * e.g. 0xDEADBEEFAB10C92D becomes [ - * 0 => 0xDEADBEEF, - * 1 => 0xAB10C92D - * ]. - * - * @internal You should not use this directly from another application - * - * @param string $in - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sipHash24($in, $key) - { - $inlen = self::strlen($in); - - # /* "somepseudorandomlygeneratedbytes" */ - # u64 v0 = 0x736f6d6570736575ULL; - # u64 v1 = 0x646f72616e646f6dULL; - # u64 v2 = 0x6c7967656e657261ULL; - # u64 v3 = 0x7465646279746573ULL; - $v = array( - 0x736f6d65, // 0 - 0x70736575, // 1 - 0x646f7261, // 2 - 0x6e646f6d, // 3 - 0x6c796765, // 4 - 0x6e657261, // 5 - 0x74656462, // 6 - 0x79746573 // 7 - ); - // v0 => $v[0], $v[1] - // v1 => $v[2], $v[3] - // v2 => $v[4], $v[5] - // v3 => $v[6], $v[7] - - # u64 k0 = LOAD64_LE( k ); - # u64 k1 = LOAD64_LE( k + 8 ); - $k = array( - self::load_4(self::substr($key, 4, 4)), - self::load_4(self::substr($key, 0, 4)), - self::load_4(self::substr($key, 12, 4)), - self::load_4(self::substr($key, 8, 4)) - ); - // k0 => $k[0], $k[1] - // k1 => $k[2], $k[3] - - # b = ( ( u64 )inlen ) << 56; - $b = array( - $inlen << 24, - 0 - ); - // See docblock for why the 0th index gets the higher bits. - - # v3 ^= k1; - $v[6] ^= $k[2]; - $v[7] ^= $k[3]; - # v2 ^= k0; - $v[4] ^= $k[0]; - $v[5] ^= $k[1]; - # v1 ^= k1; - $v[2] ^= $k[2]; - $v[3] ^= $k[3]; - # v0 ^= k0; - $v[0] ^= $k[0]; - $v[1] ^= $k[1]; - - $left = $inlen; - # for ( ; in != end; in += 8 ) - while ($left >= 8) { - # m = LOAD64_LE( in ); - $m = array( - self::load_4(self::substr($in, 4, 4)), - self::load_4(self::substr($in, 0, 4)) - ); - - # v3 ^= m; - $v[6] ^= $m[0]; - $v[7] ^= $m[1]; - - # SIPROUND; - # SIPROUND; - $v = self::sipRound($v); - $v = self::sipRound($v); - - # v0 ^= m; - $v[0] ^= $m[0]; - $v[1] ^= $m[1]; - - $in = self::substr($in, 8); - $left -= 8; - } - - # switch( left ) - # { - # case 7: b |= ( ( u64 )in[ 6] ) << 48; - # case 6: b |= ( ( u64 )in[ 5] ) << 40; - # case 5: b |= ( ( u64 )in[ 4] ) << 32; - # case 4: b |= ( ( u64 )in[ 3] ) << 24; - # case 3: b |= ( ( u64 )in[ 2] ) << 16; - # case 2: b |= ( ( u64 )in[ 1] ) << 8; - # case 1: b |= ( ( u64 )in[ 0] ); break; - # case 0: break; - # } - switch ($left) { - case 7: - $b[0] |= self::chrToInt($in[6]) << 16; - case 6: - $b[0] |= self::chrToInt($in[5]) << 8; - case 5: - $b[0] |= self::chrToInt($in[4]); - case 4: - $b[1] |= self::chrToInt($in[3]) << 24; - case 3: - $b[1] |= self::chrToInt($in[2]) << 16; - case 2: - $b[1] |= self::chrToInt($in[1]) << 8; - case 1: - $b[1] |= self::chrToInt($in[0]); - case 0: - break; - } - // See docblock for why the 0th index gets the higher bits. - - # v3 ^= b; - $v[6] ^= $b[0]; - $v[7] ^= $b[1]; - - # SIPROUND; - # SIPROUND; - $v = self::sipRound($v); - $v = self::sipRound($v); - - # v0 ^= b; - $v[0] ^= $b[0]; - $v[1] ^= $b[1]; - - // Flip the lower 8 bits of v2 which is ($v[4], $v[5]) in our implementation - # v2 ^= 0xff; - $v[5] ^= 0xff; - - # SIPROUND; - # SIPROUND; - # SIPROUND; - # SIPROUND; - $v = self::sipRound($v); - $v = self::sipRound($v); - $v = self::sipRound($v); - $v = self::sipRound($v); - - # b = v0 ^ v1 ^ v2 ^ v3; - # STORE64_LE( out, b ); - return self::store32_le($v[1] ^ $v[3] ^ $v[5] ^ $v[7]) . - self::store32_le($v[0] ^ $v[2] ^ $v[4] ^ $v[6]); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Util.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Util.php deleted file mode 100644 index a0c5995e..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/Util.php +++ /dev/null @@ -1,948 +0,0 @@ -> $size) & 1); - return (int) ( - ($integer ^ $negative) - + - (($negative >> $realSize) & 1) - ); - } - - /** - * Convert a binary string into a hexadecimal string without cache-timing - * leaks - * - * @internal You should not use this directly from another application - * - * @param string $binaryString (raw binary) - * @return string - * @throws TypeError - */ - public static function bin2hex($binaryString) - { - /* Type checks: */ - if (!is_string($binaryString)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($binaryString) . ' given.'); - } - - $hex = ''; - $len = self::strlen($binaryString); - for ($i = 0; $i < $len; ++$i) { - /** @var array $chunk */ - $chunk = unpack('C', $binaryString[$i]); - /** @var int $c */ - $c = $chunk[1] & 0xf; - /** @var int $b */ - $b = $chunk[1] >> 4; - $hex .= pack( - 'CC', - (87 + $b + ((($b - 10) >> 8) & ~38)), - (87 + $c + ((($c - 10) >> 8) & ~38)) - ); - } - return $hex; - } - - /** - * Convert a binary string into a hexadecimal string without cache-timing - * leaks, returning uppercase letters (as per RFC 4648) - * - * @internal You should not use this directly from another application - * - * @param string $bin_string (raw binary) - * @return string - * @throws TypeError - */ - public static function bin2hexUpper($bin_string) - { - $hex = ''; - $len = self::strlen($bin_string); - for ($i = 0; $i < $len; ++$i) { - /** @var array $chunk */ - $chunk = unpack('C', $bin_string[$i]); - /** - * Lower 16 bits - * - * @var int $c - */ - $c = $chunk[1] & 0xf; - - /** - * Upper 16 bits - * @var int $b - */ - $b = $chunk[1] >> 4; - - /** - * Use pack() and binary operators to turn the two integers - * into hexadecimal characters. We don't use chr() here, because - * it uses a lookup table internally and we want to avoid - * cache-timing side-channels. - */ - $hex .= pack( - 'CC', - (55 + $b + ((($b - 10) >> 8) & ~6)), - (55 + $c + ((($c - 10) >> 8) & ~6)) - ); - } - return $hex; - } - - /** - * Cache-timing-safe variant of ord() - * - * @internal You should not use this directly from another application - * - * @param string $chr - * @return int - * @throws SodiumException - * @throws TypeError - */ - public static function chrToInt($chr) - { - /* Type checks: */ - if (!is_string($chr)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($chr) . ' given.'); - } - if (self::strlen($chr) !== 1) { - throw new SodiumException('chrToInt() expects a string that is exactly 1 character long'); - } - /** @var array $chunk */ - $chunk = unpack('C', $chr); - return (int) ($chunk[1]); - } - - /** - * Compares two strings. - * - * @internal You should not use this directly from another application - * - * @param string $left - * @param string $right - * @param int $len - * @return int - * @throws SodiumException - * @throws TypeError - */ - public static function compare($left, $right, $len = null) - { - $leftLen = self::strlen($left); - $rightLen = self::strlen($right); - if ($len === null) { - $len = max($leftLen, $rightLen); - $left = str_pad($left, $len, "\x00", STR_PAD_RIGHT); - $right = str_pad($right, $len, "\x00", STR_PAD_RIGHT); - } - - $gt = 0; - $eq = 1; - $i = $len; - while ($i !== 0) { - --$i; - $gt |= ((self::chrToInt($right[$i]) - self::chrToInt($left[$i])) >> 8) & $eq; - $eq &= ((self::chrToInt($right[$i]) ^ self::chrToInt($left[$i])) - 1) >> 8; - } - return ($gt + $gt + $eq) - 1; - } - - /** - * If a variable does not match a given type, throw a TypeError. - * - * @param mixed $mixedVar - * @param string $type - * @param int $argumentIndex - * @throws TypeError - * @throws SodiumException - * @return void - */ - public static function declareScalarType(&$mixedVar = null, $type = 'void', $argumentIndex = 0) - { - if (func_num_args() === 0) { - /* Tautology, by default */ - return; - } - if (func_num_args() === 1) { - throw new TypeError('Declared void, but passed a variable'); - } - $realType = strtolower(gettype($mixedVar)); - $type = strtolower($type); - switch ($type) { - case 'null': - if ($mixedVar !== null) { - throw new TypeError('Argument ' . $argumentIndex . ' must be null, ' . $realType . ' given.'); - } - break; - case 'integer': - case 'int': - $allow = array('int', 'integer'); - if (!in_array($type, $allow)) { - throw new TypeError('Argument ' . $argumentIndex . ' must be an integer, ' . $realType . ' given.'); - } - $mixedVar = (int) $mixedVar; - break; - case 'boolean': - case 'bool': - $allow = array('bool', 'boolean'); - if (!in_array($type, $allow)) { - throw new TypeError('Argument ' . $argumentIndex . ' must be a boolean, ' . $realType . ' given.'); - } - $mixedVar = (bool) $mixedVar; - break; - case 'string': - if (!is_string($mixedVar)) { - throw new TypeError('Argument ' . $argumentIndex . ' must be a string, ' . $realType . ' given.'); - } - $mixedVar = (string) $mixedVar; - break; - case 'decimal': - case 'double': - case 'float': - $allow = array('decimal', 'double', 'float'); - if (!in_array($type, $allow)) { - throw new TypeError('Argument ' . $argumentIndex . ' must be a float, ' . $realType . ' given.'); - } - $mixedVar = (float) $mixedVar; - break; - case 'object': - if (!is_object($mixedVar)) { - throw new TypeError('Argument ' . $argumentIndex . ' must be an object, ' . $realType . ' given.'); - } - break; - case 'array': - if (!is_array($mixedVar)) { - if (is_object($mixedVar)) { - if ($mixedVar instanceof ArrayAccess) { - return; - } - } - throw new TypeError('Argument ' . $argumentIndex . ' must be an array, ' . $realType . ' given.'); - } - break; - default: - throw new SodiumException('Unknown type (' . $realType .') does not match expect type (' . $type . ')'); - } - } - - /** - * Evaluate whether or not two strings are equal (in constant-time) - * - * @param string $left - * @param string $right - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function hashEquals($left, $right) - { - /* Type checks: */ - if (!is_string($left)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($left) . ' given.'); - } - if (!is_string($right)) { - throw new TypeError('Argument 2 must be a string, ' . gettype($right) . ' given.'); - } - - if (is_callable('hash_equals')) { - return hash_equals($left, $right); - } - $d = 0; - /** @var int $len */ - $len = self::strlen($left); - if ($len !== self::strlen($right)) { - return false; - } - for ($i = 0; $i < $len; ++$i) { - $d |= self::chrToInt($left[$i]) ^ self::chrToInt($right[$i]); - } - - if ($d !== 0) { - return false; - } - return $left === $right; - } - - /** - * Catch hash_update() failures and throw instead of silently proceeding - * - * @param HashContext|resource &$hs - * @param string $data - * @return void - * @throws SodiumException - * @psalm-suppress PossiblyInvalidArgument - */ - protected static function hash_update(&$hs, $data) - { - if (!hash_update($hs, $data)) { - throw new SodiumException('hash_update() failed'); - } - } - - /** - * Convert a hexadecimal string into a binary string without cache-timing - * leaks - * - * @internal You should not use this directly from another application - * - * @param string $hexString - * @param string $ignore - * @param bool $strictPadding - * @return string (raw binary) - * @throws RangeException - * @throws TypeError - */ - public static function hex2bin($hexString, $ignore = '', $strictPadding = false) - { - /* Type checks: */ - if (!is_string($hexString)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($hexString) . ' given.'); - } - if (!is_string($ignore)) { - throw new TypeError('Argument 2 must be a string, ' . gettype($hexString) . ' given.'); - } - - $hex_pos = 0; - $bin = ''; - $c_acc = 0; - $hex_len = self::strlen($hexString); - $state = 0; - if (($hex_len & 1) !== 0) { - if ($strictPadding) { - throw new RangeException( - 'Expected an even number of hexadecimal characters' - ); - } else { - $hexString = '0' . $hexString; - ++$hex_len; - } - } - - $chunk = unpack('C*', $hexString); - while ($hex_pos < $hex_len) { - ++$hex_pos; - /** @var int $c */ - $c = $chunk[$hex_pos]; - $c_num = $c ^ 48; - $c_num0 = ($c_num - 10) >> 8; - $c_alpha = ($c & ~32) - 55; - $c_alpha0 = (($c_alpha - 10) ^ ($c_alpha - 16)) >> 8; - if (($c_num0 | $c_alpha0) === 0) { - if ($ignore && $state === 0 && strpos($ignore, self::intToChr($c)) !== false) { - continue; - } - throw new RangeException( - 'hex2bin() only expects hexadecimal characters' - ); - } - $c_val = ($c_num0 & $c_num) | ($c_alpha & $c_alpha0); - if ($state === 0) { - $c_acc = $c_val * 16; - } else { - $bin .= pack('C', $c_acc | $c_val); - } - $state ^= 1; - } - return $bin; - } - - /** - * Turn an array of integers into a string - * - * @internal You should not use this directly from another application - * - * @param array $ints - * @return string - */ - public static function intArrayToString(array $ints) - { - $args = $ints; - foreach ($args as $i => $v) { - $args[$i] = (int) ($v & 0xff); - } - array_unshift($args, str_repeat('C', count($ints))); - return (string) (call_user_func_array('pack', $args)); - } - - /** - * Cache-timing-safe variant of ord() - * - * @internal You should not use this directly from another application - * - * @param int $int - * @return string - * @throws TypeError - */ - public static function intToChr($int) - { - return pack('C', $int); - } - - /** - * Load a 3 character substring into an integer - * - * @internal You should not use this directly from another application - * - * @param string $string - * @return int - * @throws RangeException - * @throws TypeError - */ - public static function load_3($string) - { - /* Type checks: */ - if (!is_string($string)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($string) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($string) < 3) { - throw new RangeException( - 'String must be 3 bytes or more; ' . self::strlen($string) . ' given.' - ); - } - /** @var array $unpacked */ - $unpacked = unpack('V', $string . "\0"); - return (int) ($unpacked[1] & 0xffffff); - } - - /** - * Load a 4 character substring into an integer - * - * @internal You should not use this directly from another application - * - * @param string $string - * @return int - * @throws RangeException - * @throws TypeError - */ - public static function load_4($string) - { - /* Type checks: */ - if (!is_string($string)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($string) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($string) < 4) { - throw new RangeException( - 'String must be 4 bytes or more; ' . self::strlen($string) . ' given.' - ); - } - /** @var array $unpacked */ - $unpacked = unpack('V', $string); - return (int) $unpacked[1]; - } - - /** - * Load a 8 character substring into an integer - * - * @internal You should not use this directly from another application - * - * @param string $string - * @return int - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function load64_le($string) - { - /* Type checks: */ - if (!is_string($string)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($string) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($string) < 4) { - throw new RangeException( - 'String must be 4 bytes or more; ' . self::strlen($string) . ' given.' - ); - } - if (PHP_VERSION_ID >= 50603 && PHP_INT_SIZE === 8) { - /** @var array $unpacked */ - $unpacked = unpack('P', $string); - return (int) $unpacked[1]; - } - - /** @var int $result */ - $result = (self::chrToInt($string[0]) & 0xff); - $result |= (self::chrToInt($string[1]) & 0xff) << 8; - $result |= (self::chrToInt($string[2]) & 0xff) << 16; - $result |= (self::chrToInt($string[3]) & 0xff) << 24; - $result |= (self::chrToInt($string[4]) & 0xff) << 32; - $result |= (self::chrToInt($string[5]) & 0xff) << 40; - $result |= (self::chrToInt($string[6]) & 0xff) << 48; - $result |= (self::chrToInt($string[7]) & 0xff) << 56; - return (int) $result; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $left - * @param string $right - * @return int - * @throws SodiumException - * @throws TypeError - */ - public static function memcmp($left, $right) - { - if (self::hashEquals($left, $right)) { - return 0; - } - return -1; - } - - /** - * Multiply two integers in constant-time - * - * Micro-architecture timing side-channels caused by how your CPU - * implements multiplication are best prevented by never using the - * multiplication operators and ensuring that our code always takes - * the same number of operations to complete, regardless of the values - * of $a and $b. - * - * @internal You should not use this directly from another application - * - * @param int $a - * @param int $b - * @param int $size Limits the number of operations (useful for small, - * constant operands) - * @return int - */ - public static function mul($a, $b, $size = 0) - { - if (ParagonIE_Sodium_Compat::$fastMult) { - return (int) ($a * $b); - } - - static $defaultSize = null; - /** @var int $defaultSize */ - if (!$defaultSize) { - /** @var int $defaultSize */ - $defaultSize = (PHP_INT_SIZE << 3) - 1; - } - if ($size < 1) { - /** @var int $size */ - $size = $defaultSize; - } - /** @var int $size */ - - $c = 0; - - /** - * Mask is either -1 or 0. - * - * -1 in binary looks like 0x1111 ... 1111 - * 0 in binary looks like 0x0000 ... 0000 - * - * @var int - */ - $mask = -(($b >> ((int) $defaultSize)) & 1); - - /** - * Ensure $b is a positive integer, without creating - * a branching side-channel - * - * @var int $b - */ - $b = ($b & ~$mask) | ($mask & -$b); - - /** - * Unless $size is provided: - * - * This loop always runs 32 times when PHP_INT_SIZE is 4. - * This loop always runs 64 times when PHP_INT_SIZE is 8. - */ - for ($i = $size; $i >= 0; --$i) { - $c += (int) ($a & -($b & 1)); - $a <<= 1; - $b >>= 1; - } - $c = (int) @($c & -1); - - /** - * If $b was negative, we then apply the same value to $c here. - * It doesn't matter much if $a was negative; the $c += above would - * have produced a negative integer to begin with. But a negative $b - * makes $b >>= 1 never return 0, so we would end up with incorrect - * results. - * - * The end result is what we'd expect from integer multiplication. - */ - return (int) (($c & ~$mask) | ($mask & -$c)); - } - - /** - * Convert any arbitrary numbers into two 32-bit integers that represent - * a 64-bit integer. - * - * @internal You should not use this directly from another application - * - * @param int|float $num - * @return array - */ - public static function numericTo64BitInteger($num) - { - $high = 0; - /** @var int $low */ - if (PHP_INT_SIZE === 4) { - $low = (int) $num; - } else { - $low = $num & 0xffffffff; - } - - if ((+(abs($num))) >= 1) { - if ($num > 0) { - /** @var int $high */ - $high = min((+(floor($num/4294967296))), 4294967295); - } else { - /** @var int $high */ - $high = ~~((+(ceil(($num - (+((~~($num)))))/4294967296)))); - } - } - return array((int) $high, (int) $low); - } - - /** - * Store a 24-bit integer into a string, treating it as big-endian. - * - * @internal You should not use this directly from another application - * - * @param int $int - * @return string - * @throws TypeError - */ - public static function store_3($int) - { - /* Type checks: */ - if (!is_int($int)) { - if (is_numeric($int)) { - $int = (int) $int; - } else { - throw new TypeError('Argument 1 must be an integer, ' . gettype($int) . ' given.'); - } - } - /** @var string $packed */ - $packed = pack('N', $int); - return self::substr($packed, 1, 3); - } - - /** - * Store a 32-bit integer into a string, treating it as little-endian. - * - * @internal You should not use this directly from another application - * - * @param int $int - * @return string - * @throws TypeError - */ - public static function store32_le($int) - { - /* Type checks: */ - if (!is_int($int)) { - if (is_numeric($int)) { - $int = (int) $int; - } else { - throw new TypeError('Argument 1 must be an integer, ' . gettype($int) . ' given.'); - } - } - - /** @var string $packed */ - $packed = pack('V', $int); - return $packed; - } - - /** - * Store a 32-bit integer into a string, treating it as big-endian. - * - * @internal You should not use this directly from another application - * - * @param int $int - * @return string - * @throws TypeError - */ - public static function store_4($int) - { - /* Type checks: */ - if (!is_int($int)) { - if (is_numeric($int)) { - $int = (int) $int; - } else { - throw new TypeError('Argument 1 must be an integer, ' . gettype($int) . ' given.'); - } - } - - /** @var string $packed */ - $packed = pack('N', $int); - return $packed; - } - - /** - * Stores a 64-bit integer as an string, treating it as little-endian. - * - * @internal You should not use this directly from another application - * - * @param int $int - * @return string - * @throws TypeError - */ - public static function store64_le($int) - { - /* Type checks: */ - if (!is_int($int)) { - if (is_numeric($int)) { - $int = (int) $int; - } else { - throw new TypeError('Argument 1 must be an integer, ' . gettype($int) . ' given.'); - } - } - - if (PHP_INT_SIZE === 8) { - if (PHP_VERSION_ID >= 50603) { - /** @var string $packed */ - $packed = pack('P', $int); - return $packed; - } - return self::intToChr($int & 0xff) . - self::intToChr(($int >> 8) & 0xff) . - self::intToChr(($int >> 16) & 0xff) . - self::intToChr(($int >> 24) & 0xff) . - self::intToChr(($int >> 32) & 0xff) . - self::intToChr(($int >> 40) & 0xff) . - self::intToChr(($int >> 48) & 0xff) . - self::intToChr(($int >> 56) & 0xff); - } - if ($int > PHP_INT_MAX) { - list($hiB, $int) = self::numericTo64BitInteger($int); - } else { - $hiB = 0; - } - return - self::intToChr(($int ) & 0xff) . - self::intToChr(($int >> 8) & 0xff) . - self::intToChr(($int >> 16) & 0xff) . - self::intToChr(($int >> 24) & 0xff) . - self::intToChr($hiB & 0xff) . - self::intToChr(($hiB >> 8) & 0xff) . - self::intToChr(($hiB >> 16) & 0xff) . - self::intToChr(($hiB >> 24) & 0xff); - } - - /** - * Safe string length - * - * @internal You should not use this directly from another application - * - * @ref mbstring.func_overload - * - * @param string $str - * @return int - * @throws TypeError - */ - public static function strlen($str) - { - /* Type checks: */ - if (!is_string($str)) { - throw new TypeError('String expected'); - } - - return (int) ( - self::isMbStringOverride() - ? mb_strlen($str, '8bit') - : strlen($str) - ); - } - - /** - * Turn a string into an array of integers - * - * @internal You should not use this directly from another application - * - * @param string $string - * @return array - * @throws TypeError - */ - public static function stringToIntArray($string) - { - if (!is_string($string)) { - throw new TypeError('String expected'); - } - /** - * @var array - */ - $values = array_values( - unpack('C*', $string) - ); - return $values; - } - - /** - * Safe substring - * - * @internal You should not use this directly from another application - * - * @ref mbstring.func_overload - * - * @param string $str - * @param int $start - * @param int $length - * @return string - * @throws TypeError - */ - public static function substr($str, $start = 0, $length = null) - { - /* Type checks: */ - if (!is_string($str)) { - throw new TypeError('String expected'); - } - - if ($length === 0) { - return ''; - } - - if (self::isMbStringOverride()) { - if (PHP_VERSION_ID < 50400 && $length === null) { - $length = self::strlen($str); - } - $sub = (string) mb_substr($str, $start, $length, '8bit'); - } elseif ($length === null) { - $sub = (string) substr($str, $start); - } else { - $sub = (string) substr($str, $start, $length); - } - if ($sub !== '') { - return $sub; - } - return ''; - } - - /** - * Compare a 16-character byte string in constant time. - * - * @internal You should not use this directly from another application - * - * @param string $a - * @param string $b - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function verify_16($a, $b) - { - /* Type checks: */ - if (!is_string($a)) { - throw new TypeError('String expected'); - } - if (!is_string($b)) { - throw new TypeError('String expected'); - } - return self::hashEquals( - self::substr($a, 0, 16), - self::substr($b, 0, 16) - ); - } - - /** - * Compare a 32-character byte string in constant time. - * - * @internal You should not use this directly from another application - * - * @param string $a - * @param string $b - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function verify_32($a, $b) - { - /* Type checks: */ - if (!is_string($a)) { - throw new TypeError('String expected'); - } - if (!is_string($b)) { - throw new TypeError('String expected'); - } - return self::hashEquals( - self::substr($a, 0, 32), - self::substr($b, 0, 32) - ); - } - - /** - * Calculate $a ^ $b for two strings. - * - * @internal You should not use this directly from another application - * - * @param string $a - * @param string $b - * @return string - * @throws TypeError - */ - public static function xorStrings($a, $b) - { - /* Type checks: */ - if (!is_string($a)) { - throw new TypeError('Argument 1 must be a string'); - } - if (!is_string($b)) { - throw new TypeError('Argument 2 must be a string'); - } - - return (string) ($a ^ $b); - } - - /** - * Returns whether or not mbstring.func_overload is in effect. - * - * @internal You should not use this directly from another application - * - * Note: MB_OVERLOAD_STRING === 2, but we don't reference the constant - * (for nuisance-free PHP 8 support) - * - * @return bool - */ - protected static function isMbStringOverride() - { - static $mbstring = null; - - if ($mbstring === null) { - if (!defined('MB_OVERLOAD_STRING')) { - $mbstring = false; - return $mbstring; - } - $mbstring = extension_loaded('mbstring') - && defined('MB_OVERLOAD_STRING') - && - ((int) (ini_get('mbstring.func_overload')) & 2); - // MB_OVERLOAD_STRING === 2 - } - /** @var bool $mbstring */ - - return $mbstring; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/X25519.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/X25519.php deleted file mode 100644 index 5ee6a379..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/X25519.php +++ /dev/null @@ -1,328 +0,0 @@ -> 25; - $h[0] += self::mul($carry9, 19, 5); - $h[9] -= $carry9 << 25; - /** @var int $carry1 */ - $carry1 = ($h[1] + (1 << 24)) >> 25; - $h[2] += $carry1; - $h[1] -= $carry1 << 25; - /** @var int $carry3 */ - $carry3 = ($h[3] + (1 << 24)) >> 25; - $h[4] += $carry3; - $h[3] -= $carry3 << 25; - /** @var int $carry5 */ - $carry5 = ($h[5] + (1 << 24)) >> 25; - $h[6] += $carry5; - $h[5] -= $carry5 << 25; - /** @var int $carry7 */ - $carry7 = ($h[7] + (1 << 24)) >> 25; - $h[8] += $carry7; - $h[7] -= $carry7 << 25; - - /** @var int $carry0 */ - $carry0 = ($h[0] + (1 << 25)) >> 26; - $h[1] += $carry0; - $h[0] -= $carry0 << 26; - /** @var int $carry2 */ - $carry2 = ($h[2] + (1 << 25)) >> 26; - $h[3] += $carry2; - $h[2] -= $carry2 << 26; - /** @var int $carry4 */ - $carry4 = ($h[4] + (1 << 25)) >> 26; - $h[5] += $carry4; - $h[4] -= $carry4 << 26; - /** @var int $carry6 */ - $carry6 = ($h[6] + (1 << 25)) >> 26; - $h[7] += $carry6; - $h[6] -= $carry6 << 26; - /** @var int $carry8 */ - $carry8 = ($h[8] + (1 << 25)) >> 26; - $h[9] += $carry8; - $h[8] -= $carry8 << 26; - - foreach ($h as $i => $value) { - $h[$i] = (int) $value; - } - return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($h); - } - - /** - * @internal You should not use this directly from another application - * - * Inline comments preceded by # are from libsodium's ref10 code. - * - * @param string $n - * @param string $p - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_scalarmult_curve25519_ref10($n, $p) - { - # for (i = 0;i < 32;++i) e[i] = n[i]; - $e = '' . $n; - # e[0] &= 248; - $e[0] = self::intToChr( - self::chrToInt($e[0]) & 248 - ); - # e[31] &= 127; - # e[31] |= 64; - $e[31] = self::intToChr( - (self::chrToInt($e[31]) & 127) | 64 - ); - # fe_frombytes(x1,p); - $x1 = self::fe_frombytes($p); - # fe_1(x2); - $x2 = self::fe_1(); - # fe_0(z2); - $z2 = self::fe_0(); - # fe_copy(x3,x1); - $x3 = self::fe_copy($x1); - # fe_1(z3); - $z3 = self::fe_1(); - - # swap = 0; - /** @var int $swap */ - $swap = 0; - - # for (pos = 254;pos >= 0;--pos) { - for ($pos = 254; $pos >= 0; --$pos) { - # b = e[pos / 8] >> (pos & 7); - /** @var int $b */ - $b = self::chrToInt( - $e[(int) floor($pos / 8)] - ) >> ($pos & 7); - # b &= 1; - $b &= 1; - # swap ^= b; - $swap ^= $b; - # fe_cswap(x2,x3,swap); - self::fe_cswap($x2, $x3, $swap); - # fe_cswap(z2,z3,swap); - self::fe_cswap($z2, $z3, $swap); - # swap = b; - $swap = $b; - # fe_sub(tmp0,x3,z3); - $tmp0 = self::fe_sub($x3, $z3); - # fe_sub(tmp1,x2,z2); - $tmp1 = self::fe_sub($x2, $z2); - - # fe_add(x2,x2,z2); - $x2 = self::fe_add($x2, $z2); - - # fe_add(z2,x3,z3); - $z2 = self::fe_add($x3, $z3); - - # fe_mul(z3,tmp0,x2); - $z3 = self::fe_mul($tmp0, $x2); - - # fe_mul(z2,z2,tmp1); - $z2 = self::fe_mul($z2, $tmp1); - - # fe_sq(tmp0,tmp1); - $tmp0 = self::fe_sq($tmp1); - - # fe_sq(tmp1,x2); - $tmp1 = self::fe_sq($x2); - - # fe_add(x3,z3,z2); - $x3 = self::fe_add($z3, $z2); - - # fe_sub(z2,z3,z2); - $z2 = self::fe_sub($z3, $z2); - - # fe_mul(x2,tmp1,tmp0); - $x2 = self::fe_mul($tmp1, $tmp0); - - # fe_sub(tmp1,tmp1,tmp0); - $tmp1 = self::fe_sub($tmp1, $tmp0); - - # fe_sq(z2,z2); - $z2 = self::fe_sq($z2); - - # fe_mul121666(z3,tmp1); - $z3 = self::fe_mul121666($tmp1); - - # fe_sq(x3,x3); - $x3 = self::fe_sq($x3); - - # fe_add(tmp0,tmp0,z3); - $tmp0 = self::fe_add($tmp0, $z3); - - # fe_mul(z3,x1,z2); - $z3 = self::fe_mul($x1, $z2); - - # fe_mul(z2,tmp1,tmp0); - $z2 = self::fe_mul($tmp1, $tmp0); - } - - # fe_cswap(x2,x3,swap); - self::fe_cswap($x2, $x3, $swap); - - # fe_cswap(z2,z3,swap); - self::fe_cswap($z2, $z3, $swap); - - # fe_invert(z2,z2); - $z2 = self::fe_invert($z2); - - # fe_mul(x2,x2,z2); - $x2 = self::fe_mul($x2, $z2); - # fe_tobytes(q,x2); - return self::fe_tobytes($x2); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core_Curve25519_Fe $edwardsY - * @param ParagonIE_Sodium_Core_Curve25519_Fe $edwardsZ - * @return ParagonIE_Sodium_Core_Curve25519_Fe - */ - public static function edwards_to_montgomery( - ParagonIE_Sodium_Core_Curve25519_Fe $edwardsY, - ParagonIE_Sodium_Core_Curve25519_Fe $edwardsZ - ) { - $tempX = self::fe_add($edwardsZ, $edwardsY); - $tempZ = self::fe_sub($edwardsZ, $edwardsY); - $tempZ = self::fe_invert($tempZ); - return self::fe_mul($tempX, $tempZ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $n - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_scalarmult_curve25519_ref10_base($n) - { - # for (i = 0;i < 32;++i) e[i] = n[i]; - $e = '' . $n; - - # e[0] &= 248; - $e[0] = self::intToChr( - self::chrToInt($e[0]) & 248 - ); - - # e[31] &= 127; - # e[31] |= 64; - $e[31] = self::intToChr( - (self::chrToInt($e[31]) & 127) | 64 - ); - - $A = self::ge_scalarmult_base($e); - if ( - !($A->Y instanceof ParagonIE_Sodium_Core_Curve25519_Fe) - || - !($A->Z instanceof ParagonIE_Sodium_Core_Curve25519_Fe) - ) { - throw new TypeError('Null points encountered'); - } - $pk = self::edwards_to_montgomery($A->Y, $A->Z); - return self::fe_tobytes($pk); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/XChaCha20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/XChaCha20.php deleted file mode 100644 index a737d1e3..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core/XChaCha20.php +++ /dev/null @@ -1,118 +0,0 @@ -> - */ - public static $sigma = array( - array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), - array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3), - array( 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4), - array( 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8), - array( 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13), - array( 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9), - array( 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11), - array( 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10), - array( 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5), - array( 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0), - array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), - array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3) - ); - - const BLOCKBYTES = 128; - const OUTBYTES = 64; - const KEYBYTES = 64; - - /** - * Turn two 32-bit integers into a fixed array representing a 64-bit integer. - * - * @internal You should not use this directly from another application - * - * @param int $high - * @param int $low - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public static function new64($high, $low) - { - return ParagonIE_Sodium_Core32_Int64::fromInts($low, $high); - } - - /** - * Convert an arbitrary number into an SplFixedArray of two 32-bit integers - * that represents a 64-bit integer. - * - * @internal You should not use this directly from another application - * - * @param int $num - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - protected static function to64($num) - { - list($hi, $lo) = self::numericTo64BitInteger($num); - return self::new64($hi, $lo); - } - - /** - * Adds two 64-bit integers together, returning their sum as a SplFixedArray - * containing two 32-bit integers (representing a 64-bit integer). - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Int64 $x - * @param ParagonIE_Sodium_Core32_Int64 $y - * @return ParagonIE_Sodium_Core32_Int64 - */ - protected static function add64($x, $y) - { - return $x->addInt64($y); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Int64 $x - * @param ParagonIE_Sodium_Core32_Int64 $y - * @param ParagonIE_Sodium_Core32_Int64 $z - * @return ParagonIE_Sodium_Core32_Int64 - */ - public static function add364($x, $y, $z) - { - return $x->addInt64($y)->addInt64($z); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Int64 $x - * @param ParagonIE_Sodium_Core32_Int64 $y - * @return ParagonIE_Sodium_Core32_Int64 - * @throws TypeError - */ - public static function xor64(ParagonIE_Sodium_Core32_Int64 $x, ParagonIE_Sodium_Core32_Int64 $y) - { - return $x->xorInt64($y); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Int64 $x - * @param int $c - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public static function rotr64(ParagonIE_Sodium_Core32_Int64 $x, $c) - { - return $x->rotateRight($c); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param int $i - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public static function load64($x, $i) - { - /** @var int $l */ - $l = (int) ($x[$i]) - | ((int) ($x[$i+1]) << 8) - | ((int) ($x[$i+2]) << 16) - | ((int) ($x[$i+3]) << 24); - /** @var int $h */ - $h = (int) ($x[$i+4]) - | ((int) ($x[$i+5]) << 8) - | ((int) ($x[$i+6]) << 16) - | ((int) ($x[$i+7]) << 24); - return self::new64($h, $l); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $x - * @param int $i - * @param ParagonIE_Sodium_Core32_Int64 $u - * @return void - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - */ - public static function store64(SplFixedArray $x, $i, ParagonIE_Sodium_Core32_Int64 $u) - { - $v = clone $u; - $maxLength = $x->getSize() - 1; - for ($j = 0; $j < 8; ++$j) { - $k = 3 - ($j >> 1); - $x[$i] = $v->limbs[$k] & 0xff; - if (++$i > $maxLength) { - return; - } - $v->limbs[$k] >>= 8; - } - } - - /** - * This just sets the $iv static variable. - * - * @internal You should not use this directly from another application - * - * @return void - * @throws SodiumException - * @throws TypeError - */ - public static function pseudoConstructor() - { - static $called = false; - if ($called) { - return; - } - self::$iv = new SplFixedArray(8); - self::$iv[0] = self::new64(0x6a09e667, 0xf3bcc908); - self::$iv[1] = self::new64(0xbb67ae85, 0x84caa73b); - self::$iv[2] = self::new64(0x3c6ef372, 0xfe94f82b); - self::$iv[3] = self::new64(0xa54ff53a, 0x5f1d36f1); - self::$iv[4] = self::new64(0x510e527f, 0xade682d1); - self::$iv[5] = self::new64(0x9b05688c, 0x2b3e6c1f); - self::$iv[6] = self::new64(0x1f83d9ab, 0xfb41bd6b); - self::$iv[7] = self::new64(0x5be0cd19, 0x137e2179); - - $called = true; - } - - /** - * Returns a fresh BLAKE2 context. - * - * @internal You should not use this directly from another application - * - * @return SplFixedArray - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - * @throws SodiumException - * @throws TypeError - */ - protected static function context() - { - $ctx = new SplFixedArray(6); - $ctx[0] = new SplFixedArray(8); // h - $ctx[1] = new SplFixedArray(2); // t - $ctx[2] = new SplFixedArray(2); // f - $ctx[3] = new SplFixedArray(256); // buf - $ctx[4] = 0; // buflen - $ctx[5] = 0; // last_node (uint8_t) - - for ($i = 8; $i--;) { - $ctx[0][$i] = self::$iv[$i]; - } - for ($i = 256; $i--;) { - $ctx[3][$i] = 0; - } - - $zero = self::new64(0, 0); - $ctx[1][0] = $zero; - $ctx[1][1] = $zero; - $ctx[2][0] = $zero; - $ctx[2][1] = $zero; - - return $ctx; - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param SplFixedArray $buf - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedAssignment - */ - protected static function compress(SplFixedArray $ctx, SplFixedArray $buf) - { - $m = new SplFixedArray(16); - $v = new SplFixedArray(16); - - for ($i = 16; $i--;) { - $m[$i] = self::load64($buf, $i << 3); - } - - for ($i = 8; $i--;) { - $v[$i] = $ctx[0][$i]; - } - - $v[ 8] = self::$iv[0]; - $v[ 9] = self::$iv[1]; - $v[10] = self::$iv[2]; - $v[11] = self::$iv[3]; - - $v[12] = self::xor64($ctx[1][0], self::$iv[4]); - $v[13] = self::xor64($ctx[1][1], self::$iv[5]); - $v[14] = self::xor64($ctx[2][0], self::$iv[6]); - $v[15] = self::xor64($ctx[2][1], self::$iv[7]); - - for ($r = 0; $r < 12; ++$r) { - $v = self::G($r, 0, 0, 4, 8, 12, $v, $m); - $v = self::G($r, 1, 1, 5, 9, 13, $v, $m); - $v = self::G($r, 2, 2, 6, 10, 14, $v, $m); - $v = self::G($r, 3, 3, 7, 11, 15, $v, $m); - $v = self::G($r, 4, 0, 5, 10, 15, $v, $m); - $v = self::G($r, 5, 1, 6, 11, 12, $v, $m); - $v = self::G($r, 6, 2, 7, 8, 13, $v, $m); - $v = self::G($r, 7, 3, 4, 9, 14, $v, $m); - } - - for ($i = 8; $i--;) { - $ctx[0][$i] = self::xor64( - $ctx[0][$i], self::xor64($v[$i], $v[$i+8]) - ); - } - } - - /** - * @internal You should not use this directly from another application - * - * @param int $r - * @param int $i - * @param int $a - * @param int $b - * @param int $c - * @param int $d - * @param SplFixedArray $v - * @param SplFixedArray $m - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayOffset - */ - public static function G($r, $i, $a, $b, $c, $d, SplFixedArray $v, SplFixedArray $m) - { - $v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][$i << 1]]); - $v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 32); - $v[$c] = self::add64($v[$c], $v[$d]); - $v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 24); - $v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][($i << 1) + 1]]); - $v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 16); - $v[$c] = self::add64($v[$c], $v[$d]); - $v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 63); - return $v; - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param int $inc - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - */ - public static function increment_counter($ctx, $inc) - { - if ($inc < 0) { - throw new SodiumException('Increasing by a negative number makes no sense.'); - } - $t = self::to64($inc); - # S->t is $ctx[1] in our implementation - - # S->t[0] = ( uint64_t )( t >> 0 ); - $ctx[1][0] = self::add64($ctx[1][0], $t); - - # S->t[1] += ( S->t[0] < inc ); - if (!($ctx[1][0] instanceof ParagonIE_Sodium_Core32_Int64)) { - throw new TypeError('Not an int64'); - } - /** @var ParagonIE_Sodium_Core32_Int64 $c*/ - $c = $ctx[1][0]; - if ($c->isLessThanInt($inc)) { - $ctx[1][1] = self::add64($ctx[1][1], self::to64(1)); - } - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param SplFixedArray $p - * @param int $plen - * @return void - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - * @psalm-suppress MixedMethodCall - * @psalm-suppress MixedOperand - */ - public static function update(SplFixedArray $ctx, SplFixedArray $p, $plen) - { - self::pseudoConstructor(); - - $offset = 0; - while ($plen > 0) { - $left = $ctx[4]; - $fill = 256 - $left; - - if ($plen > $fill) { - # memcpy( S->buf + left, in, fill ); /* Fill buffer */ - for ($i = $fill; $i--;) { - $ctx[3][$i + $left] = $p[$i + $offset]; - } - - # S->buflen += fill; - $ctx[4] += $fill; - - # blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES ); - self::increment_counter($ctx, 128); - - # blake2b_compress( S, S->buf ); /* Compress */ - self::compress($ctx, $ctx[3]); - - # memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); /* Shift buffer left */ - for ($i = 128; $i--;) { - $ctx[3][$i] = $ctx[3][$i + 128]; - } - - # S->buflen -= BLAKE2B_BLOCKBYTES; - $ctx[4] -= 128; - - # in += fill; - $offset += $fill; - - # inlen -= fill; - $plen -= $fill; - } else { - for ($i = $plen; $i--;) { - $ctx[3][$i + $left] = $p[$i + $offset]; - } - $ctx[4] += $plen; - $offset += $plen; - $plen -= $plen; - } - } - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @param SplFixedArray $out - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedArrayOffset - * @psalm-suppress MixedMethodCall - * @psalm-suppress MixedOperand - */ - public static function finish(SplFixedArray $ctx, SplFixedArray $out) - { - self::pseudoConstructor(); - if ($ctx[4] > 128) { - self::increment_counter($ctx, 128); - self::compress($ctx, $ctx[3]); - $ctx[4] -= 128; - if ($ctx[4] > 128) { - throw new SodiumException('Failed to assert that buflen <= 128 bytes'); - } - for ($i = $ctx[4]; $i--;) { - $ctx[3][$i] = $ctx[3][$i + 128]; - } - } - - self::increment_counter($ctx, $ctx[4]); - $ctx[2][0] = self::new64(0xffffffff, 0xffffffff); - - for ($i = 256 - $ctx[4]; $i--;) { - /** @var int $i */ - $ctx[3][$i + $ctx[4]] = 0; - } - - self::compress($ctx, $ctx[3]); - - $i = (int) (($out->getSize() - 1) / 8); - for (; $i >= 0; --$i) { - self::store64($out, $i << 3, $ctx[0][$i]); - } - return $out; - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray|null $key - * @param int $outlen - * @param SplFixedArray|null $salt - * @param SplFixedArray|null $personal - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedMethodCall - */ - public static function init( - $key = null, - $outlen = 64, - $salt = null, - $personal = null - ) { - self::pseudoConstructor(); - $klen = 0; - - if ($key !== null) { - if (count($key) > 64) { - throw new SodiumException('Invalid key size'); - } - $klen = count($key); - } - - if ($outlen > 64) { - throw new SodiumException('Invalid output size'); - } - - $ctx = self::context(); - - $p = new SplFixedArray(64); - // Zero our param buffer... - for ($i = 64; --$i;) { - $p[$i] = 0; - } - - $p[0] = $outlen; // digest_length - $p[1] = $klen; // key_length - $p[2] = 1; // fanout - $p[3] = 1; // depth - - if ($salt instanceof SplFixedArray) { - // salt: [32] through [47] - for ($i = 0; $i < 16; ++$i) { - $p[32 + $i] = (int) $salt[$i]; - } - } - if ($personal instanceof SplFixedArray) { - // personal: [48] through [63] - for ($i = 0; $i < 16; ++$i) { - $p[48 + $i] = (int) $personal[$i]; - } - } - - $ctx[0][0] = self::xor64( - $ctx[0][0], - self::load64($p, 0) - ); - - if ($salt instanceof SplFixedArray || $personal instanceof SplFixedArray) { - // We need to do what blake2b_init_param() does: - for ($i = 1; $i < 8; ++$i) { - $ctx[0][$i] = self::xor64( - $ctx[0][$i], - self::load64($p, $i << 3) - ); - } - } - - if ($klen > 0 && $key instanceof SplFixedArray) { - $block = new SplFixedArray(128); - for ($i = 128; $i--;) { - $block[$i] = 0; - } - for ($i = $klen; $i--;) { - $block[$i] = $key[$i]; - } - self::update($ctx, $block, 128); - $ctx[4] = 128; - } - - return $ctx; - } - - /** - * Convert a string into an SplFixedArray of integers - * - * @internal You should not use this directly from another application - * - * @param string $str - * @return SplFixedArray - * @psalm-suppress MixedArgumentTypeCoercion - */ - public static function stringToSplFixedArray($str = '') - { - $values = unpack('C*', $str); - return SplFixedArray::fromArray(array_values($values)); - } - - /** - * Convert an SplFixedArray of integers into a string - * - * @internal You should not use this directly from another application - * - * @param SplFixedArray $a - * @return string - */ - public static function SplFixedArrayToString(SplFixedArray $a) - { - /** - * @var array - */ - $arr = $a->toArray(); - $c = $a->count(); - array_unshift($arr, str_repeat('C', $c)); - return (string) (call_user_func_array('pack', $arr)); - } - - /** - * @internal You should not use this directly from another application - * - * @param SplFixedArray $ctx - * @return string - * @throws TypeError - * @psalm-suppress MixedArgument - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - * @psalm-suppress MixedMethodCall - */ - public static function contextToString(SplFixedArray $ctx) - { - $str = ''; - /** @var array $ctxA */ - $ctxA = $ctx[0]->toArray(); - - # uint64_t h[8]; - for ($i = 0; $i < 8; ++$i) { - if (!($ctxA[$i] instanceof ParagonIE_Sodium_Core32_Int64)) { - throw new TypeError('Not an instance of Int64'); - } - /** @var ParagonIE_Sodium_Core32_Int64 $ctxAi */ - $ctxAi = $ctxA[$i]; - $str .= $ctxAi->toReverseString(); - } - - # uint64_t t[2]; - # uint64_t f[2]; - for ($i = 1; $i < 3; ++$i) { - /** @var array $ctxA */ - $ctxA = $ctx[$i]->toArray(); - /** @var ParagonIE_Sodium_Core32_Int64 $ctxA1 */ - $ctxA1 = $ctxA[0]; - /** @var ParagonIE_Sodium_Core32_Int64 $ctxA2 */ - $ctxA2 = $ctxA[1]; - - $str .= $ctxA1->toReverseString(); - $str .= $ctxA2->toReverseString(); - } - - # uint8_t buf[2 * 128]; - $str .= self::SplFixedArrayToString($ctx[3]); - - /** @var int $ctx4 */ - $ctx4 = $ctx[4]; - - # size_t buflen; - $str .= implode('', array( - self::intToChr($ctx4 & 0xff), - self::intToChr(($ctx4 >> 8) & 0xff), - self::intToChr(($ctx4 >> 16) & 0xff), - self::intToChr(($ctx4 >> 24) & 0xff), - "\x00\x00\x00\x00" - /* - self::intToChr(($ctx4 >> 32) & 0xff), - self::intToChr(($ctx4 >> 40) & 0xff), - self::intToChr(($ctx4 >> 48) & 0xff), - self::intToChr(($ctx4 >> 56) & 0xff) - */ - )); - # uint8_t last_node; - return $str . self::intToChr($ctx[5]) . str_repeat("\x00", 23); - } - - /** - * Creates an SplFixedArray containing other SplFixedArray elements, from - * a string (compatible with \Sodium\crypto_generichash_{init, update, final}) - * - * @internal You should not use this directly from another application - * - * @param string $string - * @return SplFixedArray - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayAssignment - */ - public static function stringToContext($string) - { - $ctx = self::context(); - - # uint64_t h[8]; - for ($i = 0; $i < 8; ++$i) { - $ctx[0][$i] = ParagonIE_Sodium_Core32_Int64::fromReverseString( - self::substr($string, (($i << 3) + 0), 8) - ); - } - - # uint64_t t[2]; - # uint64_t f[2]; - for ($i = 1; $i < 3; ++$i) { - $ctx[$i][1] = ParagonIE_Sodium_Core32_Int64::fromReverseString( - self::substr($string, 72 + (($i - 1) << 4), 8) - ); - $ctx[$i][0] = ParagonIE_Sodium_Core32_Int64::fromReverseString( - self::substr($string, 64 + (($i - 1) << 4), 8) - ); - } - - # uint8_t buf[2 * 128]; - $ctx[3] = self::stringToSplFixedArray(self::substr($string, 96, 256)); - - # uint8_t buf[2 * 128]; - $int = 0; - for ($i = 0; $i < 8; ++$i) { - $int |= self::chrToInt($string[352 + $i]) << ($i << 3); - } - $ctx[4] = $int; - - return $ctx; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20.php deleted file mode 100644 index 26ff38e9..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20.php +++ /dev/null @@ -1,401 +0,0 @@ - - * @throws SodiumException - * @throws TypeError - */ - protected static function quarterRound( - ParagonIE_Sodium_Core32_Int32 $a, - ParagonIE_Sodium_Core32_Int32 $b, - ParagonIE_Sodium_Core32_Int32 $c, - ParagonIE_Sodium_Core32_Int32 $d - ) { - /** @var ParagonIE_Sodium_Core32_Int32 $a */ - /** @var ParagonIE_Sodium_Core32_Int32 $b */ - /** @var ParagonIE_Sodium_Core32_Int32 $c */ - /** @var ParagonIE_Sodium_Core32_Int32 $d */ - - # a = PLUS(a,b); d = ROTATE(XOR(d,a),16); - $a = $a->addInt32($b); - $d = $d->xorInt32($a)->rotateLeft(16); - - # c = PLUS(c,d); b = ROTATE(XOR(b,c),12); - $c = $c->addInt32($d); - $b = $b->xorInt32($c)->rotateLeft(12); - - # a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); - $a = $a->addInt32($b); - $d = $d->xorInt32($a)->rotateLeft(8); - - # c = PLUS(c,d); b = ROTATE(XOR(b,c), 7); - $c = $c->addInt32($d); - $b = $b->xorInt32($c)->rotateLeft(7); - - return array($a, $b, $c, $d); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_ChaCha20_Ctx $ctx - * @param string $message - * - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function encryptBytes( - ParagonIE_Sodium_Core32_ChaCha20_Ctx $ctx, - $message = '' - ) { - $bytes = self::strlen($message); - - /** @var ParagonIE_Sodium_Core32_Int32 $x0 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x1 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x2 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x3 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x4 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x5 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x6 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x7 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x8 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x9 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x10 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x11 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x12 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x13 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x14 */ - /** @var ParagonIE_Sodium_Core32_Int32 $x15 */ - - /* - j0 = ctx->input[0]; - j1 = ctx->input[1]; - j2 = ctx->input[2]; - j3 = ctx->input[3]; - j4 = ctx->input[4]; - j5 = ctx->input[5]; - j6 = ctx->input[6]; - j7 = ctx->input[7]; - j8 = ctx->input[8]; - j9 = ctx->input[9]; - j10 = ctx->input[10]; - j11 = ctx->input[11]; - j12 = ctx->input[12]; - j13 = ctx->input[13]; - j14 = ctx->input[14]; - j15 = ctx->input[15]; - */ - /** @var ParagonIE_Sodium_Core32_Int32 $j0 */ - $j0 = $ctx[0]; - /** @var ParagonIE_Sodium_Core32_Int32 $j1 */ - $j1 = $ctx[1]; - /** @var ParagonIE_Sodium_Core32_Int32 $j2 */ - $j2 = $ctx[2]; - /** @var ParagonIE_Sodium_Core32_Int32 $j3 */ - $j3 = $ctx[3]; - /** @var ParagonIE_Sodium_Core32_Int32 $j4 */ - $j4 = $ctx[4]; - /** @var ParagonIE_Sodium_Core32_Int32 $j5 */ - $j5 = $ctx[5]; - /** @var ParagonIE_Sodium_Core32_Int32 $j6 */ - $j6 = $ctx[6]; - /** @var ParagonIE_Sodium_Core32_Int32 $j7 */ - $j7 = $ctx[7]; - /** @var ParagonIE_Sodium_Core32_Int32 $j8 */ - $j8 = $ctx[8]; - /** @var ParagonIE_Sodium_Core32_Int32 $j9 */ - $j9 = $ctx[9]; - /** @var ParagonIE_Sodium_Core32_Int32 $j10 */ - $j10 = $ctx[10]; - /** @var ParagonIE_Sodium_Core32_Int32 $j11 */ - $j11 = $ctx[11]; - /** @var ParagonIE_Sodium_Core32_Int32 $j12 */ - $j12 = $ctx[12]; - /** @var ParagonIE_Sodium_Core32_Int32 $j13 */ - $j13 = $ctx[13]; - /** @var ParagonIE_Sodium_Core32_Int32 $j14 */ - $j14 = $ctx[14]; - /** @var ParagonIE_Sodium_Core32_Int32 $j15 */ - $j15 = $ctx[15]; - - $c = ''; - for (;;) { - if ($bytes < 64) { - $message .= str_repeat("\x00", 64 - $bytes); - } - - $x0 = clone $j0; - $x1 = clone $j1; - $x2 = clone $j2; - $x3 = clone $j3; - $x4 = clone $j4; - $x5 = clone $j5; - $x6 = clone $j6; - $x7 = clone $j7; - $x8 = clone $j8; - $x9 = clone $j9; - $x10 = clone $j10; - $x11 = clone $j11; - $x12 = clone $j12; - $x13 = clone $j13; - $x14 = clone $j14; - $x15 = clone $j15; - - # for (i = 20; i > 0; i -= 2) { - for ($i = 20; $i > 0; $i -= 2) { - # QUARTERROUND( x0, x4, x8, x12) - list($x0, $x4, $x8, $x12) = self::quarterRound($x0, $x4, $x8, $x12); - - # QUARTERROUND( x1, x5, x9, x13) - list($x1, $x5, $x9, $x13) = self::quarterRound($x1, $x5, $x9, $x13); - - # QUARTERROUND( x2, x6, x10, x14) - list($x2, $x6, $x10, $x14) = self::quarterRound($x2, $x6, $x10, $x14); - - # QUARTERROUND( x3, x7, x11, x15) - list($x3, $x7, $x11, $x15) = self::quarterRound($x3, $x7, $x11, $x15); - - # QUARTERROUND( x0, x5, x10, x15) - list($x0, $x5, $x10, $x15) = self::quarterRound($x0, $x5, $x10, $x15); - - # QUARTERROUND( x1, x6, x11, x12) - list($x1, $x6, $x11, $x12) = self::quarterRound($x1, $x6, $x11, $x12); - - # QUARTERROUND( x2, x7, x8, x13) - list($x2, $x7, $x8, $x13) = self::quarterRound($x2, $x7, $x8, $x13); - - # QUARTERROUND( x3, x4, x9, x14) - list($x3, $x4, $x9, $x14) = self::quarterRound($x3, $x4, $x9, $x14); - } - /* - x0 = PLUS(x0, j0); - x1 = PLUS(x1, j1); - x2 = PLUS(x2, j2); - x3 = PLUS(x3, j3); - x4 = PLUS(x4, j4); - x5 = PLUS(x5, j5); - x6 = PLUS(x6, j6); - x7 = PLUS(x7, j7); - x8 = PLUS(x8, j8); - x9 = PLUS(x9, j9); - x10 = PLUS(x10, j10); - x11 = PLUS(x11, j11); - x12 = PLUS(x12, j12); - x13 = PLUS(x13, j13); - x14 = PLUS(x14, j14); - x15 = PLUS(x15, j15); - */ - $x0 = $x0->addInt32($j0); - $x1 = $x1->addInt32($j1); - $x2 = $x2->addInt32($j2); - $x3 = $x3->addInt32($j3); - $x4 = $x4->addInt32($j4); - $x5 = $x5->addInt32($j5); - $x6 = $x6->addInt32($j6); - $x7 = $x7->addInt32($j7); - $x8 = $x8->addInt32($j8); - $x9 = $x9->addInt32($j9); - $x10 = $x10->addInt32($j10); - $x11 = $x11->addInt32($j11); - $x12 = $x12->addInt32($j12); - $x13 = $x13->addInt32($j13); - $x14 = $x14->addInt32($j14); - $x15 = $x15->addInt32($j15); - - /* - x0 = XOR(x0, LOAD32_LE(m + 0)); - x1 = XOR(x1, LOAD32_LE(m + 4)); - x2 = XOR(x2, LOAD32_LE(m + 8)); - x3 = XOR(x3, LOAD32_LE(m + 12)); - x4 = XOR(x4, LOAD32_LE(m + 16)); - x5 = XOR(x5, LOAD32_LE(m + 20)); - x6 = XOR(x6, LOAD32_LE(m + 24)); - x7 = XOR(x7, LOAD32_LE(m + 28)); - x8 = XOR(x8, LOAD32_LE(m + 32)); - x9 = XOR(x9, LOAD32_LE(m + 36)); - x10 = XOR(x10, LOAD32_LE(m + 40)); - x11 = XOR(x11, LOAD32_LE(m + 44)); - x12 = XOR(x12, LOAD32_LE(m + 48)); - x13 = XOR(x13, LOAD32_LE(m + 52)); - x14 = XOR(x14, LOAD32_LE(m + 56)); - x15 = XOR(x15, LOAD32_LE(m + 60)); - */ - $x0 = $x0->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 0, 4))); - $x1 = $x1->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 4, 4))); - $x2 = $x2->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 8, 4))); - $x3 = $x3->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 12, 4))); - $x4 = $x4->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 16, 4))); - $x5 = $x5->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 20, 4))); - $x6 = $x6->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 24, 4))); - $x7 = $x7->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 28, 4))); - $x8 = $x8->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 32, 4))); - $x9 = $x9->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 36, 4))); - $x10 = $x10->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 40, 4))); - $x11 = $x11->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 44, 4))); - $x12 = $x12->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 48, 4))); - $x13 = $x13->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 52, 4))); - $x14 = $x14->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 56, 4))); - $x15 = $x15->xorInt32(ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 60, 4))); - - /* - j12 = PLUSONE(j12); - if (!j12) { - j13 = PLUSONE(j13); - } - */ - /** @var ParagonIE_Sodium_Core32_Int32 $j12 */ - $j12 = $j12->addInt(1); - if ($j12->limbs[0] === 0 && $j12->limbs[1] === 0) { - $j13 = $j13->addInt(1); - } - - /* - STORE32_LE(c + 0, x0); - STORE32_LE(c + 4, x1); - STORE32_LE(c + 8, x2); - STORE32_LE(c + 12, x3); - STORE32_LE(c + 16, x4); - STORE32_LE(c + 20, x5); - STORE32_LE(c + 24, x6); - STORE32_LE(c + 28, x7); - STORE32_LE(c + 32, x8); - STORE32_LE(c + 36, x9); - STORE32_LE(c + 40, x10); - STORE32_LE(c + 44, x11); - STORE32_LE(c + 48, x12); - STORE32_LE(c + 52, x13); - STORE32_LE(c + 56, x14); - STORE32_LE(c + 60, x15); - */ - - $block = $x0->toReverseString() . - $x1->toReverseString() . - $x2->toReverseString() . - $x3->toReverseString() . - $x4->toReverseString() . - $x5->toReverseString() . - $x6->toReverseString() . - $x7->toReverseString() . - $x8->toReverseString() . - $x9->toReverseString() . - $x10->toReverseString() . - $x11->toReverseString() . - $x12->toReverseString() . - $x13->toReverseString() . - $x14->toReverseString() . - $x15->toReverseString(); - - /* Partial block */ - if ($bytes < 64) { - $c .= self::substr($block, 0, $bytes); - break; - } - - /* Full block */ - $c .= $block; - $bytes -= 64; - if ($bytes <= 0) { - break; - } - $message = self::substr($message, 64); - } - /* end for(;;) loop */ - - $ctx[12] = $j12; - $ctx[13] = $j13; - return $c; - } - - /** - * @internal You should not use this directly from another application - * - * @param int $len - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function stream($len = 64, $nonce = '', $key = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core32_ChaCha20_Ctx($key, $nonce), - str_repeat("\x00", $len) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $len - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ietfStream($len, $nonce = '', $key = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core32_ChaCha20_IetfCtx($key, $nonce), - str_repeat("\x00", $len) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $nonce - * @param string $key - * @param string $ic - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ietfStreamXorIc($message, $nonce = '', $key = '', $ic = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core32_ChaCha20_IetfCtx($key, $nonce, $ic), - $message - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $nonce - * @param string $key - * @param string $ic - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function streamXorIc($message, $nonce = '', $key = '', $ic = '') - { - return self::encryptBytes( - new ParagonIE_Sodium_Core32_ChaCha20_Ctx($key, $nonce, $ic), - $message - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php deleted file mode 100644 index 828b3a0b..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php +++ /dev/null @@ -1,131 +0,0 @@ - - */ - protected $container; - - /** - * ParagonIE_Sodium_Core_ChaCha20_Ctx constructor. - * - * @internal You should not use this directly from another application - * - * @param string $key ChaCha20 key. - * @param string $iv Initialization Vector (a.k.a. nonce). - * @param string $counter The initial counter value. - * Defaults to 8 0x00 bytes. - * @throws InvalidArgumentException - * @throws SodiumException - * @throws TypeError - */ - public function __construct($key = '', $iv = '', $counter = '') - { - if (self::strlen($key) !== 32) { - throw new InvalidArgumentException('ChaCha20 expects a 256-bit key.'); - } - if (self::strlen($iv) !== 8) { - throw new InvalidArgumentException('ChaCha20 expects a 64-bit nonce.'); - } - $this->container = new SplFixedArray(16); - - /* "expand 32-byte k" as per ChaCha20 spec */ - $this->container[0] = new ParagonIE_Sodium_Core32_Int32(array(0x6170, 0x7865)); - $this->container[1] = new ParagonIE_Sodium_Core32_Int32(array(0x3320, 0x646e)); - $this->container[2] = new ParagonIE_Sodium_Core32_Int32(array(0x7962, 0x2d32)); - $this->container[3] = new ParagonIE_Sodium_Core32_Int32(array(0x6b20, 0x6574)); - - $this->container[4] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 0, 4)); - $this->container[5] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 4, 4)); - $this->container[6] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 8, 4)); - $this->container[7] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 12, 4)); - $this->container[8] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 16, 4)); - $this->container[9] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 20, 4)); - $this->container[10] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 24, 4)); - $this->container[11] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 28, 4)); - - if (empty($counter)) { - $this->container[12] = new ParagonIE_Sodium_Core32_Int32(); - $this->container[13] = new ParagonIE_Sodium_Core32_Int32(); - } else { - $this->container[12] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($counter, 0, 4)); - $this->container[13] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($counter, 4, 4)); - } - $this->container[14] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 0, 4)); - $this->container[15] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 4, 4)); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @param int|ParagonIE_Sodium_Core32_Int32 $value - * @return void - */ - #[ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (!is_int($offset)) { - throw new InvalidArgumentException('Expected an integer'); - } - if ($value instanceof ParagonIE_Sodium_Core32_Int32) { - /* - } elseif (is_int($value)) { - $value = ParagonIE_Sodium_Core32_Int32::fromInt($value); - */ - } else { - throw new InvalidArgumentException('Expected an integer'); - } - $this->container[$offset] = $value; - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return bool - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return void - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $offset - * @return mixed|null - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - return isset($this->container[$offset]) - ? $this->container[$offset] - : null; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php deleted file mode 100644 index ed390790..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php +++ /dev/null @@ -1,40 +0,0 @@ -container[12] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($counter, 0, 4)); - } - $this->container[13] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 0, 4)); - $this->container[14] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 4, 4)); - $this->container[15] = ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($iv, 8, 4)); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519.php deleted file mode 100644 index a38079f9..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519.php +++ /dev/null @@ -1,3162 +0,0 @@ -addInt32($g[$i]); - } - /** @var array $arr */ - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray($arr); - } - - /** - * Constant-time conditional move. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $g - * @param int $b - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedMethodCall - */ - public static function fe_cmov( - ParagonIE_Sodium_Core32_Curve25519_Fe $f, - ParagonIE_Sodium_Core32_Curve25519_Fe $g, - $b = 0 - ) { - /** @var array $h */ - $h = array(); - for ($i = 0; $i < 10; ++$i) { - if (!($f[$i] instanceof ParagonIE_Sodium_Core32_Int32)) { - throw new TypeError('Expected Int32'); - } - if (!($g[$i] instanceof ParagonIE_Sodium_Core32_Int32)) { - throw new TypeError('Expected Int32'); - } - $h[$i] = $f[$i]->xorInt32( - $f[$i]->xorInt32($g[$i])->mask($b) - ); - } - /** @var array $h */ - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray($h); - } - - /** - * Create a copy of a field element. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - */ - public static function fe_copy(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - $h = clone $f; - return $h; - } - - /** - * Give: 32-byte string. - * Receive: A field element object to use for internal calculations. - * - * @internal You should not use this directly from another application - * - * @param string $s - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws RangeException - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedMethodCall - */ - public static function fe_frombytes($s) - { - if (self::strlen($s) !== 32) { - throw new RangeException('Expected a 32-byte string.'); - } - /** @var ParagonIE_Sodium_Core32_Int32 $h0 */ - $h0 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_4($s) - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h1 */ - $h1 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 4, 3)) << 6 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h2 */ - $h2 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 7, 3)) << 5 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h3 */ - $h3 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 10, 3)) << 3 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h4 */ - $h4 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 13, 3)) << 2 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h5 */ - $h5 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_4(self::substr($s, 16, 4)) - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h6 */ - $h6 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 20, 3)) << 7 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h7 */ - $h7 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 23, 3)) << 5 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h8 */ - $h8 = ParagonIE_Sodium_Core32_Int32::fromInt( - self::load_3(self::substr($s, 26, 3)) << 4 - ); - /** @var ParagonIE_Sodium_Core32_Int32 $h9 */ - $h9 = ParagonIE_Sodium_Core32_Int32::fromInt( - (self::load_3(self::substr($s, 29, 3)) & 8388607) << 2 - ); - - $carry9 = $h9->addInt(1 << 24)->shiftRight(25); - $h0 = $h0->addInt32($carry9->mulInt(19, 5)); - $h9 = $h9->subInt32($carry9->shiftLeft(25)); - - $carry1 = $h1->addInt(1 << 24)->shiftRight(25); - $h2 = $h2->addInt32($carry1); - $h1 = $h1->subInt32($carry1->shiftLeft(25)); - - $carry3 = $h3->addInt(1 << 24)->shiftRight(25); - $h4 = $h4->addInt32($carry3); - $h3 = $h3->subInt32($carry3->shiftLeft(25)); - - $carry5 = $h5->addInt(1 << 24)->shiftRight(25); - $h6 = $h6->addInt32($carry5); - $h5 = $h5->subInt32($carry5->shiftLeft(25)); - - $carry7 = $h7->addInt(1 << 24)->shiftRight(25); - $h8 = $h8->addInt32($carry7); - $h7 = $h7->subInt32($carry7->shiftLeft(25)); - - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt32($carry0); - $h0 = $h0->subInt32($carry0->shiftLeft(26)); - - $carry2 = $h2->addInt(1 << 25)->shiftRight(26); - $h3 = $h3->addInt32($carry2); - $h2 = $h2->subInt32($carry2->shiftLeft(26)); - - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt32($carry4); - $h4 = $h4->subInt32($carry4->shiftLeft(26)); - - $carry6 = $h6->addInt(1 << 25)->shiftRight(26); - $h7 = $h7->addInt32($carry6); - $h6 = $h6->subInt32($carry6->shiftLeft(26)); - - $carry8 = $h8->addInt(1 << 25)->shiftRight(26); - $h9 = $h9->addInt32($carry8); - $h8 = $h8->subInt32($carry8->shiftLeft(26)); - - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array($h0, $h1, $h2,$h3, $h4, $h5, $h6, $h7, $h8, $h9) - ); - } - - /** - * Convert a field element to a byte string. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $h - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedMethodCall - */ - public static function fe_tobytes(ParagonIE_Sodium_Core32_Curve25519_Fe $h) - { - /** - * @var ParagonIE_Sodium_Core32_Int64[] $f - * @var ParagonIE_Sodium_Core32_Int64 $q - */ - $f = array(); - - for ($i = 0; $i < 10; ++$i) { - $f[$i] = $h[$i]->toInt64(); - } - - $q = $f[9]->mulInt(19, 5)->addInt(1 << 14)->shiftRight(25) - ->addInt64($f[0])->shiftRight(26) - ->addInt64($f[1])->shiftRight(25) - ->addInt64($f[2])->shiftRight(26) - ->addInt64($f[3])->shiftRight(25) - ->addInt64($f[4])->shiftRight(26) - ->addInt64($f[5])->shiftRight(25) - ->addInt64($f[6])->shiftRight(26) - ->addInt64($f[7])->shiftRight(25) - ->addInt64($f[8])->shiftRight(26) - ->addInt64($f[9])->shiftRight(25); - - $f[0] = $f[0]->addInt64($q->mulInt(19, 5)); - - $carry0 = $f[0]->shiftRight(26); - $f[1] = $f[1]->addInt64($carry0); - $f[0] = $f[0]->subInt64($carry0->shiftLeft(26)); - - $carry1 = $f[1]->shiftRight(25); - $f[2] = $f[2]->addInt64($carry1); - $f[1] = $f[1]->subInt64($carry1->shiftLeft(25)); - - $carry2 = $f[2]->shiftRight(26); - $f[3] = $f[3]->addInt64($carry2); - $f[2] = $f[2]->subInt64($carry2->shiftLeft(26)); - - $carry3 = $f[3]->shiftRight(25); - $f[4] = $f[4]->addInt64($carry3); - $f[3] = $f[3]->subInt64($carry3->shiftLeft(25)); - - $carry4 = $f[4]->shiftRight(26); - $f[5] = $f[5]->addInt64($carry4); - $f[4] = $f[4]->subInt64($carry4->shiftLeft(26)); - - $carry5 = $f[5]->shiftRight(25); - $f[6] = $f[6]->addInt64($carry5); - $f[5] = $f[5]->subInt64($carry5->shiftLeft(25)); - - $carry6 = $f[6]->shiftRight(26); - $f[7] = $f[7]->addInt64($carry6); - $f[6] = $f[6]->subInt64($carry6->shiftLeft(26)); - - $carry7 = $f[7]->shiftRight(25); - $f[8] = $f[8]->addInt64($carry7); - $f[7] = $f[7]->subInt64($carry7->shiftLeft(25)); - - $carry8 = $f[8]->shiftRight(26); - $f[9] = $f[9]->addInt64($carry8); - $f[8] = $f[8]->subInt64($carry8->shiftLeft(26)); - - $carry9 = $f[9]->shiftRight(25); - $f[9] = $f[9]->subInt64($carry9->shiftLeft(25)); - - $h0 = $f[0]->toInt32()->toInt(); - $h1 = $f[1]->toInt32()->toInt(); - $h2 = $f[2]->toInt32()->toInt(); - $h3 = $f[3]->toInt32()->toInt(); - $h4 = $f[4]->toInt32()->toInt(); - $h5 = $f[5]->toInt32()->toInt(); - $h6 = $f[6]->toInt32()->toInt(); - $h7 = $f[7]->toInt32()->toInt(); - $h8 = $f[8]->toInt32()->toInt(); - $h9 = $f[9]->toInt32()->toInt(); - - /** - * @var array - */ - $s = array( - (int) (($h0 >> 0) & 0xff), - (int) (($h0 >> 8) & 0xff), - (int) (($h0 >> 16) & 0xff), - (int) ((($h0 >> 24) | ($h1 << 2)) & 0xff), - (int) (($h1 >> 6) & 0xff), - (int) (($h1 >> 14) & 0xff), - (int) ((($h1 >> 22) | ($h2 << 3)) & 0xff), - (int) (($h2 >> 5) & 0xff), - (int) (($h2 >> 13) & 0xff), - (int) ((($h2 >> 21) | ($h3 << 5)) & 0xff), - (int) (($h3 >> 3) & 0xff), - (int) (($h3 >> 11) & 0xff), - (int) ((($h3 >> 19) | ($h4 << 6)) & 0xff), - (int) (($h4 >> 2) & 0xff), - (int) (($h4 >> 10) & 0xff), - (int) (($h4 >> 18) & 0xff), - (int) (($h5 >> 0) & 0xff), - (int) (($h5 >> 8) & 0xff), - (int) (($h5 >> 16) & 0xff), - (int) ((($h5 >> 24) | ($h6 << 1)) & 0xff), - (int) (($h6 >> 7) & 0xff), - (int) (($h6 >> 15) & 0xff), - (int) ((($h6 >> 23) | ($h7 << 3)) & 0xff), - (int) (($h7 >> 5) & 0xff), - (int) (($h7 >> 13) & 0xff), - (int) ((($h7 >> 21) | ($h8 << 4)) & 0xff), - (int) (($h8 >> 4) & 0xff), - (int) (($h8 >> 12) & 0xff), - (int) ((($h8 >> 20) | ($h9 << 6)) & 0xff), - (int) (($h9 >> 2) & 0xff), - (int) (($h9 >> 10) & 0xff), - (int) (($h9 >> 18) & 0xff) - ); - return self::intArrayToString($s); - } - - /** - * Is a field element negative? (1 = yes, 0 = no. Used in calculations.) - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return int - * @throws SodiumException - * @throws TypeError - */ - public static function fe_isnegative(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - $str = self::fe_tobytes($f); - return (int) (self::chrToInt($str[0]) & 1); - } - - /** - * Returns 0 if this field element results in all NUL bytes. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function fe_isnonzero(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - static $zero; - if ($zero === null) { - $zero = str_repeat("\x00", 32); - } - $str = self::fe_tobytes($f); - /** @var string $zero */ - return !self::verify_32($str, $zero); - } - - /** - * Multiply two field elements - * - * h = f * g - * - * @internal You should not use this directly from another application - * - * @security Is multiplication a source of timing leaks? If so, can we do - * anything to prevent that from happening? - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $g - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - */ - public static function fe_mul( - ParagonIE_Sodium_Core32_Curve25519_Fe $f, - ParagonIE_Sodium_Core32_Curve25519_Fe $g - ) { - /** - * @var ParagonIE_Sodium_Core32_Int32[] $f - * @var ParagonIE_Sodium_Core32_Int32[] $g - * @var ParagonIE_Sodium_Core32_Int64 $f0 - * @var ParagonIE_Sodium_Core32_Int64 $f1 - * @var ParagonIE_Sodium_Core32_Int64 $f2 - * @var ParagonIE_Sodium_Core32_Int64 $f3 - * @var ParagonIE_Sodium_Core32_Int64 $f4 - * @var ParagonIE_Sodium_Core32_Int64 $f5 - * @var ParagonIE_Sodium_Core32_Int64 $f6 - * @var ParagonIE_Sodium_Core32_Int64 $f7 - * @var ParagonIE_Sodium_Core32_Int64 $f8 - * @var ParagonIE_Sodium_Core32_Int64 $f9 - * @var ParagonIE_Sodium_Core32_Int64 $g0 - * @var ParagonIE_Sodium_Core32_Int64 $g1 - * @var ParagonIE_Sodium_Core32_Int64 $g2 - * @var ParagonIE_Sodium_Core32_Int64 $g3 - * @var ParagonIE_Sodium_Core32_Int64 $g4 - * @var ParagonIE_Sodium_Core32_Int64 $g5 - * @var ParagonIE_Sodium_Core32_Int64 $g6 - * @var ParagonIE_Sodium_Core32_Int64 $g7 - * @var ParagonIE_Sodium_Core32_Int64 $g8 - * @var ParagonIE_Sodium_Core32_Int64 $g9 - */ - $f0 = $f[0]->toInt64(); - $f1 = $f[1]->toInt64(); - $f2 = $f[2]->toInt64(); - $f3 = $f[3]->toInt64(); - $f4 = $f[4]->toInt64(); - $f5 = $f[5]->toInt64(); - $f6 = $f[6]->toInt64(); - $f7 = $f[7]->toInt64(); - $f8 = $f[8]->toInt64(); - $f9 = $f[9]->toInt64(); - $g0 = $g[0]->toInt64(); - $g1 = $g[1]->toInt64(); - $g2 = $g[2]->toInt64(); - $g3 = $g[3]->toInt64(); - $g4 = $g[4]->toInt64(); - $g5 = $g[5]->toInt64(); - $g6 = $g[6]->toInt64(); - $g7 = $g[7]->toInt64(); - $g8 = $g[8]->toInt64(); - $g9 = $g[9]->toInt64(); - $g1_19 = $g1->mulInt(19, 5); /* 2^4 <= 19 <= 2^5, but we only want 5 bits */ - $g2_19 = $g2->mulInt(19, 5); - $g3_19 = $g3->mulInt(19, 5); - $g4_19 = $g4->mulInt(19, 5); - $g5_19 = $g5->mulInt(19, 5); - $g6_19 = $g6->mulInt(19, 5); - $g7_19 = $g7->mulInt(19, 5); - $g8_19 = $g8->mulInt(19, 5); - $g9_19 = $g9->mulInt(19, 5); - $f1_2 = $f1->shiftLeft(1); - $f3_2 = $f3->shiftLeft(1); - $f5_2 = $f5->shiftLeft(1); - $f7_2 = $f7->shiftLeft(1); - $f9_2 = $f9->shiftLeft(1); - $f0g0 = $f0->mulInt64($g0, 27); - $f0g1 = $f0->mulInt64($g1, 27); - $f0g2 = $f0->mulInt64($g2, 27); - $f0g3 = $f0->mulInt64($g3, 27); - $f0g4 = $f0->mulInt64($g4, 27); - $f0g5 = $f0->mulInt64($g5, 27); - $f0g6 = $f0->mulInt64($g6, 27); - $f0g7 = $f0->mulInt64($g7, 27); - $f0g8 = $f0->mulInt64($g8, 27); - $f0g9 = $f0->mulInt64($g9, 27); - $f1g0 = $f1->mulInt64($g0, 27); - $f1g1_2 = $f1_2->mulInt64($g1, 27); - $f1g2 = $f1->mulInt64($g2, 27); - $f1g3_2 = $f1_2->mulInt64($g3, 27); - $f1g4 = $f1->mulInt64($g4, 30); - $f1g5_2 = $f1_2->mulInt64($g5, 30); - $f1g6 = $f1->mulInt64($g6, 30); - $f1g7_2 = $f1_2->mulInt64($g7, 30); - $f1g8 = $f1->mulInt64($g8, 30); - $f1g9_38 = $g9_19->mulInt64($f1_2, 30); - $f2g0 = $f2->mulInt64($g0, 30); - $f2g1 = $f2->mulInt64($g1, 29); - $f2g2 = $f2->mulInt64($g2, 30); - $f2g3 = $f2->mulInt64($g3, 29); - $f2g4 = $f2->mulInt64($g4, 30); - $f2g5 = $f2->mulInt64($g5, 29); - $f2g6 = $f2->mulInt64($g6, 30); - $f2g7 = $f2->mulInt64($g7, 29); - $f2g8_19 = $g8_19->mulInt64($f2, 30); - $f2g9_19 = $g9_19->mulInt64($f2, 30); - $f3g0 = $f3->mulInt64($g0, 30); - $f3g1_2 = $f3_2->mulInt64($g1, 30); - $f3g2 = $f3->mulInt64($g2, 30); - $f3g3_2 = $f3_2->mulInt64($g3, 30); - $f3g4 = $f3->mulInt64($g4, 30); - $f3g5_2 = $f3_2->mulInt64($g5, 30); - $f3g6 = $f3->mulInt64($g6, 30); - $f3g7_38 = $g7_19->mulInt64($f3_2, 30); - $f3g8_19 = $g8_19->mulInt64($f3, 30); - $f3g9_38 = $g9_19->mulInt64($f3_2, 30); - $f4g0 = $f4->mulInt64($g0, 30); - $f4g1 = $f4->mulInt64($g1, 30); - $f4g2 = $f4->mulInt64($g2, 30); - $f4g3 = $f4->mulInt64($g3, 30); - $f4g4 = $f4->mulInt64($g4, 30); - $f4g5 = $f4->mulInt64($g5, 30); - $f4g6_19 = $g6_19->mulInt64($f4, 30); - $f4g7_19 = $g7_19->mulInt64($f4, 30); - $f4g8_19 = $g8_19->mulInt64($f4, 30); - $f4g9_19 = $g9_19->mulInt64($f4, 30); - $f5g0 = $f5->mulInt64($g0, 30); - $f5g1_2 = $f5_2->mulInt64($g1, 30); - $f5g2 = $f5->mulInt64($g2, 30); - $f5g3_2 = $f5_2->mulInt64($g3, 30); - $f5g4 = $f5->mulInt64($g4, 30); - $f5g5_38 = $g5_19->mulInt64($f5_2, 30); - $f5g6_19 = $g6_19->mulInt64($f5, 30); - $f5g7_38 = $g7_19->mulInt64($f5_2, 30); - $f5g8_19 = $g8_19->mulInt64($f5, 30); - $f5g9_38 = $g9_19->mulInt64($f5_2, 30); - $f6g0 = $f6->mulInt64($g0, 30); - $f6g1 = $f6->mulInt64($g1, 30); - $f6g2 = $f6->mulInt64($g2, 30); - $f6g3 = $f6->mulInt64($g3, 30); - $f6g4_19 = $g4_19->mulInt64($f6, 30); - $f6g5_19 = $g5_19->mulInt64($f6, 30); - $f6g6_19 = $g6_19->mulInt64($f6, 30); - $f6g7_19 = $g7_19->mulInt64($f6, 30); - $f6g8_19 = $g8_19->mulInt64($f6, 30); - $f6g9_19 = $g9_19->mulInt64($f6, 30); - $f7g0 = $f7->mulInt64($g0, 30); - $f7g1_2 = $g1->mulInt64($f7_2, 30); - $f7g2 = $f7->mulInt64($g2, 30); - $f7g3_38 = $g3_19->mulInt64($f7_2, 30); - $f7g4_19 = $g4_19->mulInt64($f7, 30); - $f7g5_38 = $g5_19->mulInt64($f7_2, 30); - $f7g6_19 = $g6_19->mulInt64($f7, 30); - $f7g7_38 = $g7_19->mulInt64($f7_2, 30); - $f7g8_19 = $g8_19->mulInt64($f7, 30); - $f7g9_38 = $g9_19->mulInt64($f7_2, 30); - $f8g0 = $f8->mulInt64($g0, 30); - $f8g1 = $f8->mulInt64($g1, 29); - $f8g2_19 = $g2_19->mulInt64($f8, 30); - $f8g3_19 = $g3_19->mulInt64($f8, 30); - $f8g4_19 = $g4_19->mulInt64($f8, 30); - $f8g5_19 = $g5_19->mulInt64($f8, 30); - $f8g6_19 = $g6_19->mulInt64($f8, 30); - $f8g7_19 = $g7_19->mulInt64($f8, 30); - $f8g8_19 = $g8_19->mulInt64($f8, 30); - $f8g9_19 = $g9_19->mulInt64($f8, 30); - $f9g0 = $f9->mulInt64($g0, 30); - $f9g1_38 = $g1_19->mulInt64($f9_2, 30); - $f9g2_19 = $g2_19->mulInt64($f9, 30); - $f9g3_38 = $g3_19->mulInt64($f9_2, 30); - $f9g4_19 = $g4_19->mulInt64($f9, 30); - $f9g5_38 = $g5_19->mulInt64($f9_2, 30); - $f9g6_19 = $g6_19->mulInt64($f9, 30); - $f9g7_38 = $g7_19->mulInt64($f9_2, 30); - $f9g8_19 = $g8_19->mulInt64($f9, 30); - $f9g9_38 = $g9_19->mulInt64($f9_2, 30); - - // $h0 = $f0g0 + $f1g9_38 + $f2g8_19 + $f3g7_38 + $f4g6_19 + $f5g5_38 + $f6g4_19 + $f7g3_38 + $f8g2_19 + $f9g1_38; - $h0 = $f0g0->addInt64($f1g9_38)->addInt64($f2g8_19)->addInt64($f3g7_38) - ->addInt64($f4g6_19)->addInt64($f5g5_38)->addInt64($f6g4_19) - ->addInt64($f7g3_38)->addInt64($f8g2_19)->addInt64($f9g1_38); - - // $h1 = $f0g1 + $f1g0 + $f2g9_19 + $f3g8_19 + $f4g7_19 + $f5g6_19 + $f6g5_19 + $f7g4_19 + $f8g3_19 + $f9g2_19; - $h1 = $f0g1->addInt64($f1g0)->addInt64($f2g9_19)->addInt64($f3g8_19) - ->addInt64($f4g7_19)->addInt64($f5g6_19)->addInt64($f6g5_19) - ->addInt64($f7g4_19)->addInt64($f8g3_19)->addInt64($f9g2_19); - - // $h2 = $f0g2 + $f1g1_2 + $f2g0 + $f3g9_38 + $f4g8_19 + $f5g7_38 + $f6g6_19 + $f7g5_38 + $f8g4_19 + $f9g3_38; - $h2 = $f0g2->addInt64($f1g1_2)->addInt64($f2g0)->addInt64($f3g9_38) - ->addInt64($f4g8_19)->addInt64($f5g7_38)->addInt64($f6g6_19) - ->addInt64($f7g5_38)->addInt64($f8g4_19)->addInt64($f9g3_38); - - // $h3 = $f0g3 + $f1g2 + $f2g1 + $f3g0 + $f4g9_19 + $f5g8_19 + $f6g7_19 + $f7g6_19 + $f8g5_19 + $f9g4_19; - $h3 = $f0g3->addInt64($f1g2)->addInt64($f2g1)->addInt64($f3g0) - ->addInt64($f4g9_19)->addInt64($f5g8_19)->addInt64($f6g7_19) - ->addInt64($f7g6_19)->addInt64($f8g5_19)->addInt64($f9g4_19); - - // $h4 = $f0g4 + $f1g3_2 + $f2g2 + $f3g1_2 + $f4g0 + $f5g9_38 + $f6g8_19 + $f7g7_38 + $f8g6_19 + $f9g5_38; - $h4 = $f0g4->addInt64($f1g3_2)->addInt64($f2g2)->addInt64($f3g1_2) - ->addInt64($f4g0)->addInt64($f5g9_38)->addInt64($f6g8_19) - ->addInt64($f7g7_38)->addInt64($f8g6_19)->addInt64($f9g5_38); - - // $h5 = $f0g5 + $f1g4 + $f2g3 + $f3g2 + $f4g1 + $f5g0 + $f6g9_19 + $f7g8_19 + $f8g7_19 + $f9g6_19; - $h5 = $f0g5->addInt64($f1g4)->addInt64($f2g3)->addInt64($f3g2) - ->addInt64($f4g1)->addInt64($f5g0)->addInt64($f6g9_19) - ->addInt64($f7g8_19)->addInt64($f8g7_19)->addInt64($f9g6_19); - - // $h6 = $f0g6 + $f1g5_2 + $f2g4 + $f3g3_2 + $f4g2 + $f5g1_2 + $f6g0 + $f7g9_38 + $f8g8_19 + $f9g7_38; - $h6 = $f0g6->addInt64($f1g5_2)->addInt64($f2g4)->addInt64($f3g3_2) - ->addInt64($f4g2)->addInt64($f5g1_2)->addInt64($f6g0) - ->addInt64($f7g9_38)->addInt64($f8g8_19)->addInt64($f9g7_38); - - // $h7 = $f0g7 + $f1g6 + $f2g5 + $f3g4 + $f4g3 + $f5g2 + $f6g1 + $f7g0 + $f8g9_19 + $f9g8_19; - $h7 = $f0g7->addInt64($f1g6)->addInt64($f2g5)->addInt64($f3g4) - ->addInt64($f4g3)->addInt64($f5g2)->addInt64($f6g1) - ->addInt64($f7g0)->addInt64($f8g9_19)->addInt64($f9g8_19); - - // $h8 = $f0g8 + $f1g7_2 + $f2g6 + $f3g5_2 + $f4g4 + $f5g3_2 + $f6g2 + $f7g1_2 + $f8g0 + $f9g9_38; - $h8 = $f0g8->addInt64($f1g7_2)->addInt64($f2g6)->addInt64($f3g5_2) - ->addInt64($f4g4)->addInt64($f5g3_2)->addInt64($f6g2) - ->addInt64($f7g1_2)->addInt64($f8g0)->addInt64($f9g9_38); - - // $h9 = $f0g9 + $f1g8 + $f2g7 + $f3g6 + $f4g5 + $f5g4 + $f6g3 + $f7g2 + $f8g1 + $f9g0 ; - $h9 = $f0g9->addInt64($f1g8)->addInt64($f2g7)->addInt64($f3g6) - ->addInt64($f4g5)->addInt64($f5g4)->addInt64($f6g3) - ->addInt64($f7g2)->addInt64($f8g1)->addInt64($f9g0); - - /** - * @var ParagonIE_Sodium_Core32_Int64 $h0 - * @var ParagonIE_Sodium_Core32_Int64 $h1 - * @var ParagonIE_Sodium_Core32_Int64 $h2 - * @var ParagonIE_Sodium_Core32_Int64 $h3 - * @var ParagonIE_Sodium_Core32_Int64 $h4 - * @var ParagonIE_Sodium_Core32_Int64 $h5 - * @var ParagonIE_Sodium_Core32_Int64 $h6 - * @var ParagonIE_Sodium_Core32_Int64 $h7 - * @var ParagonIE_Sodium_Core32_Int64 $h8 - * @var ParagonIE_Sodium_Core32_Int64 $h9 - * @var ParagonIE_Sodium_Core32_Int64 $carry0 - * @var ParagonIE_Sodium_Core32_Int64 $carry1 - * @var ParagonIE_Sodium_Core32_Int64 $carry2 - * @var ParagonIE_Sodium_Core32_Int64 $carry3 - * @var ParagonIE_Sodium_Core32_Int64 $carry4 - * @var ParagonIE_Sodium_Core32_Int64 $carry5 - * @var ParagonIE_Sodium_Core32_Int64 $carry6 - * @var ParagonIE_Sodium_Core32_Int64 $carry7 - * @var ParagonIE_Sodium_Core32_Int64 $carry8 - * @var ParagonIE_Sodium_Core32_Int64 $carry9 - */ - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt64($carry0); - $h0 = $h0->subInt64($carry0->shiftLeft(26)); - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt64($carry4); - $h4 = $h4->subInt64($carry4->shiftLeft(26)); - - $carry1 = $h1->addInt(1 << 24)->shiftRight(25); - $h2 = $h2->addInt64($carry1); - $h1 = $h1->subInt64($carry1->shiftLeft(25)); - $carry5 = $h5->addInt(1 << 24)->shiftRight(25); - $h6 = $h6->addInt64($carry5); - $h5 = $h5->subInt64($carry5->shiftLeft(25)); - - $carry2 = $h2->addInt(1 << 25)->shiftRight(26); - $h3 = $h3->addInt64($carry2); - $h2 = $h2->subInt64($carry2->shiftLeft(26)); - $carry6 = $h6->addInt(1 << 25)->shiftRight(26); - $h7 = $h7->addInt64($carry6); - $h6 = $h6->subInt64($carry6->shiftLeft(26)); - - $carry3 = $h3->addInt(1 << 24)->shiftRight(25); - $h4 = $h4->addInt64($carry3); - $h3 = $h3->subInt64($carry3->shiftLeft(25)); - $carry7 = $h7->addInt(1 << 24)->shiftRight(25); - $h8 = $h8->addInt64($carry7); - $h7 = $h7->subInt64($carry7->shiftLeft(25)); - - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt64($carry4); - $h4 = $h4->subInt64($carry4->shiftLeft(26)); - $carry8 = $h8->addInt(1 << 25)->shiftRight(26); - $h9 = $h9->addInt64($carry8); - $h8 = $h8->subInt64($carry8->shiftLeft(26)); - - $carry9 = $h9->addInt(1 << 24)->shiftRight(25); - $h0 = $h0->addInt64($carry9->mulInt(19, 5)); - $h9 = $h9->subInt64($carry9->shiftLeft(25)); - - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt64($carry0); - $h0 = $h0->subInt64($carry0->shiftLeft(26)); - - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - $h0->toInt32(), - $h1->toInt32(), - $h2->toInt32(), - $h3->toInt32(), - $h4->toInt32(), - $h5->toInt32(), - $h6->toInt32(), - $h7->toInt32(), - $h8->toInt32(), - $h9->toInt32() - ) - ); - } - - /** - * Get the negative values for each piece of the field element. - * - * h = -f - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedMethodCall - */ - public static function fe_neg(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - $h = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - for ($i = 0; $i < 10; ++$i) { - $h[$i] = $h[$i]->subInt32($f[$i]); - } - return $h; - } - - /** - * Square a field element - * - * h = f * f - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedMethodCall - */ - public static function fe_sq(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - $f0 = $f[0]->toInt64(); - $f1 = $f[1]->toInt64(); - $f2 = $f[2]->toInt64(); - $f3 = $f[3]->toInt64(); - $f4 = $f[4]->toInt64(); - $f5 = $f[5]->toInt64(); - $f6 = $f[6]->toInt64(); - $f7 = $f[7]->toInt64(); - $f8 = $f[8]->toInt64(); - $f9 = $f[9]->toInt64(); - - $f0_2 = $f0->shiftLeft(1); - $f1_2 = $f1->shiftLeft(1); - $f2_2 = $f2->shiftLeft(1); - $f3_2 = $f3->shiftLeft(1); - $f4_2 = $f4->shiftLeft(1); - $f5_2 = $f5->shiftLeft(1); - $f6_2 = $f6->shiftLeft(1); - $f7_2 = $f7->shiftLeft(1); - $f5_38 = $f5->mulInt(38, 6); - $f6_19 = $f6->mulInt(19, 5); - $f7_38 = $f7->mulInt(38, 6); - $f8_19 = $f8->mulInt(19, 5); - $f9_38 = $f9->mulInt(38, 6); - - $f0f0 = $f0->mulInt64($f0, 28); - $f0f1_2 = $f0_2->mulInt64($f1, 28); - $f0f2_2 = $f0_2->mulInt64($f2, 28); - $f0f3_2 = $f0_2->mulInt64($f3, 28); - $f0f4_2 = $f0_2->mulInt64($f4, 28); - $f0f5_2 = $f0_2->mulInt64($f5, 28); - $f0f6_2 = $f0_2->mulInt64($f6, 28); - $f0f7_2 = $f0_2->mulInt64($f7, 28); - $f0f8_2 = $f0_2->mulInt64($f8, 28); - $f0f9_2 = $f0_2->mulInt64($f9, 28); - - $f1f1_2 = $f1_2->mulInt64($f1, 28); - $f1f2_2 = $f1_2->mulInt64($f2, 28); - $f1f3_4 = $f1_2->mulInt64($f3_2, 28); - $f1f4_2 = $f1_2->mulInt64($f4, 28); - $f1f5_4 = $f1_2->mulInt64($f5_2, 30); - $f1f6_2 = $f1_2->mulInt64($f6, 28); - $f1f7_4 = $f1_2->mulInt64($f7_2, 28); - $f1f8_2 = $f1_2->mulInt64($f8, 28); - $f1f9_76 = $f9_38->mulInt64($f1_2, 30); - - $f2f2 = $f2->mulInt64($f2, 28); - $f2f3_2 = $f2_2->mulInt64($f3, 28); - $f2f4_2 = $f2_2->mulInt64($f4, 28); - $f2f5_2 = $f2_2->mulInt64($f5, 28); - $f2f6_2 = $f2_2->mulInt64($f6, 28); - $f2f7_2 = $f2_2->mulInt64($f7, 28); - $f2f8_38 = $f8_19->mulInt64($f2_2, 30); - $f2f9_38 = $f9_38->mulInt64($f2, 30); - - $f3f3_2 = $f3_2->mulInt64($f3, 28); - $f3f4_2 = $f3_2->mulInt64($f4, 28); - $f3f5_4 = $f3_2->mulInt64($f5_2, 30); - $f3f6_2 = $f3_2->mulInt64($f6, 28); - $f3f7_76 = $f7_38->mulInt64($f3_2, 30); - $f3f8_38 = $f8_19->mulInt64($f3_2, 30); - $f3f9_76 = $f9_38->mulInt64($f3_2, 30); - - $f4f4 = $f4->mulInt64($f4, 28); - $f4f5_2 = $f4_2->mulInt64($f5, 28); - $f4f6_38 = $f6_19->mulInt64($f4_2, 30); - $f4f7_38 = $f7_38->mulInt64($f4, 30); - $f4f8_38 = $f8_19->mulInt64($f4_2, 30); - $f4f9_38 = $f9_38->mulInt64($f4, 30); - - $f5f5_38 = $f5_38->mulInt64($f5, 30); - $f5f6_38 = $f6_19->mulInt64($f5_2, 30); - $f5f7_76 = $f7_38->mulInt64($f5_2, 30); - $f5f8_38 = $f8_19->mulInt64($f5_2, 30); - $f5f9_76 = $f9_38->mulInt64($f5_2, 30); - - $f6f6_19 = $f6_19->mulInt64($f6, 30); - $f6f7_38 = $f7_38->mulInt64($f6, 30); - $f6f8_38 = $f8_19->mulInt64($f6_2, 30); - $f6f9_38 = $f9_38->mulInt64($f6, 30); - - $f7f7_38 = $f7_38->mulInt64($f7, 28); - $f7f8_38 = $f8_19->mulInt64($f7_2, 30); - $f7f9_76 = $f9_38->mulInt64($f7_2, 30); - - $f8f8_19 = $f8_19->mulInt64($f8, 30); - $f8f9_38 = $f9_38->mulInt64($f8, 30); - - $f9f9_38 = $f9_38->mulInt64($f9, 28); - - $h0 = $f0f0->addInt64($f1f9_76)->addInt64($f2f8_38)->addInt64($f3f7_76)->addInt64($f4f6_38)->addInt64($f5f5_38); - $h1 = $f0f1_2->addInt64($f2f9_38)->addInt64($f3f8_38)->addInt64($f4f7_38)->addInt64($f5f6_38); - $h2 = $f0f2_2->addInt64($f1f1_2)->addInt64($f3f9_76)->addInt64($f4f8_38)->addInt64($f5f7_76)->addInt64($f6f6_19); - $h3 = $f0f3_2->addInt64($f1f2_2)->addInt64($f4f9_38)->addInt64($f5f8_38)->addInt64($f6f7_38); - $h4 = $f0f4_2->addInt64($f1f3_4)->addInt64($f2f2)->addInt64($f5f9_76)->addInt64($f6f8_38)->addInt64($f7f7_38); - $h5 = $f0f5_2->addInt64($f1f4_2)->addInt64($f2f3_2)->addInt64($f6f9_38)->addInt64($f7f8_38); - $h6 = $f0f6_2->addInt64($f1f5_4)->addInt64($f2f4_2)->addInt64($f3f3_2)->addInt64($f7f9_76)->addInt64($f8f8_19); - $h7 = $f0f7_2->addInt64($f1f6_2)->addInt64($f2f5_2)->addInt64($f3f4_2)->addInt64($f8f9_38); - $h8 = $f0f8_2->addInt64($f1f7_4)->addInt64($f2f6_2)->addInt64($f3f5_4)->addInt64($f4f4)->addInt64($f9f9_38); - $h9 = $f0f9_2->addInt64($f1f8_2)->addInt64($f2f7_2)->addInt64($f3f6_2)->addInt64($f4f5_2); - - /** - * @var ParagonIE_Sodium_Core32_Int64 $h0 - * @var ParagonIE_Sodium_Core32_Int64 $h1 - * @var ParagonIE_Sodium_Core32_Int64 $h2 - * @var ParagonIE_Sodium_Core32_Int64 $h3 - * @var ParagonIE_Sodium_Core32_Int64 $h4 - * @var ParagonIE_Sodium_Core32_Int64 $h5 - * @var ParagonIE_Sodium_Core32_Int64 $h6 - * @var ParagonIE_Sodium_Core32_Int64 $h7 - * @var ParagonIE_Sodium_Core32_Int64 $h8 - * @var ParagonIE_Sodium_Core32_Int64 $h9 - */ - - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt64($carry0); - $h0 = $h0->subInt64($carry0->shiftLeft(26)); - - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt64($carry4); - $h4 = $h4->subInt64($carry4->shiftLeft(26)); - - $carry1 = $h1->addInt(1 << 24)->shiftRight(25); - $h2 = $h2->addInt64($carry1); - $h1 = $h1->subInt64($carry1->shiftLeft(25)); - - $carry5 = $h5->addInt(1 << 24)->shiftRight(25); - $h6 = $h6->addInt64($carry5); - $h5 = $h5->subInt64($carry5->shiftLeft(25)); - - $carry2 = $h2->addInt(1 << 25)->shiftRight(26); - $h3 = $h3->addInt64($carry2); - $h2 = $h2->subInt64($carry2->shiftLeft(26)); - - $carry6 = $h6->addInt(1 << 25)->shiftRight(26); - $h7 = $h7->addInt64($carry6); - $h6 = $h6->subInt64($carry6->shiftLeft(26)); - - $carry3 = $h3->addInt(1 << 24)->shiftRight(25); - $h4 = $h4->addInt64($carry3); - $h3 = $h3->subInt64($carry3->shiftLeft(25)); - - $carry7 = $h7->addInt(1 << 24)->shiftRight(25); - $h8 = $h8->addInt64($carry7); - $h7 = $h7->subInt64($carry7->shiftLeft(25)); - - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt64($carry4); - $h4 = $h4->subInt64($carry4->shiftLeft(26)); - - $carry8 = $h8->addInt(1 << 25)->shiftRight(26); - $h9 = $h9->addInt64($carry8); - $h8 = $h8->subInt64($carry8->shiftLeft(26)); - - $carry9 = $h9->addInt(1 << 24)->shiftRight(25); - $h0 = $h0->addInt64($carry9->mulInt(19, 5)); - $h9 = $h9->subInt64($carry9->shiftLeft(25)); - - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt64($carry0); - $h0 = $h0->subInt64($carry0->shiftLeft(26)); - - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - $h0->toInt32(), - $h1->toInt32(), - $h2->toInt32(), - $h3->toInt32(), - $h4->toInt32(), - $h5->toInt32(), - $h6->toInt32(), - $h7->toInt32(), - $h8->toInt32(), - $h9->toInt32() - ) - ); - } - - /** - * Square and double a field element - * - * h = 2 * f * f - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedMethodCall - */ - public static function fe_sq2(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - $f0 = $f[0]->toInt64(); - $f1 = $f[1]->toInt64(); - $f2 = $f[2]->toInt64(); - $f3 = $f[3]->toInt64(); - $f4 = $f[4]->toInt64(); - $f5 = $f[5]->toInt64(); - $f6 = $f[6]->toInt64(); - $f7 = $f[7]->toInt64(); - $f8 = $f[8]->toInt64(); - $f9 = $f[9]->toInt64(); - - $f0_2 = $f0->shiftLeft(1); - $f1_2 = $f1->shiftLeft(1); - $f2_2 = $f2->shiftLeft(1); - $f3_2 = $f3->shiftLeft(1); - $f4_2 = $f4->shiftLeft(1); - $f5_2 = $f5->shiftLeft(1); - $f6_2 = $f6->shiftLeft(1); - $f7_2 = $f7->shiftLeft(1); - $f5_38 = $f5->mulInt(38, 6); /* 1.959375*2^30 */ - $f6_19 = $f6->mulInt(19, 5); /* 1.959375*2^30 */ - $f7_38 = $f7->mulInt(38, 6); /* 1.959375*2^30 */ - $f8_19 = $f8->mulInt(19, 5); /* 1.959375*2^30 */ - $f9_38 = $f9->mulInt(38, 6); /* 1.959375*2^30 */ - $f0f0 = $f0->mulInt64($f0, 28); - $f0f1_2 = $f0_2->mulInt64($f1, 28); - $f0f2_2 = $f0_2->mulInt64($f2, 28); - $f0f3_2 = $f0_2->mulInt64($f3, 28); - $f0f4_2 = $f0_2->mulInt64($f4, 28); - $f0f5_2 = $f0_2->mulInt64($f5, 28); - $f0f6_2 = $f0_2->mulInt64($f6, 28); - $f0f7_2 = $f0_2->mulInt64($f7, 28); - $f0f8_2 = $f0_2->mulInt64($f8, 28); - $f0f9_2 = $f0_2->mulInt64($f9, 28); - $f1f1_2 = $f1_2->mulInt64($f1, 28); - $f1f2_2 = $f1_2->mulInt64($f2, 28); - $f1f3_4 = $f1_2->mulInt64($f3_2, 29); - $f1f4_2 = $f1_2->mulInt64($f4, 28); - $f1f5_4 = $f1_2->mulInt64($f5_2, 29); - $f1f6_2 = $f1_2->mulInt64($f6, 28); - $f1f7_4 = $f1_2->mulInt64($f7_2, 29); - $f1f8_2 = $f1_2->mulInt64($f8, 28); - $f1f9_76 = $f9_38->mulInt64($f1_2, 29); - $f2f2 = $f2->mulInt64($f2, 28); - $f2f3_2 = $f2_2->mulInt64($f3, 28); - $f2f4_2 = $f2_2->mulInt64($f4, 28); - $f2f5_2 = $f2_2->mulInt64($f5, 28); - $f2f6_2 = $f2_2->mulInt64($f6, 28); - $f2f7_2 = $f2_2->mulInt64($f7, 28); - $f2f8_38 = $f8_19->mulInt64($f2_2, 29); - $f2f9_38 = $f9_38->mulInt64($f2, 29); - $f3f3_2 = $f3_2->mulInt64($f3, 28); - $f3f4_2 = $f3_2->mulInt64($f4, 28); - $f3f5_4 = $f3_2->mulInt64($f5_2, 28); - $f3f6_2 = $f3_2->mulInt64($f6, 28); - $f3f7_76 = $f7_38->mulInt64($f3_2, 29); - $f3f8_38 = $f8_19->mulInt64($f3_2, 29); - $f3f9_76 = $f9_38->mulInt64($f3_2, 29); - $f4f4 = $f4->mulInt64($f4, 28); - $f4f5_2 = $f4_2->mulInt64($f5, 28); - $f4f6_38 = $f6_19->mulInt64($f4_2, 29); - $f4f7_38 = $f7_38->mulInt64($f4, 29); - $f4f8_38 = $f8_19->mulInt64($f4_2, 29); - $f4f9_38 = $f9_38->mulInt64($f4, 29); - $f5f5_38 = $f5_38->mulInt64($f5, 29); - $f5f6_38 = $f6_19->mulInt64($f5_2, 29); - $f5f7_76 = $f7_38->mulInt64($f5_2, 29); - $f5f8_38 = $f8_19->mulInt64($f5_2, 29); - $f5f9_76 = $f9_38->mulInt64($f5_2, 29); - $f6f6_19 = $f6_19->mulInt64($f6, 29); - $f6f7_38 = $f7_38->mulInt64($f6, 29); - $f6f8_38 = $f8_19->mulInt64($f6_2, 29); - $f6f9_38 = $f9_38->mulInt64($f6, 29); - $f7f7_38 = $f7_38->mulInt64($f7, 29); - $f7f8_38 = $f8_19->mulInt64($f7_2, 29); - $f7f9_76 = $f9_38->mulInt64($f7_2, 29); - $f8f8_19 = $f8_19->mulInt64($f8, 29); - $f8f9_38 = $f9_38->mulInt64($f8, 29); - $f9f9_38 = $f9_38->mulInt64($f9, 29); - - $h0 = $f0f0->addInt64($f1f9_76)->addInt64($f2f8_38)->addInt64($f3f7_76)->addInt64($f4f6_38)->addInt64($f5f5_38); - $h1 = $f0f1_2->addInt64($f2f9_38)->addInt64($f3f8_38)->addInt64($f4f7_38)->addInt64($f5f6_38); - $h2 = $f0f2_2->addInt64($f1f1_2)->addInt64($f3f9_76)->addInt64($f4f8_38)->addInt64($f5f7_76)->addInt64($f6f6_19); - $h3 = $f0f3_2->addInt64($f1f2_2)->addInt64($f4f9_38)->addInt64($f5f8_38)->addInt64($f6f7_38); - $h4 = $f0f4_2->addInt64($f1f3_4)->addInt64($f2f2)->addInt64($f5f9_76)->addInt64($f6f8_38)->addInt64($f7f7_38); - $h5 = $f0f5_2->addInt64($f1f4_2)->addInt64($f2f3_2)->addInt64($f6f9_38)->addInt64($f7f8_38); - $h6 = $f0f6_2->addInt64($f1f5_4)->addInt64($f2f4_2)->addInt64($f3f3_2)->addInt64($f7f9_76)->addInt64($f8f8_19); - $h7 = $f0f7_2->addInt64($f1f6_2)->addInt64($f2f5_2)->addInt64($f3f4_2)->addInt64($f8f9_38); - $h8 = $f0f8_2->addInt64($f1f7_4)->addInt64($f2f6_2)->addInt64($f3f5_4)->addInt64($f4f4)->addInt64($f9f9_38); - $h9 = $f0f9_2->addInt64($f1f8_2)->addInt64($f2f7_2)->addInt64($f3f6_2)->addInt64($f4f5_2); - - /** - * @var ParagonIE_Sodium_Core32_Int64 $h0 - * @var ParagonIE_Sodium_Core32_Int64 $h1 - * @var ParagonIE_Sodium_Core32_Int64 $h2 - * @var ParagonIE_Sodium_Core32_Int64 $h3 - * @var ParagonIE_Sodium_Core32_Int64 $h4 - * @var ParagonIE_Sodium_Core32_Int64 $h5 - * @var ParagonIE_Sodium_Core32_Int64 $h6 - * @var ParagonIE_Sodium_Core32_Int64 $h7 - * @var ParagonIE_Sodium_Core32_Int64 $h8 - * @var ParagonIE_Sodium_Core32_Int64 $h9 - */ - $h0 = $h0->shiftLeft(1); - $h1 = $h1->shiftLeft(1); - $h2 = $h2->shiftLeft(1); - $h3 = $h3->shiftLeft(1); - $h4 = $h4->shiftLeft(1); - $h5 = $h5->shiftLeft(1); - $h6 = $h6->shiftLeft(1); - $h7 = $h7->shiftLeft(1); - $h8 = $h8->shiftLeft(1); - $h9 = $h9->shiftLeft(1); - - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt64($carry0); - $h0 = $h0->subInt64($carry0->shiftLeft(26)); - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt64($carry4); - $h4 = $h4->subInt64($carry4->shiftLeft(26)); - - $carry1 = $h1->addInt(1 << 24)->shiftRight(25); - $h2 = $h2->addInt64($carry1); - $h1 = $h1->subInt64($carry1->shiftLeft(25)); - $carry5 = $h5->addInt(1 << 24)->shiftRight(25); - $h6 = $h6->addInt64($carry5); - $h5 = $h5->subInt64($carry5->shiftLeft(25)); - - $carry2 = $h2->addInt(1 << 25)->shiftRight(26); - $h3 = $h3->addInt64($carry2); - $h2 = $h2->subInt64($carry2->shiftLeft(26)); - $carry6 = $h6->addInt(1 << 25)->shiftRight(26); - $h7 = $h7->addInt64($carry6); - $h6 = $h6->subInt64($carry6->shiftLeft(26)); - - $carry3 = $h3->addInt(1 << 24)->shiftRight(25); - $h4 = $h4->addInt64($carry3); - $h3 = $h3->subInt64($carry3->shiftLeft(25)); - $carry7 = $h7->addInt(1 << 24)->shiftRight(25); - $h8 = $h8->addInt64($carry7); - $h7 = $h7->subInt64($carry7->shiftLeft(25)); - - $carry4 = $h4->addInt(1 << 25)->shiftRight(26); - $h5 = $h5->addInt64($carry4); - $h4 = $h4->subInt64($carry4->shiftLeft(26)); - $carry8 = $h8->addInt(1 << 25)->shiftRight(26); - $h9 = $h9->addInt64($carry8); - $h8 = $h8->subInt64($carry8->shiftLeft(26)); - - $carry9 = $h9->addInt(1 << 24)->shiftRight(25); - $h0 = $h0->addInt64($carry9->mulInt(19, 5)); - $h9 = $h9->subInt64($carry9->shiftLeft(25)); - - $carry0 = $h0->addInt(1 << 25)->shiftRight(26); - $h1 = $h1->addInt64($carry0); - $h0 = $h0->subInt64($carry0->shiftLeft(26)); - - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - $h0->toInt32(), - $h1->toInt32(), - $h2->toInt32(), - $h3->toInt32(), - $h4->toInt32(), - $h5->toInt32(), - $h6->toInt32(), - $h7->toInt32(), - $h8->toInt32(), - $h9->toInt32() - ) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $Z - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - */ - public static function fe_invert(ParagonIE_Sodium_Core32_Curve25519_Fe $Z) - { - $z = clone $Z; - $t0 = self::fe_sq($z); - $t1 = self::fe_sq($t0); - $t1 = self::fe_sq($t1); - $t1 = self::fe_mul($z, $t1); - $t0 = self::fe_mul($t0, $t1); - $t2 = self::fe_sq($t0); - $t1 = self::fe_mul($t1, $t2); - $t2 = self::fe_sq($t1); - for ($i = 1; $i < 5; ++$i) { - $t2 = self::fe_sq($t2); - } - $t1 = self::fe_mul($t2, $t1); - $t2 = self::fe_sq($t1); - for ($i = 1; $i < 10; ++$i) { - $t2 = self::fe_sq($t2); - } - $t2 = self::fe_mul($t2, $t1); - $t3 = self::fe_sq($t2); - for ($i = 1; $i < 20; ++$i) { - $t3 = self::fe_sq($t3); - } - $t2 = self::fe_mul($t3, $t2); - $t2 = self::fe_sq($t2); - for ($i = 1; $i < 10; ++$i) { - $t2 = self::fe_sq($t2); - } - $t1 = self::fe_mul($t2, $t1); - $t2 = self::fe_sq($t1); - for ($i = 1; $i < 50; ++$i) { - $t2 = self::fe_sq($t2); - } - $t2 = self::fe_mul($t2, $t1); - $t3 = self::fe_sq($t2); - for ($i = 1; $i < 100; ++$i) { - $t3 = self::fe_sq($t3); - } - $t2 = self::fe_mul($t3, $t2); - $t2 = self::fe_sq($t2); - for ($i = 1; $i < 50; ++$i) { - $t2 = self::fe_sq($t2); - } - $t1 = self::fe_mul($t2, $t1); - $t1 = self::fe_sq($t1); - for ($i = 1; $i < 5; ++$i) { - $t1 = self::fe_sq($t1); - } - return self::fe_mul($t1, $t0); - } - - /** - * @internal You should not use this directly from another application - * - * @ref https://github.com/jedisct1/libsodium/blob/68564326e1e9dc57ef03746f85734232d20ca6fb/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c#L1054-L1106 - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $z - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - */ - public static function fe_pow22523(ParagonIE_Sodium_Core32_Curve25519_Fe $z) - { - # fe_sq(t0, z); - # fe_sq(t1, t0); - # fe_sq(t1, t1); - # fe_mul(t1, z, t1); - # fe_mul(t0, t0, t1); - # fe_sq(t0, t0); - # fe_mul(t0, t1, t0); - # fe_sq(t1, t0); - $t0 = self::fe_sq($z); - $t1 = self::fe_sq($t0); - $t1 = self::fe_sq($t1); - $t1 = self::fe_mul($z, $t1); - $t0 = self::fe_mul($t0, $t1); - $t0 = self::fe_sq($t0); - $t0 = self::fe_mul($t1, $t0); - $t1 = self::fe_sq($t0); - - # for (i = 1; i < 5; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 5; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t0, t1, t0); - # fe_sq(t1, t0); - $t0 = self::fe_mul($t1, $t0); - $t1 = self::fe_sq($t0); - - # for (i = 1; i < 10; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 10; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t1, t1, t0); - # fe_sq(t2, t1); - $t1 = self::fe_mul($t1, $t0); - $t2 = self::fe_sq($t1); - - # for (i = 1; i < 20; ++i) { - # fe_sq(t2, t2); - # } - for ($i = 1; $i < 20; ++$i) { - $t2 = self::fe_sq($t2); - } - - # fe_mul(t1, t2, t1); - # fe_sq(t1, t1); - $t1 = self::fe_mul($t2, $t1); - $t1 = self::fe_sq($t1); - - # for (i = 1; i < 10; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 10; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t0, t1, t0); - # fe_sq(t1, t0); - $t0 = self::fe_mul($t1, $t0); - $t1 = self::fe_sq($t0); - - # for (i = 1; i < 50; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 50; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t1, t1, t0); - # fe_sq(t2, t1); - $t1 = self::fe_mul($t1, $t0); - $t2 = self::fe_sq($t1); - - # for (i = 1; i < 100; ++i) { - # fe_sq(t2, t2); - # } - for ($i = 1; $i < 100; ++$i) { - $t2 = self::fe_sq($t2); - } - - # fe_mul(t1, t2, t1); - # fe_sq(t1, t1); - $t1 = self::fe_mul($t2, $t1); - $t1 = self::fe_sq($t1); - - # for (i = 1; i < 50; ++i) { - # fe_sq(t1, t1); - # } - for ($i = 1; $i < 50; ++$i) { - $t1 = self::fe_sq($t1); - } - - # fe_mul(t0, t1, t0); - # fe_sq(t0, t0); - # fe_sq(t0, t0); - # fe_mul(out, t0, z); - $t0 = self::fe_mul($t1, $t0); - $t0 = self::fe_sq($t0); - $t0 = self::fe_sq($t0); - return self::fe_mul($t0, $z); - } - - /** - * Subtract two field elements. - * - * h = f - g - * - * Preconditions: - * |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - * |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. - * - * Postconditions: - * |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $g - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedMethodCall - * @psalm-suppress MixedTypeCoercion - */ - public static function fe_sub(ParagonIE_Sodium_Core32_Curve25519_Fe $f, ParagonIE_Sodium_Core32_Curve25519_Fe $g) - { - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - $f[0]->subInt32($g[0]), - $f[1]->subInt32($g[1]), - $f[2]->subInt32($g[2]), - $f[3]->subInt32($g[3]), - $f[4]->subInt32($g[4]), - $f[5]->subInt32($g[5]), - $f[6]->subInt32($g[6]), - $f[7]->subInt32($g[7]), - $f[8]->subInt32($g[8]), - $f[9]->subInt32($g[9]) - ) - ); - } - - /** - * Add two group elements. - * - * r = p + q - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_Cached $q - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_add( - ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core32_Curve25519_Ge_Cached $q - ) { - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1(); - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->YplusX); - $r->Y = self::fe_mul($r->Y, $q->YminusX); - $r->T = self::fe_mul($q->T2d, $p->T); - $r->X = self::fe_mul($p->Z, $q->Z); - $t0 = self::fe_add($r->X, $r->X); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_add($t0, $r->T); - $r->T = self::fe_sub($t0, $r->T); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @ref https://github.com/jedisct1/libsodium/blob/157c4a80c13b117608aeae12178b2d38825f9f8f/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c#L1185-L1215 - * @param string $a - * @return array - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayOffset - */ - public static function slide($a) - { - if (self::strlen($a) < 256) { - if (self::strlen($a) < 16) { - $a = str_pad($a, 256, '0', STR_PAD_RIGHT); - } - } - /** @var array $r */ - $r = array(); - for ($i = 0; $i < 256; ++$i) { - $r[$i] = (int) (1 & - ( - self::chrToInt($a[$i >> 3]) - >> - ($i & 7) - ) - ); - } - - for ($i = 0;$i < 256;++$i) { - if ($r[$i]) { - for ($b = 1;$b <= 6 && $i + $b < 256;++$b) { - if ($r[$i + $b]) { - if ($r[$i] + ($r[$i + $b] << $b) <= 15) { - $r[$i] += $r[$i + $b] << $b; - $r[$i + $b] = 0; - } elseif ($r[$i] - ($r[$i + $b] << $b) >= -15) { - $r[$i] -= $r[$i + $b] << $b; - for ($k = $i + $b; $k < 256; ++$k) { - if (!$r[$k]) { - $r[$k] = 1; - break; - } - $r[$k] = 0; - } - } else { - break; - } - } - } - } - } - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $s - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_frombytes_negate_vartime($s) - { - static $d = null; - if (!$d) { - $d = ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[0]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[1]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[2]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[3]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[4]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[5]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[6]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[7]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[8]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d[9]) - ) - ); - } - /** @var ParagonIE_Sodium_Core32_Curve25519_Fe $d */ - - # fe_frombytes(h->Y,s); - # fe_1(h->Z); - $h = new ParagonIE_Sodium_Core32_Curve25519_Ge_P3( - self::fe_0(), - self::fe_frombytes($s), - self::fe_1() - ); - - # fe_sq(u,h->Y); - # fe_mul(v,u,d); - # fe_sub(u,u,h->Z); /* u = y^2-1 */ - # fe_add(v,v,h->Z); /* v = dy^2+1 */ - $u = self::fe_sq($h->Y); - /** @var ParagonIE_Sodium_Core32_Curve25519_Fe $d */ - $v = self::fe_mul($u, $d); - $u = self::fe_sub($u, $h->Z); /* u = y^2 - 1 */ - $v = self::fe_add($v, $h->Z); /* v = dy^2 + 1 */ - - # fe_sq(v3,v); - # fe_mul(v3,v3,v); /* v3 = v^3 */ - # fe_sq(h->X,v3); - # fe_mul(h->X,h->X,v); - # fe_mul(h->X,h->X,u); /* x = uv^7 */ - $v3 = self::fe_sq($v); - $v3 = self::fe_mul($v3, $v); /* v3 = v^3 */ - $h->X = self::fe_sq($v3); - $h->X = self::fe_mul($h->X, $v); - $h->X = self::fe_mul($h->X, $u); /* x = uv^7 */ - - # fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */ - # fe_mul(h->X,h->X,v3); - # fe_mul(h->X,h->X,u); /* x = uv^3(uv^7)^((q-5)/8) */ - $h->X = self::fe_pow22523($h->X); /* x = (uv^7)^((q-5)/8) */ - $h->X = self::fe_mul($h->X, $v3); - $h->X = self::fe_mul($h->X, $u); /* x = uv^3(uv^7)^((q-5)/8) */ - - # fe_sq(vxx,h->X); - # fe_mul(vxx,vxx,v); - # fe_sub(check,vxx,u); /* vx^2-u */ - $vxx = self::fe_sq($h->X); - $vxx = self::fe_mul($vxx, $v); - $check = self::fe_sub($vxx, $u); /* vx^2 - u */ - - # if (fe_isnonzero(check)) { - # fe_add(check,vxx,u); /* vx^2+u */ - # if (fe_isnonzero(check)) { - # return -1; - # } - # fe_mul(h->X,h->X,sqrtm1); - # } - if (self::fe_isnonzero($check)) { - $check = self::fe_add($vxx, $u); /* vx^2 + u */ - if (self::fe_isnonzero($check)) { - throw new RangeException('Internal check failed.'); - } - $h->X = self::fe_mul( - $h->X, - ParagonIE_Sodium_Core32_Curve25519_Fe::fromIntArray(self::$sqrtm1) - ); - } - - # if (fe_isnegative(h->X) == (s[31] >> 7)) { - # fe_neg(h->X,h->X); - # } - $i = self::chrToInt($s[31]); - if (self::fe_isnegative($h->X) === ($i >> 7)) { - $h->X = self::fe_neg($h->X); - } - - # fe_mul(h->T,h->X,h->Y); - $h->T = self::fe_mul($h->X, $h->Y); - return $h; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $R - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $q - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_madd( - ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $R, - ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $q - ) { - $r = clone $R; - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->yplusx); - $r->Y = self::fe_mul($r->Y, $q->yminusx); - $r->T = self::fe_mul($q->xy2d, $p->T); - $t0 = self::fe_add(clone $p->Z, clone $p->Z); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_add($t0, $r->T); - $r->T = self::fe_sub($t0, $r->T); - - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $R - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $q - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_msub( - ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $R, - ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $q - ) { - $r = clone $R; - - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->yminusx); - $r->Y = self::fe_mul($r->Y, $q->yplusx); - $r->T = self::fe_mul($q->xy2d, $p->T); - $t0 = self::fe_add($p->Z, $p->Z); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_sub($t0, $r->T); - $r->T = self::fe_add($t0, $r->T); - - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $p - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P2 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p1p1_to_p2(ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $p) - { - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_P2(); - $r->X = self::fe_mul($p->X, $p->T); - $r->Y = self::fe_mul($p->Y, $p->Z); - $r->Z = self::fe_mul($p->Z, $p->T); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $p - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p1p1_to_p3(ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 $p) - { - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_P3(); - $r->X = self::fe_mul($p->X, $p->T); - $r->Y = self::fe_mul($p->Y, $p->Z); - $r->Z = self::fe_mul($p->Z, $p->T); - $r->T = self::fe_mul($p->X, $p->Y); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P2 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p2_0() - { - return new ParagonIE_Sodium_Core32_Curve25519_Ge_P2( - self::fe_0(), - self::fe_1(), - self::fe_1() - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $p - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p2_dbl(ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $p) - { - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1(); - - $r->X = self::fe_sq($p->X); - $r->Z = self::fe_sq($p->Y); - $r->T = self::fe_sq2($p->Z); - $r->Y = self::fe_add($p->X, $p->Y); - $t0 = self::fe_sq($r->Y); - $r->Y = self::fe_add($r->Z, $r->X); - $r->Z = self::fe_sub($r->Z, $r->X); - $r->X = self::fe_sub($t0, $r->Y); - $r->T = self::fe_sub($r->T, $r->Z); - - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p3_0() - { - return new ParagonIE_Sodium_Core32_Curve25519_Ge_P3( - self::fe_0(), - self::fe_1(), - self::fe_1(), - self::fe_0() - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_Cached - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p3_to_cached(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p) - { - static $d2 = null; - if ($d2 === null) { - $d2 = ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[0]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[1]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[2]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[3]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[4]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[5]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[6]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[7]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[8]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$d2[9]) - ) - ); - } - /** @var ParagonIE_Sodium_Core32_Curve25519_Fe $d2 */ - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_Cached(); - $r->YplusX = self::fe_add($p->Y, $p->X); - $r->YminusX = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_copy($p->Z); - $r->T2d = self::fe_mul($p->T, $d2); - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P2 - */ - public static function ge_p3_to_p2(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p) - { - return new ParagonIE_Sodium_Core32_Curve25519_Ge_P2( - $p->X, - $p->Y, - $p->Z - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $h - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p3_tobytes(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $h) - { - $recip = self::fe_invert($h->Z); - $x = self::fe_mul($h->X, $recip); - $y = self::fe_mul($h->Y, $recip); - $s = self::fe_tobytes($y); - $s[31] = self::intToChr( - self::chrToInt($s[31]) ^ (self::fe_isnegative($x) << 7) - ); - return $s; - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_p3_dbl(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p) - { - $q = self::ge_p3_to_p2($p); - return self::ge_p2_dbl($q); - } - - /** - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp - * @throws SodiumException - * @throws TypeError - */ - public static function ge_precomp_0() - { - return new ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp( - self::fe_1(), - self::fe_1(), - self::fe_0() - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $b - * @param int $c - * @return int - * @psalm-suppress MixedReturnStatement - */ - public static function equal($b, $c) - { - $b0 = $b & 0xffff; - $b1 = ($b >> 16) & 0xffff; - $c0 = $c & 0xffff; - $c1 = ($c >> 16) & 0xffff; - - $d0 = (($b0 ^ $c0) - 1) >> 31; - $d1 = (($b1 ^ $c1) - 1) >> 31; - return ($d0 & $d1) & 1; - } - - /** - * @internal You should not use this directly from another application - * - * @param string|int $char - * @return int (1 = yes, 0 = no) - * @throws SodiumException - * @throws TypeError - */ - public static function negative($char) - { - if (is_int($char)) { - return $char < 0 ? 1 : 0; - } - /** @var string $char */ - $x = self::chrToInt(self::substr($char, 0, 1)); - return (int) ($x >> 31); - } - - /** - * Conditional move - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $t - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $u - * @param int $b - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp - * @throws SodiumException - * @throws TypeError - */ - public static function cmov( - ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $t, - ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $u, - $b - ) { - if (!is_int($b)) { - throw new InvalidArgumentException('Expected an integer.'); - } - return new ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp( - self::fe_cmov($t->yplusx, $u->yplusx, $b), - self::fe_cmov($t->yminusx, $u->yminusx, $b), - self::fe_cmov($t->xy2d, $u->xy2d, $b) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $pos - * @param int $b - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - * @psalm-suppress MixedArrayOffset - * @psalm-suppress MixedArgument - */ - public static function ge_select($pos = 0, $b = 0) - { - static $base = null; - if ($base === null) { - $base = array(); - foreach (self::$base as $i => $bas) { - for ($j = 0; $j < 8; ++$j) { - $base[$i][$j] = new ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp( - ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][0]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][1]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][2]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][3]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][4]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][5]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][6]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][7]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][8]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][0][9]) - ) - ), - ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][0]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][1]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][2]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][3]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][4]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][5]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][6]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][7]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][8]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][1][9]) - ) - ), - ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][0]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][1]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][2]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][3]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][4]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][5]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][6]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][7]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][8]), - ParagonIE_Sodium_Core32_Int32::fromInt($bas[$j][2][9]) - ) - ) - ); - } - } - } - if (!is_int($pos)) { - throw new InvalidArgumentException('Position must be an integer'); - } - if ($pos < 0 || $pos > 31) { - throw new RangeException('Position is out of range [0, 31]'); - } - - $bnegative = self::negative($b); - $babs = $b - (((-$bnegative) & $b) << 1); - - $t = self::ge_precomp_0(); - for ($i = 0; $i < 8; ++$i) { - $t = self::cmov( - $t, - $base[$pos][$i], - -self::equal($babs, $i + 1) - ); - } - $minusT = new ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp( - self::fe_copy($t->yminusx), - self::fe_copy($t->yplusx), - self::fe_neg($t->xy2d) - ); - return self::cmov($t, $minusT, -$bnegative); - } - - /** - * Subtract two group elements. - * - * r = p - q - * - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_Cached $q - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_sub( - ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $p, - ParagonIE_Sodium_Core32_Curve25519_Ge_Cached $q - ) { - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1(); - - $r->X = self::fe_add($p->Y, $p->X); - $r->Y = self::fe_sub($p->Y, $p->X); - $r->Z = self::fe_mul($r->X, $q->YminusX); - $r->Y = self::fe_mul($r->Y, $q->YplusX); - $r->T = self::fe_mul($q->T2d, $p->T); - $r->X = self::fe_mul($p->Z, $q->Z); - $t0 = self::fe_add($r->X, $r->X); - $r->X = self::fe_sub($r->Z, $r->Y); - $r->Y = self::fe_add($r->Z, $r->Y); - $r->Z = self::fe_sub($t0, $r->T); - $r->T = self::fe_add($t0, $r->T); - - return $r; - } - - /** - * Convert a group element to a byte string. - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $h - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function ge_tobytes(ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $h) - { - $recip = self::fe_invert($h->Z); - $x = self::fe_mul($h->X, $recip); - $y = self::fe_mul($h->Y, $recip); - $s = self::fe_tobytes($y); - $s[31] = self::intToChr( - self::chrToInt($s[31]) ^ (self::fe_isnegative($x) << 7) - ); - return $s; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $a - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A - * @param string $b - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P2 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - */ - public static function ge_double_scalarmult_vartime( - $a, - ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A, - $b - ) { - /** @var array $Ai */ - $Ai = array(); - - static $Bi = array(); - /** @var array $Bi */ - if (!$Bi) { - for ($i = 0; $i < 8; ++$i) { - $Bi[$i] = new ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp( - ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][0]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][1]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][2]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][3]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][4]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][5]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][6]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][7]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][8]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][0][9]) - ) - ), - ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][0]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][1]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][2]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][3]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][4]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][5]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][6]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][7]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][8]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][1][9]) - ) - ), - ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( - array( - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][0]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][1]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][2]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][3]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][4]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][5]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][6]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][7]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][8]), - ParagonIE_Sodium_Core32_Int32::fromInt(self::$base2[$i][2][9]) - ) - ) - ); - } - } - - for ($i = 0; $i < 8; ++$i) { - $Ai[$i] = new ParagonIE_Sodium_Core32_Curve25519_Ge_Cached( - self::fe_0(), - self::fe_0(), - self::fe_0(), - self::fe_0() - ); - } - /** @var array $Ai */ - - # slide(aslide,a); - # slide(bslide,b); - /** @var array $aslide */ - $aslide = self::slide($a); - /** @var array $bslide */ - $bslide = self::slide($b); - - # ge_p3_to_cached(&Ai[0],A); - # ge_p3_dbl(&t,A); ge_p1p1_to_p3(&A2,&t); - $Ai[0] = self::ge_p3_to_cached($A); - $t = self::ge_p3_dbl($A); - $A2 = self::ge_p1p1_to_p3($t); - - # ge_add(&t,&A2,&Ai[0]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[1],&u); - # ge_add(&t,&A2,&Ai[1]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[2],&u); - # ge_add(&t,&A2,&Ai[2]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[3],&u); - # ge_add(&t,&A2,&Ai[3]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[4],&u); - # ge_add(&t,&A2,&Ai[4]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[5],&u); - # ge_add(&t,&A2,&Ai[5]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[6],&u); - # ge_add(&t,&A2,&Ai[6]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[7],&u); - for ($i = 0; $i < 7; ++$i) { - $t = self::ge_add($A2, $Ai[$i]); - $u = self::ge_p1p1_to_p3($t); - $Ai[$i + 1] = self::ge_p3_to_cached($u); - } - - # ge_p2_0(r); - $r = self::ge_p2_0(); - - # for (i = 255;i >= 0;--i) { - # if (aslide[i] || bslide[i]) break; - # } - $i = 255; - for (; $i >= 0; --$i) { - if ($aslide[$i] || $bslide[$i]) { - break; - } - } - - # for (;i >= 0;--i) { - for (; $i >= 0; --$i) { - # ge_p2_dbl(&t,r); - $t = self::ge_p2_dbl($r); - - # if (aslide[i] > 0) { - if ($aslide[$i] > 0) { - # ge_p1p1_to_p3(&u,&t); - # ge_add(&t,&u,&Ai[aslide[i]/2]); - $u = self::ge_p1p1_to_p3($t); - $t = self::ge_add( - $u, - $Ai[(int) floor($aslide[$i] / 2)] - ); - # } else if (aslide[i] < 0) { - } elseif ($aslide[$i] < 0) { - # ge_p1p1_to_p3(&u,&t); - # ge_sub(&t,&u,&Ai[(-aslide[i])/2]); - $u = self::ge_p1p1_to_p3($t); - $t = self::ge_sub( - $u, - $Ai[(int) floor(-$aslide[$i] / 2)] - ); - } - /** @var array $Bi */ - - # if (bslide[i] > 0) { - if ($bslide[$i] > 0) { - # ge_p1p1_to_p3(&u,&t); - # ge_madd(&t,&u,&Bi[bslide[i]/2]); - $u = self::ge_p1p1_to_p3($t); - /** @var int $index */ - $index = (int) floor($bslide[$i] / 2); - /** @var ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $thisB */ - $thisB = $Bi[$index]; - $t = self::ge_madd($t, $u, $thisB); - # } else if (bslide[i] < 0) { - } elseif ($bslide[$i] < 0) { - # ge_p1p1_to_p3(&u,&t); - # ge_msub(&t,&u,&Bi[(-bslide[i])/2]); - $u = self::ge_p1p1_to_p3($t); - - /** @var int $index */ - $index = (int) floor(-$bslide[$i] / 2); - - /** @var ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp $thisB */ - $thisB = $Bi[$index]; - $t = self::ge_msub($t, $u, $thisB); - } - # ge_p1p1_to_p2(r,&t); - $r = self::ge_p1p1_to_p2($t); - } - return $r; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $a - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P3 - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedOperand - * @throws SodiumException - * @throws TypeError - */ - public static function ge_scalarmult_base($a) - { - /** @var array $e */ - $e = array(); - $r = new ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1(); - - for ($i = 0; $i < 32; ++$i) { - /** @var int $dbl */ - $dbl = (int) $i << 1; - $e[$dbl] = (int) self::chrToInt($a[$i]) & 15; - $e[$dbl + 1] = (int) (self::chrToInt($a[$i]) >> 4) & 15; - } - - /** @var int $carry */ - $carry = 0; - for ($i = 0; $i < 63; ++$i) { - $e[$i] += $carry; - $carry = $e[$i] + 8; - $carry >>= 4; - $e[$i] -= $carry << 4; - } - - /** @var array $e */ - $e[63] += (int) $carry; - - $h = self::ge_p3_0(); - - for ($i = 1; $i < 64; $i += 2) { - $t = self::ge_select((int) floor($i / 2), (int) $e[$i]); - $r = self::ge_madd($r, $h, $t); - $h = self::ge_p1p1_to_p3($r); - } - - $r = self::ge_p3_dbl($h); - - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - $s = self::ge_p1p1_to_p2($r); - $r = self::ge_p2_dbl($s); - - $h = self::ge_p1p1_to_p3($r); - - for ($i = 0; $i < 64; $i += 2) { - $t = self::ge_select($i >> 1, (int) $e[$i]); - $r = self::ge_madd($r, $h, $t); - $h = self::ge_p1p1_to_p3($r); - } - return $h; - } - - /** - * Calculates (ab + c) mod l - * where l = 2^252 + 27742317777372353535851937790883648493 - * - * @internal You should not use this directly from another application - * - * @param string $a - * @param string $b - * @param string $c - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sc_muladd($a, $b, $c) - { - $a0 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($a, 0, 3))); - $a1 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($a, 2, 4)) >> 5)); - $a2 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($a, 5, 3)) >> 2)); - $a3 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($a, 7, 4)) >> 7)); - $a4 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($a, 10, 4)) >> 4)); - $a5 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($a, 13, 3)) >> 1)); - $a6 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($a, 15, 4)) >> 6)); - $a7 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($a, 18, 3)) >> 3)); - $a8 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($a, 21, 3))); - $a9 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($a, 23, 4)) >> 5)); - $a10 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($a, 26, 3)) >> 2)); - $a11 = ParagonIE_Sodium_Core32_Int64::fromInt(0x1fffffff & (self::load_4(self::substr($a, 28, 4)) >> 7)); - $b0 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($b, 0, 3))); - $b1 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($b, 2, 4)) >> 5)); - $b2 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($b, 5, 3)) >> 2)); - $b3 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($b, 7, 4)) >> 7)); - $b4 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($b, 10, 4)) >> 4)); - $b5 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($b, 13, 3)) >> 1)); - $b6 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($b, 15, 4)) >> 6)); - $b7 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($b, 18, 3)) >> 3)); - $b8 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($b, 21, 3))); - $b9 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($b, 23, 4)) >> 5)); - $b10 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($b, 26, 3)) >> 2)); - $b11 = ParagonIE_Sodium_Core32_Int64::fromInt(0x1fffffff & (self::load_4(self::substr($b, 28, 4)) >> 7)); - $c0 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($c, 0, 3))); - $c1 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($c, 2, 4)) >> 5)); - $c2 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($c, 5, 3)) >> 2)); - $c3 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($c, 7, 4)) >> 7)); - $c4 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($c, 10, 4)) >> 4)); - $c5 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($c, 13, 3)) >> 1)); - $c6 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($c, 15, 4)) >> 6)); - $c7 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($c, 18, 3)) >> 3)); - $c8 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($c, 21, 3))); - $c9 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($c, 23, 4)) >> 5)); - $c10 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($c, 26, 3)) >> 2)); - $c11 = ParagonIE_Sodium_Core32_Int64::fromInt(0x1fffffff & (self::load_4(self::substr($c, 28, 4)) >> 7)); - - /* Can't really avoid the pyramid here: */ - /** - * @var ParagonIE_Sodium_Core32_Int64 $s0 - * @var ParagonIE_Sodium_Core32_Int64 $s1 - * @var ParagonIE_Sodium_Core32_Int64 $s2 - * @var ParagonIE_Sodium_Core32_Int64 $s3 - * @var ParagonIE_Sodium_Core32_Int64 $s4 - * @var ParagonIE_Sodium_Core32_Int64 $s5 - * @var ParagonIE_Sodium_Core32_Int64 $s6 - * @var ParagonIE_Sodium_Core32_Int64 $s7 - * @var ParagonIE_Sodium_Core32_Int64 $s8 - * @var ParagonIE_Sodium_Core32_Int64 $s9 - * @var ParagonIE_Sodium_Core32_Int64 $s10 - * @var ParagonIE_Sodium_Core32_Int64 $s11 - * @var ParagonIE_Sodium_Core32_Int64 $s12 - * @var ParagonIE_Sodium_Core32_Int64 $s13 - * @var ParagonIE_Sodium_Core32_Int64 $s14 - * @var ParagonIE_Sodium_Core32_Int64 $s15 - * @var ParagonIE_Sodium_Core32_Int64 $s16 - * @var ParagonIE_Sodium_Core32_Int64 $s17 - * @var ParagonIE_Sodium_Core32_Int64 $s18 - * @var ParagonIE_Sodium_Core32_Int64 $s19 - * @var ParagonIE_Sodium_Core32_Int64 $s20 - * @var ParagonIE_Sodium_Core32_Int64 $s21 - * @var ParagonIE_Sodium_Core32_Int64 $s22 - * @var ParagonIE_Sodium_Core32_Int64 $s23 - */ - - $s0 = $c0->addInt64($a0->mulInt64($b0, 24)); - $s1 = $c1->addInt64($a0->mulInt64($b1, 24))->addInt64($a1->mulInt64($b0, 24)); - $s2 = $c2->addInt64($a0->mulInt64($b2, 24))->addInt64($a1->mulInt64($b1, 24))->addInt64($a2->mulInt64($b0, 24)); - $s3 = $c3->addInt64($a0->mulInt64($b3, 24))->addInt64($a1->mulInt64($b2, 24))->addInt64($a2->mulInt64($b1, 24)) - ->addInt64($a3->mulInt64($b0, 24)); - $s4 = $c4->addInt64($a0->mulInt64($b4, 24))->addInt64($a1->mulInt64($b3, 24))->addInt64($a2->mulInt64($b2, 24)) - ->addInt64($a3->mulInt64($b1, 24))->addInt64($a4->mulInt64($b0, 24)); - $s5 = $c5->addInt64($a0->mulInt64($b5, 24))->addInt64($a1->mulInt64($b4, 24))->addInt64($a2->mulInt64($b3, 24)) - ->addInt64($a3->mulInt64($b2, 24))->addInt64($a4->mulInt64($b1, 24))->addInt64($a5->mulInt64($b0, 24)); - $s6 = $c6->addInt64($a0->mulInt64($b6, 24))->addInt64($a1->mulInt64($b5, 24))->addInt64($a2->mulInt64($b4, 24)) - ->addInt64($a3->mulInt64($b3, 24))->addInt64($a4->mulInt64($b2, 24))->addInt64($a5->mulInt64($b1, 24)) - ->addInt64($a6->mulInt64($b0, 24)); - $s7 = $c7->addInt64($a0->mulInt64($b7, 24))->addInt64($a1->mulInt64($b6, 24))->addInt64($a2->mulInt64($b5, 24)) - ->addInt64($a3->mulInt64($b4, 24))->addInt64($a4->mulInt64($b3, 24))->addInt64($a5->mulInt64($b2, 24)) - ->addInt64($a6->mulInt64($b1, 24))->addInt64($a7->mulInt64($b0, 24)); - $s8 = $c8->addInt64($a0->mulInt64($b8, 24))->addInt64($a1->mulInt64($b7, 24))->addInt64($a2->mulInt64($b6, 24)) - ->addInt64($a3->mulInt64($b5, 24))->addInt64($a4->mulInt64($b4, 24))->addInt64($a5->mulInt64($b3, 24)) - ->addInt64($a6->mulInt64($b2, 24))->addInt64($a7->mulInt64($b1, 24))->addInt64($a8->mulInt64($b0, 24)); - $s9 = $c9->addInt64($a0->mulInt64($b9, 24))->addInt64($a1->mulInt64($b8, 24))->addInt64($a2->mulInt64($b7, 24)) - ->addInt64($a3->mulInt64($b6, 24))->addInt64($a4->mulInt64($b5, 24))->addInt64($a5->mulInt64($b4, 24)) - ->addInt64($a6->mulInt64($b3, 24))->addInt64($a7->mulInt64($b2, 24))->addInt64($a8->mulInt64($b1, 24)) - ->addInt64($a9->mulInt64($b0, 24)); - $s10 = $c10->addInt64($a0->mulInt64($b10, 24))->addInt64($a1->mulInt64($b9, 24))->addInt64($a2->mulInt64($b8, 24)) - ->addInt64($a3->mulInt64($b7, 24))->addInt64($a4->mulInt64($b6, 24))->addInt64($a5->mulInt64($b5, 24)) - ->addInt64($a6->mulInt64($b4, 24))->addInt64($a7->mulInt64($b3, 24))->addInt64($a8->mulInt64($b2, 24)) - ->addInt64($a9->mulInt64($b1, 24))->addInt64($a10->mulInt64($b0, 24)); - $s11 = $c11->addInt64($a0->mulInt64($b11, 24))->addInt64($a1->mulInt64($b10, 24))->addInt64($a2->mulInt64($b9, 24)) - ->addInt64($a3->mulInt64($b8, 24))->addInt64($a4->mulInt64($b7, 24))->addInt64($a5->mulInt64($b6, 24)) - ->addInt64($a6->mulInt64($b5, 24))->addInt64($a7->mulInt64($b4, 24))->addInt64($a8->mulInt64($b3, 24)) - ->addInt64($a9->mulInt64($b2, 24))->addInt64($a10->mulInt64($b1, 24))->addInt64($a11->mulInt64($b0, 24)); - $s12 = $a1->mulInt64($b11, 24)->addInt64($a2->mulInt64($b10, 24))->addInt64($a3->mulInt64($b9, 24)) - ->addInt64($a4->mulInt64($b8, 24))->addInt64($a5->mulInt64($b7, 24))->addInt64($a6->mulInt64($b6, 24)) - ->addInt64($a7->mulInt64($b5, 24))->addInt64($a8->mulInt64($b4, 24))->addInt64($a9->mulInt64($b3, 24)) - ->addInt64($a10->mulInt64($b2, 24))->addInt64($a11->mulInt64($b1, 24)); - $s13 = $a2->mulInt64($b11, 24)->addInt64($a3->mulInt64($b10, 24))->addInt64($a4->mulInt64($b9, 24)) - ->addInt64($a5->mulInt64($b8, 24))->addInt64($a6->mulInt64($b7, 24))->addInt64($a7->mulInt64($b6, 24)) - ->addInt64($a8->mulInt64($b5, 24))->addInt64($a9->mulInt64($b4, 24))->addInt64($a10->mulInt64($b3, 24)) - ->addInt64($a11->mulInt64($b2, 24)); - $s14 = $a3->mulInt64($b11, 24)->addInt64($a4->mulInt64($b10, 24))->addInt64($a5->mulInt64($b9, 24)) - ->addInt64($a6->mulInt64($b8, 24))->addInt64($a7->mulInt64($b7, 24))->addInt64($a8->mulInt64($b6, 24)) - ->addInt64($a9->mulInt64($b5, 24))->addInt64($a10->mulInt64($b4, 24))->addInt64($a11->mulInt64($b3, 24)); - $s15 = $a4->mulInt64($b11, 24)->addInt64($a5->mulInt64($b10, 24))->addInt64($a6->mulInt64($b9, 24)) - ->addInt64($a7->mulInt64($b8, 24))->addInt64($a8->mulInt64($b7, 24))->addInt64($a9->mulInt64($b6, 24)) - ->addInt64($a10->mulInt64($b5, 24))->addInt64($a11->mulInt64($b4, 24)); - $s16 = $a5->mulInt64($b11, 24)->addInt64($a6->mulInt64($b10, 24))->addInt64($a7->mulInt64($b9, 24)) - ->addInt64($a8->mulInt64($b8, 24))->addInt64($a9->mulInt64($b7, 24))->addInt64($a10->mulInt64($b6, 24)) - ->addInt64($a11->mulInt64($b5, 24)); - $s17 = $a6->mulInt64($b11, 24)->addInt64($a7->mulInt64($b10, 24))->addInt64($a8->mulInt64($b9, 24)) - ->addInt64($a9->mulInt64($b8, 24))->addInt64($a10->mulInt64($b7, 24))->addInt64($a11->mulInt64($b6, 24)); - $s18 = $a7->mulInt64($b11, 24)->addInt64($a8->mulInt64($b10, 24))->addInt64($a9->mulInt64($b9, 24)) - ->addInt64($a10->mulInt64($b8, 24))->addInt64($a11->mulInt64($b7, 24)); - $s19 = $a8->mulInt64($b11, 24)->addInt64($a9->mulInt64($b10, 24))->addInt64($a10->mulInt64($b9, 24)) - ->addInt64($a11->mulInt64($b8, 24)); - $s20 = $a9->mulInt64($b11, 24)->addInt64($a10->mulInt64($b10, 24))->addInt64($a11->mulInt64($b9, 24)); - $s21 = $a10->mulInt64($b11, 24)->addInt64($a11->mulInt64($b10, 24)); - $s22 = $a11->mulInt64($b11, 24); - $s23 = new ParagonIE_Sodium_Core32_Int64(); - - $carry0 = $s0->addInt(1 << 20)->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry2 = $s2->addInt(1 << 20)->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry4 = $s4->addInt(1 << 20)->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry6 = $s6->addInt(1 << 20)->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry8 = $s8->addInt(1 << 20)->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry10 = $s10->addInt(1 << 20)->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - $carry12 = $s12->addInt(1 << 20)->shiftRight(21); - $s13 = $s13->addInt64($carry12); - $s12 = $s12->subInt64($carry12->shiftLeft(21)); - $carry14 = $s14->addInt(1 << 20)->shiftRight(21); - $s15 = $s15->addInt64($carry14); - $s14 = $s14->subInt64($carry14->shiftLeft(21)); - $carry16 = $s16->addInt(1 << 20)->shiftRight(21); - $s17 = $s17->addInt64($carry16); - $s16 = $s16->subInt64($carry16->shiftLeft(21)); - $carry18 = $s18->addInt(1 << 20)->shiftRight(21); - $s19 = $s19->addInt64($carry18); - $s18 = $s18->subInt64($carry18->shiftLeft(21)); - $carry20 = $s20->addInt(1 << 20)->shiftRight(21); - $s21 = $s21->addInt64($carry20); - $s20 = $s20->subInt64($carry20->shiftLeft(21)); - $carry22 = $s22->addInt(1 << 20)->shiftRight(21); - $s23 = $s23->addInt64($carry22); - $s22 = $s22->subInt64($carry22->shiftLeft(21)); - - $carry1 = $s1->addInt(1 << 20)->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry3 = $s3->addInt(1 << 20)->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry5 = $s5->addInt(1 << 20)->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry7 = $s7->addInt(1 << 20)->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry9 = $s9->addInt(1 << 20)->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry11 = $s11->addInt(1 << 20)->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - $carry13 = $s13->addInt(1 << 20)->shiftRight(21); - $s14 = $s14->addInt64($carry13); - $s13 = $s13->subInt64($carry13->shiftLeft(21)); - $carry15 = $s15->addInt(1 << 20)->shiftRight(21); - $s16 = $s16->addInt64($carry15); - $s15 = $s15->subInt64($carry15->shiftLeft(21)); - $carry17 = $s17->addInt(1 << 20)->shiftRight(21); - $s18 = $s18->addInt64($carry17); - $s17 = $s17->subInt64($carry17->shiftLeft(21)); - $carry19 = $s19->addInt(1 << 20)->shiftRight(21); - $s20 = $s20->addInt64($carry19); - $s19 = $s19->subInt64($carry19->shiftLeft(21)); - $carry21 = $s21->addInt(1 << 20)->shiftRight(21); - $s22 = $s22->addInt64($carry21); - $s21 = $s21->subInt64($carry21->shiftLeft(21)); - - $s11 = $s11->addInt64($s23->mulInt(666643, 20)); - $s12 = $s12->addInt64($s23->mulInt(470296, 19)); - $s13 = $s13->addInt64($s23->mulInt(654183, 20)); - $s14 = $s14->subInt64($s23->mulInt(997805, 20)); - $s15 = $s15->addInt64($s23->mulInt(136657, 18)); - $s16 = $s16->subInt64($s23->mulInt(683901, 20)); - - $s10 = $s10->addInt64($s22->mulInt(666643, 20)); - $s11 = $s11->addInt64($s22->mulInt(470296, 19)); - $s12 = $s12->addInt64($s22->mulInt(654183, 20)); - $s13 = $s13->subInt64($s22->mulInt(997805, 20)); - $s14 = $s14->addInt64($s22->mulInt(136657, 18)); - $s15 = $s15->subInt64($s22->mulInt(683901, 20)); - - $s9 = $s9->addInt64($s21->mulInt(666643, 20)); - $s10 = $s10->addInt64($s21->mulInt(470296, 19)); - $s11 = $s11->addInt64($s21->mulInt(654183, 20)); - $s12 = $s12->subInt64($s21->mulInt(997805, 20)); - $s13 = $s13->addInt64($s21->mulInt(136657, 18)); - $s14 = $s14->subInt64($s21->mulInt(683901, 20)); - - $s8 = $s8->addInt64($s20->mulInt(666643, 20)); - $s9 = $s9->addInt64($s20->mulInt(470296, 19)); - $s10 = $s10->addInt64($s20->mulInt(654183, 20)); - $s11 = $s11->subInt64($s20->mulInt(997805, 20)); - $s12 = $s12->addInt64($s20->mulInt(136657, 18)); - $s13 = $s13->subInt64($s20->mulInt(683901, 20)); - - $s7 = $s7->addInt64($s19->mulInt(666643, 20)); - $s8 = $s8->addInt64($s19->mulInt(470296, 19)); - $s9 = $s9->addInt64($s19->mulInt(654183, 20)); - $s10 = $s10->subInt64($s19->mulInt(997805, 20)); - $s11 = $s11->addInt64($s19->mulInt(136657, 18)); - $s12 = $s12->subInt64($s19->mulInt(683901, 20)); - - $s6 = $s6->addInt64($s18->mulInt(666643, 20)); - $s7 = $s7->addInt64($s18->mulInt(470296, 19)); - $s8 = $s8->addInt64($s18->mulInt(654183, 20)); - $s9 = $s9->subInt64($s18->mulInt(997805, 20)); - $s10 = $s10->addInt64($s18->mulInt(136657, 18)); - $s11 = $s11->subInt64($s18->mulInt(683901, 20)); - - $carry6 = $s6->addInt(1 << 20)->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry8 = $s8->addInt(1 << 20)->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry10 = $s10->addInt(1 << 20)->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - $carry12 = $s12->addInt(1 << 20)->shiftRight(21); - $s13 = $s13->addInt64($carry12); - $s12 = $s12->subInt64($carry12->shiftLeft(21)); - $carry14 = $s14->addInt(1 << 20)->shiftRight(21); - $s15 = $s15->addInt64($carry14); - $s14 = $s14->subInt64($carry14->shiftLeft(21)); - $carry16 = $s16->addInt(1 << 20)->shiftRight(21); - $s17 = $s17->addInt64($carry16); - $s16 = $s16->subInt64($carry16->shiftLeft(21)); - - $carry7 = $s7->addInt(1 << 20)->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry9 = $s9->addInt(1 << 20)->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry11 = $s11->addInt(1 << 20)->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - $carry13 = $s13->addInt(1 << 20)->shiftRight(21); - $s14 = $s14->addInt64($carry13); - $s13 = $s13->subInt64($carry13->shiftLeft(21)); - $carry15 = $s15->addInt(1 << 20)->shiftRight(21); - $s16 = $s16->addInt64($carry15); - $s15 = $s15->subInt64($carry15->shiftLeft(21)); - - $s5 = $s5->addInt64($s17->mulInt(666643, 20)); - $s6 = $s6->addInt64($s17->mulInt(470296, 19)); - $s7 = $s7->addInt64($s17->mulInt(654183, 20)); - $s8 = $s8->subInt64($s17->mulInt(997805, 20)); - $s9 = $s9->addInt64($s17->mulInt(136657, 18)); - $s10 = $s10->subInt64($s17->mulInt(683901, 20)); - - $s4 = $s4->addInt64($s16->mulInt(666643, 20)); - $s5 = $s5->addInt64($s16->mulInt(470296, 19)); - $s6 = $s6->addInt64($s16->mulInt(654183, 20)); - $s7 = $s7->subInt64($s16->mulInt(997805, 20)); - $s8 = $s8->addInt64($s16->mulInt(136657, 18)); - $s9 = $s9->subInt64($s16->mulInt(683901, 20)); - - $s3 = $s3->addInt64($s15->mulInt(666643, 20)); - $s4 = $s4->addInt64($s15->mulInt(470296, 19)); - $s5 = $s5->addInt64($s15->mulInt(654183, 20)); - $s6 = $s6->subInt64($s15->mulInt(997805, 20)); - $s7 = $s7->addInt64($s15->mulInt(136657, 18)); - $s8 = $s8->subInt64($s15->mulInt(683901, 20)); - - $s2 = $s2->addInt64($s14->mulInt(666643, 20)); - $s3 = $s3->addInt64($s14->mulInt(470296, 19)); - $s4 = $s4->addInt64($s14->mulInt(654183, 20)); - $s5 = $s5->subInt64($s14->mulInt(997805, 20)); - $s6 = $s6->addInt64($s14->mulInt(136657, 18)); - $s7 = $s7->subInt64($s14->mulInt(683901, 20)); - - $s1 = $s1->addInt64($s13->mulInt(666643, 20)); - $s2 = $s2->addInt64($s13->mulInt(470296, 19)); - $s3 = $s3->addInt64($s13->mulInt(654183, 20)); - $s4 = $s4->subInt64($s13->mulInt(997805, 20)); - $s5 = $s5->addInt64($s13->mulInt(136657, 18)); - $s6 = $s6->subInt64($s13->mulInt(683901, 20)); - - $s0 = $s0->addInt64($s12->mulInt(666643, 20)); - $s1 = $s1->addInt64($s12->mulInt(470296, 19)); - $s2 = $s2->addInt64($s12->mulInt(654183, 20)); - $s3 = $s3->subInt64($s12->mulInt(997805, 20)); - $s4 = $s4->addInt64($s12->mulInt(136657, 18)); - $s5 = $s5->subInt64($s12->mulInt(683901, 20)); - $s12 = new ParagonIE_Sodium_Core32_Int64(); - - $carry0 = $s0->addInt(1 << 20)->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry2 = $s2->addInt(1 << 20)->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry4 = $s4->addInt(1 << 20)->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry6 = $s6->addInt(1 << 20)->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry8 = $s8->addInt(1 << 20)->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry10 = $s10->addInt(1 << 20)->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - - $carry1 = $s1->addInt(1 << 20)->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry3 = $s3->addInt(1 << 20)->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry5 = $s5->addInt(1 << 20)->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry7 = $s7->addInt(1 << 20)->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry9 = $s9->addInt(1 << 20)->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry11 = $s11->addInt(1 << 20)->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - - $s0 = $s0->addInt64($s12->mulInt(666643, 20)); - $s1 = $s1->addInt64($s12->mulInt(470296, 19)); - $s2 = $s2->addInt64($s12->mulInt(654183, 20)); - $s3 = $s3->subInt64($s12->mulInt(997805, 20)); - $s4 = $s4->addInt64($s12->mulInt(136657, 18)); - $s5 = $s5->subInt64($s12->mulInt(683901, 20)); - $s12 = new ParagonIE_Sodium_Core32_Int64(); - - $carry0 = $s0->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry1 = $s1->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry2 = $s2->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry3 = $s3->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry4 = $s4->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry5 = $s5->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry6 = $s6->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry7 = $s7->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry8 = $s8->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry9 = $s9->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry10 = $s10->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - $carry11 = $s11->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - - $s0 = $s0->addInt64($s12->mulInt(666643, 20)); - $s1 = $s1->addInt64($s12->mulInt(470296, 19)); - $s2 = $s2->addInt64($s12->mulInt(654183, 20)); - $s3 = $s3->subInt64($s12->mulInt(997805, 20)); - $s4 = $s4->addInt64($s12->mulInt(136657, 18)); - $s5 = $s5->subInt64($s12->mulInt(683901, 20)); - - $carry0 = $s0->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry1 = $s1->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry2 = $s2->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry3 = $s3->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry4 = $s4->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry5 = $s5->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry6 = $s6->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry7 = $s7->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry8 = $s10->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry9 = $s9->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry10 = $s10->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - - $S0 = $s0->toInt(); - $S1 = $s1->toInt(); - $S2 = $s2->toInt(); - $S3 = $s3->toInt(); - $S4 = $s4->toInt(); - $S5 = $s5->toInt(); - $S6 = $s6->toInt(); - $S7 = $s7->toInt(); - $S8 = $s8->toInt(); - $S9 = $s9->toInt(); - $S10 = $s10->toInt(); - $S11 = $s11->toInt(); - - /** - * @var array - */ - $arr = array( - (int) (0xff & ($S0 >> 0)), - (int) (0xff & ($S0 >> 8)), - (int) (0xff & (($S0 >> 16) | ($S1 << 5))), - (int) (0xff & ($S1 >> 3)), - (int) (0xff & ($S1 >> 11)), - (int) (0xff & (($S1 >> 19) | ($S2 << 2))), - (int) (0xff & ($S2 >> 6)), - (int) (0xff & (($S2 >> 14) | ($S3 << 7))), - (int) (0xff & ($S3 >> 1)), - (int) (0xff & ($S3 >> 9)), - (int) (0xff & (($S3 >> 17) | ($S4 << 4))), - (int) (0xff & ($S4 >> 4)), - (int) (0xff & ($S4 >> 12)), - (int) (0xff & (($S4 >> 20) | ($S5 << 1))), - (int) (0xff & ($S5 >> 7)), - (int) (0xff & (($S5 >> 15) | ($S6 << 6))), - (int) (0xff & ($S6 >> 2)), - (int) (0xff & ($S6 >> 10)), - (int) (0xff & (($S6 >> 18) | ($S7 << 3))), - (int) (0xff & ($S7 >> 5)), - (int) (0xff & ($S7 >> 13)), - (int) (0xff & ($S8 >> 0)), - (int) (0xff & ($S8 >> 8)), - (int) (0xff & (($S8 >> 16) | ($S9 << 5))), - (int) (0xff & ($S9 >> 3)), - (int) (0xff & ($S9 >> 11)), - (int) (0xff & (($S9 >> 19) | ($S10 << 2))), - (int) (0xff & ($S10 >> 6)), - (int) (0xff & (($S10 >> 14) | ($S11 << 7))), - (int) (0xff & ($S11 >> 1)), - (int) (0xff & ($S11 >> 9)), - (int) (0xff & ($S11 >> 17)) - ); - return self::intArrayToString($arr); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $s - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sc_reduce($s) - { - /** - * @var ParagonIE_Sodium_Core32_Int64 $s0 - * @var ParagonIE_Sodium_Core32_Int64 $s1 - * @var ParagonIE_Sodium_Core32_Int64 $s2 - * @var ParagonIE_Sodium_Core32_Int64 $s3 - * @var ParagonIE_Sodium_Core32_Int64 $s4 - * @var ParagonIE_Sodium_Core32_Int64 $s5 - * @var ParagonIE_Sodium_Core32_Int64 $s6 - * @var ParagonIE_Sodium_Core32_Int64 $s7 - * @var ParagonIE_Sodium_Core32_Int64 $s8 - * @var ParagonIE_Sodium_Core32_Int64 $s9 - * @var ParagonIE_Sodium_Core32_Int64 $s10 - * @var ParagonIE_Sodium_Core32_Int64 $s11 - * @var ParagonIE_Sodium_Core32_Int64 $s12 - * @var ParagonIE_Sodium_Core32_Int64 $s13 - * @var ParagonIE_Sodium_Core32_Int64 $s14 - * @var ParagonIE_Sodium_Core32_Int64 $s15 - * @var ParagonIE_Sodium_Core32_Int64 $s16 - * @var ParagonIE_Sodium_Core32_Int64 $s17 - * @var ParagonIE_Sodium_Core32_Int64 $s18 - * @var ParagonIE_Sodium_Core32_Int64 $s19 - * @var ParagonIE_Sodium_Core32_Int64 $s20 - * @var ParagonIE_Sodium_Core32_Int64 $s21 - * @var ParagonIE_Sodium_Core32_Int64 $s22 - * @var ParagonIE_Sodium_Core32_Int64 $s23 - */ - $s0 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($s, 0, 3))); - $s1 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 2, 4)) >> 5)); - $s2 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 5, 3)) >> 2)); - $s3 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 7, 4)) >> 7)); - $s4 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 10, 4)) >> 4)); - $s5 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 13, 3)) >> 1)); - $s6 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 15, 4)) >> 6)); - $s7 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 18, 4)) >> 3)); - $s8 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($s, 21, 3))); - $s9 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 23, 4)) >> 5)); - $s10 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 26, 3)) >> 2)); - $s11 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 28, 4)) >> 7)); - $s12 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 31, 4)) >> 4)); - $s13 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 34, 3)) >> 1)); - $s14 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 36, 4)) >> 6)); - $s15 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 39, 4)) >> 3)); - $s16 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & self::load_3(self::substr($s, 42, 3))); - $s17 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 44, 4)) >> 5)); - $s18 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 47, 3)) >> 2)); - $s19 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 49, 4)) >> 7)); - $s20 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 52, 4)) >> 4)); - $s21 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_3(self::substr($s, 55, 3)) >> 1)); - $s22 = ParagonIE_Sodium_Core32_Int64::fromInt(2097151 & (self::load_4(self::substr($s, 57, 4)) >> 6)); - $s23 = ParagonIE_Sodium_Core32_Int64::fromInt(0x1fffffff & (self::load_4(self::substr($s, 60, 4)) >> 3)); - - $s11 = $s11->addInt64($s23->mulInt(666643, 20)); - $s12 = $s12->addInt64($s23->mulInt(470296, 19)); - $s13 = $s13->addInt64($s23->mulInt(654183, 20)); - $s14 = $s14->subInt64($s23->mulInt(997805, 20)); - $s15 = $s15->addInt64($s23->mulInt(136657, 18)); - $s16 = $s16->subInt64($s23->mulInt(683901, 20)); - - $s10 = $s10->addInt64($s22->mulInt(666643, 20)); - $s11 = $s11->addInt64($s22->mulInt(470296, 19)); - $s12 = $s12->addInt64($s22->mulInt(654183, 20)); - $s13 = $s13->subInt64($s22->mulInt(997805, 20)); - $s14 = $s14->addInt64($s22->mulInt(136657, 18)); - $s15 = $s15->subInt64($s22->mulInt(683901, 20)); - - $s9 = $s9->addInt64($s21->mulInt(666643, 20)); - $s10 = $s10->addInt64($s21->mulInt(470296, 19)); - $s11 = $s11->addInt64($s21->mulInt(654183, 20)); - $s12 = $s12->subInt64($s21->mulInt(997805, 20)); - $s13 = $s13->addInt64($s21->mulInt(136657, 18)); - $s14 = $s14->subInt64($s21->mulInt(683901, 20)); - - $s8 = $s8->addInt64($s20->mulInt(666643, 20)); - $s9 = $s9->addInt64($s20->mulInt(470296, 19)); - $s10 = $s10->addInt64($s20->mulInt(654183, 20)); - $s11 = $s11->subInt64($s20->mulInt(997805, 20)); - $s12 = $s12->addInt64($s20->mulInt(136657, 18)); - $s13 = $s13->subInt64($s20->mulInt(683901, 20)); - - $s7 = $s7->addInt64($s19->mulInt(666643, 20)); - $s8 = $s8->addInt64($s19->mulInt(470296, 19)); - $s9 = $s9->addInt64($s19->mulInt(654183, 20)); - $s10 = $s10->subInt64($s19->mulInt(997805, 20)); - $s11 = $s11->addInt64($s19->mulInt(136657, 18)); - $s12 = $s12->subInt64($s19->mulInt(683901, 20)); - - $s6 = $s6->addInt64($s18->mulInt(666643, 20)); - $s7 = $s7->addInt64($s18->mulInt(470296, 19)); - $s8 = $s8->addInt64($s18->mulInt(654183, 20)); - $s9 = $s9->subInt64($s18->mulInt(997805, 20)); - $s10 = $s10->addInt64($s18->mulInt(136657, 18)); - $s11 = $s11->subInt64($s18->mulInt(683901, 20)); - - $carry6 = $s6->addInt(1 << 20)->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry8 = $s8->addInt(1 << 20)->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry10 = $s10->addInt(1 << 20)->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - $carry12 = $s12->addInt(1 << 20)->shiftRight(21); - $s13 = $s13->addInt64($carry12); - $s12 = $s12->subInt64($carry12->shiftLeft(21)); - $carry14 = $s14->addInt(1 << 20)->shiftRight(21); - $s15 = $s15->addInt64($carry14); - $s14 = $s14->subInt64($carry14->shiftLeft(21)); - $carry16 = $s16->addInt(1 << 20)->shiftRight(21); - $s17 = $s17->addInt64($carry16); - $s16 = $s16->subInt64($carry16->shiftLeft(21)); - - $carry7 = $s7->addInt(1 << 20)->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry9 = $s9->addInt(1 << 20)->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry11 = $s11->addInt(1 << 20)->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - $carry13 = $s13->addInt(1 << 20)->shiftRight(21); - $s14 = $s14->addInt64($carry13); - $s13 = $s13->subInt64($carry13->shiftLeft(21)); - $carry15 = $s15->addInt(1 << 20)->shiftRight(21); - $s16 = $s16->addInt64($carry15); - $s15 = $s15->subInt64($carry15->shiftLeft(21)); - - $s5 = $s5->addInt64($s17->mulInt(666643, 20)); - $s6 = $s6->addInt64($s17->mulInt(470296, 19)); - $s7 = $s7->addInt64($s17->mulInt(654183, 20)); - $s8 = $s8->subInt64($s17->mulInt(997805, 20)); - $s9 = $s9->addInt64($s17->mulInt(136657, 18)); - $s10 = $s10->subInt64($s17->mulInt(683901, 20)); - - $s4 = $s4->addInt64($s16->mulInt(666643, 20)); - $s5 = $s5->addInt64($s16->mulInt(470296, 19)); - $s6 = $s6->addInt64($s16->mulInt(654183, 20)); - $s7 = $s7->subInt64($s16->mulInt(997805, 20)); - $s8 = $s8->addInt64($s16->mulInt(136657, 18)); - $s9 = $s9->subInt64($s16->mulInt(683901, 20)); - - $s3 = $s3->addInt64($s15->mulInt(666643, 20)); - $s4 = $s4->addInt64($s15->mulInt(470296, 19)); - $s5 = $s5->addInt64($s15->mulInt(654183, 20)); - $s6 = $s6->subInt64($s15->mulInt(997805, 20)); - $s7 = $s7->addInt64($s15->mulInt(136657, 18)); - $s8 = $s8->subInt64($s15->mulInt(683901, 20)); - - $s2 = $s2->addInt64($s14->mulInt(666643, 20)); - $s3 = $s3->addInt64($s14->mulInt(470296, 19)); - $s4 = $s4->addInt64($s14->mulInt(654183, 20)); - $s5 = $s5->subInt64($s14->mulInt(997805, 20)); - $s6 = $s6->addInt64($s14->mulInt(136657, 18)); - $s7 = $s7->subInt64($s14->mulInt(683901, 20)); - - $s1 = $s1->addInt64($s13->mulInt(666643, 20)); - $s2 = $s2->addInt64($s13->mulInt(470296, 19)); - $s3 = $s3->addInt64($s13->mulInt(654183, 20)); - $s4 = $s4->subInt64($s13->mulInt(997805, 20)); - $s5 = $s5->addInt64($s13->mulInt(136657, 18)); - $s6 = $s6->subInt64($s13->mulInt(683901, 20)); - - $s0 = $s0->addInt64($s12->mulInt(666643, 20)); - $s1 = $s1->addInt64($s12->mulInt(470296, 19)); - $s2 = $s2->addInt64($s12->mulInt(654183, 20)); - $s3 = $s3->subInt64($s12->mulInt(997805, 20)); - $s4 = $s4->addInt64($s12->mulInt(136657, 18)); - $s5 = $s5->subInt64($s12->mulInt(683901, 20)); - $s12 = new ParagonIE_Sodium_Core32_Int64(); - - $carry0 = $s0->addInt(1 << 20)->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry2 = $s2->addInt(1 << 20)->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry4 = $s4->addInt(1 << 20)->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry6 = $s6->addInt(1 << 20)->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry8 = $s8->addInt(1 << 20)->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry10 = $s10->addInt(1 << 20)->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - $carry1 = $s1->addInt(1 << 20)->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry3 = $s3->addInt(1 << 20)->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry5 = $s5->addInt(1 << 20)->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry7 = $s7->addInt(1 << 20)->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry9 = $s9->addInt(1 << 20)->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry11 = $s11->addInt(1 << 20)->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - - $s0 = $s0->addInt64($s12->mulInt(666643, 20)); - $s1 = $s1->addInt64($s12->mulInt(470296, 19)); - $s2 = $s2->addInt64($s12->mulInt(654183, 20)); - $s3 = $s3->subInt64($s12->mulInt(997805, 20)); - $s4 = $s4->addInt64($s12->mulInt(136657, 18)); - $s5 = $s5->subInt64($s12->mulInt(683901, 20)); - $s12 = new ParagonIE_Sodium_Core32_Int64(); - - $carry0 = $s0->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry1 = $s1->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry2 = $s2->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry3 = $s3->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry4 = $s4->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry5 = $s5->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry6 = $s6->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry7 = $s7->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry8 = $s8->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry9 = $s9->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry10 = $s10->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - $carry11 = $s11->shiftRight(21); - $s12 = $s12->addInt64($carry11); - $s11 = $s11->subInt64($carry11->shiftLeft(21)); - - $s0 = $s0->addInt64($s12->mulInt(666643, 20)); - $s1 = $s1->addInt64($s12->mulInt(470296, 19)); - $s2 = $s2->addInt64($s12->mulInt(654183, 20)); - $s3 = $s3->subInt64($s12->mulInt(997805, 20)); - $s4 = $s4->addInt64($s12->mulInt(136657, 18)); - $s5 = $s5->subInt64($s12->mulInt(683901, 20)); - - $carry0 = $s0->shiftRight(21); - $s1 = $s1->addInt64($carry0); - $s0 = $s0->subInt64($carry0->shiftLeft(21)); - $carry1 = $s1->shiftRight(21); - $s2 = $s2->addInt64($carry1); - $s1 = $s1->subInt64($carry1->shiftLeft(21)); - $carry2 = $s2->shiftRight(21); - $s3 = $s3->addInt64($carry2); - $s2 = $s2->subInt64($carry2->shiftLeft(21)); - $carry3 = $s3->shiftRight(21); - $s4 = $s4->addInt64($carry3); - $s3 = $s3->subInt64($carry3->shiftLeft(21)); - $carry4 = $s4->shiftRight(21); - $s5 = $s5->addInt64($carry4); - $s4 = $s4->subInt64($carry4->shiftLeft(21)); - $carry5 = $s5->shiftRight(21); - $s6 = $s6->addInt64($carry5); - $s5 = $s5->subInt64($carry5->shiftLeft(21)); - $carry6 = $s6->shiftRight(21); - $s7 = $s7->addInt64($carry6); - $s6 = $s6->subInt64($carry6->shiftLeft(21)); - $carry7 = $s7->shiftRight(21); - $s8 = $s8->addInt64($carry7); - $s7 = $s7->subInt64($carry7->shiftLeft(21)); - $carry8 = $s8->shiftRight(21); - $s9 = $s9->addInt64($carry8); - $s8 = $s8->subInt64($carry8->shiftLeft(21)); - $carry9 = $s9->shiftRight(21); - $s10 = $s10->addInt64($carry9); - $s9 = $s9->subInt64($carry9->shiftLeft(21)); - $carry10 = $s10->shiftRight(21); - $s11 = $s11->addInt64($carry10); - $s10 = $s10->subInt64($carry10->shiftLeft(21)); - - $S0 = $s0->toInt32()->toInt(); - $S1 = $s1->toInt32()->toInt(); - $S2 = $s2->toInt32()->toInt(); - $S3 = $s3->toInt32()->toInt(); - $S4 = $s4->toInt32()->toInt(); - $S5 = $s5->toInt32()->toInt(); - $S6 = $s6->toInt32()->toInt(); - $S7 = $s7->toInt32()->toInt(); - $S8 = $s8->toInt32()->toInt(); - $S9 = $s9->toInt32()->toInt(); - $S10 = $s10->toInt32()->toInt(); - $S11 = $s11->toInt32()->toInt(); - - /** - * @var array - */ - $arr = array( - (int) ($S0 >> 0), - (int) ($S0 >> 8), - (int) (($S0 >> 16) | ($S1 << 5)), - (int) ($S1 >> 3), - (int) ($S1 >> 11), - (int) (($S1 >> 19) | ($S2 << 2)), - (int) ($S2 >> 6), - (int) (($S2 >> 14) | ($S3 << 7)), - (int) ($S3 >> 1), - (int) ($S3 >> 9), - (int) (($S3 >> 17) | ($S4 << 4)), - (int) ($S4 >> 4), - (int) ($S4 >> 12), - (int) (($S4 >> 20) | ($S5 << 1)), - (int) ($S5 >> 7), - (int) (($S5 >> 15) | ($S6 << 6)), - (int) ($S6 >> 2), - (int) ($S6 >> 10), - (int) (($S6 >> 18) | ($S7 << 3)), - (int) ($S7 >> 5), - (int) ($S7 >> 13), - (int) ($S8 >> 0), - (int) ($S8 >> 8), - (int) (($S8 >> 16) | ($S9 << 5)), - (int) ($S9 >> 3), - (int) ($S9 >> 11), - (int) (($S9 >> 19) | ($S10 << 2)), - (int) ($S10 >> 6), - (int) (($S10 >> 14) | ($S11 << 7)), - (int) ($S11 >> 1), - (int) ($S11 >> 9), - (int) $S11 >> 17 - ); - return self::intArrayToString($arr); - } - - /** - * multiply by the order of the main subgroup l = 2^252+27742317777372353535851937790883648493 - * - * @param ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A - * @return ParagonIE_Sodium_Core32_Curve25519_Ge_P3 - * @throws SodiumException - * @throws TypeError - */ - public static function ge_mul_l(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A) - { - $aslide = array( - 13, 0, 0, 0, 0, -1, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, - 0, 0, 0, -3, 0, 0, 0, 0, -13, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 0, -13, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, -1, - 0, 0, 0, 0, 3, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 - ); - - /** @var array $Ai size 8 */ - $Ai = array(); - - # ge_p3_to_cached(&Ai[0], A); - $Ai[0] = self::ge_p3_to_cached($A); - # ge_p3_dbl(&t, A); - $t = self::ge_p3_dbl($A); - # ge_p1p1_to_p3(&A2, &t); - $A2 = self::ge_p1p1_to_p3($t); - - for ($i = 1; $i < 8; ++$i) { - # ge_add(&t, &A2, &Ai[0]); - $t = self::ge_add($A2, $Ai[$i - 1]); - # ge_p1p1_to_p3(&u, &t); - $u = self::ge_p1p1_to_p3($t); - # ge_p3_to_cached(&Ai[i], &u); - $Ai[$i] = self::ge_p3_to_cached($u); - } - - $r = self::ge_p3_0(); - for ($i = 252; $i >= 0; --$i) { - $t = self::ge_p3_dbl($r); - if ($aslide[$i] > 0) { - # ge_p1p1_to_p3(&u, &t); - $u = self::ge_p1p1_to_p3($t); - # ge_add(&t, &u, &Ai[aslide[i] / 2]); - $t = self::ge_add($u, $Ai[(int)($aslide[$i] / 2)]); - } elseif ($aslide[$i] < 0) { - # ge_p1p1_to_p3(&u, &t); - $u = self::ge_p1p1_to_p3($t); - # ge_sub(&t, &u, &Ai[(-aslide[i]) / 2]); - $t = self::ge_sub($u, $Ai[(int)(-$aslide[$i] / 2)]); - } - } - # ge_p1p1_to_p3(r, &t); - return self::ge_p1p1_to_p3($t); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php deleted file mode 100644 index 5523f20d..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php +++ /dev/null @@ -1,193 +0,0 @@ - - */ - protected $container = array(); - - /** - * @var int - */ - protected $size = 10; - - /** - * @internal You should not use this directly from another application - * - * @param array $array - * @param bool $save_indexes - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromArray($array, $save_indexes = null) - { - $count = count($array); - if ($save_indexes) { - $keys = array_keys($array); - } else { - $keys = range(0, $count - 1); - } - $array = array_values($array); - - $obj = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - if ($save_indexes) { - for ($i = 0; $i < $count; ++$i) { - $array[$i]->overflow = 0; - $obj->offsetSet($keys[$i], $array[$i]); - } - } else { - for ($i = 0; $i < $count; ++$i) { - if (!($array[$i] instanceof ParagonIE_Sodium_Core32_Int32)) { - throw new TypeError('Expected ParagonIE_Sodium_Core32_Int32'); - } - $array[$i]->overflow = 0; - $obj->offsetSet($i, $array[$i]); - } - } - return $obj; - } - - /** - * @internal You should not use this directly from another application - * - * @param array $array - * @param bool $save_indexes - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromIntArray($array, $save_indexes = null) - { - $count = count($array); - if ($save_indexes) { - $keys = array_keys($array); - } else { - $keys = range(0, $count - 1); - } - $array = array_values($array); - $set = array(); - /** @var int $i */ - /** @var int $v */ - foreach ($array as $i => $v) { - $set[$i] = ParagonIE_Sodium_Core32_Int32::fromInt($v); - } - - $obj = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - if ($save_indexes) { - for ($i = 0; $i < $count; ++$i) { - $set[$i]->overflow = 0; - $obj->offsetSet($keys[$i], $set[$i]); - } - } else { - for ($i = 0; $i < $count; ++$i) { - $set[$i]->overflow = 0; - $obj->offsetSet($i, $set[$i]); - } - } - return $obj; - } - - /** - * @internal You should not use this directly from another application - * - * @param mixed $offset - * @param mixed $value - * @return void - * @throws SodiumException - * @throws TypeError - */ - #[ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (!($value instanceof ParagonIE_Sodium_Core32_Int32)) { - throw new InvalidArgumentException('Expected an instance of ParagonIE_Sodium_Core32_Int32'); - } - if (is_null($offset)) { - $this->container[] = $value; - } else { - ParagonIE_Sodium_Core32_Util::declareScalarType($offset, 'int', 1); - $this->container[(int) $offset] = $value; - } - } - - /** - * @internal You should not use this directly from another application - * - * @param mixed $offset - * @return bool - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param mixed $offset - * @return void - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * @internal You should not use this directly from another application - * - * @param mixed $offset - * @return ParagonIE_Sodium_Core32_Int32 - * @psalm-suppress MixedArrayOffset - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - if (!isset($this->container[$offset])) { - $this->container[(int) $offset] = new ParagonIE_Sodium_Core32_Int32(); - } - /** @var ParagonIE_Sodium_Core32_Int32 $get */ - $get = $this->container[$offset]; - return $get; - } - - /** - * @internal You should not use this directly from another application - * - * @return array - */ - public function __debugInfo() - { - if (empty($this->container)) { - return array(); - } - $c = array( - (int) ($this->container[0]->toInt()), - (int) ($this->container[1]->toInt()), - (int) ($this->container[2]->toInt()), - (int) ($this->container[3]->toInt()), - (int) ($this->container[4]->toInt()), - (int) ($this->container[5]->toInt()), - (int) ($this->container[6]->toInt()), - (int) ($this->container[7]->toInt()), - (int) ($this->container[8]->toInt()), - (int) ($this->container[9]->toInt()) - ); - return array(implode(', ', $c)); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php deleted file mode 100644 index c8d151b3..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php +++ /dev/null @@ -1,66 +0,0 @@ -YplusX = $YplusX; - if ($YminusX === null) { - $YminusX = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->YminusX = $YminusX; - if ($Z === null) { - $Z = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->Z = $Z; - if ($T2d === null) { - $T2d = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->T2d = $T2d; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php deleted file mode 100644 index 2fc56802..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php +++ /dev/null @@ -1,68 +0,0 @@ -X = $x; - if ($y === null) { - $y = ParagonIE_Sodium_Core32_Curve25519::fe_0(); - } - $this->Y = $y; - if ($z === null) { - $z = ParagonIE_Sodium_Core32_Curve25519::fe_0(); - } - $this->Z = $z; - if ($t === null) { - $t = ParagonIE_Sodium_Core32_Curve25519::fe_0(); - } - $this->T = $t; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php deleted file mode 100644 index e5ff24a2..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php +++ /dev/null @@ -1,55 +0,0 @@ -X = $x; - if ($y === null) { - $y = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->Y = $y; - if ($z === null) { - $z = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->Z = $z; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php deleted file mode 100644 index e4fc3029..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php +++ /dev/null @@ -1,66 +0,0 @@ -X = $x; - if ($y === null) { - $y = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->Y = $y; - if ($z === null) { - $z = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->Z = $z; - if ($t === null) { - $t = new ParagonIE_Sodium_Core32_Curve25519_Fe(); - } - $this->T = $t; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php deleted file mode 100644 index fe8a9c89..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php +++ /dev/null @@ -1,57 +0,0 @@ -yplusx = $yplusx; - if ($yminusx === null) { - $yminusx = ParagonIE_Sodium_Core32_Curve25519::fe_0(); - } - $this->yminusx = $yminusx; - if ($xy2d === null) { - $xy2d = ParagonIE_Sodium_Core32_Curve25519::fe_0(); - } - $this->xy2d = $xy2d; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/H.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/H.php deleted file mode 100644 index 19b3904c..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Curve25519/H.php +++ /dev/null @@ -1,1468 +0,0 @@ ->>> Basically, int[32][8][3][10] - */ - protected static $base = array( - array( - array( - array(25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605), - array(-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378), - array(-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546), - ), - array( - array(-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303), - array(-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081), - array(26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697), - ), - array( - array(15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024), - array(16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574), - array(30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357), - ), - array( - array(-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540), - array(23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397), - array(7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325), - ), - array( - array(10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380), - array(4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306), - array(19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942), - ), - array( - array(-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777), - array(-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737), - array(-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652), - ), - array( - array(5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766), - array(-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701), - array(28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300), - ), - array( - array(14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726), - array(-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955), - array(27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425), - ), - ), - array( - array( - array(-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171), - array(27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510), - array(17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660), - ), - array( - array(-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639), - array(29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963), - array(5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950), - ), - array( - array(-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568), - array(12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335), - array(25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628), - ), - array( - array(-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007), - array(-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772), - array(-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653), - ), - array( - array(2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567), - array(13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686), - array(21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372), - ), - array( - array(-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887), - array(-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954), - array(-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953), - ), - array( - array(24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833), - array(-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532), - array(-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876), - ), - array( - array(2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268), - array(33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214), - array(1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038), - ), - ), - array( - array( - array(6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800), - array(4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645), - array(-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664), - ), - array( - array(1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933), - array(-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182), - array(-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222), - ), - array( - array(-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991), - array(20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880), - array(9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092), - ), - array( - array(-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295), - array(19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788), - array(8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553), - ), - array( - array(-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026), - array(11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347), - array(-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033), - ), - array( - array(-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395), - array(-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278), - array(1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890), - ), - array( - array(32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995), - array(-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596), - array(-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891), - ), - array( - array(31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060), - array(11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608), - array(-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606), - ), - ), - array( - array( - array(7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389), - array(-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016), - array(-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341), - ), - array( - array(-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505), - array(14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553), - array(-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655), - ), - array( - array(15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220), - array(12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631), - array(-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099), - ), - array( - array(26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556), - array(14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749), - array(236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930), - ), - array( - array(1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391), - array(5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253), - array(20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066), - ), - array( - array(24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958), - array(-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082), - array(-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383), - ), - array( - array(-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521), - array(-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807), - array(23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948), - ), - array( - array(9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134), - array(-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455), - array(27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629), - ), - ), - array( - array( - array(-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069), - array(-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746), - array(24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919), - ), - array( - array(11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837), - array(8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906), - array(-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771), - ), - array( - array(-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817), - array(10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098), - array(10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409), - ), - array( - array(-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504), - array(-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727), - array(28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420), - ), - array( - array(-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003), - array(-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605), - array(-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384), - ), - array( - array(-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701), - array(-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683), - array(29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708), - ), - array( - array(-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563), - array(-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260), - array(-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387), - ), - array( - array(-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672), - array(23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686), - array(-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665), - ), - ), - array( - array( - array(11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182), - array(-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277), - array(14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628), - ), - array( - array(-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474), - array(-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539), - array(-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822), - ), - array( - array(-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970), - array(19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756), - array(-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508), - ), - array( - array(-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683), - array(-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655), - array(-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158), - ), - array( - array(-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125), - array(-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839), - array(-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664), - ), - array( - array(27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294), - array(-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899), - array(-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070), - ), - array( - array(3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294), - array(-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949), - array(-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083), - ), - array( - array(31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420), - array(-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940), - array(29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396), - ), - ), - array( - array( - array(-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567), - array(20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127), - array(-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294), - ), - array( - array(-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887), - array(22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964), - array(16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195), - ), - array( - array(9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244), - array(24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999), - array(-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762), - ), - array( - array(-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274), - array(-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236), - array(-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605), - ), - array( - array(-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761), - array(-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884), - array(-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482), - ), - array( - array(-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638), - array(-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490), - array(-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170), - ), - array( - array(5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736), - array(10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124), - array(-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392), - ), - array( - array(8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029), - array(6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048), - array(28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958), - ), - ), - array( - array( - array(24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593), - array(26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071), - array(-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692), - ), - array( - array(11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687), - array(-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441), - array(-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001), - ), - array( - array(-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460), - array(-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007), - array(-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762), - ), - array( - array(15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005), - array(-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674), - array(4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035), - ), - array( - array(7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590), - array(-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957), - array(-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812), - ), - array( - array(33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740), - array(-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122), - array(-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158), - ), - array( - array(8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885), - array(26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140), - array(19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857), - ), - array( - array(801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155), - array(19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260), - array(19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483), - ), - ), - array( - array( - array(-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677), - array(32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815), - array(22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751), - ), - array( - array(-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203), - array(-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208), - array(1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230), - ), - array( - array(16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850), - array(-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389), - array(-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968), - ), - array( - array(-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689), - array(14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880), - array(5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304), - ), - array( - array(30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632), - array(-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412), - array(20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566), - ), - array( - array(-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038), - array(-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232), - array(-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943), - ), - array( - array(17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856), - array(23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738), - array(15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971), - ), - array( - array(-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718), - array(-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697), - array(-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883), - ), - ), - array( - array( - array(5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912), - array(-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358), - array(3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849), - ), - array( - array(29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307), - array(-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977), - array(-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335), - ), - array( - array(-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644), - array(-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616), - array(-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735), - ), - array( - array(-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099), - array(29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341), - array(-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336), - ), - array( - array(-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646), - array(31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425), - array(-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388), - ), - array( - array(-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743), - array(-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822), - array(-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462), - ), - array( - array(18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985), - array(9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702), - array(-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797), - ), - array( - array(21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293), - array(27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100), - array(19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688), - ), - ), - array( - array( - array(12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186), - array(2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610), - array(-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707), - ), - array( - array(7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220), - array(915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025), - array(32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044), - ), - array( - array(32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992), - array(-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027), - array(21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197), - ), - array( - array(8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901), - array(31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952), - array(19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878), - ), - array( - array(-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390), - array(32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730), - array(2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730), - ), - array( - array(-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180), - array(-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272), - array(-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715), - ), - array( - array(-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970), - array(-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772), - array(-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865), - ), - array( - array(15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750), - array(20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373), - array(32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348), - ), - ), - array( - array( - array(9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144), - array(-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195), - array(5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086), - ), - array( - array(-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684), - array(-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518), - array(-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233), - ), - array( - array(-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793), - array(-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794), - array(580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435), - ), - array( - array(23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921), - array(13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518), - array(2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563), - ), - array( - array(14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278), - array(-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024), - array(4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030), - ), - array( - array(10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783), - array(27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717), - array(6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844), - ), - array( - array(14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333), - array(16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048), - array(22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760), - ), - array( - array(-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760), - array(-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757), - array(-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112), - ), - ), - array( - array( - array(-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468), - array(3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184), - array(10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289), - ), - array( - array(15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066), - array(24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882), - array(13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226), - ), - array( - array(16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101), - array(29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279), - array(-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811), - ), - array( - array(27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709), - array(20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714), - array(-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121), - ), - array( - array(9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464), - array(12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847), - array(13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400), - ), - array( - array(4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414), - array(-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158), - array(17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045), - ), - array( - array(-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415), - array(-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459), - array(-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079), - ), - array( - array(21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412), - array(-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743), - array(-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836), - ), - ), - array( - array( - array(12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022), - array(18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429), - array(-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065), - ), - array( - array(30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861), - array(10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000), - array(-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101), - ), - array( - array(32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815), - array(29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642), - array(10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966), - ), - array( - array(25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574), - array(-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742), - array(-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689), - ), - array( - array(12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020), - array(-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772), - array(3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982), - ), - array( - array(-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953), - array(-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218), - array(-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265), - ), - array( - array(29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073), - array(-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325), - array(-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798), - ), - array( - array(-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870), - array(-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863), - array(-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927), - ), - ), - array( - array( - array(-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267), - array(-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663), - array(22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862), - ), - array( - array(-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673), - array(15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943), - array(15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020), - ), - array( - array(-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238), - array(11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064), - array(14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795), - ), - array( - array(15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052), - array(-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904), - array(29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531), - ), - array( - array(-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979), - array(-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841), - array(10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431), - ), - array( - array(10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324), - array(-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940), - array(10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320), - ), - array( - array(-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184), - array(14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114), - array(30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878), - ), - array( - array(12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784), - array(-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091), - array(-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585), - ), - ), - array( - array( - array(-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208), - array(10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864), - array(17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661), - ), - array( - array(7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233), - array(26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212), - array(-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525), - ), - array( - array(-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068), - array(9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397), - array(-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988), - ), - array( - array(5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889), - array(32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038), - array(14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697), - ), - array( - array(20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875), - array(-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905), - array(-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656), - ), - array( - array(11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818), - array(27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714), - array(10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203), - ), - array( - array(20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931), - array(-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024), - array(-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084), - ), - array( - array(-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204), - array(20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817), - array(27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667), - ), - ), - array( - array( - array(11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504), - array(-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768), - array(-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255), - ), - array( - array(6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790), - array(1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438), - array(-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333), - ), - array( - array(17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971), - array(31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905), - array(29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409), - ), - array( - array(12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409), - array(6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499), - array(-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363), - ), - array( - array(28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664), - array(-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324), - array(-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940), - ), - array( - array(13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990), - array(-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914), - array(-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290), - ), - array( - array(24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257), - array(-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433), - array(-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236), - ), - array( - array(-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045), - array(11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093), - array(-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347), - ), - ), - array( - array( - array(-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191), - array(-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507), - array(-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906), - ), - array( - array(3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018), - array(-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109), - array(-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926), - ), - array( - array(-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528), - array(8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625), - array(-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286), - ), - array( - array(2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033), - array(27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866), - array(21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896), - ), - array( - array(30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075), - array(26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347), - array(-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437), - ), - array( - array(-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165), - array(-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588), - array(-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193), - ), - array( - array(-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017), - array(-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883), - array(21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961), - ), - array( - array(8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043), - array(29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663), - array(-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362), - ), - ), - array( - array( - array(-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860), - array(2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466), - array(-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063), - ), - array( - array(-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997), - array(-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295), - array(-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369), - ), - array( - array(9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385), - array(18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109), - array(2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906), - ), - array( - array(4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424), - array(-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185), - array(7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962), - ), - array( - array(-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325), - array(10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593), - array(696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404), - ), - array( - array(-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644), - array(17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801), - array(26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804), - ), - array( - array(-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884), - array(-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577), - array(-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849), - ), - array( - array(32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473), - array(-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644), - array(-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319), - ), - ), - array( - array( - array(-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599), - array(-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768), - array(-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084), - ), - array( - array(-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328), - array(-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369), - array(20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920), - ), - array( - array(12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815), - array(-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025), - array(-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397), - ), - array( - array(-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448), - array(6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981), - array(30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165), - ), - array( - array(32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501), - array(17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073), - array(-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861), - ), - array( - array(14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845), - array(-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211), - array(18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870), - ), - array( - array(10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096), - array(33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803), - array(-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168), - ), - array( - array(30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965), - array(-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505), - array(18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598), - ), - ), - array( - array( - array(5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782), - array(5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900), - array(-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479), - ), - array( - array(-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208), - array(8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232), - array(17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719), - ), - array( - array(16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271), - array(-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326), - array(-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132), - ), - array( - array(14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300), - array(8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570), - array(15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670), - ), - array( - array(-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994), - array(-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913), - array(31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317), - ), - array( - array(-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730), - array(842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096), - array(-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078), - ), - array( - array(-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411), - array(-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905), - array(-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654), - ), - array( - array(-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870), - array(-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498), - array(12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579), - ), - ), - array( - array( - array(14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677), - array(10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647), - array(-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743), - ), - array( - array(-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468), - array(21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375), - array(-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155), - ), - array( - array(6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725), - array(-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612), - array(-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943), - ), - array( - array(-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944), - array(30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928), - array(9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406), - ), - array( - array(22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139), - array(-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963), - array(-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693), - ), - array( - array(1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734), - array(-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680), - array(-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410), - ), - array( - array(-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931), - array(-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654), - array(22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710), - ), - array( - array(29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180), - array(-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684), - array(-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895), - ), - ), - array( - array( - array(22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501), - array(-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413), - array(6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880), - ), - array( - array(-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874), - array(22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962), - array(-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899), - ), - array( - array(21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152), - array(9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063), - array(7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080), - ), - array( - array(-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146), - array(-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183), - array(-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133), - ), - array( - array(-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421), - array(-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622), - array(-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197), - ), - array( - array(2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663), - array(31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753), - array(4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755), - ), - array( - array(-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862), - array(-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118), - array(26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171), - ), - array( - array(15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380), - array(16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824), - array(28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270), - ), - ), - array( - array( - array(-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438), - array(-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584), - array(-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562), - ), - array( - array(30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471), - array(18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610), - array(19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269), - ), - array( - array(-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650), - array(14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369), - array(19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461), - ), - array( - array(30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462), - array(-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793), - array(-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218), - ), - array( - array(-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226), - array(18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019), - array(-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037), - ), - array( - array(31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171), - array(-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132), - array(-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841), - ), - array( - array(21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181), - array(-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210), - array(-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040), - ), - array( - array(3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935), - array(24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105), - array(-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814), - ), - ), - array( - array( - array(793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852), - array(5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581), - array(-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646), - ), - array( - array(10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844), - array(10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025), - array(27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453), - ), - array( - array(-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068), - array(4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192), - array(-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921), - ), - array( - array(-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259), - array(-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426), - array(-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072), - ), - array( - array(-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305), - array(13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832), - array(28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943), - ), - array( - array(-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011), - array(24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447), - array(17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494), - ), - array( - array(-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245), - array(-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859), - array(28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915), - ), - array( - array(16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707), - array(10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848), - array(-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224), - ), - ), - array( - array( - array(-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391), - array(15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215), - array(-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101), - ), - array( - array(23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713), - array(21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849), - array(-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930), - ), - array( - array(-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940), - array(-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031), - array(-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404), - ), - array( - array(-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243), - array(-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116), - array(-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525), - ), - array( - array(-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509), - array(-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883), - array(15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865), - ), - array( - array(-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660), - array(4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273), - array(-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138), - ), - array( - array(-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560), - array(-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135), - array(2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941), - ), - array( - array(-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739), - array(18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756), - array(-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819), - ), - ), - array( - array( - array(-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347), - array(-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028), - array(21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075), - ), - array( - array(16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799), - array(-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609), - array(-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817), - ), - array( - array(-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989), - array(-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523), - array(4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278), - ), - array( - array(31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045), - array(19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377), - array(24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480), - ), - array( - array(17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016), - array(510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426), - array(18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525), - ), - array( - array(13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396), - array(9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080), - array(12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892), - ), - array( - array(15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275), - array(11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074), - array(20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140), - ), - array( - array(-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717), - array(-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101), - array(24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127), - ), - ), - array( - array( - array(-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632), - array(-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415), - array(-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160), - ), - array( - array(31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876), - array(22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625), - array(-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478), - ), - array( - array(27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164), - array(26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595), - array(-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248), - ), - array( - array(-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858), - array(15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193), - array(8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184), - ), - array( - array(-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942), - array(-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635), - array(21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948), - ), - array( - array(11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935), - array(-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415), - array(-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416), - ), - array( - array(-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018), - array(4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778), - array(366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659), - ), - array( - array(-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385), - array(18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503), - array(476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329), - ), - ), - array( - array( - array(20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056), - array(-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838), - array(24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948), - ), - array( - array(-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691), - array(-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118), - array(-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517), - ), - array( - array(-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269), - array(-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904), - array(-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589), - ), - array( - array(-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193), - array(-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910), - array(-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930), - ), - array( - array(-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667), - array(25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481), - array(-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876), - ), - array( - array(22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640), - array(-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278), - array(-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112), - ), - array( - array(26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272), - array(17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012), - array(-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221), - ), - array( - array(30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046), - array(13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345), - array(-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310), - ), - ), - array( - array( - array(19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937), - array(31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636), - array(-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008), - ), - array( - array(-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429), - array(-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576), - array(31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066), - ), - array( - array(-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490), - array(-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104), - array(33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053), - ), - array( - array(31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275), - array(-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511), - array(22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095), - ), - array( - array(-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439), - array(23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939), - array(-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424), - ), - array( - array(2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310), - array(3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608), - array(-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079), - ), - array( - array(-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101), - array(21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418), - array(18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576), - ), - array( - array(30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356), - array(9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996), - array(-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099), - ), - ), - array( - array( - array(-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728), - array(-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658), - array(-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242), - ), - array( - array(-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001), - array(-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766), - array(18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373), - ), - array( - array(26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458), - array(-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628), - array(-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657), - ), - array( - array(-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062), - array(25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616), - array(31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014), - ), - array( - array(24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383), - array(-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814), - array(-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718), - ), - array( - array(30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417), - array(2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222), - array(33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444), - ), - array( - array(-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597), - array(23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970), - array(1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799), - ), - array( - array(-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647), - array(13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511), - array(-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032), - ), - ), - array( - array( - array(9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834), - array(-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461), - array(29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062), - ), - array( - array(-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516), - array(-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547), - array(-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240), - ), - array( - array(-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038), - array(-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741), - array(16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103), - ), - array( - array(-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747), - array(-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323), - array(31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016), - ), - array( - array(-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373), - array(15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228), - array(-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141), - ), - array( - array(16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399), - array(11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831), - array(-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376), - ), - array( - array(-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313), - array(-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958), - array(-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577), - ), - array( - array(-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743), - array(29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684), - array(-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476), - ), - ) - ); - - /** - * See: libsodium's crypto_core/curve25519/ref10/base2.h - * - * @var array>> basically int[8][3] - */ - protected static $base2 = array( - array( - array(25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605), - array(-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378), - array(-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546), - ), - array( - array(15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024), - array(16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574), - array(30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357), - ), - array( - array(10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380), - array(4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306), - array(19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942), - ), - array( - array(5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766), - array(-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701), - array(28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300), - ), - array( - array(-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877), - array(-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951), - array(4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784), - ), - array( - array(-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436), - array(25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918), - array(23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877), - ), - array( - array(-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800), - array(-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305), - array(-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300), - ), - array( - array(-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876), - array(-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619), - array(-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683), - ) - ); - - /** - * 37095705934669439343138083508754565189542113879843219016388785533085940283555 - * - * @var array - */ - protected static $d = array( - -10913610, - 13857413, - -15372611, - 6949391, - 114729, - -8787816, - -6275908, - -3247719, - -18696448, - -12055116 - ); - - /** - * 2 * d = 16295367250680780974490674513165176452449235426866156013048779062215315747161 - * - * @var array - */ - protected static $d2 = array( - -21827239, - -5839606, - -30745221, - 13898782, - 229458, - 15978800, - -12551817, - -6495438, - 29715968, - 9444199 - ); - - /** - * sqrt(-1) - * - * @var array - */ - protected static $sqrtm1 = array( - -32595792, - -7943725, - 9377950, - 3500415, - 12389472, - -272473, - -25146209, - -2005654, - 326686, - 11406482 - ); -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Ed25519.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Ed25519.php deleted file mode 100644 index 339ef69f..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Ed25519.php +++ /dev/null @@ -1,486 +0,0 @@ -X)) { - throw new SodiumException('Unexpected zero result'); - } - - # fe_1(one_minus_y); - # fe_sub(one_minus_y, one_minus_y, A.Y); - # fe_invert(one_minus_y, one_minus_y); - $one_minux_y = self::fe_invert( - self::fe_sub( - self::fe_1(), - $A->Y - ) - ); - - - # fe_1(x); - # fe_add(x, x, A.Y); - # fe_mul(x, x, one_minus_y); - $x = self::fe_mul( - self::fe_add(self::fe_1(), $A->Y), - $one_minux_y - ); - - # fe_tobytes(curve25519_pk, x); - return self::fe_tobytes($x); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sk_to_pk($sk) - { - return self::ge_p3_tobytes( - self::ge_scalarmult_base( - self::substr($sk, 0, 32) - ) - ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign($message, $sk) - { - /** @var string $signature */ - $signature = self::sign_detached($message, $sk); - return $signature . $message; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message A signed message - * @param string $pk Public key - * @return string Message (without signature) - * @throws SodiumException - * @throws TypeError - */ - public static function sign_open($message, $pk) - { - /** @var string $signature */ - $signature = self::substr($message, 0, 64); - - /** @var string $message */ - $message = self::substr($message, 64); - - if (self::verify_detached($signature, $message, $pk)) { - return $message; - } - throw new SodiumException('Invalid signature'); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - * @psalm-suppress PossiblyInvalidArgument - */ - public static function sign_detached($message, $sk) - { - # crypto_hash_sha512(az, sk, 32); - $az = hash('sha512', self::substr($sk, 0, 32), true); - - # az[0] &= 248; - # az[31] &= 63; - # az[31] |= 64; - $az[0] = self::intToChr(self::chrToInt($az[0]) & 248); - $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64); - - # crypto_hash_sha512_init(&hs); - # crypto_hash_sha512_update(&hs, az + 32, 32); - # crypto_hash_sha512_update(&hs, m, mlen); - # crypto_hash_sha512_final(&hs, nonce); - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($az, 32, 32)); - self::hash_update($hs, $message); - $nonceHash = hash_final($hs, true); - - # memmove(sig + 32, sk + 32, 32); - $pk = self::substr($sk, 32, 32); - - # sc_reduce(nonce); - # ge_scalarmult_base(&R, nonce); - # ge_p3_tobytes(sig, &R); - $nonce = self::sc_reduce($nonceHash) . self::substr($nonceHash, 32); - $sig = self::ge_p3_tobytes( - self::ge_scalarmult_base($nonce) - ); - - # crypto_hash_sha512_init(&hs); - # crypto_hash_sha512_update(&hs, sig, 64); - # crypto_hash_sha512_update(&hs, m, mlen); - # crypto_hash_sha512_final(&hs, hram); - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($sig, 0, 32)); - self::hash_update($hs, self::substr($pk, 0, 32)); - self::hash_update($hs, $message); - $hramHash = hash_final($hs, true); - - # sc_reduce(hram); - # sc_muladd(sig + 32, hram, az, nonce); - $hram = self::sc_reduce($hramHash); - $sigAfter = self::sc_muladd($hram, $az, $nonce); - $sig = self::substr($sig, 0, 32) . self::substr($sigAfter, 0, 32); - - try { - ParagonIE_Sodium_Compat::memzero($az); - } catch (SodiumException $ex) { - $az = null; - } - return $sig; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $sig - * @param string $message - * @param string $pk - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function verify_detached($sig, $message, $pk) - { - if (self::strlen($sig) < 64) { - throw new SodiumException('Signature is too short'); - } - if ((self::chrToInt($sig[63]) & 240) && self::check_S_lt_L(self::substr($sig, 32, 32))) { - throw new SodiumException('S < L - Invalid signature'); - } - if (self::small_order($sig)) { - throw new SodiumException('Signature is on too small of an order'); - } - if ((self::chrToInt($sig[63]) & 224) !== 0) { - throw new SodiumException('Invalid signature'); - } - $d = 0; - for ($i = 0; $i < 32; ++$i) { - $d |= self::chrToInt($pk[$i]); - } - if ($d === 0) { - throw new SodiumException('All zero public key'); - } - - /** @var bool The original value of ParagonIE_Sodium_Compat::$fastMult */ - $orig = ParagonIE_Sodium_Compat::$fastMult; - - // Set ParagonIE_Sodium_Compat::$fastMult to true to speed up verification. - ParagonIE_Sodium_Compat::$fastMult = true; - - /** @var ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A */ - $A = self::ge_frombytes_negate_vartime($pk); - - /** @var string $hDigest */ - $hDigest = hash( - 'sha512', - self::substr($sig, 0, 32) . - self::substr($pk, 0, 32) . - $message, - true - ); - - /** @var string $h */ - $h = self::sc_reduce($hDigest) . self::substr($hDigest, 32); - - /** @var ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $R */ - $R = self::ge_double_scalarmult_vartime( - $h, - $A, - self::substr($sig, 32) - ); - - /** @var string $rcheck */ - $rcheck = self::ge_tobytes($R); - - // Reset ParagonIE_Sodium_Compat::$fastMult to what it was before. - ParagonIE_Sodium_Compat::$fastMult = $orig; - - return self::verify_32($rcheck, self::substr($sig, 0, 32)); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $S - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function check_S_lt_L($S) - { - if (self::strlen($S) < 32) { - throw new SodiumException('Signature must be 32 bytes'); - } - static $L = array( - 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, - 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 - ); - /** @var array $L */ - $c = 0; - $n = 1; - $i = 32; - - do { - --$i; - $x = self::chrToInt($S[$i]); - $c |= ( - (($x - $L[$i]) >> 8) & $n - ); - $n &= ( - (($x ^ $L[$i]) - 1) >> 8 - ); - } while ($i !== 0); - - return $c === 0; - } - - /** - * @param string $R - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function small_order($R) - { - static $blocklist = array( - /* 0 (order 4) */ - array( - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - ), - /* 1 (order 1) */ - array( - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - ), - /* 2707385501144840649318225287225658788936804267575313519463743609750303402022 (order 8) */ - array( - 0x26, 0xe8, 0x95, 0x8f, 0xc2, 0xb2, 0x27, 0xb0, - 0x45, 0xc3, 0xf4, 0x89, 0xf2, 0xef, 0x98, 0xf0, - 0xd5, 0xdf, 0xac, 0x05, 0xd3, 0xc6, 0x33, 0x39, - 0xb1, 0x38, 0x02, 0x88, 0x6d, 0x53, 0xfc, 0x05 - ), - /* 55188659117513257062467267217118295137698188065244968500265048394206261417927 (order 8) */ - array( - 0xc7, 0x17, 0x6a, 0x70, 0x3d, 0x4d, 0xd8, 0x4f, - 0xba, 0x3c, 0x0b, 0x76, 0x0d, 0x10, 0x67, 0x0f, - 0x2a, 0x20, 0x53, 0xfa, 0x2c, 0x39, 0xcc, 0xc6, - 0x4e, 0xc7, 0xfd, 0x77, 0x92, 0xac, 0x03, 0x7a - ), - /* p-1 (order 2) */ - array( - 0x13, 0xe8, 0x95, 0x8f, 0xc2, 0xb2, 0x27, 0xb0, - 0x45, 0xc3, 0xf4, 0x89, 0xf2, 0xef, 0x98, 0xf0, - 0xd5, 0xdf, 0xac, 0x05, 0xd3, 0xc6, 0x33, 0x39, - 0xb1, 0x38, 0x02, 0x88, 0x6d, 0x53, 0xfc, 0x85 - ), - /* p (order 4) */ - array( - 0xb4, 0x17, 0x6a, 0x70, 0x3d, 0x4d, 0xd8, 0x4f, - 0xba, 0x3c, 0x0b, 0x76, 0x0d, 0x10, 0x67, 0x0f, - 0x2a, 0x20, 0x53, 0xfa, 0x2c, 0x39, 0xcc, 0xc6, - 0x4e, 0xc7, 0xfd, 0x77, 0x92, 0xac, 0x03, 0xfa - ), - /* p+1 (order 1) */ - array( - 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f - ), - /* p+2707385501144840649318225287225658788936804267575313519463743609750303402022 (order 8) */ - array( - 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f - ), - /* p+55188659117513257062467267217118295137698188065244968500265048394206261417927 (order 8) */ - array( - 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f - ), - /* 2p-1 (order 2) */ - array( - 0xd9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - ), - /* 2p (order 4) */ - array( - 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - ), - /* 2p+1 (order 1) */ - array( - 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - ) - ); - /** @var array> $blocklist */ - $countBlocklist = count($blocklist); - - for ($i = 0; $i < $countBlocklist; ++$i) { - $c = 0; - for ($j = 0; $j < 32; ++$j) { - $c |= self::chrToInt($R[$j]) ^ $blocklist[$i][$j]; - } - if ($c === 0) { - return true; - } - } - return false; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/HChaCha20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/HChaCha20.php deleted file mode 100644 index 678245c2..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/HChaCha20.php +++ /dev/null @@ -1,128 +0,0 @@ -toReverseString() . - $x1->toReverseString() . - $x2->toReverseString() . - $x3->toReverseString() . - $x12->toReverseString() . - $x13->toReverseString() . - $x14->toReverseString() . - $x15->toReverseString(); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/HSalsa20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/HSalsa20.php deleted file mode 100644 index a0065955..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/HSalsa20.php +++ /dev/null @@ -1,142 +0,0 @@ - 0; $i -= 2) { - $x4 = $x4->xorInt32($x0->addInt32($x12)->rotateLeft(7)); - $x8 = $x8->xorInt32($x4->addInt32($x0)->rotateLeft(9)); - $x12 = $x12->xorInt32($x8->addInt32($x4)->rotateLeft(13)); - $x0 = $x0->xorInt32($x12->addInt32($x8)->rotateLeft(18)); - - $x9 = $x9->xorInt32($x5->addInt32($x1)->rotateLeft(7)); - $x13 = $x13->xorInt32($x9->addInt32($x5)->rotateLeft(9)); - $x1 = $x1->xorInt32($x13->addInt32($x9)->rotateLeft(13)); - $x5 = $x5->xorInt32($x1->addInt32($x13)->rotateLeft(18)); - - $x14 = $x14->xorInt32($x10->addInt32($x6)->rotateLeft(7)); - $x2 = $x2->xorInt32($x14->addInt32($x10)->rotateLeft(9)); - $x6 = $x6->xorInt32($x2->addInt32($x14)->rotateLeft(13)); - $x10 = $x10->xorInt32($x6->addInt32($x2)->rotateLeft(18)); - - $x3 = $x3->xorInt32($x15->addInt32($x11)->rotateLeft(7)); - $x7 = $x7->xorInt32($x3->addInt32($x15)->rotateLeft(9)); - $x11 = $x11->xorInt32($x7->addInt32($x3)->rotateLeft(13)); - $x15 = $x15->xorInt32($x11->addInt32($x7)->rotateLeft(18)); - - $x1 = $x1->xorInt32($x0->addInt32($x3)->rotateLeft(7)); - $x2 = $x2->xorInt32($x1->addInt32($x0)->rotateLeft(9)); - $x3 = $x3->xorInt32($x2->addInt32($x1)->rotateLeft(13)); - $x0 = $x0->xorInt32($x3->addInt32($x2)->rotateLeft(18)); - - $x6 = $x6->xorInt32($x5->addInt32($x4)->rotateLeft(7)); - $x7 = $x7->xorInt32($x6->addInt32($x5)->rotateLeft(9)); - $x4 = $x4->xorInt32($x7->addInt32($x6)->rotateLeft(13)); - $x5 = $x5->xorInt32($x4->addInt32($x7)->rotateLeft(18)); - - $x11 = $x11->xorInt32($x10->addInt32($x9)->rotateLeft(7)); - $x8 = $x8->xorInt32($x11->addInt32($x10)->rotateLeft(9)); - $x9 = $x9->xorInt32($x8->addInt32($x11)->rotateLeft(13)); - $x10 = $x10->xorInt32($x9->addInt32($x8)->rotateLeft(18)); - - $x12 = $x12->xorInt32($x15->addInt32($x14)->rotateLeft(7)); - $x13 = $x13->xorInt32($x12->addInt32($x15)->rotateLeft(9)); - $x14 = $x14->xorInt32($x13->addInt32($x12)->rotateLeft(13)); - $x15 = $x15->xorInt32($x14->addInt32($x13)->rotateLeft(18)); - } - - return $x0->toReverseString() . - $x5->toReverseString() . - $x10->toReverseString() . - $x15->toReverseString() . - $x6->toReverseString() . - $x7->toReverseString() . - $x8->toReverseString() . - $x9->toReverseString(); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Int32.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Int32.php deleted file mode 100644 index 28f72210..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Int32.php +++ /dev/null @@ -1,873 +0,0 @@ - - two 16-bit integers - * - * 0 is the higher 16 bits - * 1 is the lower 16 bits - */ - public $limbs = array(0, 0); - - /** - * @var int - */ - public $overflow = 0; - - /** - * @var bool - */ - public $unsignedInt = false; - - /** - * ParagonIE_Sodium_Core32_Int32 constructor. - * @param array $array - * @param bool $unsignedInt - */ - public function __construct($array = array(0, 0), $unsignedInt = false) - { - $this->limbs = array( - (int) $array[0], - (int) $array[1] - ); - $this->overflow = 0; - $this->unsignedInt = $unsignedInt; - } - - /** - * Adds two int32 objects - * - * @param ParagonIE_Sodium_Core32_Int32 $addend - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function addInt32(ParagonIE_Sodium_Core32_Int32 $addend) - { - $i0 = $this->limbs[0]; - $i1 = $this->limbs[1]; - $j0 = $addend->limbs[0]; - $j1 = $addend->limbs[1]; - - $r1 = $i1 + ($j1 & 0xffff); - $carry = $r1 >> 16; - - $r0 = $i0 + ($j0 & 0xffff) + $carry; - $carry = $r0 >> 16; - - $r0 &= 0xffff; - $r1 &= 0xffff; - - $return = new ParagonIE_Sodium_Core32_Int32( - array($r0, $r1) - ); - $return->overflow = $carry; - $return->unsignedInt = $this->unsignedInt; - return $return; - } - - /** - * Adds a normal integer to an int32 object - * - * @param int $int - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - */ - public function addInt($int) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($int, 'int', 1); - /** @var int $int */ - $int = (int) $int; - - $int = (int) $int; - - $i0 = $this->limbs[0]; - $i1 = $this->limbs[1]; - - $r1 = $i1 + ($int & 0xffff); - $carry = $r1 >> 16; - - $r0 = $i0 + (($int >> 16) & 0xffff) + $carry; - $carry = $r0 >> 16; - $r0 &= 0xffff; - $r1 &= 0xffff; - $return = new ParagonIE_Sodium_Core32_Int32( - array($r0, $r1) - ); - $return->overflow = $carry; - $return->unsignedInt = $this->unsignedInt; - return $return; - } - - /** - * @param int $b - * @return int - */ - public function compareInt($b = 0) - { - $gt = 0; - $eq = 1; - - $i = 2; - $j = 0; - while ($i > 0) { - --$i; - /** @var int $x1 */ - $x1 = $this->limbs[$i]; - /** @var int $x2 */ - $x2 = ($b >> ($j << 4)) & 0xffff; - /** @var int $gt */ - $gt |= (($x2 - $x1) >> 8) & $eq; - /** @var int $eq */ - $eq &= (($x2 ^ $x1) - 1) >> 8; - } - return ($gt + $gt - $eq) + 1; - } - - /** - * @param int $m - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function mask($m = 0) - { - /** @var int $hi */ - $hi = ((int) $m >> 16); - $hi &= 0xffff; - /** @var int $lo */ - $lo = ((int) $m) & 0xffff; - return new ParagonIE_Sodium_Core32_Int32( - array( - (int) ($this->limbs[0] & $hi), - (int) ($this->limbs[1] & $lo) - ), - $this->unsignedInt - ); - } - - /** - * @param array $a - * @param array $b - * @param int $baseLog2 - * @return array - */ - public function multiplyLong(array $a, array $b, $baseLog2 = 16) - { - $a_l = count($a); - $b_l = count($b); - /** @var array $r */ - $r = array_fill(0, $a_l + $b_l + 1, 0); - $base = 1 << $baseLog2; - for ($i = 0; $i < $a_l; ++$i) { - $a_i = $a[$i]; - for ($j = 0; $j < $a_l; ++$j) { - $b_j = $b[$j]; - $product = ($a_i * $b_j) + $r[$i + $j]; - $carry = ((int) $product >> $baseLog2 & 0xffff); - $r[$i + $j] = ((int) $product - (int) ($carry * $base)) & 0xffff; - $r[$i + $j + 1] += $carry; - } - } - return array_slice($r, 0, 5); - } - - /** - * @param int $int - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function mulIntFast($int) - { - // Handle negative numbers - $aNeg = ($this->limbs[0] >> 15) & 1; - $bNeg = ($int >> 31) & 1; - $a = array_reverse($this->limbs); - $b = array( - $int & 0xffff, - ($int >> 16) & 0xffff - ); - if ($aNeg) { - for ($i = 0; $i < 2; ++$i) { - $a[$i] = ($a[$i] ^ 0xffff) & 0xffff; - } - ++$a[0]; - } - if ($bNeg) { - for ($i = 0; $i < 2; ++$i) { - $b[$i] = ($b[$i] ^ 0xffff) & 0xffff; - } - ++$b[0]; - } - // Multiply - $res = $this->multiplyLong($a, $b); - - // Re-apply negation to results - if ($aNeg !== $bNeg) { - for ($i = 0; $i < 2; ++$i) { - $res[$i] = (0xffff ^ $res[$i]) & 0xffff; - } - // Handle integer overflow - $c = 1; - for ($i = 0; $i < 2; ++$i) { - $res[$i] += $c; - $c = $res[$i] >> 16; - $res[$i] &= 0xffff; - } - } - - // Return our values - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->limbs = array( - $res[1] & 0xffff, - $res[0] & 0xffff - ); - if (count($res) > 2) { - $return->overflow = $res[2] & 0xffff; - } - $return->unsignedInt = $this->unsignedInt; - return $return; - } - - /** - * @param ParagonIE_Sodium_Core32_Int32 $right - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function mulInt32Fast(ParagonIE_Sodium_Core32_Int32 $right) - { - $aNeg = ($this->limbs[0] >> 15) & 1; - $bNeg = ($right->limbs[0] >> 15) & 1; - - $a = array_reverse($this->limbs); - $b = array_reverse($right->limbs); - if ($aNeg) { - for ($i = 0; $i < 2; ++$i) { - $a[$i] = ($a[$i] ^ 0xffff) & 0xffff; - } - ++$a[0]; - } - if ($bNeg) { - for ($i = 0; $i < 2; ++$i) { - $b[$i] = ($b[$i] ^ 0xffff) & 0xffff; - } - ++$b[0]; - } - $res = $this->multiplyLong($a, $b); - if ($aNeg !== $bNeg) { - if ($aNeg !== $bNeg) { - for ($i = 0; $i < 2; ++$i) { - $res[$i] = ($res[$i] ^ 0xffff) & 0xffff; - } - $c = 1; - for ($i = 0; $i < 2; ++$i) { - $res[$i] += $c; - $c = $res[$i] >> 16; - $res[$i] &= 0xffff; - } - } - } - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->limbs = array( - $res[1] & 0xffff, - $res[0] & 0xffff - ); - if (count($res) > 2) { - $return->overflow = $res[2]; - } - return $return; - } - - /** - * @param int $int - * @param int $size - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - */ - public function mulInt($int = 0, $size = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($int, 'int', 1); - ParagonIE_Sodium_Core32_Util::declareScalarType($size, 'int', 2); - if (ParagonIE_Sodium_Compat::$fastMult) { - return $this->mulIntFast((int) $int); - } - /** @var int $int */ - $int = (int) $int; - /** @var int $size */ - $size = (int) $size; - - if (!$size) { - $size = 31; - } - /** @var int $size */ - - $a = clone $this; - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - - // Initialize: - $ret0 = 0; - $ret1 = 0; - $a0 = $a->limbs[0]; - $a1 = $a->limbs[1]; - - /** @var int $size */ - /** @var int $i */ - for ($i = $size; $i >= 0; --$i) { - $m = (int) (-($int & 1)); - $x0 = $a0 & $m; - $x1 = $a1 & $m; - - $ret1 += $x1; - $c = $ret1 >> 16; - - $ret0 += $x0 + $c; - - $ret0 &= 0xffff; - $ret1 &= 0xffff; - - $a1 = ($a1 << 1); - $x1 = $a1 >> 16; - $a0 = ($a0 << 1) | $x1; - $a0 &= 0xffff; - $a1 &= 0xffff; - $int >>= 1; - } - $return->limbs[0] = $ret0; - $return->limbs[1] = $ret1; - return $return; - } - - /** - * @param ParagonIE_Sodium_Core32_Int32 $int - * @param int $size - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - */ - public function mulInt32(ParagonIE_Sodium_Core32_Int32 $int, $size = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($size, 'int', 2); - if (ParagonIE_Sodium_Compat::$fastMult) { - return $this->mulInt32Fast($int); - } - if (!$size) { - $size = 31; - } - /** @var int $size */ - - $a = clone $this; - $b = clone $int; - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - - // Initialize: - $ret0 = 0; - $ret1 = 0; - $a0 = $a->limbs[0]; - $a1 = $a->limbs[1]; - $b0 = $b->limbs[0]; - $b1 = $b->limbs[1]; - - /** @var int $size */ - /** @var int $i */ - for ($i = $size; $i >= 0; --$i) { - $m = (int) (-($b1 & 1)); - $x0 = $a0 & $m; - $x1 = $a1 & $m; - - $ret1 += $x1; - $c = $ret1 >> 16; - - $ret0 += $x0 + $c; - - $ret0 &= 0xffff; - $ret1 &= 0xffff; - - $a1 = ($a1 << 1); - $x1 = $a1 >> 16; - $a0 = ($a0 << 1) | $x1; - $a0 &= 0xffff; - $a1 &= 0xffff; - - $x0 = ($b0 & 1) << 16; - $b0 = ($b0 >> 1); - $b1 = (($b1 | $x0) >> 1); - - $b0 &= 0xffff; - $b1 &= 0xffff; - - } - $return->limbs[0] = $ret0; - $return->limbs[1] = $ret1; - - return $return; - } - - /** - * OR this 32-bit integer with another. - * - * @param ParagonIE_Sodium_Core32_Int32 $b - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function orInt32(ParagonIE_Sodium_Core32_Int32 $b) - { - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - $return->limbs = array( - (int) ($this->limbs[0] | $b->limbs[0]), - (int) ($this->limbs[1] | $b->limbs[1]) - ); - /** @var int overflow */ - $return->overflow = $this->overflow | $b->overflow; - return $return; - } - - /** - * @param int $b - * @return bool - */ - public function isGreaterThan($b = 0) - { - return $this->compareInt($b) > 0; - } - - /** - * @param int $b - * @return bool - */ - public function isLessThanInt($b = 0) - { - return $this->compareInt($b) < 0; - } - - /** - * @param int $c - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - */ - public function rotateLeft($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - $c &= 31; - if ($c === 0) { - // NOP, but we want a copy. - $return->limbs = $this->limbs; - } else { - /** @var int $c */ - - /** @var int $idx_shift */ - $idx_shift = ($c >> 4) & 1; - - /** @var int $sub_shift */ - $sub_shift = $c & 15; - - /** @var array $limbs */ - $limbs =& $return->limbs; - - /** @var array $myLimbs */ - $myLimbs =& $this->limbs; - - for ($i = 1; $i >= 0; --$i) { - /** @var int $j */ - $j = ($i + $idx_shift) & 1; - /** @var int $k */ - $k = ($i + $idx_shift + 1) & 1; - $limbs[$i] = (int) ( - ( - ((int) ($myLimbs[$j]) << $sub_shift) - | - ((int) ($myLimbs[$k]) >> (16 - $sub_shift)) - ) & 0xffff - ); - } - } - return $return; - } - - /** - * Rotate to the right - * - * @param int $c - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - */ - public function rotateRight($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - $c &= 31; - /** @var int $c */ - if ($c === 0) { - // NOP, but we want a copy. - $return->limbs = $this->limbs; - } else { - /** @var int $c */ - - /** @var int $idx_shift */ - $idx_shift = ($c >> 4) & 1; - - /** @var int $sub_shift */ - $sub_shift = $c & 15; - - /** @var array $limbs */ - $limbs =& $return->limbs; - - /** @var array $myLimbs */ - $myLimbs =& $this->limbs; - - for ($i = 1; $i >= 0; --$i) { - /** @var int $j */ - $j = ($i - $idx_shift) & 1; - /** @var int $k */ - $k = ($i - $idx_shift - 1) & 1; - $limbs[$i] = (int) ( - ( - ((int) ($myLimbs[$j]) >> (int) ($sub_shift)) - | - ((int) ($myLimbs[$k]) << (16 - (int) ($sub_shift))) - ) & 0xffff - ); - } - } - return $return; - } - - /** - * @param bool $bool - * @return self - */ - public function setUnsignedInt($bool = false) - { - $this->unsignedInt = !empty($bool); - return $this; - } - - /** - * @param int $c - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - */ - public function shiftLeft($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - $c &= 63; - /** @var int $c */ - if ($c === 0) { - $return->limbs = $this->limbs; - } elseif ($c < 0) { - /** @var int $c */ - return $this->shiftRight(-$c); - } else { - /** @var int $c */ - /** @var int $tmp */ - $tmp = $this->limbs[1] << $c; - $return->limbs[1] = (int)($tmp & 0xffff); - /** @var int $carry */ - $carry = $tmp >> 16; - - /** @var int $tmp */ - $tmp = ($this->limbs[0] << $c) | ($carry & 0xffff); - $return->limbs[0] = (int) ($tmp & 0xffff); - } - return $return; - } - - /** - * @param int $c - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedOperand - */ - public function shiftRight($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - $c &= 63; - /** @var int $c */ - if ($c >= 16) { - $return->limbs = array( - (int) ($this->overflow & 0xffff), - (int) ($this->limbs[0]) - ); - $return->overflow = $this->overflow >> 16; - return $return->shiftRight($c & 15); - } - if ($c === 0) { - $return->limbs = $this->limbs; - } elseif ($c < 0) { - /** @var int $c */ - return $this->shiftLeft(-$c); - } else { - if (!is_int($c)) { - throw new TypeError(); - } - /** @var int $c */ - // $return->limbs[0] = (int) (($this->limbs[0] >> $c) & 0xffff); - $carryLeft = (int) ($this->overflow & ((1 << ($c + 1)) - 1)); - $return->limbs[0] = (int) ((($this->limbs[0] >> $c) | ($carryLeft << (16 - $c))) & 0xffff); - $carryRight = (int) ($this->limbs[0] & ((1 << ($c + 1)) - 1)); - $return->limbs[1] = (int) ((($this->limbs[1] >> $c) | ($carryRight << (16 - $c))) & 0xffff); - $return->overflow >>= $c; - } - return $return; - } - - /** - * Subtract a normal integer from an int32 object. - * - * @param int $int - * @return ParagonIE_Sodium_Core32_Int32 - * @throws SodiumException - * @throws TypeError - */ - public function subInt($int) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($int, 'int', 1); - /** @var int $int */ - $int = (int) $int; - - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - - /** @var int $tmp */ - $tmp = $this->limbs[1] - ($int & 0xffff); - /** @var int $carry */ - $carry = $tmp >> 16; - $return->limbs[1] = (int) ($tmp & 0xffff); - - /** @var int $tmp */ - $tmp = $this->limbs[0] - (($int >> 16) & 0xffff) + $carry; - $return->limbs[0] = (int) ($tmp & 0xffff); - return $return; - } - - /** - * Subtract two int32 objects from each other - * - * @param ParagonIE_Sodium_Core32_Int32 $b - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function subInt32(ParagonIE_Sodium_Core32_Int32 $b) - { - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - - /** @var int $tmp */ - $tmp = $this->limbs[1] - ($b->limbs[1] & 0xffff); - /** @var int $carry */ - $carry = $tmp >> 16; - $return->limbs[1] = (int) ($tmp & 0xffff); - - /** @var int $tmp */ - $tmp = $this->limbs[0] - ($b->limbs[0] & 0xffff) + $carry; - $return->limbs[0] = (int) ($tmp & 0xffff); - return $return; - } - - /** - * XOR this 32-bit integer with another. - * - * @param ParagonIE_Sodium_Core32_Int32 $b - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function xorInt32(ParagonIE_Sodium_Core32_Int32 $b) - { - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->unsignedInt = $this->unsignedInt; - $return->limbs = array( - (int) ($this->limbs[0] ^ $b->limbs[0]), - (int) ($this->limbs[1] ^ $b->limbs[1]) - ); - return $return; - } - - /** - * @param int $signed - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromInt($signed) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($signed, 'int', 1);; - /** @var int $signed */ - $signed = (int) $signed; - - return new ParagonIE_Sodium_Core32_Int32( - array( - (int) (($signed >> 16) & 0xffff), - (int) ($signed & 0xffff) - ) - ); - } - - /** - * @param string $string - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromString($string) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($string, 'string', 1); - $string = (string) $string; - if (ParagonIE_Sodium_Core32_Util::strlen($string) !== 4) { - throw new RangeException( - 'String must be 4 bytes; ' . ParagonIE_Sodium_Core32_Util::strlen($string) . ' given.' - ); - } - $return = new ParagonIE_Sodium_Core32_Int32(); - - $return->limbs[0] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[0]) & 0xff) << 8); - $return->limbs[0] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[1]) & 0xff); - $return->limbs[1] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[2]) & 0xff) << 8); - $return->limbs[1] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[3]) & 0xff); - return $return; - } - - /** - * @param string $string - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromReverseString($string) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($string, 'string', 1); - $string = (string) $string; - if (ParagonIE_Sodium_Core32_Util::strlen($string) !== 4) { - throw new RangeException( - 'String must be 4 bytes; ' . ParagonIE_Sodium_Core32_Util::strlen($string) . ' given.' - ); - } - $return = new ParagonIE_Sodium_Core32_Int32(); - - $return->limbs[0] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[3]) & 0xff) << 8); - $return->limbs[0] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[2]) & 0xff); - $return->limbs[1] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[1]) & 0xff) << 8); - $return->limbs[1] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[0]) & 0xff); - return $return; - } - - /** - * @return array - */ - public function toArray() - { - return array((int) ($this->limbs[0] << 16 | $this->limbs[1])); - } - - /** - * @return string - * @throws TypeError - */ - public function toString() - { - return - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[0] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[0] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[1] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[1] & 0xff); - } - - /** - * @return int - */ - public function toInt() - { - return (int) ( - (($this->limbs[0] & 0xffff) << 16) - | - ($this->limbs[1] & 0xffff) - ); - } - - /** - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function toInt32() - { - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->limbs[0] = (int) ($this->limbs[0] & 0xffff); - $return->limbs[1] = (int) ($this->limbs[1] & 0xffff); - $return->unsignedInt = $this->unsignedInt; - $return->overflow = (int) ($this->overflow & 0x7fffffff); - return $return; - } - - /** - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function toInt64() - { - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - if ($this->unsignedInt) { - $return->limbs[0] += (($this->overflow >> 16) & 0xffff); - $return->limbs[1] += (($this->overflow) & 0xffff); - } else { - $neg = -(($this->limbs[0] >> 15) & 1); - $return->limbs[0] = (int)($neg & 0xffff); - $return->limbs[1] = (int)($neg & 0xffff); - } - $return->limbs[2] = (int) ($this->limbs[0] & 0xffff); - $return->limbs[3] = (int) ($this->limbs[1] & 0xffff); - return $return; - } - - /** - * @return string - * @throws TypeError - */ - public function toReverseString() - { - return ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[1] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[1] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[0] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[0] >> 8) & 0xff); - } - - /** - * @return string - */ - public function __toString() - { - try { - return $this->toString(); - } catch (TypeError $ex) { - // PHP engine can't handle exceptions from __toString() - return ''; - } - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Int64.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Int64.php deleted file mode 100644 index 807e8786..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Int64.php +++ /dev/null @@ -1,1067 +0,0 @@ - - four 16-bit integers - */ - public $limbs = array(0, 0, 0, 0); - - /** - * @var int - */ - public $overflow = 0; - - /** - * @var bool - */ - public $unsignedInt = false; - - /** - * ParagonIE_Sodium_Core32_Int64 constructor. - * @param array $array - * @param bool $unsignedInt - */ - public function __construct($array = array(0, 0, 0, 0), $unsignedInt = false) - { - $this->limbs = array( - (int) $array[0], - (int) $array[1], - (int) $array[2], - (int) $array[3] - ); - $this->overflow = 0; - $this->unsignedInt = $unsignedInt; - } - - /** - * Adds two int64 objects - * - * @param ParagonIE_Sodium_Core32_Int64 $addend - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function addInt64(ParagonIE_Sodium_Core32_Int64 $addend) - { - $i0 = $this->limbs[0]; - $i1 = $this->limbs[1]; - $i2 = $this->limbs[2]; - $i3 = $this->limbs[3]; - $j0 = $addend->limbs[0]; - $j1 = $addend->limbs[1]; - $j2 = $addend->limbs[2]; - $j3 = $addend->limbs[3]; - - $r3 = $i3 + ($j3 & 0xffff); - $carry = $r3 >> 16; - - $r2 = $i2 + ($j2 & 0xffff) + $carry; - $carry = $r2 >> 16; - - $r1 = $i1 + ($j1 & 0xffff) + $carry; - $carry = $r1 >> 16; - - $r0 = $i0 + ($j0 & 0xffff) + $carry; - $carry = $r0 >> 16; - - $r0 &= 0xffff; - $r1 &= 0xffff; - $r2 &= 0xffff; - $r3 &= 0xffff; - - $return = new ParagonIE_Sodium_Core32_Int64( - array($r0, $r1, $r2, $r3) - ); - $return->overflow = $carry; - $return->unsignedInt = $this->unsignedInt; - return $return; - } - - /** - * Adds a normal integer to an int64 object - * - * @param int $int - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public function addInt($int) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($int, 'int', 1); - /** @var int $int */ - $int = (int) $int; - - $i0 = $this->limbs[0]; - $i1 = $this->limbs[1]; - $i2 = $this->limbs[2]; - $i3 = $this->limbs[3]; - - $r3 = $i3 + ($int & 0xffff); - $carry = $r3 >> 16; - - $r2 = $i2 + (($int >> 16) & 0xffff) + $carry; - $carry = $r2 >> 16; - - $r1 = $i1 + $carry; - $carry = $r1 >> 16; - - $r0 = $i0 + $carry; - $carry = $r0 >> 16; - - $r0 &= 0xffff; - $r1 &= 0xffff; - $r2 &= 0xffff; - $r3 &= 0xffff; - $return = new ParagonIE_Sodium_Core32_Int64( - array($r0, $r1, $r2, $r3) - ); - $return->overflow = $carry; - $return->unsignedInt = $this->unsignedInt; - return $return; - } - - /** - * @param int $b - * @return int - */ - public function compareInt($b = 0) - { - $gt = 0; - $eq = 1; - - $i = 4; - $j = 0; - while ($i > 0) { - --$i; - /** @var int $x1 */ - $x1 = $this->limbs[$i]; - /** @var int $x2 */ - $x2 = ($b >> ($j << 4)) & 0xffff; - /** int */ - $gt |= (($x2 - $x1) >> 8) & $eq; - /** int */ - $eq &= (($x2 ^ $x1) - 1) >> 8; - } - return ($gt + $gt - $eq) + 1; - } - - /** - * @param int $b - * @return bool - */ - public function isGreaterThan($b = 0) - { - return $this->compareInt($b) > 0; - } - - /** - * @param int $b - * @return bool - */ - public function isLessThanInt($b = 0) - { - return $this->compareInt($b) < 0; - } - - /** - * @param int $hi - * @param int $lo - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function mask64($hi = 0, $lo = 0) - { - /** @var int $a */ - $a = ($hi >> 16) & 0xffff; - /** @var int $b */ - $b = ($hi) & 0xffff; - /** @var int $c */ - $c = ($lo >> 16) & 0xffff; - /** @var int $d */ - $d = ($lo & 0xffff); - return new ParagonIE_Sodium_Core32_Int64( - array( - $this->limbs[0] & $a, - $this->limbs[1] & $b, - $this->limbs[2] & $c, - $this->limbs[3] & $d - ), - $this->unsignedInt - ); - } - - /** - * @param int $int - * @param int $size - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - */ - public function mulInt($int = 0, $size = 0) - { - if (ParagonIE_Sodium_Compat::$fastMult) { - return $this->mulIntFast($int); - } - ParagonIE_Sodium_Core32_Util::declareScalarType($int, 'int', 1); - ParagonIE_Sodium_Core32_Util::declareScalarType($size, 'int', 2); - /** @var int $int */ - $int = (int) $int; - /** @var int $size */ - $size = (int) $size; - - if (!$size) { - $size = 63; - } - - $a = clone $this; - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - - // Initialize: - $ret0 = 0; - $ret1 = 0; - $ret2 = 0; - $ret3 = 0; - $a0 = $a->limbs[0]; - $a1 = $a->limbs[1]; - $a2 = $a->limbs[2]; - $a3 = $a->limbs[3]; - - /** @var int $size */ - /** @var int $i */ - for ($i = $size; $i >= 0; --$i) { - $mask = -($int & 1); - $x0 = $a0 & $mask; - $x1 = $a1 & $mask; - $x2 = $a2 & $mask; - $x3 = $a3 & $mask; - - $ret3 += $x3; - $c = $ret3 >> 16; - - $ret2 += $x2 + $c; - $c = $ret2 >> 16; - - $ret1 += $x1 + $c; - $c = $ret1 >> 16; - - $ret0 += $x0 + $c; - - $ret0 &= 0xffff; - $ret1 &= 0xffff; - $ret2 &= 0xffff; - $ret3 &= 0xffff; - - $a3 = $a3 << 1; - $x3 = $a3 >> 16; - $a2 = ($a2 << 1) | $x3; - $x2 = $a2 >> 16; - $a1 = ($a1 << 1) | $x2; - $x1 = $a1 >> 16; - $a0 = ($a0 << 1) | $x1; - $a0 &= 0xffff; - $a1 &= 0xffff; - $a2 &= 0xffff; - $a3 &= 0xffff; - - $int >>= 1; - } - $return->limbs[0] = $ret0; - $return->limbs[1] = $ret1; - $return->limbs[2] = $ret2; - $return->limbs[3] = $ret3; - return $return; - } - - /** - * @param ParagonIE_Sodium_Core32_Int64 $A - * @param ParagonIE_Sodium_Core32_Int64 $B - * @return array - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedInferredReturnType - */ - public static function ctSelect( - ParagonIE_Sodium_Core32_Int64 $A, - ParagonIE_Sodium_Core32_Int64 $B - ) { - $a = clone $A; - $b = clone $B; - /** @var int $aNeg */ - $aNeg = ($a->limbs[0] >> 15) & 1; - /** @var int $bNeg */ - $bNeg = ($b->limbs[0] >> 15) & 1; - /** @var int $m */ - $m = (-($aNeg & $bNeg)) | 1; - /** @var int $swap */ - $swap = $bNeg & ~$aNeg; - /** @var int $d */ - $d = -$swap; - - /* - if ($bNeg && !$aNeg) { - $a = clone $int; - $b = clone $this; - } elseif($bNeg && $aNeg) { - $a = $this->mulInt(-1); - $b = $int->mulInt(-1); - } - */ - $x = $a->xorInt64($b)->mask64($d, $d); - return array( - $a->xorInt64($x)->mulInt($m), - $b->xorInt64($x)->mulInt($m) - ); - } - - /** - * @param array $a - * @param array $b - * @param int $baseLog2 - * @return array - */ - public function multiplyLong(array $a, array $b, $baseLog2 = 16) - { - $a_l = count($a); - $b_l = count($b); - /** @var array $r */ - $r = array_fill(0, $a_l + $b_l + 1, 0); - $base = 1 << $baseLog2; - for ($i = 0; $i < $a_l; ++$i) { - $a_i = $a[$i]; - for ($j = 0; $j < $a_l; ++$j) { - $b_j = $b[$j]; - $product = (($a_i * $b_j) + $r[$i + $j]); - $carry = (((int) $product >> $baseLog2) & 0xffff); - $r[$i + $j] = ((int) $product - (int) ($carry * $base)) & 0xffff; - $r[$i + $j + 1] += $carry; - } - } - return array_slice($r, 0, 5); - } - - /** - * @param int $int - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function mulIntFast($int) - { - // Handle negative numbers - $aNeg = ($this->limbs[0] >> 15) & 1; - $bNeg = ($int >> 31) & 1; - $a = array_reverse($this->limbs); - $b = array( - $int & 0xffff, - ($int >> 16) & 0xffff, - -$bNeg & 0xffff, - -$bNeg & 0xffff - ); - if ($aNeg) { - for ($i = 0; $i < 4; ++$i) { - $a[$i] = ($a[$i] ^ 0xffff) & 0xffff; - } - ++$a[0]; - } - if ($bNeg) { - for ($i = 0; $i < 4; ++$i) { - $b[$i] = ($b[$i] ^ 0xffff) & 0xffff; - } - ++$b[0]; - } - // Multiply - $res = $this->multiplyLong($a, $b); - - // Re-apply negation to results - if ($aNeg !== $bNeg) { - for ($i = 0; $i < 4; ++$i) { - $res[$i] = (0xffff ^ $res[$i]) & 0xffff; - } - // Handle integer overflow - $c = 1; - for ($i = 0; $i < 4; ++$i) { - $res[$i] += $c; - $c = $res[$i] >> 16; - $res[$i] &= 0xffff; - } - } - - // Return our values - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->limbs = array( - $res[3] & 0xffff, - $res[2] & 0xffff, - $res[1] & 0xffff, - $res[0] & 0xffff - ); - if (count($res) > 4) { - $return->overflow = $res[4] & 0xffff; - } - $return->unsignedInt = $this->unsignedInt; - return $return; - } - - /** - * @param ParagonIE_Sodium_Core32_Int64 $right - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function mulInt64Fast(ParagonIE_Sodium_Core32_Int64 $right) - { - $aNeg = ($this->limbs[0] >> 15) & 1; - $bNeg = ($right->limbs[0] >> 15) & 1; - - $a = array_reverse($this->limbs); - $b = array_reverse($right->limbs); - if ($aNeg) { - for ($i = 0; $i < 4; ++$i) { - $a[$i] = ($a[$i] ^ 0xffff) & 0xffff; - } - ++$a[0]; - } - if ($bNeg) { - for ($i = 0; $i < 4; ++$i) { - $b[$i] = ($b[$i] ^ 0xffff) & 0xffff; - } - ++$b[0]; - } - $res = $this->multiplyLong($a, $b); - if ($aNeg !== $bNeg) { - if ($aNeg !== $bNeg) { - for ($i = 0; $i < 4; ++$i) { - $res[$i] = ($res[$i] ^ 0xffff) & 0xffff; - } - $c = 1; - for ($i = 0; $i < 4; ++$i) { - $res[$i] += $c; - $c = $res[$i] >> 16; - $res[$i] &= 0xffff; - } - } - } - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->limbs = array( - $res[3] & 0xffff, - $res[2] & 0xffff, - $res[1] & 0xffff, - $res[0] & 0xffff - ); - if (count($res) > 4) { - $return->overflow = $res[4]; - } - return $return; - } - - /** - * @param ParagonIE_Sodium_Core32_Int64 $int - * @param int $size - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - */ - public function mulInt64(ParagonIE_Sodium_Core32_Int64 $int, $size = 0) - { - if (ParagonIE_Sodium_Compat::$fastMult) { - return $this->mulInt64Fast($int); - } - ParagonIE_Sodium_Core32_Util::declareScalarType($size, 'int', 2); - if (!$size) { - $size = 63; - } - list($a, $b) = self::ctSelect($this, $int); - - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - - // Initialize: - $ret0 = 0; - $ret1 = 0; - $ret2 = 0; - $ret3 = 0; - $a0 = $a->limbs[0]; - $a1 = $a->limbs[1]; - $a2 = $a->limbs[2]; - $a3 = $a->limbs[3]; - $b0 = $b->limbs[0]; - $b1 = $b->limbs[1]; - $b2 = $b->limbs[2]; - $b3 = $b->limbs[3]; - - /** @var int $size */ - /** @var int $i */ - for ($i = (int) $size; $i >= 0; --$i) { - $mask = -($b3 & 1); - $x0 = $a0 & $mask; - $x1 = $a1 & $mask; - $x2 = $a2 & $mask; - $x3 = $a3 & $mask; - - $ret3 += $x3; - $c = $ret3 >> 16; - - $ret2 += $x2 + $c; - $c = $ret2 >> 16; - - $ret1 += $x1 + $c; - $c = $ret1 >> 16; - - $ret0 += $x0 + $c; - - $ret0 &= 0xffff; - $ret1 &= 0xffff; - $ret2 &= 0xffff; - $ret3 &= 0xffff; - - $a3 = $a3 << 1; - $x3 = $a3 >> 16; - $a2 = ($a2 << 1) | $x3; - $x2 = $a2 >> 16; - $a1 = ($a1 << 1) | $x2; - $x1 = $a1 >> 16; - $a0 = ($a0 << 1) | $x1; - $a0 &= 0xffff; - $a1 &= 0xffff; - $a2 &= 0xffff; - $a3 &= 0xffff; - - $x0 = ($b0 & 1) << 16; - $x1 = ($b1 & 1) << 16; - $x2 = ($b2 & 1) << 16; - - $b0 = ($b0 >> 1); - $b1 = (($b1 | $x0) >> 1); - $b2 = (($b2 | $x1) >> 1); - $b3 = (($b3 | $x2) >> 1); - - $b0 &= 0xffff; - $b1 &= 0xffff; - $b2 &= 0xffff; - $b3 &= 0xffff; - - } - $return->limbs[0] = $ret0; - $return->limbs[1] = $ret1; - $return->limbs[2] = $ret2; - $return->limbs[3] = $ret3; - - return $return; - } - - /** - * OR this 64-bit integer with another. - * - * @param ParagonIE_Sodium_Core32_Int64 $b - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function orInt64(ParagonIE_Sodium_Core32_Int64 $b) - { - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - $return->limbs = array( - (int) ($this->limbs[0] | $b->limbs[0]), - (int) ($this->limbs[1] | $b->limbs[1]), - (int) ($this->limbs[2] | $b->limbs[2]), - (int) ($this->limbs[3] | $b->limbs[3]) - ); - return $return; - } - - /** - * @param int $c - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - */ - public function rotateLeft($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - $c &= 63; - if ($c === 0) { - // NOP, but we want a copy. - $return->limbs = $this->limbs; - } else { - /** @var array $limbs */ - $limbs =& $return->limbs; - - /** @var array $myLimbs */ - $myLimbs =& $this->limbs; - - /** @var int $idx_shift */ - $idx_shift = ($c >> 4) & 3; - /** @var int $sub_shift */ - $sub_shift = $c & 15; - - for ($i = 3; $i >= 0; --$i) { - /** @var int $j */ - $j = ($i + $idx_shift) & 3; - /** @var int $k */ - $k = ($i + $idx_shift + 1) & 3; - $limbs[$i] = (int) ( - ( - ((int) ($myLimbs[$j]) << $sub_shift) - | - ((int) ($myLimbs[$k]) >> (16 - $sub_shift)) - ) & 0xffff - ); - } - } - return $return; - } - - /** - * Rotate to the right - * - * @param int $c - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedArrayAccess - */ - public function rotateRight($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - /** @var ParagonIE_Sodium_Core32_Int64 $return */ - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - $c &= 63; - /** @var int $c */ - if ($c === 0) { - // NOP, but we want a copy. - $return->limbs = $this->limbs; - } else { - /** @var array $limbs */ - $limbs =& $return->limbs; - - /** @var array $myLimbs */ - $myLimbs =& $this->limbs; - - /** @var int $idx_shift */ - $idx_shift = ($c >> 4) & 3; - /** @var int $sub_shift */ - $sub_shift = $c & 15; - - for ($i = 3; $i >= 0; --$i) { - /** @var int $j */ - $j = ($i - $idx_shift) & 3; - /** @var int $k */ - $k = ($i - $idx_shift - 1) & 3; - $limbs[$i] = (int) ( - ( - ((int) ($myLimbs[$j]) >> (int) ($sub_shift)) - | - ((int) ($myLimbs[$k]) << (16 - (int) ($sub_shift))) - ) & 0xffff - ); - } - } - return $return; - } - /** - * @param int $c - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public function shiftLeft($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - /** @var int $c */ - $c = (int) $c; - - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - $c &= 63; - - if ($c >= 16) { - if ($c >= 48) { - $return->limbs = array( - $this->limbs[3], 0, 0, 0 - ); - } elseif ($c >= 32) { - $return->limbs = array( - $this->limbs[2], $this->limbs[3], 0, 0 - ); - } else { - $return->limbs = array( - $this->limbs[1], $this->limbs[2], $this->limbs[3], 0 - ); - } - return $return->shiftLeft($c & 15); - } - if ($c === 0) { - $return->limbs = $this->limbs; - } elseif ($c < 0) { - /** @var int $c */ - return $this->shiftRight(-$c); - } else { - if (!is_int($c)) { - throw new TypeError(); - } - /** @var int $carry */ - $carry = 0; - for ($i = 3; $i >= 0; --$i) { - /** @var int $tmp */ - $tmp = ($this->limbs[$i] << $c) | ($carry & 0xffff); - $return->limbs[$i] = (int) ($tmp & 0xffff); - /** @var int $carry */ - $carry = $tmp >> 16; - } - } - return $return; - } - - /** - * @param int $c - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public function shiftRight($c = 0) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1); - $c = (int) $c; - /** @var int $c */ - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - $c &= 63; - - $negative = -(($this->limbs[0] >> 15) & 1); - if ($c >= 16) { - if ($c >= 48) { - $return->limbs = array( - (int) ($negative & 0xffff), - (int) ($negative & 0xffff), - (int) ($negative & 0xffff), - (int) $this->limbs[0] - ); - } elseif ($c >= 32) { - $return->limbs = array( - (int) ($negative & 0xffff), - (int) ($negative & 0xffff), - (int) $this->limbs[0], - (int) $this->limbs[1] - ); - } else { - $return->limbs = array( - (int) ($negative & 0xffff), - (int) $this->limbs[0], - (int) $this->limbs[1], - (int) $this->limbs[2] - ); - } - return $return->shiftRight($c & 15); - } - - if ($c === 0) { - $return->limbs = $this->limbs; - } elseif ($c < 0) { - return $this->shiftLeft(-$c); - } else { - if (!is_int($c)) { - throw new TypeError(); - } - /** @var int $carryRight */ - $carryRight = ($negative & 0xffff); - $mask = (int) (((1 << ($c + 1)) - 1) & 0xffff); - for ($i = 0; $i < 4; ++$i) { - $return->limbs[$i] = (int) ( - (($this->limbs[$i] >> $c) | ($carryRight << (16 - $c))) & 0xffff - ); - $carryRight = (int) ($this->limbs[$i] & $mask); - } - } - return $return; - } - - - /** - * Subtract a normal integer from an int64 object. - * - * @param int $int - * @return ParagonIE_Sodium_Core32_Int64 - * @throws SodiumException - * @throws TypeError - */ - public function subInt($int) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($int, 'int', 1); - $int = (int) $int; - - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - - /** @var int $carry */ - $carry = 0; - for ($i = 3; $i >= 0; --$i) { - /** @var int $tmp */ - $tmp = $this->limbs[$i] - (($int >> 16) & 0xffff) + $carry; - /** @var int $carry */ - $carry = $tmp >> 16; - $return->limbs[$i] = (int) ($tmp & 0xffff); - } - return $return; - } - - /** - * The difference between two Int64 objects. - * - * @param ParagonIE_Sodium_Core32_Int64 $b - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function subInt64(ParagonIE_Sodium_Core32_Int64 $b) - { - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - /** @var int $carry */ - $carry = 0; - for ($i = 3; $i >= 0; --$i) { - /** @var int $tmp */ - $tmp = $this->limbs[$i] - $b->limbs[$i] + $carry; - /** @var int $carry */ - $carry = ($tmp >> 16); - $return->limbs[$i] = (int) ($tmp & 0xffff); - } - return $return; - } - - /** - * XOR this 64-bit integer with another. - * - * @param ParagonIE_Sodium_Core32_Int64 $b - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function xorInt64(ParagonIE_Sodium_Core32_Int64 $b) - { - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->unsignedInt = $this->unsignedInt; - $return->limbs = array( - (int) ($this->limbs[0] ^ $b->limbs[0]), - (int) ($this->limbs[1] ^ $b->limbs[1]), - (int) ($this->limbs[2] ^ $b->limbs[2]), - (int) ($this->limbs[3] ^ $b->limbs[3]) - ); - return $return; - } - - /** - * @param int $low - * @param int $high - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromInts($low, $high) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($low, 'int', 1); - ParagonIE_Sodium_Core32_Util::declareScalarType($high, 'int', 2); - - $high = (int) $high; - $low = (int) $low; - return new ParagonIE_Sodium_Core32_Int64( - array( - (int) (($high >> 16) & 0xffff), - (int) ($high & 0xffff), - (int) (($low >> 16) & 0xffff), - (int) ($low & 0xffff) - ) - ); - } - - /** - * @param int $low - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromInt($low) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($low, 'int', 1); - $low = (int) $low; - - return new ParagonIE_Sodium_Core32_Int64( - array( - 0, - 0, - (int) (($low >> 16) & 0xffff), - (int) ($low & 0xffff) - ) - ); - } - - /** - * @return int - */ - public function toInt() - { - return (int) ( - (($this->limbs[2] & 0xffff) << 16) - | - ($this->limbs[3] & 0xffff) - ); - } - - /** - * @param string $string - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromString($string) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($string, 'string', 1); - $string = (string) $string; - if (ParagonIE_Sodium_Core32_Util::strlen($string) !== 8) { - throw new RangeException( - 'String must be 8 bytes; ' . ParagonIE_Sodium_Core32_Util::strlen($string) . ' given.' - ); - } - $return = new ParagonIE_Sodium_Core32_Int64(); - - $return->limbs[0] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[0]) & 0xff) << 8); - $return->limbs[0] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[1]) & 0xff); - $return->limbs[1] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[2]) & 0xff) << 8); - $return->limbs[1] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[3]) & 0xff); - $return->limbs[2] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[4]) & 0xff) << 8); - $return->limbs[2] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[5]) & 0xff); - $return->limbs[3] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[6]) & 0xff) << 8); - $return->limbs[3] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[7]) & 0xff); - return $return; - } - - /** - * @param string $string - * @return self - * @throws SodiumException - * @throws TypeError - */ - public static function fromReverseString($string) - { - ParagonIE_Sodium_Core32_Util::declareScalarType($string, 'string', 1); - $string = (string) $string; - if (ParagonIE_Sodium_Core32_Util::strlen($string) !== 8) { - throw new RangeException( - 'String must be 8 bytes; ' . ParagonIE_Sodium_Core32_Util::strlen($string) . ' given.' - ); - } - $return = new ParagonIE_Sodium_Core32_Int64(); - - $return->limbs[0] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[7]) & 0xff) << 8); - $return->limbs[0] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[6]) & 0xff); - $return->limbs[1] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[5]) & 0xff) << 8); - $return->limbs[1] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[4]) & 0xff); - $return->limbs[2] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[3]) & 0xff) << 8); - $return->limbs[2] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[2]) & 0xff); - $return->limbs[3] = (int) ((ParagonIE_Sodium_Core32_Util::chrToInt($string[1]) & 0xff) << 8); - $return->limbs[3] |= (ParagonIE_Sodium_Core32_Util::chrToInt($string[0]) & 0xff); - return $return; - } - - /** - * @return array - */ - public function toArray() - { - return array( - (int) ((($this->limbs[0] & 0xffff) << 16) | ($this->limbs[1] & 0xffff)), - (int) ((($this->limbs[2] & 0xffff) << 16) | ($this->limbs[3] & 0xffff)) - ); - } - - /** - * @return ParagonIE_Sodium_Core32_Int32 - */ - public function toInt32() - { - $return = new ParagonIE_Sodium_Core32_Int32(); - $return->limbs[0] = (int) ($this->limbs[2]); - $return->limbs[1] = (int) ($this->limbs[3]); - $return->unsignedInt = $this->unsignedInt; - $return->overflow = (int) (ParagonIE_Sodium_Core32_Util::abs($this->limbs[1], 16) & 0xffff); - return $return; - } - - /** - * @return ParagonIE_Sodium_Core32_Int64 - */ - public function toInt64() - { - $return = new ParagonIE_Sodium_Core32_Int64(); - $return->limbs[0] = (int) ($this->limbs[0]); - $return->limbs[1] = (int) ($this->limbs[1]); - $return->limbs[2] = (int) ($this->limbs[2]); - $return->limbs[3] = (int) ($this->limbs[3]); - $return->unsignedInt = $this->unsignedInt; - $return->overflow = ParagonIE_Sodium_Core32_Util::abs($this->overflow); - return $return; - } - - /** - * @param bool $bool - * @return self - */ - public function setUnsignedInt($bool = false) - { - $this->unsignedInt = !empty($bool); - return $this; - } - - /** - * @return string - * @throws TypeError - */ - public function toString() - { - return ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[0] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[0] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[1] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[1] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[2] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[2] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[3] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[3] & 0xff); - } - - /** - * @return string - * @throws TypeError - */ - public function toReverseString() - { - return ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[3] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[3] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[2] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[2] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[1] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[1] >> 8) & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr($this->limbs[0] & 0xff) . - ParagonIE_Sodium_Core32_Util::intToChr(($this->limbs[0] >> 8) & 0xff); - } - - /** - * @return string - */ - public function __toString() - { - try { - return $this->toString(); - } catch (TypeError $ex) { - // PHP engine can't handle exceptions from __toString() - return ''; - } - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Poly1305.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Poly1305.php deleted file mode 100644 index f16991bd..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Poly1305.php +++ /dev/null @@ -1,64 +0,0 @@ -update($m) - ->finish(); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $mac - * @param string $m - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function onetimeauth_verify($mac, $m, $key) - { - if (self::strlen($key) < 32) { - throw new InvalidArgumentException( - 'Key must be 32 bytes long.' - ); - } - $state = new ParagonIE_Sodium_Core32_Poly1305_State( - self::substr($key, 0, 32) - ); - $calc = $state - ->update($m) - ->finish(); - return self::verify_16($calc, $mac); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php deleted file mode 100644 index ff6dbac5..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php +++ /dev/null @@ -1,452 +0,0 @@ - - */ - protected $buffer = array(); - - /** - * @var bool - */ - protected $final = false; - - /** - * @var array - */ - public $h; - - /** - * @var int - */ - protected $leftover = 0; - - /** - * @var array - */ - public $r; - - /** - * @var array - */ - public $pad; - - /** - * ParagonIE_Sodium_Core32_Poly1305_State constructor. - * - * @internal You should not use this directly from another application - * - * @param string $key - * @throws InvalidArgumentException - * @throws SodiumException - * @throws TypeError - */ - public function __construct($key = '') - { - if (self::strlen($key) < 32) { - throw new InvalidArgumentException( - 'Poly1305 requires a 32-byte key' - ); - } - /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ - $this->r = array( - // st->r[0] = ... - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 0, 4)) - ->setUnsignedInt(true) - ->mask(0x3ffffff), - // st->r[1] = ... - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 3, 4)) - ->setUnsignedInt(true) - ->shiftRight(2) - ->mask(0x3ffff03), - // st->r[2] = ... - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 6, 4)) - ->setUnsignedInt(true) - ->shiftRight(4) - ->mask(0x3ffc0ff), - // st->r[3] = ... - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 9, 4)) - ->setUnsignedInt(true) - ->shiftRight(6) - ->mask(0x3f03fff), - // st->r[4] = ... - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 12, 4)) - ->setUnsignedInt(true) - ->shiftRight(8) - ->mask(0x00fffff) - ); - - /* h = 0 */ - $this->h = array( - new ParagonIE_Sodium_Core32_Int32(array(0, 0), true), - new ParagonIE_Sodium_Core32_Int32(array(0, 0), true), - new ParagonIE_Sodium_Core32_Int32(array(0, 0), true), - new ParagonIE_Sodium_Core32_Int32(array(0, 0), true), - new ParagonIE_Sodium_Core32_Int32(array(0, 0), true) - ); - - /* save pad for later */ - $this->pad = array( - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 16, 4)) - ->setUnsignedInt(true)->toInt64(), - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 20, 4)) - ->setUnsignedInt(true)->toInt64(), - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 24, 4)) - ->setUnsignedInt(true)->toInt64(), - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($key, 28, 4)) - ->setUnsignedInt(true)->toInt64(), - ); - - $this->leftover = 0; - $this->final = false; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @return self - * @throws SodiumException - * @throws TypeError - */ - public function update($message = '') - { - $bytes = self::strlen($message); - - /* handle leftover */ - if ($this->leftover) { - /** @var int $want */ - $want = ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE - $this->leftover; - if ($want > $bytes) { - $want = $bytes; - } - for ($i = 0; $i < $want; ++$i) { - $mi = self::chrToInt($message[$i]); - $this->buffer[$this->leftover + $i] = $mi; - } - // We snip off the leftmost bytes. - $message = self::substr($message, $want); - $bytes = self::strlen($message); - $this->leftover += $want; - if ($this->leftover < ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE) { - // We still don't have enough to run $this->blocks() - return $this; - } - - $this->blocks( - self::intArrayToString($this->buffer), - ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE - ); - $this->leftover = 0; - } - - /* process full blocks */ - if ($bytes >= ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE) { - /** @var int $want */ - $want = $bytes & ~(ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE - 1); - if ($want >= ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE) { - /** @var string $block */ - $block = self::substr($message, 0, $want); - if (self::strlen($block) >= ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE) { - $this->blocks($block, $want); - $message = self::substr($message, $want); - $bytes = self::strlen($message); - } - } - } - - /* store leftover */ - if ($bytes) { - for ($i = 0; $i < $bytes; ++$i) { - $mi = self::chrToInt($message[$i]); - $this->buffer[$this->leftover + $i] = $mi; - } - $this->leftover = (int) $this->leftover + $bytes; - } - return $this; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param int $bytes - * @return self - * @throws SodiumException - * @throws TypeError - */ - public function blocks($message, $bytes) - { - if (self::strlen($message) < 16) { - $message = str_pad($message, 16, "\x00", STR_PAD_RIGHT); - } - $hibit = ParagonIE_Sodium_Core32_Int32::fromInt((int) ($this->final ? 0 : 1 << 24)); /* 1 << 128 */ - $hibit->setUnsignedInt(true); - $zero = new ParagonIE_Sodium_Core32_Int64(array(0, 0, 0, 0), true); - /** - * @var ParagonIE_Sodium_Core32_Int64 $d0 - * @var ParagonIE_Sodium_Core32_Int64 $d1 - * @var ParagonIE_Sodium_Core32_Int64 $d2 - * @var ParagonIE_Sodium_Core32_Int64 $d3 - * @var ParagonIE_Sodium_Core32_Int64 $d4 - * @var ParagonIE_Sodium_Core32_Int64 $r0 - * @var ParagonIE_Sodium_Core32_Int64 $r1 - * @var ParagonIE_Sodium_Core32_Int64 $r2 - * @var ParagonIE_Sodium_Core32_Int64 $r3 - * @var ParagonIE_Sodium_Core32_Int64 $r4 - * - * @var ParagonIE_Sodium_Core32_Int32 $h0 - * @var ParagonIE_Sodium_Core32_Int32 $h1 - * @var ParagonIE_Sodium_Core32_Int32 $h2 - * @var ParagonIE_Sodium_Core32_Int32 $h3 - * @var ParagonIE_Sodium_Core32_Int32 $h4 - */ - $r0 = $this->r[0]->toInt64(); - $r1 = $this->r[1]->toInt64(); - $r2 = $this->r[2]->toInt64(); - $r3 = $this->r[3]->toInt64(); - $r4 = $this->r[4]->toInt64(); - - $s1 = $r1->toInt64()->mulInt(5, 3); - $s2 = $r2->toInt64()->mulInt(5, 3); - $s3 = $r3->toInt64()->mulInt(5, 3); - $s4 = $r4->toInt64()->mulInt(5, 3); - - $h0 = $this->h[0]; - $h1 = $this->h[1]; - $h2 = $this->h[2]; - $h3 = $this->h[3]; - $h4 = $this->h[4]; - - while ($bytes >= ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE) { - /* h += m[i] */ - $h0 = $h0->addInt32( - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 0, 4)) - ->mask(0x3ffffff) - )->toInt64(); - $h1 = $h1->addInt32( - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 3, 4)) - ->shiftRight(2) - ->mask(0x3ffffff) - )->toInt64(); - $h2 = $h2->addInt32( - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 6, 4)) - ->shiftRight(4) - ->mask(0x3ffffff) - )->toInt64(); - $h3 = $h3->addInt32( - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 9, 4)) - ->shiftRight(6) - ->mask(0x3ffffff) - )->toInt64(); - $h4 = $h4->addInt32( - ParagonIE_Sodium_Core32_Int32::fromReverseString(self::substr($message, 12, 4)) - ->shiftRight(8) - ->orInt32($hibit) - )->toInt64(); - - /* h *= r */ - $d0 = $zero - ->addInt64($h0->mulInt64($r0, 27)) - ->addInt64($s4->mulInt64($h1, 27)) - ->addInt64($s3->mulInt64($h2, 27)) - ->addInt64($s2->mulInt64($h3, 27)) - ->addInt64($s1->mulInt64($h4, 27)); - - $d1 = $zero - ->addInt64($h0->mulInt64($r1, 27)) - ->addInt64($h1->mulInt64($r0, 27)) - ->addInt64($s4->mulInt64($h2, 27)) - ->addInt64($s3->mulInt64($h3, 27)) - ->addInt64($s2->mulInt64($h4, 27)); - - $d2 = $zero - ->addInt64($h0->mulInt64($r2, 27)) - ->addInt64($h1->mulInt64($r1, 27)) - ->addInt64($h2->mulInt64($r0, 27)) - ->addInt64($s4->mulInt64($h3, 27)) - ->addInt64($s3->mulInt64($h4, 27)); - - $d3 = $zero - ->addInt64($h0->mulInt64($r3, 27)) - ->addInt64($h1->mulInt64($r2, 27)) - ->addInt64($h2->mulInt64($r1, 27)) - ->addInt64($h3->mulInt64($r0, 27)) - ->addInt64($s4->mulInt64($h4, 27)); - - $d4 = $zero - ->addInt64($h0->mulInt64($r4, 27)) - ->addInt64($h1->mulInt64($r3, 27)) - ->addInt64($h2->mulInt64($r2, 27)) - ->addInt64($h3->mulInt64($r1, 27)) - ->addInt64($h4->mulInt64($r0, 27)); - - /* (partial) h %= p */ - $c = $d0->shiftRight(26); - $h0 = $d0->toInt32()->mask(0x3ffffff); - $d1 = $d1->addInt64($c); - - $c = $d1->shiftRight(26); - $h1 = $d1->toInt32()->mask(0x3ffffff); - $d2 = $d2->addInt64($c); - - $c = $d2->shiftRight(26); - $h2 = $d2->toInt32()->mask(0x3ffffff); - $d3 = $d3->addInt64($c); - - $c = $d3->shiftRight(26); - $h3 = $d3->toInt32()->mask(0x3ffffff); - $d4 = $d4->addInt64($c); - - $c = $d4->shiftRight(26); - $h4 = $d4->toInt32()->mask(0x3ffffff); - $h0 = $h0->addInt32($c->toInt32()->mulInt(5, 3)); - - $c = $h0->shiftRight(26); - $h0 = $h0->mask(0x3ffffff); - $h1 = $h1->addInt32($c); - - // Chop off the left 32 bytes. - $message = self::substr( - $message, - ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE - ); - $bytes -= ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE; - } - - /** @var array $h */ - $this->h = array($h0, $h1, $h2, $h3, $h4); - return $this; - } - - /** - * @internal You should not use this directly from another application - * - * @return string - * @throws SodiumException - * @throws TypeError - */ - public function finish() - { - /* process the remaining block */ - if ($this->leftover) { - $i = $this->leftover; - $this->buffer[$i++] = 1; - for (; $i < ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE; ++$i) { - $this->buffer[$i] = 0; - } - $this->final = true; - $this->blocks( - self::substr( - self::intArrayToString($this->buffer), - 0, - ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE - ), - $b = ParagonIE_Sodium_Core32_Poly1305::BLOCK_SIZE - ); - } - - /** - * @var ParagonIE_Sodium_Core32_Int32 $f - * @var ParagonIE_Sodium_Core32_Int32 $g0 - * @var ParagonIE_Sodium_Core32_Int32 $g1 - * @var ParagonIE_Sodium_Core32_Int32 $g2 - * @var ParagonIE_Sodium_Core32_Int32 $g3 - * @var ParagonIE_Sodium_Core32_Int32 $g4 - * @var ParagonIE_Sodium_Core32_Int32 $h0 - * @var ParagonIE_Sodium_Core32_Int32 $h1 - * @var ParagonIE_Sodium_Core32_Int32 $h2 - * @var ParagonIE_Sodium_Core32_Int32 $h3 - * @var ParagonIE_Sodium_Core32_Int32 $h4 - */ - $h0 = $this->h[0]; - $h1 = $this->h[1]; - $h2 = $this->h[2]; - $h3 = $this->h[3]; - $h4 = $this->h[4]; - - $c = $h1->shiftRight(26); # $c = $h1 >> 26; - $h1 = $h1->mask(0x3ffffff); # $h1 &= 0x3ffffff; - - $h2 = $h2->addInt32($c); # $h2 += $c; - $c = $h2->shiftRight(26); # $c = $h2 >> 26; - $h2 = $h2->mask(0x3ffffff); # $h2 &= 0x3ffffff; - - $h3 = $h3->addInt32($c); # $h3 += $c; - $c = $h3->shiftRight(26); # $c = $h3 >> 26; - $h3 = $h3->mask(0x3ffffff); # $h3 &= 0x3ffffff; - - $h4 = $h4->addInt32($c); # $h4 += $c; - $c = $h4->shiftRight(26); # $c = $h4 >> 26; - $h4 = $h4->mask(0x3ffffff); # $h4 &= 0x3ffffff; - - $h0 = $h0->addInt32($c->mulInt(5, 3)); # $h0 += self::mul($c, 5); - $c = $h0->shiftRight(26); # $c = $h0 >> 26; - $h0 = $h0->mask(0x3ffffff); # $h0 &= 0x3ffffff; - $h1 = $h1->addInt32($c); # $h1 += $c; - - /* compute h + -p */ - $g0 = $h0->addInt(5); - $c = $g0->shiftRight(26); - $g0 = $g0->mask(0x3ffffff); - $g1 = $h1->addInt32($c); - $c = $g1->shiftRight(26); - $g1 = $g1->mask(0x3ffffff); - $g2 = $h2->addInt32($c); - $c = $g2->shiftRight(26); - $g2 = $g2->mask(0x3ffffff); - $g3 = $h3->addInt32($c); - $c = $g3->shiftRight(26); - $g3 = $g3->mask(0x3ffffff); - $g4 = $h4->addInt32($c)->subInt(1 << 26); - - # $mask = ($g4 >> 31) - 1; - /* select h if h < p, or h + -p if h >= p */ - $mask = (int) (($g4->toInt() >> 31) + 1); - - $g0 = $g0->mask($mask); - $g1 = $g1->mask($mask); - $g2 = $g2->mask($mask); - $g3 = $g3->mask($mask); - $g4 = $g4->mask($mask); - - /** @var int $mask */ - $mask = ~$mask; - - $h0 = $h0->mask($mask)->orInt32($g0); - $h1 = $h1->mask($mask)->orInt32($g1); - $h2 = $h2->mask($mask)->orInt32($g2); - $h3 = $h3->mask($mask)->orInt32($g3); - $h4 = $h4->mask($mask)->orInt32($g4); - - /* h = h % (2^128) */ - $h0 = $h0->orInt32($h1->shiftLeft(26)); - $h1 = $h1->shiftRight(6)->orInt32($h2->shiftLeft(20)); - $h2 = $h2->shiftRight(12)->orInt32($h3->shiftLeft(14)); - $h3 = $h3->shiftRight(18)->orInt32($h4->shiftLeft(8)); - - /* mac = (h + pad) % (2^128) */ - $f = $h0->toInt64()->addInt64($this->pad[0]); - $h0 = $f->toInt32(); - $f = $h1->toInt64()->addInt64($this->pad[1])->addInt($h0->overflow); - $h1 = $f->toInt32(); - $f = $h2->toInt64()->addInt64($this->pad[2])->addInt($h1->overflow); - $h2 = $f->toInt32(); - $f = $h3->toInt64()->addInt64($this->pad[3])->addInt($h2->overflow); - $h3 = $f->toInt32(); - - return $h0->toReverseString() . - $h1->toReverseString() . - $h2->toReverseString() . - $h3->toReverseString(); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Salsa20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Salsa20.php deleted file mode 100644 index 62174ea6..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Salsa20.php +++ /dev/null @@ -1,307 +0,0 @@ - 0; $i -= 2) { - $x4 = $x4->xorInt32($x0->addInt32($x12)->rotateLeft(7)); - $x8 = $x8->xorInt32($x4->addInt32($x0)->rotateLeft(9)); - $x12 = $x12->xorInt32($x8->addInt32($x4)->rotateLeft(13)); - $x0 = $x0->xorInt32($x12->addInt32($x8)->rotateLeft(18)); - - $x9 = $x9->xorInt32($x5->addInt32($x1)->rotateLeft(7)); - $x13 = $x13->xorInt32($x9->addInt32($x5)->rotateLeft(9)); - $x1 = $x1->xorInt32($x13->addInt32($x9)->rotateLeft(13)); - $x5 = $x5->xorInt32($x1->addInt32($x13)->rotateLeft(18)); - - $x14 = $x14->xorInt32($x10->addInt32($x6)->rotateLeft(7)); - $x2 = $x2->xorInt32($x14->addInt32($x10)->rotateLeft(9)); - $x6 = $x6->xorInt32($x2->addInt32($x14)->rotateLeft(13)); - $x10 = $x10->xorInt32($x6->addInt32($x2)->rotateLeft(18)); - - $x3 = $x3->xorInt32($x15->addInt32($x11)->rotateLeft(7)); - $x7 = $x7->xorInt32($x3->addInt32($x15)->rotateLeft(9)); - $x11 = $x11->xorInt32($x7->addInt32($x3)->rotateLeft(13)); - $x15 = $x15->xorInt32($x11->addInt32($x7)->rotateLeft(18)); - - $x1 = $x1->xorInt32($x0->addInt32($x3)->rotateLeft(7)); - $x2 = $x2->xorInt32($x1->addInt32($x0)->rotateLeft(9)); - $x3 = $x3->xorInt32($x2->addInt32($x1)->rotateLeft(13)); - $x0 = $x0->xorInt32($x3->addInt32($x2)->rotateLeft(18)); - - $x6 = $x6->xorInt32($x5->addInt32($x4)->rotateLeft(7)); - $x7 = $x7->xorInt32($x6->addInt32($x5)->rotateLeft(9)); - $x4 = $x4->xorInt32($x7->addInt32($x6)->rotateLeft(13)); - $x5 = $x5->xorInt32($x4->addInt32($x7)->rotateLeft(18)); - - $x11 = $x11->xorInt32($x10->addInt32($x9)->rotateLeft(7)); - $x8 = $x8->xorInt32($x11->addInt32($x10)->rotateLeft(9)); - $x9 = $x9->xorInt32($x8->addInt32($x11)->rotateLeft(13)); - $x10 = $x10->xorInt32($x9->addInt32($x8)->rotateLeft(18)); - - $x12 = $x12->xorInt32($x15->addInt32($x14)->rotateLeft(7)); - $x13 = $x13->xorInt32($x12->addInt32($x15)->rotateLeft(9)); - $x14 = $x14->xorInt32($x13->addInt32($x12)->rotateLeft(13)); - $x15 = $x15->xorInt32($x14->addInt32($x13)->rotateLeft(18)); - } - - $x0 = $x0->addInt32($j0); - $x1 = $x1->addInt32($j1); - $x2 = $x2->addInt32($j2); - $x3 = $x3->addInt32($j3); - $x4 = $x4->addInt32($j4); - $x5 = $x5->addInt32($j5); - $x6 = $x6->addInt32($j6); - $x7 = $x7->addInt32($j7); - $x8 = $x8->addInt32($j8); - $x9 = $x9->addInt32($j9); - $x10 = $x10->addInt32($j10); - $x11 = $x11->addInt32($j11); - $x12 = $x12->addInt32($j12); - $x13 = $x13->addInt32($j13); - $x14 = $x14->addInt32($j14); - $x15 = $x15->addInt32($j15); - - return $x0->toReverseString() . - $x1->toReverseString() . - $x2->toReverseString() . - $x3->toReverseString() . - $x4->toReverseString() . - $x5->toReverseString() . - $x6->toReverseString() . - $x7->toReverseString() . - $x8->toReverseString() . - $x9->toReverseString() . - $x10->toReverseString() . - $x11->toReverseString() . - $x12->toReverseString() . - $x13->toReverseString() . - $x14->toReverseString() . - $x15->toReverseString(); - } - - /** - * @internal You should not use this directly from another application - * - * @param int $len - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function salsa20($len, $nonce, $key) - { - if (self::strlen($key) !== 32) { - throw new RangeException('Key must be 32 bytes long'); - } - $kcopy = '' . $key; - $in = self::substr($nonce, 0, 8) . str_repeat("\0", 8); - $c = ''; - while ($len >= 64) { - $c .= self::core_salsa20($in, $kcopy, null); - $u = 1; - // Internal counter. - for ($i = 8; $i < 16; ++$i) { - $u += self::chrToInt($in[$i]); - $in[$i] = self::intToChr($u & 0xff); - $u >>= 8; - } - $len -= 64; - } - if ($len > 0) { - $c .= self::substr( - self::core_salsa20($in, $kcopy, null), - 0, - $len - ); - } - try { - ParagonIE_Sodium_Compat::memzero($kcopy); - } catch (SodiumException $ex) { - $kcopy = null; - } - return $c; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $m - * @param string $n - * @param int $ic - * @param string $k - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function salsa20_xor_ic($m, $n, $ic, $k) - { - $mlen = self::strlen($m); - if ($mlen < 1) { - return ''; - } - $kcopy = self::substr($k, 0, 32); - $in = self::substr($n, 0, 8); - // Initialize the counter - $in .= ParagonIE_Sodium_Core32_Util::store64_le($ic); - - $c = ''; - while ($mlen >= 64) { - $block = self::core_salsa20($in, $kcopy, null); - $c .= self::xorStrings( - self::substr($m, 0, 64), - self::substr($block, 0, 64) - ); - $u = 1; - for ($i = 8; $i < 16; ++$i) { - $u += self::chrToInt($in[$i]); - $in[$i] = self::intToChr($u & 0xff); - $u >>= 8; - } - - $mlen -= 64; - $m = self::substr($m, 64); - } - - if ($mlen) { - $block = self::core_salsa20($in, $kcopy, null); - $c .= self::xorStrings( - self::substr($m, 0, $mlen), - self::substr($block, 0, $mlen) - ); - } - try { - ParagonIE_Sodium_Compat::memzero($block); - ParagonIE_Sodium_Compat::memzero($kcopy); - } catch (SodiumException $ex) { - $block = null; - $kcopy = null; - } - - return $c; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $message - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function salsa20_xor($message, $nonce, $key) - { - return self::xorStrings( - $message, - self::salsa20( - self::strlen($message), - $nonce, - $key - ) - ); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/SecretStream/State.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/SecretStream/State.php deleted file mode 100644 index f9686b9c..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/SecretStream/State.php +++ /dev/null @@ -1,164 +0,0 @@ -key = $key; - $this->counter = 1; - if (is_null($nonce)) { - $nonce = str_repeat("\0", 12); - } - $this->nonce = str_pad($nonce, 12, "\0", STR_PAD_RIGHT);; - $this->_pad = str_repeat("\0", 4); - } - - /** - * @return self - */ - public function counterReset() - { - $this->counter = 1; - $this->_pad = str_repeat("\0", 4); - return $this; - } - - /** - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * @return string - */ - public function getCounter() - { - return ParagonIE_Sodium_Core32_Util::store32_le($this->counter); - } - - /** - * @return string - */ - public function getNonce() - { - if (!is_string($this->nonce)) { - $this->nonce = str_repeat("\0", 12); - } - if (ParagonIE_Sodium_Core32_Util::strlen($this->nonce) !== 12) { - $this->nonce = str_pad($this->nonce, 12, "\0", STR_PAD_RIGHT); - } - return $this->nonce; - } - - /** - * @return string - */ - public function getCombinedNonce() - { - return $this->getCounter() . - ParagonIE_Sodium_Core32_Util::substr($this->getNonce(), 0, 8); - } - - /** - * @return self - */ - public function incrementCounter() - { - ++$this->counter; - return $this; - } - - /** - * @return bool - */ - public function needsRekey() - { - return ($this->counter & 0xffff) === 0; - } - - /** - * @param string $newKeyAndNonce - * @return self - */ - public function rekey($newKeyAndNonce) - { - $this->key = ParagonIE_Sodium_Core32_Util::substr($newKeyAndNonce, 0, 32); - $this->nonce = str_pad( - ParagonIE_Sodium_Core32_Util::substr($newKeyAndNonce, 32), - 12, - "\0", - STR_PAD_RIGHT - ); - return $this; - } - - /** - * @param string $str - * @return self - */ - public function xorNonce($str) - { - $this->nonce = ParagonIE_Sodium_Core32_Util::xorStrings( - $this->getNonce(), - str_pad( - ParagonIE_Sodium_Core32_Util::substr($str, 0, 8), - 12, - "\0", - STR_PAD_RIGHT - ) - ); - return $this; - } - - /** - * @param string $string - * @return self - */ - public static function fromString($string) - { - $state = new ParagonIE_Sodium_Core32_SecretStream_State( - ParagonIE_Sodium_Core32_Util::substr($string, 0, 32) - ); - $state->counter = ParagonIE_Sodium_Core32_Util::load_4( - ParagonIE_Sodium_Core32_Util::substr($string, 32, 4) - ); - $state->nonce = ParagonIE_Sodium_Core32_Util::substr($string, 36, 12); - $state->_pad = ParagonIE_Sodium_Core32_Util::substr($string, 48, 8); - return $state; - } - - /** - * @return string - */ - public function toString() - { - return $this->key . - $this->getCounter() . - $this->nonce . - $this->_pad; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/SipHash.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/SipHash.php deleted file mode 100644 index 6e570f7b..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/SipHash.php +++ /dev/null @@ -1,239 +0,0 @@ - $v - * @return array - */ - public static function sipRound(array $v) - { - # v0 += v1; - $v[0] = $v[0]->addInt64($v[1]); - - # v1 = ROTL(v1, 13); - $v[1] = $v[1]->rotateLeft(13); - - # v1 ^= v0; - $v[1] = $v[1]->xorInt64($v[0]); - - # v0=ROTL(v0,32); - $v[0] = $v[0]->rotateLeft(32); - - # v2 += v3; - $v[2] = $v[2]->addInt64($v[3]); - - # v3=ROTL(v3,16); - $v[3] = $v[3]->rotateLeft(16); - - # v3 ^= v2; - $v[3] = $v[3]->xorInt64($v[2]); - - # v0 += v3; - $v[0] = $v[0]->addInt64($v[3]); - - # v3=ROTL(v3,21); - $v[3] = $v[3]->rotateLeft(21); - - # v3 ^= v0; - $v[3] = $v[3]->xorInt64($v[0]); - - # v2 += v1; - $v[2] = $v[2]->addInt64($v[1]); - - # v1=ROTL(v1,17); - $v[1] = $v[1]->rotateLeft(17); - - # v1 ^= v2; - $v[1] = $v[1]->xorInt64($v[2]); - - # v2=ROTL(v2,32) - $v[2] = $v[2]->rotateLeft(32); - - return $v; - } - - /** - * @internal You should not use this directly from another application - * - * @param string $in - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sipHash24($in, $key) - { - $inlen = self::strlen($in); - - # /* "somepseudorandomlygeneratedbytes" */ - # u64 v0 = 0x736f6d6570736575ULL; - # u64 v1 = 0x646f72616e646f6dULL; - # u64 v2 = 0x6c7967656e657261ULL; - # u64 v3 = 0x7465646279746573ULL; - $v = array( - new ParagonIE_Sodium_Core32_Int64( - array(0x736f, 0x6d65, 0x7073, 0x6575) - ), - new ParagonIE_Sodium_Core32_Int64( - array(0x646f, 0x7261, 0x6e64, 0x6f6d) - ), - new ParagonIE_Sodium_Core32_Int64( - array(0x6c79, 0x6765, 0x6e65, 0x7261) - ), - new ParagonIE_Sodium_Core32_Int64( - array(0x7465, 0x6462, 0x7974, 0x6573) - ) - ); - - # u64 k0 = LOAD64_LE( k ); - # u64 k1 = LOAD64_LE( k + 8 ); - $k = array( - ParagonIE_Sodium_Core32_Int64::fromReverseString( - self::substr($key, 0, 8) - ), - ParagonIE_Sodium_Core32_Int64::fromReverseString( - self::substr($key, 8, 8) - ) - ); - - # b = ( ( u64 )inlen ) << 56; - $b = new ParagonIE_Sodium_Core32_Int64( - array(($inlen << 8) & 0xffff, 0, 0, 0) - ); - - # v3 ^= k1; - $v[3] = $v[3]->xorInt64($k[1]); - # v2 ^= k0; - $v[2] = $v[2]->xorInt64($k[0]); - # v1 ^= k1; - $v[1] = $v[1]->xorInt64($k[1]); - # v0 ^= k0; - $v[0] = $v[0]->xorInt64($k[0]); - - $left = $inlen; - # for ( ; in != end; in += 8 ) - while ($left >= 8) { - # m = LOAD64_LE( in ); - $m = ParagonIE_Sodium_Core32_Int64::fromReverseString( - self::substr($in, 0, 8) - ); - - # v3 ^= m; - $v[3] = $v[3]->xorInt64($m); - - # SIPROUND; - # SIPROUND; - $v = self::sipRound($v); - $v = self::sipRound($v); - - # v0 ^= m; - $v[0] = $v[0]->xorInt64($m); - - $in = self::substr($in, 8); - $left -= 8; - } - - # switch( left ) - # { - # case 7: b |= ( ( u64 )in[ 6] ) << 48; - # case 6: b |= ( ( u64 )in[ 5] ) << 40; - # case 5: b |= ( ( u64 )in[ 4] ) << 32; - # case 4: b |= ( ( u64 )in[ 3] ) << 24; - # case 3: b |= ( ( u64 )in[ 2] ) << 16; - # case 2: b |= ( ( u64 )in[ 1] ) << 8; - # case 1: b |= ( ( u64 )in[ 0] ); break; - # case 0: break; - # } - switch ($left) { - case 7: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - 0, self::chrToInt($in[6]) << 16 - ) - ); - case 6: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - 0, self::chrToInt($in[5]) << 8 - ) - ); - case 5: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - 0, self::chrToInt($in[4]) - ) - ); - case 4: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - self::chrToInt($in[3]) << 24, 0 - ) - ); - case 3: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - self::chrToInt($in[2]) << 16, 0 - ) - ); - case 2: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - self::chrToInt($in[1]) << 8, 0 - ) - ); - case 1: - $b = $b->orInt64( - ParagonIE_Sodium_Core32_Int64::fromInts( - self::chrToInt($in[0]), 0 - ) - ); - case 0: - break; - } - - # v3 ^= b; - $v[3] = $v[3]->xorInt64($b); - - # SIPROUND; - # SIPROUND; - $v = self::sipRound($v); - $v = self::sipRound($v); - - # v0 ^= b; - $v[0] = $v[0]->xorInt64($b); - - // Flip the lower 8 bits of v2 which is ($v[4], $v[5]) in our implementation - # v2 ^= 0xff; - $v[2]->limbs[3] ^= 0xff; - - # SIPROUND; - # SIPROUND; - # SIPROUND; - # SIPROUND; - $v = self::sipRound($v); - $v = self::sipRound($v); - $v = self::sipRound($v); - $v = self::sipRound($v); - - # b = v0 ^ v1 ^ v2 ^ v3; - # STORE64_LE( out, b ); - return $v[0] - ->xorInt64($v[1]) - ->xorInt64($v[2]) - ->xorInt64($v[3]) - ->toReverseString(); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Util.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Util.php deleted file mode 100644 index 4e657a37..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/Util.php +++ /dev/null @@ -1,14 +0,0 @@ -toInt(); - $f1 = (int) $f[1]->toInt(); - $f2 = (int) $f[2]->toInt(); - $f3 = (int) $f[3]->toInt(); - $f4 = (int) $f[4]->toInt(); - $f5 = (int) $f[5]->toInt(); - $f6 = (int) $f[6]->toInt(); - $f7 = (int) $f[7]->toInt(); - $f8 = (int) $f[8]->toInt(); - $f9 = (int) $f[9]->toInt(); - $g0 = (int) $g[0]->toInt(); - $g1 = (int) $g[1]->toInt(); - $g2 = (int) $g[2]->toInt(); - $g3 = (int) $g[3]->toInt(); - $g4 = (int) $g[4]->toInt(); - $g5 = (int) $g[5]->toInt(); - $g6 = (int) $g[6]->toInt(); - $g7 = (int) $g[7]->toInt(); - $g8 = (int) $g[8]->toInt(); - $g9 = (int) $g[9]->toInt(); - $b = -$b; - /** @var int $x0 */ - $x0 = ($f0 ^ $g0) & $b; - /** @var int $x1 */ - $x1 = ($f1 ^ $g1) & $b; - /** @var int $x2 */ - $x2 = ($f2 ^ $g2) & $b; - /** @var int $x3 */ - $x3 = ($f3 ^ $g3) & $b; - /** @var int $x4 */ - $x4 = ($f4 ^ $g4) & $b; - /** @var int $x5 */ - $x5 = ($f5 ^ $g5) & $b; - /** @var int $x6 */ - $x6 = ($f6 ^ $g6) & $b; - /** @var int $x7 */ - $x7 = ($f7 ^ $g7) & $b; - /** @var int $x8 */ - $x8 = ($f8 ^ $g8) & $b; - /** @var int $x9 */ - $x9 = ($f9 ^ $g9) & $b; - $f[0] = ParagonIE_Sodium_Core32_Int32::fromInt($f0 ^ $x0); - $f[1] = ParagonIE_Sodium_Core32_Int32::fromInt($f1 ^ $x1); - $f[2] = ParagonIE_Sodium_Core32_Int32::fromInt($f2 ^ $x2); - $f[3] = ParagonIE_Sodium_Core32_Int32::fromInt($f3 ^ $x3); - $f[4] = ParagonIE_Sodium_Core32_Int32::fromInt($f4 ^ $x4); - $f[5] = ParagonIE_Sodium_Core32_Int32::fromInt($f5 ^ $x5); - $f[6] = ParagonIE_Sodium_Core32_Int32::fromInt($f6 ^ $x6); - $f[7] = ParagonIE_Sodium_Core32_Int32::fromInt($f7 ^ $x7); - $f[8] = ParagonIE_Sodium_Core32_Int32::fromInt($f8 ^ $x8); - $f[9] = ParagonIE_Sodium_Core32_Int32::fromInt($f9 ^ $x9); - $g[0] = ParagonIE_Sodium_Core32_Int32::fromInt($g0 ^ $x0); - $g[1] = ParagonIE_Sodium_Core32_Int32::fromInt($g1 ^ $x1); - $g[2] = ParagonIE_Sodium_Core32_Int32::fromInt($g2 ^ $x2); - $g[3] = ParagonIE_Sodium_Core32_Int32::fromInt($g3 ^ $x3); - $g[4] = ParagonIE_Sodium_Core32_Int32::fromInt($g4 ^ $x4); - $g[5] = ParagonIE_Sodium_Core32_Int32::fromInt($g5 ^ $x5); - $g[6] = ParagonIE_Sodium_Core32_Int32::fromInt($g6 ^ $x6); - $g[7] = ParagonIE_Sodium_Core32_Int32::fromInt($g7 ^ $x7); - $g[8] = ParagonIE_Sodium_Core32_Int32::fromInt($g8 ^ $x8); - $g[9] = ParagonIE_Sodium_Core32_Int32::fromInt($g9 ^ $x9); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $f - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - * @psalm-suppress MixedAssignment - * @psalm-suppress MixedMethodCall - */ - public static function fe_mul121666(ParagonIE_Sodium_Core32_Curve25519_Fe $f) - { - /** @var array $h */ - $h = array(); - for ($i = 0; $i < 10; ++$i) { - $h[$i] = $f[$i]->toInt64()->mulInt(121666, 17); - } - - $carry9 = $h[9]->addInt(1 << 24)->shiftRight(25); - $h[0] = $h[0]->addInt64($carry9->mulInt(19, 5)); - $h[9] = $h[9]->subInt64($carry9->shiftLeft(25)); - - $carry1 = $h[1]->addInt(1 << 24)->shiftRight(25); - $h[2] = $h[2]->addInt64($carry1); - $h[1] = $h[1]->subInt64($carry1->shiftLeft(25)); - - $carry3 = $h[3]->addInt(1 << 24)->shiftRight(25); - $h[4] = $h[4]->addInt64($carry3); - $h[3] = $h[3]->subInt64($carry3->shiftLeft(25)); - - $carry5 = $h[5]->addInt(1 << 24)->shiftRight(25); - $h[6] = $h[6]->addInt64($carry5); - $h[5] = $h[5]->subInt64($carry5->shiftLeft(25)); - - $carry7 = $h[7]->addInt(1 << 24)->shiftRight(25); - $h[8] = $h[8]->addInt64($carry7); - $h[7] = $h[7]->subInt64($carry7->shiftLeft(25)); - - $carry0 = $h[0]->addInt(1 << 25)->shiftRight(26); - $h[1] = $h[1]->addInt64($carry0); - $h[0] = $h[0]->subInt64($carry0->shiftLeft(26)); - - $carry2 = $h[2]->addInt(1 << 25)->shiftRight(26); - $h[3] = $h[3]->addInt64($carry2); - $h[2] = $h[2]->subInt64($carry2->shiftLeft(26)); - - $carry4 = $h[4]->addInt(1 << 25)->shiftRight(26); - $h[5] = $h[5]->addInt64($carry4); - $h[4] = $h[4]->subInt64($carry4->shiftLeft(26)); - - $carry6 = $h[6]->addInt(1 << 25)->shiftRight(26); - $h[7] = $h[7]->addInt64($carry6); - $h[6] = $h[6]->subInt64($carry6->shiftLeft(26)); - - $carry8 = $h[8]->addInt(1 << 25)->shiftRight(26); - $h[9] = $h[9]->addInt64($carry8); - $h[8] = $h[8]->subInt64($carry8->shiftLeft(26)); - - for ($i = 0; $i < 10; ++$i) { - $h[$i] = $h[$i]->toInt32(); - } - /** @var array $h2 */ - $h2 = $h; - return ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray($h2); - } - - /** - * @internal You should not use this directly from another application - * - * Inline comments preceded by # are from libsodium's ref10 code. - * - * @param string $n - * @param string $p - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_scalarmult_curve25519_ref10($n, $p) - { - # for (i = 0;i < 32;++i) e[i] = n[i]; - $e = '' . $n; - # e[0] &= 248; - $e[0] = self::intToChr( - self::chrToInt($e[0]) & 248 - ); - # e[31] &= 127; - # e[31] |= 64; - $e[31] = self::intToChr( - (self::chrToInt($e[31]) & 127) | 64 - ); - # fe_frombytes(x1,p); - $x1 = self::fe_frombytes($p); - # fe_1(x2); - $x2 = self::fe_1(); - # fe_0(z2); - $z2 = self::fe_0(); - # fe_copy(x3,x1); - $x3 = self::fe_copy($x1); - # fe_1(z3); - $z3 = self::fe_1(); - - # swap = 0; - /** @var int $swap */ - $swap = 0; - - # for (pos = 254;pos >= 0;--pos) { - for ($pos = 254; $pos >= 0; --$pos) { - # b = e[pos / 8] >> (pos & 7); - /** @var int $b */ - $b = self::chrToInt( - $e[(int) floor($pos / 8)] - ) >> ($pos & 7); - # b &= 1; - $b &= 1; - - # swap ^= b; - $swap ^= $b; - - # fe_cswap(x2,x3,swap); - self::fe_cswap($x2, $x3, $swap); - - # fe_cswap(z2,z3,swap); - self::fe_cswap($z2, $z3, $swap); - - # swap = b; - /** @var int $swap */ - $swap = $b; - - # fe_sub(tmp0,x3,z3); - $tmp0 = self::fe_sub($x3, $z3); - - # fe_sub(tmp1,x2,z2); - $tmp1 = self::fe_sub($x2, $z2); - - # fe_add(x2,x2,z2); - $x2 = self::fe_add($x2, $z2); - - # fe_add(z2,x3,z3); - $z2 = self::fe_add($x3, $z3); - - # fe_mul(z3,tmp0,x2); - $z3 = self::fe_mul($tmp0, $x2); - - # fe_mul(z2,z2,tmp1); - $z2 = self::fe_mul($z2, $tmp1); - - # fe_sq(tmp0,tmp1); - $tmp0 = self::fe_sq($tmp1); - - # fe_sq(tmp1,x2); - $tmp1 = self::fe_sq($x2); - - # fe_add(x3,z3,z2); - $x3 = self::fe_add($z3, $z2); - - # fe_sub(z2,z3,z2); - $z2 = self::fe_sub($z3, $z2); - - # fe_mul(x2,tmp1,tmp0); - $x2 = self::fe_mul($tmp1, $tmp0); - - # fe_sub(tmp1,tmp1,tmp0); - $tmp1 = self::fe_sub($tmp1, $tmp0); - - # fe_sq(z2,z2); - $z2 = self::fe_sq($z2); - - # fe_mul121666(z3,tmp1); - $z3 = self::fe_mul121666($tmp1); - - # fe_sq(x3,x3); - $x3 = self::fe_sq($x3); - - # fe_add(tmp0,tmp0,z3); - $tmp0 = self::fe_add($tmp0, $z3); - - # fe_mul(z3,x1,z2); - $z3 = self::fe_mul($x1, $z2); - - # fe_mul(z2,tmp1,tmp0); - $z2 = self::fe_mul($tmp1, $tmp0); - } - - # fe_cswap(x2,x3,swap); - self::fe_cswap($x2, $x3, $swap); - - # fe_cswap(z2,z3,swap); - self::fe_cswap($z2, $z3, $swap); - - # fe_invert(z2,z2); - $z2 = self::fe_invert($z2); - - # fe_mul(x2,x2,z2); - $x2 = self::fe_mul($x2, $z2); - # fe_tobytes(q,x2); - return (string) self::fe_tobytes($x2); - } - - /** - * @internal You should not use this directly from another application - * - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $edwardsY - * @param ParagonIE_Sodium_Core32_Curve25519_Fe $edwardsZ - * @return ParagonIE_Sodium_Core32_Curve25519_Fe - * @throws SodiumException - * @throws TypeError - */ - public static function edwards_to_montgomery( - ParagonIE_Sodium_Core32_Curve25519_Fe $edwardsY, - ParagonIE_Sodium_Core32_Curve25519_Fe $edwardsZ - ) { - $tempX = self::fe_add($edwardsZ, $edwardsY); - $tempZ = self::fe_sub($edwardsZ, $edwardsY); - $tempZ = self::fe_invert($tempZ); - return self::fe_mul($tempX, $tempZ); - } - - /** - * @internal You should not use this directly from another application - * - * @param string $n - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function crypto_scalarmult_curve25519_ref10_base($n) - { - # for (i = 0;i < 32;++i) e[i] = n[i]; - $e = '' . $n; - - # e[0] &= 248; - $e[0] = self::intToChr( - self::chrToInt($e[0]) & 248 - ); - - # e[31] &= 127; - # e[31] |= 64; - $e[31] = self::intToChr( - (self::chrToInt($e[31]) & 127) | 64 - ); - - $A = self::ge_scalarmult_base($e); - if ( - !($A->Y instanceof ParagonIE_Sodium_Core32_Curve25519_Fe) - || - !($A->Z instanceof ParagonIE_Sodium_Core32_Curve25519_Fe) - ) { - throw new TypeError('Null points encountered'); - } - $pk = self::edwards_to_montgomery($A->Y, $A->Z); - return self::fe_tobytes($pk); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/XChaCha20.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/XChaCha20.php deleted file mode 100644 index 8cfcfdac..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Core32/XChaCha20.php +++ /dev/null @@ -1,88 +0,0 @@ -update($ad); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($adlen)); - $state->update($ciphertext); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($clen)); - $computed_mac = $state->finish(); - - /* Compare the given MAC with the recalculated MAC: */ - if (!ParagonIE_Sodium_Core_Util::verify_16($computed_mac, $mac)) { - throw new SodiumException('Invalid MAC'); - } - - // Here, we know that the MAC is valid, so we decrypt and return the plaintext - return ParagonIE_Sodium_Core_ChaCha20::streamXorIc( - $ciphertext, - $nonce, - $key, - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - } - - /** - * AEAD Encryption with ChaCha20-Poly1305 - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_chacha20poly1305_encrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - /** @var int $len - Length of the plaintext message */ - $len = ParagonIE_Sodium_Core_Util::strlen($message); - - /** @var int $adlen - Length of the associated data */ - $adlen = ParagonIE_Sodium_Core_Util::strlen($ad); - - /** @var string The first block of the chacha20 keystream, used as a poly1305 key */ - $block0 = ParagonIE_Sodium_Core_ChaCha20::stream( - 32, - $nonce, - $key - ); - $state = new ParagonIE_Sodium_Core_Poly1305_State($block0); - try { - ParagonIE_Sodium_Compat::memzero($block0); - } catch (SodiumException $ex) { - $block0 = null; - } - - /** @var string $ciphertext - Raw encrypted data */ - $ciphertext = ParagonIE_Sodium_Core_ChaCha20::streamXorIc( - $message, - $nonce, - $key, - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - - $state->update($ad); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($adlen)); - $state->update($ciphertext); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($len)); - return $ciphertext . $state->finish(); - } - - /** - * AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_chacha20poly1305_ietf_decrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - /** @var int $adlen - Length of associated data */ - $adlen = ParagonIE_Sodium_Core_Util::strlen($ad); - - /** @var int $len - Length of message (ciphertext + MAC) */ - $len = ParagonIE_Sodium_Core_Util::strlen($message); - - /** @var int $clen - Length of ciphertext */ - $clen = $len - self::aead_chacha20poly1305_IETF_ABYTES; - - /** @var string The first block of the chacha20 keystream, used as a poly1305 key */ - $block0 = ParagonIE_Sodium_Core_ChaCha20::ietfStream( - 32, - $nonce, - $key - ); - - /** @var string $mac - Message authentication code */ - $mac = ParagonIE_Sodium_Core_Util::substr( - $message, - $len - self::aead_chacha20poly1305_IETF_ABYTES, - self::aead_chacha20poly1305_IETF_ABYTES - ); - - /** @var string $ciphertext - The encrypted message (sans MAC) */ - $ciphertext = ParagonIE_Sodium_Core_Util::substr( - $message, - 0, - $len - self::aead_chacha20poly1305_IETF_ABYTES - ); - - /* Recalculate the Poly1305 authentication tag (MAC): */ - $state = new ParagonIE_Sodium_Core_Poly1305_State($block0); - try { - ParagonIE_Sodium_Compat::memzero($block0); - } catch (SodiumException $ex) { - $block0 = null; - } - $state->update($ad); - $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf))); - $state->update($ciphertext); - $state->update(str_repeat("\x00", (0x10 - $clen) & 0xf)); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($adlen)); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($clen)); - $computed_mac = $state->finish(); - - /* Compare the given MAC with the recalculated MAC: */ - if (!ParagonIE_Sodium_Core_Util::verify_16($computed_mac, $mac)) { - throw new SodiumException('Invalid MAC'); - } - - // Here, we know that the MAC is valid, so we decrypt and return the plaintext - return ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - $ciphertext, - $nonce, - $key, - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - } - - /** - * AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_chacha20poly1305_ietf_encrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - /** @var int $len - Length of the plaintext message */ - $len = ParagonIE_Sodium_Core_Util::strlen($message); - - /** @var int $adlen - Length of the associated data */ - $adlen = ParagonIE_Sodium_Core_Util::strlen($ad); - - /** @var string The first block of the chacha20 keystream, used as a poly1305 key */ - $block0 = ParagonIE_Sodium_Core_ChaCha20::ietfStream( - 32, - $nonce, - $key - ); - $state = new ParagonIE_Sodium_Core_Poly1305_State($block0); - try { - ParagonIE_Sodium_Compat::memzero($block0); - } catch (SodiumException $ex) { - $block0 = null; - } - - /** @var string $ciphertext - Raw encrypted data */ - $ciphertext = ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - $message, - $nonce, - $key, - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - - $state->update($ad); - $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf))); - $state->update($ciphertext); - $state->update(str_repeat("\x00", ((0x10 - $len) & 0xf))); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($adlen)); - $state->update(ParagonIE_Sodium_Core_Util::store64_le($len)); - return $ciphertext . $state->finish(); - } - - /** - * AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_xchacha20poly1305_ietf_decrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - $subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core_Util::substr($nonce, 0, 16), - $key - ); - $nonceLast = "\x00\x00\x00\x00" . - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8); - - return self::aead_chacha20poly1305_ietf_decrypt($message, $ad, $nonceLast, $subkey); - } - - /** - * AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_xchacha20poly1305_ietf_encrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - $subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core_Util::substr($nonce, 0, 16), - $key - ); - $nonceLast = "\x00\x00\x00\x00" . - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8); - - return self::aead_chacha20poly1305_ietf_encrypt($message, $ad, $nonceLast, $subkey); - } - - /** - * HMAC-SHA-512-256 (a.k.a. the leftmost 256 bits of HMAC-SHA-512) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $key - * @return string - * @throws TypeError - */ - public static function auth($message, $key) - { - return ParagonIE_Sodium_Core_Util::substr( - hash_hmac('sha512', $message, $key, true), - 0, - 32 - ); - } - - /** - * HMAC-SHA-512-256 validation. Constant-time via hash_equals(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $mac - * @param string $message - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function auth_verify($mac, $message, $key) - { - return ParagonIE_Sodium_Core_Util::hashEquals( - $mac, - self::auth($message, $key) - ); - } - - /** - * X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $plaintext - * @param string $nonce - * @param string $keypair - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box($plaintext, $nonce, $keypair) - { - $c = self::secretbox( - $plaintext, - $nonce, - self::box_beforenm( - self::box_secretkey($keypair), - self::box_publickey($keypair) - ) - ); - return $c; - } - - /** - * X25519-XSalsa20-Poly1305 with one ephemeral X25519 keypair. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $publicKey - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_seal($message, $publicKey) - { - /** @var string $ephemeralKeypair */ - $ephemeralKeypair = self::box_keypair(); - - /** @var string $ephemeralSK */ - $ephemeralSK = self::box_secretkey($ephemeralKeypair); - - /** @var string $ephemeralPK */ - $ephemeralPK = self::box_publickey($ephemeralKeypair); - - /** @var string $nonce */ - $nonce = self::generichash( - $ephemeralPK . $publicKey, - '', - 24 - ); - - /** @var string $keypair - The combined keypair used in crypto_box() */ - $keypair = self::box_keypair_from_secretkey_and_publickey($ephemeralSK, $publicKey); - - /** @var string $ciphertext Ciphertext + MAC from crypto_box */ - $ciphertext = self::box($message, $nonce, $keypair); - try { - ParagonIE_Sodium_Compat::memzero($ephemeralKeypair); - ParagonIE_Sodium_Compat::memzero($ephemeralSK); - ParagonIE_Sodium_Compat::memzero($nonce); - } catch (SodiumException $ex) { - $ephemeralKeypair = null; - $ephemeralSK = null; - $nonce = null; - } - return $ephemeralPK . $ciphertext; - } - - /** - * Opens a message encrypted via box_seal(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $keypair - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_seal_open($message, $keypair) - { - /** @var string $ephemeralPK */ - $ephemeralPK = ParagonIE_Sodium_Core_Util::substr($message, 0, 32); - - /** @var string $ciphertext (ciphertext + MAC) */ - $ciphertext = ParagonIE_Sodium_Core_Util::substr($message, 32); - - /** @var string $secretKey */ - $secretKey = self::box_secretkey($keypair); - - /** @var string $publicKey */ - $publicKey = self::box_publickey($keypair); - - /** @var string $nonce */ - $nonce = self::generichash( - $ephemeralPK . $publicKey, - '', - 24 - ); - - /** @var string $keypair */ - $keypair = self::box_keypair_from_secretkey_and_publickey($secretKey, $ephemeralPK); - - /** @var string $m */ - $m = self::box_open($ciphertext, $nonce, $keypair); - try { - ParagonIE_Sodium_Compat::memzero($secretKey); - ParagonIE_Sodium_Compat::memzero($ephemeralPK); - ParagonIE_Sodium_Compat::memzero($nonce); - } catch (SodiumException $ex) { - $secretKey = null; - $ephemeralPK = null; - $nonce = null; - } - return $m; - } - - /** - * Used by crypto_box() to get the crypto_secretbox() key. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sk - * @param string $pk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_beforenm($sk, $pk) - { - return ParagonIE_Sodium_Core_HSalsa20::hsalsa20( - str_repeat("\x00", 16), - self::scalarmult($sk, $pk) - ); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @return string - * @throws Exception - * @throws SodiumException - * @throws TypeError - */ - public static function box_keypair() - { - $sKey = random_bytes(32); - $pKey = self::scalarmult_base($sKey); - return $sKey . $pKey; - } - - /** - * @param string $seed - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_seed_keypair($seed) - { - $sKey = ParagonIE_Sodium_Core_Util::substr( - hash('sha512', $seed, true), - 0, - 32 - ); - $pKey = self::scalarmult_base($sKey); - return $sKey . $pKey; - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sKey - * @param string $pKey - * @return string - * @throws TypeError - */ - public static function box_keypair_from_secretkey_and_publickey($sKey, $pKey) - { - return ParagonIE_Sodium_Core_Util::substr($sKey, 0, 32) . - ParagonIE_Sodium_Core_Util::substr($pKey, 0, 32); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $keypair - * @return string - * @throws RangeException - * @throws TypeError - */ - public static function box_secretkey($keypair) - { - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== 64) { - throw new RangeException( - 'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES bytes long.' - ); - } - return ParagonIE_Sodium_Core_Util::substr($keypair, 0, 32); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $keypair - * @return string - * @throws RangeException - * @throws TypeError - */ - public static function box_publickey($keypair) - { - if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES) { - throw new RangeException( - 'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES bytes long.' - ); - } - return ParagonIE_Sodium_Core_Util::substr($keypair, 32, 32); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sKey - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function box_publickey_from_secretkey($sKey) - { - if (ParagonIE_Sodium_Core_Util::strlen($sKey) !== ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES) { - throw new RangeException( - 'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES bytes long.' - ); - } - return self::scalarmult_base($sKey); - } - - /** - * Decrypt a message encrypted with box(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ciphertext - * @param string $nonce - * @param string $keypair - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_open($ciphertext, $nonce, $keypair) - { - return self::secretbox_open( - $ciphertext, - $nonce, - self::box_beforenm( - self::box_secretkey($keypair), - self::box_publickey($keypair) - ) - ); - } - - /** - * Calculate a BLAKE2b hash. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string|null $key - * @param int $outlen - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function generichash($message, $key = '', $outlen = 32) - { - // This ensures that ParagonIE_Sodium_Core_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core_BLAKE2b::pseudoConstructor(); - - $k = null; - if (!empty($key)) { - /** @var SplFixedArray $k */ - $k = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($key); - if ($k->count() > ParagonIE_Sodium_Core_BLAKE2b::KEYBYTES) { - throw new RangeException('Invalid key size'); - } - } - - /** @var SplFixedArray $in */ - $in = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($message); - - /** @var SplFixedArray $ctx */ - $ctx = ParagonIE_Sodium_Core_BLAKE2b::init($k, $outlen); - ParagonIE_Sodium_Core_BLAKE2b::update($ctx, $in, $in->count()); - - /** @var SplFixedArray $out */ - $out = new SplFixedArray($outlen); - $out = ParagonIE_Sodium_Core_BLAKE2b::finish($ctx, $out); - - /** @var array */ - $outArray = $out->toArray(); - return ParagonIE_Sodium_Core_Util::intArrayToString($outArray); - } - - /** - * Finalize a BLAKE2b hashing context, returning the hash. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ctx - * @param int $outlen - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_final($ctx, $outlen = 32) - { - if (!is_string($ctx)) { - throw new TypeError('Context must be a string'); - } - $out = new SplFixedArray($outlen); - - /** @var SplFixedArray $context */ - $context = ParagonIE_Sodium_Core_BLAKE2b::stringToContext($ctx); - - /** @var SplFixedArray $out */ - $out = ParagonIE_Sodium_Core_BLAKE2b::finish($context, $out); - - /** @var array */ - $outArray = $out->toArray(); - return ParagonIE_Sodium_Core_Util::intArrayToString($outArray); - } - - /** - * Initialize a hashing context for BLAKE2b. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $key - * @param int $outputLength - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_init($key = '', $outputLength = 32) - { - // This ensures that ParagonIE_Sodium_Core_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core_BLAKE2b::pseudoConstructor(); - - $k = null; - if (!empty($key)) { - $k = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($key); - if ($k->count() > ParagonIE_Sodium_Core_BLAKE2b::KEYBYTES) { - throw new RangeException('Invalid key size'); - } - } - - /** @var SplFixedArray $ctx */ - $ctx = ParagonIE_Sodium_Core_BLAKE2b::init($k, $outputLength); - - return ParagonIE_Sodium_Core_BLAKE2b::contextToString($ctx); - } - - /** - * Initialize a hashing context for BLAKE2b. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $key - * @param int $outputLength - * @param string $salt - * @param string $personal - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_init_salt_personal( - $key = '', - $outputLength = 32, - $salt = '', - $personal = '' - ) { - // This ensures that ParagonIE_Sodium_Core_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core_BLAKE2b::pseudoConstructor(); - - $k = null; - if (!empty($key)) { - $k = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($key); - if ($k->count() > ParagonIE_Sodium_Core_BLAKE2b::KEYBYTES) { - throw new RangeException('Invalid key size'); - } - } - if (!empty($salt)) { - $s = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($salt); - } else { - $s = null; - } - if (!empty($salt)) { - $p = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($personal); - } else { - $p = null; - } - - /** @var SplFixedArray $ctx */ - $ctx = ParagonIE_Sodium_Core_BLAKE2b::init($k, $outputLength, $s, $p); - - return ParagonIE_Sodium_Core_BLAKE2b::contextToString($ctx); - } - - /** - * Update a hashing context for BLAKE2b with $message - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ctx - * @param string $message - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_update($ctx, $message) - { - // This ensures that ParagonIE_Sodium_Core_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core_BLAKE2b::pseudoConstructor(); - - /** @var SplFixedArray $context */ - $context = ParagonIE_Sodium_Core_BLAKE2b::stringToContext($ctx); - - /** @var SplFixedArray $in */ - $in = ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray($message); - - ParagonIE_Sodium_Core_BLAKE2b::update($context, $in, $in->count()); - - return ParagonIE_Sodium_Core_BLAKE2b::contextToString($context); - } - - /** - * Libsodium's crypto_kx(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $my_sk - * @param string $their_pk - * @param string $client_pk - * @param string $server_pk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function keyExchange($my_sk, $their_pk, $client_pk, $server_pk) - { - return ParagonIE_Sodium_Compat::crypto_generichash( - ParagonIE_Sodium_Compat::crypto_scalarmult($my_sk, $their_pk) . - $client_pk . - $server_pk - ); - } - - /** - * ECDH over Curve25519 - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sKey - * @param string $pKey - * @return string - * - * @throws SodiumException - * @throws TypeError - */ - public static function scalarmult($sKey, $pKey) - { - $q = ParagonIE_Sodium_Core_X25519::crypto_scalarmult_curve25519_ref10($sKey, $pKey); - self::scalarmult_throw_if_zero($q); - return $q; - } - - /** - * ECDH over Curve25519, using the basepoint. - * Used to get a secret key from a public key. - * - * @param string $secret - * @return string - * - * @throws SodiumException - * @throws TypeError - */ - public static function scalarmult_base($secret) - { - $q = ParagonIE_Sodium_Core_X25519::crypto_scalarmult_curve25519_ref10_base($secret); - self::scalarmult_throw_if_zero($q); - return $q; - } - - /** - * This throws an Error if a zero public key was passed to the function. - * - * @param string $q - * @return void - * @throws SodiumException - * @throws TypeError - */ - protected static function scalarmult_throw_if_zero($q) - { - $d = 0; - for ($i = 0; $i < self::box_curve25519xsalsa20poly1305_SECRETKEYBYTES; ++$i) { - $d |= ParagonIE_Sodium_Core_Util::chrToInt($q[$i]); - } - - /* branch-free variant of === 0 */ - if (-(1 & (($d - 1) >> 8))) { - throw new SodiumException('Zero public key is not allowed'); - } - } - - /** - * XSalsa20-Poly1305 authenticated symmetric-key encryption. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $plaintext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox($plaintext, $nonce, $key) - { - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $block0 */ - $block0 = str_repeat("\x00", 32); - - /** @var int $mlen - Length of the plaintext message */ - $mlen = ParagonIE_Sodium_Core_Util::strlen($plaintext); - $mlen0 = $mlen; - if ($mlen0 > 64 - self::secretbox_xsalsa20poly1305_ZEROBYTES) { - $mlen0 = 64 - self::secretbox_xsalsa20poly1305_ZEROBYTES; - } - $block0 .= ParagonIE_Sodium_Core_Util::substr($plaintext, 0, $mlen0); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core_Salsa20::salsa20_xor( - $block0, - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - $subkey - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core_Util::substr( - $block0, - self::secretbox_xsalsa20poly1305_ZEROBYTES - ); - if ($mlen > $mlen0) { - $c .= ParagonIE_Sodium_Core_Salsa20::salsa20_xor_ic( - ParagonIE_Sodium_Core_Util::substr( - $plaintext, - self::secretbox_xsalsa20poly1305_ZEROBYTES - ), - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - 1, - $subkey - ); - } - $state = new ParagonIE_Sodium_Core_Poly1305_State( - ParagonIE_Sodium_Core_Util::substr( - $block0, - 0, - self::onetimeauth_poly1305_KEYBYTES - ) - ); - try { - ParagonIE_Sodium_Compat::memzero($block0); - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $block0 = null; - $subkey = null; - } - - $state->update($c); - - /** @var string $c - MAC || ciphertext */ - $c = $state->finish() . $c; - unset($state); - - return $c; - } - - /** - * Decrypt a ciphertext generated via secretbox(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ciphertext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_open($ciphertext, $nonce, $key) - { - /** @var string $mac */ - $mac = ParagonIE_Sodium_Core_Util::substr( - $ciphertext, - 0, - self::secretbox_xsalsa20poly1305_MACBYTES - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core_Util::substr( - $ciphertext, - self::secretbox_xsalsa20poly1305_MACBYTES - ); - - /** @var int $clen */ - $clen = ParagonIE_Sodium_Core_Util::strlen($c); - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core_Salsa20::salsa20( - 64, - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - $subkey - ); - $verified = ParagonIE_Sodium_Core_Poly1305::onetimeauth_verify( - $mac, - $c, - ParagonIE_Sodium_Core_Util::substr($block0, 0, 32) - ); - if (!$verified) { - try { - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $subkey = null; - } - throw new SodiumException('Invalid MAC'); - } - - /** @var string $m - Decrypted message */ - $m = ParagonIE_Sodium_Core_Util::xorStrings( - ParagonIE_Sodium_Core_Util::substr($block0, self::secretbox_xsalsa20poly1305_ZEROBYTES), - ParagonIE_Sodium_Core_Util::substr($c, 0, self::secretbox_xsalsa20poly1305_ZEROBYTES) - ); - if ($clen > self::secretbox_xsalsa20poly1305_ZEROBYTES) { - // We had more than 1 block, so let's continue to decrypt the rest. - $m .= ParagonIE_Sodium_Core_Salsa20::salsa20_xor_ic( - ParagonIE_Sodium_Core_Util::substr( - $c, - self::secretbox_xsalsa20poly1305_ZEROBYTES - ), - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - 1, - (string) $subkey - ); - } - return $m; - } - - /** - * XChaCha20-Poly1305 authenticated symmetric-key encryption. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $plaintext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_xchacha20poly1305($plaintext, $nonce, $key) - { - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core_Util::substr($nonce, 0, 16), - $key - ); - $nonceLast = ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8); - - /** @var string $block0 */ - $block0 = str_repeat("\x00", 32); - - /** @var int $mlen - Length of the plaintext message */ - $mlen = ParagonIE_Sodium_Core_Util::strlen($plaintext); - $mlen0 = $mlen; - if ($mlen0 > 64 - self::secretbox_xchacha20poly1305_ZEROBYTES) { - $mlen0 = 64 - self::secretbox_xchacha20poly1305_ZEROBYTES; - } - $block0 .= ParagonIE_Sodium_Core_Util::substr($plaintext, 0, $mlen0); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core_ChaCha20::streamXorIc( - $block0, - $nonceLast, - $subkey - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core_Util::substr( - $block0, - self::secretbox_xchacha20poly1305_ZEROBYTES - ); - if ($mlen > $mlen0) { - $c .= ParagonIE_Sodium_Core_ChaCha20::streamXorIc( - ParagonIE_Sodium_Core_Util::substr( - $plaintext, - self::secretbox_xchacha20poly1305_ZEROBYTES - ), - $nonceLast, - $subkey, - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - } - $state = new ParagonIE_Sodium_Core_Poly1305_State( - ParagonIE_Sodium_Core_Util::substr( - $block0, - 0, - self::onetimeauth_poly1305_KEYBYTES - ) - ); - try { - ParagonIE_Sodium_Compat::memzero($block0); - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $block0 = null; - $subkey = null; - } - - $state->update($c); - - /** @var string $c - MAC || ciphertext */ - $c = $state->finish() . $c; - unset($state); - - return $c; - } - - /** - * Decrypt a ciphertext generated via secretbox_xchacha20poly1305(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ciphertext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key) - { - /** @var string $mac */ - $mac = ParagonIE_Sodium_Core_Util::substr( - $ciphertext, - 0, - self::secretbox_xchacha20poly1305_MACBYTES - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core_Util::substr( - $ciphertext, - self::secretbox_xchacha20poly1305_MACBYTES - ); - - /** @var int $clen */ - $clen = ParagonIE_Sodium_Core_Util::strlen($c); - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core_HChaCha20::hchacha20($nonce, $key); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core_ChaCha20::stream( - 64, - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - $subkey - ); - $verified = ParagonIE_Sodium_Core_Poly1305::onetimeauth_verify( - $mac, - $c, - ParagonIE_Sodium_Core_Util::substr($block0, 0, 32) - ); - - if (!$verified) { - try { - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $subkey = null; - } - throw new SodiumException('Invalid MAC'); - } - - /** @var string $m - Decrypted message */ - $m = ParagonIE_Sodium_Core_Util::xorStrings( - ParagonIE_Sodium_Core_Util::substr($block0, self::secretbox_xchacha20poly1305_ZEROBYTES), - ParagonIE_Sodium_Core_Util::substr($c, 0, self::secretbox_xchacha20poly1305_ZEROBYTES) - ); - - if ($clen > self::secretbox_xchacha20poly1305_ZEROBYTES) { - // We had more than 1 block, so let's continue to decrypt the rest. - $m .= ParagonIE_Sodium_Core_ChaCha20::streamXorIc( - ParagonIE_Sodium_Core_Util::substr( - $c, - self::secretbox_xchacha20poly1305_ZEROBYTES - ), - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - (string) $subkey, - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - } - return $m; - } - - /** - * @param string $key - * @return array Returns a state and a header. - * @throws Exception - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_init_push($key) - { - # randombytes_buf(out, crypto_secretstream_xchacha20poly1305_HEADERBYTES); - $out = random_bytes(24); - - # crypto_core_hchacha20(state->k, out, k, NULL); - $subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20($out, $key); - $state = new ParagonIE_Sodium_Core_SecretStream_State( - $subkey, - ParagonIE_Sodium_Core_Util::substr($out, 16, 8) . str_repeat("\0", 4) - ); - - # _crypto_secretstream_xchacha20poly1305_counter_reset(state); - $state->counterReset(); - - # memcpy(STATE_INONCE(state), out + crypto_core_hchacha20_INPUTBYTES, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - # memset(state->_pad, 0, sizeof state->_pad); - return array( - $state->toString(), - $out - ); - } - - /** - * @param string $key - * @param string $header - * @return string Returns a state. - * @throws Exception - */ - public static function secretstream_xchacha20poly1305_init_pull($key, $header) - { - # crypto_core_hchacha20(state->k, in, k, NULL); - $subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core_Util::substr($header, 0, 16), - $key - ); - $state = new ParagonIE_Sodium_Core_SecretStream_State( - $subkey, - ParagonIE_Sodium_Core_Util::substr($header, 16) - ); - $state->counterReset(); - # memcpy(STATE_INONCE(state), in + crypto_core_hchacha20_INPUTBYTES, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - # memset(state->_pad, 0, sizeof state->_pad); - # return 0; - return $state->toString(); - } - - /** - * @param string $state - * @param string $msg - * @param string $aad - * @param int $tag - * @return string - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_push(&$state, $msg, $aad = '', $tag = 0) - { - $st = ParagonIE_Sodium_Core_SecretStream_State::fromString($state); - # crypto_onetimeauth_poly1305_state poly1305_state; - # unsigned char block[64U]; - # unsigned char slen[8U]; - # unsigned char *c; - # unsigned char *mac; - - $msglen = ParagonIE_Sodium_Core_Util::strlen($msg); - $aadlen = ParagonIE_Sodium_Core_Util::strlen($aad); - - if ((($msglen + 63) >> 6) > 0xfffffffe) { - throw new SodiumException( - 'message cannot be larger than SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX bytes' - ); - } - - # if (outlen_p != NULL) { - # *outlen_p = 0U; - # } - # if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX) { - # sodium_misuse(); - # } - - # crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k); - # crypto_onetimeauth_poly1305_init(&poly1305_state, block); - # sodium_memzero(block, sizeof block); - $auth = new ParagonIE_Sodium_Core_Poly1305_State( - ParagonIE_Sodium_Core_ChaCha20::ietfStream(32, $st->getCombinedNonce(), $st->getKey()) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, ad, adlen); - $auth->update($aad); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, _pad0, - # (0x10 - adlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - $aadlen) & 0xf))); - - # memset(block, 0, sizeof block); - # block[0] = tag; - # crypto_stream_chacha20_ietf_xor_ic(block, block, sizeof block, - # state->nonce, 1U, state->k); - $block = ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - ParagonIE_Sodium_Core_Util::intToChr($tag) . str_repeat("\0", 63), - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, block, sizeof block); - $auth->update($block); - - # out[0] = block[0]; - $out = $block[0]; - # c = out + (sizeof tag); - # crypto_stream_chacha20_ietf_xor_ic(c, m, mlen, state->nonce, 2U, state->k); - $cipher = ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - $msg, - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core_Util::store64_le(2) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, c, mlen); - $auth->update($cipher); - - $out .= $cipher; - unset($cipher); - - # crypto_onetimeauth_poly1305_update - # (&poly1305_state, _pad0, (0x10 - (sizeof block) + mlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - 64 + $msglen) & 0xf))); - - # STORE64_LE(slen, (uint64_t) adlen); - $slen = ParagonIE_Sodium_Core_Util::store64_le($aadlen); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $auth->update($slen); - - # STORE64_LE(slen, (sizeof block) + mlen); - $slen = ParagonIE_Sodium_Core_Util::store64_le(64 + $msglen); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $auth->update($slen); - - # mac = c + mlen; - # crypto_onetimeauth_poly1305_final(&poly1305_state, mac); - $mac = $auth->finish(); - $out .= $mac; - - # sodium_memzero(&poly1305_state, sizeof poly1305_state); - unset($auth); - - - # XOR_BUF(STATE_INONCE(state), mac, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - $st->xorNonce($mac); - - # sodium_increment(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES); - $st->incrementCounter(); - // Overwrite by reference: - $state = $st->toString(); - - /** @var bool $rekey */ - $rekey = ($tag & ParagonIE_Sodium_Compat::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY) !== 0; - # if ((tag & crypto_secretstream_xchacha20poly1305_TAG_REKEY) != 0 || - # sodium_is_zero(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES)) { - # crypto_secretstream_xchacha20poly1305_rekey(state); - # } - if ($rekey || $st->needsRekey()) { - // DO REKEY - self::secretstream_xchacha20poly1305_rekey($state); - } - # if (outlen_p != NULL) { - # *outlen_p = crypto_secretstream_xchacha20poly1305_ABYTES + mlen; - # } - return $out; - } - - /** - * @param string $state - * @param string $cipher - * @param string $aad - * @return bool|array{0: string, 1: int} - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_pull(&$state, $cipher, $aad = '') - { - $st = ParagonIE_Sodium_Core_SecretStream_State::fromString($state); - - $cipherlen = ParagonIE_Sodium_Core_Util::strlen($cipher); - # mlen = inlen - crypto_secretstream_xchacha20poly1305_ABYTES; - $msglen = $cipherlen - ParagonIE_Sodium_Compat::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES; - $aadlen = ParagonIE_Sodium_Core_Util::strlen($aad); - - # if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX) { - # sodium_misuse(); - # } - if ((($msglen + 63) >> 6) > 0xfffffffe) { - throw new SodiumException( - 'message cannot be larger than SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX bytes' - ); - } - - # crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k); - # crypto_onetimeauth_poly1305_init(&poly1305_state, block); - # sodium_memzero(block, sizeof block); - $auth = new ParagonIE_Sodium_Core_Poly1305_State( - ParagonIE_Sodium_Core_ChaCha20::ietfStream(32, $st->getCombinedNonce(), $st->getKey()) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, ad, adlen); - $auth->update($aad); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, _pad0, - # (0x10 - adlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - $aadlen) & 0xf))); - - - # memset(block, 0, sizeof block); - # block[0] = in[0]; - # crypto_stream_chacha20_ietf_xor_ic(block, block, sizeof block, - # state->nonce, 1U, state->k); - $block = ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - $cipher[0] . str_repeat("\0", 63), - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core_Util::store64_le(1) - ); - # tag = block[0]; - # block[0] = in[0]; - # crypto_onetimeauth_poly1305_update(&poly1305_state, block, sizeof block); - $tag = ParagonIE_Sodium_Core_Util::chrToInt($block[0]); - $block[0] = $cipher[0]; - $auth->update($block); - - - # c = in + (sizeof tag); - # crypto_onetimeauth_poly1305_update(&poly1305_state, c, mlen); - $auth->update(ParagonIE_Sodium_Core_Util::substr($cipher, 1, $msglen)); - - # crypto_onetimeauth_poly1305_update - # (&poly1305_state, _pad0, (0x10 - (sizeof block) + mlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - 64 + $msglen) & 0xf))); - - # STORE64_LE(slen, (uint64_t) adlen); - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $slen = ParagonIE_Sodium_Core_Util::store64_le($aadlen); - $auth->update($slen); - - # STORE64_LE(slen, (sizeof block) + mlen); - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $slen = ParagonIE_Sodium_Core_Util::store64_le(64 + $msglen); - $auth->update($slen); - - # crypto_onetimeauth_poly1305_final(&poly1305_state, mac); - # sodium_memzero(&poly1305_state, sizeof poly1305_state); - $mac = $auth->finish(); - - # stored_mac = c + mlen; - # if (sodium_memcmp(mac, stored_mac, sizeof mac) != 0) { - # sodium_memzero(mac, sizeof mac); - # return -1; - # } - - $stored = ParagonIE_Sodium_Core_Util::substr($cipher, $msglen + 1, 16); - if (!ParagonIE_Sodium_Core_Util::hashEquals($mac, $stored)) { - return false; - } - - # crypto_stream_chacha20_ietf_xor_ic(m, c, mlen, state->nonce, 2U, state->k); - $out = ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - ParagonIE_Sodium_Core_Util::substr($cipher, 1, $msglen), - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core_Util::store64_le(2) - ); - - # XOR_BUF(STATE_INONCE(state), mac, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - $st->xorNonce($mac); - - # sodium_increment(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES); - $st->incrementCounter(); - - # if ((tag & crypto_secretstream_xchacha20poly1305_TAG_REKEY) != 0 || - # sodium_is_zero(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES)) { - # crypto_secretstream_xchacha20poly1305_rekey(state); - # } - - // Overwrite by reference: - $state = $st->toString(); - - /** @var bool $rekey */ - $rekey = ($tag & ParagonIE_Sodium_Compat::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY) !== 0; - if ($rekey || $st->needsRekey()) { - // DO REKEY - self::secretstream_xchacha20poly1305_rekey($state); - } - return array($out, $tag); - } - - /** - * @param string $state - * @return void - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_rekey(&$state) - { - $st = ParagonIE_Sodium_Core_SecretStream_State::fromString($state); - # unsigned char new_key_and_inonce[crypto_stream_chacha20_ietf_KEYBYTES + - # crypto_secretstream_xchacha20poly1305_INONCEBYTES]; - # size_t i; - # for (i = 0U; i < crypto_stream_chacha20_ietf_KEYBYTES; i++) { - # new_key_and_inonce[i] = state->k[i]; - # } - $new_key_and_inonce = $st->getKey(); - - # for (i = 0U; i < crypto_secretstream_xchacha20poly1305_INONCEBYTES; i++) { - # new_key_and_inonce[crypto_stream_chacha20_ietf_KEYBYTES + i] = - # STATE_INONCE(state)[i]; - # } - $new_key_and_inonce .= ParagonIE_Sodium_Core_Util::substR($st->getNonce(), 0, 8); - - # crypto_stream_chacha20_ietf_xor(new_key_and_inonce, new_key_and_inonce, - # sizeof new_key_and_inonce, - # state->nonce, state->k); - - $st->rekey(ParagonIE_Sodium_Core_ChaCha20::ietfStreamXorIc( - $new_key_and_inonce, - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core_Util::store64_le(0) - )); - - # for (i = 0U; i < crypto_stream_chacha20_ietf_KEYBYTES; i++) { - # state->k[i] = new_key_and_inonce[i]; - # } - # for (i = 0U; i < crypto_secretstream_xchacha20poly1305_INONCEBYTES; i++) { - # STATE_INONCE(state)[i] = - # new_key_and_inonce[crypto_stream_chacha20_ietf_KEYBYTES + i]; - # } - # _crypto_secretstream_xchacha20poly1305_counter_reset(state); - $st->counterReset(); - - $state = $st->toString(); - } - - /** - * Detached Ed25519 signature. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign_detached($message, $sk) - { - return ParagonIE_Sodium_Core_Ed25519::sign_detached($message, $sk); - } - - /** - * Attached Ed25519 signature. (Returns a signed message.) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign($message, $sk) - { - return ParagonIE_Sodium_Core_Ed25519::sign($message, $sk); - } - - /** - * Opens a signed message. If valid, returns the message. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $signedMessage - * @param string $pk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign_open($signedMessage, $pk) - { - return ParagonIE_Sodium_Core_Ed25519::sign_open($signedMessage, $pk); - } - - /** - * Verify a detached signature of a given message and public key. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $signature - * @param string $message - * @param string $pk - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function sign_verify_detached($signature, $message, $pk) - { - return ParagonIE_Sodium_Core_Ed25519::verify_detached($signature, $message, $pk); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Crypto32.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Crypto32.php deleted file mode 100644 index 7c43957d..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/Crypto32.php +++ /dev/null @@ -1,1655 +0,0 @@ -update($ad); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($adlen)); - $state->update($ciphertext); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($clen)); - $computed_mac = $state->finish(); - - /* Compare the given MAC with the recalculated MAC: */ - if (!ParagonIE_Sodium_Core32_Util::verify_16($computed_mac, $mac)) { - throw new SodiumException('Invalid MAC'); - } - - // Here, we know that the MAC is valid, so we decrypt and return the plaintext - return ParagonIE_Sodium_Core32_ChaCha20::streamXorIc( - $ciphertext, - $nonce, - $key, - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - } - - /** - * AEAD Encryption with ChaCha20-Poly1305 - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_chacha20poly1305_encrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - /** @var int $len - Length of the plaintext message */ - $len = ParagonIE_Sodium_Core32_Util::strlen($message); - - /** @var int $adlen - Length of the associated data */ - $adlen = ParagonIE_Sodium_Core32_Util::strlen($ad); - - /** @var string The first block of the chacha20 keystream, used as a poly1305 key */ - $block0 = ParagonIE_Sodium_Core32_ChaCha20::stream( - 32, - $nonce, - $key - ); - $state = new ParagonIE_Sodium_Core32_Poly1305_State($block0); - try { - ParagonIE_Sodium_Compat::memzero($block0); - } catch (SodiumException $ex) { - $block0 = null; - } - - /** @var string $ciphertext - Raw encrypted data */ - $ciphertext = ParagonIE_Sodium_Core32_ChaCha20::streamXorIc( - $message, - $nonce, - $key, - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - - $state->update($ad); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($adlen)); - $state->update($ciphertext); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($len)); - return $ciphertext . $state->finish(); - } - - /** - * AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_chacha20poly1305_ietf_decrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - /** @var int $adlen - Length of associated data */ - $adlen = ParagonIE_Sodium_Core32_Util::strlen($ad); - - /** @var int $len - Length of message (ciphertext + MAC) */ - $len = ParagonIE_Sodium_Core32_Util::strlen($message); - - /** @var int $clen - Length of ciphertext */ - $clen = $len - self::aead_chacha20poly1305_IETF_ABYTES; - - /** @var string The first block of the chacha20 keystream, used as a poly1305 key */ - $block0 = ParagonIE_Sodium_Core32_ChaCha20::ietfStream( - 32, - $nonce, - $key - ); - - /** @var string $mac - Message authentication code */ - $mac = ParagonIE_Sodium_Core32_Util::substr( - $message, - $len - self::aead_chacha20poly1305_IETF_ABYTES, - self::aead_chacha20poly1305_IETF_ABYTES - ); - - /** @var string $ciphertext - The encrypted message (sans MAC) */ - $ciphertext = ParagonIE_Sodium_Core32_Util::substr( - $message, - 0, - $len - self::aead_chacha20poly1305_IETF_ABYTES - ); - - /* Recalculate the Poly1305 authentication tag (MAC): */ - $state = new ParagonIE_Sodium_Core32_Poly1305_State($block0); - try { - ParagonIE_Sodium_Compat::memzero($block0); - } catch (SodiumException $ex) { - $block0 = null; - } - $state->update($ad); - $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf))); - $state->update($ciphertext); - $state->update(str_repeat("\x00", (0x10 - $clen) & 0xf)); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($adlen)); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($clen)); - $computed_mac = $state->finish(); - - /* Compare the given MAC with the recalculated MAC: */ - if (!ParagonIE_Sodium_Core32_Util::verify_16($computed_mac, $mac)) { - throw new SodiumException('Invalid MAC'); - } - - // Here, we know that the MAC is valid, so we decrypt and return the plaintext - return ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - $ciphertext, - $nonce, - $key, - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - } - - /** - * AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_chacha20poly1305_ietf_encrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - /** @var int $len - Length of the plaintext message */ - $len = ParagonIE_Sodium_Core32_Util::strlen($message); - - /** @var int $adlen - Length of the associated data */ - $adlen = ParagonIE_Sodium_Core32_Util::strlen($ad); - - /** @var string The first block of the chacha20 keystream, used as a poly1305 key */ - $block0 = ParagonIE_Sodium_Core32_ChaCha20::ietfStream( - 32, - $nonce, - $key - ); - $state = new ParagonIE_Sodium_Core32_Poly1305_State($block0); - try { - ParagonIE_Sodium_Compat::memzero($block0); - } catch (SodiumException $ex) { - $block0 = null; - } - - /** @var string $ciphertext - Raw encrypted data */ - $ciphertext = ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - $message, - $nonce, - $key, - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - - $state->update($ad); - $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf))); - $state->update($ciphertext); - $state->update(str_repeat("\x00", ((0x10 - $len) & 0xf))); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($adlen)); - $state->update(ParagonIE_Sodium_Core32_Util::store64_le($len)); - return $ciphertext . $state->finish(); - } - - /** - * AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_xchacha20poly1305_ietf_decrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - $subkey = ParagonIE_Sodium_Core32_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core32_Util::substr($nonce, 0, 16), - $key - ); - $nonceLast = "\x00\x00\x00\x00" . - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8); - - return self::aead_chacha20poly1305_ietf_decrypt($message, $ad, $nonceLast, $subkey); - } - - /** - * AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $ad - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function aead_xchacha20poly1305_ietf_encrypt( - $message = '', - $ad = '', - $nonce = '', - $key = '' - ) { - $subkey = ParagonIE_Sodium_Core32_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core32_Util::substr($nonce, 0, 16), - $key - ); - $nonceLast = "\x00\x00\x00\x00" . - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8); - - return self::aead_chacha20poly1305_ietf_encrypt($message, $ad, $nonceLast, $subkey); - } - - /** - * HMAC-SHA-512-256 (a.k.a. the leftmost 256 bits of HMAC-SHA-512) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $key - * @return string - * @throws TypeError - */ - public static function auth($message, $key) - { - return ParagonIE_Sodium_Core32_Util::substr( - hash_hmac('sha512', $message, $key, true), - 0, - 32 - ); - } - - /** - * HMAC-SHA-512-256 validation. Constant-time via hash_equals(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $mac - * @param string $message - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function auth_verify($mac, $message, $key) - { - return ParagonIE_Sodium_Core32_Util::hashEquals( - $mac, - self::auth($message, $key) - ); - } - - /** - * X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $plaintext - * @param string $nonce - * @param string $keypair - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box($plaintext, $nonce, $keypair) - { - return self::secretbox( - $plaintext, - $nonce, - self::box_beforenm( - self::box_secretkey($keypair), - self::box_publickey($keypair) - ) - ); - } - - /** - * X25519-XSalsa20-Poly1305 with one ephemeral X25519 keypair. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $publicKey - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_seal($message, $publicKey) - { - /** @var string $ephemeralKeypair */ - $ephemeralKeypair = self::box_keypair(); - - /** @var string $ephemeralSK */ - $ephemeralSK = self::box_secretkey($ephemeralKeypair); - - /** @var string $ephemeralPK */ - $ephemeralPK = self::box_publickey($ephemeralKeypair); - - /** @var string $nonce */ - $nonce = self::generichash( - $ephemeralPK . $publicKey, - '', - 24 - ); - - /** @var string $keypair - The combined keypair used in crypto_box() */ - $keypair = self::box_keypair_from_secretkey_and_publickey($ephemeralSK, $publicKey); - - /** @var string $ciphertext Ciphertext + MAC from crypto_box */ - $ciphertext = self::box($message, $nonce, $keypair); - try { - ParagonIE_Sodium_Compat::memzero($ephemeralKeypair); - ParagonIE_Sodium_Compat::memzero($ephemeralSK); - ParagonIE_Sodium_Compat::memzero($nonce); - } catch (SodiumException $ex) { - $ephemeralKeypair = null; - $ephemeralSK = null; - $nonce = null; - } - return $ephemeralPK . $ciphertext; - } - - /** - * Opens a message encrypted via box_seal(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $keypair - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_seal_open($message, $keypair) - { - /** @var string $ephemeralPK */ - $ephemeralPK = ParagonIE_Sodium_Core32_Util::substr($message, 0, 32); - - /** @var string $ciphertext (ciphertext + MAC) */ - $ciphertext = ParagonIE_Sodium_Core32_Util::substr($message, 32); - - /** @var string $secretKey */ - $secretKey = self::box_secretkey($keypair); - - /** @var string $publicKey */ - $publicKey = self::box_publickey($keypair); - - /** @var string $nonce */ - $nonce = self::generichash( - $ephemeralPK . $publicKey, - '', - 24 - ); - - /** @var string $keypair */ - $keypair = self::box_keypair_from_secretkey_and_publickey($secretKey, $ephemeralPK); - - /** @var string $m */ - $m = self::box_open($ciphertext, $nonce, $keypair); - try { - ParagonIE_Sodium_Compat::memzero($secretKey); - ParagonIE_Sodium_Compat::memzero($ephemeralPK); - ParagonIE_Sodium_Compat::memzero($nonce); - } catch (SodiumException $ex) { - $secretKey = null; - $ephemeralPK = null; - $nonce = null; - } - return $m; - } - - /** - * Used by crypto_box() to get the crypto_secretbox() key. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sk - * @param string $pk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_beforenm($sk, $pk) - { - return ParagonIE_Sodium_Core32_HSalsa20::hsalsa20( - str_repeat("\x00", 16), - self::scalarmult($sk, $pk) - ); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @return string - * @throws Exception - * @throws SodiumException - * @throws TypeError - */ - public static function box_keypair() - { - $sKey = random_bytes(32); - $pKey = self::scalarmult_base($sKey); - return $sKey . $pKey; - } - - /** - * @param string $seed - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_seed_keypair($seed) - { - $sKey = ParagonIE_Sodium_Core32_Util::substr( - hash('sha512', $seed, true), - 0, - 32 - ); - $pKey = self::scalarmult_base($sKey); - return $sKey . $pKey; - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sKey - * @param string $pKey - * @return string - * @throws TypeError - */ - public static function box_keypair_from_secretkey_and_publickey($sKey, $pKey) - { - return ParagonIE_Sodium_Core32_Util::substr($sKey, 0, 32) . - ParagonIE_Sodium_Core32_Util::substr($pKey, 0, 32); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $keypair - * @return string - * @throws RangeException - * @throws TypeError - */ - public static function box_secretkey($keypair) - { - if (ParagonIE_Sodium_Core32_Util::strlen($keypair) !== 64) { - throw new RangeException( - 'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES bytes long.' - ); - } - return ParagonIE_Sodium_Core32_Util::substr($keypair, 0, 32); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $keypair - * @return string - * @throws RangeException - * @throws TypeError - */ - public static function box_publickey($keypair) - { - if (ParagonIE_Sodium_Core32_Util::strlen($keypair) !== ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES) { - throw new RangeException( - 'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES bytes long.' - ); - } - return ParagonIE_Sodium_Core32_Util::substr($keypair, 32, 32); - } - - /** - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sKey - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function box_publickey_from_secretkey($sKey) - { - if (ParagonIE_Sodium_Core32_Util::strlen($sKey) !== ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES) { - throw new RangeException( - 'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES bytes long.' - ); - } - return self::scalarmult_base($sKey); - } - - /** - * Decrypt a message encrypted with box(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ciphertext - * @param string $nonce - * @param string $keypair - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function box_open($ciphertext, $nonce, $keypair) - { - return self::secretbox_open( - $ciphertext, - $nonce, - self::box_beforenm( - self::box_secretkey($keypair), - self::box_publickey($keypair) - ) - ); - } - - /** - * Calculate a BLAKE2b hash. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string|null $key - * @param int $outlen - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function generichash($message, $key = '', $outlen = 32) - { - // This ensures that ParagonIE_Sodium_Core32_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core32_BLAKE2b::pseudoConstructor(); - - $k = null; - if (!empty($key)) { - /** @var SplFixedArray $k */ - $k = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($key); - if ($k->count() > ParagonIE_Sodium_Core32_BLAKE2b::KEYBYTES) { - throw new RangeException('Invalid key size'); - } - } - - /** @var SplFixedArray $in */ - $in = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($message); - - /** @var SplFixedArray $ctx */ - $ctx = ParagonIE_Sodium_Core32_BLAKE2b::init($k, $outlen); - ParagonIE_Sodium_Core32_BLAKE2b::update($ctx, $in, $in->count()); - - /** @var SplFixedArray $out */ - $out = new SplFixedArray($outlen); - $out = ParagonIE_Sodium_Core32_BLAKE2b::finish($ctx, $out); - - /** @var array */ - $outArray = $out->toArray(); - return ParagonIE_Sodium_Core32_Util::intArrayToString($outArray); - } - - /** - * Finalize a BLAKE2b hashing context, returning the hash. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ctx - * @param int $outlen - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_final($ctx, $outlen = 32) - { - if (!is_string($ctx)) { - throw new TypeError('Context must be a string'); - } - $out = new SplFixedArray($outlen); - - /** @var SplFixedArray $context */ - $context = ParagonIE_Sodium_Core32_BLAKE2b::stringToContext($ctx); - - /** @var SplFixedArray $out */ - $out = ParagonIE_Sodium_Core32_BLAKE2b::finish($context, $out); - - /** @var array */ - $outArray = $out->toArray(); - return ParagonIE_Sodium_Core32_Util::intArrayToString($outArray); - } - - /** - * Initialize a hashing context for BLAKE2b. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $key - * @param int $outputLength - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_init($key = '', $outputLength = 32) - { - // This ensures that ParagonIE_Sodium_Core32_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core32_BLAKE2b::pseudoConstructor(); - - $k = null; - if (!empty($key)) { - $k = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($key); - if ($k->count() > ParagonIE_Sodium_Core32_BLAKE2b::KEYBYTES) { - throw new RangeException('Invalid key size'); - } - } - - /** @var SplFixedArray $ctx */ - $ctx = ParagonIE_Sodium_Core32_BLAKE2b::init($k, $outputLength); - - return ParagonIE_Sodium_Core32_BLAKE2b::contextToString($ctx); - } - - /** - * Initialize a hashing context for BLAKE2b. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $key - * @param int $outputLength - * @param string $salt - * @param string $personal - * @return string - * @throws RangeException - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_init_salt_personal( - $key = '', - $outputLength = 32, - $salt = '', - $personal = '' - ) { - // This ensures that ParagonIE_Sodium_Core32_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core32_BLAKE2b::pseudoConstructor(); - - $k = null; - if (!empty($key)) { - $k = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($key); - if ($k->count() > ParagonIE_Sodium_Core32_BLAKE2b::KEYBYTES) { - throw new RangeException('Invalid key size'); - } - } - if (!empty($salt)) { - $s = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($salt); - } else { - $s = null; - } - if (!empty($salt)) { - $p = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($personal); - } else { - $p = null; - } - - /** @var SplFixedArray $ctx */ - $ctx = ParagonIE_Sodium_Core32_BLAKE2b::init($k, $outputLength, $s, $p); - - return ParagonIE_Sodium_Core32_BLAKE2b::contextToString($ctx); - } - - /** - * Update a hashing context for BLAKE2b with $message - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ctx - * @param string $message - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function generichash_update($ctx, $message) - { - // This ensures that ParagonIE_Sodium_Core32_BLAKE2b::$iv is initialized - ParagonIE_Sodium_Core32_BLAKE2b::pseudoConstructor(); - - /** @var SplFixedArray $context */ - $context = ParagonIE_Sodium_Core32_BLAKE2b::stringToContext($ctx); - - /** @var SplFixedArray $in */ - $in = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($message); - - ParagonIE_Sodium_Core32_BLAKE2b::update($context, $in, $in->count()); - - return ParagonIE_Sodium_Core32_BLAKE2b::contextToString($context); - } - - /** - * Libsodium's crypto_kx(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $my_sk - * @param string $their_pk - * @param string $client_pk - * @param string $server_pk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function keyExchange($my_sk, $their_pk, $client_pk, $server_pk) - { - return self::generichash( - self::scalarmult($my_sk, $their_pk) . - $client_pk . - $server_pk - ); - } - - /** - * ECDH over Curve25519 - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $sKey - * @param string $pKey - * @return string - * - * @throws SodiumException - * @throws TypeError - */ - public static function scalarmult($sKey, $pKey) - { - $q = ParagonIE_Sodium_Core32_X25519::crypto_scalarmult_curve25519_ref10($sKey, $pKey); - self::scalarmult_throw_if_zero($q); - return $q; - } - - /** - * ECDH over Curve25519, using the basepoint. - * Used to get a secret key from a public key. - * - * @param string $secret - * @return string - * - * @throws SodiumException - * @throws TypeError - */ - public static function scalarmult_base($secret) - { - $q = ParagonIE_Sodium_Core32_X25519::crypto_scalarmult_curve25519_ref10_base($secret); - self::scalarmult_throw_if_zero($q); - return $q; - } - - /** - * This throws an Error if a zero public key was passed to the function. - * - * @param string $q - * @return void - * @throws SodiumException - * @throws TypeError - */ - protected static function scalarmult_throw_if_zero($q) - { - $d = 0; - for ($i = 0; $i < self::box_curve25519xsalsa20poly1305_SECRETKEYBYTES; ++$i) { - $d |= ParagonIE_Sodium_Core32_Util::chrToInt($q[$i]); - } - - /* branch-free variant of === 0 */ - if (-(1 & (($d - 1) >> 8))) { - throw new SodiumException('Zero public key is not allowed'); - } - } - - /** - * XSalsa20-Poly1305 authenticated symmetric-key encryption. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $plaintext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox($plaintext, $nonce, $key) - { - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core32_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $block0 */ - $block0 = str_repeat("\x00", 32); - - /** @var int $mlen - Length of the plaintext message */ - $mlen = ParagonIE_Sodium_Core32_Util::strlen($plaintext); - $mlen0 = $mlen; - if ($mlen0 > 64 - self::secretbox_xsalsa20poly1305_ZEROBYTES) { - $mlen0 = 64 - self::secretbox_xsalsa20poly1305_ZEROBYTES; - } - $block0 .= ParagonIE_Sodium_Core32_Util::substr($plaintext, 0, $mlen0); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core32_Salsa20::salsa20_xor( - $block0, - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - $subkey - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core32_Util::substr( - $block0, - self::secretbox_xsalsa20poly1305_ZEROBYTES - ); - if ($mlen > $mlen0) { - $c .= ParagonIE_Sodium_Core32_Salsa20::salsa20_xor_ic( - ParagonIE_Sodium_Core32_Util::substr( - $plaintext, - self::secretbox_xsalsa20poly1305_ZEROBYTES - ), - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - 1, - $subkey - ); - } - $state = new ParagonIE_Sodium_Core32_Poly1305_State( - ParagonIE_Sodium_Core32_Util::substr( - $block0, - 0, - self::onetimeauth_poly1305_KEYBYTES - ) - ); - try { - ParagonIE_Sodium_Compat::memzero($block0); - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $block0 = null; - $subkey = null; - } - - $state->update($c); - - /** @var string $c - MAC || ciphertext */ - $c = $state->finish() . $c; - unset($state); - - return $c; - } - - /** - * Decrypt a ciphertext generated via secretbox(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ciphertext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_open($ciphertext, $nonce, $key) - { - /** @var string $mac */ - $mac = ParagonIE_Sodium_Core32_Util::substr( - $ciphertext, - 0, - self::secretbox_xsalsa20poly1305_MACBYTES - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core32_Util::substr( - $ciphertext, - self::secretbox_xsalsa20poly1305_MACBYTES - ); - - /** @var int $clen */ - $clen = ParagonIE_Sodium_Core32_Util::strlen($c); - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core32_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core32_Salsa20::salsa20( - 64, - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - $subkey - ); - $verified = ParagonIE_Sodium_Core32_Poly1305::onetimeauth_verify( - $mac, - $c, - ParagonIE_Sodium_Core32_Util::substr($block0, 0, 32) - ); - if (!$verified) { - try { - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $subkey = null; - } - throw new SodiumException('Invalid MAC'); - } - - /** @var string $m - Decrypted message */ - $m = ParagonIE_Sodium_Core32_Util::xorStrings( - ParagonIE_Sodium_Core32_Util::substr($block0, self::secretbox_xsalsa20poly1305_ZEROBYTES), - ParagonIE_Sodium_Core32_Util::substr($c, 0, self::secretbox_xsalsa20poly1305_ZEROBYTES) - ); - if ($clen > self::secretbox_xsalsa20poly1305_ZEROBYTES) { - // We had more than 1 block, so let's continue to decrypt the rest. - $m .= ParagonIE_Sodium_Core32_Salsa20::salsa20_xor_ic( - ParagonIE_Sodium_Core32_Util::substr( - $c, - self::secretbox_xsalsa20poly1305_ZEROBYTES - ), - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - 1, - (string) $subkey - ); - } - return $m; - } - - /** - * XChaCha20-Poly1305 authenticated symmetric-key encryption. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $plaintext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_xchacha20poly1305($plaintext, $nonce, $key) - { - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core32_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core32_Util::substr($nonce, 0, 16), - $key - ); - $nonceLast = ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8); - - /** @var string $block0 */ - $block0 = str_repeat("\x00", 32); - - /** @var int $mlen - Length of the plaintext message */ - $mlen = ParagonIE_Sodium_Core32_Util::strlen($plaintext); - $mlen0 = $mlen; - if ($mlen0 > 64 - self::secretbox_xchacha20poly1305_ZEROBYTES) { - $mlen0 = 64 - self::secretbox_xchacha20poly1305_ZEROBYTES; - } - $block0 .= ParagonIE_Sodium_Core32_Util::substr($plaintext, 0, $mlen0); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core32_ChaCha20::streamXorIc( - $block0, - $nonceLast, - $subkey - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core32_Util::substr( - $block0, - self::secretbox_xchacha20poly1305_ZEROBYTES - ); - if ($mlen > $mlen0) { - $c .= ParagonIE_Sodium_Core32_ChaCha20::streamXorIc( - ParagonIE_Sodium_Core32_Util::substr( - $plaintext, - self::secretbox_xchacha20poly1305_ZEROBYTES - ), - $nonceLast, - $subkey, - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - } - $state = new ParagonIE_Sodium_Core32_Poly1305_State( - ParagonIE_Sodium_Core32_Util::substr( - $block0, - 0, - self::onetimeauth_poly1305_KEYBYTES - ) - ); - try { - ParagonIE_Sodium_Compat::memzero($block0); - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $block0 = null; - $subkey = null; - } - - $state->update($c); - - /** @var string $c - MAC || ciphertext */ - $c = $state->finish() . $c; - unset($state); - - return $c; - } - - /** - * Decrypt a ciphertext generated via secretbox_xchacha20poly1305(). - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $ciphertext - * @param string $nonce - * @param string $key - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key) - { - /** @var string $mac */ - $mac = ParagonIE_Sodium_Core32_Util::substr( - $ciphertext, - 0, - self::secretbox_xchacha20poly1305_MACBYTES - ); - - /** @var string $c */ - $c = ParagonIE_Sodium_Core32_Util::substr( - $ciphertext, - self::secretbox_xchacha20poly1305_MACBYTES - ); - - /** @var int $clen */ - $clen = ParagonIE_Sodium_Core32_Util::strlen($c); - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core32_HChaCha20::hchacha20($nonce, $key); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core32_ChaCha20::stream( - 64, - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - $subkey - ); - $verified = ParagonIE_Sodium_Core32_Poly1305::onetimeauth_verify( - $mac, - $c, - ParagonIE_Sodium_Core32_Util::substr($block0, 0, 32) - ); - - if (!$verified) { - try { - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $subkey = null; - } - throw new SodiumException('Invalid MAC'); - } - - /** @var string $m - Decrypted message */ - $m = ParagonIE_Sodium_Core32_Util::xorStrings( - ParagonIE_Sodium_Core32_Util::substr($block0, self::secretbox_xchacha20poly1305_ZEROBYTES), - ParagonIE_Sodium_Core32_Util::substr($c, 0, self::secretbox_xchacha20poly1305_ZEROBYTES) - ); - - if ($clen > self::secretbox_xchacha20poly1305_ZEROBYTES) { - // We had more than 1 block, so let's continue to decrypt the rest. - $m .= ParagonIE_Sodium_Core32_ChaCha20::streamXorIc( - ParagonIE_Sodium_Core32_Util::substr( - $c, - self::secretbox_xchacha20poly1305_ZEROBYTES - ), - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - (string) $subkey, - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - } - return $m; - } - - /** - * @param string $key - * @return array Returns a state and a header. - * @throws Exception - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_init_push($key) - { - # randombytes_buf(out, crypto_secretstream_xchacha20poly1305_HEADERBYTES); - $out = random_bytes(24); - - # crypto_core_hchacha20(state->k, out, k, NULL); - $subkey = ParagonIE_Sodium_Core32_HChaCha20::hChaCha20($out, $key); - $state = new ParagonIE_Sodium_Core32_SecretStream_State( - $subkey, - ParagonIE_Sodium_Core32_Util::substr($out, 16, 8) . str_repeat("\0", 4) - ); - - # _crypto_secretstream_xchacha20poly1305_counter_reset(state); - $state->counterReset(); - - # memcpy(STATE_INONCE(state), out + crypto_core_hchacha20_INPUTBYTES, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - # memset(state->_pad, 0, sizeof state->_pad); - return array( - $state->toString(), - $out - ); - } - - /** - * @param string $key - * @param string $header - * @return string Returns a state. - * @throws Exception - */ - public static function secretstream_xchacha20poly1305_init_pull($key, $header) - { - # crypto_core_hchacha20(state->k, in, k, NULL); - $subkey = ParagonIE_Sodium_Core32_HChaCha20::hChaCha20( - ParagonIE_Sodium_Core32_Util::substr($header, 0, 16), - $key - ); - $state = new ParagonIE_Sodium_Core32_SecretStream_State( - $subkey, - ParagonIE_Sodium_Core32_Util::substr($header, 16) - ); - $state->counterReset(); - # memcpy(STATE_INONCE(state), in + crypto_core_hchacha20_INPUTBYTES, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - # memset(state->_pad, 0, sizeof state->_pad); - # return 0; - return $state->toString(); - } - - /** - * @param string $state - * @param string $msg - * @param string $aad - * @param int $tag - * @return string - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_push(&$state, $msg, $aad = '', $tag = 0) - { - $st = ParagonIE_Sodium_Core32_SecretStream_State::fromString($state); - # crypto_onetimeauth_poly1305_state poly1305_state; - # unsigned char block[64U]; - # unsigned char slen[8U]; - # unsigned char *c; - # unsigned char *mac; - - $msglen = ParagonIE_Sodium_Core32_Util::strlen($msg); - $aadlen = ParagonIE_Sodium_Core32_Util::strlen($aad); - - if ((($msglen + 63) >> 6) > 0xfffffffe) { - throw new SodiumException( - 'message cannot be larger than SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX bytes' - ); - } - - # if (outlen_p != NULL) { - # *outlen_p = 0U; - # } - # if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX) { - # sodium_misuse(); - # } - - # crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k); - # crypto_onetimeauth_poly1305_init(&poly1305_state, block); - # sodium_memzero(block, sizeof block); - $auth = new ParagonIE_Sodium_Core32_Poly1305_State( - ParagonIE_Sodium_Core32_ChaCha20::ietfStream(32, $st->getCombinedNonce(), $st->getKey()) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, ad, adlen); - $auth->update($aad); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, _pad0, - # (0x10 - adlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - $aadlen) & 0xf))); - - # memset(block, 0, sizeof block); - # block[0] = tag; - # crypto_stream_chacha20_ietf_xor_ic(block, block, sizeof block, - # state->nonce, 1U, state->k); - $block = ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - ParagonIE_Sodium_Core32_Util::intToChr($tag) . str_repeat("\0", 63), - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, block, sizeof block); - $auth->update($block); - - # out[0] = block[0]; - $out = $block[0]; - # c = out + (sizeof tag); - # crypto_stream_chacha20_ietf_xor_ic(c, m, mlen, state->nonce, 2U, state->k); - $cipher = ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - $msg, - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core32_Util::store64_le(2) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, c, mlen); - $auth->update($cipher); - - $out .= $cipher; - unset($cipher); - - # crypto_onetimeauth_poly1305_update - # (&poly1305_state, _pad0, (0x10 - (sizeof block) + mlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - 64 + $msglen) & 0xf))); - - # STORE64_LE(slen, (uint64_t) adlen); - $slen = ParagonIE_Sodium_Core32_Util::store64_le($aadlen); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $auth->update($slen); - - # STORE64_LE(slen, (sizeof block) + mlen); - $slen = ParagonIE_Sodium_Core32_Util::store64_le(64 + $msglen); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $auth->update($slen); - - # mac = c + mlen; - # crypto_onetimeauth_poly1305_final(&poly1305_state, mac); - $mac = $auth->finish(); - $out .= $mac; - - # sodium_memzero(&poly1305_state, sizeof poly1305_state); - unset($auth); - - - # XOR_BUF(STATE_INONCE(state), mac, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - $st->xorNonce($mac); - - # sodium_increment(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES); - $st->incrementCounter(); - // Overwrite by reference: - $state = $st->toString(); - - /** @var bool $rekey */ - $rekey = ($tag & ParagonIE_Sodium_Compat::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY) !== 0; - # if ((tag & crypto_secretstream_xchacha20poly1305_TAG_REKEY) != 0 || - # sodium_is_zero(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES)) { - # crypto_secretstream_xchacha20poly1305_rekey(state); - # } - if ($rekey || $st->needsRekey()) { - // DO REKEY - self::secretstream_xchacha20poly1305_rekey($state); - } - # if (outlen_p != NULL) { - # *outlen_p = crypto_secretstream_xchacha20poly1305_ABYTES + mlen; - # } - return $out; - } - - /** - * @param string $state - * @param string $cipher - * @param string $aad - * @return bool|array{0: string, 1: int} - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_pull(&$state, $cipher, $aad = '') - { - $st = ParagonIE_Sodium_Core32_SecretStream_State::fromString($state); - - $cipherlen = ParagonIE_Sodium_Core32_Util::strlen($cipher); - # mlen = inlen - crypto_secretstream_xchacha20poly1305_ABYTES; - $msglen = $cipherlen - ParagonIE_Sodium_Compat::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES; - $aadlen = ParagonIE_Sodium_Core32_Util::strlen($aad); - - # if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX) { - # sodium_misuse(); - # } - if ((($msglen + 63) >> 6) > 0xfffffffe) { - throw new SodiumException( - 'message cannot be larger than SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX bytes' - ); - } - - # crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k); - # crypto_onetimeauth_poly1305_init(&poly1305_state, block); - # sodium_memzero(block, sizeof block); - $auth = new ParagonIE_Sodium_Core32_Poly1305_State( - ParagonIE_Sodium_Core32_ChaCha20::ietfStream(32, $st->getCombinedNonce(), $st->getKey()) - ); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, ad, adlen); - $auth->update($aad); - - # crypto_onetimeauth_poly1305_update(&poly1305_state, _pad0, - # (0x10 - adlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - $aadlen) & 0xf))); - - - # memset(block, 0, sizeof block); - # block[0] = in[0]; - # crypto_stream_chacha20_ietf_xor_ic(block, block, sizeof block, - # state->nonce, 1U, state->k); - $block = ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - $cipher[0] . str_repeat("\0", 63), - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core32_Util::store64_le(1) - ); - # tag = block[0]; - # block[0] = in[0]; - # crypto_onetimeauth_poly1305_update(&poly1305_state, block, sizeof block); - $tag = ParagonIE_Sodium_Core32_Util::chrToInt($block[0]); - $block[0] = $cipher[0]; - $auth->update($block); - - - # c = in + (sizeof tag); - # crypto_onetimeauth_poly1305_update(&poly1305_state, c, mlen); - $auth->update(ParagonIE_Sodium_Core32_Util::substr($cipher, 1, $msglen)); - - # crypto_onetimeauth_poly1305_update - # (&poly1305_state, _pad0, (0x10 - (sizeof block) + mlen) & 0xf); - $auth->update(str_repeat("\0", ((0x10 - 64 + $msglen) & 0xf))); - - # STORE64_LE(slen, (uint64_t) adlen); - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $slen = ParagonIE_Sodium_Core32_Util::store64_le($aadlen); - $auth->update($slen); - - # STORE64_LE(slen, (sizeof block) + mlen); - # crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); - $slen = ParagonIE_Sodium_Core32_Util::store64_le(64 + $msglen); - $auth->update($slen); - - # crypto_onetimeauth_poly1305_final(&poly1305_state, mac); - # sodium_memzero(&poly1305_state, sizeof poly1305_state); - $mac = $auth->finish(); - - # stored_mac = c + mlen; - # if (sodium_memcmp(mac, stored_mac, sizeof mac) != 0) { - # sodium_memzero(mac, sizeof mac); - # return -1; - # } - - $stored = ParagonIE_Sodium_Core32_Util::substr($cipher, $msglen + 1, 16); - if (!ParagonIE_Sodium_Core32_Util::hashEquals($mac, $stored)) { - return false; - } - - # crypto_stream_chacha20_ietf_xor_ic(m, c, mlen, state->nonce, 2U, state->k); - $out = ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - ParagonIE_Sodium_Core32_Util::substr($cipher, 1, $msglen), - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core32_Util::store64_le(2) - ); - - # XOR_BUF(STATE_INONCE(state), mac, - # crypto_secretstream_xchacha20poly1305_INONCEBYTES); - $st->xorNonce($mac); - - # sodium_increment(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES); - $st->incrementCounter(); - - # if ((tag & crypto_secretstream_xchacha20poly1305_TAG_REKEY) != 0 || - # sodium_is_zero(STATE_COUNTER(state), - # crypto_secretstream_xchacha20poly1305_COUNTERBYTES)) { - # crypto_secretstream_xchacha20poly1305_rekey(state); - # } - - // Overwrite by reference: - $state = $st->toString(); - - /** @var bool $rekey */ - $rekey = ($tag & ParagonIE_Sodium_Compat::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY) !== 0; - if ($rekey || $st->needsRekey()) { - // DO REKEY - self::secretstream_xchacha20poly1305_rekey($state); - } - return array($out, $tag); - } - - /** - * @param string $state - * @return void - * @throws SodiumException - */ - public static function secretstream_xchacha20poly1305_rekey(&$state) - { - $st = ParagonIE_Sodium_Core32_SecretStream_State::fromString($state); - # unsigned char new_key_and_inonce[crypto_stream_chacha20_ietf_KEYBYTES + - # crypto_secretstream_xchacha20poly1305_INONCEBYTES]; - # size_t i; - # for (i = 0U; i < crypto_stream_chacha20_ietf_KEYBYTES; i++) { - # new_key_and_inonce[i] = state->k[i]; - # } - $new_key_and_inonce = $st->getKey(); - - # for (i = 0U; i < crypto_secretstream_xchacha20poly1305_INONCEBYTES; i++) { - # new_key_and_inonce[crypto_stream_chacha20_ietf_KEYBYTES + i] = - # STATE_INONCE(state)[i]; - # } - $new_key_and_inonce .= ParagonIE_Sodium_Core32_Util::substR($st->getNonce(), 0, 8); - - # crypto_stream_chacha20_ietf_xor(new_key_and_inonce, new_key_and_inonce, - # sizeof new_key_and_inonce, - # state->nonce, state->k); - - $st->rekey(ParagonIE_Sodium_Core32_ChaCha20::ietfStreamXorIc( - $new_key_and_inonce, - $st->getCombinedNonce(), - $st->getKey(), - ParagonIE_Sodium_Core32_Util::store64_le(0) - )); - - # for (i = 0U; i < crypto_stream_chacha20_ietf_KEYBYTES; i++) { - # state->k[i] = new_key_and_inonce[i]; - # } - # for (i = 0U; i < crypto_secretstream_xchacha20poly1305_INONCEBYTES; i++) { - # STATE_INONCE(state)[i] = - # new_key_and_inonce[crypto_stream_chacha20_ietf_KEYBYTES + i]; - # } - # _crypto_secretstream_xchacha20poly1305_counter_reset(state); - $st->counterReset(); - - $state = $st->toString(); - } - - /** - * Detached Ed25519 signature. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign_detached($message, $sk) - { - return ParagonIE_Sodium_Core32_Ed25519::sign_detached($message, $sk); - } - - /** - * Attached Ed25519 signature. (Returns a signed message.) - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $message - * @param string $sk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign($message, $sk) - { - return ParagonIE_Sodium_Core32_Ed25519::sign($message, $sk); - } - - /** - * Opens a signed message. If valid, returns the message. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $signedMessage - * @param string $pk - * @return string - * @throws SodiumException - * @throws TypeError - */ - public static function sign_open($signedMessage, $pk) - { - return ParagonIE_Sodium_Core32_Ed25519::sign_open($signedMessage, $pk); - } - - /** - * Verify a detached signature of a given message and public key. - * - * @internal Do not use this directly. Use ParagonIE_Sodium_Compat. - * - * @param string $signature - * @param string $message - * @param string $pk - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function sign_verify_detached($signature, $message, $pk) - { - return ParagonIE_Sodium_Core32_Ed25519::verify_detached($signature, $message, $pk); - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/File.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/File.php deleted file mode 100644 index d60367a8..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/File.php +++ /dev/null @@ -1,1548 +0,0 @@ - ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MAX) { - throw new TypeError('Argument 2 must be at most CRYPTO_GENERICHASH_KEYBYTES_MAX bytes'); - } - } - if ($outputLength < ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MIN) { - throw new SodiumException('Argument 3 must be at least CRYPTO_GENERICHASH_BYTES_MIN'); - } - if ($outputLength > ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MAX) { - throw new SodiumException('Argument 3 must be at least CRYPTO_GENERICHASH_BYTES_MAX'); - } - - /** @var int $size */ - $size = filesize($filePath); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - - /** @var resource $fp */ - $fp = fopen($filePath, 'rb'); - if (!is_resource($fp)) { - throw new SodiumException('Could not open input file for reading'); - } - $ctx = ParagonIE_Sodium_Compat::crypto_generichash_init($key, $outputLength); - while ($size > 0) { - $blockSize = $size > 64 - ? 64 - : $size; - $read = fread($fp, $blockSize); - if (!is_string($read)) { - throw new SodiumException('Could not read input file'); - } - ParagonIE_Sodium_Compat::crypto_generichash_update($ctx, $read); - $size -= $blockSize; - } - - fclose($fp); - return ParagonIE_Sodium_Compat::crypto_generichash_final($ctx, $outputLength); - } - - /** - * Encrypt a file (rather than a string). Uses less memory than - * ParagonIE_Sodium_Compat::crypto_secretbox(), but produces - * the same result. - * - * @param string $inputFile Absolute path to a file on the filesystem - * @param string $outputFile Absolute path to a file on the filesystem - * @param string $nonce Number to be used only once - * @param string $key Encryption key - * - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox($inputFile, $outputFile, $nonce, $key) - { - /* Type checks: */ - if (!is_string($inputFile)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($inputFile) . ' given..'); - } - if (!is_string($outputFile)) { - throw new TypeError('Argument 2 must be a string, ' . gettype($outputFile) . ' given.'); - } - if (!is_string($nonce)) { - throw new TypeError('Argument 3 must be a string, ' . gettype($nonce) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($nonce) !== ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_NONCEBYTES) { - throw new TypeError('Argument 3 must be CRYPTO_SECRETBOX_NONCEBYTES bytes'); - } - if (!is_string($key)) { - throw new TypeError('Argument 4 must be a string, ' . gettype($key) . ' given.'); - } - if (self::strlen($key) !== ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_KEYBYTES) { - throw new TypeError('Argument 4 must be CRYPTO_SECRETBOX_KEYBYTES bytes'); - } - - /** @var int $size */ - $size = filesize($inputFile); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - - /** @var resource $ifp */ - $ifp = fopen($inputFile, 'rb'); - if (!is_resource($ifp)) { - throw new SodiumException('Could not open input file for reading'); - } - - /** @var resource $ofp */ - $ofp = fopen($outputFile, 'wb'); - if (!is_resource($ofp)) { - fclose($ifp); - throw new SodiumException('Could not open output file for writing'); - } - - $res = self::secretbox_encrypt($ifp, $ofp, $size, $nonce, $key); - fclose($ifp); - fclose($ofp); - return $res; - } - /** - * Seal a file (rather than a string). Uses less memory than - * ParagonIE_Sodium_Compat::crypto_secretbox_open(), but produces - * the same result. - * - * Warning: Does not protect against TOCTOU attacks. You should - * just load the file into memory and use crypto_secretbox_open() if - * you are worried about those. - * - * @param string $inputFile - * @param string $outputFile - * @param string $nonce - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - public static function secretbox_open($inputFile, $outputFile, $nonce, $key) - { - /* Type checks: */ - if (!is_string($inputFile)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($inputFile) . ' given.'); - } - if (!is_string($outputFile)) { - throw new TypeError('Argument 2 must be a string, ' . gettype($outputFile) . ' given.'); - } - if (!is_string($nonce)) { - throw new TypeError('Argument 3 must be a string, ' . gettype($nonce) . ' given.'); - } - if (!is_string($key)) { - throw new TypeError('Argument 4 must be a string, ' . gettype($key) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($nonce) !== ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_NONCEBYTES) { - throw new TypeError('Argument 4 must be CRYPTO_SECRETBOX_NONCEBYTES bytes'); - } - if (self::strlen($key) !== ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_KEYBYTES) { - throw new TypeError('Argument 4 must be CRYPTO_SECRETBOXBOX_KEYBYTES bytes'); - } - - /** @var int $size */ - $size = filesize($inputFile); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - - /** @var resource $ifp */ - $ifp = fopen($inputFile, 'rb'); - if (!is_resource($ifp)) { - throw new SodiumException('Could not open input file for reading'); - } - - /** @var resource $ofp */ - $ofp = fopen($outputFile, 'wb'); - if (!is_resource($ofp)) { - fclose($ifp); - throw new SodiumException('Could not open output file for writing'); - } - - $res = self::secretbox_decrypt($ifp, $ofp, $size, $nonce, $key); - fclose($ifp); - fclose($ofp); - try { - ParagonIE_Sodium_Compat::memzero($key); - } catch (SodiumException $ex) { - /** @psalm-suppress PossiblyUndefinedVariable */ - unset($key); - } - return $res; - } - - /** - * Sign a file (rather than a string). Uses less memory than - * ParagonIE_Sodium_Compat::crypto_sign_detached(), but produces - * the same result. - * - * @param string $filePath Absolute path to a file on the filesystem - * @param string $secretKey Secret signing key - * - * @return string Ed25519 signature - * @throws SodiumException - * @throws TypeError - */ - public static function sign($filePath, $secretKey) - { - /* Type checks: */ - if (!is_string($filePath)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($filePath) . ' given.'); - } - if (!is_string($secretKey)) { - throw new TypeError('Argument 2 must be a string, ' . gettype($secretKey) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($secretKey) !== ParagonIE_Sodium_Compat::CRYPTO_SIGN_SECRETKEYBYTES) { - throw new TypeError('Argument 2 must be CRYPTO_SIGN_SECRETKEYBYTES bytes'); - } - if (PHP_INT_SIZE === 4) { - return self::sign_core32($filePath, $secretKey); - } - - /** @var int $size */ - $size = filesize($filePath); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - - /** @var resource $fp */ - $fp = fopen($filePath, 'rb'); - if (!is_resource($fp)) { - throw new SodiumException('Could not open input file for reading'); - } - - /** @var string $az */ - $az = hash('sha512', self::substr($secretKey, 0, 32), true); - - $az[0] = self::intToChr(self::chrToInt($az[0]) & 248); - $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64); - - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($az, 32, 32)); - /** @var resource $hs */ - $hs = self::updateHashWithFile($hs, $fp, $size); - - /** @var string $nonceHash */ - $nonceHash = hash_final($hs, true); - - /** @var string $pk */ - $pk = self::substr($secretKey, 32, 32); - - /** @var string $nonce */ - $nonce = ParagonIE_Sodium_Core_Ed25519::sc_reduce($nonceHash) . self::substr($nonceHash, 32); - - /** @var string $sig */ - $sig = ParagonIE_Sodium_Core_Ed25519::ge_p3_tobytes( - ParagonIE_Sodium_Core_Ed25519::ge_scalarmult_base($nonce) - ); - - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($sig, 0, 32)); - self::hash_update($hs, self::substr($pk, 0, 32)); - /** @var resource $hs */ - $hs = self::updateHashWithFile($hs, $fp, $size); - - /** @var string $hramHash */ - $hramHash = hash_final($hs, true); - - /** @var string $hram */ - $hram = ParagonIE_Sodium_Core_Ed25519::sc_reduce($hramHash); - - /** @var string $sigAfter */ - $sigAfter = ParagonIE_Sodium_Core_Ed25519::sc_muladd($hram, $az, $nonce); - - /** @var string $sig */ - $sig = self::substr($sig, 0, 32) . self::substr($sigAfter, 0, 32); - - try { - ParagonIE_Sodium_Compat::memzero($az); - } catch (SodiumException $ex) { - $az = null; - } - fclose($fp); - return $sig; - } - - /** - * Verify a file (rather than a string). Uses less memory than - * ParagonIE_Sodium_Compat::crypto_sign_verify_detached(), but - * produces the same result. - * - * @param string $sig Ed25519 signature - * @param string $filePath Absolute path to a file on the filesystem - * @param string $publicKey Signing public key - * - * @return bool - * @throws SodiumException - * @throws TypeError - * @throws Exception - */ - public static function verify($sig, $filePath, $publicKey) - { - /* Type checks: */ - if (!is_string($sig)) { - throw new TypeError('Argument 1 must be a string, ' . gettype($sig) . ' given.'); - } - if (!is_string($filePath)) { - throw new TypeError('Argument 2 must be a string, ' . gettype($filePath) . ' given.'); - } - if (!is_string($publicKey)) { - throw new TypeError('Argument 3 must be a string, ' . gettype($publicKey) . ' given.'); - } - - /* Input validation: */ - if (self::strlen($sig) !== ParagonIE_Sodium_Compat::CRYPTO_SIGN_BYTES) { - throw new TypeError('Argument 1 must be CRYPTO_SIGN_BYTES bytes'); - } - if (self::strlen($publicKey) !== ParagonIE_Sodium_Compat::CRYPTO_SIGN_PUBLICKEYBYTES) { - throw new TypeError('Argument 3 must be CRYPTO_SIGN_PUBLICKEYBYTES bytes'); - } - if (self::strlen($sig) < 64) { - throw new SodiumException('Signature is too short'); - } - - if (PHP_INT_SIZE === 4) { - return self::verify_core32($sig, $filePath, $publicKey); - } - - /* Security checks */ - if ( - (ParagonIE_Sodium_Core_Ed25519::chrToInt($sig[63]) & 240) - && - ParagonIE_Sodium_Core_Ed25519::check_S_lt_L(self::substr($sig, 32, 32)) - ) { - throw new SodiumException('S < L - Invalid signature'); - } - if (ParagonIE_Sodium_Core_Ed25519::small_order($sig)) { - throw new SodiumException('Signature is on too small of an order'); - } - if ((self::chrToInt($sig[63]) & 224) !== 0) { - throw new SodiumException('Invalid signature'); - } - $d = 0; - for ($i = 0; $i < 32; ++$i) { - $d |= self::chrToInt($publicKey[$i]); - } - if ($d === 0) { - throw new SodiumException('All zero public key'); - } - - /** @var int $size */ - $size = filesize($filePath); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - - /** @var resource $fp */ - $fp = fopen($filePath, 'rb'); - if (!is_resource($fp)) { - throw new SodiumException('Could not open input file for reading'); - } - - /** @var bool The original value of ParagonIE_Sodium_Compat::$fastMult */ - $orig = ParagonIE_Sodium_Compat::$fastMult; - - // Set ParagonIE_Sodium_Compat::$fastMult to true to speed up verification. - ParagonIE_Sodium_Compat::$fastMult = true; - - /** @var ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A */ - $A = ParagonIE_Sodium_Core_Ed25519::ge_frombytes_negate_vartime($publicKey); - - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($sig, 0, 32)); - self::hash_update($hs, self::substr($publicKey, 0, 32)); - /** @var resource $hs */ - $hs = self::updateHashWithFile($hs, $fp, $size); - /** @var string $hDigest */ - $hDigest = hash_final($hs, true); - - /** @var string $h */ - $h = ParagonIE_Sodium_Core_Ed25519::sc_reduce($hDigest) . self::substr($hDigest, 32); - - /** @var ParagonIE_Sodium_Core_Curve25519_Ge_P2 $R */ - $R = ParagonIE_Sodium_Core_Ed25519::ge_double_scalarmult_vartime( - $h, - $A, - self::substr($sig, 32) - ); - - /** @var string $rcheck */ - $rcheck = ParagonIE_Sodium_Core_Ed25519::ge_tobytes($R); - - // Close the file handle - fclose($fp); - - // Reset ParagonIE_Sodium_Compat::$fastMult to what it was before. - ParagonIE_Sodium_Compat::$fastMult = $orig; - return self::verify_32($rcheck, self::substr($sig, 0, 32)); - } - - /** - * @param resource $ifp - * @param resource $ofp - * @param int $mlen - * @param string $nonce - * @param string $boxKeypair - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function box_encrypt($ifp, $ofp, $mlen, $nonce, $boxKeypair) - { - if (PHP_INT_SIZE === 4) { - return self::secretbox_encrypt( - $ifp, - $ofp, - $mlen, - $nonce, - ParagonIE_Sodium_Crypto32::box_beforenm( - ParagonIE_Sodium_Crypto32::box_secretkey($boxKeypair), - ParagonIE_Sodium_Crypto32::box_publickey($boxKeypair) - ) - ); - } - return self::secretbox_encrypt( - $ifp, - $ofp, - $mlen, - $nonce, - ParagonIE_Sodium_Crypto::box_beforenm( - ParagonIE_Sodium_Crypto::box_secretkey($boxKeypair), - ParagonIE_Sodium_Crypto::box_publickey($boxKeypair) - ) - ); - } - - - /** - * @param resource $ifp - * @param resource $ofp - * @param int $mlen - * @param string $nonce - * @param string $boxKeypair - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function box_decrypt($ifp, $ofp, $mlen, $nonce, $boxKeypair) - { - if (PHP_INT_SIZE === 4) { - return self::secretbox_decrypt( - $ifp, - $ofp, - $mlen, - $nonce, - ParagonIE_Sodium_Crypto32::box_beforenm( - ParagonIE_Sodium_Crypto32::box_secretkey($boxKeypair), - ParagonIE_Sodium_Crypto32::box_publickey($boxKeypair) - ) - ); - } - return self::secretbox_decrypt( - $ifp, - $ofp, - $mlen, - $nonce, - ParagonIE_Sodium_Crypto::box_beforenm( - ParagonIE_Sodium_Crypto::box_secretkey($boxKeypair), - ParagonIE_Sodium_Crypto::box_publickey($boxKeypair) - ) - ); - } - - /** - * Encrypt a file - * - * @param resource $ifp - * @param resource $ofp - * @param int $mlen - * @param string $nonce - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function secretbox_encrypt($ifp, $ofp, $mlen, $nonce, $key) - { - if (PHP_INT_SIZE === 4) { - return self::secretbox_encrypt_core32($ifp, $ofp, $mlen, $nonce, $key); - } - - $plaintext = fread($ifp, 32); - if (!is_string($plaintext)) { - throw new SodiumException('Could not read input file'); - } - $first32 = self::ftell($ifp); - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $realNonce */ - $realNonce = ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8); - - /** @var string $block0 */ - $block0 = str_repeat("\x00", 32); - - /** @var int $mlen - Length of the plaintext message */ - $mlen0 = $mlen; - if ($mlen0 > 64 - ParagonIE_Sodium_Crypto::secretbox_xsalsa20poly1305_ZEROBYTES) { - $mlen0 = 64 - ParagonIE_Sodium_Crypto::secretbox_xsalsa20poly1305_ZEROBYTES; - } - $block0 .= ParagonIE_Sodium_Core_Util::substr($plaintext, 0, $mlen0); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core_Salsa20::salsa20_xor( - $block0, - $realNonce, - $subkey - ); - - $state = new ParagonIE_Sodium_Core_Poly1305_State( - ParagonIE_Sodium_Core_Util::substr( - $block0, - 0, - ParagonIE_Sodium_Crypto::onetimeauth_poly1305_KEYBYTES - ) - ); - - // Pre-write 16 blank bytes for the Poly1305 tag - $start = self::ftell($ofp); - fwrite($ofp, str_repeat("\x00", 16)); - - /** @var string $c */ - $cBlock = ParagonIE_Sodium_Core_Util::substr( - $block0, - ParagonIE_Sodium_Crypto::secretbox_xsalsa20poly1305_ZEROBYTES - ); - $state->update($cBlock); - fwrite($ofp, $cBlock); - $mlen -= 32; - - /** @var int $iter */ - $iter = 1; - - /** @var int $incr */ - $incr = self::BUFFER_SIZE >> 6; - - /* - * Set the cursor to the end of the first half-block. All future bytes will - * generated from salsa20_xor_ic, starting from 1 (second block). - */ - fseek($ifp, $first32, SEEK_SET); - - while ($mlen > 0) { - $blockSize = $mlen > self::BUFFER_SIZE - ? self::BUFFER_SIZE - : $mlen; - $plaintext = fread($ifp, $blockSize); - if (!is_string($plaintext)) { - throw new SodiumException('Could not read input file'); - } - $cBlock = ParagonIE_Sodium_Core_Salsa20::salsa20_xor_ic( - $plaintext, - $realNonce, - $iter, - $subkey - ); - fwrite($ofp, $cBlock, $blockSize); - $state->update($cBlock); - - $mlen -= $blockSize; - $iter += $incr; - } - try { - ParagonIE_Sodium_Compat::memzero($block0); - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $block0 = null; - $subkey = null; - } - $end = self::ftell($ofp); - - /* - * Write the Poly1305 authentication tag that provides integrity - * over the ciphertext (encrypt-then-MAC) - */ - fseek($ofp, $start, SEEK_SET); - fwrite($ofp, $state->finish(), ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_MACBYTES); - fseek($ofp, $end, SEEK_SET); - unset($state); - - return true; - } - - /** - * Decrypt a file - * - * @param resource $ifp - * @param resource $ofp - * @param int $mlen - * @param string $nonce - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function secretbox_decrypt($ifp, $ofp, $mlen, $nonce, $key) - { - if (PHP_INT_SIZE === 4) { - return self::secretbox_decrypt_core32($ifp, $ofp, $mlen, $nonce, $key); - } - $tag = fread($ifp, 16); - if (!is_string($tag)) { - throw new SodiumException('Could not read input file'); - } - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $realNonce */ - $realNonce = ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core_Salsa20::salsa20( - 64, - ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8), - $subkey - ); - - /* Verify the Poly1305 MAC -before- attempting to decrypt! */ - $state = new ParagonIE_Sodium_Core_Poly1305_State(self::substr($block0, 0, 32)); - if (!self::onetimeauth_verify($state, $ifp, $tag, $mlen)) { - throw new SodiumException('Invalid MAC'); - } - - /* - * Set the cursor to the end of the first half-block. All future bytes will - * generated from salsa20_xor_ic, starting from 1 (second block). - */ - $first32 = fread($ifp, 32); - if (!is_string($first32)) { - throw new SodiumException('Could not read input file'); - } - $first32len = self::strlen($first32); - fwrite( - $ofp, - self::xorStrings( - self::substr($block0, 32, $first32len), - self::substr($first32, 0, $first32len) - ) - ); - $mlen -= 32; - - /** @var int $iter */ - $iter = 1; - - /** @var int $incr */ - $incr = self::BUFFER_SIZE >> 6; - - /* Decrypts ciphertext, writes to output file. */ - while ($mlen > 0) { - $blockSize = $mlen > self::BUFFER_SIZE - ? self::BUFFER_SIZE - : $mlen; - $ciphertext = fread($ifp, $blockSize); - if (!is_string($ciphertext)) { - throw new SodiumException('Could not read input file'); - } - $pBlock = ParagonIE_Sodium_Core_Salsa20::salsa20_xor_ic( - $ciphertext, - $realNonce, - $iter, - $subkey - ); - fwrite($ofp, $pBlock, $blockSize); - $mlen -= $blockSize; - $iter += $incr; - } - return true; - } - - /** - * @param ParagonIE_Sodium_Core_Poly1305_State $state - * @param resource $ifp - * @param string $tag - * @param int $mlen - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function onetimeauth_verify( - ParagonIE_Sodium_Core_Poly1305_State $state, - $ifp, - $tag = '', - $mlen = 0 - ) { - /** @var int $pos */ - $pos = self::ftell($ifp); - - /** @var int $iter */ - $iter = 1; - - /** @var int $incr */ - $incr = self::BUFFER_SIZE >> 6; - - while ($mlen > 0) { - $blockSize = $mlen > self::BUFFER_SIZE - ? self::BUFFER_SIZE - : $mlen; - $ciphertext = fread($ifp, $blockSize); - if (!is_string($ciphertext)) { - throw new SodiumException('Could not read input file'); - } - $state->update($ciphertext); - $mlen -= $blockSize; - $iter += $incr; - } - $res = ParagonIE_Sodium_Core_Util::verify_16($tag, $state->finish()); - - fseek($ifp, $pos, SEEK_SET); - return $res; - } - - /** - * Update a hash context with the contents of a file, without - * loading the entire file into memory. - * - * @param resource|HashContext $hash - * @param resource $fp - * @param int $size - * @return resource|object Resource on PHP < 7.2, HashContext object on PHP >= 7.2 - * @throws SodiumException - * @throws TypeError - * @psalm-suppress PossiblyInvalidArgument - * PHP 7.2 changes from a resource to an object, - * which causes Psalm to complain about an error. - * @psalm-suppress TypeCoercion - * Ditto. - */ - public static function updateHashWithFile($hash, $fp, $size = 0) - { - /* Type checks: */ - if (PHP_VERSION_ID < 70200) { - if (!is_resource($hash)) { - throw new TypeError('Argument 1 must be a resource, ' . gettype($hash) . ' given.'); - } - } else { - if (!is_object($hash)) { - throw new TypeError('Argument 1 must be an object (PHP 7.2+), ' . gettype($hash) . ' given.'); - } - } - - if (!is_resource($fp)) { - throw new TypeError('Argument 2 must be a resource, ' . gettype($fp) . ' given.'); - } - if (!is_int($size)) { - throw new TypeError('Argument 3 must be an integer, ' . gettype($size) . ' given.'); - } - - /** @var int $originalPosition */ - $originalPosition = self::ftell($fp); - - // Move file pointer to beginning of file - fseek($fp, 0, SEEK_SET); - for ($i = 0; $i < $size; $i += self::BUFFER_SIZE) { - /** @var string|bool $message */ - $message = fread( - $fp, - ($size - $i) > self::BUFFER_SIZE - ? $size - $i - : self::BUFFER_SIZE - ); - if (!is_string($message)) { - throw new SodiumException('Unexpected error reading from file.'); - } - /** @var string $message */ - /** @psalm-suppress InvalidArgument */ - self::hash_update($hash, $message); - } - // Reset file pointer's position - fseek($fp, $originalPosition, SEEK_SET); - return $hash; - } - - /** - * Sign a file (rather than a string). Uses less memory than - * ParagonIE_Sodium_Compat::crypto_sign_detached(), but produces - * the same result. (32-bit) - * - * @param string $filePath Absolute path to a file on the filesystem - * @param string $secretKey Secret signing key - * - * @return string Ed25519 signature - * @throws SodiumException - * @throws TypeError - */ - private static function sign_core32($filePath, $secretKey) - { - $size = filesize($filePath); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - - $fp = fopen($filePath, 'rb'); - if (!is_resource($fp)) { - throw new SodiumException('Could not open input file for reading'); - } - - /** @var string $az */ - $az = hash('sha512', self::substr($secretKey, 0, 32), true); - - $az[0] = self::intToChr(self::chrToInt($az[0]) & 248); - $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64); - - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($az, 32, 32)); - /** @var resource $hs */ - $hs = self::updateHashWithFile($hs, $fp, $size); - - $nonceHash = hash_final($hs, true); - $pk = self::substr($secretKey, 32, 32); - $nonce = ParagonIE_Sodium_Core32_Ed25519::sc_reduce($nonceHash) . self::substr($nonceHash, 32); - $sig = ParagonIE_Sodium_Core32_Ed25519::ge_p3_tobytes( - ParagonIE_Sodium_Core32_Ed25519::ge_scalarmult_base($nonce) - ); - - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($sig, 0, 32)); - self::hash_update($hs, self::substr($pk, 0, 32)); - /** @var resource $hs */ - $hs = self::updateHashWithFile($hs, $fp, $size); - - $hramHash = hash_final($hs, true); - - $hram = ParagonIE_Sodium_Core32_Ed25519::sc_reduce($hramHash); - - $sigAfter = ParagonIE_Sodium_Core32_Ed25519::sc_muladd($hram, $az, $nonce); - - /** @var string $sig */ - $sig = self::substr($sig, 0, 32) . self::substr($sigAfter, 0, 32); - - try { - ParagonIE_Sodium_Compat::memzero($az); - } catch (SodiumException $ex) { - $az = null; - } - fclose($fp); - return $sig; - } - - /** - * - * Verify a file (rather than a string). Uses less memory than - * ParagonIE_Sodium_Compat::crypto_sign_verify_detached(), but - * produces the same result. (32-bit) - * - * @param string $sig Ed25519 signature - * @param string $filePath Absolute path to a file on the filesystem - * @param string $publicKey Signing public key - * - * @return bool - * @throws SodiumException - * @throws Exception - */ - public static function verify_core32($sig, $filePath, $publicKey) - { - /* Security checks */ - if (ParagonIE_Sodium_Core32_Ed25519::check_S_lt_L(self::substr($sig, 32, 32))) { - throw new SodiumException('S < L - Invalid signature'); - } - if (ParagonIE_Sodium_Core32_Ed25519::small_order($sig)) { - throw new SodiumException('Signature is on too small of an order'); - } - - if ((self::chrToInt($sig[63]) & 224) !== 0) { - throw new SodiumException('Invalid signature'); - } - $d = 0; - for ($i = 0; $i < 32; ++$i) { - $d |= self::chrToInt($publicKey[$i]); - } - if ($d === 0) { - throw new SodiumException('All zero public key'); - } - - /** @var int|bool $size */ - $size = filesize($filePath); - if (!is_int($size)) { - throw new SodiumException('Could not obtain the file size'); - } - /** @var int $size */ - - /** @var resource|bool $fp */ - $fp = fopen($filePath, 'rb'); - if (!is_resource($fp)) { - throw new SodiumException('Could not open input file for reading'); - } - /** @var resource $fp */ - - /** @var bool The original value of ParagonIE_Sodium_Compat::$fastMult */ - $orig = ParagonIE_Sodium_Compat::$fastMult; - - // Set ParagonIE_Sodium_Compat::$fastMult to true to speed up verification. - ParagonIE_Sodium_Compat::$fastMult = true; - - /** @var ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A */ - $A = ParagonIE_Sodium_Core32_Ed25519::ge_frombytes_negate_vartime($publicKey); - - $hs = hash_init('sha512'); - self::hash_update($hs, self::substr($sig, 0, 32)); - self::hash_update($hs, self::substr($publicKey, 0, 32)); - /** @var resource $hs */ - $hs = self::updateHashWithFile($hs, $fp, $size); - /** @var string $hDigest */ - $hDigest = hash_final($hs, true); - - /** @var string $h */ - $h = ParagonIE_Sodium_Core32_Ed25519::sc_reduce($hDigest) . self::substr($hDigest, 32); - - /** @var ParagonIE_Sodium_Core32_Curve25519_Ge_P2 $R */ - $R = ParagonIE_Sodium_Core32_Ed25519::ge_double_scalarmult_vartime( - $h, - $A, - self::substr($sig, 32) - ); - - /** @var string $rcheck */ - $rcheck = ParagonIE_Sodium_Core32_Ed25519::ge_tobytes($R); - - // Close the file handle - fclose($fp); - - // Reset ParagonIE_Sodium_Compat::$fastMult to what it was before. - ParagonIE_Sodium_Compat::$fastMult = $orig; - return self::verify_32($rcheck, self::substr($sig, 0, 32)); - } - - /** - * Encrypt a file (32-bit) - * - * @param resource $ifp - * @param resource $ofp - * @param int $mlen - * @param string $nonce - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function secretbox_encrypt_core32($ifp, $ofp, $mlen, $nonce, $key) - { - $plaintext = fread($ifp, 32); - if (!is_string($plaintext)) { - throw new SodiumException('Could not read input file'); - } - $first32 = self::ftell($ifp); - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core32_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $realNonce */ - $realNonce = ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8); - - /** @var string $block0 */ - $block0 = str_repeat("\x00", 32); - - /** @var int $mlen - Length of the plaintext message */ - $mlen0 = $mlen; - if ($mlen0 > 64 - ParagonIE_Sodium_Crypto::secretbox_xsalsa20poly1305_ZEROBYTES) { - $mlen0 = 64 - ParagonIE_Sodium_Crypto::secretbox_xsalsa20poly1305_ZEROBYTES; - } - $block0 .= ParagonIE_Sodium_Core32_Util::substr($plaintext, 0, $mlen0); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core32_Salsa20::salsa20_xor( - $block0, - $realNonce, - $subkey - ); - - $state = new ParagonIE_Sodium_Core32_Poly1305_State( - ParagonIE_Sodium_Core32_Util::substr( - $block0, - 0, - ParagonIE_Sodium_Crypto::onetimeauth_poly1305_KEYBYTES - ) - ); - - // Pre-write 16 blank bytes for the Poly1305 tag - $start = self::ftell($ofp); - fwrite($ofp, str_repeat("\x00", 16)); - - /** @var string $c */ - $cBlock = ParagonIE_Sodium_Core32_Util::substr( - $block0, - ParagonIE_Sodium_Crypto::secretbox_xsalsa20poly1305_ZEROBYTES - ); - $state->update($cBlock); - fwrite($ofp, $cBlock); - $mlen -= 32; - - /** @var int $iter */ - $iter = 1; - - /** @var int $incr */ - $incr = self::BUFFER_SIZE >> 6; - - /* - * Set the cursor to the end of the first half-block. All future bytes will - * generated from salsa20_xor_ic, starting from 1 (second block). - */ - fseek($ifp, $first32, SEEK_SET); - - while ($mlen > 0) { - $blockSize = $mlen > self::BUFFER_SIZE - ? self::BUFFER_SIZE - : $mlen; - $plaintext = fread($ifp, $blockSize); - if (!is_string($plaintext)) { - throw new SodiumException('Could not read input file'); - } - $cBlock = ParagonIE_Sodium_Core32_Salsa20::salsa20_xor_ic( - $plaintext, - $realNonce, - $iter, - $subkey - ); - fwrite($ofp, $cBlock, $blockSize); - $state->update($cBlock); - - $mlen -= $blockSize; - $iter += $incr; - } - try { - ParagonIE_Sodium_Compat::memzero($block0); - ParagonIE_Sodium_Compat::memzero($subkey); - } catch (SodiumException $ex) { - $block0 = null; - $subkey = null; - } - $end = self::ftell($ofp); - - /* - * Write the Poly1305 authentication tag that provides integrity - * over the ciphertext (encrypt-then-MAC) - */ - fseek($ofp, $start, SEEK_SET); - fwrite($ofp, $state->finish(), ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_MACBYTES); - fseek($ofp, $end, SEEK_SET); - unset($state); - - return true; - } - - /** - * Decrypt a file (32-bit) - * - * @param resource $ifp - * @param resource $ofp - * @param int $mlen - * @param string $nonce - * @param string $key - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function secretbox_decrypt_core32($ifp, $ofp, $mlen, $nonce, $key) - { - $tag = fread($ifp, 16); - if (!is_string($tag)) { - throw new SodiumException('Could not read input file'); - } - - /** @var string $subkey */ - $subkey = ParagonIE_Sodium_Core32_HSalsa20::hsalsa20($nonce, $key); - - /** @var string $realNonce */ - $realNonce = ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8); - - /** @var string $block0 */ - $block0 = ParagonIE_Sodium_Core32_Salsa20::salsa20( - 64, - ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8), - $subkey - ); - - /* Verify the Poly1305 MAC -before- attempting to decrypt! */ - $state = new ParagonIE_Sodium_Core32_Poly1305_State(self::substr($block0, 0, 32)); - if (!self::onetimeauth_verify_core32($state, $ifp, $tag, $mlen)) { - throw new SodiumException('Invalid MAC'); - } - - /* - * Set the cursor to the end of the first half-block. All future bytes will - * generated from salsa20_xor_ic, starting from 1 (second block). - */ - $first32 = fread($ifp, 32); - if (!is_string($first32)) { - throw new SodiumException('Could not read input file'); - } - $first32len = self::strlen($first32); - fwrite( - $ofp, - self::xorStrings( - self::substr($block0, 32, $first32len), - self::substr($first32, 0, $first32len) - ) - ); - $mlen -= 32; - - /** @var int $iter */ - $iter = 1; - - /** @var int $incr */ - $incr = self::BUFFER_SIZE >> 6; - - /* Decrypts ciphertext, writes to output file. */ - while ($mlen > 0) { - $blockSize = $mlen > self::BUFFER_SIZE - ? self::BUFFER_SIZE - : $mlen; - $ciphertext = fread($ifp, $blockSize); - if (!is_string($ciphertext)) { - throw new SodiumException('Could not read input file'); - } - $pBlock = ParagonIE_Sodium_Core32_Salsa20::salsa20_xor_ic( - $ciphertext, - $realNonce, - $iter, - $subkey - ); - fwrite($ofp, $pBlock, $blockSize); - $mlen -= $blockSize; - $iter += $incr; - } - return true; - } - - /** - * One-time message authentication for 32-bit systems - * - * @param ParagonIE_Sodium_Core32_Poly1305_State $state - * @param resource $ifp - * @param string $tag - * @param int $mlen - * @return bool - * @throws SodiumException - * @throws TypeError - */ - protected static function onetimeauth_verify_core32( - ParagonIE_Sodium_Core32_Poly1305_State $state, - $ifp, - $tag = '', - $mlen = 0 - ) { - /** @var int $pos */ - $pos = self::ftell($ifp); - - while ($mlen > 0) { - $blockSize = $mlen > self::BUFFER_SIZE - ? self::BUFFER_SIZE - : $mlen; - $ciphertext = fread($ifp, $blockSize); - if (!is_string($ciphertext)) { - throw new SodiumException('Could not read input file'); - } - $state->update($ciphertext); - $mlen -= $blockSize; - } - $res = ParagonIE_Sodium_Core32_Util::verify_16($tag, $state->finish()); - - fseek($ifp, $pos, SEEK_SET); - return $res; - } - - /** - * @param resource $resource - * @return int - * @throws SodiumException - */ - private static function ftell($resource) - { - $return = ftell($resource); - if (!is_int($return)) { - throw new SodiumException('ftell() returned false'); - } - return (int) $return; - } -} diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/PHP52/SplFixedArray.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/PHP52/SplFixedArray.php deleted file mode 100644 index 10e303e2..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/PHP52/SplFixedArray.php +++ /dev/null @@ -1,190 +0,0 @@ - */ - private $internalArray = array(); - - /** @var int $size */ - private $size = 0; - - /** - * SplFixedArray constructor. - * @param int $size - */ - public function __construct($size = 0) - { - $this->size = $size; - $this->internalArray = array(); - } - - /** - * @return int - */ - public function count() - { - return count($this->internalArray); - } - - /** - * @return array - */ - public function toArray() - { - ksort($this->internalArray); - return (array) $this->internalArray; - } - - /** - * @param array $array - * @param bool $save_indexes - * @return SplFixedArray - * @psalm-suppress MixedAssignment - */ - public static function fromArray(array $array, $save_indexes = true) - { - $self = new SplFixedArray(count($array)); - if($save_indexes) { - foreach($array as $key => $value) { - $self[(int) $key] = $value; - } - } else { - $i = 0; - foreach (array_values($array) as $value) { - $self[$i] = $value; - $i++; - } - } - return $self; - } - - /** - * @return int - */ - public function getSize() - { - return $this->size; - } - - /** - * @param int $size - * @return bool - */ - public function setSize($size) - { - $this->size = $size; - return true; - } - - /** - * @param string|int $index - * @return bool - */ - public function offsetExists($index) - { - return array_key_exists((int) $index, $this->internalArray); - } - - /** - * @param string|int $index - * @return mixed - */ - public function offsetGet($index) - { - /** @psalm-suppress MixedReturnStatement */ - return $this->internalArray[(int) $index]; - } - - /** - * @param string|int $index - * @param mixed $newval - * @psalm-suppress MixedAssignment - */ - public function offsetSet($index, $newval) - { - $this->internalArray[(int) $index] = $newval; - } - - /** - * @param string|int $index - */ - public function offsetUnset($index) - { - unset($this->internalArray[(int) $index]); - } - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/splfixedarray.rewind.php - * @return void - * @since 5.3.0 - */ - public function rewind() - { - reset($this->internalArray); - } - - /** - * Return current array entry - * @link https://php.net/manual/en/splfixedarray.current.php - * @return mixed The current element value. - * @since 5.3.0 - */ - public function current() - { - /** @psalm-suppress MixedReturnStatement */ - return current($this->internalArray); - } - - /** - * Return current array index - * @return int The current array index. - */ - public function key() - { - return key($this->internalArray); - } - - /** - * @return void - */ - public function next() - { - next($this->internalArray); - } - - /** - * Check whether the array contains more elements - * @link https://php.net/manual/en/splfixedarray.valid.php - * @return bool true if the array contains any more elements, false otherwise. - */ - public function valid() - { - if (empty($this->internalArray)) { - return false; - } - $result = next($this->internalArray) !== false; - prev($this->internalArray); - return $result; - } - - /** - * Do nothing. - */ - public function __wakeup() - { - // NOP - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/SodiumException.php b/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/SodiumException.php deleted file mode 100644 index 8c4ccc51..00000000 --- a/wp/wp-content/plugins/wordfence/crypto/vendor/paragonie/sodium_compat/src/SodiumException.php +++ /dev/null @@ -1,12 +0,0 @@ - div { display:inline-block; margin:0; } -.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before, -.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before { content:':'; display:inline-block; } -.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before, -.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before { content:'.'; display:inline-block; } -.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide, -.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; } \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/css/jquery-ui.min.1704213472.css b/wp/wp-content/plugins/wordfence/css/jquery-ui.min.1704213472.css deleted file mode 100644 index 215c7fbf..00000000 --- a/wp/wp-content/plugins/wordfence/css/jquery-ui.min.1704213472.css +++ /dev/null @@ -1,7 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2018-06-29 -* http://jqueryui.com -* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/css/jquery-ui.structure.min.1704213472.css b/wp/wp-content/plugins/wordfence/css/jquery-ui.structure.min.1704213472.css deleted file mode 100644 index b48514a9..00000000 --- a/wp/wp-content/plugins/wordfence/css/jquery-ui.structure.min.1704213472.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2018-06-29 -* http://jqueryui.com -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/css/jquery-ui.theme.min.1704213472.css b/wp/wp-content/plugins/wordfence/css/jquery-ui.theme.min.1704213472.css deleted file mode 100644 index d8cb9002..00000000 --- a/wp/wp-content/plugins/wordfence/css/jquery-ui.theme.min.1704213472.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2018-06-29 -* http://jqueryui.com -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/css/license/care-global.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/care-global.1704213472.css deleted file mode 100644 index 5f5ce985..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/care-global.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{color:#29957C}.wf-btn-default{color:#29957C;background-color:#fff;border-color:#29957C}.wf-btn-default:focus,.wf-btn-default.focus{color:#29957C;background-color:#e6e6e6;border-color:#0d3129}.wf-btn-default:hover{color:#29957C;background-color:#e6e6e6;border-color:#1c6554}.wf-btn-default:active,.wf-btn-default.active,.wf-open>.wf-btn-default.wf-dropdown-toggle{color:#29957C;background-color:#e6e6e6;border-color:#1c6554}.wf-btn-default:active:hover,.wf-btn-default:active:focus,.wf-btn-default:active.focus,.wf-btn-default.active:hover,.wf-btn-default.active:focus,.wf-btn-default.active.focus,.wf-open>.wf-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-btn-default.wf-dropdown-toggle.focus{color:#29957C;background-color:#d4d4d4;border-color:#0d3129}.wf-btn-default:active,.wf-btn-default.wf-active,.wf-open>.wf-btn-default.wf-dropdown-toggle{background-image:none}.wf-btn-default.wf-disabled,.wf-btn-default[disabled],.wf-btn-default[readonly],fieldset[disabled] .wf-btn-default{color:#54BF9C;background-color:#fff;border-color:#54BF9C;cursor:not-allowed}.wf-btn-default.wf-disabled:hover,.wf-btn-default.wf-disabled:focus,.wf-btn-default.wf-disabled.wf-focus,.wf-btn-default[disabled]:hover,.wf-btn-default[disabled]:focus,.wf-btn-default[disabled].wf-focus,.wf-btn-default[readonly]:hover,.wf-btn-default[readonly]:focus,.wf-btn-default[readonly].wf-focus,fieldset[disabled] .wf-btn-default:hover,fieldset[disabled] .wf-btn-default:focus,fieldset[disabled] .wf-btn-default.wf-focus{background-color:#fff;border-color:#29957C}.wf-btn-default .wf-badge{color:#fff;background-color:#29957C}.wf-btn-primary{color:#fff;background-color:#29957C;border-color:#005e85}.wf-btn-primary:focus,.wf-btn-primary.focus{color:#fff;background-color:#1e6d5b;border-color:#000405}.wf-btn-primary:hover{color:#fff;background-color:#1e6d5b;border-color:#003347}.wf-btn-primary:active,.wf-btn-primary.active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{color:#fff;background-color:#1e6d5b;border-color:#003347}.wf-btn-primary:active:hover,.wf-btn-primary:active:focus,.wf-btn-primary:active.focus,.wf-btn-primary.active:hover,.wf-btn-primary.active:focus,.wf-btn-primary.active.focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle.focus{color:#fff;background-color:#165143;border-color:#000405}.wf-btn-primary:active,.wf-btn-primary.wf-active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{background-image:none}.wf-btn-primary.wf-disabled,.wf-btn-primary[disabled],.wf-btn-primary[readonly],fieldset[disabled] .wf-btn-primary{color:#fff;background-color:#54BF9C;border-color:#5996b0;cursor:not-allowed}.wf-btn-primary.wf-disabled:hover,.wf-btn-primary.wf-disabled:focus,.wf-btn-primary.wf-disabled.wf-focus,.wf-btn-primary[disabled]:hover,.wf-btn-primary[disabled]:focus,.wf-btn-primary[disabled].wf-focus,.wf-btn-primary[readonly]:hover,.wf-btn-primary[readonly]:focus,.wf-btn-primary[readonly].wf-focus,fieldset[disabled] .wf-btn-primary:hover,fieldset[disabled] .wf-btn-primary:focus,fieldset[disabled] .wf-btn-primary.wf-focus{background-color:#29957C;border-color:#005e85}.wf-btn-primary .wf-badge{color:#29957C;background-color:#fff}.wf-btn-link{color:#29957C}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{background-color:#29957C;border-color:#29957C}#wf-onboarding-dismiss:hover{color:#29957C}.wf-onboarding-btn:hover,.wf-onboarding-btn:focus,.wf-onboarding-btn.wf-focus{color:#29957C}.wf-onboarding-btn.wf-onboarding-btn-primary{background-color:#29957C}.wf-onboarding-btn.wf-onboarding-btn-primary:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.focus{background-color:#1e6d5b}.wf-onboarding-btn.wf-onboarding-btn-primary:hover{background-color:#1e6d5b}.wf-onboarding-btn.wf-onboarding-btn-primary:active,.wf-onboarding-btn.wf-onboarding-btn-primary.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle{background-color:#1e6d5b}.wf-onboarding-btn.wf-onboarding-btn-primary:active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary:active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary:active.focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle.focus{background-color:#165143}.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary.wf-focus{background-color:#29957C}.wf-onboarding-btn.wf-onboarding-btn-primary .wf-badge{color:#29957C}.wf-onboarding-btn.wf-onboarding-btn-default{color:#29957C;border-color:#29957C}.wf-onboarding-btn.wf-onboarding-btn-default:focus,.wf-onboarding-btn.wf-onboarding-btn-default.focus{color:#29957C;border-color:#0d3129}.wf-onboarding-btn.wf-onboarding-btn-default:hover{color:#29957C;border-color:#1c6554}.wf-onboarding-btn.wf-onboarding-btn-default:active,.wf-onboarding-btn.wf-onboarding-btn-default.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{color:#29957C;border-color:#1c6554}.wf-onboarding-btn.wf-onboarding-btn-default:active:hover,.wf-onboarding-btn.wf-onboarding-btn-default:active:focus,.wf-onboarding-btn.wf-onboarding-btn-default:active.focus,.wf-onboarding-btn.wf-onboarding-btn-default.active:hover,.wf-onboarding-btn.wf-onboarding-btn-default.active:focus,.wf-onboarding-btn.wf-onboarding-btn-default.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle.focus{color:#29957C;border-color:#0d3129}.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default.wf-focus{border-color:#29957C}.wf-onboarding-btn.wf-onboarding-btn-default .wf-badge{background-color:#29957C}.wf-onboarding-modal #wf-onboarding-or{color:#29957C}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li.wf-active,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#29957C}.wf-onboarding-modal [type=checkbox].wf-option-checkbox:checked+label:before,.wf-onboarding-modal [type=radio].wf-option-radio:checked+label:before{background-color:#29957C !important}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header{background-color:#29957C}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul>li.wf-active{border-left:4px solid #29957C}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul>*:last-child{color:#29957C}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li.wf-active,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#29957C}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox:checked+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio:checked+label:before{background-color:#29957C !important}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li.wf-active{background-color:#29957C}#wf-onboarding-final-attempt #wf-onboarding-or{color:#29957C}.wf-tour-pointer #wf-tour-close a:hover{color:#29957C}.wf-tour-pointer .wf-pointer-footer .wf-tour-pagination>li.wf-active{color:#29957C}li#toplevel_page_Wordfence .wp-menu-image::before{content:' ';background-image:url("../../images/logos/shield-care.svg");background-clip:content-box;background-repeat:no-repeat;background-position:center;width:20px;height:20px;padding:7px 0}li#toplevel_page_Wordfence.wp-menu-open .wp-menu-image::before{background-image:url("../../images/logos/shield-white.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/care.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/care.1704213472.css deleted file mode 100644 index bd910326..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/care.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus{background-color:#29957C;border-color:#29957C}.wrap.wordfence .button-primary{background-color:#29957C}a{color:#29957C}.wf-inline-help:hover{color:#29957C}.wf-blue{color:#29957C !important}.wf-blue-light{color:#54BF9C !important}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{color:#29957C}.wf-page-tabs .wf-tab.wf-active a,.wf-page-tabs .wf-tab:hover a,.wf-page-fixed-tabs .wf-tab.wf-active a,.wf-page-fixed-tabs .wf-tab:hover a{color:#29957C}.wf-back-icon{color:#29957C}.wf-boolean-switch.wf-active{border:1px solid #29957C;background-color:#29957C}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{border:1px solid #29957C}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{box-shadow:0px 0px 0px 1px #29957C !important;background-color:#29957C !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{color:#29957C !important}.wf-indeterminate-progress path{fill:#29957C}.wf-switch>li.wf-active{background-color:#29957C !important}.wf-drawer .wf-modal .wf-modal-header{background-color:#29957C}.wf-circle-tooltip.ui-tooltip a{color:#29957C}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled{background-color:#29957C}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#29957C}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#29957C}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#29957C}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top:2px solid #29957C;border-left:2px solid #29957C;border-right:2px solid #29957C}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{border-left:2px solid #29957C;border-right:2px solid #29957C}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom:2px solid #29957C;background-color:#29957C}#wf-toupp-required-message #wf-toupp-required-message-inner{background-color:#29957C}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-title{color:#29957C}.wf-block-navigation-option:hover svg.wf-block-navigation-option-icon{fill:#29957C}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#29957C;background-color:#fff;border-color:#29957C}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.focus{color:#29957C;background-color:#e6e6e6;border-color:#0d3129}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover{color:#29957C;background-color:#e6e6e6;border-color:#1c6554}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{color:#29957C;background-color:#e6e6e6;border-color:#1c6554}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus{color:#29957C;background-color:#d4d4d4;border-color:#0d3129}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#54BF9C;background-color:#fff;border-color:#54BF9C;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-focus{background-color:#fff;border-color:#29957C}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label .wf-badge{color:#fff;background-color:#29957C}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#29957C;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#1e6d5b;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#1e6d5b;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{color:#fff;background-color:#1e6d5b;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus{color:#fff;background-color:#165143;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#54BF9C;border-color:#5996b0;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus{background-color:#29957C;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge{color:#29957C;background-color:#fff}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{border-left:4px solid #29957C}#wfLiveTrafficDisabledMessage h2{background-color:#29957C}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{border-color:#29957C}.wf-premium-callout .button-primary{background-color:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled{background-color:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value{color:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value svg{fill:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-label{color:#29957C}#wf-scan-running-bar-pill{background-color:#29957C}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{color:#29957C}.wf-scan-tabs .wf-tab.wf-active a,.wf-scan-tabs .wf-tab:hover a{color:#29957C}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path{fill:#29957C}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label{color:#29957C}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path{fill:#29957C}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label{color:#29957C}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name{background-color:#29957C}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name .wf-option-checkbox{color:#29957C !important}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{background-color:#29957C}.wf-schedule-times>li.wf-active{background-color:#29957C}.wf-issue-control-ignore-menu>li:hover{background-color:#29957C}#wf-site-cleaning-bottom h3{color:#29957C}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success,.wf-step-complete-success{background-image:url("../../images/icons/check-care.svg")}.wf-block-list .wf-block-list-subtitle{color:#54BF9C}#wordfenceTwoFactorLegacy,#wordfenceTwoFactorModern{border-left:4px solid #29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled{background-color:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value{color:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value svg{fill:#29957C}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-label{color:#29957C}.wordfence-lock-icon{background-image:url("../../images/logos/shield-care.svg")}#wf-adminbar-icon{background-image:url("../../images/logos/shield-care.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/free-global.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/free-global.1704213472.css deleted file mode 100644 index 7d710de3..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/free-global.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{color:#1B719E}.wf-btn-default{color:#1B719E;background-color:#fff;border-color:#1B719E}.wf-btn-default:focus,.wf-btn-default.focus{color:#1B719E;background-color:#e6e6e6;border-color:#082331}.wf-btn-default:hover{color:#1B719E;background-color:#e6e6e6;border-color:#124c6a}.wf-btn-default:active,.wf-btn-default.active,.wf-open>.wf-btn-default.wf-dropdown-toggle{color:#1B719E;background-color:#e6e6e6;border-color:#124c6a}.wf-btn-default:active:hover,.wf-btn-default:active:focus,.wf-btn-default:active.focus,.wf-btn-default.active:hover,.wf-btn-default.active:focus,.wf-btn-default.active.focus,.wf-open>.wf-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-btn-default.wf-dropdown-toggle.focus{color:#1B719E;background-color:#d4d4d4;border-color:#082331}.wf-btn-default:active,.wf-btn-default.wf-active,.wf-open>.wf-btn-default.wf-dropdown-toggle{background-image:none}.wf-btn-default.wf-disabled,.wf-btn-default[disabled],.wf-btn-default[readonly],fieldset[disabled] .wf-btn-default{color:#008cc1;background-color:#fff;border-color:#008cc1;cursor:not-allowed}.wf-btn-default.wf-disabled:hover,.wf-btn-default.wf-disabled:focus,.wf-btn-default.wf-disabled.wf-focus,.wf-btn-default[disabled]:hover,.wf-btn-default[disabled]:focus,.wf-btn-default[disabled].wf-focus,.wf-btn-default[readonly]:hover,.wf-btn-default[readonly]:focus,.wf-btn-default[readonly].wf-focus,fieldset[disabled] .wf-btn-default:hover,fieldset[disabled] .wf-btn-default:focus,fieldset[disabled] .wf-btn-default.wf-focus{background-color:#fff;border-color:#1B719E}.wf-btn-default .wf-badge{color:#fff;background-color:#1B719E}.wf-btn-primary{color:#fff;background-color:#1B719E;border-color:#005e85}.wf-btn-primary:focus,.wf-btn-primary.focus{color:#fff;background-color:#145272;border-color:#000405}.wf-btn-primary:hover{color:#fff;background-color:#145272;border-color:#003347}.wf-btn-primary:active,.wf-btn-primary.active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{color:#fff;background-color:#145272;border-color:#003347}.wf-btn-primary:active:hover,.wf-btn-primary:active:focus,.wf-btn-primary:active.focus,.wf-btn-primary.active:hover,.wf-btn-primary.active:focus,.wf-btn-primary.active.focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle.focus{color:#fff;background-color:#0e3c54;border-color:#000405}.wf-btn-primary:active,.wf-btn-primary.wf-active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{background-image:none}.wf-btn-primary.wf-disabled,.wf-btn-primary[disabled],.wf-btn-primary[readonly],fieldset[disabled] .wf-btn-primary{color:#fff;background-color:#008cc1;border-color:#5996b0;cursor:not-allowed}.wf-btn-primary.wf-disabled:hover,.wf-btn-primary.wf-disabled:focus,.wf-btn-primary.wf-disabled.wf-focus,.wf-btn-primary[disabled]:hover,.wf-btn-primary[disabled]:focus,.wf-btn-primary[disabled].wf-focus,.wf-btn-primary[readonly]:hover,.wf-btn-primary[readonly]:focus,.wf-btn-primary[readonly].wf-focus,fieldset[disabled] .wf-btn-primary:hover,fieldset[disabled] .wf-btn-primary:focus,fieldset[disabled] .wf-btn-primary.wf-focus{background-color:#1B719E;border-color:#005e85}.wf-btn-primary .wf-badge{color:#1B719E;background-color:#fff}.wf-btn-link{color:#1B719E}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{background-color:#1B719E;border-color:#1B719E}#wf-onboarding-dismiss:hover{color:#1B719E}.wf-onboarding-btn:hover,.wf-onboarding-btn:focus,.wf-onboarding-btn.wf-focus{color:#1B719E}.wf-onboarding-btn.wf-onboarding-btn-primary{background-color:#1B719E}.wf-onboarding-btn.wf-onboarding-btn-primary:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.focus{background-color:#145272}.wf-onboarding-btn.wf-onboarding-btn-primary:hover{background-color:#145272}.wf-onboarding-btn.wf-onboarding-btn-primary:active,.wf-onboarding-btn.wf-onboarding-btn-primary.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle{background-color:#145272}.wf-onboarding-btn.wf-onboarding-btn-primary:active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary:active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary:active.focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle.focus{background-color:#0e3c54}.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary.wf-focus{background-color:#1B719E}.wf-onboarding-btn.wf-onboarding-btn-primary .wf-badge{color:#1B719E}.wf-onboarding-btn.wf-onboarding-btn-default{color:#1B719E;border-color:#1B719E}.wf-onboarding-btn.wf-onboarding-btn-default:focus,.wf-onboarding-btn.wf-onboarding-btn-default.focus{color:#1B719E;border-color:#082331}.wf-onboarding-btn.wf-onboarding-btn-default:hover{color:#1B719E;border-color:#124c6a}.wf-onboarding-btn.wf-onboarding-btn-default:active,.wf-onboarding-btn.wf-onboarding-btn-default.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{color:#1B719E;border-color:#124c6a}.wf-onboarding-btn.wf-onboarding-btn-default:active:hover,.wf-onboarding-btn.wf-onboarding-btn-default:active:focus,.wf-onboarding-btn.wf-onboarding-btn-default:active.focus,.wf-onboarding-btn.wf-onboarding-btn-default.active:hover,.wf-onboarding-btn.wf-onboarding-btn-default.active:focus,.wf-onboarding-btn.wf-onboarding-btn-default.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle.focus{color:#1B719E;border-color:#082331}.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default.wf-focus{border-color:#1B719E}.wf-onboarding-btn.wf-onboarding-btn-default .wf-badge{background-color:#1B719E}.wf-onboarding-modal #wf-onboarding-or{color:#1B719E}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li.wf-active,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#1B719E}.wf-onboarding-modal [type=checkbox].wf-option-checkbox:checked+label:before,.wf-onboarding-modal [type=radio].wf-option-radio:checked+label:before{background-color:#1B719E !important}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header{background-color:#1B719E}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul>li.wf-active{border-left:4px solid #1B719E}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul>*:last-child{color:#1B719E}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li.wf-active,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#1B719E}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox:checked+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio:checked+label:before{background-color:#1B719E !important}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li.wf-active{background-color:#1B719E}#wf-onboarding-final-attempt #wf-onboarding-or{color:#1B719E}.wf-tour-pointer #wf-tour-close a:hover{color:#1B719E}.wf-tour-pointer .wf-pointer-footer .wf-tour-pagination>li.wf-active{color:#1B719E}li#toplevel_page_Wordfence .wp-menu-image::before{content:' ';background-image:url("../../images/logos/shield-free.svg");background-clip:content-box;background-repeat:no-repeat;background-position:center;width:20px;height:20px;padding:7px 0}li#toplevel_page_Wordfence.wp-menu-open .wp-menu-image::before{background-image:url("../../images/logos/shield-white.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/free.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/free.1704213472.css deleted file mode 100644 index 57beb252..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/free.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus{background-color:#1B719E;border-color:#1B719E}.wrap.wordfence .button-primary{background-color:#1B719E}a{color:#1B719E}.wf-inline-help:hover{color:#1B719E}.wf-blue{color:#1B719E !important}.wf-blue-light{color:#008cc1 !important}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{color:#1B719E}.wf-page-tabs .wf-tab.wf-active a,.wf-page-tabs .wf-tab:hover a,.wf-page-fixed-tabs .wf-tab.wf-active a,.wf-page-fixed-tabs .wf-tab:hover a{color:#1B719E}.wf-back-icon{color:#1B719E}.wf-boolean-switch.wf-active{border:1px solid #1B719E;background-color:#1B719E}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{border:1px solid #1B719E}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{box-shadow:0px 0px 0px 1px #1B719E !important;background-color:#1B719E !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{color:#1B719E !important}.wf-indeterminate-progress path{fill:#1B719E}.wf-switch>li.wf-active{background-color:#1B719E !important}.wf-drawer .wf-modal .wf-modal-header{background-color:#1B719E}.wf-circle-tooltip.ui-tooltip a{color:#1B719E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled{background-color:#1B719E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#1B719E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#1B719E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#1B719E}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top:2px solid #1B719E;border-left:2px solid #1B719E;border-right:2px solid #1B719E}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{border-left:2px solid #1B719E;border-right:2px solid #1B719E}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom:2px solid #1B719E;background-color:#1B719E}#wf-toupp-required-message #wf-toupp-required-message-inner{background-color:#1B719E}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-title{color:#1B719E}.wf-block-navigation-option:hover svg.wf-block-navigation-option-icon{fill:#1B719E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#1B719E;background-color:#fff;border-color:#1B719E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.focus{color:#1B719E;background-color:#e6e6e6;border-color:#082331}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover{color:#1B719E;background-color:#e6e6e6;border-color:#124c6a}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{color:#1B719E;background-color:#e6e6e6;border-color:#124c6a}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus{color:#1B719E;background-color:#d4d4d4;border-color:#082331}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#008cc1;background-color:#fff;border-color:#008cc1;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-focus{background-color:#fff;border-color:#1B719E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label .wf-badge{color:#fff;background-color:#1B719E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#1B719E;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#145272;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#145272;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{color:#fff;background-color:#145272;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus{color:#fff;background-color:#0e3c54;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#008cc1;border-color:#5996b0;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus{background-color:#1B719E;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge{color:#1B719E;background-color:#fff}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{border-left:4px solid #1B719E}#wfLiveTrafficDisabledMessage h2{background-color:#1B719E}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{border-color:#1B719E}.wf-premium-callout .button-primary{background-color:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled{background-color:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value{color:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value svg{fill:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-label{color:#1B719E}#wf-scan-running-bar-pill{background-color:#1B719E}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{color:#1B719E}.wf-scan-tabs .wf-tab.wf-active a,.wf-scan-tabs .wf-tab:hover a{color:#1B719E}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path{fill:#1B719E}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label{color:#1B719E}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path{fill:#1B719E}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label{color:#1B719E}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name{background-color:#1B719E}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name .wf-option-checkbox{color:#1B719E !important}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{background-color:#1B719E}.wf-schedule-times>li.wf-active{background-color:#1B719E}.wf-issue-control-ignore-menu>li:hover{background-color:#1B719E}#wf-site-cleaning-bottom h3{color:#1B719E}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success,.wf-step-complete-success{background-image:url("../../images/icons/check.svg")}.wf-block-list .wf-block-list-subtitle{color:#008cc1}#wordfenceTwoFactorLegacy,#wordfenceTwoFactorModern{border-left:4px solid #1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled{background-color:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value{color:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value svg{fill:#1B719E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-label{color:#1B719E}.wordfence-lock-icon{background-image:url("../../images/logos/shield-free.svg")}#wf-adminbar-icon{background-image:url("../../images/logos/shield-free.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/premium-global.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/premium-global.1704213472.css deleted file mode 100644 index b86c4f9c..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/premium-global.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{color:#137D8E}.wf-btn-default{color:#137D8E;background-color:#fff;border-color:#137D8E}.wf-btn-default:focus,.wf-btn-default.focus{color:#137D8E;background-color:#e6e6e6;border-color:#041a1e}.wf-btn-default:hover{color:#137D8E;background-color:#e6e6e6;border-color:#0c4d58}.wf-btn-default:active,.wf-btn-default.active,.wf-open>.wf-btn-default.wf-dropdown-toggle{color:#137D8E;background-color:#e6e6e6;border-color:#0c4d58}.wf-btn-default:active:hover,.wf-btn-default:active:focus,.wf-btn-default:active.focus,.wf-btn-default.active:hover,.wf-btn-default.active:focus,.wf-btn-default.active.focus,.wf-open>.wf-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-btn-default.wf-dropdown-toggle.focus{color:#137D8E;background-color:#d4d4d4;border-color:#041a1e}.wf-btn-default:active,.wf-btn-default.wf-active,.wf-open>.wf-btn-default.wf-dropdown-toggle{background-image:none}.wf-btn-default.wf-disabled,.wf-btn-default[disabled],.wf-btn-default[readonly],fieldset[disabled] .wf-btn-default{color:#51BFCF;background-color:#fff;border-color:#51BFCF;cursor:not-allowed}.wf-btn-default.wf-disabled:hover,.wf-btn-default.wf-disabled:focus,.wf-btn-default.wf-disabled.wf-focus,.wf-btn-default[disabled]:hover,.wf-btn-default[disabled]:focus,.wf-btn-default[disabled].wf-focus,.wf-btn-default[readonly]:hover,.wf-btn-default[readonly]:focus,.wf-btn-default[readonly].wf-focus,fieldset[disabled] .wf-btn-default:hover,fieldset[disabled] .wf-btn-default:focus,fieldset[disabled] .wf-btn-default.wf-focus{background-color:#fff;border-color:#137D8E}.wf-btn-default .wf-badge{color:#fff;background-color:#137D8E}.wf-btn-primary{color:#fff;background-color:#137D8E;border-color:#005e85}.wf-btn-primary:focus,.wf-btn-primary.focus{color:#fff;background-color:#0d5561;border-color:#000405}.wf-btn-primary:hover{color:#fff;background-color:#0d5561;border-color:#003347}.wf-btn-primary:active,.wf-btn-primary.active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{color:#fff;background-color:#0d5561;border-color:#003347}.wf-btn-primary:active:hover,.wf-btn-primary:active:focus,.wf-btn-primary:active.focus,.wf-btn-primary.active:hover,.wf-btn-primary.active:focus,.wf-btn-primary.active.focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle.focus{color:#fff;background-color:#093a42;border-color:#000405}.wf-btn-primary:active,.wf-btn-primary.wf-active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{background-image:none}.wf-btn-primary.wf-disabled,.wf-btn-primary[disabled],.wf-btn-primary[readonly],fieldset[disabled] .wf-btn-primary{color:#fff;background-color:#51BFCF;border-color:#5996b0;cursor:not-allowed}.wf-btn-primary.wf-disabled:hover,.wf-btn-primary.wf-disabled:focus,.wf-btn-primary.wf-disabled.wf-focus,.wf-btn-primary[disabled]:hover,.wf-btn-primary[disabled]:focus,.wf-btn-primary[disabled].wf-focus,.wf-btn-primary[readonly]:hover,.wf-btn-primary[readonly]:focus,.wf-btn-primary[readonly].wf-focus,fieldset[disabled] .wf-btn-primary:hover,fieldset[disabled] .wf-btn-primary:focus,fieldset[disabled] .wf-btn-primary.wf-focus{background-color:#137D8E;border-color:#005e85}.wf-btn-primary .wf-badge{color:#137D8E;background-color:#fff}.wf-btn-link{color:#137D8E}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{background-color:#137D8E;border-color:#137D8E}#wf-onboarding-dismiss:hover{color:#137D8E}.wf-onboarding-btn:hover,.wf-onboarding-btn:focus,.wf-onboarding-btn.wf-focus{color:#137D8E}.wf-onboarding-btn.wf-onboarding-btn-primary{background-color:#137D8E}.wf-onboarding-btn.wf-onboarding-btn-primary:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.focus{background-color:#0d5561}.wf-onboarding-btn.wf-onboarding-btn-primary:hover{background-color:#0d5561}.wf-onboarding-btn.wf-onboarding-btn-primary:active,.wf-onboarding-btn.wf-onboarding-btn-primary.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle{background-color:#0d5561}.wf-onboarding-btn.wf-onboarding-btn-primary:active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary:active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary:active.focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle.focus{background-color:#093a42}.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary.wf-focus{background-color:#137D8E}.wf-onboarding-btn.wf-onboarding-btn-primary .wf-badge{color:#137D8E}.wf-onboarding-btn.wf-onboarding-btn-default{color:#137D8E;border-color:#137D8E}.wf-onboarding-btn.wf-onboarding-btn-default:focus,.wf-onboarding-btn.wf-onboarding-btn-default.focus{color:#137D8E;border-color:#041a1e}.wf-onboarding-btn.wf-onboarding-btn-default:hover{color:#137D8E;border-color:#0c4d58}.wf-onboarding-btn.wf-onboarding-btn-default:active,.wf-onboarding-btn.wf-onboarding-btn-default.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{color:#137D8E;border-color:#0c4d58}.wf-onboarding-btn.wf-onboarding-btn-default:active:hover,.wf-onboarding-btn.wf-onboarding-btn-default:active:focus,.wf-onboarding-btn.wf-onboarding-btn-default:active.focus,.wf-onboarding-btn.wf-onboarding-btn-default.active:hover,.wf-onboarding-btn.wf-onboarding-btn-default.active:focus,.wf-onboarding-btn.wf-onboarding-btn-default.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle.focus{color:#137D8E;border-color:#041a1e}.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default.wf-focus{border-color:#137D8E}.wf-onboarding-btn.wf-onboarding-btn-default .wf-badge{background-color:#137D8E}.wf-onboarding-modal #wf-onboarding-or{color:#137D8E}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li.wf-active,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#137D8E}.wf-onboarding-modal [type=checkbox].wf-option-checkbox:checked+label:before,.wf-onboarding-modal [type=radio].wf-option-radio:checked+label:before{background-color:#137D8E !important}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header{background-color:#137D8E}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul>li.wf-active{border-left:4px solid #137D8E}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul>*:last-child{color:#137D8E}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li.wf-active,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#137D8E}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox:checked+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio:checked+label:before{background-color:#137D8E !important}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li.wf-active{background-color:#137D8E}#wf-onboarding-final-attempt #wf-onboarding-or{color:#137D8E}.wf-tour-pointer #wf-tour-close a:hover{color:#137D8E}.wf-tour-pointer .wf-pointer-footer .wf-tour-pagination>li.wf-active{color:#137D8E}li#toplevel_page_Wordfence .wp-menu-image::before{content:' ';background-image:url("../../images/logos/shield-premium.svg");background-clip:content-box;background-repeat:no-repeat;background-position:center;width:20px;height:20px;padding:7px 0}li#toplevel_page_Wordfence.wp-menu-open .wp-menu-image::before{background-image:url("../../images/logos/shield-white.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/premium.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/premium.1704213472.css deleted file mode 100644 index d1415596..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/premium.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus{background-color:#137D8E;border-color:#137D8E}.wrap.wordfence .button-primary{background-color:#137D8E}a{color:#137D8E}.wf-inline-help:hover{color:#137D8E}.wf-blue{color:#137D8E !important}.wf-blue-light{color:#51BFCF !important}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{color:#137D8E}.wf-page-tabs .wf-tab.wf-active a,.wf-page-tabs .wf-tab:hover a,.wf-page-fixed-tabs .wf-tab.wf-active a,.wf-page-fixed-tabs .wf-tab:hover a{color:#137D8E}.wf-back-icon{color:#137D8E}.wf-boolean-switch.wf-active{border:1px solid #137D8E;background-color:#137D8E}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{border:1px solid #137D8E}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{box-shadow:0px 0px 0px 1px #137D8E !important;background-color:#137D8E !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{color:#137D8E !important}.wf-indeterminate-progress path{fill:#137D8E}.wf-switch>li.wf-active{background-color:#137D8E !important}.wf-drawer .wf-modal .wf-modal-header{background-color:#137D8E}.wf-circle-tooltip.ui-tooltip a{color:#137D8E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled{background-color:#137D8E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#137D8E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#137D8E}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#137D8E}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top:2px solid #137D8E;border-left:2px solid #137D8E;border-right:2px solid #137D8E}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{border-left:2px solid #137D8E;border-right:2px solid #137D8E}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom:2px solid #137D8E;background-color:#137D8E}#wf-toupp-required-message #wf-toupp-required-message-inner{background-color:#137D8E}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-title{color:#137D8E}.wf-block-navigation-option:hover svg.wf-block-navigation-option-icon{fill:#137D8E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#137D8E;background-color:#fff;border-color:#137D8E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.focus{color:#137D8E;background-color:#e6e6e6;border-color:#041a1e}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover{color:#137D8E;background-color:#e6e6e6;border-color:#0c4d58}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{color:#137D8E;background-color:#e6e6e6;border-color:#0c4d58}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus{color:#137D8E;background-color:#d4d4d4;border-color:#041a1e}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#51BFCF;background-color:#fff;border-color:#51BFCF;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-focus{background-color:#fff;border-color:#137D8E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label .wf-badge{color:#fff;background-color:#137D8E}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#137D8E;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#0d5561;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#0d5561;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{color:#fff;background-color:#0d5561;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus{color:#fff;background-color:#093a42;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#51BFCF;border-color:#5996b0;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus{background-color:#137D8E;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge{color:#137D8E;background-color:#fff}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{border-left:4px solid #137D8E}#wfLiveTrafficDisabledMessage h2{background-color:#137D8E}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{border-color:#137D8E}.wf-premium-callout .button-primary{background-color:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled{background-color:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value{color:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value svg{fill:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-label{color:#137D8E}#wf-scan-running-bar-pill{background-color:#137D8E}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{color:#137D8E}.wf-scan-tabs .wf-tab.wf-active a,.wf-scan-tabs .wf-tab:hover a{color:#137D8E}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path{fill:#137D8E}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label{color:#137D8E}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path{fill:#137D8E}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label{color:#137D8E}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name{background-color:#137D8E}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name .wf-option-checkbox{color:#137D8E !important}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{background-color:#137D8E}.wf-schedule-times>li.wf-active{background-color:#137D8E}.wf-issue-control-ignore-menu>li:hover{background-color:#137D8E}#wf-site-cleaning-bottom h3{color:#137D8E}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success,.wf-step-complete-success{background-image:url("../../images/icons/check-premium.svg")}.wf-block-list .wf-block-list-subtitle{color:#51BFCF}#wordfenceTwoFactorLegacy,#wordfenceTwoFactorModern{border-left:4px solid #137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled{background-color:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value{color:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value svg{fill:#137D8E}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-label{color:#137D8E}.wordfence-lock-icon{background-image:url("../../images/logos/shield-premium.svg")}#wf-adminbar-icon{background-image:url("../../images/logos/shield-premium.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/response-global.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/response-global.1704213472.css deleted file mode 100644 index 3f68e0a4..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/response-global.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{color:#6453A3}.wf-btn-default{color:#6453A3;background-color:#fff;border-color:#6453A3}.wf-btn-default:focus,.wf-btn-default.focus{color:#6453A3;background-color:#e6e6e6;border-color:#30284f}.wf-btn-default:hover{color:#6453A3;background-color:#e6e6e6;border-color:#4b3e7a}.wf-btn-default:active,.wf-btn-default.active,.wf-open>.wf-btn-default.wf-dropdown-toggle{color:#6453A3;background-color:#e6e6e6;border-color:#4b3e7a}.wf-btn-default:active:hover,.wf-btn-default:active:focus,.wf-btn-default:active.focus,.wf-btn-default.active:hover,.wf-btn-default.active:focus,.wf-btn-default.active.focus,.wf-open>.wf-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-btn-default.wf-dropdown-toggle.focus{color:#6453A3;background-color:#d4d4d4;border-color:#30284f}.wf-btn-default:active,.wf-btn-default.wf-active,.wf-open>.wf-btn-default.wf-dropdown-toggle{background-image:none}.wf-btn-default.wf-disabled,.wf-btn-default[disabled],.wf-btn-default[readonly],fieldset[disabled] .wf-btn-default{color:#928DC4;background-color:#fff;border-color:#928DC4;cursor:not-allowed}.wf-btn-default.wf-disabled:hover,.wf-btn-default.wf-disabled:focus,.wf-btn-default.wf-disabled.wf-focus,.wf-btn-default[disabled]:hover,.wf-btn-default[disabled]:focus,.wf-btn-default[disabled].wf-focus,.wf-btn-default[readonly]:hover,.wf-btn-default[readonly]:focus,.wf-btn-default[readonly].wf-focus,fieldset[disabled] .wf-btn-default:hover,fieldset[disabled] .wf-btn-default:focus,fieldset[disabled] .wf-btn-default.wf-focus{background-color:#fff;border-color:#6453A3}.wf-btn-default .wf-badge{color:#fff;background-color:#6453A3}.wf-btn-primary{color:#fff;background-color:#6453A3;border-color:#005e85}.wf-btn-primary:focus,.wf-btn-primary.focus{color:#fff;background-color:#4f4281;border-color:#000405}.wf-btn-primary:hover{color:#fff;background-color:#4f4281;border-color:#003347}.wf-btn-primary:active,.wf-btn-primary.active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{color:#fff;background-color:#4f4281;border-color:#003347}.wf-btn-primary:active:hover,.wf-btn-primary:active:focus,.wf-btn-primary:active.focus,.wf-btn-primary.active:hover,.wf-btn-primary.active:focus,.wf-btn-primary.active.focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle.focus{color:#fff;background-color:#41366a;border-color:#000405}.wf-btn-primary:active,.wf-btn-primary.wf-active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{background-image:none}.wf-btn-primary.wf-disabled,.wf-btn-primary[disabled],.wf-btn-primary[readonly],fieldset[disabled] .wf-btn-primary{color:#fff;background-color:#928DC4;border-color:#5996b0;cursor:not-allowed}.wf-btn-primary.wf-disabled:hover,.wf-btn-primary.wf-disabled:focus,.wf-btn-primary.wf-disabled.wf-focus,.wf-btn-primary[disabled]:hover,.wf-btn-primary[disabled]:focus,.wf-btn-primary[disabled].wf-focus,.wf-btn-primary[readonly]:hover,.wf-btn-primary[readonly]:focus,.wf-btn-primary[readonly].wf-focus,fieldset[disabled] .wf-btn-primary:hover,fieldset[disabled] .wf-btn-primary:focus,fieldset[disabled] .wf-btn-primary.wf-focus{background-color:#6453A3;border-color:#005e85}.wf-btn-primary .wf-badge{color:#6453A3;background-color:#fff}.wf-btn-link{color:#6453A3}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{background-color:#6453A3;border-color:#6453A3}#wf-onboarding-dismiss:hover{color:#6453A3}.wf-onboarding-btn:hover,.wf-onboarding-btn:focus,.wf-onboarding-btn.wf-focus{color:#6453A3}.wf-onboarding-btn.wf-onboarding-btn-primary{background-color:#6453A3}.wf-onboarding-btn.wf-onboarding-btn-primary:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.focus{background-color:#4f4281}.wf-onboarding-btn.wf-onboarding-btn-primary:hover{background-color:#4f4281}.wf-onboarding-btn.wf-onboarding-btn-primary:active,.wf-onboarding-btn.wf-onboarding-btn-primary.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle{background-color:#4f4281}.wf-onboarding-btn.wf-onboarding-btn-primary:active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary:active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary:active.focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle.focus{background-color:#41366a}.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary.wf-focus{background-color:#6453A3}.wf-onboarding-btn.wf-onboarding-btn-primary .wf-badge{color:#6453A3}.wf-onboarding-btn.wf-onboarding-btn-default{color:#6453A3;border-color:#6453A3}.wf-onboarding-btn.wf-onboarding-btn-default:focus,.wf-onboarding-btn.wf-onboarding-btn-default.focus{color:#6453A3;border-color:#30284f}.wf-onboarding-btn.wf-onboarding-btn-default:hover{color:#6453A3;border-color:#4b3e7a}.wf-onboarding-btn.wf-onboarding-btn-default:active,.wf-onboarding-btn.wf-onboarding-btn-default.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{color:#6453A3;border-color:#4b3e7a}.wf-onboarding-btn.wf-onboarding-btn-default:active:hover,.wf-onboarding-btn.wf-onboarding-btn-default:active:focus,.wf-onboarding-btn.wf-onboarding-btn-default:active.focus,.wf-onboarding-btn.wf-onboarding-btn-default.active:hover,.wf-onboarding-btn.wf-onboarding-btn-default.active:focus,.wf-onboarding-btn.wf-onboarding-btn-default.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle.focus{color:#6453A3;border-color:#30284f}.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default.wf-focus{border-color:#6453A3}.wf-onboarding-btn.wf-onboarding-btn-default .wf-badge{background-color:#6453A3}.wf-onboarding-modal #wf-onboarding-or{color:#6453A3}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li.wf-active,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#6453A3}.wf-onboarding-modal [type=checkbox].wf-option-checkbox:checked+label:before,.wf-onboarding-modal [type=radio].wf-option-radio:checked+label:before{background-color:#6453A3 !important}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header{background-color:#6453A3}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul>li.wf-active{border-left:4px solid #6453A3}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul>*:last-child{color:#6453A3}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li.wf-active,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li.wf-active{background-color:#6453A3}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox:checked+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio:checked+label:before{background-color:#6453A3 !important}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li.wf-active{background-color:#6453A3}#wf-onboarding-final-attempt #wf-onboarding-or{color:#6453A3}.wf-tour-pointer #wf-tour-close a:hover{color:#6453A3}.wf-tour-pointer .wf-pointer-footer .wf-tour-pagination>li.wf-active{color:#6453A3}li#toplevel_page_Wordfence .wp-menu-image::before{content:' ';background-image:url("../../images/logos/shield-response.svg");background-clip:content-box;background-repeat:no-repeat;background-position:center;width:20px;height:20px;padding:7px 0}li#toplevel_page_Wordfence.wp-menu-open .wp-menu-image::before{background-image:url("../../images/logos/shield-white.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/license/response-variables.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/response-variables.1704213472.css deleted file mode 100644 index e69de29b..00000000 diff --git a/wp/wp-content/plugins/wordfence/css/license/response.1704213472.css b/wp/wp-content/plugins/wordfence/css/license/response.1704213472.css deleted file mode 100644 index ae8a8b5e..00000000 --- a/wp/wp-content/plugins/wordfence/css/license/response.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus{background-color:#6453A3;border-color:#6453A3}.wrap.wordfence .button-primary{background-color:#6453A3}a{color:#6453A3}.wf-inline-help:hover{color:#6453A3}.wf-blue{color:#6453A3 !important}.wf-blue-light{color:#928DC4 !important}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{color:#6453A3}.wf-page-tabs .wf-tab.wf-active a,.wf-page-tabs .wf-tab:hover a,.wf-page-fixed-tabs .wf-tab.wf-active a,.wf-page-fixed-tabs .wf-tab:hover a{color:#6453A3}.wf-back-icon{color:#6453A3}.wf-boolean-switch.wf-active{border:1px solid #6453A3;background-color:#6453A3}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{border:1px solid #6453A3}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{box-shadow:0px 0px 0px 1px #6453A3 !important;background-color:#6453A3 !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{color:#6453A3 !important}.wf-indeterminate-progress path{fill:#6453A3}.wf-switch>li.wf-active{background-color:#6453A3 !important}.wf-drawer .wf-modal .wf-modal-header{background-color:#6453A3}.wf-circle-tooltip.ui-tooltip a{color:#6453A3}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled{background-color:#6453A3}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#6453A3}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#6453A3}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#6453A3}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top:2px solid #6453A3;border-left:2px solid #6453A3;border-right:2px solid #6453A3}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{border-left:2px solid #6453A3;border-right:2px solid #6453A3}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom:2px solid #6453A3;background-color:#6453A3}#wf-toupp-required-message #wf-toupp-required-message-inner{background-color:#6453A3}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-title{color:#6453A3}.wf-block-navigation-option:hover svg.wf-block-navigation-option-icon{fill:#6453A3}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#6453A3;background-color:#fff;border-color:#6453A3}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.focus{color:#6453A3;background-color:#e6e6e6;border-color:#30284f}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover{color:#6453A3;background-color:#e6e6e6;border-color:#4b3e7a}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{color:#6453A3;background-color:#e6e6e6;border-color:#4b3e7a}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus{color:#6453A3;background-color:#d4d4d4;border-color:#30284f}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#928DC4;background-color:#fff;border-color:#928DC4;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-focus{background-color:#fff;border-color:#6453A3}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label .wf-badge{color:#fff;background-color:#6453A3}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#6453A3;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#4f4281;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#4f4281;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{color:#fff;background-color:#4f4281;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus{color:#fff;background-color:#41366a;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#928DC4;border-color:#5996b0;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus{background-color:#6453A3;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge{color:#6453A3;background-color:#fff}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{border-left:4px solid #6453A3}#wfLiveTrafficDisabledMessage h2{background-color:#6453A3}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{border-color:#6453A3}.wf-premium-callout .button-primary{background-color:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled{background-color:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value{color:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value svg{fill:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-label{color:#6453A3}#wf-scan-running-bar-pill{background-color:#6453A3}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{color:#6453A3}.wf-scan-tabs .wf-tab.wf-active a,.wf-scan-tabs .wf-tab:hover a{color:#6453A3}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path{fill:#6453A3}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label{color:#6453A3}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path{fill:#6453A3}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label{color:#6453A3}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name{background-color:#6453A3}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name .wf-option-checkbox{color:#6453A3 !important}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{background-color:#6453A3}.wf-schedule-times>li.wf-active{background-color:#6453A3}.wf-issue-control-ignore-menu>li:hover{background-color:#6453A3}#wf-site-cleaning-bottom h3{color:#6453A3}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success,.wf-step-complete-success{background-image:url("../../images/icons/check-response.svg")}.wf-block-list .wf-block-list-subtitle{color:#928DC4}#wordfenceTwoFactorLegacy,#wordfenceTwoFactorModern{border-left:4px solid #6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled{background-color:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value{color:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value svg{fill:#6453A3}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-label{color:#6453A3}.wordfence-lock-icon{background-image:url("../../images/logos/shield-response.svg")}#wf-adminbar-icon{background-image:url("../../images/logos/shield-response.svg")} diff --git a/wp/wp-content/plugins/wordfence/css/main.1704213472.css b/wp/wp-content/plugins/wordfence/css/main.1704213472.css deleted file mode 100644 index a1773cb3..00000000 --- a/wp/wp-content/plugins/wordfence/css/main.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.4rem 1rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width: 768px){.wf-btn{padding:.5rem 1.25rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px}}.wf-btn:focus,.wf-btn.wf-focus,.wf-btn:active:focus,.wf-btn:active.wf-focus,.wf-btn.wf-active:focus,.wf-btn.wf-active.wf-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{text-decoration:none}.wf-btn:active,.wf-btn.wf-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn.wf-disabled,.wf-btn[disabled],.wf-btn[readonly],fieldset[disabled] .wf-btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none}a.wf-btn{text-decoration:none}a.wf-btn.wf-disabled,fieldset[disabled] a.wf-btn{cursor:not-allowed;pointer-events:none}.wf-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success:focus,.wf-btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.wf-btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active,.wf-btn-success.active,.wf-open>.wf-btn-success.wf-dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active:hover,.wf-btn-success:active:focus,.wf-btn-success:active.focus,.wf-btn-success.active:hover,.wf-btn-success.active:focus,.wf-btn-success.active.focus,.wf-open>.wf-btn-success.wf-dropdown-toggle:hover,.wf-open>.wf-btn-success.wf-dropdown-toggle:focus,.wf-open>.wf-btn-success.wf-dropdown-toggle.focus{color:#fff;background-color:#398439;border-color:#255625}.wf-btn-success:active,.wf-btn-success.wf-active,.wf-open>.wf-btn-success.wf-dropdown-toggle{background-image:none}.wf-btn-success.wf-disabled,.wf-btn-success[disabled],.wf-btn-success[readonly],fieldset[disabled] .wf-btn-success{color:#fff;background-color:#95d195;border-color:#8bca8b;cursor:not-allowed}.wf-btn-success.wf-disabled:hover,.wf-btn-success.wf-disabled:focus,.wf-btn-success.wf-disabled.wf-focus,.wf-btn-success[disabled]:hover,.wf-btn-success[disabled]:focus,.wf-btn-success[disabled].wf-focus,.wf-btn-success[readonly]:hover,.wf-btn-success[readonly]:focus,.wf-btn-success[readonly].wf-focus,fieldset[disabled] .wf-btn-success:hover,fieldset[disabled] .wf-btn-success:focus,fieldset[disabled] .wf-btn-success.wf-focus{background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success .wf-badge{color:#5cb85c;background-color:#fff}.wf-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.wf-btn-info:focus,.wf-btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.wf-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active,.wf-btn-info.active,.wf-open>.wf-btn-info.wf-dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active:hover,.wf-btn-info:active:focus,.wf-btn-info:active.focus,.wf-btn-info.active:hover,.wf-btn-info.active:focus,.wf-btn-info.active.focus,.wf-open>.wf-btn-info.wf-dropdown-toggle:hover,.wf-open>.wf-btn-info.wf-dropdown-toggle:focus,.wf-open>.wf-btn-info.wf-dropdown-toggle.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.wf-btn-info:active,.wf-btn-info.wf-active,.wf-open>.wf-btn-info.wf-dropdown-toggle{background-image:none}.wf-btn-info.wf-disabled,.wf-btn-info[disabled],.wf-btn-info[readonly],fieldset[disabled] .wf-btn-info{color:#fff;background-color:#94d6ea;border-color:#87d1e7;cursor:not-allowed}.wf-btn-info.wf-disabled:hover,.wf-btn-info.wf-disabled:focus,.wf-btn-info.wf-disabled.wf-focus,.wf-btn-info[disabled]:hover,.wf-btn-info[disabled]:focus,.wf-btn-info[disabled].wf-focus,.wf-btn-info[readonly]:hover,.wf-btn-info[readonly]:focus,.wf-btn-info[readonly].wf-focus,fieldset[disabled] .wf-btn-info:hover,fieldset[disabled] .wf-btn-info:focus,fieldset[disabled] .wf-btn-info.wf-focus{background-color:#5bc0de;border-color:#46b8da}.wf-btn-info .wf-badge{color:#5bc0de;background-color:#fff}.wf-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning:focus,.wf-btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.wf-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active,.wf-btn-warning.active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active:hover,.wf-btn-warning:active:focus,.wf-btn-warning:active.focus,.wf-btn-warning.active:hover,.wf-btn-warning.active:focus,.wf-btn-warning.active.focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle:hover,.wf-open>.wf-btn-warning.wf-dropdown-toggle:focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.wf-btn-warning:active,.wf-btn-warning.wf-active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{background-image:none}.wf-btn-warning.wf-disabled,.wf-btn-warning[disabled],.wf-btn-warning[readonly],fieldset[disabled] .wf-btn-warning{color:#fff;background-color:#f5ca8c;border-color:#f4c37c;cursor:not-allowed}.wf-btn-warning.wf-disabled:hover,.wf-btn-warning.wf-disabled:focus,.wf-btn-warning.wf-disabled.wf-focus,.wf-btn-warning[disabled]:hover,.wf-btn-warning[disabled]:focus,.wf-btn-warning[disabled].wf-focus,.wf-btn-warning[readonly]:hover,.wf-btn-warning[readonly]:focus,.wf-btn-warning[readonly].wf-focus,fieldset[disabled] .wf-btn-warning:hover,fieldset[disabled] .wf-btn-warning:focus,fieldset[disabled] .wf-btn-warning.wf-focus{background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning .wf-badge{color:#f0ad4e;background-color:#fff}.wf-btn-danger,.wf-btn.wf-btn-danger{color:#fff;background-color:#930000;border-color:#7a0000}.wf-btn-danger:focus,.wf-btn-danger.focus,.wf-btn.wf-btn-danger:focus,.wf-btn.wf-btn-danger.focus{color:#fff;background-color:#600000;border-color:#000}.wf-btn-danger:hover,.wf-btn.wf-btn-danger:hover{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active,.wf-btn-danger.active,.wf-open>.wf-btn-danger.wf-dropdown-toggle,.wf-btn.wf-btn-danger:active,.wf-btn.wf-btn-danger.active,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active:hover,.wf-btn-danger:active:focus,.wf-btn-danger:active.focus,.wf-btn-danger.active:hover,.wf-btn-danger.active:focus,.wf-btn-danger.active.focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle:hover,.wf-open>.wf-btn-danger.wf-dropdown-toggle:focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle.focus,.wf-btn.wf-btn-danger:active:hover,.wf-btn.wf-btn-danger:active:focus,.wf-btn.wf-btn-danger:active.focus,.wf-btn.wf-btn-danger.active:hover,.wf-btn.wf-btn-danger.active:focus,.wf-btn.wf-btn-danger.active.focus,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle:hover,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle:focus,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle.focus{color:#fff;background-color:#3c0000;border-color:#000}.wf-btn-danger:active,.wf-btn-danger.wf-active,.wf-open>.wf-btn-danger.wf-dropdown-toggle,.wf-btn.wf-btn-danger:active,.wf-btn.wf-btn-danger.wf-active,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle{background-image:none}.wf-btn-danger.wf-disabled,.wf-btn-danger[disabled],.wf-btn-danger[readonly],fieldset[disabled] .wf-btn-danger,.wf-btn.wf-btn-danger.wf-disabled,.wf-btn.wf-btn-danger[disabled],.wf-btn.wf-btn-danger[readonly],fieldset[disabled] .wf-btn.wf-btn-danger{color:#fff;background-color:#b95959;border-color:#a95959;cursor:not-allowed}.wf-btn-danger.wf-disabled:hover,.wf-btn-danger.wf-disabled:focus,.wf-btn-danger.wf-disabled.wf-focus,.wf-btn-danger[disabled]:hover,.wf-btn-danger[disabled]:focus,.wf-btn-danger[disabled].wf-focus,.wf-btn-danger[readonly]:hover,.wf-btn-danger[readonly]:focus,.wf-btn-danger[readonly].wf-focus,fieldset[disabled] .wf-btn-danger:hover,fieldset[disabled] .wf-btn-danger:focus,fieldset[disabled] .wf-btn-danger.wf-focus,.wf-btn.wf-btn-danger.wf-disabled:hover,.wf-btn.wf-btn-danger.wf-disabled:focus,.wf-btn.wf-btn-danger.wf-disabled.wf-focus,.wf-btn.wf-btn-danger[disabled]:hover,.wf-btn.wf-btn-danger[disabled]:focus,.wf-btn.wf-btn-danger[disabled].wf-focus,.wf-btn.wf-btn-danger[readonly]:hover,.wf-btn.wf-btn-danger[readonly]:focus,.wf-btn.wf-btn-danger[readonly].wf-focus,fieldset[disabled] .wf-btn.wf-btn-danger:hover,fieldset[disabled] .wf-btn.wf-btn-danger:focus,fieldset[disabled] .wf-btn.wf-btn-danger.wf-focus{background-color:#930000;border-color:#7a0000}.wf-btn-danger .wf-badge,.wf-btn.wf-btn-danger .wf-badge{color:#930000;background-color:#fff}.wf-btn-callout{font-weight:600;text-transform:uppercase}.wf-btn-callout-subtle{font-weight:400;text-transform:uppercase}.wf-btn-link{font-weight:normal;border-radius:0}.wf-btn-link,.wf-btn-link:active,.wf-btn-link.wf-active,.wf-btn-link[disabled],fieldset[disabled] .wf-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wf-btn-link,.wf-btn-link:hover,.wf-btn-link:focus,.wf-btn-link:active{border-color:transparent}.wf-btn-link:hover,.wf-btn-link:focus{color:#003a52;text-decoration:underline;background-color:transparent}.wf-btn-link[disabled]:hover,.wf-btn-link[disabled]:focus,fieldset[disabled] .wf-btn-link:hover,fieldset[disabled] .wf-btn-link:focus{color:#777;text-decoration:none}.wf-btn-lg,.wf-btn-group-lg>.wf-btn{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-btn-sm,.wf-btn-group-sm>.wf-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-xs,.wf-btn-group-xs>.wf-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-block{display:block;width:100%}.wf-btn-block+.wf-btn-block{margin-top:5px}input[type="submit"].wf-btn-block,input[type="reset"].wf-btn-block,input[type="button"].wf-btn-block{width:100%}.wf-btn-group,.wf-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wf-btn-group>.wf-btn,.wf-btn-group-vertical>.wf-btn{position:relative;float:left}.wf-btn-group>.wf-btn:hover,.wf-btn-group>.wf-btn:focus,.wf-btn-group>.wf-btn:active,.wf-btn-group>.wf-btn.wf-active,.wf-btn-group-vertical>.wf-btn:hover,.wf-btn-group-vertical>.wf-btn:focus,.wf-btn-group-vertical>.wf-btn:active,.wf-btn-group-vertical>.wf-btn.wf-active{z-index:2}.wf-btn-group .wf-btn+.wf-btn,.wf-btn-group .wf-btn+.wf-btn-group,.wf-btn-group .wf-btn-group+.wf-btn,.wf-btn-group .wf-btn-group+.wf-btn-group{margin-left:-1px}.wf-btn-toolbar{margin-left:-5px}.wf-btn-toolbar:before,.wf-btn-toolbar:after{content:" ";display:table}.wf-btn-toolbar:after{clear:both}.wf-btn-toolbar .wf-btn,.wf-btn-toolbar .wf-btn-group,.wf-btn-toolbar .wf-input-group{float:left}.wf-btn-toolbar>.wf-btn,.wf-btn-toolbar>.wf-btn-group,.wf-btn-toolbar>.wf-input-group{margin-left:5px}.wf-btn-group>.wf-btn:not(:first-child):not(:last-child):not(.wf-dropdown-toggle){border-radius:0}.wf-btn-group>.wf-btn:first-child{margin-left:0}.wf-btn-group>.wf-btn:first-child:not(:last-child):not(.wf-dropdown-toggle){-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn:last-child:not(:first-child),.wf-btn-group>.wf-dropdown-toggle:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group>.wf-btn-group{float:left}.wf-btn-group>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group .wf-dropdown-toggle:active,.wf-btn-group.wf-open .wf-dropdown-toggle{outline:0}.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:8px;padding-right:8px}.wf-btn-group>.wf-btn-lg+.wf-dropdown-toggle,.wf-btn-group-lg.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:12px;padding-right:12px}.wf-btn-group.open .wf-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn-group.open .wf-dropdown-toggle.wf-btn-link{-webkit-box-shadow:none;box-shadow:none}.wf-btn .wf-caret{margin-left:0}.wf-btn-lg .wf-caret,.wf-btn-group-lg>.wf-btn .wf-caret{border-width:5px 5px 0;border-bottom-width:0}.wf-dropup .wf-btn-lg .wf-caret,.wf-dropup .wf-btn-group-lg>.wf-btn .wf-caret{border-width:0 5px 5px}.wf-btn-group-vertical>.wf-btn,.wf-btn-group-vertical>.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group>.wf-btn{display:block;float:none;width:100%;max-width:100%}.wf-btn-group-vertical>.wf-btn-group:before,.wf-btn-group-vertical>.wf-btn-group:after{content:" ";display:table}.wf-btn-group-vertical>.wf-btn-group:after{clear:both}.wf-btn-group-vertical>.wf-btn-group>.wf-btn{float:none}.wf-btn-group-vertical>.wf-btn+.wf-btn,.wf-btn-group-vertical>.wf-btn+.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group+.wf-btn,.wf-btn-group-vertical>.wf-btn-group+.wf-btn-group{margin-top:-1px;margin-left:0}.wf-btn-group-vertical>.wf-btn:not(:first-child):not(:last-child){border-radius:0}.wf-btn-group-vertical>.wf-btn:first-child:not(:last-child){-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn:last-child:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-btn-group-vertical>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wf-btn-group-justified>.wf-btn,.wf-btn-group-justified>.wf-btn-group{float:none;display:table-cell;width:1%}.wf-btn-group-justified>.wf-btn-group .wf-btn{width:100%}.wf-btn-group-justified>.wf-btn-group .wf-dropdown-menu{left:auto}[data-toggle="buttons"]>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn input[type="checkbox"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wf-pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.wf-pagination>li{display:inline}.wf-pagination>li>a,.wf-pagination>li>span{position:relative;float:left;padding:.5rem 1.25rem;line-height:1.42857;text-decoration:none;color:#00709e;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.wf-pagination>li:first-child>a,.wf-pagination>li:first-child>span{margin-left:0;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.wf-pagination>li:last-child>a,.wf-pagination>li:last-child>span{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-pagination>li>a:hover,.wf-pagination>li>a:focus,.wf-pagination>li>span:hover,.wf-pagination>li>span:focus{z-index:2;color:#003a52;background-color:#e2e2e2;border-color:#ddd}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{z-index:3;color:#fff;cursor:default}.wf-pagination>.wf-disabled>span,.wf-pagination>.wf-disabled>span:hover,.wf-pagination>.wf-disabled>span:focus,.wf-pagination>.wf-disabled>a,.wf-pagination>.wf-disabled>a:hover,.wf-pagination>.wf-disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.wf-pagination-lg>li>a,.wf-pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.wf-pagination-lg>li:first-child>a,.wf-pagination-lg>li:first-child>span{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-pagination-lg>li:last-child>a,.wf-pagination-lg>li:last-child>span{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-pagination-sm>li>a,.wf-pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.wf-pagination-sm>li:first-child>a,.wf-pagination-sm>li:first-child>span{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.wf-pagination-sm>li:last-child>a,.wf-pagination-sm>li:last-child>span{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.wf-downgrade-license{padding:0 1.25rem}@-ms-viewport{width:device-width}.wf-visible-xs{display:none !important}.wf-visible-sm{display:none !important}.wf-visible-md{display:none !important}.wf-visible-lg{display:none !important}.wf-visible-xs-block,.wf-visible-xs-inline,.wf-visible-xs-inline-block,.wf-visible-sm-block,.wf-visible-sm-inline,.wf-visible-sm-inline-block,.wf-visible-md-block,.wf-visible-md-inline,.wf-visible-md-inline-block,.wf-visible-lg-block,.wf-visible-lg-inline,.wf-visible-lg-inline-block{display:none !important}@media (max-width: 767px){.wf-visible-xs{display:block !important}table.wf-visible-xs{display:table !important}tr.wf-visible-xs{display:table-row !important}th.wf-visible-xs,td.wf-visible-xs{display:table-cell !important}}@media (max-width: 767px){.wf-visible-xs-block{display:block !important}}@media (max-width: 767px){.wf-visible-xs-inline{display:inline !important}}@media (max-width: 767px){.wf-visible-xs-inline-block{display:inline-block !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm{display:block !important}table.wf-visible-sm{display:table !important}tr.wf-visible-sm{display:table-row !important}th.wf-visible-sm,td.wf-visible-sm{display:table-cell !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-block{display:block !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-inline{display:inline !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-inline-block{display:inline-block !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md{display:block !important}table.wf-visible-md{display:table !important}tr.wf-visible-md{display:table-row !important}th.wf-visible-md,td.wf-visible-md{display:table-cell !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-block{display:block !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-inline{display:inline !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-inline-block{display:inline-block !important}}@media (min-width: 1200px){.wf-visible-lg{display:block !important}table.wf-visible-lg{display:table !important}tr.wf-visible-lg{display:table-row !important}th.wf-visible-lg,td.wf-visible-lg{display:table-cell !important}}@media (min-width: 1200px){.wf-visible-lg-block{display:block !important}}@media (min-width: 1200px){.wf-visible-lg-inline{display:inline !important}}@media (min-width: 1200px){.wf-visible-lg-inline-block{display:inline-block !important}}@media (max-width: 767px){.wf-hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.wf-hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-hidden-md{display:none !important}}@media (min-width: 1200px){.wf-hidden-lg{display:none !important}}.wf-visible-print{display:none !important}@media print{.wf-visible-print{display:block !important}table.wf-visible-print{display:table !important}tr.wf-visible-print{display:table-row !important}th.wf-visible-print,td.wf-visible-print{display:table-cell !important}}.wf-visible-print-block{display:none !important}@media print{.wf-visible-print-block{display:block !important}}.wf-visible-print-inline{display:none !important}@media print{.wf-visible-print-inline{display:inline !important}}.wf-visible-print-inline-block{display:none !important}@media print{.wf-visible-print-inline-block{display:inline-block !important}}@media print{.wf-hidden-print{display:none !important}}.wf-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wf-container:before,.wf-container:after{content:" ";display:table}.wf-container:after{clear:both}@media (min-width: 768px){.wf-container{width:750px}}@media (min-width: 992px){.wf-container{width:970px}}@media (min-width: 1200px){.wf-container{width:1170px}}.wf-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wf-container-fluid:before,.wf-container-fluid:after{content:" ";display:table}.wf-container-fluid:after{clear:both}.wf-row{margin-left:-15px;margin-right:-15px}.wf-row:before,.wf-row:after{content:" ";display:table}.wf-row:after{clear:both}.wf-col-xs-1,.wf-col-sm-1,.wf-col-md-1,.wf-col-lg-1,.wf-col-xs-2,.wf-col-sm-2,.wf-col-md-2,.wf-col-lg-2,.wf-col-xs-3,.wf-col-sm-3,.wf-col-md-3,.wf-col-lg-3,.wf-col-xs-4,.wf-col-sm-4,.wf-col-md-4,.wf-col-lg-4,.wf-col-xs-5,.wf-col-sm-5,.wf-col-md-5,.wf-col-lg-5,.wf-col-xs-6,.wf-col-sm-6,.wf-col-md-6,.wf-col-lg-6,.wf-col-xs-7,.wf-col-sm-7,.wf-col-md-7,.wf-col-lg-7,.wf-col-xs-8,.wf-col-sm-8,.wf-col-md-8,.wf-col-lg-8,.wf-col-xs-9,.wf-col-sm-9,.wf-col-md-9,.wf-col-lg-9,.wf-col-xs-10,.wf-col-sm-10,.wf-col-md-10,.wf-col-lg-10,.wf-col-xs-11,.wf-col-sm-11,.wf-col-md-11,.wf-col-lg-11,.wf-col-xs-12,.wf-col-sm-12,.wf-col-md-12,.wf-col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px;box-sizing:border-box}.wf-col-xs-1,.wf-col-xs-2,.wf-col-xs-3,.wf-col-xs-4,.wf-col-xs-5,.wf-col-xs-6,.wf-col-xs-7,.wf-col-xs-8,.wf-col-xs-9,.wf-col-xs-10,.wf-col-xs-11,.wf-col-xs-12{float:left}.wf-col-xs-1{width:8.33333%}.wf-col-xs-2{width:16.66667%}.wf-col-xs-3{width:25%}.wf-col-xs-4{width:33.33333%}.wf-col-xs-5{width:41.66667%}.wf-col-xs-6{width:50%}.wf-col-xs-7{width:58.33333%}.wf-col-xs-8{width:66.66667%}.wf-col-xs-9{width:75%}.wf-col-xs-10{width:83.33333%}.wf-col-xs-11{width:91.66667%}.wf-col-xs-12{width:100%}.wf-col-xs-pull-0{right:auto}.wf-col-xs-pull-1{right:8.33333%}.wf-col-xs-pull-2{right:16.66667%}.wf-col-xs-pull-3{right:25%}.wf-col-xs-pull-4{right:33.33333%}.wf-col-xs-pull-5{right:41.66667%}.wf-col-xs-pull-6{right:50%}.wf-col-xs-pull-7{right:58.33333%}.wf-col-xs-pull-8{right:66.66667%}.wf-col-xs-pull-9{right:75%}.wf-col-xs-pull-10{right:83.33333%}.wf-col-xs-pull-11{right:91.66667%}.wf-col-xs-pull-12{right:100%}.wf-col-xs-push-0{left:auto}.wf-col-xs-push-1{left:8.33333%}.wf-col-xs-push-2{left:16.66667%}.wf-col-xs-push-3{left:25%}.wf-col-xs-push-4{left:33.33333%}.wf-col-xs-push-5{left:41.66667%}.wf-col-xs-push-6{left:50%}.wf-col-xs-push-7{left:58.33333%}.wf-col-xs-push-8{left:66.66667%}.wf-col-xs-push-9{left:75%}.wf-col-xs-push-10{left:83.33333%}.wf-col-xs-push-11{left:91.66667%}.wf-col-xs-push-12{left:100%}.wf-col-xs-offset-0{margin-left:0%}.wf-col-xs-offset-1{margin-left:8.33333%}.wf-col-xs-offset-2{margin-left:16.66667%}.wf-col-xs-offset-3{margin-left:25%}.wf-col-xs-offset-4{margin-left:33.33333%}.wf-col-xs-offset-5{margin-left:41.66667%}.wf-col-xs-offset-6{margin-left:50%}.wf-col-xs-offset-7{margin-left:58.33333%}.wf-col-xs-offset-8{margin-left:66.66667%}.wf-col-xs-offset-9{margin-left:75%}.wf-col-xs-offset-10{margin-left:83.33333%}.wf-col-xs-offset-11{margin-left:91.66667%}.wf-col-xs-offset-12{margin-left:100%}.wf-col-xs-half-padding-left{padding-left:8px}.wf-col-xs-half-padding-right{padding-right:7px}@media (min-width: 768px){.wf-col-sm-1,.wf-col-sm-2,.wf-col-sm-3,.wf-col-sm-4,.wf-col-sm-5,.wf-col-sm-6,.wf-col-sm-7,.wf-col-sm-8,.wf-col-sm-9,.wf-col-sm-10,.wf-col-sm-11,.wf-col-sm-12{float:left}.wf-col-sm-1{width:8.33333%}.wf-col-sm-2{width:16.66667%}.wf-col-sm-3{width:25%}.wf-col-sm-4{width:33.33333%}.wf-col-sm-5{width:41.66667%}.wf-col-sm-6{width:50%}.wf-col-sm-7{width:58.33333%}.wf-col-sm-8{width:66.66667%}.wf-col-sm-9{width:75%}.wf-col-sm-10{width:83.33333%}.wf-col-sm-11{width:91.66667%}.wf-col-sm-12{width:100%}.wf-col-sm-pull-0{right:auto}.wf-col-sm-pull-1{right:8.33333%}.wf-col-sm-pull-2{right:16.66667%}.wf-col-sm-pull-3{right:25%}.wf-col-sm-pull-4{right:33.33333%}.wf-col-sm-pull-5{right:41.66667%}.wf-col-sm-pull-6{right:50%}.wf-col-sm-pull-7{right:58.33333%}.wf-col-sm-pull-8{right:66.66667%}.wf-col-sm-pull-9{right:75%}.wf-col-sm-pull-10{right:83.33333%}.wf-col-sm-pull-11{right:91.66667%}.wf-col-sm-pull-12{right:100%}.wf-col-sm-push-0{left:auto}.wf-col-sm-push-1{left:8.33333%}.wf-col-sm-push-2{left:16.66667%}.wf-col-sm-push-3{left:25%}.wf-col-sm-push-4{left:33.33333%}.wf-col-sm-push-5{left:41.66667%}.wf-col-sm-push-6{left:50%}.wf-col-sm-push-7{left:58.33333%}.wf-col-sm-push-8{left:66.66667%}.wf-col-sm-push-9{left:75%}.wf-col-sm-push-10{left:83.33333%}.wf-col-sm-push-11{left:91.66667%}.wf-col-sm-push-12{left:100%}.wf-col-sm-offset-0{margin-left:0%}.wf-col-sm-offset-1{margin-left:8.33333%}.wf-col-sm-offset-2{margin-left:16.66667%}.wf-col-sm-offset-3{margin-left:25%}.wf-col-sm-offset-4{margin-left:33.33333%}.wf-col-sm-offset-5{margin-left:41.66667%}.wf-col-sm-offset-6{margin-left:50%}.wf-col-sm-offset-7{margin-left:58.33333%}.wf-col-sm-offset-8{margin-left:66.66667%}.wf-col-sm-offset-9{margin-left:75%}.wf-col-sm-offset-10{margin-left:83.33333%}.wf-col-sm-offset-11{margin-left:91.66667%}.wf-col-sm-offset-12{margin-left:100%}.wf-col-sm-half-padding-left{padding-left:8px}.wf-col-sm-half-padding-right{padding-right:7px}}@media (min-width: 992px){.wf-col-md-1,.wf-col-md-2,.wf-col-md-3,.wf-col-md-4,.wf-col-md-5,.wf-col-md-6,.wf-col-md-7,.wf-col-md-8,.wf-col-md-9,.wf-col-md-10,.wf-col-md-11,.wf-col-md-12{float:left}.wf-col-md-1{width:8.33333%}.wf-col-md-2{width:16.66667%}.wf-col-md-3{width:25%}.wf-col-md-4{width:33.33333%}.wf-col-md-5{width:41.66667%}.wf-col-md-6{width:50%}.wf-col-md-7{width:58.33333%}.wf-col-md-8{width:66.66667%}.wf-col-md-9{width:75%}.wf-col-md-10{width:83.33333%}.wf-col-md-11{width:91.66667%}.wf-col-md-12{width:100%}.wf-col-md-pull-0{right:auto}.wf-col-md-pull-1{right:8.33333%}.wf-col-md-pull-2{right:16.66667%}.wf-col-md-pull-3{right:25%}.wf-col-md-pull-4{right:33.33333%}.wf-col-md-pull-5{right:41.66667%}.wf-col-md-pull-6{right:50%}.wf-col-md-pull-7{right:58.33333%}.wf-col-md-pull-8{right:66.66667%}.wf-col-md-pull-9{right:75%}.wf-col-md-pull-10{right:83.33333%}.wf-col-md-pull-11{right:91.66667%}.wf-col-md-pull-12{right:100%}.wf-col-md-push-0{left:auto}.wf-col-md-push-1{left:8.33333%}.wf-col-md-push-2{left:16.66667%}.wf-col-md-push-3{left:25%}.wf-col-md-push-4{left:33.33333%}.wf-col-md-push-5{left:41.66667%}.wf-col-md-push-6{left:50%}.wf-col-md-push-7{left:58.33333%}.wf-col-md-push-8{left:66.66667%}.wf-col-md-push-9{left:75%}.wf-col-md-push-10{left:83.33333%}.wf-col-md-push-11{left:91.66667%}.wf-col-md-push-12{left:100%}.wf-col-md-offset-0{margin-left:0%}.wf-col-md-offset-1{margin-left:8.33333%}.wf-col-md-offset-2{margin-left:16.66667%}.wf-col-md-offset-3{margin-left:25%}.wf-col-md-offset-4{margin-left:33.33333%}.wf-col-md-offset-5{margin-left:41.66667%}.wf-col-md-offset-6{margin-left:50%}.wf-col-md-offset-7{margin-left:58.33333%}.wf-col-md-offset-8{margin-left:66.66667%}.wf-col-md-offset-9{margin-left:75%}.wf-col-md-offset-10{margin-left:83.33333%}.wf-col-md-offset-11{margin-left:91.66667%}.wf-col-md-offset-12{margin-left:100%}.wf-col-md-half-padding-left{padding-left:8px}.wf-col-md-half-padding-right{padding-right:7px}}@media (min-width: 1200px){.wf-col-lg-1,.wf-col-lg-2,.wf-col-lg-3,.wf-col-lg-4,.wf-col-lg-5,.wf-col-lg-6,.wf-col-lg-7,.wf-col-lg-8,.wf-col-lg-9,.wf-col-lg-10,.wf-col-lg-11,.wf-col-lg-12{float:left}.wf-col-lg-1{width:8.33333%}.wf-col-lg-2{width:16.66667%}.wf-col-lg-3{width:25%}.wf-col-lg-4{width:33.33333%}.wf-col-lg-5{width:41.66667%}.wf-col-lg-6{width:50%}.wf-col-lg-7{width:58.33333%}.wf-col-lg-8{width:66.66667%}.wf-col-lg-9{width:75%}.wf-col-lg-10{width:83.33333%}.wf-col-lg-11{width:91.66667%}.wf-col-lg-12{width:100%}.wf-col-lg-pull-0{right:auto}.wf-col-lg-pull-1{right:8.33333%}.wf-col-lg-pull-2{right:16.66667%}.wf-col-lg-pull-3{right:25%}.wf-col-lg-pull-4{right:33.33333%}.wf-col-lg-pull-5{right:41.66667%}.wf-col-lg-pull-6{right:50%}.wf-col-lg-pull-7{right:58.33333%}.wf-col-lg-pull-8{right:66.66667%}.wf-col-lg-pull-9{right:75%}.wf-col-lg-pull-10{right:83.33333%}.wf-col-lg-pull-11{right:91.66667%}.wf-col-lg-pull-12{right:100%}.wf-col-lg-push-0{left:auto}.wf-col-lg-push-1{left:8.33333%}.wf-col-lg-push-2{left:16.66667%}.wf-col-lg-push-3{left:25%}.wf-col-lg-push-4{left:33.33333%}.wf-col-lg-push-5{left:41.66667%}.wf-col-lg-push-6{left:50%}.wf-col-lg-push-7{left:58.33333%}.wf-col-lg-push-8{left:66.66667%}.wf-col-lg-push-9{left:75%}.wf-col-lg-push-10{left:83.33333%}.wf-col-lg-push-11{left:91.66667%}.wf-col-lg-push-12{left:100%}.wf-col-lg-offset-0{margin-left:0%}.wf-col-lg-offset-1{margin-left:8.33333%}.wf-col-lg-offset-2{margin-left:16.66667%}.wf-col-lg-offset-3{margin-left:25%}.wf-col-lg-offset-4{margin-left:33.33333%}.wf-col-lg-offset-5{margin-left:41.66667%}.wf-col-lg-offset-6{margin-left:50%}.wf-col-lg-offset-7{margin-left:58.33333%}.wf-col-lg-offset-8{margin-left:66.66667%}.wf-col-lg-offset-9{margin-left:75%}.wf-col-lg-offset-10{margin-left:83.33333%}.wf-col-lg-offset-11{margin-left:91.66667%}.wf-col-lg-offset-12{margin-left:100%}.wf-col-lg-half-padding-left{padding-left:8px}.wf-col-lg-half-padding-right{padding-right:7px}}.wrap.wordfence{direction:ltr}@media (min-width: 768px){.wrap.wordfence{max-width:750px}}@media (min-width: 992px){.wrap.wordfence{max-width:970px}}@media (min-width: 1200px){.wrap.wordfence{max-width:1170px}}.wrap.wordfence>.wf-container-fluid{padding-left:0px;padding-right:0px}.wrap.wordfence .button-primary{text-align:center;text-transform:uppercase;font-weight:bold}.wrap.wordfence a{text-decoration:none}.wrap.wordfence a:hover{text-decoration:underline}.wrap.wordfence a.wf-btn:hover{text-decoration:none}.wrap.wordfence p,.wrap.wordfence td,.wrap.wordfence li{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wrap.wordfence p strong,.wrap.wordfence td strong,.wrap.wordfence li strong{font-weight:600}.wrap.wordfence p em,.wrap.wordfence td em,.wrap.wordfence li em{font-weight:normal}.wrap.wordfence h1,.wrap.wordfence h2,.wrap.wordfence h3,.wrap.wordfence h4,.wrap.wordfence h5,.wrap.wordfence h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:700}.wrap.wordfence h2{font-size:1.3125rem;line-height:1.5}.wrap.wordfence h3{font-size:1.125rem}.wrap.wordfence h4{font-size:1rem}.wf-inline-help{color:#9f9fa0}.wordfenceWrap{margin:20px 0 0 20px}.wordfence-icon32{width:32px;height:32px;background-position:0 0;background-repeat:no-repeat;padding:0;margin:7px 5px 0 0;float:left}#wfHeading:after{content:'.';visibility:hidden;display:block;clear:both;height:0px}.wordfence-lock-icon{width:32px;height:32px}a.wfhelp{margin:0 3px 0 3px;text-decoration:none;display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased}a.wfhelp:before{content:'\f29c'}.wordfence .resulticon{display:block;float:left;width:16px;height:16px;background-position:0 0;background-repeat:no-repeat;border-width:0;padding:0;margin:0 3px 0 0;background-image:url(../images/icons/bullet_yellow.png)}.wordfenceBoldTD{font-weight:bold}.wfAjax24{display:none;width:24px;height:24px;background-image:url(../images/icons/ajax24.gif);margin:0;padding:0}div.wfLoadingWhite32{width:32px;height:32px;background-image:url(../images/icons/ajaxWhite32x32.gif);margin:0;padding:0}.wfTabsContainer{background-color:#FFF;overflow:hidden;border:1px solid #CCC;padding:15px;min-height:200px;-webkit-font-smoothing:antialiased}#wfTabs::after{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}#wfTabs a{float:left;z-index:10;height:18px;margin:0 5px -1px 0;padding:5px 8px;border:1px solid #CCC;text-decoration:none;background-color:#EFEFEF;color:#21759B;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}#wfTabs a.selected{border-bottom:1px solid #FFF;background-color:#FFF;color:#777}.wordfenceTopTab{display:none;margin-top:15px}.wordfenceTopTab.active{display:block}.wordfenceHelpLink{margin-top:15px}.wfAjaxLight128{background-image:url(../images/icons/ajax3.gif)}.wfStrong{font-weight:bold}.wordfenceModeElem{width:1px;height:1px;opacity:0}.wfWarn{color:#F00}.wf-flag{display:inline-block;vertical-align:middle;margin:0px 2px 0 0;background-repeat:no-repeat;background-position:center center;width:16px;height:11px;background-image:url(../images/flags.png);-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0}.wfHitTime{font-style:italic}.wfAvatar img{vertical-align:middle;margin-right:0.5rem}.wf-hex-sequence{color:#587ECB}.wfLoadMoreButton.disabled,.wfLoadMoreButton[disabled]{pointer-events:none;opacity:0.65}table.wfConfigForm th{font-weight:normal;text-align:left;padding:2px 3px 1px 0;vertical-align:middle}table.wfConfigForm td{vertical-align:middle}table.wfConfigForm td.align-top{vertical-align:top}table th.wfConfigEnable{font-weight:bold;min-width:25%}.wfSavedMsg{display:none;color:#A00}table th.wfSubheading{font-weight:bold;padding-top:10px}h3.wfConfigHeading{font-size:22px;color:#777;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:italic;font-weight:normal}.wfTipText{color:#777;font-family:Georgia,Times New Roman,Times,serif;font-style:italic}.wfBlackCursor{color:#FFF}.wf-spinner{display:inline-block;width:4px}.wferror{color:#F00}#wordfenceWorking{padding:10px 40px 6px 16px;z-index:100000;position:fixed;right:16px;bottom:0px;background-color:#fcb214;border:5px solid #fcb214;border-width:6px 15px 6px 6px;color:#525355;font-size:12px;font-weight:bold;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;background-image:url("../images/icons/working-indicator.gif");background-position:100% 50%;background-repeat:no-repeat}@media (max-width: 960px){#wordfenceWorking{left:auto;right:0px}}#paidWrap{position:relative}.paidInnerMsg{width:500px;margin:150px auto 0 auto;color:#000;font-size:18px;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.8em;text-align:center;-webkit-font-smoothing:antialiased}.wfMarker{height:1px;width:1px}.wfPaidOnlyNotice{width:500px;background-color:#FFFFE0;border:1px solid #000;padding:10px;margin:20px}.wfOnOffSwitch{display:inline-block;position:relative !important;width:69px !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important}.wfOnOffSwitch-checkbox{display:none !important}.wfOnOffSwitch-label{display:block !important;overflow:hidden !important;cursor:pointer !important;border:2px solid #999999 !important;border-radius:19px !important;margin:0}.wfOnOffSwitch-inner{width:200% !important;margin-left:-100% !important;-webkit-transition:margin 0.3s ease-in !important;-o-transition:margin 0.3s ease-in !important;transition:margin 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important}.wfOnOffSwitch-inner:before,.wfOnOffSwitch-inner:after{float:left !important;width:50% !important;height:19px !important;padding:0 !important;line-height:19px !important;font-size:14px !important;color:white !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif !important;font-weight:bold !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;-webkit-box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important;box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important}.wfOnOffSwitch-inner:before{content:"ON" !important;padding-left:10px !important;background-color:#30D965 !important;color:#FFFFFF !important;-moz-border-radius:19px 0 0 19px !important;-webkit-border-radius:19px;border-radius:19px 0 0 19px !important}.wfOnOffSwitch-inner:after{content:"OFF" !important;padding-right:10px !important;background-color:#EEEEEE !important;color:#999999 !important;text-align:right !important;-moz-border-radius:0 19px 19px 0 !important;-webkit-border-radius:0;border-radius:0 19px 19px 0 !important}.wfOnOffSwitch-switch{width:19px !important;margin:0 !important;background:#FFFFFF !important;border:2px solid #999999 !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;position:absolute !important;top:0 !important;bottom:0 !important;right:46px !important;-webkit-transition:all 0.3s ease-in !important;-o-transition:all 0.3s ease-in !important;transition:all 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjgwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=') !important;background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0.1)),color-stop(80%, rgba(0,0,0,0))) !important;background-image:-moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:-webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:linear-gradient(to center bottom, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;box-shadow:0 1px 1px white inset !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-inner{margin-left:0 !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-switch{right:0 !important}#wordfenceConfigWarning,#wordfenceAdminEmailWarning{clear:left;margin-top:5px}.wf-striped-table{width:100%;max-width:100%;border-collapse:collapse}.wf-striped-table th{border-left:1px solid #bdbdbd}.wf-striped-table th:first-of-type{border-left:0}.wf-striped-table th,.wf-striped-table td{padding:1rem}.wf-striped-table thead th,.wf-striped-table thead td,.wf-striped-table tfoot th,.wf-striped-table tfoot td,.wf-striped-table tbody.thead th,.wf-striped-table tbody.thead td{background-color:#ebebeb;color:#777;font-weight:bold;text-align:left}.wf-striped-table tbody tr.even td,.wf-striped-table tbody tr:nth-child(2n) td{background-color:#ffffff}.wf-striped-table tbody tr td,.wf-striped-table tbody tr.odd td{background-color:#fafafa}.wf-striped-table tbody tr:hover>td{background-color:#fffbd8}.wf-striped-table tbody.empty-row tr td{border-width:0;padding:8px 0;background-color:transparent}.wf-striped-table .wf-result-error,.wf-block-list .wf-result-error{color:#d0514c !important;font-weight:bold}.wf-striped-table .wf-result-error:before,.wf-block-list .wf-result-error:before{content:"\2718"}.wf-striped-table .wf-result-success{max-width:20%}.wf-striped-table .wf-result-success,.wf-block-list .wf-result-success{color:#008c10 !important;font-weight:bold}.wf-striped-table .wf-result-success:before,.wf-block-list .wf-result-success:before{content:"\2713"}.wf-striped-table .wf-result-success:before,.wf-block-list .wf-result-success:before,.wf-striped-table .wf-result-error:before,.wf-block-list .wf-result-error:before{font-size:16px;display:inline-block;margin:0px 8px 0px 0px}.wf-striped-table .wf-result-inactive,.wf-block-list .wf-result-inactive{font-weight:bold;color:#666666 !important}.wf-fixed-table{table-layout:fixed}pre.wf-pre{margin:8px 0 20px;padding:12px;background:#ffffff;border:1px solid #999999;overflow:auto}.wf-center{text-align:center}#wfConfigForm,.wf-diagnostics-wrapper{max-width:1035px}.wf-hidden{display:none !important}.wf-card{position:relative;margin:0 auto .625rem;padding:1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wf-card .wf-card-inner{min-height:76px;width:100%;padding:8px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}.wf-card .wf-card-inner .wf-card-content{max-width:75%}.wf-card .wf-card-inner .wf-card-content .wf-card-title{font-size:1.125rem;width:100%}.wf-card .wf-card-inner .wf-card-content .wf-card-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.875rem;color:#4f748e}.wf-card .wf-card-inner .wf-card-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-card .wf-card-inner .wf-card-action .wf-card-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wf-card .wf-card-inner .wf-card-action .wf-card-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-card .wf-card-inner .wf-card-action .wf-card-action-checkbox.checked{background-position:right center}.wf-card .wf-card-extra{display:none;padding:0.5rem;margin-top:1rem;border-top:1px solid #f3f6f8}@media (min-width: 768px){.wf-card .wf-card-extra{padding:1rem}}.wf-card.active .wf-card-extra{display:block}.wf-card.wf-card-left .wf-card-content{margin-left:48px}.wf-card.wf-card-left .wf-card-action{right:auto;left:0px}.wf-card.disabled .wf-card-content .wf-card-title{color:#aaaaaa}.wf-card.disabled .wf-card-content .wf-card-subtitle{color:#8ea6be}.wf-inline-block{display:inline-block}@media (max-width: 767px){.wf-inline-block-xs{display:inline-block}}.wf-full-width{width:100%;max-width:100%}.wf-no-top{margin-top:0 !important}.wf-add-top{margin-top:1rem !important}.wf-add-top-large{margin-top:1.5rem !important}.wf-add-top-medium{margin-top:0.75rem !important}.wf-add-top-small{margin-top:0.5rem !important}.wf-add-top-smaller{margin-top:0.25rem !important}.wf-no-bottom{margin-bottom:0 !important}.wf-add-bottom{margin-bottom:1rem !important}.wf-add-bottom-large{margin-bottom:1.5rem !important}.wf-add-bottom-medium{margin-bottom:0.75rem !important}.wf-add-bottom-small{margin-bottom:0.5rem !important}.wf-add-bottom-smaller{margin-bottom:0.25rem !important}.wf-padding-no-top{padding-top:0 !important}.wf-no-right{margin-right:0 !important}.wf-padding-no-bottom{padding-bottom:0 !important}.wf-padding-no-left{padding-left:0 !important}.wf-padding-no-right{padding-right:0 !important}.wf-padding-add-top{padding-top:1rem !important}.wf-padding-add-top-small{padding-top:0.5rem !important}.wf-padding-add-top-medium{padding-top:0.75rem !important}.wf-padding-add-top-large{padding-top:1.5rem !important}.wf-padding-add-bottom{padding-bottom:1rem !important}.wf-padding-add-bottom-small{padding-bottom:0.5rem !important}.wf-padding-add-bottom-medium{padding-bottom:0.75rem !important}.wf-padding-add-bottom-large{padding-bottom:1.5rem !important}.wf-padding-add-left{padding-left:1rem !important}.wf-padding-add-left-small{padding-left:0.5rem !important}.wf-padding-add-left-medium{padding-left:0.75rem !important}.wf-padding-add-left-large{padding-left:1.5rem !important}.wf-padding-add-right{padding-right:1rem !important}.wf-padding-add-right-small{padding-right:0.5rem !important}.wf-padding-add-right-medium{padding-right:0.75rem !important}.wf-padding-add-right-large{padding-right:1.5rem !important}.wf-left{text-align:left !important}.wf-center{text-align:center !important}.wf-block-center{margin:0 auto}.wf-right{text-align:right !important}.wf-block-right{margin:0 0 0 auto}@media (max-width: 767px){.wf-left-xs{text-align:left !important}.wf-center-xs{text-align:center !important}.wf-padding-add-top-xs{padding-top:1rem !important}.wf-padding-add-top-xs-small{padding-top:0.5rem !important}.wf-padding-add-top-xs-large{padding-top:1.5rem !important}.wf-padding-add-bottom-xs{padding-bottom:1rem !important}.wf-padding-add-bottom-xs-small{padding-bottom:0.5rem !important}.wf-padding-add-bottom-xs-large{padding-bottom:1.5rem !important}}@media (min-width: 768px) and (max-width: 991px){.wf-left-sm{text-align:left !important}.wf-center-sm{text-align:center !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-left-md{text-align:left !important}.wf-center-md{text-align:center !important}.wf-right-md{text-align:right !important}}@media (min-width: 1200px){.wf-left-lg{text-align:left !important}.wf-center-lg{text-align:center !important}.wf-right-lg{text-align:right !important}}.wf-border-no-top{border-top:none !important}.wf-border-no-right{border-right:none !important}.wf-border-no-bottom{border-bottom:none !important}.wf-border-no-left{border-left:none !important}.wf-overflow-x-auto{overflow-x:auto}.wf-overflow-y-auto{overflow-y:auto}@media (max-width: 767px){.wf-overflow-x-auto-xs{overflow-x:auto}.wf-overflow-y-auto-xs{overflow-y:auto}}.wf-gray-dark{color:#2d2d2d !important}.wf-gray-blue{color:#3f596b !important}.wf-green-dark{color:#11967a !important}.wf-green-light{color:#16bc9b !important}.wf-red-dark{color:#930000 !important}.wf-red-light{color:#c10000 !important}.wf-yellow-dark{color:#fcb214 !important}.wf-yellow-light{color:#ffd10a !important}.wf-gray{color:#525355 !important}.wf-gray-light{color:#9f9fa0 !important}.wf-nowrap{white-space:nowrap}.wf-tip{color:#fcb214;font-size:1.1rem;margin-right:0.25rem}.wf-text-small{font-size:80%}.wf-scroll-x::-webkit-scrollbar,.wf-scroll-y::-webkit-scrollbar{-webkit-appearance:none;width:7px;height:7px}.wf-scroll-x::-webkit-scrollbar-thumb,.wf-scroll-y::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,0.194);-webkit-box-shadow:0 0 1px rgba(255,255,255,0.5)}.wf-split-word{word-wrap:break-word;word-break:break-all}@media (max-width: 767px){.wf-split-word-xs{word-wrap:break-word;word-break:break-all;white-space:normal !important}}.wfselect2-container{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;min-width:200px}@media (min-width: 768px){.wfselect2-container{min-width:280px}}@media (min-width: 992px){.wfselect2-container{min-width:340px}}@media (max-width: 767px){.wfselect2-container .wfselect2-search.wfselect2-search--inline{margin:0 !important}}.wf-select2-placeholder-fix .wfselect2-search__field{width:auto !important}#wf-all-options-search .wfselect2-container{min-width:250px}#wf-all-options-search .wf-select2-placeholder-fix .wfselect2-search__field{margin-top:10px !important}.wf-page-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;margin-top:0.5rem}.wf-page-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-page-title>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px;padding-right:0.25rem}.wf-page-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wf-page-title h2{padding:0 !important}.wf-page-title .wfOnOffSwitch{-webkit-flex-basis:69px;flex-basis:69px;-webkit-flex-shrink:0;flex-shrink:0;margin-left:0.5rem}.wf-tab-container{background-color:#fff}@media (min-width: 768px){.wf-tab-container{background-color:unset}}.wf-page-tabs,.wf-page-fixed-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;border-bottom:1px solid #d0d0d0;margin:0;margin-top:0.5rem;margin-left:-10px;margin-right:-10px}@media (min-width: 768px){.wf-page-tabs,.wf-page-fixed-tabs{margin-left:0;margin-right:0}}.wf-page-tabs>*,.wf-page-fixed-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-page-tabs>*:first-child,.wf-page-fixed-tabs>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px}.wf-page-tabs .wordfence-icon32,.wf-page-fixed-tabs .wordfence-icon32{margin:0;margin-right:0.5rem;margin-left:0.5rem}@media (min-width: 768px){.wf-page-tabs .wordfence-icon32,.wf-page-fixed-tabs .wordfence-icon32{margin-left:0}}.wf-page-tabs .wf-text-tab,.wf-page-fixed-tabs .wf-text-tab{margin:0;margin-left:0.5rem;color:#333}.wf-page-tabs .wf-tab,.wf-page-fixed-tabs .wf-tab{border:1px solid #fff;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin-bottom:-1px;margin-right:0.5rem;color:#333}@media (min-width: 768px){.wf-page-tabs .wf-tab,.wf-page-fixed-tabs .wf-tab{border:1px solid #d0d0d0;background:#e6e6e6}}.wf-page-tabs .wf-tab a,.wf-page-fixed-tabs .wf-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;-webkit-box-shadow:none;box-shadow:none}.wf-tab-content{display:none;margin-top:15px}.wf-tab-content.wf-active{display:block}.wf-fixed-tab-content{margin-top:15px}.wf-section-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start}.wf-section-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-section-title>h1,.wf-section-title>h2,.wf-section-title>h3,.wf-section-title>h4,.wf-section-title>h5,.wf-section-title>h6{-webkit-flex-grow:1;flex-grow:1;color:#2d2d2d !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif !important;line-height:1.5rem !important;font-weight:700 !important;padding:0 !important;margin:0 !important}@media (min-width: 768px){.wf-section-title>h1,.wf-section-title>h2,.wf-section-title>h3,.wf-section-title>h4,.wf-section-title>h5,.wf-section-title>h6{padding-right:0.25rem !important}}.wf-section-title h2{font-size:1.3125rem;line-height:1.5}.wf-section-title h3{font-size:1.125rem}.wf-section-title h4{font-size:1rem}.wf-section-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wf-status-circular{position:relative}.wf-status-circular-text{position:absolute;left:50%;top:50%;padding:0;margin:0;transform:translate(-50%, -50%);color:#aaa;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wf-status-circular .wf-status-overlay-text{position:absolute;left:50%;top:50%;padding:0;margin:0;width:200%;text-align:center;transform:translate(-50%, -50%);font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;font-weight:normal;line-height:1.3125;opacity:0.0;color:#777}.wf-status-warning,.wf-status-critical,.wf-status-payment-expiring,.wf-status-renewing{width:100px;height:100px;margin-bottom:1rem}.wf-status-warning svg path{fill:#fcb214}.wf-status-critical svg path{fill:#930000}.wf-status-payment-expiring svg rect,.wf-status-payment-expiring svg path{fill:#930000}.wf-status-renewing svg rect,.wf-status-renewing svg path{fill:#11967a}#howGetIPs-preview{color:#8c8c8c}#howGetIPs-preview strong{color:#666}.wf-scrollTop{background:#424242;bottom:30px;right:15px;position:fixed;z-index:999;display:none}.wf-scrollTop a{background:#959595;display:block;padding:4px 5px;line-height:32px;width:32px;color:#ffffff;text-align:center}.wf-back-icon{margin-right:0.75rem;font-size:1.5rem !important}.wf-back-link-chevron{margin-left:1rem}.wf-back-link-chevron:first-of-type{margin-left:0}.wf-back-link{font-weight:bold;text-decoration:none}.wf-premium-link{font-weight:bold}.wf-boolean-switch{border:1px solid #aaa;display:block;cursor:pointer;width:54px;height:30px;min-width:54px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;line-height:30px !important;background-color:#ffffff;position:relative;box-sizing:border-box;transition:background-color 0.2s ease-in-out, border-color 0.2s ease-in-out}@media (min-width: 768px){.wf-boolean-switch{width:34px;height:20px;min-width:34px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}.wf-boolean-switch .wf-boolean-switch-handle{position:relative;display:block;border:1px solid #aaa;background-color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;margin-top:-1px;box-sizing:border-box;left:-1px;transition:border-color 0.2s ease-in-out, left 0.2s ease-in-out}@media (min-width: 768px){.wf-boolean-switch .wf-boolean-switch-handle{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{left:25px}@media (min-width: 768px){.wf-boolean-switch.wf-active .wf-boolean-switch-handle{left:15px}}.wf-boolean-switch.wf-disabled{pointer-events:none;border-color:#e2e2e2}.wf-boolean-switch.wf-disabled .wf-boolean-switch-handle{border-color:#e2e2e2}.wf-boolean-switch.wf-disabled.wf-active{border-color:#e2e2e2;background-color:#e2e2e2}.wf-boolean-switch.wf-disabled.wf-active .wf-boolean-switch-handle{border-color:#e2e2e2}.wf-option-checkbox,[type=checkbox].wf-option-checkbox+label:before{content:'\f3fd';font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px #aaa;color:#ffffff !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wf-option-checkbox,[type=checkbox].wf-option-checkbox+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:25px !important}}@media (min-width: 768px){.wf-option-checkbox{position:relative}.wf-option-checkbox>*{position:absolute;top:9px;left:50%;transform:translateX(-50%) translateY(-50%)}}.wf-option-radio,[type=radio].wf-option-radio+label:before{content:"\f401";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;line-height:30px !important;text-align:center !important;color:#ccc !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wf-option-radio,[type=radio].wf-option-radio+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}[type=checkbox].wf-option-checkbox.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:20px !important}[type=radio].wf-option-radio.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;line-height:21px !important;font-size:20px !important}[type=checkbox].wf-option-checkbox+label:before,[type=radio].wf-option-radio+label:before{text-align:center !important;text-indent:0px;display:inline-block;vertical-align:-6px;margin:0px 5px 0px 0px;font-weight:normal;font-style:normal}[type=checkbox].wf-option-checkbox.wf-small+label:before,[type=radio].wf-option-radio.wf-small+label:before{text-indent:0px;vertical-align:-3px}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{color:#ffffff !important}.wf-option-checkbox.wf-disabled,[type=checkbox].wf-option-checkbox:disabled+label:before{color:#f1f1f1 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wf-option-checkbox.wf-checked.wf-disabled,[type=checkbox].wf-option-checkbox:disabled:checked+label:before{color:#777 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{content:"\f3a7"}.wf-option-checkbox[type=checkbox],.wf-option-checkbox[type=radio],.wf-option-radio[type=checkbox],.wf-option-radio[type=radio]{position:absolute;left:-9999px}.wf-option-text input[type="text"],input.wf-input-text{text-align:left;width:100%;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.65)}.wf-option-text input[type="text"]:placeholder-shown,input.wf-input-text:placeholder-shown{font-style:italic;color:#bfbfbf}::-webkit-input-placeholder{color:#bfbfbf}:-moz-placeholder{color:#bfbfbf;opacity:1}::-moz-placeholder{color:#bfbfbf;opacity:1}:-ms-input-placeholder{color:#bfbfbf}::-ms-input-placeholder{color:#bfbfbf}::placeholder{color:#bfbfbf}.wf-option-premium .wf-option-title,.wf-option-premium .wf-option-title>ul>li,.wf-option.wf-disabled .wf-option-title,.wf-option.wf-disabled .wf-option-title>ul>li{color:#aaa !important}.wf-option-premium .wf-option-checkbox,.wf-option-premium .wf-option-radio,.wf-option.wf-disabled .wf-option-checkbox,.wf-option.wf-disabled .wf-option-radio{opacity:0.5}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label{font-size:1.35rem;font-weight:300;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#9f9fa0}.wf-indeterminate-progress{-webkit-animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite;-o-animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite;animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite}@-moz-keyframes wf-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wf-indeterminate-progress-keyframes{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes wf-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.wf-flex-row{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-flex-row.wf-flex-row-full-height{-webkit-align-items:stretch;align-items:stretch}.wf-flex-row.wf-flex-row-vertical-xs{-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wf-flex-row.wf-flex-row-vertical-xs{-webkit-flex-direction:row;flex-direction:row}}.wf-flex-row .wf-flex-row-1{-webkit-flex-grow:1;flex-grow:1}.wf-flex-row .wf-flex-row-0{-webkit-flex-grow:0;flex-grow:0}.wf-flex-row .wf-flex-col-100,.wf-flex-row .wf-flex-col-xs-100{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:100%;flex-basis:100%;width:100%}@media (min-width: 768px){.wf-flex-row .wf-flex-col-sm-100{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:100%;flex-basis:100%;width:100%}}@media (min-width: 992px){.wf-flex-row .wf-flex-col-md-100{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:100%;flex-basis:100%;width:100%}}@media (min-width: 1200px){.wf-flex-row .wf-flex-col-lg-100{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:100%;flex-basis:100%;width:100%}}.wf-flex-row .wf-flex-col-50,.wf-flex-row .wf-flex-col-xs-50{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:50%;flex-basis:50%;width:50%}@media (min-width: 768px){.wf-flex-row .wf-flex-col-sm-50{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:50%;flex-basis:50%;width:50%}}@media (min-width: 992px){.wf-flex-row .wf-flex-col-md-50{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:50%;flex-basis:50%;width:50%}}@media (min-width: 1200px){.wf-flex-row .wf-flex-col-lg-50{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:50%;flex-basis:50%;width:50%}}.wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}.wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-switch>li.wf-active{color:#ffffff;background-color:#00709e}.wf-tooltip,.ui-widget.wf-tooltip{max-width:600px;font-size:0.75rem;overflow-wrap:break-word;opacity:1.0;background-color:#ffffff;border-radius:0.25rem;padding:0.5rem;box-shadow:0 0 6px rgba(0,0,0,0.6)}.wf-widget-learning-mode{border-top:1px solid #eee;margin:0 -1rem;padding:1rem;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row}@media (min-width: 768px){.wf-widget-learning-mode{padding:1.5rem}}.wf-widget-learning-mode svg{width:18px}.wf-widget-learning-mode svg path{fill:#aaa}.wf-widget-learning-mode span{padding-left:0.5rem;font-size:.875rem;line-height:1.3125;font-weight:600}.wf-drawer-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:160px;background-color:rgba(0,0,0,0.5);z-index:9980;padding:5rem 0}.folded .wf-drawer-overlay{left:36px}@media only screen and (max-width: 960px){.auto-fold .wf-drawer-overlay{left:36px}}.rtl .wf-drawer-overlay{right:160px;left:0px}.rtl .folded .wf-drawer-overlay{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wf-drawer-overlay{right:36px}}@media screen and (max-width: 782px){.wf-drawer-overlay,.folded .wf-drawer-overlay,.auto-fold .wf-drawer-overlay,.rtl .wf-drawer-overlay,.rtl .folded .wf-drawer-overlay,.rtl .auto-fold .wf-drawer-overlay{left:0px;right:0px}}.wf-drawer{background-color:#ffffff;position:fixed;top:32px;bottom:0px;right:0px;z-index:9981}.wf-drawer .wf-modal{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;height:100%}.wf-drawer .wf-modal ul,.wf-drawer .wf-modal li{padding:0;margin:0}.wf-drawer .wf-modal .wf-modal-header{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;color:#ffffff}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content{max-width:75%}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-title{font-size:1.3125rem;line-height:1.5;font-weight:300;width:100%;transition:color 0.2s ease-in}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wf-drawer .wf-modal .wf-modal-content{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;padding:1rem}.wf-drawer .wf-modal .wf-modal-content>*:first-child{margin-top:0}.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.9rem}}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__arrow,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__arrow,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}.wf-drawer .wf-modal .wf-modal-footer{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#f1f1f1;border-top:1px solid #d9d9d9}.wf-mobile-menu-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:100000}.wf-mobile-menu-overlay>.wf-mobile-menu-tap-hint{position:absolute;top:25%;left:50%;transform:translateX(-50%);color:#ffffff;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wf-mobile-menu{position:fixed;left:50%;transform:translateX(-50%);z-index:100001}.wf-mobile-menu>.wf-mobile-menu-items{margin:0;padding:0 0 0.25rem 0;list-style:none}.wf-mobile-menu>.wf-mobile-menu-items>li{margin:0;padding:0.25rem 0}.wf-mobile-menu>.wf-mobile-menu-items>li>a{box-sizing:border-box}.wf-circle-tooltip.ui-tooltip{padding:0;font-size:0.7rem;max-width:400px;border:1px solid #9f9fa0;position:absolute !important;z-index:3000;opacity:1.0;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.wf-circle-tooltip.ui-tooltip h4{margin:0 0 10px}.wf-circle-tooltip.ui-tooltip ul{margin:10px 0}.wf-circle-tooltip.ui-tooltip p{font-size:0.7rem;margin:10px 0 0}.wf-circle-tooltip.ui-tooltip a{text-decoration:none}.wf-circle-tooltip.ui-tooltip a:hover{text-decoration:underline}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header,.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body{padding:12px}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header{-moz-border-radius:6px 6px 0px 0px;-webkit-border-radius:6px;border-radius:6px 6px 0px 0px;background-color:#f1f1f1}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header h4{margin:0;font-size:0.8rem}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body .wf-tooltip-status-circle{position:relative;padding:0 10px 0 0}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body .wf-tooltip-status-circle .wf-status-overlay-text{display:none}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body ul li strong{width:20%}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body ul li span{width:80%}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-block{position:relative;background-color:#fff;z-index:3001;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-block:after{content:'';position:absolute;bottom:-20px;left:20px;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid #fff}.wf-circle-tooltip.ui-tooltip:after{content:'';position:absolute;bottom:-22px;left:18px;width:0;height:0;border-left:22px solid transparent;border-right:22px solid transparent;border-top:22px solid rgba(0,0,0,0.5);filter:blur(2px)}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top:after{top:-22px;bottom:auto;border-left:22px solid transparent;border-right:22px solid transparent;border-bottom:22px solid rgba(0,0,0,0.5);border-top-width:0}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top .wf-circle-tooltip-block:after{top:-20px;bottom:auto;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:20px solid #f1f1f1;border-top-width:0}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top.wf-tooltip-horizontal-right:after{left:auto;right:18px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top.wf-tooltip-horizontal-right .wf-circle-tooltip-block:after{left:auto;right:20px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-bottom.wf-tooltip-horizontal-right:after{left:auto;right:18px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-bottom.wf-tooltip-horizontal-right .wf-circle-tooltip-block:after{left:auto;right:20px}#wf-mobile-controls{white-space:nowrap;font-size:1.2rem}.wf-callout-warning{background-color:#feecc4;padding:0.8rem 1.25rem}.wf-tip-light-bulb{color:#fcb214;font-size:1.5rem;font-weight:bold}.wf-tip-info-message{padding-left:0.5rem !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wf-overdue-cron td{background-color:#fff4f4 !important}.wf-inline-notice{background:#ffffff;border:1px solid #ccd0d4;border-left-color:#ffb900;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,0.04);padding:8px 12px;display:flex;justify-content:flex-start;align-items:center}.wf-inline-notice>*{flex-grow:1}.wf-inline-notice:first-child{flex-grow:0;flex-shrink:0}.wf-inline-notice span{padding-left:0.5rem}.wf-block{position:relative;margin:0 auto 0.5rem;padding:0 1rem;box-sizing:border-box;background-color:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3}@media (min-width: 768px){.wf-block{padding:0 1.5rem}}.wf-block.wf-block-no-padding{padding:0}.wf-block.wf-block-transparent{background-color:transparent;box-shadow:none}.wf-block .wf-block-banner{min-height:44px;margin:0 -1rem;padding:0;box-sizing:border-box;position:relative;background-color:#fcb214;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row}.wf-block .wf-block-banner>li{margin:0;padding:0.75rem 1rem}@media (min-width: 768px){.wf-block .wf-block-banner{margin:0 -1.5rem}.wf-block .wf-block-banner>li{padding:0.75rem 1.5rem}}.wf-block .wf-block-header{min-height:44px;padding:1rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wf-block .wf-block-header .wf-block-header-content{max-width:75%}.wf-block .wf-block-header .wf-block-header-content .wf-block-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;width:100%;transition:color 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-content .wf-block-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:0.775rem}.wf-block .wf-block-header .wf-block-header-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text{width:auto}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-success{color:#11967a}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-warning{color:#930000}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-warning a{color:#930000}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzc3NyIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center;width:12px;height:12px;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),background 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-checkbox.wf-checked{background-position:right center}.wf-block .wf-block-content{display:none;margin:0 -1rem;padding:0 1rem}@media (min-width: 768px){.wf-block .wf-block-content{margin:0 -1.5rem;padding:0 1.5rem}}.wf-block .wf-block-content .wf-block-list{margin:0 -1rem;padding:0;list-style:none}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list{margin:0 -1.5rem}}.wf-block .wf-block-content .wf-block-list.wf-block-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wf-block .wf-block-content .wf-block-list.wf-block-list-striped>li:nth-of-type(even){background-color:#ffffff}.wf-block .wf-block-content .wf-block-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #e2e2e2;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list>li{padding:0 1.5rem}}.wf-block .wf-block-content .wf-block-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #e2e2e2}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-nowrap{overflow-y:auto;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-nowrap>li{-webkit-flex-shrink:0;flex-shrink:0}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-horizontal-5>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:20%;flex-basis:20%}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-equal>li{max-width:50%}}@media (min-width: 992px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-equal>li{max-width:25%}}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-horizontal-5.wf-block-list-equal>li{max-width:20%}.wf-block .wf-block-content .wf-block-list .wf-block-list-state{text-align:center}@media (min-width: 1200px){.wf-block .wf-block-content .wf-block-list .wf-block-list-state{text-align:left}}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-enabled .wf-fa{color:#11967a}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-disabled .wf-fa{color:#525355}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-premium{color:#9f9fa0}.wf-block .wf-block-content .wf-block-list .wf-block-list-dismiss{padding-left:2rem;font-size:1.25rem}.wf-block .wf-block-content .wf-block-list .wf-block-list-dismiss a{color:#525355}.wf-block .wf-block-content:first-child>.wf-block-list>li:first-child{border-top:none}.wf-block .wf-block-content .wf-block-left-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-left-right{margin:0 -1.5rem}}.wf-block .wf-block-content .wf-block-left-right.wf-block-left-right-nowrap{-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-left-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wf-block .wf-block-content .wf-block-left-right>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-block .wf-block-content .wf-block-left-right>li.wf-left{text-align:left}.wf-block .wf-block-content .wf-block-left-right>li.wf-right{text-align:right}.wf-block .wf-block-content .wf-block-left-center-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:center;align-content:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-left-center-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:33.3333%;flex-basis:33.3333%;max-width:33.3333%}.wf-block .wf-block-content .wf-block-left-center-right>li a{text-decoration:none;font-size:.875rem}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-left{text-align:left}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-center{text-align:center;-webkit-justify-content:center;justify-content:center}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-center .wordfence-icon32{margin:0}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-right{text-align:right;-webkit-justify-content:flex-end;justify-content:flex-end}.wf-block .wf-block-content .wf-block-labeled-value{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-labeled-value{margin:0 -1.5rem;padding:1.5rem}}.wf-block .wf-block-content .wf-block-labeled-value-value{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wf-block .wf-block-content .wf-block-labeled-value-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wf-block.wf-block-no-header .wf-block-content .wf-block-list>li{border-top:none}.wf-block.wf-active .wf-block-content,.wf-block.wf-always-active .wf-block-content{display:block}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-header-action>.wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzAwNzA5ZSIvPgo8L3N2Zz4=") !important;transform:rotate(90deg)}.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-title,.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-subtitle{color:#bfbfbf !important}.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-header-action>.wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iI2JkYmRiZCIvPgo8L3N2Zz4=") !important;transform:rotate(0deg)}.wf-block.wf-disabled>.wf-block-content{display:none !important}.wf-block.wf-block-header-left .wf-block-header-content{margin-left:48px}.wf-block.wf-block-header-left .wf-block-header-action{right:auto;left:0px}.wf-block.wf-disabled .wf-dashboard-item-content .wf-block-title{color:#aaaaaa}.wf-block.wf-disabled .wf-dashboard-item-content .wf-block-subtitle{color:#8ea6be}.wf-section-title{margin-bottom:1rem}.wf-status-detail{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}.wf-status-detail p{margin:0 0 0.45rem 0}.wf-status-detail .wf-status-circular{margin-bottom:1rem}.wf-status-detail .wf-status-detail-title{font-weight:700 !important;font-size:1rem !important;line-height:1.3125 !important}.wf-status-detail .wf-status-detail-subtitle{font-size:.875rem !important;line-height:1.3125 !important;font-weight:normal !important;text-align:center}.wf-status-detail .wf-status-detail-link>a{font-weight:600 !important;font-size:0.85rem !important}.wf-block-navigation-option{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block-navigation-option svg.wf-block-navigation-option-icon{width:50px;min-width:50px;fill:#9f9fa0}.wf-block-navigation-option:hover{cursor:pointer}.wf-block-navigation-option:hover a{text-decoration:underline}.wf-select-group{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-select-group .wfselect2-container{min-width:200px}@media (max-width: 767px){.wf-select-group .wfselect2-container{max-width:100px}}.wf-select-group .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wf-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}.wf-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wf-select-group .wf-form-control{display:inline-block;width:auto;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.wf-flex-horizontal{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important}.wf-flex-horizontal>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-horizontal.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-horizontal.wf-flex-align-right{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.wf-flex-horizontal.wf-flex-full-width{width:100%}.wf-flex-horizontal.wf-flex-full-width>*:last-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-first>*:first-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-first>*:last-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-all>*:first-child,.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-all>*{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal>li{padding:0;margin:0}.wf-flex-vertical{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-flex-vertical>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-vertical.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-vertical.wf-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wf-flex-vertical.wf-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}@media (max-width: 767px){.wf-flex-vertical.wf-flex-align-left-xs{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 768px) and (max-width: 991px){.wf-flex-vertical.wf-flex-align-left-sm{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-flex-vertical.wf-flex-align-left-md{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 1200px){.wf-flex-vertical.wf-flex-align-left-lg{-webkit-align-items:flex-start !important;align-items:flex-start !important}}.wf-flex-vertical>li{padding:0;margin:0}@media (max-width: 767px){.wf-flex-vertical-xs{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-flex-vertical-xs>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-vertical-xs.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-vertical-xs.wf-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wf-flex-vertical-xs.wf-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}}ul.wf-option,.wf-form-field{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:1rem 0;position:relative}ul.wf-option li,.wf-form-field li{margin:0;padding:0}ul.wf-option.wf-option-no-spacing,.wf-form-field.wf-option-no-spacing{padding:0;margin:0}ul.wf-option.wf-option-toggled>*:last-child,ul.wf-option.wf-option-footer>*:last-child,.wf-form-field.wf-option-toggled>*:last-child,.wf-form-field.wf-option-footer>*:last-child{margin-right:1rem}@media (max-width: 768px){ul.wf-option.wf-option-footer,.wf-form-field.wf-option-footer{-webkit-flex-direction:column;flex-direction:column}}ul.wf-option>.wf-option-content,.wf-form-field>.wf-option-content{-webkit-flex-grow:1;flex-grow:1}ul.wf-option>.wf-option-content>ul,.wf-form-field>.wf-option-content>ul{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;width:100%}ul.wf-option>.wf-option-content>ul>*:first-child,.wf-form-field>.wf-option-content>ul>*:first-child{-webkit-flex-grow:1;flex-grow:1}@media (min-width: 768px){ul.wf-option>.wf-option-content>ul,.wf-form-field>.wf-option-content>ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}ul.wf-option.wf-option-toggled-segmented *,.wf-form-field.wf-option-toggled-segmented *{-webkit-flex-grow:0;flex-grow:0}ul.wf-option.wf-option-toggled-segmented *:first-child,.wf-form-field.wf-option-toggled-segmented *:first-child{-webkit-flex-grow:1;flex-grow:1}ul.wf-option.wf-option-toggled-segmented>*:last-child,.wf-form-field.wf-option-toggled-segmented>*:last-child{margin-left:1rem}ul.wf-option.wf-option-toggled-segmented .wf-option-title,.wf-form-field.wf-option-toggled-segmented .wf-option-title{font-size:.8rem}ul.wf-option.wf-option-toggled-segmented .wf-option-segments,.wf-form-field.wf-option-toggled-segmented .wf-option-segments{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:50%;flex-basis:50%;display:block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:0}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-segment-first,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-segment-first{border-radius:4px 0 0 4px}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-segment-last,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-segment-last{border-radius:0 4px 4px 0}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]{position:absolute;left:-9999px}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:disabled+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:disabled+label{cursor:not-allowed;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:.65}ul.wf-option.wf-option-toggled-multiple>.wf-option-content>ul,.wf-form-field.wf-option-toggled-multiple>.wf-option-content>ul{-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;align-items:flex-start}ul.wf-option>.wf-option-spacer,.wf-form-field>.wf-option-spacer{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wf-option>.wf-option-spacer,.wf-form-field>.wf-option-spacer{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wf-option>.wf-option-premium-lock,.wf-form-field>.wf-option-premium-lock{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:contain;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wf-option>.wf-option-premium-lock,.wf-form-field>.wf-option-premium-lock{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wf-option>.wf-option-checkbox,.wf-form-field>.wf-option-checkbox{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-option-checkbox,.wf-form-field>.wf-option-checkbox{margin:0 2rem 0 1rem}}ul.wf-option>.wf-boolean-switch,.wf-form-field>.wf-boolean-switch{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-boolean-switch,.wf-form-field>.wf-boolean-switch{margin:0 1rem 0 1rem}}ul.wf-option.wf-option-no-spacing>.wf-boolean-switch,.wf-form-field.wf-option-no-spacing>.wf-boolean-switch{margin:0}ul.wf-option>.wf-option-radio-container,.wf-form-field>.wf-option-radio-container{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-option-radio-container,.wf-form-field>.wf-option-radio-container{margin:0 2rem 0 1rem}}ul.wf-option>.wf-option-radio-container [type=radio].wf-option-radio+label:before,.wf-form-field>.wf-option-radio-container [type=radio].wf-option-radio+label:before{margin:0}ul.wf-option>li>.wf-option-title,ul.wf-option>.wf-option-title,ul.wf-option>.wf-option-content>ul>.wf-option-title,.wf-form-field>li>.wf-option-title,.wf-form-field>.wf-option-title,.wf-form-field>.wf-option-content>ul>.wf-option-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;color:#2b2b2b;padding-right:0.5rem}ul.wf-option>li>.wf-option-title.wf-option-title-top,ul.wf-option>.wf-option-title.wf-option-title-top,ul.wf-option>.wf-option-content>ul>.wf-option-title.wf-option-title-top,.wf-form-field>li>.wf-option-title.wf-option-title-top,.wf-form-field>.wf-option-title.wf-option-title-top,.wf-form-field>.wf-option-content>ul>.wf-option-title.wf-option-title-top{-webkit-align-self:flex-start;align-self:flex-start}ul.wf-option>li>.wf-option-title.wf-option-title-bottom,ul.wf-option>.wf-option-title.wf-option-title-bottom,ul.wf-option>.wf-option-content>ul>.wf-option-title.wf-option-title-bottom,.wf-form-field>li>.wf-option-title.wf-option-title-bottom,.wf-form-field>.wf-option-title.wf-option-title-bottom,.wf-form-field>.wf-option-content>ul>.wf-option-title.wf-option-title-bottom{-webkit-align-self:flex-end;align-self:flex-end}ul.wf-option .wf-option-subtitle,.wf-form-field .wf-option-subtitle{padding-top:0.25rem;font-size:0.75rem}ul.wf-option .wf-flex-vertical .wf-option-title,.wf-form-field .wf-flex-vertical .wf-option-title{padding-bottom:0.75rem}ul.wf-option.wf-flex-vertical>.wf-option-subtitle,.wf-form-field.wf-flex-vertical>.wf-option-subtitle{padding-top:0.25rem !important;font-size:0.75rem !important}ul.wf-option .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes{display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){ul.wf-option .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}ul.wf-option .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes{margin-top:1rem}ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:0}ul.wf-option .wf-option-checkboxes>ul:not(:first-of-type),.wf-form-field .wf-option-checkboxes>ul:not(:first-of-type){margin-top:1rem}@media (min-width: 768px){ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:1rem}ul.wf-option .wf-option-checkboxes>ul:not(:first-of-type),.wf-form-field .wf-option-checkboxes>ul:not(:first-of-type){margin-top:0}}@media (min-width: 768px) and (min-width: 768px){ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:1.5rem}}@media (min-width: 768px){ul.wf-option .wf-option-checkboxes>ul:first-of-type,.wf-form-field .wf-option-checkboxes>ul:first-of-type{margin-left:0}}ul.wf-option .wf-option-checkboxes>ul>.wf-option-checkbox,.wf-form-field .wf-option-checkboxes>ul>.wf-option-checkbox{margin:0 1rem 0 0}ul.wf-option li.wf-option-text,ul.wf-option li.wf-option-textarea,ul.wf-option td.wf-option-text,.wf-form-field li.wf-option-text,.wf-form-field li.wf-option-textarea,.wf-form-field td.wf-option-text{padding-top:0.5rem}@media (min-width: 768px){ul.wf-option li.wf-option-text,ul.wf-option li.wf-option-textarea,ul.wf-option td.wf-option-text,.wf-form-field li.wf-option-text,.wf-form-field li.wf-option-textarea,.wf-form-field td.wf-option-text{-webkit-flex-grow:1;flex-grow:1;text-align:right;padding-left:1rem;padding-top:0}}ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:280px}}@media (min-width: 992px){ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:340px}}ul.wf-option li.wf-option-text.wf-option-full-width>input[type="text"],.wf-form-field li.wf-option-text.wf-option-full-width>input[type="text"]{max-width:100%;width:100%}ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:150px;max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:200px;max-width:400px}}@media (min-width: 992px){ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:250px;max-width:500px}}ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{width:100%;height:80px;min-width:150px;max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{min-width:200px;max-width:280px}}@media (min-width: 992px){ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{min-width:250px;max-width:340px}}ul.wf-option li.wf-option-textarea>.wf-flex-vertical>li>textarea,.wf-form-field li.wf-option-textarea>.wf-flex-vertical>li>textarea{width:100%;height:80px;box-sizing:border-box}ul.wf-option li.wf-option-textarea>.wf-flex-vertical>li.wf-option-subtitle,.wf-form-field li.wf-option-textarea>.wf-flex-vertical>li.wf-option-subtitle{width:100%;text-align:left}ul.wf-option li.wf-option-switch,.wf-form-field li.wf-option-switch{-webkit-flex-grow:1;flex-grow:1}ul.wf-option li.wf-option-switch.wf-right .wf-switch,.wf-form-field li.wf-option-switch.wf-right .wf-switch{justify-content:flex-end !important}ul.wf-option li.wf-option-select,.wf-form-field li.wf-option-select{-webkit-flex-grow:1;flex-grow:1;text-align:right}ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.9rem}}ul.wf-option li.wf-option-select .wf-option-select-option,ul.wf-option li.wf-option-select .wfselect2-container--default,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single,.wf-form-field li.wf-option-select .wf-option-select-option,.wf-form-field li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}ul.wf-option li.wf-option-select .wf-option-select-option .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wf-option-select-option .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}ul.wf-option li.wf-option-select .wf-option-select-option .wfselect2-selection__arrow,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection__arrow,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wf-option-select-option .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}ul.wf-option li.wf-option-select .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}ul.wf-option li.wf-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wf-form-field li.wf-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:240px}@media (min-width: 768px){ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:280px}}@media (min-width: 992px){ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:320px}}ul.wf-option.wf-option-token .wfselect2-container--default,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple,.wf-form-field.wf-option-token .wfselect2-container--default,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection__choice,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection__choice,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#fff;border-color:#e2e2e2;padding:0.5rem}ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-search__field,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-search__field,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}.wf-option-sub{padding-left:2rem !important;margin-left:30px !important}.wf-select2-suppress-dropdown .wfselect2-results,.wf-select2-suppress-dropdown .wfselect2-dropdown{display:none}.wf-options-controls{direction:ltr;background:#ffffff;border-bottom:1px solid #e2e2e2;position:absolute;left:160px;right:0px;top:46px;z-index:900;padding-left:15px;padding-right:15px}@media (min-width: 616px){.wf-options-controls{position:fixed}}.wf-options-controls .wf-block{margin:0}@media (min-width: 782px){.wf-options-controls .wf-block{margin:0.5rem 0}}.wf-options-controls,.sticky-menu .wf-options-controls{top:32px}.folded .wf-options-controls{left:36px}@media only screen and (max-width: 960px){.auto-fold .wf-options-controls{left:36px}}.rtl .wf-options-controls{right:160px;left:0px}.rtl .folded .wf-options-controls{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wf-options-controls{right:36px}}@media screen and (max-width: 782px){.wf-options-controls,.folded .wf-options-controls,.auto-fold .wf-options-controls,.rtl .wf-options-controls,.rtl .folded .wf-options-controls,.rtl .auto-fold .wf-options-controls{left:-10px;right:0px}}.wf-options-controls-spacer{height:45px}@media (min-width: 782px){.wf-options-controls-spacer{height:75px}}.wf-options-controls-spacer,.sticky-menu .wf-options-controls-spacer{top:61px}.wordfence .wfselect2-container .wfselect2-selection--single{border:1px solid #dadada;font-weight:normal;font-size:0.8rem}#wf-notices{margin-top:15px}#wf-notices .wf-admin-notice{margin-left:0px;margin-right:0px}.wf-success-text,.wf-notice-text{display:inline-block;vertical-align:middle;line-height:1.3;font-size:16px;font-weight:bold;font-style:italic}.wf-notice{margin:12px 0;padding:8px;background-color:#ffffe0;border:1px solid #ffd975;border-width:1px 1px 1px 10px}.wf-notice-text{color:#6d798c}.wf-success{margin:12px 0;padding:8px;background-color:#ffffff;border:1px solid #16bc9b;border-width:1px 1px 1px 10px}.wf-success-text{color:#11967a}.wf-premium-callout{border:1px solid #dfdfdf;background-color:#ffffff;padding:16px;margin:20px 0 0;text-align:center}.wf-premium-callout ul{margin:8px 0;padding:0 0 0 15px}.wf-premium-callout ul li{list-style-type:disc;margin:0;padding:0}.wf-premium-callout .center{text-align:center;margin:0}.wf-premium-callout .button-primary{text-align:center;text-transform:uppercase;font-weight:bold}#wordfenceSatisfactionPrompt .notice-dismiss{top:10px;right:16px}#wfLiveTrafficOverlayAnchor::after{position:absolute;z-index:3002;top:0;right:0;width:0;height:0;background:rgba(241,241,241,0.6);content:'';opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wordfenceLiveActivityPaused #wfLiveTrafficOverlayAnchor::after{width:100%;height:100%;opacity:1;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin-bottom:0.5rem;padding:1px 13px}#wfLiveTrafficDisabledMessage{display:none;position:fixed;z-index:3003;left:0;width:100%;top:50%;transform:translateY(-50%);text-align:center;color:#666666;opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}#wfLiveTrafficDisabledMessage h2{color:#fff;overflow:hidden;max-width:350px;margin:0 auto;padding:20px;font-size:2.0em}#wfLiveTrafficDisabledMessage h2 small{font-size:0.5em;font-weight:normal;margin-top:12px;display:block}.wordfenceLiveActivityPaused #wfLiveTrafficDisabledMessage{display:block;opacity:1;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.wf-live-activity{position:relative;margin:20px 0 10px 0;padding:0.75rem;box-sizing:border-box;background:#FFFCEF;box-shadow:0 0 0 1px rgba(153,155,135,0.5),0 1px 2px #e8f3e0}.wf-live-activity .wf-live-activity-inner{width:100%;box-sizing:border-box;position:relative}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:flex-start}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content .wf-live-activity-title{color:#888888;font-size:0.85rem;font-weight:bold;padding-right:0.5rem}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content .wf-live-activity-message{font-size:0.80rem;color:#000000}.wf-live-activity .wf-live-activity-inner .wf-live-activity-state{position:absolute;top:0px;right:0px;bottom:0px;left:0px;background:rgba(255,252,239,0.9);display:none;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:center;z-index:3001;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wordfenceLiveActivityPaused .wf-live-activity .wf-live-activity-inner .wf-live-activity-state{display:-ms-flexbox;display:flex;opacity:1;-webkit-transition:opacity 0.5s;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}.wordfence .wordfenceScanButton{margin:20px 0 20px 0}.wordfence .wordfenceScanButton input.button-wf-grey{background:#EFEFEF url(../images/button-grad-grey.png) repeat-x scroll left top;border-color:#EFEFEF}.wordfence .wordfenceScanButton table td{vertical-align:top}.wordfence .wordfenceScanButton .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709E;height:44px;line-height:44px;padding:0px 20px}table.wfSummaryParent{font-family:sans-serif;font-size:14px;color:#000;z-index:9}table.wfSummaryParent td{vertical-align:top;padding:0;margin:0}table.wfSummaryParent table.wfSummaryChild th{font-weight:bold;text-align:right;font-family:Georgia,Times New Roman,Times,serif;color:#000;padding:5px 10px 5px 0;border-top:1px solid #CCC}table.wfSummaryParent table.wfSummaryChild td{font-weight:normal;text-align:left;padding:5px 0 5px 0;border-top:1px solid #CCC}table.wfSummaryParent table.wfSC1 td{width:300px;padding:0 25px 10px 0}table.wfSummaryParent table.wfSC2 th{width:80px}table.wfSummaryParent table.wfSC2 td{width:100px}table.wfSummaryParent table.wfSC3 th{width:80px}table.wfSummaryParent table.wfSC3 td{width:250px}table.wfSummaryParent th.wfHead{font-size:22px;font-family:Georgia,Times New Roman,Times,serif;font-style:italic;color:#555;font-weight:bold;text-align:left;padding:20px 0 20px 0;-webkit-font-smoothing:antialiased}.wf-issues-table{table-layout:fixed;width:100%}div.wfIssue{width:100%}div.wfIssue table.wfIssue td{padding:2px;margin:0;border-width:0;text-align:left;width:100%}div.wfIssue table.wfIssue th{padding:2px;margin:0;font-weight:bold;text-align:left;color:#777;white-space:nowrap}div.wfIssue table.wfIssueLinks td{border-width:0;text-align:left;padding-right:10px}div.wfIssue h2{margin:0 0 5px 0;padding:0;font-size:0.9rem}@media (min-width: 768px){div.wfIssue h2{font-size:1.05rem}}.wfIssueOptions{border-top:1px solid #CCC;padding:10px}.wfIssueOptions h3{font-size:0.8rem;margin:0}@media (min-width: 768px){.wfIssueOptions h3{display:inline-block}}.wfIssueOptions ul{margin-bottom:0;padding-left:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wfIssueOptions ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}.wfIssueOptions ul>li>a{position:relative;display:block;padding:8px 12px/2}.wfIssueOptions ul>li>a:hover,.wfIssueOptions ul>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wfIssueOptions a{margin-left:10px}.wfIssueOptions strong{float:left;display:block;width:60px}.wfIssueOptions p{margin:6px 0px 0px}.wfProbSev1,.wfProbSev2,.wfAjaxLight128,.wfResolved{width:128px;height:128px;border:0;margin:0 auto;background-repeat:no-repeat;background-position:0 0;text-decoration:none;display:block}.wfProbSev1{background-image:url(../images/icons/error128.png)}.wfProbSev2{background-image:url(../images/icons/warning128.png)}.wfResolved{background-image:url(../images/icons/tick128.png)}.wfIssuesContainer{width:100%;display:none}.wfIssuesContainer p{max-width:550px}.wfALogTime{color:#999}.wfALogMailLink,.wfALogViewLink{display:block;position:absolute;padding:0 0 0 18px;margin:0;right:10px;top:0;background-repeat:no-repeat;font-weight:normal}.wfALogMailLink{background-image:url(../images/icons/email_go.png)}.wfALogViewLink{background-image:url(../images/icons/magnifier.png)}#wfActivity{position:relative}.consoleHead{position:relative;padding:0 0 0 3px;font-weight:bold;width:100%}.consoleHeadText{margin-bottom:4px;font-size:18px;font-family:Georgia,Times New Roman,Times,serif;color:#555;font-weight:bold;-webkit-font-smoothing:antialiased}.consoleFooter{position:relative}.consoleOuter{width:100%}.consoleInner{height:116px;overflow:auto;z-index:1}.bevelDiv1{border:1px solid #EFEFEF}.bevelDiv2{border:1px solid #AAA}.bevelDiv3{background-color:#ffffed;padding:5px;font-family:Roboto,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}.wfSecure{color:#0A0;font-weight:bold}.wfSummaryLine{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wfSummaryLine{-webkit-flex-direction:row;flex-direction:row}}.wfSummaryLine .wfSummaryDate{padding-left:3px}.wfSummaryLine .wfSummaryMsg{padding-left:3px;-webkit-flex-grow:1;flex-grow:1;min-width:0}.wfSummaryLoading{width:16px;height:11px;background-image:url("../images/icons/ajaxScan.gif")}.wfSummaryBad,.wfSummaryErr{color:#930000}.wfSummaryOK{color:#11967a}.wfSummaryIgnored{color:#a87302}.wfClear{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}.wfSummaryFinal{-webkit-font-smoothing:antialiased;font-weight:bold;color:#555}.wfStartScanButton{text-align:center}.wordfenceScanHelp{border:1px solid #CCC;padding:4px}.wf-scan-no-issues{font-size:1.25rem;color:#11967a}.wf-scan-severity{position:relative;width:10px}@media (min-width: 768px){.wf-scan-severity{width:144px}}.wf-scan-severity-1,.wf-scan-severity-2{position:absolute;top:0px;right:0px;bottom:0px;left:0px}.wf-scan-severity-1{background-color:#c10000}.wf-scan-severity-2{background-color:#ffd10a}.scan-schedule{border-collapse:collapse;border-spacing:0}.scan-schedule tr:first-of-type th{padding-top:0}.scan-schedule td{padding:0}.scan-schedule th{padding:1.5rem 0.5rem 0.75rem 0;font-size:1rem;text-align:left}@media (min-width: 768px){.scan-schedule th{padding:0 0.5rem 0 0;font-size:0.8125rem;text-align:center}}.next-scan{font-size:1em;display:block;position:relative;width:7em;height:7em;background-color:#fff;border-radius:0.6em;box-shadow:0 1px 0 rgba(189,189,189,0.6);overflow:hidden}.next-scan *{display:block;width:100%;font-size:1em;font-weight:bold;font-style:normal;text-align:center}.next-scan strong{position:absolute;top:0;padding:0.4em 0;color:#fff;background-color:#00709E;box-shadow:0 2px 0 #00709E}.next-scan em{position:absolute;bottom:0.3em;color:#00709E}.next-scan span{width:100%;font-size:2.8em;padding-top:1.15em;color:#2f2f2f}#wf-lt-listings .wfActEvent{padding-left:15px;border-left:5px solid #cccccc}#wf-lt-listings .wfActEvent.wfHuman{border-left:5px solid #16bc9b}#wf-lt-listings .wfActEvent.wfActionBlocked{border-left:5px solid #d03935}#wf-lt-listings .wfActEvent.wfNotice{border-left:5px solid #c10000}#wf-lt-listings .wfActEvent.wfWarning,#wf-lt-listings .wfActEvent.wf404,#wf-lt-listings .wfActEvent.wfFailedLogin{border-left:5px solid #ffd10a}#wf-lt-listings .wfActEvent:hover{background-color:#fff9e9 !important}.wf-live-traffic-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;width:100%;margin-bottom:0}.wf-live-traffic-controls>*:first-child{-webkit-flex-grow:1;flex-grow:1}.wf-live-traffic-controls>*:last-child{-webkit-flex-grow:0;flex-grow:0}@media (min-width: 768px){.wf-live-traffic-controls{-webkit-flex-direction:row;flex-direction:row}}.wf-live-traffic-filter{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start}@media (min-width: 768px){.wf-live-traffic-filter{-webkit-flex-direction:row;flex-direction:row}}.wf-live-traffic-filter>*{padding:0.5rem}.wf-live-traffic-filter h2{margin:0;padding-bottom:0.5rem}@media (min-width: 768px){.wf-live-traffic-filter h2{padding-bottom:0;padding-right:0.5rem}}.wf-live-traffic-show-expanded{text-align:right;padding:0.5rem}@media (max-width: 1330px){.wf-live-traffic-show-expanded{display:none}}#wf-lt-advanced-filters{padding-left:0;padding-right:0;overflow:hidden}.wf-live-traffic-filter-detail{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wf-live-traffic-filter-detail{-webkit-flex-direction:row;flex-direction:row}.wf-live-traffic-filter-detail *{-webkit-flex-grow:1;flex-grow:1}}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-remove{margin-left:0.5rem;font-size:1.5rem;color:#333}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters div{padding:0.25rem 0}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters select{font-size:0.75rem !important}@media (min-width: 768px){.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters div{padding:0}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters select{font-size:1rem !important}}.wf-filtered-traffic .wf-filtered-traffic-hits{font-size:1.75rem;color:#999999;margin-top:10px}#wf-live-traffic{position:relative;overflow:visible}#wf-live-traffic-legend{white-space:nowrap;background-color:#fff;padding:0.75rem 0px;position:fixed;width:320px;height:17px;top:auto;bottom:0px;right:auto;left:10px;z-index:2000;box-shadow:0px 0px 5px rgba(0,0,0,0.5);padding-left:1rem}@media (min-width: 768px){#wf-live-traffic-legend{left:182px}}@media (max-width: 1330px){#wf-live-traffic-legend{display:none}}#wf-live-traffic-legend-placeholder{display:none;padding:12px}#wf-live-traffic-legend-placeholder.sticky{display:block}#wf-live-traffic-legend ul{margin:0;padding:0}#wf-live-traffic-legend ul:before,#wf-live-traffic-legend ul:after{content:" ";display:table}#wf-live-traffic-legend ul:after{clear:both}#wf-live-traffic-legend ul li{margin:0 1rem 0 0;padding:0;position:relative;float:left;font-size:0.7185rem}@media (min-width: 768px){#wf-live-traffic-legend ul li{font-size:0.8125rem}}#wf-live-traffic-legend ul li+li{margin-left:0.5rem}#wf-live-traffic-legend ul li:before,.wf-live-traffic-hit-type:before{content:'';display:inline-block;margin:3px 6px 0 0;width:12px;height:12px;background-color:#CCCCCC;border-radius:10px;vertical-align:-2px}#wf-live-traffic-legend ul li.wfHuman:before,.wf-live-traffic-hit-type.wfHuman:before{background-color:#16bc9b}#wf-live-traffic-legend ul li.wfNotice:before,.wf-live-traffic-hit-type.wfNotice:before,#wf-live-traffic-legend ul li.wf404:before,.wf-live-traffic-hit-type.wf404:before,#wf-live-traffic-legend ul li.wfFailedLogin:before,.wf-live-traffic-hit-type.wfFailedLogin:before{background-color:#ffd10a}#wf-live-traffic-legend ul li.wfBlocked:before,.wf-live-traffic-hit-type.wfBlocked:before,#wf-live-traffic-legend ul li.wfActionBlocked:before,.wf-live-traffic-hit-type.wfActionBlocked:before{background-color:#d03935}.wfTimeAgo{font-family:Georgia,Times New Roman,Times,serif;color:#999;font-weight:bold;font-style:italic}.wfActEvent{border-bottom:1px solid #CCC;padding:10px 20px;overflow:auto}.wf-pad-small{margin:8px 0}#wf-lt-listings{margin:0 0 0}#wf-lt-listings a{cursor:pointer;text-decoration:none}#wf-lt-listings a:hover{text-decoration:underline}#wf-lt-listings a.button,#wf-lt-listings a.wf-btn{text-decoration:none}[class*="span"]{float:left;min-height:1px;margin-left:30px}.highlighted,.highlighted td,#wf-live-traffic .wf-striped-table .highlighted td{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-moz-keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@-webkit-keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@-moz-keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}@-webkit-keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}@keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}.highlighted,.highlighted td,#wf-live-traffic .wf-striped-table .highlighted td{-webkit-animation-name:highlighted;animation-name:highlighted}.highlighted.wfActionBlocked,.highlighted td.wfActionBlocked,#wf-live-traffic .wf-striped-table .highlighted td.wfActionBlocked{-webkit-animation-name:highlightedBlocked;animation-name:highlightedBlocked}#wf-lt-preset-filters{min-width:250px}#wf-lt-advanced-filters>table{width:100%}#wf-lt-advanced-filters>table>tr>td{vertical-align:top}.wf-lt-url{white-space:nowrap}.wf-live-traffic-filter label{font-weight:normal}#wf-live-traffic .wf-striped-table th,#wf-live-traffic .wf-striped-table td{padding:.5rem .6rem}#wf-live-traffic .wf-striped-table th{white-space:nowrap}#wf-live-traffic .wf-striped-table tbody tr:hover>td{background-color:#e7f5ff}#wf-live-traffic .wf-live-traffic-show-details{font-size:1.5rem;color:#9a9a9a;text-align:center;cursor:hand}#wf-live-traffic .wf-live-traffic-show-details .wf-ion-eye-disabled{display:none}#wf-live-traffic .wf-details-open .wf-live-traffic-show-details .wf-ion-eye-disabled{display:inline-block}#wf-live-traffic .wf-details-open .wf-live-traffic-show-details .wf-ion-eye{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-summary-row{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-live-traffic-activity-detail h2{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-striped-table thead{display:none}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details,#wf-live-traffic .wf-details-visible .wf-live-traffic-details{transition:padding 200ms}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{padding:0 .6rem}#wf-live-traffic .wf-details-visible .wf-live-traffic-details,#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-details{padding:.8rem .6rem}#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-details{border-top:1px solid #e2e2e2}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper,#wf-live-traffic .wf-details-visible .wf-live-traffic-activity-detail-wrapper{transition:opacity 200ms, max-height 200ms ease-out;overflow:hidden}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:0;max-height:0px}#wf-live-traffic .wf-details-visible .wf-live-traffic-activity-detail-wrapper,#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:1;max-height:800px}#wf-live-traffic .wf-block-ip-btn{display:none}#wf-live-traffic-group-by{width:100%}#wf-live-traffic-no-group-by{overflow-x:auto}@media (max-width: 1330px){#wf-live-traffic .wf-summary-row{display:none}#wf-live-traffic .wf-live-traffic-activity-detail h2{display:none}#wf-live-traffic .wf-striped-table thead{display:none}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{padding:0.8rem 0.6rem}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{border-top:1px solid #e2e2e2}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:1;max-height:300px}#wf-live-traffic-no-group-by .wf-striped-table{table-layout:fixed}}.wf-live-traffic-activity-type{text-align:center;float:left;width:65px}@media (min-width: 768px){.wf-live-traffic-activity-type{width:85px}}@media (min-width: 992px){.wf-live-traffic-activity-type{width:105px}}@media (min-width: 1200px){.wf-live-traffic-activity-type{width:125px}}.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:3rem;color:#CCCCCC}@media (min-width: 768px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:4rem}}@media (min-width: 992px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:5rem}}@media (min-width: 1200px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:6rem}}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-human{color:#16bc9b}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-warning{color:#ffd10a}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-blocked{color:#d03935}.wf-live-traffic-activity-detail{margin:0;margin-left:90px}@media (min-width: 768px){.wf-live-traffic-activity-detail{margin-left:110px}}@media (min-width: 992px){.wf-live-traffic-activity-detail{margin-left:130px}}@media (min-width: 1200px){.wf-live-traffic-activity-detail{margin-left:150px}}.wf-live-traffic-activity-detail h2{margin:0px 0px .5rem}.wf-live-traffic-actions{margin:.5rem 0px 0px}#wf-live-traffic-util-overlay-wrapper{position:fixed;top:32px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:3000}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay{position:fixed;top:32px;right:0px;bottom:0px;left:auto;max-width:800px;background-color:#ffffff;overflow:auto}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-header,#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body{padding:1rem 1.5rem}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body{padding:1rem 1.5rem 1rem 3rem}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-header{background-color:#e9e9e9;border:1px solid #ffd10a;border-width:10px 0px}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body .wf-flex-row{margin:0.6rem 0}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-actions{display:none}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-close{position:absolute;top:20px;right:16px;font-size:20px;cursor:pointer}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-activity-detail div{margin:0px 0px 0.6rem}#wf-live-traffic-util-overlay-wrapper .wf-block-ip-btn{display:inline-block}#wf-live-traffic-options .wf-block-list .wf-option-text .wf-option-title{width:30%}.wf-recent-traffic-table{font-size:.7rem}.wf-recent-traffic-table th,.wf-recent-traffic-table td{vertical-align:top}.wf-recent-traffic-table th{text-align:left;white-space:nowrap}.wf-recent-traffic-table td{word-wrap:break-word;word-break:break-all}.wf-recent-traffic-table .wf-recent-traffic-table-row-border td div{border-top:1px solid #e2e2e2;margin:10px 0}.wf-live-traffic-none{padding:0.5rem 0.6rem}.wf-flag.wf-flag-unspecified{width:16px;height:16px;background:none}.wf-flag.wf-flag-unspecified path{fill:#9f9fa0}table.block-ranges-table{border-collapse:collapse;margin:10px 0 0}table.block-ranges-table tr td{border:1px solid #CCC;border-width:1px 0;padding:10px 0 12px 0}#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.9rem}}.wfselect2-results__options{border-top:1px solid #e2e2e2}.wafStatus-enabled,.wafStatus-learning-mode,.wafStatus-disabled,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single{height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wafStatus-enabled .wfselect2-selection__rendered,.wafStatus-learning-mode .wfselect2-selection__rendered,.wafStatus-disabled .wfselect2-selection__rendered,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wafStatus-enabled .wfselect2-selection__arrow,.wafStatus-learning-mode .wfselect2-selection__arrow,.wafStatus-disabled .wfselect2-selection__arrow,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#waf-config-form .waf-config-label{font-size:1.3em}#waf-config-form .wfselect2-container--default .wfselect2-selection--single{padding:0.4rem;text-shadow:0 0 3px #000000;font-weight:bold}#waf-config-form .wfselect2-container .wfselect2-selection--single{height:auto}#waf-config-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:100%;top:0}.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wafStatus-enabled.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-learning-mode.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-disabled.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}#waf-learning-mode-grace-period{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}#waf-learning-mode-grace-period span{padding:0 0.5rem 0 1rem}#waf-learning-mode-grace-period input{width:auto}#whitelist-form{padding-top:0.5rem}#whitelist-form .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}#whitelist-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}#whitelist-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#whitelist-form-separator{margin:1rem 0}#whitelist-table-controls{margin-bottom:0.5rem}#whitelist-table-controls .wfselect2-container--default{text-align:left !important}#whitelist-table-controls .wf-select-group{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.whitelist-table-container{overflow-x:auto}table.whitelist-table .whitelist-edit{display:none}table.whitelist-table .edit-mode .whitelist-display{display:none}table.whitelist-table .edit-mode .whitelist-edit{display:block}table.whitelist-table .edit-mode span.whitelist-edit,table.whitelist-table .edit-mode input.whitelist-edit{display:inline}.wf-bulk-action{margin:12px 0}tr.wf-table-filters input{max-width:120px}.wf-waf-status-disabled{padding:2rem 0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-value,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-value svg,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-label,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}.wf-waf-coverage li{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-waf-navigation .wf-block-navigation-option-content,.wf-blocking-status .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1.0rem}.wf-waf-navigation .wf-block-navigation-option-content h4,.wf-blocking-status .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-waf-navigation .wf-block-navigation-option-content p,.wf-blocking-status .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}.wf-blocking-status>li{-webkit-flex-grow:0 !important;flex-grow:0 !important;-webkit-flex-basis:66.66667% !important;flex-basis:66.66667% !important}.wf-blocking-status>li:first-of-type{-webkit-flex-basis:33.33333% !important;flex-basis:33.33333% !important}.wf-blocking-status-premium>li{-webkit-flex-grow:0 !important;flex-grow:0 !important;-webkit-flex-basis:33.33333% !important;flex-basis:33.33333% !important}ul.wf-option.wf-option-rate-limit *{-webkit-flex-grow:1;flex-grow:1}ul.wf-option.wf-option-rate-limit *:first-child{-webkit-flex-grow:0;flex-grow:0}ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:100px}@media (min-width: 768px){ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:140px}}@media (min-width: 992px){ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:140px}}#waf-rules-wrapper tbody tr:nth-of-type(n+10){display:none}#waf-rules-wrapper.wf-show-all tbody tr:nth-of-type(n+10){display:table-row}#waf-rules-wrapper.wf-show-all #waf-show-all-rules{display:none}.wf-waf-backup-file-list{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-waf-backup-file-list>*{margin-left:0.5rem !important}.wf-waf-backup-file-list>*:first-child{margin-left:0 !important}#wf-option-loginSecurityEnabled .wf-option-subtitle{font-size:.875rem}.wf-rate-limit-warning{display:none;padding-top:1rem}.wf-rate-limit-warning .wf-inline-notice{display:inline-block}.wf-scan-status-disabled{padding:2rem 0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}.wf-scan-navigation .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1.0rem}.wf-scan-navigation .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-scan-navigation .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}#wf-scan-starter{-webkit-justify-content:center;justify-content:center}#wf-scan-starter:hover{cursor:unset}#wf-scan-starter:hover a{text-decoration:none}.wf-scanner-progress{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin-top:0.5rem;margin-bottom:0.5rem;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMXB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDEgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KCTxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNkMWQxZDEiLz48cmVjdCB4PSIwIiB5PSI1IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjZDFkMWQxIi8+Cjwvc3ZnPg==");background-repeat:repeat-x;background-position:center 24px;overflow-x:auto;overflow-y:hidden}.wf-scanner-progress>.wf-scan-step{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;padding-left:0.5rem;padding-right:0.5rem}.wf-scanner-progress>.wf-scan-step:first-of-type{padding-left:0;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI1MSUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ffffff),color-stop(50%, #ffffff),color-stop(51%, rgba(255,255,255,0)),color-stop(100%, rgba(255,255,255,0)));background-image:-moz-linear-gradient(left, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-image:-webkit-linear-gradient(left, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-repeat:no-repeat;background-position:left center}.wf-scanner-progress>.wf-scan-step:last-of-type{padding-right:0;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjQ5JSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(255,255,255,0)),color-stop(49%, rgba(255,255,255,0)),color-stop(50%, #ffffff),color-stop(100%, #ffffff));background-image:-moz-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-image:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-image:linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-repeat:no-repeat;background-position:right center}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-title{font-size:0.7rem;padding-top:0.5rem;white-space:nowrap}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-subtitle{font-size:0.7rem}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-pending,.wf-step-pending{width:50px;height:54px;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMTRweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTQgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8Y2lyY2xlIGN4PSI3IiBjeT0iNyIgcj0iNyIgZmlsbD0iI2QxZDFkMSIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-running,.wf-step-running{display:none;background-color:#ffffff !important}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success,.wf-step-complete-success{display:none;width:50px;height:54px;background-color:#ffffff;background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-warning,.wf-step-complete-warning{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk5LjA1MSw4Mi44NDJsLTQyLjgxMiwtNzguNDgzYy0wLjYxLC0xLjEzMSAtMS41MTQsLTIuMDc3IC0yLjYxNywtMi43MzdjLTIuMjI3LC0xLjMzNCAtNS4wMTcsLTEuMzM0IC03LjI0NCwwYy0xLjEwNiwwLjY1OSAtMi4wMTMsMS42MDUgLTIuNjI1LDIuNzM3bC00Mi44MDQsNzguNDgzYy0xLjI5OSwyLjE2OCAtMS4yNTYsNC44OTYgMC4xMTEsNy4wMjFjMC42MTQsMS4wNjcgMS41LDEuOTUyIDIuNTY2LDIuNTY2YzEuMDc0LDAuNjI3IDIuMjk3LDAuOTU1IDMuNTQxLDAuOTQ5bDg1LjY0MSwwYzIuNTE3LC0wLjAwOSA0Ljg1MiwtMS4zNDcgNi4xMzIsLTMuNTE1YzEuMzY3LC0yLjEyNSAxLjQxLC00Ljg1MyAwLjExMSwtNy4wMjFsMCwwWm0tNDEuOTA2LC01LjU3NmMwLjAxMSwwLjQ5IC0wLjE4MSwwLjk2NCAtMC41MywxLjMwOGMtMC4zMjUsMC4zNDIgLTAuNzc3LDAuNTM0IC0xLjI0OSwwLjUzMWwtMTAuNzE1LDBjLTAuNDcyLDAuMDAzIC0wLjkyNCwtMC4xODkgLTEuMjQ5LC0wLjUzMWMtMC4zNDksLTAuMzQ0IC0wLjU0MiwtMC44MTggLTAuNTMsLTEuMzA4bDAsLTEwLjU4OGMtMC4wMTIsLTAuNDkgMC4xODEsLTAuOTY0IDAuNTMsLTEuMzA4YzAuMzI1LC0wLjM0MSAwLjc3NywtMC41MzMgMS4yNDksLTAuNTNsMTAuNjk4LDBjMC40NzUsLTAuMDA2IDAuOTMsMC4xODcgMS4yNTgsMC41M2MwLjM0OCwwLjM0NSAwLjU0LDAuODE4IDAuNTMsMS4zMDhsMCwxMC41ODhsMC4wMDgsMFptLTAuMTExLC0yMC44NDJjLTAuMDQ1LDAuMzggLTAuMjYzLDAuNzE4IC0wLjU5LDAuOTE2Yy0wLjM4OSwwLjI1IC0wLjg0NiwwLjM3NSAtMS4zMDgsMC4zNTlsLTEwLjMyMywwYy0wLjQ3LDAuMDEzIC0wLjkzNCwtMC4xMTIgLTEuMzM0LC0wLjM1OWMtMC4zMzgsLTAuMTg1IC0wLjU1MSwtMC41MzkgLTAuNTU2LC0wLjkyNGwtMC45NDksLTI1LjQ2OGMtMC4wMywtMC40NiAwLjE4MSwtMC45MDQgMC41NTYsLTEuMTcyYzAuMzU4LC0wLjM1NSAwLjgzMSwtMC41NzMgMS4zMzQsLTAuNjE2bDEyLjI3MiwwYzAuNTA2LDAuMDQgMC45ODIsMC4yNTggMS4zNDMsMC42MTZjMC4zNTcsMC4yMzIgMC41NjgsMC42MzUgMC41NTYsMS4wNmwtMS4wMDEsMjUuNTg4WiIgZmlsbD0iI2ZjYjIxNCIvPjwvc3ZnPg==");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-disabled,.wf-step-disabled{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk1Ljg5LDMwLjUyOGMtMi40OTYsLTUuOTQxIC02LjEwOCwtMTEuMzUxIC0xMC42NDIsLTE1LjkzOGMtNC41NzUsLTQuNTM4IC05Ljk5LC04LjE0OCAtMTUuOTQyLC0xMC42M2MtMTIuNDAxLC01LjI4IC0yNi40NDEsLTUuMjggLTM4Ljg0MiwwYy01Ljk2NSwyLjQ4NSAtMTEuMzg5LDYuMTAxIC0xNS45NzIsMTAuNjVjLTQuNTEsNC41ODYgLTguMTAxLDkuOTg5IC0xMC41ODIsMTUuOTE4Yy01LjI4NywxMi40MzIgLTUuMjg3LDI2LjQ5IDAsMzguOTIxYzIuNDk1LDUuOTQyIDYuMTA3LDExLjM1MyAxMC42NDIsMTUuOTM5YzQuNTgzLDQuNTQ4IDEwLjAwNyw4LjE2NSAxNS45NzIsMTAuNjQ5YzEyLjQsNS4yODQgMjYuNDQyLDUuMjg0IDM4Ljg0MiwwYzUuOTY1LC0yLjQ4NCAxMS4zODksLTYuMTAxIDE1Ljk3MiwtMTAuNjQ5YzQuNTM2LC00LjU4NSA4LjE0OSwtOS45OTYgMTAuNjQyLC0xNS45MzljNS4yODcsLTEyLjQzMSA1LjI4NywtMjYuNDg5IDAsLTM4LjkyMWwtMC4wOSwwWm0tNzUuNjA4LDM4Ljg1MWMtNy4zMDIsLTExLjIxMiAtNy42ODksLTI1LjYyIC0wLjk5OCwtMzcuMjA3YzMuMDc1LC01LjM3NSA3LjUyMiwtOS44NDQgMTIuODg3LC0xMi45NWM1LjM3NSwtMy4xMjkgMTEuNDk3LC00Ljc1NCAxNy43MTksLTQuNzAyYzYuOTU1LC0wLjA2IDEzLjc2NiwyLjAwMiAxOS41MTYsNS45MDdsLTQ5LjEyNCw0OC45NTJabTYyLjIwMSwtNS42NDhjLTEuNzU1LDQuMjI4IC00LjMxOCw4LjA3NiAtNy41NDcsMTEuMzI2Yy0zLjI0MywzLjIyOSAtNy4wNzYsNS44MDkgLTExLjI5LDcuNjAxYy00LjM0MywxLjg4MyAtOS4wMzEsMi44NDYgLTEzLjc2NiwyLjgyOWMtNi44NzIsMC4wMDggLTEzLjU5NSwtMi4wMTcgLTE5LjMxNiwtNS44MTdsNDkuMDU0LC00OC44MTNjMy43NDEsNS42ODcgNS43MTEsMTIuMzU0IDUuNjYsMTkuMTU3YzAuMDAzLDQuNzEzIC0wLjk0OCw5LjM3OSAtMi43OTUsMTMuNzE3bDAsMFoiIGZpbGw9IiNkMWQxZDEiLz48L3N2Zz4=");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-premium,.wf-step-premium{width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:40%}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-running{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-complete-success{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-disabled{display:block}#wf-scan-last-status{font-size:0.75rem;text-align:center}@media (min-width: 768px){#wf-scan-last-status{text-align:left}}#wf-scan-activity-log-controls{-webkit-flex-shrink:0;flex-shrink:0;text-align:center;white-space:nowrap}@media (min-width: 768px){#wf-scan-activity-log-controls{text-align:right}}#wf-scan-activity-log-controls a{text-transform:uppercase;font-size:0.75rem;white-space:nowrap}#wf-scan-toggle-activity-log .wf-scan-activity-log-visible{display:none}#wf-scan-toggle-activity-log .wf-scan-activity-log-hidden{display:inline}#wf-scan-toggle-activity-log.wf-active .wf-scan-activity-log-visible{display:inline}#wf-scan-toggle-activity-log.wf-active .wf-scan-activity-log-hidden{display:none}#wf-scan-running-bar{height:4px;border:1px solid #e2e2e2;background-color:#ffffff;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}#wf-scan-running-bar-pill{height:4px;width:33.3333%;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both;-o-animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both;animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both}@-moz-keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}@-webkit-keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}@keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}#wf-scan-activity-log{display:none;overflow-x:hidden;overflow-y:auto;background-color:#ffffff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3;padding:0.5rem;height:7rem}#wf-scan-activity-log>li{margin:0;padding:0}#wf-scan-activity-log.wf-active{display:block}.wf-scan-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;box-shadow:inset 0px 0px 0px 1px #f1f1f1,inset 0px -1px 0px 1px #e2e2e2;margin:0.5rem 0 0 0}.wf-scan-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-scan-tabs .wf-tab{border:1px solid #d0d0d0;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin:0;margin-left:0.5rem;background:#e6e6e6;color:#333}.wf-scan-tabs .wf-tab:first-of-type{margin-left:0}.wf-scan-tabs .wf-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{border-bottom:1px solid #ffffff;background:#ffffff;margin-bottom:-1px;-webkit-box-shadow:none;box-shadow:none}.wf-scan-tabs #wf-scan-bulk-buttons{-webkit-flex-grow:1 !important;flex-grow:1 !important;text-align:right}.wf-scan-tab-content{display:none;margin-top:15px}.wf-scan-tab-content.wf-active{display:block}.wf-scan-results{margin:0;margin-top:-1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #e2e2e2;border-right:1px solid #e2e2e2;border-bottom:1px solid #e2e2e2}.wf-scan-results>.wf-scan-results-stats{margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block{box-shadow:none;margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list>li{border-top:0px;padding:0 1rem}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list .wf-flex-horizontal>li{font-size:0.75rem;white-space:nowrap;margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list .wf-flex-horizontal>li:last-of-type{text-align:right}.wf-scan-results-issues{padding:0;margin:0;display:none}.wf-scan-results-issues.wf-active{display:block}.wf-issue,.wf-issue-site-cleaning{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;border-top:1px solid #e2e2e2}.wf-issue:nth-of-type(2n),.wf-issue-site-cleaning:nth-of-type(2n){background-color:#fff}.wf-issue>li,.wf-issue-site-cleaning>li{margin:0}.wf-issue.wf-issue-severity-critical,.wf-issue-site-cleaning.wf-issue-severity-critical{border-left:4px solid #930000}.wf-issue.wf-issue-severity-high,.wf-issue-site-cleaning.wf-issue-severity-high{border-left:4px solid #c10000}.wf-issue.wf-issue-severity-warning,.wf-issue.wf-issue-severity-medium,.wf-issue-site-cleaning.wf-issue-severity-warning,.wf-issue-site-cleaning.wf-issue-severity-medium{border-left:4px solid #fcb214}.wf-issue.wf-issue-severity-low,.wf-issue-site-cleaning.wf-issue-severity-low{border-left:4px solid #3f596b}.wf-issue.wf-issue-severity-good,.wf-issue-site-cleaning.wf-issue-severity-good{border-left:4px solid #16bc9b}.wf-issue>.wf-issue-summary>ul,.wf-issue-site-cleaning>.wf-issue-summary>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;padding:1.5rem}.wf-issue>.wf-issue-summary>ul>li,.wf-issue-site-cleaning>.wf-issue-summary>ul>li{margin:0;padding:0;padding-left:1.5rem}@media (max-width: 767px){.wf-issue>.wf-issue-summary>ul>li,.wf-issue-site-cleaning>.wf-issue-summary>ul>li{padding-left:0.5rem}}.wf-issue>.wf-issue-summary>ul>li:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>li:first-of-type{padding-left:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-icon-colored,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon-colored{text-align:left;-webkit-flex-basis:50px;flex-basis:50px;-webkit-flex-shrink:0;flex-shrink:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon>*,.wf-issue>.wf-issue-summary>ul>.wf-issue-icon-colored>*,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon>*,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon-colored>*{height:40px}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon svg path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon svg path{fill:#9e9e9e}.wf-issue>.wf-issue-summary>ul>.wf-issue-short,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short{-webkit-flex-basis:40%;flex-basis:40%}.wf-issue>.wf-issue-summary>ul>.wf-issue-stats,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-stats{-webkit-flex-basis:25%;flex-basis:25%}.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats{-webkit-flex-grow:1;flex-grow:1}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-high,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-medium,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-low,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-high,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-medium,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-low,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning{padding-left:18px;position:relative}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-high:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-low:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-high:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-low:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning:before{content:'';display:block;position:absolute;top:50%;left:0;margin-top:-5px;border:5px solid #9f9fa0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical:before{border-color:#930000}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-high:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-high:before{border-color:#c10000}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning:before{border-color:#fcb214}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-low:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-low:before{border-color:#3f596b}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-flex-direction:row;flex-direction:row}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;padding-left:2rem;text-decoration:none}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:first-of-type{padding-left:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active{height:20px}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path{fill:#9e9e9e;fill-rule:nonzero}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label{padding-top:0.65rem;font-size:0.7rem;font-weight:500;text-transform:uppercase;color:#9e9e9e}.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls{margin-top:1rem;-webkit-justify-content:flex-start;justify-content:flex-start}.wf-issue .wf-issue-control-icon-active,.wf-issue-site-cleaning .wf-issue-control-icon-active{display:none}.wf-issue .wf-issue-control-icon-inactive,.wf-issue-site-cleaning .wf-issue-control-icon-inactive{display:block}.wf-issue>.wf-issue-detail,.wf-issue-site-cleaning>.wf-issue-detail{display:none;padding:1.5rem;border-top:1px solid #e2e2e2}.wf-issue>.wf-issue-detail .wf-issue-detail-spacer,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-spacer{height:1rem;margin:0;padding:0}.wf-issue>.wf-issue-detail .wf-issue-detail-controls,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;margin-top:1rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*{margin-left:1rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type{margin-left:0}@media (max-width: 767px){.wf-issue>.wf-issue-detail .wf-issue-detail-controls,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls{-webkit-align-items:flex-start;align-items:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*{margin-left:0;margin-top:0.5rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type{margin-top:0}}.wf-issue>.wf-issue-detail .wf-vulnerability-severity-critical,.wf-issue-site-cleaning>.wf-issue-detail .wf-vulnerability-severity-critical{color:#cc0500}.wf-issue>.wf-issue-detail .wf-vulnerability-severity-high,.wf-issue-site-cleaning>.wf-issue-detail .wf-vulnerability-severity-high{color:#df3d03}.wf-issue>.wf-issue-detail .wf-vulnerability-severity-medium,.wf-issue-site-cleaning>.wf-issue-detail .wf-vulnerability-severity-medium{color:#f9a009}.wf-issue>.wf-issue-detail .wf-vulnerability-severity-low,.wf-issue-site-cleaning>.wf-issue-detail .wf-vulnerability-severity-low{color:#ffcb0d}.wf-issue>.wf-issue-detail .wf-vulnerability-severity-none,.wf-issue-site-cleaning>.wf-issue-detail .wf-vulnerability-severity-none{color:#333}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-inactive,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-inactive{display:none}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-active,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-active{display:block}.wf-issue.wf-active>.wf-issue-detail,.wf-issue-site-cleaning.wf-active>.wf-issue-detail{display:block}.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short{-webkit-flex-basis:auto;flex-basis:auto}.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short p{padding:0;margin:0}.wf-option-scan-signatures>.wf-option-disclosure{-webkit-flex-grow:1;flex-grow:1;text-align:right}.wf-option-scan-signatures>.wf-option-disclosure>svg{transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275)}#wf-scan-additional-signatures{display:none;margin-left:3rem;padding-left:30px;padding-bottom:1rem}#wf-scan-additional-signatures>h4{margin:0 0 0.5rem 0}#wf-scan-additional-signatures>textarea{width:300px;height:80px}.wf-scan-type-enabled{padding:1rem 0.5rem}.wf-scan-type-enabled>li:first-of-type{padding-right:1.5rem}.wf-scan-type-controls{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;margin:0 -0.5rem}.wf-scan-type{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;min-width:700px}@media (max-width: 767px){.wf-scan-type{-webkit-justify-content:flex-start;justify-content:flex-start}}.wf-scan-type>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:25%;flex-basis:25%;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;max-width:25%;padding:0.5rem}@media (min-width: 768px){.wf-scan-type>li{-webkit-flex-shrink:1;flex-shrink:1}}.wf-scan-type>li>ul.wf-scan-type-option{-webkit-flex-grow:1;flex-grow:1;margin:0;padding:0;border:1px solid #d9d9d9;min-height:100%;cursor:pointer}.wf-scan-type>li>ul.wf-scan-type-option.wf-scan-type-option-custom{cursor:inherit}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;border-bottom:2px solid #d9d9d9;padding:0.5rem 1rem}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name .wf-option-checkbox{margin-right:0.5rem;width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:20px !important;background-color:#ffffff;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:25px !important}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name span{font-weight:400;font-size:0.95rem}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-description{padding:1rem}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name span{color:#ffffff}.wf-scan-scheduling-manual{display:none;margin-left:3rem;padding-left:30px}.wf-scan-scheduling-manual.wf-active{display:block}.wf-scan-scheduling-manual>li{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets-label{padding-right:1rem}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li{margin:0;padding:0.5rem 0.7rem;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{color:#ffffff}.wf-scan-scheduling-manual-preset-options .wfselect2-container{min-width:100px}.wf-scan-scheduling-manual-preset-options:not(.wf-active),.wf-scan-scheduling-manual-custom-options:not(.wf-active){display:none !important}.wf-scan-scheduling-manual-custom-options{padding-bottom:1rem}.wf-schedule-times-wrapper{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin-top:1rem}@media (min-width: 768px){.wf-schedule-times-wrapper{margin-top:0.25rem}}.wf-schedule-times-wrapper:first-of-type{margin-top:0}@media (min-width: 768px){.wf-schedule-times-wrapper:first-of-type{margin-top:1rem}}.wf-schedule-times-wrapper>*{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-schedule-times-wrapper>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:initial;padding-right:0.25rem}.wf-schedule-times-wrapper .wf-schedule-period{font-weight:500;padding:0.5rem 0.7rem}.wf-schedule-times{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-schedule-times>li{margin:0;padding:0.5rem 0.7rem;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-schedule-times>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-schedule-times>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-schedule-times>li.wf-active{color:#ffffff}.wf-issue-control-ignore-menu{position:absolute;z-index:9999;background-color:#ffffff;border:1px solid #bfbfbf}.wf-issue-control-ignore-menu>li{padding:0.5rem 1rem;margin:0;border-top:1px solid #bfbfbf;cursor:pointer}.wf-issue-control-ignore-menu>li:hover{color:#ffffff}.wf-issue-control-ignore-menu>li:first-of-type{border-top:0}#wf-scan-failed.wf-alert.wf-alert-danger{background-color:#ffe470;border-color:#ffd10a;border-radius:0}#wf-scan-failed.wf-alert.wf-alert-danger pre{white-space:normal}#wf-scan-failed.wf-alert.wf-alert-danger svg{width:50px;height:50px;margin-right:1rem}#wf-scan-failed.wf-alert.wf-alert-danger svg path{fill:#da9603}#wf-scan-failed.wf-alert.wf-alert-danger h4{margin:0}#wf-scan-failed.wf-alert.wf-alert-danger p{margin-top:0.25rem;margin-bottom:0}#wf-scan-failed.wf-alert.wf-alert-danger .wf-btn.wf-btn-default{border-color:#ffffff;background-color:#ffffff;color:#000000}#wf-site-cleaning-bottom h3{font-weight:300;font-size:1.5rem;margin:1rem 0}#wf-site-cleaning-bottom p{max-width:750px}#wfTwoFactorQRCodeTable{width:175px;height:175px;margin:0 auto}@media (min-width: 500px){#wfTwoFactorQRCodeTable{width:256px;height:256px}}#wfTwoFactorRecoveryCodes{list-style-type:none}#wfTwoFactorRecoveryCodes li{font-family:monospace;text-align:center}#wfTwoFactorDownload .dashicons{line-height:26px}.wf-twofactor-delete{font-size:1.5rem}.wf-twofactor-delete a{text-decoration:none;color:#333}.wf-twofactor-delete a i{font-size:1.5rem}.wf-table.wf-table-twofactor>tbody>tr>td{vertical-align:middle}.wf-form-twofactor{max-width:400px}.wf-form-twofactor .wf-radio label{padding-left:0}#twofactor .wf-block-list>li{padding:.8rem 1.5rem;min-height:0px}#twofactor .wf-block-list .wf-form-control{margin:0px 0px}.wf-block-list .wf-block-list-title{font-weight:bold;font-size:0.9rem}.wf-block-list .wf-block-list-subtitle{font-weight:bold;font-size:0.85rem}#wfTwoFacUsers{margin:0 auto 1.5rem}#wf-tools-two-factor #wf-two-factor-img1,#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img1,#wf-all-options #wf-two-factor-img2{display:inline}#wf-tools-two-factor #wf-two-factor-img1,#wf-all-options #wf-two-factor-img1{max-width:316px}#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img2{max-width:270px}#wfUsername{max-width:568px}@media screen and (max-width: 782px){#wf-tools-two-factor #wf-two-factor-img1,#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img1,#wf-all-options #wf-two-factor-img2{display:block;margin:0px auto 20px}}#wordfenceTwoFactorLegacy,#wordfenceTwoFactorModern{background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin-bottom:0.5rem;padding:1px 13px}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}label.wf-plain{font-weight:normal}label.wf-control-label.wf-disabled{pointer-events:none}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:1.5rem;font-size:14px;line-height:1.42857;color:#555}.wf-form-control{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#555;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wf-form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.wf-form-control::-moz-placeholder{color:#bfbfbf;opacity:1}.wf-form-control:-ms-input-placeholder{color:#bfbfbf}.wf-form-control::-webkit-input-placeholder{color:#bfbfbf}.wf-form-control::-ms-expand{border:0;background-color:transparent}.wf-form-control[disabled],.wf-form-control[readonly],fieldset[disabled] .wf-form-control{background-color:#e2e2e2;opacity:1}.wf-form-control[disabled],.wf-form-control[readonly],fieldset[disabled] .wf-form-control{cursor:not-allowed;pointer-events:none}textarea.wf-form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio: 0){input[type="date"].wf-form-control,input[type="time"].wf-form-control,input[type="datetime-local"].wf-form-control,input[type="month"].wf-form-control{line-height:38px}input[type="date"].wf-input-sm,.wf-input-group-sm input[type="date"],input[type="time"].wf-input-sm,.wf-input-group-sm input[type="time"],input[type="datetime-local"].wf-input-sm,.wf-input-group-sm input[type="datetime-local"],input[type="month"].wf-input-sm,.wf-input-group-sm input[type="month"]{line-height:30px}input[type="date"].wf-input-lg,.wf-input-group-lg input[type="date"],input[type="time"].wf-input-lg,.wf-input-group-lg input[type="time"],input[type="datetime-local"].wf-input-lg,.wf-input-group-lg input[type="datetime-local"],input[type="month"].wf-input-lg,.wf-input-group-lg input[type="month"]{line-height:46px}}.wf-form-group{margin-bottom:8px}.wf-form-group.wf-sub-group label{color:#666666;font-weight:normal;padding-left:20px}.wf-form-group.wf-focus{border-left:4px solid #11967a;padding-bottom:8px;background-color:#e5e5e5}.wf-form-group.wf-focus label{margin-left:-4px}.wf-radio,.wf-checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.wf-radio label,.wf-checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.wf-radio input[type="radio"],.wf-radio-inline input[type="radio"],.wf-checkbox input[type="checkbox"],.wf-checkbox-inline input[type="checkbox"]{margin-top:4px \9}.wf-radio-offset{padding-left:29px}@media (min-width: 768px){.wf-radio-offset{padding-left:20px}}.wf-radio+.wf-radio,.wf-checkbox+.wf-checkbox{margin-top:-5px}.wf-radio-inline,.wf-checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.wf-radio-inline+.wf-radio-inline,.wf-checkbox-inline+.wf-checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"][readonly],input[type="radio"].wf-disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"][readonly],input[type="checkbox"].wf-disabled,fieldset[disabled] input[type="checkbox"]{cursor:not-allowed;pointer-events:none}.wf-radio-inline.wf-disabled,fieldset[disabled] .wf-radio-inline,.wf-checkbox-inline.wf-disabled,fieldset[disabled] .wf-checkbox-inline{cursor:not-allowed}.wf-radio.wf-disabled label,fieldset[disabled] .wf-radio label,.wf-checkbox.wf-disabled label,fieldset[disabled] .wf-checkbox label{cursor:not-allowed;pointer-events:none}.wf-form-control-static{padding-top:1.5rem;padding-bottom:1.5rem;margin:0;line-height:1}.wf-form-control-static.wf-input-lg,.wf-form-control-static.wf-input-sm{padding-left:0;padding-right:0}.wf-input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.wf-input-sm{height:30px;line-height:30px}textarea.wf-input-sm,select[multiple].wf-input-sm{height:auto}.wf-form-group-sm .wf-form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-form-group-sm select.wf-form-control{height:30px;line-height:30px}.wf-form-group-sm textarea.wf-form-control,.wf-form-group-sm select[multiple].wf-form-control{height:auto}.wf-form-group-sm .wf-form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.wf-input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}select.wf-input-lg{height:46px;line-height:46px}textarea.wf-input-lg,select[multiple].wf-input-lg{height:auto}.wf-form-group-lg .wf-form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-form-group-lg select.wf-form-control{height:46px;line-height:46px}.wf-form-group-lg textarea.wf-form-control,.wf-form-group-lg select[multiple].wf-form-control{height:auto}.wf-form-group-lg .wf-form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.33333}.wf-has-feedback{position:relative}.wf-has-feedback .wf-form-control{padding-right:47.5px}.wf-form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.wf-input-lg+.wf-form-control-feedback,.wf-input-group-lg+.wf-form-control-feedback,.wf-form-group-lg .wf-form-control+.wf-form-control-feedback{width:46px;height:46px;line-height:46px}.wf-input-sm+.wf-form-control-feedback,.wf-input-group-sm+.wf-form-control-feedback,.wf-form-group-sm .wf-form-control+.wf-form-control-feedback{width:30px;height:30px;line-height:30px}.wf-has-success .wf-help-block,.wf-has-success .wf-control-label,.wf-has-success .wf-radio,.wf-has-success .wf-checkbox,.wf-has-success .wf-radio-inline,.wf-has-success .wf-checkbox-inline,.wf-has-success.wf-radio label,.wf-has-success.wf-checkbox label,.wf-has-success.wf-radio-inline label,.wf-has-success.wf-checkbox-inline label{color:#3c763d}.wf-has-success .wf-form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-success .wf-form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.wf-has-success .wf-input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.wf-has-success .wf-form-control-feedback{color:#3c763d}.wf-has-warning .wf-help-block,.wf-has-warning .wf-control-label,.wf-has-warning .wf-radio,.wf-has-warning .wf-checkbox,.wf-has-warning .wf-radio-inline,.wf-has-warning .wf-checkbox-inline,.wf-has-warning.wf-radio label,.wf-has-warning.wf-checkbox label,.wf-has-warning.wf-radio-inline label,.wf-has-warning.wf-checkbox-inline label{color:#8a6d3b}.wf-has-warning .wf-form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-warning .wf-form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.wf-has-warning .wf-input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.wf-has-warning .wf-form-control-feedback{color:#8a6d3b}.wf-has-error .wf-help-block,.wf-has-error .wf-control-label,.wf-has-error .wf-radio,.wf-has-error .wf-checkbox,.wf-has-error .wf-radio-inline,.wf-has-error .wf-checkbox-inline,.wf-has-error.wf-radio label,.wf-has-error.wf-checkbox label,.wf-has-error.wf-radio-inline label,.wf-has-error.wf-checkbox-inline label{color:#a94442}.wf-has-error .wf-form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-error .wf-form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.wf-has-error .wf-input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.wf-has-error .wf-form-control-feedback{color:#a94442}.wf-has-feedback label ~ .wf-form-control-feedback{top:25px}.wf-has-feedback label.wf-sr-only ~ .wf-form-control-feedback{top:0}.wf-help-block{display:block;margin-top:5px;color:#737373}@media (min-width: 768px){.wf-form-inline .wf-form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-form-control{display:inline-block;width:auto;vertical-align:middle}.wf-form-inline .wf-form-control-static{display:inline-block}.wf-form-inline .wf-input-group{display:inline-table;vertical-align:middle}.wf-form-inline .wf-input-group .wf-input-group-addon,.wf-form-inline .wf-input-group .wf-input-group-btn,.wf-form-inline .wf-input-group .wf-form-control{width:auto}.wf-form-inline .wf-input-group>.wf-form-control{width:100%}.wf-form-inline .wf-control-label{margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-radio,.wf-form-inline .wf-checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-radio label,.wf-form-inline .wf-checkbox label{padding-left:0}.wf-form-inline .wf-radio input[type="radio"],.wf-form-inline .wf-checkbox input[type="checkbox"]{position:relative;margin-left:0}.wf-form-inline .wf-has-feedback .wf-form-control-feedback{top:0}}.wf-form-horizontal .wf-radio,.wf-form-horizontal .wf-checkbox,.wf-form-horizontal .wf-radio-inline,.wf-form-horizontal .wf-checkbox-inline{margin-top:0;margin-bottom:0;padding-top:1.5rem}.wf-form-horizontal .wf-radio,.wf-form-horizontal .wf-checkbox{min-height:29px}.wf-form-horizontal .wf-form-group{margin-left:-15px;margin-right:-15px}.wf-form-horizontal .wf-form-group:before,.wf-form-horizontal .wf-form-group:after{content:" ";display:table}.wf-form-horizontal .wf-form-group:after{clear:both}@media (min-width: 768px){.wf-form-horizontal .wf-control-label{text-align:right;margin-bottom:0;padding-top:1.5rem}}.wf-form-horizontal .wf-has-feedback .wf-form-control-feedback{right:15px}@media (min-width: 768px){.wf-form-horizontal .wf-form-group-lg .wf-control-label{padding-top:11px;font-size:18px}}@media (min-width: 768px){.wf-form-horizontal .wf-form-group-sm .wf-control-label{padding-top:6px;font-size:12px}}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value{padding-top:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value .wf-fa,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value svg{width:140px}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value{color:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value svg{fill:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-label{color:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value svg,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-label,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa{font-size:7rem}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg{width:120px}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label{font-size:1.15rem;font-weight:300}.wf-dashboard-item{position:relative;margin:0 auto 1rem;padding:0 1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wf-dashboard-item .wf-dashboard-item-inner{min-height:44px;padding:1rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content{max-width:75%}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content .wf-dashboard-item-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.875rem;width:100%}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content .wf-dashboard-item-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text{width:auto}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-success{color:#11967a}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-warning{color:#930000}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-warning a{color:#930000}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-checkbox.checked{background-position:right center}.wf-dashboard-item .wf-dashboard-item-extra{display:none;margin:0 -1rem;padding:0 1rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list{margin:0 -1rem;padding:0;list-style:none}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification{border-left:4px solid #f9f9f9}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification.wf-notification-warning{border-left:4px solid #fcb214}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification.wf-notification-critical{border-left:4px solid #930000}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even){background-color:#ffffff}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification{border-left:4px solid #ffffff}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification.wf-notification-warning{border-left:4px solid #fcb214}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification.wf-notification-critical{border-left:4px solid #930000}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #eeeeee;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #eeeeee}@media (min-width: 768px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal.wf-dashboard-item-list-equal>li{max-width:50%}}@media (min-width: 992px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal.wf-dashboard-item-list-equal>li{max-width:25%}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state{text-align:center}@media (min-width: 1200px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state{text-align:left}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-enabled .fa{color:#11967a}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-disabled .fa{color:#525355}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-premium{color:#9f9fa0}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-dismiss{padding-left:2rem;font-size:1.25rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-dismiss a{color:#525355}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count-count{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wf-dashboard-item.active .wf-dashboard-item-extra{display:block}.wf-dashboard-item.wf-dashboard-item-left .wf-dashboard-item-content{margin-left:48px}.wf-dashboard-item.wf-dashboard-item-left .wf-dashboard-item-action{right:auto;left:0px}.wf-dashboard-item.disabled .wf-dashboard-item-content .wf-dashboard-item-title{color:#aaaaaa}.wf-dashboard-item.disabled .wf-dashboard-item-content .wf-dashboard-item-subtitle{color:#8ea6be}.wf-dashboard-item-flex-wrapper{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-dashboard-item-flex-wrapper .wf-dashboard-item{-webkit-flex-grow:1;flex-grow:1;width:100%}.wf-notifications-empty{font-size:0.9rem;color:#9f9fa0}.wf-dashboard-graph-wrapper{width:100%}.wf-dashboard-badge{display:inline-block;min-width:10px;padding:3px 7px;margin-left:0.5rem;font-size:12px;font-weight:bold;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#fcb214;border-radius:10px}.wf-dashboard-badge:empty{display:none}.wf-btn .wf-dashboard-badge{position:relative;top:-1px}.wf-btn-xs .wf-dashboard-badge,.wf-btn-group-xs>.wf-btn .wf-dashboard-badge,.wf-btn-group-xs>.wf-btn .wf-dashboard-badge{top:0;padding:1px 5px}.wf-list-group-item.active>.wf-dashboard-badge,.wf-nav-pills>.active>a>.wf-dashboard-badge{color:#00709e;background-color:#fff}.wf-list-group-item>.wf-dashboard-badge{float:right}.wf-list-group-item>.wf-dashboard-badge+.wf-dashboard-badge{margin-right:5px}.wf-nav-pills>li>a>.wf-dashboard-badge{margin-left:3px}.wf-dashboard-toggle-btns{text-align:center}.wf-dashboard-toggle-btns .wf-pagination{margin:1rem 1rem 0.5rem 1rem}.wf-dashboard-show-more{position:relative;font-size:14px;color:#959595;text-align:center;line-height:1rem;background:#ffffff;width:60%;margin:20px auto 0 auto}.wf-dashboard-show-more:before{display:inline-block;content:"";position:absolute;height:1px;background:#dddddd;top:50%;width:100%;left:0;right:0}.wf-dashboard-show-more a{display:inline-block;position:relative;padding:0 10px;background-color:#ffffff}.wf-ips,.wf-recent-logins,.wf-countries{max-height:30rem;overflow-y:auto;margin-bottom:20px}.wf-ips .wf-table,.wf-recent-logins .wf-table,.wf-countries .wf-table{margin-bottom:0}.wf-dashboard-last-updated{font-style:italic;font-size:0.6rem;text-align:center;padding-bottom:1rem;margin:0}.wf-dashboard-navigation .wf-block-navigation-option-content{padding:1rem 0 1rem 1rem}@media (min-width: 768px){.wf-dashboard-navigation .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1rem}}.wf-dashboard-navigation .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-dashboard-navigation .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}.wf-blocks-summary{width:100%;margin:1rem 0;border-spacing:0}.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tbody>tr>th,.wf-blocks-summary>tr>th{font-weight:600;padding:0.25rem 0.25rem;white-space:nowrap}@media (min-width: 768px){.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tbody>tr>th,.wf-blocks-summary>tr>th{padding:0.25rem 1rem}}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;color:#aaa}.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tr>th{text-align:center}.wf-blocks-summary>thead>tr>th:first-child,.wf-blocks-summary>tbody>tr>th{text-align:right}.wf-blocks-summary>tbody>tr>td,.wf-blocks-summary>tfoot>tr>td,.wf-blocks-summary>tr>td{text-align:center;padding:0.25rem 0.25rem}@media (min-width: 768px){.wf-blocks-summary>tbody>tr>td,.wf-blocks-summary>tfoot>tr>td,.wf-blocks-summary>tr>td{padding:0.25rem 1rem}}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{color:#aaa}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem;color:#fff}#howGetIPs-trusted-proxies,#howGetIPs-trusted-proxy-preset{display:none}ul.wf-option.wf-option-howgetips .wf-option-howgetips-details{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.8rem;margin-top:0.5rem}.wf-central-dashboard{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:stretch;align-content:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-central-dashboard .wf-central-dashboard-logo{width:80px;min-width:80px;margin:10px 0}.wf-central-dashboard .wf-central-dashboard-copy{padding-left:20px}@media (min-width: 768px){.wf-central-dashboard{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}table.wf-table{background-color:transparent;border-collapse:collapse;border-spacing:0}table.wf-table td,table.wf-table th{padding:0}.wf-table caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}.wf-table th{text-align:left}.wf-table{width:100%;max-width:100%;margin-bottom:20px}.wf-table>thead>tr>th,.wf-table>thead>tr>td,.wf-table>tbody>tr>th,.wf-table>tbody>tr>td,.wf-table>tfoot>tr>th,.wf-table>tfoot>tr>td{padding:8px;line-height:1.42857;vertical-align:top;border-top:1px solid #ddd}.wf-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.wf-table>caption+thead>tr:first-child>th,.wf-table>caption+thead>tr:first-child>td,.wf-table>colgroup+thead>tr:first-child>th,.wf-table>colgroup+thead>tr:first-child>td,.wf-table>thead:first-child>tr:first-child>th,.wf-table>thead:first-child>tr:first-child>td{border-top:0}.wf-table>tbody+tbody{border-top:2px solid #ddd}.wf-table .wf-table{background-color:#fff}.wf-table-condensed>thead>tr>th,.wf-table-condensed>thead>tr>td,.wf-table-condensed>tbody>tr>th,.wf-table-condensed>tbody>tr>td,.wf-table-condensed>tfoot>tr>th,.wf-table-condensed>tfoot>tr>td{padding:5px}.wf-table-bordered{border:1px solid #ddd}.wf-table-bordered>thead>tr>th,.wf-table-bordered>thead>tr>td,.wf-table-bordered>tbody>tr>th,.wf-table-bordered>tbody>tr>td,.wf-table-bordered>tfoot>tr>th,.wf-table-bordered>tfoot>tr>td{border:1px solid #ddd}.wf-table-bordered>thead>tr>th,.wf-table-bordered>thead>tr>td{border-bottom-width:2px}.wf-table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.wf-table-hover>tbody>tr:hover{background-color:#f5f5f5}table.wf-table col[class*="col-"]{position:static;float:none;display:table-column}table.wf-table td[class*="col-"],table.wf-table th[class*="col-"]{position:static;float:none;display:table-cell}.wf-table>thead>tr>td.active,.wf-table>thead>tr>th.active,.wf-table>thead>tr.active>td,.wf-table>thead>tr.active>th,.wf-table>tbody>tr>td.active,.wf-table>tbody>tr>th.active,.wf-table>tbody>tr.active>td,.wf-table>tbody>tr.active>th,.wf-table>tfoot>tr>td.active,.wf-table>tfoot>tr>th.active,.wf-table>tfoot>tr.active>td,.wf-table>tfoot>tr.active>th{background-color:#f5f5f5}.wf-table-hover>tbody>tr>td.active:hover,.wf-table-hover>tbody>tr>th.active:hover,.wf-table-hover>tbody>tr.active:hover>td,.wf-table-hover>tbody>tr:hover>.active,.wf-table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.wf-table>thead>tr>td.success,.wf-table>thead>tr>th.success,.wf-table>thead>tr.success>td,.wf-table>thead>tr.success>th,.wf-table>tbody>tr>td.success,.wf-table>tbody>tr>th.success,.wf-table>tbody>tr.success>td,.wf-table>tbody>tr.success>th,.wf-table>tfoot>tr>td.success,.wf-table>tfoot>tr>th.success,.wf-table>tfoot>tr.success>td,.wf-table>tfoot>tr.success>th{background-color:#dff0d8}.wf-table-hover>tbody>tr>td.success:hover,.wf-table-hover>tbody>tr>th.success:hover,.wf-table-hover>tbody>tr.success:hover>td,.wf-table-hover>tbody>tr:hover>.success,.wf-table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.wf-table>thead>tr>td.info,.wf-table>thead>tr>th.info,.wf-table>thead>tr.info>td,.wf-table>thead>tr.info>th,.wf-table>tbody>tr>td.info,.wf-table>tbody>tr>th.info,.wf-table>tbody>tr.info>td,.wf-table>tbody>tr.info>th,.wf-table>tfoot>tr>td.info,.wf-table>tfoot>tr>th.info,.wf-table>tfoot>tr.info>td,.wf-table>tfoot>tr.info>th{background-color:#d9edf7}.wf-table-hover>tbody>tr>td.info:hover,.wf-table-hover>tbody>tr>th.info:hover,.wf-table-hover>tbody>tr.info:hover>td,.wf-table-hover>tbody>tr:hover>.info,.wf-table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.wf-table>thead>tr>td.warning,.wf-table>thead>tr>th.warning,.wf-table>thead>tr.warning>td,.wf-table>thead>tr.warning>th,.wf-table>tbody>tr>td.warning,.wf-table>tbody>tr>th.warning,.wf-table>tbody>tr.warning>td,.wf-table>tbody>tr.warning>th,.wf-table>tfoot>tr>td.warning,.wf-table>tfoot>tr>th.warning,.wf-table>tfoot>tr.warning>td,.wf-table>tfoot>tr.warning>th{background-color:#fcf8e3}.wf-table-hover>tbody>tr>td.warning:hover,.wf-table-hover>tbody>tr>th.warning:hover,.wf-table-hover>tbody>tr.warning:hover>td,.wf-table-hover>tbody>tr:hover>.warning,.wf-table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.wf-table>thead>tr>td.danger,.wf-table>thead>tr>th.danger,.wf-table>thead>tr.danger>td,.wf-table>thead>tr.danger>th,.wf-table>tbody>tr>td.danger,.wf-table>tbody>tr>th.danger,.wf-table>tbody>tr.danger>td,.wf-table>tbody>tr.danger>th,.wf-table>tfoot>tr>td.danger,.wf-table>tfoot>tr>th.danger,.wf-table>tfoot>tr.danger>td,.wf-table>tfoot>tr.danger>th{background-color:#f2dede}.wf-table-hover>tbody>tr>td.danger:hover,.wf-table-hover>tbody>tr>th.danger:hover,.wf-table-hover>tbody>tr.danger:hover>td,.wf-table-hover>tbody>tr:hover>.danger,.wf-table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.wf-table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width: 767px){.wf-table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.wf-table-responsive>.wf-table{margin-bottom:0}.wf-table-responsive>.wf-table>thead>tr>th,.wf-table-responsive>.wf-table>thead>tr>td,.wf-table-responsive>.wf-table>tbody>tr>th,.wf-table-responsive>.wf-table>tbody>tr>td,.wf-table-responsive>.wf-table>tfoot>tr>th,.wf-table-responsive>.wf-table>tfoot>tr>td{white-space:nowrap}.wf-table-responsive>.wf-table-bordered{border:0}.wf-table-responsive>.wf-table-bordered>thead>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>thead>tr>td:first-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>td:first-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>td:first-child{border-left:0}.wf-table-responsive>.wf-table-bordered>thead>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>thead>tr>td:last-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>td:last-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>td:last-child{border-right:0}.wf-table-responsive>.wf-table-bordered>tbody>tr:last-child>th,.wf-table-responsive>.wf-table-bordered>tbody>tr:last-child>td,.wf-table-responsive>.wf-table-bordered>tfoot>tr:last-child>th,.wf-table-responsive>.wf-table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.wf-sortable{position:relative;padding-right:2rem !important}.wf-sortable .wf-sorted-ascending,.wf-sortable .wf-sorted-descending{display:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.wf-sortable.wf-unsorted:hover .wf-sorted-ascending{display:block}.wf-sortable.wf-unsorted,.wf-sortable.wf-sorted-ascending,.wf-sortable.wf-sorted-descending{cursor:pointer}.wf-sortable.wf-unsorted:hover,.wf-sortable.wf-sorted-ascending:hover,.wf-sortable.wf-sorted-descending:hover{background-color:#e0e0e0}.wf-sortable.wf-sorted-ascending,.wf-sortable.wf-sorted-descending{background-color:#e0e0e0}.wf-sortable.wf-sorted-ascending .wf-sorted-ascending{display:block}.wf-sortable.wf-sorted-descending .wf-sorted-descending{display:block}.wf-nav{margin-bottom:0;padding-left:0;list-style:none}.wf-nav:before,.wf-nav:after{content:" ";display:table}.wf-nav:after{clear:both}.wf-nav>li{position:relative;display:block}.wf-nav>li>a{position:relative;display:block;padding:8px 12px}.wf-nav>li>a:hover,.wf-nav>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wf-nav>li.wf-disabled>a{color:#777}.wf-nav>li.wf-disabled>a:hover,.wf-nav>li.wf-disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{background-color:#e2e2e2}.wf-nav>li>a>img{max-width:none}.wf-nav-tabs{border-bottom:1px solid #d0d0d0}.wf-nav-tabs>li{float:left;margin-bottom:-1px}.wf-nav-tabs>li>a{margin-right:2px;line-height:1.42857;border:1px solid transparent;border-radius:4px 4px 0 0}.wf-nav-tabs>li>a:hover{border-color:#e2e2e2 #e2e2e2 #d0d0d0}.wf-nav-tabs>li.wf-active>a,.wf-nav-tabs>li.wf-active>a:hover,.wf-nav-tabs>li.wf-active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.wf-nav-pills>li{float:left}.wf-nav-pills>li>a{border-radius:4px;text-decoration:none;position:relative;display:block;padding:8px 12px}.wf-nav-pills>li>a:hover,.wf-nav-pills>li>a:focus{text-decoration:none !important;background-color:#e2e2e2}.wf-nav-pills>li+li{margin-left:2px}.wf-nav-pills>li.wf-active>a,.wf-nav-pills>li.wf-active>a:hover,.wf-nav-pills>li.wf-active>a:focus{color:#fff;background-color:#00709e}.wf-nav-pills.wf-nav-pills-bordered>li>a{border:1px solid #e2e2e2}.wf-nav-pills.wf-nav-pills-connected>li>a{border-radius:0;border-right-width:0px}.wf-nav-pills.wf-nav-pills-connected>li+li{margin-left:0}.wf-nav-pills.wf-nav-pills-connected>li.active+li>a{border-left-width:0px}.wf-nav-pills.wf-nav-pills-connected>li:first-of-type>a{-moz-border-radius:4px 0 0 4px;-webkit-border-radius:4px;border-radius:4px 0 0 4px}.wf-nav-pills.wf-nav-pills-connected>li:last-of-type>a{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0;border-radius:0 4px 4px 0;border-right-width:1px}.wf-nav-stacked>li{float:none}.wf-nav-stacked>li+li{margin-top:2px;margin-left:0}.wf-nav-justified,.wf-nav-tabs.wf-nav-justified{width:100%}.wf-nav-justified>li,.wf-nav-tabs.wf-nav-justified>li{float:none}.wf-nav-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{text-align:center;margin-bottom:5px}.wf-nav-justified>.wf-dropdown .wf-dropdown-menu{top:auto;left:auto}@media (min-width: 768px){.wf-nav-justified>li,.wf-nav-tabs.wf-nav-justified>li{display:table-cell;width:1%}.wf-nav-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{margin-bottom:0}}.wf-nav-tabs-justified,.wf-nav-tabs.wf-nav-justified{border-bottom:0}.wf-nav-tabs-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{margin-right:0;border-radius:4px}.wf-nav-tabs-justified>.wf-active>a,.wf-nav-tabs.wf-nav-justified>.wf-active>a,.wf-nav-tabs-justified>.wf-active>a:hover,.wf-nav-tabs.wf-nav-justified>.wf-active>a:hover,.wf-nav-tabs-justified>.wf-active>a:focus,.wf-nav-tabs.wf-nav-justified>.wf-active>a:focus{border:1px solid #ddd}@media (min-width: 768px){.wf-nav-tabs-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.wf-nav-tabs-justified>.wf-active>a,.wf-nav-tabs.wf-nav-justified>.wf-active>a,.wf-nav-tabs-justified>.wf-active>a:hover,.wf-nav-tabs.wf-nav-justified>.wf-active>a:hover,.wf-nav-tabs-justified>.wf-active>a:focus,.wf-nav-tabs.wf-nav-justified>.wf-active>a:focus{border-bottom-color:#fff}}.wf-tab-content>.wf-tab-pane{display:none}.wf-tab-content>.wf-active{display:block}.wf-nav-tabs .wf-dropdown-menu{margin-top:-1px;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-navbar-brand{float:left;padding:12px 8px;font-size:18px;line-height:20px;margin:10px 0 0 0}.wf-navbar-brand:hover,.wf-navbar-brand:focus{text-decoration:none}.wf-navbar-brand>img{display:block}@media (min-width: 768px){.navbar>.container .wf-navbar-brand,.navbar>.container-fluid .wf-navbar-brand{margin-left:-8px}}.wf-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.wf-dropup,.wf-dropdown{position:relative}.wf-dropdown-toggle:focus{outline:0}.wf-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.wf-dropdown-menu .wf-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.wf-dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857;color:#333;text-decoration:none;white-space:nowrap}.wf-dropdown-menu>li>a:hover,.wf-dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.wf-dropdown-menu>.wf-active>a,.wf-dropdown-menu>.wf-active>a:hover,.wf-dropdown-menu>.wf-active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#00709e}.wf-dropdown-menu>.wf-disabled>a,.wf-dropdown-menu>.wf-disabled>a:hover,.wf-dropdown-menu>.wf-disabled>a:focus{color:#777}.wf-dropdown-menu>.wf-disabled>a:hover,.wf-dropdown-menu>.wf-disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.wf-open>.wf-dropdown-menu{display:block}.wf-open>a{outline:0}.wf-dropdown-menu-right{left:auto;right:0}.wf-dropdown-menu-left{left:0;right:auto}.wf-dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857;color:#777;white-space:nowrap}.wf-dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.wf-pull-right>.wf-dropdown-menu{right:0;left:auto}.wf-dropup .wf-caret,.wf-navbar-fixed-bottom .wf-dropdown .wf-caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.wf-dropup .wf-dropdown-menu,.wf-navbar-fixed-bottom .wf-dropdown .wf-dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width: 768px){.wf-navbar-right .wf-dropdown-menu{right:0;left:auto}.wf-navbar-right .wf-dropdown-menu-left{left:0;right:auto}}.wf-mobile-dropdown{border:1px solid #ccc;margin-left:.5em;padding:5px 10px;font-size:14px;line-height:24px;margin:10px 10px 0 0;background:#f1f1f1;color:#000;font-weight:600;text-decoration:none}.wf-blocks-table tbody tr.wf-editing,.wf-blocks-table tbody tr.wf-editing td{background-color:#fffbd8}.wf-blocked-countries-section{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-blocked-countries-section-title{font-size:1.1rem;padding-right:0.5rem}.wf-blocked-countries-section-spacer{-webkit-flex-basis:30px;flex-basis:30px;height:1px;background:#aaa}.wf-blocked-countries-section-options{margin-bottom:0;margin-top:0;padding-left:0.5rem;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-blocked-countries-section-options li{padding:0;margin:0;color:#777}.wf-blocked-countries-section-options li a{padding:2px 4px;text-decoration:none;color:#777}.wf-blocked-countries-section-options li a.active-section{background-color:#777;color:#e2e2e2}.wf-option-bypass-redirect .wf-option-title,.wf-option-bypass-cookie .wf-option-title{-webkit-align-self:flex-start;align-self:flex-start}.wf-option-bypass-redirect *,.wf-option-bypass-cookie *{-webkit-flex-grow:1;flex-grow:1}.wf-option-bypass-redirect *:first-child,.wf-option-bypass-cookie *:first-child{-webkit-flex-grow:0;flex-grow:0}.wf-country-block-map{width:300px}@media (min-width: 768px){.wf-country-block-map{width:500px}}@media (min-width: 992px){.wf-country-block-map{width:700px}}@media (min-width: 1200px){.wf-country-block-map{width:700px}}#wf-create-block{width:100%}#wf-create-block th{white-space:nowrap}#wf-create-block td{width:100%}#wf-create-block td.wf-block-type{width:auto}@media (min-width: 768px){#wf-create-block{width:500px}}@media (min-width: 992px){#wf-create-block{width:700px}}@media (min-width: 1200px){#wf-create-block{width:700px}}#wf-create-block .wf-block-add-country select{width:240px}@media (min-width: 768px){#wf-create-block .wf-block-add-country select{width:280px}}@media (min-width: 992px){#wf-create-block .wf-block-add-country select{width:320px}}#wf-create-block .wf-block-add-country .wfselect2-container--default,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection__choice,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#ffffff;border-color:#e2e2e2;padding:0.5rem}#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-search__field,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}#wfcolorbox .wf-country-selector-controls,.wf-drawer .wf-country-selector-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-shrink:0;flex-shrink:0}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li{border:1px solid #ffffff;border-radius:4px;padding:0.25rem;background-color:#ffffff}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover>a,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus>a{color:#ffffff}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li>a{text-decoration:none;color:#525355}#wfcolorbox .wf-country-selector-options .wf-blocked-countries,.wf-drawer .wf-country-selector-options .wf-blocked-countries{margin-bottom:0;margin-top:1rem;list-style:none;margin-left:-6px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;margin:0px 0px 2px 6px;text-align:center;border:1px solid #e2e2e2;border-radius:4px;padding:8px 12px;background-color:#ffffff;-webkit-flex-basis:38%;flex-basis:38%}@media (min-width: 768px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:20%;flex-basis:20%}}@media (min-width: 992px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:15%;flex-basis:15%}}@media (min-width: 1200px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:10%;flex-basis:10%}}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li:focus{text-decoration:none;background-color:#e2e2e2}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a{color:#777}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li>a{text-decoration:none;position:relative;display:block}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus{background-color:#00709e;border-color:#00709e}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active>a,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover>a,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus>a{color:#fff}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.text-only,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.text-only{position:relative;display:block;padding:8px 12px}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li>a>img,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li>a>img{max-width:none}.wf-tag-selected{background-color:#ffffff;border:1px solid #e2e2e2;border-radius:4px;cursor:default;float:left;margin-right:5px !important;margin-top:5px !important;list-style:none;padding:0.5rem !important}.wf-destroy-tag-selected{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.wf-destroy-tag-selected:hover{text-decoration:none}.wf-tags-show-hide-more{float:left;margin-right:5px;margin-top:5px;list-style:none;padding:0.5rem}.wf-select2-hide-tags .wfselect2-selection__choice{display:none}.wf-country-selector-outer-wrapper{position:relative;-webkit-flex-grow:1;flex-grow:1}.wf-country-selector-outer-wrapper .wf-country-selector-inner-wrapper{position:absolute;top:0px;right:0px;bottom:0px;left:0px;overflow-x:hidden;overflow-y:auto}.wf-alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.wf-alert h4{margin-top:0;color:inherit}.wf-alert .wf-alert-link{font-weight:bold}.wf-alert>p,.wf-alert>ul{margin-bottom:0}.wf-alert>p+p{margin-top:5px}.wf-alert-dismissable,.wf-alert-dismissible{padding-right:35px}.wf-alert-dismissable .close,.wf-alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.wf-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.wf-alert-success hr{border-top-color:#c9e2b3}.wf-alert-success .alert-link{color:#2b542c}.wf-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.wf-alert-info hr{border-top-color:#a6e1ec}.wf-alert-info .alert-link{color:#245269}.wf-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.wf-alert-warning hr{border-top-color:#f7e1b5}.wf-alert-warning .alert-link{color:#66512c}.wf-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.wf-alert-danger hr{border-top-color:#e4b9c0}.wf-alert-danger .alert-link{color:#843534}#wf-tools-whois #wfrawhtml .wf-flex-row{margin:.5rem 0 1rem}#wf-tools-whois #wfrawhtml .wf-flex-row a.wf-flex-row-1{color:#444;text-decoration:none}#wf-tools-whois #wfrawhtml .wf-flex-row a.wf-flex-row-1:hover{color:#00a0d2;text-decoration:underline}#wf-tools-whois #wfrawhtml .failed .wf-block-list>li{display:block}.wf-diagnostic-fail.wf-block .wf-block-header .wf-block-header-content .wf-block-title{color:#d0514c}.wf-diagnostic-fail.wf-block .wf-block-header .wf-block-header-content .wf-block-title:before{content:'\f100';font-family:"Ionicons";display:inline-block;margin:0 .4rem 0 0}#wf-diagnostics .wf-block{margin:0 auto 0.5rem}#wf-diagnostics .wf-result-info{margin:1rem 0}#wf-diagnostics-other-tests .wf-btn-sm,#wf-diagnostics-other-tests .wf-btn-group-sm>.wf-btn{padding:2px 10px;vertical-align:top}.wf-support-block{padding:1rem 0}.wf-support-block>h4{margin:0;padding:0 0 1rem 0}.wf-support-block>h4>a{text-decoration:none;font-size:1.3125rem;line-height:1.5;font-weight:300}.wf-support-block>p{margin:0;padding:0}.wf-support-block>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}.wf-support-block>ul>li{margin:0;padding:1rem 1rem 1rem 0}.wf-support-block>ul>li>a{text-decoration:none;font-size:.875rem;line-height:1.3125;font-weight:normal}.wf-support-top-block,.wf-support-missing-block{padding:1.5rem 0}.wf-support-top-block>h4,.wf-support-missing-block>h4{margin:0;padding:0}.wf-support-top-block>ol>li,.wf-support-missing-block>ol>li{margin:0.75rem 0;padding:0}.wf-support-top-block>ol>li>a,.wf-support-missing-block>ol>li>a{text-decoration:none;font-size:.875rem;line-height:1.3125;font-weight:normal}#wf-gdpr-banner{position:relative;z-index:3006;background-color:#fcb214;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin:0 0 0 -20px;padding:0}#wf-gdpr-banner>li{margin:0;padding:0.5rem 1rem}#wf-toupp-required-overlay::after{position:absolute;z-index:3004;top:0;right:0;width:0;height:0;background:rgba(241,241,241,0.6);content:'';opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wf-toupp-required #wf-toupp-required-overlay::after{width:100%;height:100%;opacity:1;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}#wf-toupp-required-message{display:none;position:fixed;z-index:3005;left:0;width:100%;top:50%;transform:translateY(-50%);text-align:center;color:#666666;opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}#wf-toupp-required-message #wf-toupp-required-message-inner{color:#fff;overflow:hidden;max-width:550px;margin:0 auto;padding:20px}#wf-toupp-required-message #wf-toupp-required-message-inner h2{font-size:2.0rem}#wf-toupp-required-message #wf-toupp-required-message-inner h2 .wf-toupp-required-header{line-height:2.4rem}#wf-toupp-required-message #wf-toupp-required-message-inner p{font-size:1rem}#wf-toupp-required-message #wf-toupp-required-message-inner p:first-child{margin-top:0}#wf-toupp-required-message #wf-toupp-required-message-inner p:last-child{margin-bottom:0}#wf-toupp-required-message #wf-toupp-required-message-inner small{font-size:0.9rem;font-weight:normal;margin-top:12px;display:block}.wf-toupp-required #wf-toupp-required-message{display:block;opacity:1;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.wf-flag-{background-position:-0px -0px !important}.wf-flag-ad{background-position:-16px -0px !important}.wf-flag-ae{background-position:-32px -0px !important}.wf-flag-af{background-position:-48px -0px !important}.wf-flag-ag{background-position:-64px -0px !important}.wf-flag-ai{background-position:-80px -0px !important}.wf-flag-al{background-position:-96px -0px !important}.wf-flag-am{background-position:-112px -0px !important}.wf-flag-an{background-position:-128px -0px !important}.wf-flag-ao{background-position:-144px -0px !important}.wf-flag-ap{background-position:-160px -0px !important}.wf-flag-aq{background-position:-176px -0px !important}.wf-flag-ar{background-position:-0px -11px !important}.wf-flag-as{background-position:-16px -11px !important}.wf-flag-at{background-position:-32px -11px !important}.wf-flag-au{background-position:-48px -11px !important}.wf-flag-aw{background-position:-64px -11px !important}.wf-flag-ax{background-position:-80px -11px !important}.wf-flag-az{background-position:-96px -11px !important}.wf-flag-ba{background-position:-112px -11px !important}.wf-flag-bb{background-position:-128px -11px !important}.wf-flag-bd{background-position:-144px -11px !important}.wf-flag-be{background-position:-160px -11px !important}.wf-flag-bf{background-position:-176px -11px !important}.wf-flag-bg{background-position:-0px -22px !important}.wf-flag-bh{background-position:-16px -22px !important}.wf-flag-bi{background-position:-32px -22px !important}.wf-flag-bj{background-position:-48px -22px !important}.wf-flag-bl{background-position:-64px -22px !important}.wf-flag-bm{background-position:-80px -22px !important}.wf-flag-bn{background-position:-96px -22px !important}.wf-flag-bo{background-position:-112px -22px !important}.wf-flag-bq{background-position:-128px -22px !important}.wf-flag-br{background-position:-144px -22px !important}.wf-flag-bs{background-position:-160px -22px !important}.wf-flag-bt{background-position:-176px -22px !important}.wf-flag-bv{background-position:-0px -33px !important}.wf-flag-bw{background-position:-16px -33px !important}.wf-flag-by{background-position:-32px -33px !important}.wf-flag-bz{background-position:-48px -33px !important}.wf-flag-ca{background-position:-64px -33px !important}.wf-flag-cc{background-position:-80px -33px !important}.wf-flag-cd{background-position:-96px -33px !important}.wf-flag-cf{background-position:-112px -33px !important}.wf-flag-cg{background-position:-128px -33px !important}.wf-flag-ch{background-position:-144px -33px !important}.wf-flag-ci{background-position:-160px -33px !important}.wf-flag-ck{background-position:-176px -33px !important}.wf-flag-cl{background-position:-0px -44px !important}.wf-flag-cm{background-position:-16px -44px !important}.wf-flag-cn{background-position:-32px -44px !important}.wf-flag-co{background-position:-48px -44px !important}.wf-flag-cr{background-position:-64px -44px !important}.wf-flag-cs{background-position:-80px -44px !important}.wf-flag-cu{background-position:-96px -44px !important}.wf-flag-cv{background-position:-112px -44px !important}.wf-flag-cw{background-position:-128px -44px !important}.wf-flag-cx{background-position:-144px -44px !important}.wf-flag-cy{background-position:-160px -44px !important}.wf-flag-cz{background-position:-176px -44px !important}.wf-flag-de{background-position:-0px -55px !important}.wf-flag-dj{background-position:-16px -55px !important}.wf-flag-dk{background-position:-32px -55px !important}.wf-flag-dm{background-position:-48px -55px !important}.wf-flag-do{background-position:-64px -55px !important}.wf-flag-dz{background-position:-80px -55px !important}.wf-flag-ec{background-position:-96px -55px !important}.wf-flag-ee{background-position:-112px -55px !important}.wf-flag-eg{background-position:-128px -55px !important}.wf-flag-eh{background-position:-144px -55px !important}.wf-flag-england{background-position:-160px -55px !important}.wf-flag-er{background-position:-176px -55px !important}.wf-flag-es{background-position:-0px -66px !important}.wf-flag-et{background-position:-16px -66px !important}.wf-flag-eu{background-position:-32px -66px !important}.wf-flag-fam{background-position:-48px -66px !important}.wf-flag-fi{background-position:-64px -66px !important}.wf-flag-fj{background-position:-80px -66px !important}.wf-flag-fk{background-position:-96px -66px !important}.wf-flag-fm{background-position:-112px -66px !important}.wf-flag-fo{background-position:-128px -66px !important}.wf-flag-fr{background-position:-144px -66px !important}.wf-flag-ga{background-position:-160px -66px !important}.wf-flag-gb{background-position:-176px -66px !important}.wf-flag-gd{background-position:-0px -77px !important}.wf-flag-ge{background-position:-16px -77px !important}.wf-flag-gf{background-position:-32px -77px !important}.wf-flag-gg{background-position:-48px -77px !important}.wf-flag-gh{background-position:-64px -77px !important}.wf-flag-gi{background-position:-80px -77px !important}.wf-flag-gl{background-position:-96px -77px !important}.wf-flag-gm{background-position:-112px -77px !important}.wf-flag-gn{background-position:-128px -77px !important}.wf-flag-gp{background-position:-144px -77px !important}.wf-flag-gq{background-position:-160px -77px !important}.wf-flag-gr{background-position:-176px -77px !important}.wf-flag-gs{background-position:-0px -88px !important}.wf-flag-gt{background-position:-16px -88px !important}.wf-flag-gu{background-position:-32px -88px !important}.wf-flag-gw{background-position:-48px -88px !important}.wf-flag-gy{background-position:-64px -88px !important}.wf-flag-hk{background-position:-80px -88px !important}.wf-flag-hm{background-position:-96px -88px !important}.wf-flag-hn{background-position:-112px -88px !important}.wf-flag-hr{background-position:-128px -88px !important}.wf-flag-ht{background-position:-144px -88px !important}.wf-flag-hu{background-position:-160px -88px !important}.wf-flag-id{background-position:-176px -88px !important}.wf-flag-ie{background-position:-0px -99px !important}.wf-flag-il{background-position:-16px -99px !important}.wf-flag-im{background-position:-32px -99px !important}.wf-flag-in{background-position:-48px -99px !important}.wf-flag-io{background-position:-64px -99px !important}.wf-flag-iq{background-position:-80px -99px !important}.wf-flag-ir{background-position:-96px -99px !important}.wf-flag-is{background-position:-112px -99px !important}.wf-flag-it{background-position:-128px -99px !important}.wf-flag-je{background-position:-144px -99px !important}.wf-flag-jm{background-position:-160px -99px !important}.wf-flag-jo{background-position:-176px -99px !important}.wf-flag-jp{background-position:-0px -110px !important}.wf-flag-ke{background-position:-16px -110px !important}.wf-flag-kg{background-position:-32px -110px !important}.wf-flag-kh{background-position:-48px -110px !important}.wf-flag-ki{background-position:-64px -110px !important}.wf-flag-km{background-position:-80px -110px !important}.wf-flag-kn{background-position:-96px -110px !important}.wf-flag-kp{background-position:-112px -110px !important}.wf-flag-kr{background-position:-128px -110px !important}.wf-flag-kw{background-position:-144px -110px !important}.wf-flag-ky{background-position:-160px -110px !important}.wf-flag-kz{background-position:-176px -110px !important}.wf-flag-la{background-position:-0px -121px !important}.wf-flag-lb{background-position:-16px -121px !important}.wf-flag-lc{background-position:-32px -121px !important}.wf-flag-li{background-position:-48px -121px !important}.wf-flag-lk{background-position:-64px -121px !important}.wf-flag-lr{background-position:-80px -121px !important}.wf-flag-ls{background-position:-96px -121px !important}.wf-flag-lt{background-position:-112px -121px !important}.wf-flag-lu{background-position:-128px -121px !important}.wf-flag-lv{background-position:-144px -121px !important}.wf-flag-ly{background-position:-160px -121px !important}.wf-flag-ma{background-position:-176px -121px !important}.wf-flag-mc{background-position:-0px -132px !important}.wf-flag-md{background-position:-16px -132px !important}.wf-flag-me{background-position:-32px -132px !important}.wf-flag-mf{background-position:-48px -132px !important}.wf-flag-mg{background-position:-64px -132px !important}.wf-flag-mh{background-position:-80px -132px !important}.wf-flag-mk{background-position:-96px -132px !important}.wf-flag-ml{background-position:-112px -132px !important}.wf-flag-mm{background-position:-128px -132px !important}.wf-flag-mn{background-position:-144px -132px !important}.wf-flag-mo{background-position:-160px -132px !important}.wf-flag-mp{background-position:-176px -132px !important}.wf-flag-mq{background-position:-0px -143px !important}.wf-flag-mr{background-position:-16px -143px !important}.wf-flag-ms{background-position:-32px -143px !important}.wf-flag-mt{background-position:-48px -143px !important}.wf-flag-mu{background-position:-64px -143px !important}.wf-flag-mv{background-position:-80px -143px !important}.wf-flag-mw{background-position:-96px -143px !important}.wf-flag-mx{background-position:-112px -143px !important}.wf-flag-my{background-position:-128px -143px !important}.wf-flag-mz{background-position:-144px -143px !important}.wf-flag-na{background-position:-160px -143px !important}.wf-flag-nc{background-position:-176px -143px !important}.wf-flag-ne{background-position:-0px -154px !important}.wf-flag-nf{background-position:-16px -154px !important}.wf-flag-ng{background-position:-32px -154px !important}.wf-flag-ni{background-position:-48px -154px !important}.wf-flag-nl{background-position:-64px -154px !important}.wf-flag-no{background-position:-80px -154px !important}.wf-flag-np{background-position:-96px -154px !important}.wf-flag-nr{background-position:-112px -154px !important}.wf-flag-nu{background-position:-128px -154px !important}.wf-flag-nz{background-position:-144px -154px !important}.wf-flag-om{background-position:-160px -154px !important}.wf-flag-pa{background-position:-176px -154px !important}.wf-flag-pe{background-position:-0px -165px !important}.wf-flag-pf{background-position:-16px -165px !important}.wf-flag-pg{background-position:-32px -165px !important}.wf-flag-ph{background-position:-48px -165px !important}.wf-flag-pk{background-position:-64px -165px !important}.wf-flag-pl{background-position:-80px -165px !important}.wf-flag-pm{background-position:-96px -165px !important}.wf-flag-pn{background-position:-112px -165px !important}.wf-flag-pr{background-position:-128px -165px !important}.wf-flag-ps{background-position:-144px -165px !important}.wf-flag-pt{background-position:-160px -165px !important}.wf-flag-pw{background-position:-176px -165px !important}.wf-flag-py{background-position:-0px -176px !important}.wf-flag-qa{background-position:-16px -176px !important}.wf-flag-re{background-position:-32px -176px !important}.wf-flag-ro{background-position:-48px -176px !important}.wf-flag-rs{background-position:-64px -176px !important}.wf-flag-ru{background-position:-80px -176px !important}.wf-flag-rw{background-position:-96px -176px !important}.wf-flag-sa{background-position:-112px -176px !important}.wf-flag-sb{background-position:-128px -176px !important}.wf-flag-sc{background-position:-144px -176px !important}.wf-flag-scotland{background-position:-160px -176px !important}.wf-flag-sd{background-position:-176px -176px !important}.wf-flag-se{background-position:-0px -187px !important}.wf-flag-sg{background-position:-16px -187px !important}.wf-flag-sh{background-position:-32px -187px !important}.wf-flag-si{background-position:-48px -187px !important}.wf-flag-sj{background-position:-64px -187px !important}.wf-flag-sk{background-position:-80px -187px !important}.wf-flag-sl{background-position:-96px -187px !important}.wf-flag-sm{background-position:-112px -187px !important}.wf-flag-sn{background-position:-128px -187px !important}.wf-flag-so{background-position:-144px -187px !important}.wf-flag-sr{background-position:-160px -187px !important}.wf-flag-ss{background-position:-176px -187px !important}.wf-flag-st{background-position:-0px -198px !important}.wf-flag-sv{background-position:-16px -198px !important}.wf-flag-sx{background-position:-32px -198px !important}.wf-flag-sy{background-position:-48px -198px !important}.wf-flag-sz{background-position:-64px -198px !important}.wf-flag-tc{background-position:-80px -198px !important}.wf-flag-td{background-position:-96px -198px !important}.wf-flag-tf{background-position:-112px -198px !important}.wf-flag-tg{background-position:-128px -198px !important}.wf-flag-th{background-position:-144px -198px !important}.wf-flag-tj{background-position:-160px -198px !important}.wf-flag-tk{background-position:-176px -198px !important}.wf-flag-tl{background-position:-0px -209px !important}.wf-flag-tm{background-position:-16px -209px !important}.wf-flag-tn{background-position:-32px -209px !important}.wf-flag-to{background-position:-48px -209px !important}.wf-flag-tr{background-position:-64px -209px !important}.wf-flag-tt{background-position:-80px -209px !important}.wf-flag-tv{background-position:-96px -209px !important}.wf-flag-tw{background-position:-112px -209px !important}.wf-flag-tz{background-position:-128px -209px !important}.wf-flag-ua{background-position:-144px -209px !important}.wf-flag-ug{background-position:-160px -209px !important}.wf-flag-uk{background-position:-176px -209px !important}.wf-flag-um{background-position:-0px -220px !important}.wf-flag-un{background-position:-16px -220px !important}.wf-flag-us{background-position:-32px -220px !important}.wf-flag-uy{background-position:-48px -220px !important}.wf-flag-uz{background-position:-64px -220px !important}.wf-flag-va{background-position:-80px -220px !important}.wf-flag-vc{background-position:-96px -220px !important}.wf-flag-ve{background-position:-112px -220px !important}.wf-flag-vg{background-position:-128px -220px !important}.wf-flag-vi{background-position:-144px -220px !important}.wf-flag-vn{background-position:-160px -220px !important}.wf-flag-vu{background-position:-176px -220px !important}.wf-flag-wales{background-position:-0px -231px !important}.wf-flag-wf{background-position:-16px -231px !important}.wf-flag-ws{background-position:-32px -231px !important}.wf-flag-xk{background-position:-48px -231px !important}.wf-flag-ye{background-position:-64px -231px !important}.wf-flag-yt{background-position:-80px -231px !important}.wf-flag-za{background-position:-96px -231px !important}.wf-flag-zm{background-position:-112px -231px !important}.wf-flag-zw{background-position:-128px -231px !important}#wf-central-progress li{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;padding:8px 1.5rem}#wf-central-progress li .wf-central-progress-icon{display:-webkit-flex;display:flex;-webkit-flex-grow:0;flex-grow:0}#wf-central-progress li .wf-central-progress-content{display:-webkit-flex;display:flex;-webkit-flex-grow:1;flex-grow:1;margin:3px 20px 0px}#wf-central-progress li .wf-step-pending,#wf-central-progress li .wf-step-running,#wf-central-progress li .wf-step-complete-success,#wf-central-progress li .wf-step-complete-warning{display:none}#wf-central-progress li.pending{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);opacity:.4}#wf-central-progress li.pending .wf-step-pending{display:block}#wf-central-progress li.running .wf-step-running{display:block}#wf-central-progress li.complete-success .wf-step-complete-success{display:block}#wf-central-progress li.complete-warning .wf-step-complete-warning{display:block}.wf-central-connected .wf-flex-row{align-items:stretch}.wf-central-connected .wf-flex-row .wf-flex-row-1{width:50%}.wf-central-connected .wf-flex-row .wf-flex-row-1:first-child{margin-right:5px}.wf-central-connected .wf-flex-row .wf-flex-row-1:last-child{margin-left:5px}@media (max-width: 768px){.wf-central-connected .wf-flex-row{-webkit-flex-direction:column !important;flex-direction:column !important}.wf-central-connected .wf-flex-row .wf-flex-row-1{width:100%;margin:0 0 10px !important}}#wf-extended-protection-notice{display:inline-block;line-height:1.4;padding:11px 15px;font-size:14px;text-align:left;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}#wfcolorbox.wf-modal .wf-modal-footer.wf-modal-footer-center{justify-content:center}div.wf-radio-group div.wf-radio-option{display:flex;align-items:center}div.wf-radio-group div.wf-radio-option:not(:last-child){margin-bottom:8px}div.wf-radio-group div.wf-radio-option input[type=radio]{margin-right:8px} diff --git a/wp/wp-content/plugins/wordfence/css/phpinfo.1704213472.css b/wp/wp-content/plugins/wordfence/css/phpinfo.1704213472.css deleted file mode 100644 index 8b1a2e16..00000000 --- a/wp/wp-content/plugins/wordfence/css/phpinfo.1704213472.css +++ /dev/null @@ -1,30 +0,0 @@ - - -h1.p { - background: url(../images/wordfence-logo.svg); - background-position: 0 0; - background-repeat: no-repeat; - height: 64px; - vertical-align: middle; - padding: 10px 0 0 90px; - margin: 20px 0 10px 0; - font-family: Arial; - font-weight: normal; - font-size: 26px; -} -h1.p:before { - content: "Wordfence System Info for "; -} -td img { display: none; } - -.diffFooter { - text-align: center; - font-size: 16px; - color: #999; - font-family: Verdana; - margin: 50px auto 50px auto; -} -.diffFooter a { - color: #999; -} - diff --git a/wp/wp-content/plugins/wordfence/css/wf-adminbar.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-adminbar.1704213472.css deleted file mode 100644 index a738cc0d..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-adminbar.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.4rem 1rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width: 768px){.wf-btn{padding:.5rem 1.25rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px}}.wf-btn:focus,.wf-btn.wf-focus,.wf-btn:active:focus,.wf-btn:active.wf-focus,.wf-btn.wf-active:focus,.wf-btn.wf-active.wf-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{text-decoration:none}.wf-btn:active,.wf-btn.wf-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn.wf-disabled,.wf-btn[disabled],.wf-btn[readonly],fieldset[disabled] .wf-btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none}a.wf-btn{text-decoration:none}a.wf-btn.wf-disabled,fieldset[disabled] a.wf-btn{cursor:not-allowed;pointer-events:none}.wf-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success:focus,.wf-btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.wf-btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active,.wf-btn-success.active,.wf-open>.wf-btn-success.wf-dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active:hover,.wf-btn-success:active:focus,.wf-btn-success:active.focus,.wf-btn-success.active:hover,.wf-btn-success.active:focus,.wf-btn-success.active.focus,.wf-open>.wf-btn-success.wf-dropdown-toggle:hover,.wf-open>.wf-btn-success.wf-dropdown-toggle:focus,.wf-open>.wf-btn-success.wf-dropdown-toggle.focus{color:#fff;background-color:#398439;border-color:#255625}.wf-btn-success:active,.wf-btn-success.wf-active,.wf-open>.wf-btn-success.wf-dropdown-toggle{background-image:none}.wf-btn-success.wf-disabled,.wf-btn-success[disabled],.wf-btn-success[readonly],fieldset[disabled] .wf-btn-success{color:#fff;background-color:#95d195;border-color:#8bca8b;cursor:not-allowed}.wf-btn-success.wf-disabled:hover,.wf-btn-success.wf-disabled:focus,.wf-btn-success.wf-disabled.wf-focus,.wf-btn-success[disabled]:hover,.wf-btn-success[disabled]:focus,.wf-btn-success[disabled].wf-focus,.wf-btn-success[readonly]:hover,.wf-btn-success[readonly]:focus,.wf-btn-success[readonly].wf-focus,fieldset[disabled] .wf-btn-success:hover,fieldset[disabled] .wf-btn-success:focus,fieldset[disabled] .wf-btn-success.wf-focus{background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success .wf-badge{color:#5cb85c;background-color:#fff}.wf-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.wf-btn-info:focus,.wf-btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.wf-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active,.wf-btn-info.active,.wf-open>.wf-btn-info.wf-dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active:hover,.wf-btn-info:active:focus,.wf-btn-info:active.focus,.wf-btn-info.active:hover,.wf-btn-info.active:focus,.wf-btn-info.active.focus,.wf-open>.wf-btn-info.wf-dropdown-toggle:hover,.wf-open>.wf-btn-info.wf-dropdown-toggle:focus,.wf-open>.wf-btn-info.wf-dropdown-toggle.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.wf-btn-info:active,.wf-btn-info.wf-active,.wf-open>.wf-btn-info.wf-dropdown-toggle{background-image:none}.wf-btn-info.wf-disabled,.wf-btn-info[disabled],.wf-btn-info[readonly],fieldset[disabled] .wf-btn-info{color:#fff;background-color:#94d6ea;border-color:#87d1e7;cursor:not-allowed}.wf-btn-info.wf-disabled:hover,.wf-btn-info.wf-disabled:focus,.wf-btn-info.wf-disabled.wf-focus,.wf-btn-info[disabled]:hover,.wf-btn-info[disabled]:focus,.wf-btn-info[disabled].wf-focus,.wf-btn-info[readonly]:hover,.wf-btn-info[readonly]:focus,.wf-btn-info[readonly].wf-focus,fieldset[disabled] .wf-btn-info:hover,fieldset[disabled] .wf-btn-info:focus,fieldset[disabled] .wf-btn-info.wf-focus{background-color:#5bc0de;border-color:#46b8da}.wf-btn-info .wf-badge{color:#5bc0de;background-color:#fff}.wf-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning:focus,.wf-btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.wf-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active,.wf-btn-warning.active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active:hover,.wf-btn-warning:active:focus,.wf-btn-warning:active.focus,.wf-btn-warning.active:hover,.wf-btn-warning.active:focus,.wf-btn-warning.active.focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle:hover,.wf-open>.wf-btn-warning.wf-dropdown-toggle:focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.wf-btn-warning:active,.wf-btn-warning.wf-active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{background-image:none}.wf-btn-warning.wf-disabled,.wf-btn-warning[disabled],.wf-btn-warning[readonly],fieldset[disabled] .wf-btn-warning{color:#fff;background-color:#f5ca8c;border-color:#f4c37c;cursor:not-allowed}.wf-btn-warning.wf-disabled:hover,.wf-btn-warning.wf-disabled:focus,.wf-btn-warning.wf-disabled.wf-focus,.wf-btn-warning[disabled]:hover,.wf-btn-warning[disabled]:focus,.wf-btn-warning[disabled].wf-focus,.wf-btn-warning[readonly]:hover,.wf-btn-warning[readonly]:focus,.wf-btn-warning[readonly].wf-focus,fieldset[disabled] .wf-btn-warning:hover,fieldset[disabled] .wf-btn-warning:focus,fieldset[disabled] .wf-btn-warning.wf-focus{background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning .wf-badge{color:#f0ad4e;background-color:#fff}.wf-btn-danger,.wf-btn.wf-btn-danger{color:#fff;background-color:#930000;border-color:#7a0000}.wf-btn-danger:focus,.wf-btn-danger.focus,.wf-btn.wf-btn-danger:focus,.wf-btn.wf-btn-danger.focus{color:#fff;background-color:#600000;border-color:#000}.wf-btn-danger:hover,.wf-btn.wf-btn-danger:hover{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active,.wf-btn-danger.active,.wf-open>.wf-btn-danger.wf-dropdown-toggle,.wf-btn.wf-btn-danger:active,.wf-btn.wf-btn-danger.active,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active:hover,.wf-btn-danger:active:focus,.wf-btn-danger:active.focus,.wf-btn-danger.active:hover,.wf-btn-danger.active:focus,.wf-btn-danger.active.focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle:hover,.wf-open>.wf-btn-danger.wf-dropdown-toggle:focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle.focus,.wf-btn.wf-btn-danger:active:hover,.wf-btn.wf-btn-danger:active:focus,.wf-btn.wf-btn-danger:active.focus,.wf-btn.wf-btn-danger.active:hover,.wf-btn.wf-btn-danger.active:focus,.wf-btn.wf-btn-danger.active.focus,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle:hover,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle:focus,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle.focus{color:#fff;background-color:#3c0000;border-color:#000}.wf-btn-danger:active,.wf-btn-danger.wf-active,.wf-open>.wf-btn-danger.wf-dropdown-toggle,.wf-btn.wf-btn-danger:active,.wf-btn.wf-btn-danger.wf-active,.wf-open>.wf-btn.wf-btn-danger.wf-dropdown-toggle{background-image:none}.wf-btn-danger.wf-disabled,.wf-btn-danger[disabled],.wf-btn-danger[readonly],fieldset[disabled] .wf-btn-danger,.wf-btn.wf-btn-danger.wf-disabled,.wf-btn.wf-btn-danger[disabled],.wf-btn.wf-btn-danger[readonly],fieldset[disabled] .wf-btn.wf-btn-danger{color:#fff;background-color:#b95959;border-color:#a95959;cursor:not-allowed}.wf-btn-danger.wf-disabled:hover,.wf-btn-danger.wf-disabled:focus,.wf-btn-danger.wf-disabled.wf-focus,.wf-btn-danger[disabled]:hover,.wf-btn-danger[disabled]:focus,.wf-btn-danger[disabled].wf-focus,.wf-btn-danger[readonly]:hover,.wf-btn-danger[readonly]:focus,.wf-btn-danger[readonly].wf-focus,fieldset[disabled] .wf-btn-danger:hover,fieldset[disabled] .wf-btn-danger:focus,fieldset[disabled] .wf-btn-danger.wf-focus,.wf-btn.wf-btn-danger.wf-disabled:hover,.wf-btn.wf-btn-danger.wf-disabled:focus,.wf-btn.wf-btn-danger.wf-disabled.wf-focus,.wf-btn.wf-btn-danger[disabled]:hover,.wf-btn.wf-btn-danger[disabled]:focus,.wf-btn.wf-btn-danger[disabled].wf-focus,.wf-btn.wf-btn-danger[readonly]:hover,.wf-btn.wf-btn-danger[readonly]:focus,.wf-btn.wf-btn-danger[readonly].wf-focus,fieldset[disabled] .wf-btn.wf-btn-danger:hover,fieldset[disabled] .wf-btn.wf-btn-danger:focus,fieldset[disabled] .wf-btn.wf-btn-danger.wf-focus{background-color:#930000;border-color:#7a0000}.wf-btn-danger .wf-badge,.wf-btn.wf-btn-danger .wf-badge{color:#930000;background-color:#fff}.wf-btn-callout{font-weight:600;text-transform:uppercase}.wf-btn-callout-subtle{font-weight:400;text-transform:uppercase}.wf-btn-link{font-weight:normal;border-radius:0}.wf-btn-link,.wf-btn-link:active,.wf-btn-link.wf-active,.wf-btn-link[disabled],fieldset[disabled] .wf-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wf-btn-link,.wf-btn-link:hover,.wf-btn-link:focus,.wf-btn-link:active{border-color:transparent}.wf-btn-link:hover,.wf-btn-link:focus{color:#003a52;text-decoration:underline;background-color:transparent}.wf-btn-link[disabled]:hover,.wf-btn-link[disabled]:focus,fieldset[disabled] .wf-btn-link:hover,fieldset[disabled] .wf-btn-link:focus{color:#777;text-decoration:none}.wf-btn-lg,.wf-btn-group-lg>.wf-btn{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-btn-sm,.wf-btn-group-sm>.wf-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-xs,.wf-btn-group-xs>.wf-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-block{display:block;width:100%}.wf-btn-block+.wf-btn-block{margin-top:5px}input[type="submit"].wf-btn-block,input[type="reset"].wf-btn-block,input[type="button"].wf-btn-block{width:100%}.wf-btn-group,.wf-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wf-btn-group>.wf-btn,.wf-btn-group-vertical>.wf-btn{position:relative;float:left}.wf-btn-group>.wf-btn:hover,.wf-btn-group>.wf-btn:focus,.wf-btn-group>.wf-btn:active,.wf-btn-group>.wf-btn.wf-active,.wf-btn-group-vertical>.wf-btn:hover,.wf-btn-group-vertical>.wf-btn:focus,.wf-btn-group-vertical>.wf-btn:active,.wf-btn-group-vertical>.wf-btn.wf-active{z-index:2}.wf-btn-group .wf-btn+.wf-btn,.wf-btn-group .wf-btn+.wf-btn-group,.wf-btn-group .wf-btn-group+.wf-btn,.wf-btn-group .wf-btn-group+.wf-btn-group{margin-left:-1px}.wf-btn-toolbar{margin-left:-5px}.wf-btn-toolbar:before,.wf-btn-toolbar:after{content:" ";display:table}.wf-btn-toolbar:after{clear:both}.wf-btn-toolbar .wf-btn,.wf-btn-toolbar .wf-btn-group,.wf-btn-toolbar .wf-input-group{float:left}.wf-btn-toolbar>.wf-btn,.wf-btn-toolbar>.wf-btn-group,.wf-btn-toolbar>.wf-input-group{margin-left:5px}.wf-btn-group>.wf-btn:not(:first-child):not(:last-child):not(.wf-dropdown-toggle){border-radius:0}.wf-btn-group>.wf-btn:first-child{margin-left:0}.wf-btn-group>.wf-btn:first-child:not(:last-child):not(.wf-dropdown-toggle){-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn:last-child:not(:first-child),.wf-btn-group>.wf-dropdown-toggle:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group>.wf-btn-group{float:left}.wf-btn-group>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group .wf-dropdown-toggle:active,.wf-btn-group.wf-open .wf-dropdown-toggle{outline:0}.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:8px;padding-right:8px}.wf-btn-group>.wf-btn-lg+.wf-dropdown-toggle,.wf-btn-group-lg.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:12px;padding-right:12px}.wf-btn-group.open .wf-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn-group.open .wf-dropdown-toggle.wf-btn-link{-webkit-box-shadow:none;box-shadow:none}.wf-btn .wf-caret{margin-left:0}.wf-btn-lg .wf-caret,.wf-btn-group-lg>.wf-btn .wf-caret{border-width:5px 5px 0;border-bottom-width:0}.wf-dropup .wf-btn-lg .wf-caret,.wf-dropup .wf-btn-group-lg>.wf-btn .wf-caret{border-width:0 5px 5px}.wf-btn-group-vertical>.wf-btn,.wf-btn-group-vertical>.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group>.wf-btn{display:block;float:none;width:100%;max-width:100%}.wf-btn-group-vertical>.wf-btn-group:before,.wf-btn-group-vertical>.wf-btn-group:after{content:" ";display:table}.wf-btn-group-vertical>.wf-btn-group:after{clear:both}.wf-btn-group-vertical>.wf-btn-group>.wf-btn{float:none}.wf-btn-group-vertical>.wf-btn+.wf-btn,.wf-btn-group-vertical>.wf-btn+.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group+.wf-btn,.wf-btn-group-vertical>.wf-btn-group+.wf-btn-group{margin-top:-1px;margin-left:0}.wf-btn-group-vertical>.wf-btn:not(:first-child):not(:last-child){border-radius:0}.wf-btn-group-vertical>.wf-btn:first-child:not(:last-child){-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn:last-child:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-btn-group-vertical>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wf-btn-group-justified>.wf-btn,.wf-btn-group-justified>.wf-btn-group{float:none;display:table-cell;width:1%}.wf-btn-group-justified>.wf-btn-group .wf-btn{width:100%}.wf-btn-group-justified>.wf-btn-group .wf-dropdown-menu{left:auto}[data-toggle="buttons"]>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn input[type="checkbox"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wf-pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.wf-pagination>li{display:inline}.wf-pagination>li>a,.wf-pagination>li>span{position:relative;float:left;padding:.5rem 1.25rem;line-height:1.42857;text-decoration:none;color:#00709e;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.wf-pagination>li:first-child>a,.wf-pagination>li:first-child>span{margin-left:0;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.wf-pagination>li:last-child>a,.wf-pagination>li:last-child>span{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-pagination>li>a:hover,.wf-pagination>li>a:focus,.wf-pagination>li>span:hover,.wf-pagination>li>span:focus{z-index:2;color:#003a52;background-color:#e2e2e2;border-color:#ddd}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{z-index:3;color:#fff;cursor:default}.wf-pagination>.wf-disabled>span,.wf-pagination>.wf-disabled>span:hover,.wf-pagination>.wf-disabled>span:focus,.wf-pagination>.wf-disabled>a,.wf-pagination>.wf-disabled>a:hover,.wf-pagination>.wf-disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.wf-pagination-lg>li>a,.wf-pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.wf-pagination-lg>li:first-child>a,.wf-pagination-lg>li:first-child>span{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-pagination-lg>li:last-child>a,.wf-pagination-lg>li:last-child>span{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-pagination-sm>li>a,.wf-pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.wf-pagination-sm>li:first-child>a,.wf-pagination-sm>li:first-child>span{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.wf-pagination-sm>li:last-child>a,.wf-pagination-sm>li:last-child>span{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.wf-downgrade-license{padding:0 1.25rem}.wf-flag-{background-position:-0px -0px !important}.wf-flag-ad{background-position:-16px -0px !important}.wf-flag-ae{background-position:-32px -0px !important}.wf-flag-af{background-position:-48px -0px !important}.wf-flag-ag{background-position:-64px -0px !important}.wf-flag-ai{background-position:-80px -0px !important}.wf-flag-al{background-position:-96px -0px !important}.wf-flag-am{background-position:-112px -0px !important}.wf-flag-an{background-position:-128px -0px !important}.wf-flag-ao{background-position:-144px -0px !important}.wf-flag-ap{background-position:-160px -0px !important}.wf-flag-aq{background-position:-176px -0px !important}.wf-flag-ar{background-position:-0px -11px !important}.wf-flag-as{background-position:-16px -11px !important}.wf-flag-at{background-position:-32px -11px !important}.wf-flag-au{background-position:-48px -11px !important}.wf-flag-aw{background-position:-64px -11px !important}.wf-flag-ax{background-position:-80px -11px !important}.wf-flag-az{background-position:-96px -11px !important}.wf-flag-ba{background-position:-112px -11px !important}.wf-flag-bb{background-position:-128px -11px !important}.wf-flag-bd{background-position:-144px -11px !important}.wf-flag-be{background-position:-160px -11px !important}.wf-flag-bf{background-position:-176px -11px !important}.wf-flag-bg{background-position:-0px -22px !important}.wf-flag-bh{background-position:-16px -22px !important}.wf-flag-bi{background-position:-32px -22px !important}.wf-flag-bj{background-position:-48px -22px !important}.wf-flag-bl{background-position:-64px -22px !important}.wf-flag-bm{background-position:-80px -22px !important}.wf-flag-bn{background-position:-96px -22px !important}.wf-flag-bo{background-position:-112px -22px !important}.wf-flag-bq{background-position:-128px -22px !important}.wf-flag-br{background-position:-144px -22px !important}.wf-flag-bs{background-position:-160px -22px !important}.wf-flag-bt{background-position:-176px -22px !important}.wf-flag-bv{background-position:-0px -33px !important}.wf-flag-bw{background-position:-16px -33px !important}.wf-flag-by{background-position:-32px -33px !important}.wf-flag-bz{background-position:-48px -33px !important}.wf-flag-ca{background-position:-64px -33px !important}.wf-flag-cc{background-position:-80px -33px !important}.wf-flag-cd{background-position:-96px -33px !important}.wf-flag-cf{background-position:-112px -33px !important}.wf-flag-cg{background-position:-128px -33px !important}.wf-flag-ch{background-position:-144px -33px !important}.wf-flag-ci{background-position:-160px -33px !important}.wf-flag-ck{background-position:-176px -33px !important}.wf-flag-cl{background-position:-0px -44px !important}.wf-flag-cm{background-position:-16px -44px !important}.wf-flag-cn{background-position:-32px -44px !important}.wf-flag-co{background-position:-48px -44px !important}.wf-flag-cr{background-position:-64px -44px !important}.wf-flag-cs{background-position:-80px -44px !important}.wf-flag-cu{background-position:-96px -44px !important}.wf-flag-cv{background-position:-112px -44px !important}.wf-flag-cw{background-position:-128px -44px !important}.wf-flag-cx{background-position:-144px -44px !important}.wf-flag-cy{background-position:-160px -44px !important}.wf-flag-cz{background-position:-176px -44px !important}.wf-flag-de{background-position:-0px -55px !important}.wf-flag-dj{background-position:-16px -55px !important}.wf-flag-dk{background-position:-32px -55px !important}.wf-flag-dm{background-position:-48px -55px !important}.wf-flag-do{background-position:-64px -55px !important}.wf-flag-dz{background-position:-80px -55px !important}.wf-flag-ec{background-position:-96px -55px !important}.wf-flag-ee{background-position:-112px -55px !important}.wf-flag-eg{background-position:-128px -55px !important}.wf-flag-eh{background-position:-144px -55px !important}.wf-flag-england{background-position:-160px -55px !important}.wf-flag-er{background-position:-176px -55px !important}.wf-flag-es{background-position:-0px -66px !important}.wf-flag-et{background-position:-16px -66px !important}.wf-flag-eu{background-position:-32px -66px !important}.wf-flag-fam{background-position:-48px -66px !important}.wf-flag-fi{background-position:-64px -66px !important}.wf-flag-fj{background-position:-80px -66px !important}.wf-flag-fk{background-position:-96px -66px !important}.wf-flag-fm{background-position:-112px -66px !important}.wf-flag-fo{background-position:-128px -66px !important}.wf-flag-fr{background-position:-144px -66px !important}.wf-flag-ga{background-position:-160px -66px !important}.wf-flag-gb{background-position:-176px -66px !important}.wf-flag-gd{background-position:-0px -77px !important}.wf-flag-ge{background-position:-16px -77px !important}.wf-flag-gf{background-position:-32px -77px !important}.wf-flag-gg{background-position:-48px -77px !important}.wf-flag-gh{background-position:-64px -77px !important}.wf-flag-gi{background-position:-80px -77px !important}.wf-flag-gl{background-position:-96px -77px !important}.wf-flag-gm{background-position:-112px -77px !important}.wf-flag-gn{background-position:-128px -77px !important}.wf-flag-gp{background-position:-144px -77px !important}.wf-flag-gq{background-position:-160px -77px !important}.wf-flag-gr{background-position:-176px -77px !important}.wf-flag-gs{background-position:-0px -88px !important}.wf-flag-gt{background-position:-16px -88px !important}.wf-flag-gu{background-position:-32px -88px !important}.wf-flag-gw{background-position:-48px -88px !important}.wf-flag-gy{background-position:-64px -88px !important}.wf-flag-hk{background-position:-80px -88px !important}.wf-flag-hm{background-position:-96px -88px !important}.wf-flag-hn{background-position:-112px -88px !important}.wf-flag-hr{background-position:-128px -88px !important}.wf-flag-ht{background-position:-144px -88px !important}.wf-flag-hu{background-position:-160px -88px !important}.wf-flag-id{background-position:-176px -88px !important}.wf-flag-ie{background-position:-0px -99px !important}.wf-flag-il{background-position:-16px -99px !important}.wf-flag-im{background-position:-32px -99px !important}.wf-flag-in{background-position:-48px -99px !important}.wf-flag-io{background-position:-64px -99px !important}.wf-flag-iq{background-position:-80px -99px !important}.wf-flag-ir{background-position:-96px -99px !important}.wf-flag-is{background-position:-112px -99px !important}.wf-flag-it{background-position:-128px -99px !important}.wf-flag-je{background-position:-144px -99px !important}.wf-flag-jm{background-position:-160px -99px !important}.wf-flag-jo{background-position:-176px -99px !important}.wf-flag-jp{background-position:-0px -110px !important}.wf-flag-ke{background-position:-16px -110px !important}.wf-flag-kg{background-position:-32px -110px !important}.wf-flag-kh{background-position:-48px -110px !important}.wf-flag-ki{background-position:-64px -110px !important}.wf-flag-km{background-position:-80px -110px !important}.wf-flag-kn{background-position:-96px -110px !important}.wf-flag-kp{background-position:-112px -110px !important}.wf-flag-kr{background-position:-128px -110px !important}.wf-flag-kw{background-position:-144px -110px !important}.wf-flag-ky{background-position:-160px -110px !important}.wf-flag-kz{background-position:-176px -110px !important}.wf-flag-la{background-position:-0px -121px !important}.wf-flag-lb{background-position:-16px -121px !important}.wf-flag-lc{background-position:-32px -121px !important}.wf-flag-li{background-position:-48px -121px !important}.wf-flag-lk{background-position:-64px -121px !important}.wf-flag-lr{background-position:-80px -121px !important}.wf-flag-ls{background-position:-96px -121px !important}.wf-flag-lt{background-position:-112px -121px !important}.wf-flag-lu{background-position:-128px -121px !important}.wf-flag-lv{background-position:-144px -121px !important}.wf-flag-ly{background-position:-160px -121px !important}.wf-flag-ma{background-position:-176px -121px !important}.wf-flag-mc{background-position:-0px -132px !important}.wf-flag-md{background-position:-16px -132px !important}.wf-flag-me{background-position:-32px -132px !important}.wf-flag-mf{background-position:-48px -132px !important}.wf-flag-mg{background-position:-64px -132px !important}.wf-flag-mh{background-position:-80px -132px !important}.wf-flag-mk{background-position:-96px -132px !important}.wf-flag-ml{background-position:-112px -132px !important}.wf-flag-mm{background-position:-128px -132px !important}.wf-flag-mn{background-position:-144px -132px !important}.wf-flag-mo{background-position:-160px -132px !important}.wf-flag-mp{background-position:-176px -132px !important}.wf-flag-mq{background-position:-0px -143px !important}.wf-flag-mr{background-position:-16px -143px !important}.wf-flag-ms{background-position:-32px -143px !important}.wf-flag-mt{background-position:-48px -143px !important}.wf-flag-mu{background-position:-64px -143px !important}.wf-flag-mv{background-position:-80px -143px !important}.wf-flag-mw{background-position:-96px -143px !important}.wf-flag-mx{background-position:-112px -143px !important}.wf-flag-my{background-position:-128px -143px !important}.wf-flag-mz{background-position:-144px -143px !important}.wf-flag-na{background-position:-160px -143px !important}.wf-flag-nc{background-position:-176px -143px !important}.wf-flag-ne{background-position:-0px -154px !important}.wf-flag-nf{background-position:-16px -154px !important}.wf-flag-ng{background-position:-32px -154px !important}.wf-flag-ni{background-position:-48px -154px !important}.wf-flag-nl{background-position:-64px -154px !important}.wf-flag-no{background-position:-80px -154px !important}.wf-flag-np{background-position:-96px -154px !important}.wf-flag-nr{background-position:-112px -154px !important}.wf-flag-nu{background-position:-128px -154px !important}.wf-flag-nz{background-position:-144px -154px !important}.wf-flag-om{background-position:-160px -154px !important}.wf-flag-pa{background-position:-176px -154px !important}.wf-flag-pe{background-position:-0px -165px !important}.wf-flag-pf{background-position:-16px -165px !important}.wf-flag-pg{background-position:-32px -165px !important}.wf-flag-ph{background-position:-48px -165px !important}.wf-flag-pk{background-position:-64px -165px !important}.wf-flag-pl{background-position:-80px -165px !important}.wf-flag-pm{background-position:-96px -165px !important}.wf-flag-pn{background-position:-112px -165px !important}.wf-flag-pr{background-position:-128px -165px !important}.wf-flag-ps{background-position:-144px -165px !important}.wf-flag-pt{background-position:-160px -165px !important}.wf-flag-pw{background-position:-176px -165px !important}.wf-flag-py{background-position:-0px -176px !important}.wf-flag-qa{background-position:-16px -176px !important}.wf-flag-re{background-position:-32px -176px !important}.wf-flag-ro{background-position:-48px -176px !important}.wf-flag-rs{background-position:-64px -176px !important}.wf-flag-ru{background-position:-80px -176px !important}.wf-flag-rw{background-position:-96px -176px !important}.wf-flag-sa{background-position:-112px -176px !important}.wf-flag-sb{background-position:-128px -176px !important}.wf-flag-sc{background-position:-144px -176px !important}.wf-flag-scotland{background-position:-160px -176px !important}.wf-flag-sd{background-position:-176px -176px !important}.wf-flag-se{background-position:-0px -187px !important}.wf-flag-sg{background-position:-16px -187px !important}.wf-flag-sh{background-position:-32px -187px !important}.wf-flag-si{background-position:-48px -187px !important}.wf-flag-sj{background-position:-64px -187px !important}.wf-flag-sk{background-position:-80px -187px !important}.wf-flag-sl{background-position:-96px -187px !important}.wf-flag-sm{background-position:-112px -187px !important}.wf-flag-sn{background-position:-128px -187px !important}.wf-flag-so{background-position:-144px -187px !important}.wf-flag-sr{background-position:-160px -187px !important}.wf-flag-ss{background-position:-176px -187px !important}.wf-flag-st{background-position:-0px -198px !important}.wf-flag-sv{background-position:-16px -198px !important}.wf-flag-sx{background-position:-32px -198px !important}.wf-flag-sy{background-position:-48px -198px !important}.wf-flag-sz{background-position:-64px -198px !important}.wf-flag-tc{background-position:-80px -198px !important}.wf-flag-td{background-position:-96px -198px !important}.wf-flag-tf{background-position:-112px -198px !important}.wf-flag-tg{background-position:-128px -198px !important}.wf-flag-th{background-position:-144px -198px !important}.wf-flag-tj{background-position:-160px -198px !important}.wf-flag-tk{background-position:-176px -198px !important}.wf-flag-tl{background-position:-0px -209px !important}.wf-flag-tm{background-position:-16px -209px !important}.wf-flag-tn{background-position:-32px -209px !important}.wf-flag-to{background-position:-48px -209px !important}.wf-flag-tr{background-position:-64px -209px !important}.wf-flag-tt{background-position:-80px -209px !important}.wf-flag-tv{background-position:-96px -209px !important}.wf-flag-tw{background-position:-112px -209px !important}.wf-flag-tz{background-position:-128px -209px !important}.wf-flag-ua{background-position:-144px -209px !important}.wf-flag-ug{background-position:-160px -209px !important}.wf-flag-uk{background-position:-176px -209px !important}.wf-flag-um{background-position:-0px -220px !important}.wf-flag-un{background-position:-16px -220px !important}.wf-flag-us{background-position:-32px -220px !important}.wf-flag-uy{background-position:-48px -220px !important}.wf-flag-uz{background-position:-64px -220px !important}.wf-flag-va{background-position:-80px -220px !important}.wf-flag-vc{background-position:-96px -220px !important}.wf-flag-ve{background-position:-112px -220px !important}.wf-flag-vg{background-position:-128px -220px !important}.wf-flag-vi{background-position:-144px -220px !important}.wf-flag-vn{background-position:-160px -220px !important}.wf-flag-vu{background-position:-176px -220px !important}.wf-flag-wales{background-position:-0px -231px !important}.wf-flag-wf{background-position:-16px -231px !important}.wf-flag-ws{background-position:-32px -231px !important}.wf-flag-xk{background-position:-48px -231px !important}.wf-flag-ye{background-position:-64px -231px !important}.wf-flag-yt{background-position:-80px -231px !important}.wf-flag-za{background-position:-96px -231px !important}.wf-flag-zm{background-position:-112px -231px !important}.wf-flag-zw{background-position:-128px -231px !important}#wf-adminbar-icon{float:left;width:20px;height:30px;background-repeat:no-repeat;background-position:left center}#wpadminbar .wf-notification-counter{display:inline;background-color:inherit}#wpadminbar .wf-notification-counter span.wf-count{padding:1px 7px 1px 6px !important;border-radius:50%;color:#fff;background-color:#fcb214}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item .wf-adminbar-submenu-title{-webkit-flex-grow:1;flex-grow:1}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item .wf-notification-counter{display:block}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item .wf-adminbar-status{width:1.25rem;font-size:1.25rem;text-align:center}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item .wf-adminbar-status-neutral{color:#9f9fa0}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item .wf-adminbar-status-good{color:#16bc9b}#wpadminbar .ab-sub-wrapper #wp-admin-bar-wordfence-menu-default .ab-item .wf-adminbar-status-bad{color:#ffd10a}#adminmenu .update-plugins.wf-menu-badge{background-color:#fcb214 !important}#toplevel_page_Wordfence .wp-menu-image img{max-width:16px;max-height:16px}.wf-hidden{display:none !important}.wfpopover{position:fixed;top:0;left:0;z-index:106000;display:none;max-width:276px;padding:1px;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.wfpopover.wf-top{margin-top:-10px}.wfpopover.wf-right{margin-left:10px}.wfpopover.wf-bottom{margin-top:10px}.wfpopover.wf-left{margin-left:-10px}.wfpopover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.wfpopover-content{padding:9px 14px}.wfpopover>.wf-arrow,.wfpopover>.wf-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.wfpopover>.wf-arrow{border-width:11px}.wfpopover>.wf-arrow:after{border-width:10px;content:""}.wfpopover.wf-top>.wf-arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.wfpopover.wf-top>.wf-arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.wfpopover.wf-right>.wf-arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,0.25)}.wfpopover.wf-right>.wf-arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.wfpopover.wf-bottom>.wf-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.wfpopover.wf-bottom>.wf-arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.wfpopover.wf-left>.wf-arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,0.25)}.wfpopover.wf-left>.wf-arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.wf-flag{display:inline-block;vertical-align:middle;margin:0px 2px 0 0;background-repeat:no-repeat;background-position:center center;width:16px;height:11px;background-image:url(../images/flags.png);-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0} diff --git a/wp/wp-content/plugins/wordfence/css/wf-colorbox.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-colorbox.1704213472.css deleted file mode 100644 index 246aef95..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-colorbox.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -#wfcolorbox,#wfcboxOverlay,#wfcboxWrapper{position:absolute;top:0;left:0;z-index:9999;overflow:hidden}#wfcboxOverlay{position:fixed;width:100%;height:100%}#wfcboxMiddleLeft,#wfcboxBottomLeft{clear:left}#wfcboxContent{position:relative}#wfcboxLoadedContent{overflow:auto}#wfcboxTitle{margin:0}#wfcboxLoadingOverlay,#wfcboxLoadingGraphic{position:absolute;top:0;left:0;width:100%}#wfcboxPrevious,#wfcboxNext,#wfcboxClose,#wfcboxSlideshow{cursor:pointer}.wfcboxPhoto{float:left;margin:auto;border:0;display:block}.wfcboxIframe{width:100%;height:100%;display:block;border:0}#wfcboxOverlay{background:#777;background:-webkit-radial-gradient(rgba(120,120,120,0.8), rgba(100,100,100,0.8) 50%, #464646);background:-moz-radial-gradient(rgba(120,120,120,0.6), rgba(100,100,100,0.8) 20%, #464646)}#wfcboxContent{background:#fff;overflow:hidden;padding:0 0 8px;margin:20px;-webkit-border-radius:3px 3px 2px 2px;-moz-border-radius:3px 3px 2px 2px;border-radius:3px 3px 2px 2px;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.4);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.4);box-shadow:0 2px 4px rgba(0,0,0,0.4);-webkit-background-clip:padding-box}#wfcboxError{padding:50px;border:1px solid #ccc}#wfcboxLoadedContent{margin:10px 20px 28px 20px;font-family:Arial;color:#333;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}#wfcboxTitle{position:absolute;bottom:8px;left:5px;text-align:center;width:100%;color:#949494}#wfcboxCurrent{position:absolute;bottom:8px;left:63px;color:#949494;text-indent:-9999px}#wfcboxSlideshow{position:absolute;bottom:8px;right:35px;color:#0092ef}#wfcboxPrevious{position:absolute;bottom:5px;left:5px;background:url(../images/lightbox-controls.png) no-repeat -75px 0;width:25px;height:25px;text-indent:-9999px}#wfcboxPrevious.hover{background-position:-75px -25px}#wfcboxNext{position:absolute;bottom:5px;left:32px;background:url(../images/lightbox-controls.png) no-repeat -50px 0;width:25px;height:25px;text-indent:-9999px}#wfcboxNext.hover{background-position:-50px -25px}#wfcboxLoadingOverlay{background:url(../images/loading_background.png) no-repeat center center}#wfcboxLoadingGraphic{background:url(../images/loading.gif) no-repeat center center}#wfcboxClose{position:absolute;bottom:5px;right:5px;background:url(../images/lightbox-controls.png) no-repeat -25px 0;width:25px;height:25px;text-indent:-9999px}#wfcboxClose.hover{background-position:-25px -25px}#wfcolorbox.wf-modal ul,#wfcolorbox.wf-modal li{padding:0;margin:0}#wfcolorbox.wf-modal #wfcboxContent{padding:0}#wfcolorbox.wf-modal #wfcboxLoadedContent{margin:0}#wfcolorbox.wf-modal .wf-modal-success{overflow:auto;background-color:#00709e}#wfcolorbox.wf-modal .wf-modal-success .wf-model-success-wrapper{margin:0.25rem;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MS42NSA3MC43OSI+PHBhdGggZD0iTTkwLjA4LDguNzMsODIuOTEsMS41N2E1LjE5LDUuMTksMCwwLDAtNy40MywwTDMzLjMxLDQzLjc0LDE2LjE2LDI2LjU5YTUuMiw1LjIsMCwwLDAtNy40MywwTDEuNTcsMzMuNzdhNS4xOSw1LjE5LDAsMCwwLDAsNy40M2wyOCwyOGE1LjIsNS4yLDAsMCwwLDcuNDMsMEw5MC4wOCwxNi4xN2E1LjE5LDUuMTksMCwwLDAsMC03LjQzWm0wLDAiIGZpbGw9IiMwMDdjYWMiLz48L3N2Zz4=");background-position:top center;background-repeat:no-repeat}#wfcolorbox.wf-modal .wf-modal-header{min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;border-bottom:1px solid #d9d9d9}#wfcolorbox.wf-modal .wf-modal-header .wf-modal-header-content{max-width:75%}#wfcolorbox.wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.95rem;width:100%;transition:color 0.2s ease-in}#wfcolorbox.wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-subtitle{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}#wfcolorbox.wf-modal .wf-modal-header .wf-modal-header-action{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end}#wfcolorbox.wf-modal .wf-modal-header .wf-modal-header-action .wf-modal-header-action-close a{color:#525355}#wfcolorbox.wf-modal .wf-modal-success .wf-modal-header{border-bottom:0px}#wfcolorbox.wf-modal .wf-modal-success .wf-modal-header .wf-modal-header-content{max-width:100%;width:100%;padding-top:1rem}#wfcolorbox.wf-modal .wf-modal-success .wf-modal-header .wf-modal-header-content .wf-modal-title{font-size:1.3125rem;font-weight:300;line-height:1.5;text-align:center;color:#ffffff}#wfcolorbox.wf-modal .wf-modal-content{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;padding:1rem}#wfcolorbox.wf-modal .wf-modal-content>*:first-child{margin-top:0}#wfcolorbox.wf-modal .wf-modal-content select,#wfcolorbox.wf-modal .wf-modal-content select option,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){#wfcolorbox.wf-modal .wf-modal-content select,#wfcolorbox.wf-modal .wf-modal-content select option,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){#wfcolorbox.wf-modal .wf-modal-content select,#wfcolorbox.wf-modal .wf-modal-content select option,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.9rem}}#wfcolorbox.wf-modal .wf-modal-content .wf-option-select-option,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}#wfcolorbox.wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__rendered,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__rendered,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}#wfcolorbox.wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__arrow,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__arrow,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#wfcolorbox.wf-modal .wf-modal-content .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}#wfcolorbox.wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}#wfcolorbox.wf-modal .wf-modal-success .wf-modal-content{text-align:center;color:#ffffff;padding:0 1.5rem 2rem 1.5rem}#wfcolorbox.wf-modal .wf-modal-success .wf-modal-content a{text-decoration:underline;color:#fff}#wfcolorbox.wf-modal .wf-modal-footer{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#f1f1f1;border-top:1px solid #d9d9d9}#wfcolorbox.wf-modal .wf-modal-success .wf-modal-footer{background-color:#ccc;border-top:1px solid #bfbfbf}#wfcolorbox,#wfcolorbox:before,#wfcolorbox:after{box-sizing:content-box}#wfcolorbox h1,#wfcolorbox h2,#wfcolorbox h3,#wfcolorbox h4,#wfcolorbox h5,#wfcolorbox h6{display:block;font-weight:600}#wfcolorbox h1{font-size:2em;margin:.67em 0}#wfcolorbox h2,#wfcolorbox h3{font-size:1.3em;margin:1em 0}#wfcolorbox h1,#wfcolorbox h2,#wfcolorbox h3{color:#23282d}#wfcolorbox p{font-size:13px;line-height:1.5;margin:1em 0} diff --git a/wp/wp-content/plugins/wordfence/css/wf-font-awesome.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-font-awesome.1704213472.css deleted file mode 100644 index d42a7bde..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-font-awesome.1704213472.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff");font-weight:normal;font-style:normal}.wf-fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wf-fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.wf-fa-2x{font-size:2em}.wf-fa-3x{font-size:3em}.wf-fa-4x{font-size:4em}.wf-fa-5x{font-size:5em}.wf-fa-fw{width:1.28571em;text-align:center}.wf-fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.wf-fa-ul>li{position:relative}.wf-fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.wf-fa-li.wf-fa-lg{left:-1.85714em}.wf-fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.wf-fa-pull-left{float:left}.wf-fa-pull-right{float:right}.wf-fa.wf-fa-pull-left{margin-right:.3em}.wf-fa.wf-fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.wf-fa.pull-left{margin-right:.3em}.wf-fa.pull-right{margin-left:.3em}.wf-fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.wf-fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wf-fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.wf-fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wf-fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.wf-fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.wf-fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .wf-fa-rotate-90,:root .wf-fa-rotate-180,:root .wf-fa-rotate-270,:root .wf-fa-flip-horizontal,:root .wf-fa-flip-vertical{filter:none}.wf-fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.wf-fa-stack-1x,.wf-fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.wf-fa-stack-1x{line-height:inherit}.wf-fa-stack-2x{font-size:2em}.wf-fa-inverse{color:#fff}.wf-fa-glass:before{content:""}.wf-fa-music:before{content:""}.wf-fa-search:before{content:""}.wf-fa-envelope-o:before{content:""}.wf-fa-heart:before{content:""}.wf-fa-star:before{content:""}.wf-fa-star-o:before{content:""}.wf-fa-user:before{content:""}.wf-fa-film:before{content:""}.wf-fa-th-large:before{content:""}.wf-fa-th:before{content:""}.wf-fa-th-list:before{content:""}.wf-fa-check:before{content:""}.wf-fa-remove:before,.wf-fa-close:before,.wf-fa-times:before{content:""}.wf-fa-search-plus:before{content:""}.wf-fa-search-minus:before{content:""}.wf-fa-power-off:before{content:""}.wf-fa-signal:before{content:""}.wf-fa-gear:before,.wf-fa-cog:before{content:""}.wf-fa-trash-o:before{content:""}.wf-fa-home:before{content:""}.wf-fa-file-o:before{content:""}.wf-fa-clock-o:before{content:""}.wf-fa-road:before{content:""}.wf-fa-download:before{content:""}.wf-fa-arrow-circle-o-down:before{content:""}.wf-fa-arrow-circle-o-up:before{content:""}.wf-fa-inbox:before{content:""}.wf-fa-play-circle-o:before{content:""}.wf-fa-rotate-right:before,.wf-fa-repeat:before{content:""}.wf-fa-refresh:before{content:""}.wf-fa-list-alt:before{content:""}.wf-fa-lock:before{content:""}.wf-fa-flag:before{content:""}.wf-fa-headphones:before{content:""}.wf-fa-volume-off:before{content:""}.wf-fa-volume-down:before{content:""}.wf-fa-volume-up:before{content:""}.wf-fa-qrcode:before{content:""}.wf-fa-barcode:before{content:""}.wf-fa-tag:before{content:""}.wf-fa-tags:before{content:""}.wf-fa-book:before{content:""}.wf-fa-bookmark:before{content:""}.wf-fa-print:before{content:""}.wf-fa-camera:before{content:""}.wf-fa-font:before{content:""}.wf-fa-bold:before{content:""}.wf-fa-italic:before{content:""}.wf-fa-text-height:before{content:""}.wf-fa-text-width:before{content:""}.wf-fa-align-left:before{content:""}.wf-fa-align-center:before{content:""}.wf-fa-align-right:before{content:""}.wf-fa-align-justify:before{content:""}.wf-fa-list:before{content:""}.wf-fa-dedent:before,.wf-fa-outdent:before{content:""}.wf-fa-indent:before{content:""}.wf-fa-video-camera:before{content:""}.wf-fa-photo:before,.wf-fa-image:before,.wf-fa-picture-o:before{content:""}.wf-fa-pencil:before{content:""}.wf-fa-map-marker:before{content:""}.wf-fa-adjust:before{content:""}.wf-fa-tint:before{content:""}.wf-fa-edit:before,.wf-fa-pencil-square-o:before{content:""}.wf-fa-share-square-o:before{content:""}.wf-fa-check-square-o:before{content:""}.wf-fa-arrows:before{content:""}.wf-fa-step-backward:before{content:""}.wf-fa-fast-backward:before{content:""}.wf-fa-backward:before{content:""}.wf-fa-play:before{content:""}.wf-fa-pause:before{content:""}.wf-fa-stop:before{content:""}.wf-fa-forward:before{content:""}.wf-fa-fast-forward:before{content:""}.wf-fa-step-forward:before{content:""}.wf-fa-eject:before{content:""}.wf-fa-chevron-left:before{content:""}.wf-fa-chevron-right:before{content:""}.wf-fa-plus-circle:before{content:""}.wf-fa-minus-circle:before{content:""}.wf-fa-times-circle:before{content:""}.wf-fa-check-circle:before{content:""}.wf-fa-question-circle:before{content:""}.wf-fa-info-circle:before{content:""}.wf-fa-crosshairs:before{content:""}.wf-fa-times-circle-o:before{content:""}.wf-fa-check-circle-o:before{content:""}.wf-fa-ban:before{content:""}.wf-fa-arrow-left:before{content:""}.wf-fa-arrow-right:before{content:""}.wf-fa-arrow-up:before{content:""}.wf-fa-arrow-down:before{content:""}.wf-fa-mail-forward:before,.wf-fa-share:before{content:""}.wf-fa-expand:before{content:""}.wf-fa-compress:before{content:""}.wf-fa-plus:before{content:""}.wf-fa-minus:before{content:""}.wf-fa-asterisk:before{content:""}.wf-fa-exclamation-circle:before{content:""}.wf-fa-gift:before{content:""}.wf-fa-leaf:before{content:""}.wf-fa-fire:before{content:""}.wf-fa-eye:before{content:""}.wf-fa-eye-slash:before{content:""}.wf-fa-warning:before,.wf-fa-exclamation-triangle:before{content:""}.wf-fa-plane:before{content:""}.wf-fa-calendar:before{content:""}.wf-fa-random:before{content:""}.wf-fa-comment:before{content:""}.wf-fa-magnet:before{content:""}.wf-fa-chevron-up:before{content:""}.wf-fa-chevron-down:before{content:""}.wf-fa-retweet:before{content:""}.wf-fa-shopping-cart:before{content:""}.wf-fa-folder:before{content:""}.wf-fa-folder-open:before{content:""}.wf-fa-arrows-v:before{content:""}.wf-fa-arrows-h:before{content:""}.wf-fa-bar-chart-o:before,.wf-fa-bar-chart:before{content:""}.wf-fa-twitter-square:before{content:""}.wf-fa-facebook-square:before{content:""}.wf-fa-camera-retro:before{content:""}.wf-fa-key:before{content:""}.wf-fa-gears:before,.wf-fa-cogs:before{content:""}.wf-fa-comments:before{content:""}.wf-fa-thumbs-o-up:before{content:""}.wf-fa-thumbs-o-down:before{content:""}.wf-fa-star-half:before{content:""}.wf-fa-heart-o:before{content:""}.wf-fa-sign-out:before{content:""}.wf-fa-linkedin-square:before{content:""}.wf-fa-thumb-tack:before{content:""}.wf-fa-external-link:before{content:""}.wf-fa-sign-in:before{content:""}.wf-fa-trophy:before{content:""}.wf-fa-github-square:before{content:""}.wf-fa-upload:before{content:""}.wf-fa-lemon-o:before{content:""}.wf-fa-phone:before{content:""}.wf-fa-square-o:before{content:""}.wf-fa-bookmark-o:before{content:""}.wf-fa-phone-square:before{content:""}.wf-fa-twitter:before{content:""}.wf-fa-facebook-f:before,.wf-fa-facebook:before{content:""}.wf-fa-github:before{content:""}.wf-fa-unlock:before{content:""}.wf-fa-credit-card:before{content:""}.wf-fa-feed:before,.wf-fa-rss:before{content:""}.wf-fa-hdd-o:before{content:""}.wf-fa-bullhorn:before{content:""}.wf-fa-bell:before{content:""}.wf-fa-certificate:before{content:""}.wf-fa-hand-o-right:before{content:""}.wf-fa-hand-o-left:before{content:""}.wf-fa-hand-o-up:before{content:""}.wf-fa-hand-o-down:before{content:""}.wf-fa-arrow-circle-left:before{content:""}.wf-fa-arrow-circle-right:before{content:""}.wf-fa-arrow-circle-up:before{content:""}.wf-fa-arrow-circle-down:before{content:""}.wf-fa-globe:before{content:""}.wf-fa-wrench:before{content:""}.wf-fa-tasks:before{content:""}.wf-fa-filter:before{content:""}.wf-fa-briefcase:before{content:""}.wf-fa-arrows-alt:before{content:""}.wf-fa-group:before,.wf-fa-users:before{content:""}.wf-fa-chain:before,.wf-fa-link:before{content:""}.wf-fa-cloud:before{content:""}.wf-fa-flask:before{content:""}.wf-fa-cut:before,.wf-fa-scissors:before{content:""}.wf-fa-copy:before,.wf-fa-files-o:before{content:""}.wf-fa-paperclip:before{content:""}.wf-fa-save:before,.wf-fa-floppy-o:before{content:""}.wf-fa-square:before{content:""}.wf-fa-navicon:before,.wf-fa-reorder:before,.wf-fa-bars:before{content:""}.wf-fa-list-ul:before{content:""}.wf-fa-list-ol:before{content:""}.wf-fa-strikethrough:before{content:""}.wf-fa-underline:before{content:""}.wf-fa-table:before{content:""}.wf-fa-magic:before{content:""}.wf-fa-truck:before{content:""}.wf-fa-pinterest:before{content:""}.wf-fa-pinterest-square:before{content:""}.wf-fa-google-plus-square:before{content:""}.wf-fa-google-plus:before{content:""}.wf-fa-money:before{content:""}.wf-fa-caret-down:before{content:""}.wf-fa-caret-up:before{content:""}.wf-fa-caret-left:before{content:""}.wf-fa-caret-right:before{content:""}.wf-fa-columns:before{content:""}.wf-fa-unsorted:before,.wf-fa-sort:before{content:""}.wf-fa-sort-down:before,.wf-fa-sort-desc:before{content:""}.wf-fa-sort-up:before,.wf-fa-sort-asc:before{content:""}.wf-fa-envelope:before{content:""}.wf-fa-linkedin:before{content:""}.wf-fa-rotate-left:before,.wf-fa-undo:before{content:""}.wf-fa-legal:before,.wf-fa-gavel:before{content:""}.wf-fa-dashboard:before,.wf-fa-tachometer:before{content:""}.wf-fa-comment-o:before{content:""}.wf-fa-comments-o:before{content:""}.wf-fa-flash:before,.wf-fa-bolt:before{content:""}.wf-fa-sitemap:before{content:""}.wf-fa-umbrella:before{content:""}.wf-fa-paste:before,.wf-fa-clipboard:before{content:""}.wf-fa-lightbulb-o:before{content:""}.wf-fa-exchange:before{content:""}.wf-fa-cloud-download:before{content:""}.wf-fa-cloud-upload:before{content:""}.wf-fa-user-md:before{content:""}.wf-fa-stethoscope:before{content:""}.wf-fa-suitcase:before{content:""}.wf-fa-bell-o:before{content:""}.wf-fa-coffee:before{content:""}.wf-fa-cutlery:before{content:""}.wf-fa-file-text-o:before{content:""}.wf-fa-building-o:before{content:""}.wf-fa-hospital-o:before{content:""}.wf-fa-ambulance:before{content:""}.wf-fa-medkit:before{content:""}.wf-fa-fighter-jet:before{content:""}.wf-fa-beer:before{content:""}.wf-fa-h-square:before{content:""}.wf-fa-plus-square:before{content:""}.wf-fa-angle-double-left:before{content:""}.wf-fa-angle-double-right:before{content:""}.wf-fa-angle-double-up:before{content:""}.wf-fa-angle-double-down:before{content:""}.wf-fa-angle-left:before{content:""}.wf-fa-angle-right:before{content:""}.wf-fa-angle-up:before{content:""}.wf-fa-angle-down:before{content:""}.wf-fa-desktop:before{content:""}.wf-fa-laptop:before{content:""}.wf-fa-tablet:before{content:""}.wf-fa-mobile-phone:before,.wf-fa-mobile:before{content:""}.wf-fa-circle-o:before{content:""}.wf-fa-quote-left:before{content:""}.wf-fa-quote-right:before{content:""}.wf-fa-spinner:before{content:""}.wf-fa-circle:before{content:""}.wf-fa-mail-reply:before,.wf-fa-reply:before{content:""}.wf-fa-github-alt:before{content:""}.wf-fa-folder-o:before{content:""}.wf-fa-folder-open-o:before{content:""}.wf-fa-smile-o:before{content:""}.wf-fa-frown-o:before{content:""}.wf-fa-meh-o:before{content:""}.wf-fa-gamepad:before{content:""}.wf-fa-keyboard-o:before{content:""}.wf-fa-flag-o:before{content:""}.wf-fa-flag-checkered:before{content:""}.wf-fa-terminal:before{content:""}.wf-fa-code:before{content:""}.wf-fa-mail-reply-all:before,.wf-fa-reply-all:before{content:""}.wf-fa-star-half-empty:before,.wf-fa-star-half-full:before,.wf-fa-star-half-o:before{content:""}.wf-fa-location-arrow:before{content:""}.wf-fa-crop:before{content:""}.wf-fa-code-fork:before{content:""}.wf-fa-unlink:before,.wf-fa-chain-broken:before{content:""}.wf-fa-question:before{content:""}.wf-fa-info:before{content:""}.wf-fa-exclamation:before{content:""}.wf-fa-superscript:before{content:""}.wf-fa-subscript:before{content:""}.wf-fa-eraser:before{content:""}.wf-fa-puzzle-piece:before{content:""}.wf-fa-microphone:before{content:""}.wf-fa-microphone-slash:before{content:""}.wf-fa-shield:before{content:""}.wf-fa-calendar-o:before{content:""}.wf-fa-fire-extinguisher:before{content:""}.wf-fa-rocket:before{content:""}.wf-fa-maxcdn:before{content:""}.wf-fa-chevron-circle-left:before{content:""}.wf-fa-chevron-circle-right:before{content:""}.wf-fa-chevron-circle-up:before{content:""}.wf-fa-chevron-circle-down:before{content:""}.wf-fa-html5:before{content:""}.wf-fa-css3:before{content:""}.wf-fa-anchor:before{content:""}.wf-fa-unlock-alt:before{content:""}.wf-fa-bullseye:before{content:""}.wf-fa-ellipsis-h:before{content:""}.wf-fa-ellipsis-v:before{content:""}.wf-fa-rss-square:before{content:""}.wf-fa-play-circle:before{content:""}.wf-fa-ticket:before{content:""}.wf-fa-minus-square:before{content:""}.wf-fa-minus-square-o:before{content:""}.wf-fa-level-up:before{content:""}.wf-fa-level-down:before{content:""}.wf-fa-check-square:before{content:""}.wf-fa-pencil-square:before{content:""}.wf-fa-external-link-square:before{content:""}.wf-fa-share-square:before{content:""}.wf-fa-compass:before{content:""}.wf-fa-toggle-down:before,.wf-fa-caret-square-o-down:before{content:""}.wf-fa-toggle-up:before,.wf-fa-caret-square-o-up:before{content:""}.wf-fa-toggle-right:before,.wf-fa-caret-square-o-right:before{content:""}.wf-fa-euro:before,.wf-fa-eur:before{content:""}.wf-fa-gbp:before{content:""}.wf-fa-dollar:before,.wf-fa-usd:before{content:""}.wf-fa-rupee:before,.wf-fa-inr:before{content:""}.wf-fa-cny:before,.wf-fa-rmb:before,.wf-fa-yen:before,.wf-fa-jpy:before{content:""}.wf-fa-ruble:before,.wf-fa-rouble:before,.wf-fa-rub:before{content:""}.wf-fa-won:before,.wf-fa-krw:before{content:""}.wf-fa-bitcoin:before,.wf-fa-btc:before{content:""}.wf-fa-file:before{content:""}.wf-fa-file-text:before{content:""}.wf-fa-sort-alpha-asc:before{content:""}.wf-fa-sort-alpha-desc:before{content:""}.wf-fa-sort-amount-asc:before{content:""}.wf-fa-sort-amount-desc:before{content:""}.wf-fa-sort-numeric-asc:before{content:""}.wf-fa-sort-numeric-desc:before{content:""}.wf-fa-thumbs-up:before{content:""}.wf-fa-thumbs-down:before{content:""}.wf-fa-youtube-square:before{content:""}.wf-fa-youtube:before{content:""}.wf-fa-xing:before{content:""}.wf-fa-xing-square:before{content:""}.wf-fa-youtube-play:before{content:""}.wf-fa-dropbox:before{content:""}.wf-fa-stack-overflow:before{content:""}.wf-fa-instagram:before{content:""}.wf-fa-flickr:before{content:""}.wf-fa-adn:before{content:""}.wf-fa-bitbucket:before{content:""}.wf-fa-bitbucket-square:before{content:""}.wf-fa-tumblr:before{content:""}.wf-fa-tumblr-square:before{content:""}.wf-fa-long-arrow-down:before{content:""}.wf-fa-long-arrow-up:before{content:""}.wf-fa-long-arrow-left:before{content:""}.wf-fa-long-arrow-right:before{content:""}.wf-fa-apple:before{content:""}.wf-fa-windows:before{content:""}.wf-fa-android:before{content:""}.wf-fa-linux:before{content:""}.wf-fa-dribbble:before{content:""}.wf-fa-skype:before{content:""}.wf-fa-foursquare:before{content:""}.wf-fa-trello:before{content:""}.wf-fa-female:before{content:""}.wf-fa-male:before{content:""}.wf-fa-gittip:before,.wf-fa-gratipay:before{content:""}.wf-fa-sun-o:before{content:""}.wf-fa-moon-o:before{content:""}.wf-fa-archive:before{content:""}.wf-fa-bug:before{content:""}.wf-fa-vk:before{content:""}.wf-fa-weibo:before{content:""}.wf-fa-renren:before{content:""}.wf-fa-pagelines:before{content:""}.wf-fa-stack-exchange:before{content:""}.wf-fa-arrow-circle-o-right:before{content:""}.wf-fa-arrow-circle-o-left:before{content:""}.wf-fa-toggle-left:before,.wf-fa-caret-square-o-left:before{content:""}.wf-fa-dot-circle-o:before{content:""}.wf-fa-wheelchair:before{content:""}.wf-fa-vimeo-square:before{content:""}.wf-fa-turkish-lira:before,.wf-fa-try:before{content:""}.wf-fa-plus-square-o:before{content:""}.wf-fa-space-shuttle:before{content:""}.wf-fa-slack:before{content:""}.wf-fa-envelope-square:before{content:""}.wf-fa-wordpress:before{content:""}.wf-fa-openid:before{content:""}.wf-fa-institution:before,.wf-fa-bank:before,.wf-fa-university:before{content:""}.wf-fa-mortar-board:before,.wf-fa-graduation-cap:before{content:""}.wf-fa-yahoo:before{content:""}.wf-fa-google:before{content:""}.wf-fa-reddit:before{content:""}.wf-fa-reddit-square:before{content:""}.wf-fa-stumbleupon-circle:before{content:""}.wf-fa-stumbleupon:before{content:""}.wf-fa-delicious:before{content:""}.wf-fa-digg:before{content:""}.wf-fa-pied-piper-pp:before{content:""}.wf-fa-pied-piper-alt:before{content:""}.wf-fa-drupal:before{content:""}.wf-fa-joomla:before{content:""}.wf-fa-language:before{content:""}.wf-fa-fax:before{content:""}.wf-fa-building:before{content:""}.wf-fa-child:before{content:""}.wf-fa-paw:before{content:""}.wf-fa-spoon:before{content:""}.wf-fa-cube:before{content:""}.wf-fa-cubes:before{content:""}.wf-fa-behance:before{content:""}.wf-fa-behance-square:before{content:""}.wf-fa-steam:before{content:""}.wf-fa-steam-square:before{content:""}.wf-fa-recycle:before{content:""}.wf-fa-automobile:before,.wf-fa-car:before{content:""}.wf-fa-cab:before,.wf-fa-taxi:before{content:""}.wf-fa-tree:before{content:""}.wf-fa-spotify:before{content:""}.wf-fa-deviantart:before{content:""}.wf-fa-soundcloud:before{content:""}.wf-fa-database:before{content:""}.wf-fa-file-pdf-o:before{content:""}.wf-fa-file-word-o:before{content:""}.wf-fa-file-excel-o:before{content:""}.wf-fa-file-powerpoint-o:before{content:""}.wf-fa-file-photo-o:before,.wf-fa-file-picture-o:before,.wf-fa-file-image-o:before{content:""}.wf-fa-file-zip-o:before,.wf-fa-file-archive-o:before{content:""}.wf-fa-file-sound-o:before,.wf-fa-file-audio-o:before{content:""}.wf-fa-file-movie-o:before,.wf-fa-file-video-o:before{content:""}.wf-fa-file-code-o:before{content:""}.wf-fa-vine:before{content:""}.wf-fa-codepen:before{content:""}.wf-fa-jsfiddle:before{content:""}.wf-fa-life-bouy:before,.wf-fa-life-buoy:before,.wf-fa-life-saver:before,.wf-fa-support:before,.wf-fa-life-ring:before{content:""}.wf-fa-circle-o-notch:before{content:""}.wf-fa-ra:before,.wf-fa-resistance:before,.wf-fa-rebel:before{content:""}.wf-fa-ge:before,.wf-fa-empire:before{content:""}.wf-fa-git-square:before{content:""}.wf-fa-git:before{content:""}.wf-fa-y-combinator-square:before,.wf-fa-yc-square:before,.wf-fa-hacker-news:before{content:""}.wf-fa-tencent-weibo:before{content:""}.wf-fa-qq:before{content:""}.wf-fa-wechat:before,.wf-fa-weixin:before{content:""}.wf-fa-send:before,.wf-fa-paper-plane:before{content:""}.wf-fa-send-o:before,.wf-fa-paper-plane-o:before{content:""}.wf-fa-history:before{content:""}.wf-fa-circle-thin:before{content:""}.wf-fa-header:before{content:""}.wf-fa-paragraph:before{content:""}.wf-fa-sliders:before{content:""}.wf-fa-share-alt:before{content:""}.wf-fa-share-alt-square:before{content:""}.wf-fa-bomb:before{content:""}.wf-fa-soccer-ball-o:before,.wf-fa-futbol-o:before{content:""}.wf-fa-tty:before{content:""}.wf-fa-binoculars:before{content:""}.wf-fa-plug:before{content:""}.wf-fa-slideshare:before{content:""}.wf-fa-twitch:before{content:""}.wf-fa-yelp:before{content:""}.wf-fa-newspaper-o:before{content:""}.wf-fa-wifi:before{content:""}.wf-fa-calculator:before{content:""}.wf-fa-paypal:before{content:""}.wf-fa-google-wallet:before{content:""}.wf-fa-cc-visa:before{content:""}.wf-fa-cc-mastercard:before{content:""}.wf-fa-cc-discover:before{content:""}.wf-fa-cc-amex:before{content:""}.wf-fa-cc-paypal:before{content:""}.wf-fa-cc-stripe:before{content:""}.wf-fa-bell-slash:before{content:""}.wf-fa-bell-slash-o:before{content:""}.wf-fa-trash:before{content:""}.wf-fa-copyright:before{content:""}.wf-fa-at:before{content:""}.wf-fa-eyedropper:before{content:""}.wf-fa-paint-brush:before{content:""}.wf-fa-birthday-cake:before{content:""}.wf-fa-area-chart:before{content:""}.wf-fa-pie-chart:before{content:""}.wf-fa-line-chart:before{content:""}.wf-fa-lastfm:before{content:""}.wf-fa-lastfm-square:before{content:""}.wf-fa-toggle-off:before{content:""}.wf-fa-toggle-on:before{content:""}.wf-fa-bicycle:before{content:""}.wf-fa-bus:before{content:""}.wf-fa-ioxhost:before{content:""}.wf-fa-angellist:before{content:""}.wf-fa-cc:before{content:""}.wf-fa-shekel:before,.wf-fa-sheqel:before,.wf-fa-ils:before{content:""}.wf-fa-meanpath:before{content:""}.wf-fa-buysellads:before{content:""}.wf-fa-connectdevelop:before{content:""}.wf-fa-dashcube:before{content:""}.wf-fa-forumbee:before{content:""}.wf-fa-leanpub:before{content:""}.wf-fa-sellsy:before{content:""}.wf-fa-shirtsinbulk:before{content:""}.wf-fa-simplybuilt:before{content:""}.wf-fa-skyatlas:before{content:""}.wf-fa-cart-plus:before{content:""}.wf-fa-cart-arrow-down:before{content:""}.wf-fa-diamond:before{content:""}.wf-fa-ship:before{content:""}.wf-fa-user-secret:before{content:""}.wf-fa-motorcycle:before{content:""}.wf-fa-street-view:before{content:""}.wf-fa-heartbeat:before{content:""}.wf-fa-venus:before{content:""}.wf-fa-mars:before{content:""}.wf-fa-mercury:before{content:""}.wf-fa-intersex:before,.wf-fa-transgender:before{content:""}.wf-fa-transgender-alt:before{content:""}.wf-fa-venus-double:before{content:""}.wf-fa-mars-double:before{content:""}.wf-fa-venus-mars:before{content:""}.wf-fa-mars-stroke:before{content:""}.wf-fa-mars-stroke-v:before{content:""}.wf-fa-mars-stroke-h:before{content:""}.wf-fa-neuter:before{content:""}.wf-fa-genderless:before{content:""}.wf-fa-facebook-official:before{content:""}.wf-fa-pinterest-p:before{content:""}.wf-fa-whatsapp:before{content:""}.wf-fa-server:before{content:""}.wf-fa-user-plus:before{content:""}.wf-fa-user-times:before{content:""}.wf-fa-hotel:before,.wf-fa-bed:before{content:""}.wf-fa-viacoin:before{content:""}.wf-fa-train:before{content:""}.wf-fa-subway:before{content:""}.wf-fa-medium:before{content:""}.wf-fa-yc:before,.wf-fa-y-combinator:before{content:""}.wf-fa-optin-monster:before{content:""}.wf-fa-opencart:before{content:""}.wf-fa-expeditedssl:before{content:""}.wf-fa-battery-4:before,.wf-fa-battery:before,.wf-fa-battery-full:before{content:""}.wf-fa-battery-3:before,.wf-fa-battery-three-quarters:before{content:""}.wf-fa-battery-2:before,.wf-fa-battery-half:before{content:""}.wf-fa-battery-1:before,.wf-fa-battery-quarter:before{content:""}.wf-fa-battery-0:before,.wf-fa-battery-empty:before{content:""}.wf-fa-mouse-pointer:before{content:""}.wf-fa-i-cursor:before{content:""}.wf-fa-object-group:before{content:""}.wf-fa-object-ungroup:before{content:""}.wf-fa-sticky-note:before{content:""}.wf-fa-sticky-note-o:before{content:""}.wf-fa-cc-jcb:before{content:""}.wf-fa-cc-diners-club:before{content:""}.wf-fa-clone:before{content:""}.wf-fa-balance-scale:before{content:""}.wf-fa-hourglass-o:before{content:""}.wf-fa-hourglass-1:before,.wf-fa-hourglass-start:before{content:""}.wf-fa-hourglass-2:before,.wf-fa-hourglass-half:before{content:""}.wf-fa-hourglass-3:before,.wf-fa-hourglass-end:before{content:""}.wf-fa-hourglass:before{content:""}.wf-fa-hand-grab-o:before,.wf-fa-hand-rock-o:before{content:""}.wf-fa-hand-stop-o:before,.wf-fa-hand-paper-o:before{content:""}.wf-fa-hand-scissors-o:before{content:""}.wf-fa-hand-lizard-o:before{content:""}.wf-fa-hand-spock-o:before{content:""}.wf-fa-hand-pointer-o:before{content:""}.wf-fa-hand-peace-o:before{content:""}.wf-fa-trademark:before{content:""}.wf-fa-registered:before{content:""}.wf-fa-creative-commons:before{content:""}.wf-fa-gg:before{content:""}.wf-fa-gg-circle:before{content:""}.wf-fa-tripadvisor:before{content:""}.wf-fa-odnoklassniki:before{content:""}.wf-fa-odnoklassniki-square:before{content:""}.wf-fa-get-pocket:before{content:""}.wf-fa-wikipedia-w:before{content:""}.wf-fa-safari:before{content:""}.wf-fa-chrome:before{content:""}.wf-fa-firefox:before{content:""}.wf-fa-opera:before{content:""}.wf-fa-internet-explorer:before{content:""}.wf-fa-tv:before,.wf-fa-television:before{content:""}.wf-fa-contao:before{content:""}.wf-fa-500px:before{content:""}.wf-fa-amazon:before{content:""}.wf-fa-calendar-plus-o:before{content:""}.wf-fa-calendar-minus-o:before{content:""}.wf-fa-calendar-times-o:before{content:""}.wf-fa-calendar-check-o:before{content:""}.wf-fa-industry:before{content:""}.wf-fa-map-pin:before{content:""}.wf-fa-map-signs:before{content:""}.wf-fa-map-o:before{content:""}.wf-fa-map:before{content:""}.wf-fa-commenting:before{content:""}.wf-fa-commenting-o:before{content:""}.wf-fa-houzz:before{content:""}.wf-fa-vimeo:before{content:""}.wf-fa-black-tie:before{content:""}.wf-fa-fonticons:before{content:""}.wf-fa-reddit-alien:before{content:""}.wf-fa-edge:before{content:""}.wf-fa-credit-card-alt:before{content:""}.wf-fa-codiepie:before{content:""}.wf-fa-modx:before{content:""}.wf-fa-fort-awesome:before{content:""}.wf-fa-usb:before{content:""}.wf-fa-product-hunt:before{content:""}.wf-fa-mixcloud:before{content:""}.wf-fa-scribd:before{content:""}.wf-fa-pause-circle:before{content:""}.wf-fa-pause-circle-o:before{content:""}.wf-fa-stop-circle:before{content:""}.wf-fa-stop-circle-o:before{content:""}.wf-fa-shopping-bag:before{content:""}.wf-fa-shopping-basket:before{content:""}.wf-fa-hashtag:before{content:""}.wf-fa-bluetooth:before{content:""}.wf-fa-bluetooth-b:before{content:""}.wf-fa-percent:before{content:""}.wf-fa-gitlab:before{content:""}.wf-fa-wpbeginner:before{content:""}.wf-fa-wpforms:before{content:""}.wf-fa-envira:before{content:""}.wf-fa-universal-access:before{content:""}.wf-fa-wheelchair-alt:before{content:""}.wf-fa-question-circle-o:before{content:""}.wf-fa-blind:before{content:""}.wf-fa-audio-description:before{content:""}.wf-fa-volume-control-phone:before{content:""}.wf-fa-braille:before{content:""}.wf-fa-assistive-listening-systems:before{content:""}.wf-fa-asl-interpreting:before,.wf-fa-american-sign-language-interpreting:before{content:""}.wf-fa-deafness:before,.wf-fa-hard-of-hearing:before,.wf-fa-deaf:before{content:""}.wf-fa-glide:before{content:""}.wf-fa-glide-g:before{content:""}.wf-fa-signing:before,.wf-fa-sign-language:before{content:""}.wf-fa-low-vision:before{content:""}.wf-fa-viadeo:before{content:""}.wf-fa-viadeo-square:before{content:""}.wf-fa-snapchat:before{content:""}.wf-fa-snapchat-ghost:before{content:""}.wf-fa-snapchat-square:before{content:""}.wf-fa-pied-piper:before{content:""}.wf-fa-first-order:before{content:""}.wf-fa-yoast:before{content:""}.wf-fa-themeisle:before{content:""}.wf-fa-google-plus-circle:before,.wf-fa-google-plus-official:before{content:""}.wf-fa-fa:before,.wf-fa-font-awesome:before{content:""}.wf-fa-handshake-o:before{content:""}.wf-fa-envelope-open:before{content:""}.wf-fa-envelope-open-o:before{content:""}.wf-fa-linode:before{content:""}.wf-fa-address-book:before{content:""}.wf-fa-address-book-o:before{content:""}.wf-fa-vcard:before,.wf-fa-address-card:before{content:""}.wf-fa-vcard-o:before,.wf-fa-address-card-o:before{content:""}.wf-fa-user-circle:before{content:""}.wf-fa-user-circle-o:before{content:""}.wf-fa-user-o:before{content:""}.wf-fa-id-badge:before{content:""}.wf-fa-drivers-license:before,.wf-fa-id-card:before{content:""}.wf-fa-drivers-license-o:before,.wf-fa-id-card-o:before{content:""}.wf-fa-quora:before{content:""}.wf-fa-free-code-camp:before{content:""}.wf-fa-telegram:before{content:""}.wf-fa-thermometer-4:before,.wf-fa-thermometer:before,.wf-fa-thermometer-full:before{content:""}.wf-fa-thermometer-3:before,.wf-fa-thermometer-three-quarters:before{content:""}.wf-fa-thermometer-2:before,.wf-fa-thermometer-half:before{content:""}.wf-fa-thermometer-1:before,.wf-fa-thermometer-quarter:before{content:""}.wf-fa-thermometer-0:before,.wf-fa-thermometer-empty:before{content:""}.wf-fa-shower:before{content:""}.wf-fa-bathtub:before,.wf-fa-s15:before,.wf-fa-bath:before{content:""}.wf-fa-podcast:before{content:""}.wf-fa-window-maximize:before{content:""}.wf-fa-window-minimize:before{content:""}.wf-fa-window-restore:before{content:""}.wf-fa-times-rectangle:before,.wf-fa-window-close:before{content:""}.wf-fa-times-rectangle-o:before,.wf-fa-window-close-o:before{content:""}.wf-fa-bandcamp:before{content:""}.wf-fa-grav:before{content:""}.wf-fa-etsy:before{content:""}.wf-fa-imdb:before{content:""}.wf-fa-ravelry:before{content:""}.wf-fa-eercast:before{content:""}.wf-fa-microchip:before{content:""}.wf-fa-snowflake-o:before{content:""}.wf-fa-superpowers:before{content:""}.wf-fa-wpexplorer:before{content:""}.wf-fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/wp/wp-content/plugins/wordfence/css/wf-global.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-global.1704213472.css deleted file mode 100644 index 3958ed28..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-global.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -#wf-extended-protection-notice{display:inline-block;line-height:1.4;padding:11px 15px;font-size:14px;text-align:left;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}#wfcolorbox.wf-modal .wf-modal-footer.wf-modal-footer-center{justify-content:center}div.wf-radio-group div.wf-radio-option{display:flex;align-items:center}div.wf-radio-group div.wf-radio-option:not(:last-child){margin-bottom:8px}div.wf-radio-group div.wf-radio-option input[type=radio]{margin-right:8px}a.wfhelp{margin:0 3px 0 3px;text-decoration:none;display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased}a.wfhelp:before{content:'\f29c'} diff --git a/wp/wp-content/plugins/wordfence/css/wf-ionicons.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-ionicons.1704213472.css deleted file mode 100644 index 0259a2a1..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-ionicons.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:"Ionicons";src:url("../fonts/ionicons.woff?v=2.0.0") format("woff");font-weight:normal;font-style:normal}.wf-ion,.wf-ionicons,.wf-ion-alert:before,.wf-ion-alert-circled:before,.wf-ion-android-add:before,.wf-ion-android-add-circle:before,.wf-ion-android-alarm-clock:before,.wf-ion-android-alert:before,.wf-ion-android-apps:before,.wf-ion-android-archive:before,.wf-ion-android-arrow-back:before,.wf-ion-android-arrow-down:before,.wf-ion-android-arrow-dropdown:before,.wf-ion-android-arrow-dropdown-circle:before,.wf-ion-android-arrow-dropleft:before,.wf-ion-android-arrow-dropleft-circle:before,.wf-ion-android-arrow-dropright:before,.wf-ion-android-arrow-dropright-circle:before,.wf-ion-android-arrow-dropup:before,.wf-ion-android-arrow-dropup-circle:before,.wf-ion-android-arrow-forward:before,.wf-ion-android-arrow-up:before,.wf-ion-android-attach:before,.wf-ion-android-bar:before,.wf-ion-android-bicycle:before,.wf-ion-android-boat:before,.wf-ion-android-bookmark:before,.wf-ion-android-bulb:before,.wf-ion-android-bus:before,.wf-ion-android-calendar:before,.wf-ion-android-call:before,.wf-ion-android-camera:before,.wf-ion-android-cancel:before,.wf-ion-android-car:before,.wf-ion-android-cart:before,.wf-ion-android-chat:before,.wf-ion-android-checkbox:before,.wf-ion-android-checkbox-blank:before,.wf-ion-android-checkbox-outline:before,.wf-ion-android-checkbox-outline-blank:before,.wf-ion-android-checkmark-circle:before,.wf-ion-android-clipboard:before,.wf-ion-android-close:before,.wf-ion-android-cloud:before,.wf-ion-android-cloud-circle:before,.wf-ion-android-cloud-done:before,.wf-ion-android-cloud-outline:before,.wf-ion-android-color-palette:before,.wf-ion-android-compass:before,.wf-ion-android-contact:before,.wf-ion-android-contacts:before,.wf-ion-android-contract:before,.wf-ion-android-create:before,.wf-ion-android-delete:before,.wf-ion-android-desktop:before,.wf-ion-android-document:before,.wf-ion-android-done:before,.wf-ion-android-done-all:before,.wf-ion-android-download:before,.wf-ion-android-drafts:before,.wf-ion-android-exit:before,.wf-ion-android-expand:before,.wf-ion-android-favorite:before,.wf-ion-android-favorite-outline:before,.wf-ion-android-film:before,.wf-ion-android-folder:before,.wf-ion-android-folder-open:before,.wf-ion-android-funnel:before,.wf-ion-android-globe:before,.wf-ion-android-hand:before,.wf-ion-android-hangout:before,.wf-ion-android-happy:before,.wf-ion-android-home:before,.wf-ion-android-image:before,.wf-ion-android-laptop:before,.wf-ion-android-list:before,.wf-ion-android-locate:before,.wf-ion-android-lock:before,.wf-ion-android-mail:before,.wf-ion-android-map:before,.wf-ion-android-menu:before,.wf-ion-android-microphone:before,.wf-ion-android-microphone-off:before,.wf-ion-android-more-horizontal:before,.wf-ion-android-more-vertical:before,.wf-ion-android-navigate:before,.wf-ion-android-notifications:before,.wf-ion-android-notifications-none:before,.wf-ion-android-notifications-off:before,.wf-ion-android-open:before,.wf-ion-android-options:before,.wf-ion-android-people:before,.wf-ion-android-person:before,.wf-ion-android-person-add:before,.wf-ion-android-phone-landscape:before,.wf-ion-android-phone-portrait:before,.wf-ion-android-pin:before,.wf-ion-android-plane:before,.wf-ion-android-playstore:before,.wf-ion-android-print:before,.wf-ion-android-radio-button-off:before,.wf-ion-android-radio-button-on:before,.wf-ion-android-refresh:before,.wf-ion-android-remove:before,.wf-ion-android-remove-circle:before,.wf-ion-android-restaurant:before,.wf-ion-android-sad:before,.wf-ion-android-search:before,.wf-ion-android-send:before,.wf-ion-android-settings:before,.wf-ion-android-share:before,.wf-ion-android-share-alt:before,.wf-ion-android-star:before,.wf-ion-android-star-half:before,.wf-ion-android-star-outline:before,.wf-ion-android-stopwatch:before,.wf-ion-android-subway:before,.wf-ion-android-sunny:before,.wf-ion-android-sync:before,.wf-ion-android-textsms:before,.wf-ion-android-time:before,.wf-ion-android-train:before,.wf-ion-android-unlock:before,.wf-ion-android-upload:before,.wf-ion-android-volume-down:before,.wf-ion-android-volume-mute:before,.wf-ion-android-volume-off:before,.wf-ion-android-volume-up:before,.wf-ion-android-walk:before,.wf-ion-android-warning:before,.wf-ion-android-watch:before,.wf-ion-android-wifi:before,.wf-ion-aperture:before,.wf-ion-archive:before,.wf-ion-arrow-down-a:before,.wf-ion-arrow-down-b:before,.wf-ion-arrow-down-c:before,.wf-ion-arrow-expand:before,.wf-ion-arrow-graph-down-left:before,.wf-ion-arrow-graph-down-right:before,.wf-ion-arrow-graph-up-left:before,.wf-ion-arrow-graph-up-right:before,.wf-ion-arrow-left-a:before,.wf-ion-arrow-left-b:before,.wf-ion-arrow-left-c:before,.wf-ion-arrow-move:before,.wf-ion-arrow-resize:before,.wf-ion-arrow-return-left:before,.wf-ion-arrow-return-right:before,.wf-ion-arrow-right-a:before,.wf-ion-arrow-right-b:before,.wf-ion-arrow-right-c:before,.wf-ion-arrow-shrink:before,.wf-ion-arrow-swap:before,.wf-ion-arrow-up-a:before,.wf-ion-arrow-up-b:before,.wf-ion-arrow-up-c:before,.wf-ion-asterisk:before,.wf-ion-at:before,.wf-ion-backspace:before,.wf-ion-backspace-outline:before,.wf-ion-bag:before,.wf-ion-battery-charging:before,.wf-ion-battery-empty:before,.wf-ion-battery-full:before,.wf-ion-battery-half:before,.wf-ion-battery-low:before,.wf-ion-beaker:before,.wf-ion-beer:before,.wf-ion-bluetooth:before,.wf-ion-bonfire:before,.wf-ion-bookmark:before,.wf-ion-bowtie:before,.wf-ion-briefcase:before,.wf-ion-bug:before,.wf-ion-calculator:before,.wf-ion-calendar:before,.wf-ion-camera:before,.wf-ion-card:before,.wf-ion-cash:before,.wf-ion-chatbox:before,.wf-ion-chatbox-working:before,.wf-ion-chatboxes:before,.wf-ion-chatbubble:before,.wf-ion-chatbubble-working:before,.wf-ion-chatbubbles:before,.wf-ion-checkmark:before,.wf-ion-checkmark-circled:before,.wf-ion-checkmark-round:before,.wf-ion-chevron-down:before,.wf-ion-chevron-left:before,.wf-ion-chevron-right:before,.wf-ion-chevron-up:before,.wf-ion-clipboard:before,.wf-ion-clock:before,.wf-ion-close:before,.wf-ion-close-circled:before,.wf-ion-close-round:before,.wf-ion-closed-captioning:before,.wf-ion-cloud:before,.wf-ion-code:before,.wf-ion-code-download:before,.wf-ion-code-working:before,.wf-ion-coffee:before,.wf-ion-compass:before,.wf-ion-compose:before,.wf-ion-connection-bars:before,.wf-ion-contrast:before,.wf-ion-crop:before,.wf-ion-cube:before,.wf-ion-disc:before,.wf-ion-document:before,.wf-ion-document-text:before,.wf-ion-drag:before,.wf-ion-earth:before,.wf-ion-easel:before,.wf-ion-edit:before,.wf-ion-egg:before,.wf-ion-eject:before,.wf-ion-email:before,.wf-ion-email-unread:before,.wf-ion-erlenmeyer-flask:before,.wf-ion-erlenmeyer-flask-bubbles:before,.wf-ion-eye:before,.wf-ion-eye-disabled:before,.wf-ion-female:before,.wf-ion-filing:before,.wf-ion-film-marker:before,.wf-ion-fireball:before,.wf-ion-flag:before,.wf-ion-flame:before,.wf-ion-flash:before,.wf-ion-flash-off:before,.wf-ion-folder:before,.wf-ion-fork:before,.wf-ion-fork-repo:before,.wf-ion-forward:before,.wf-ion-funnel:before,.wf-ion-gear-a:before,.wf-ion-gear-b:before,.wf-ion-grid:before,.wf-ion-hammer:before,.wf-ion-happy:before,.wf-ion-happy-outline:before,.wf-ion-headphone:before,.wf-ion-heart:before,.wf-ion-heart-broken:before,.wf-ion-help:before,.wf-ion-help-buoy:before,.wf-ion-help-circled:before,.wf-ion-home:before,.wf-ion-icecream:before,.wf-ion-image:before,.wf-ion-images:before,.wf-ion-information:before,.wf-ion-information-circled:before,.wf-ion-ionic:before,.wf-ion-ios-alarm:before,.wf-ion-ios-alarm-outline:before,.wf-ion-ios-albums:before,.wf-ion-ios-albums-outline:before,.wf-ion-ios-americanfootball:before,.wf-ion-ios-americanfootball-outline:before,.wf-ion-ios-analytics:before,.wf-ion-ios-analytics-outline:before,.wf-ion-ios-arrow-back:before,.wf-ion-ios-arrow-down:before,.wf-ion-ios-arrow-forward:before,.wf-ion-ios-arrow-left:before,.wf-ion-ios-arrow-right:before,.wf-ion-ios-arrow-thin-down:before,.wf-ion-ios-arrow-thin-left:before,.wf-ion-ios-arrow-thin-right:before,.wf-ion-ios-arrow-thin-up:before,.wf-ion-ios-arrow-up:before,.wf-ion-ios-at:before,.wf-ion-ios-at-outline:before,.wf-ion-ios-barcode:before,.wf-ion-ios-barcode-outline:before,.wf-ion-ios-baseball:before,.wf-ion-ios-baseball-outline:before,.wf-ion-ios-basketball:before,.wf-ion-ios-basketball-outline:before,.wf-ion-ios-bell:before,.wf-ion-ios-bell-outline:before,.wf-ion-ios-body:before,.wf-ion-ios-body-outline:before,.wf-ion-ios-bolt:before,.wf-ion-ios-bolt-outline:before,.wf-ion-ios-book:before,.wf-ion-ios-book-outline:before,.wf-ion-ios-bookmarks:before,.wf-ion-ios-bookmarks-outline:before,.wf-ion-ios-box:before,.wf-ion-ios-box-outline:before,.wf-ion-ios-briefcase:before,.wf-ion-ios-briefcase-outline:before,.wf-ion-ios-browsers:before,.wf-ion-ios-browsers-outline:before,.wf-ion-ios-calculator:before,.wf-ion-ios-calculator-outline:before,.wf-ion-ios-calendar:before,.wf-ion-ios-calendar-outline:before,.wf-ion-ios-camera:before,.wf-ion-ios-camera-outline:before,.wf-ion-ios-cart:before,.wf-ion-ios-cart-outline:before,.wf-ion-ios-chatboxes:before,.wf-ion-ios-chatboxes-outline:before,.wf-ion-ios-chatbubble:before,.wf-ion-ios-chatbubble-outline:before,.wf-ion-ios-checkmark:before,.wf-ion-ios-checkmark-empty:before,.wf-ion-ios-checkmark-outline:before,.wf-ion-ios-circle-filled:before,.wf-ion-ios-circle-outline:before,.wf-ion-ios-clock:before,.wf-ion-ios-clock-outline:before,.wf-ion-ios-close:before,.wf-ion-ios-close-empty:before,.wf-ion-ios-close-outline:before,.wf-ion-ios-cloud:before,.wf-ion-ios-cloud-download:before,.wf-ion-ios-cloud-download-outline:before,.wf-ion-ios-cloud-outline:before,.wf-ion-ios-cloud-upload:before,.wf-ion-ios-cloud-upload-outline:before,.wf-ion-ios-cloudy:before,.wf-ion-ios-cloudy-night:before,.wf-ion-ios-cloudy-night-outline:before,.wf-ion-ios-cloudy-outline:before,.wf-ion-ios-cog:before,.wf-ion-ios-cog-outline:before,.wf-ion-ios-color-filter:before,.wf-ion-ios-color-filter-outline:before,.wf-ion-ios-color-wand:before,.wf-ion-ios-color-wand-outline:before,.wf-ion-ios-compose:before,.wf-ion-ios-compose-outline:before,.wf-ion-ios-contact:before,.wf-ion-ios-contact-outline:before,.wf-ion-ios-copy:before,.wf-ion-ios-copy-outline:before,.wf-ion-ios-crop:before,.wf-ion-ios-crop-strong:before,.wf-ion-ios-download:before,.wf-ion-ios-download-outline:before,.wf-ion-ios-drag:before,.wf-ion-ios-email:before,.wf-ion-ios-email-outline:before,.wf-ion-ios-eye:before,.wf-ion-ios-eye-outline:before,.wf-ion-ios-fastforward:before,.wf-ion-ios-fastforward-outline:before,.wf-ion-ios-filing:before,.wf-ion-ios-filing-outline:before,.wf-ion-ios-film:before,.wf-ion-ios-film-outline:before,.wf-ion-ios-flag:before,.wf-ion-ios-flag-outline:before,.wf-ion-ios-flame:before,.wf-ion-ios-flame-outline:before,.wf-ion-ios-flask:before,.wf-ion-ios-flask-outline:before,.wf-ion-ios-flower:before,.wf-ion-ios-flower-outline:before,.wf-ion-ios-folder:before,.wf-ion-ios-folder-outline:before,.wf-ion-ios-football:before,.wf-ion-ios-football-outline:before,.wf-ion-ios-game-controller-a:before,.wf-ion-ios-game-controller-a-outline:before,.wf-ion-ios-game-controller-b:before,.wf-ion-ios-game-controller-b-outline:before,.wf-ion-ios-gear:before,.wf-ion-ios-gear-outline:before,.wf-ion-ios-glasses:before,.wf-ion-ios-glasses-outline:before,.wf-ion-ios-grid-view:before,.wf-ion-ios-grid-view-outline:before,.wf-ion-ios-heart:before,.wf-ion-ios-heart-outline:before,.wf-ion-ios-help:before,.wf-ion-ios-help-empty:before,.wf-ion-ios-help-outline:before,.wf-ion-ios-home:before,.wf-ion-ios-home-outline:before,.wf-ion-ios-infinite:before,.wf-ion-ios-infinite-outline:before,.wf-ion-ios-information:before,.wf-ion-ios-information-empty:before,.wf-ion-ios-information-outline:before,.wf-ion-ios-ionic-outline:before,.wf-ion-ios-keypad:before,.wf-ion-ios-keypad-outline:before,.wf-ion-ios-lightbulb:before,.wf-ion-ios-lightbulb-outline:before,.wf-ion-ios-list:before,.wf-ion-ios-list-outline:before,.wf-ion-ios-location:before,.wf-ion-ios-location-outline:before,.wf-ion-ios-locked:before,.wf-ion-ios-locked-outline:before,.wf-ion-ios-loop:before,.wf-ion-ios-loop-strong:before,.wf-ion-ios-medical:before,.wf-ion-ios-medical-outline:before,.wf-ion-ios-medkit:before,.wf-ion-ios-medkit-outline:before,.wf-ion-ios-mic:before,.wf-ion-ios-mic-off:before,.wf-ion-ios-mic-outline:before,.wf-ion-ios-minus:before,.wf-ion-ios-minus-empty:before,.wf-ion-ios-minus-outline:before,.wf-ion-ios-monitor:before,.wf-ion-ios-monitor-outline:before,.wf-ion-ios-moon:before,.wf-ion-ios-moon-outline:before,.wf-ion-ios-more:before,.wf-ion-ios-more-outline:before,.wf-ion-ios-musical-note:before,.wf-ion-ios-musical-notes:before,.wf-ion-ios-navigate:before,.wf-ion-ios-navigate-outline:before,.wf-ion-ios-nutrition:before,.wf-ion-ios-nutrition-outline:before,.wf-ion-ios-paper:before,.wf-ion-ios-paper-outline:before,.wf-ion-ios-paperplane:before,.wf-ion-ios-paperplane-outline:before,.wf-ion-ios-partlysunny:before,.wf-ion-ios-partlysunny-outline:before,.wf-ion-ios-pause:before,.wf-ion-ios-pause-outline:before,.wf-ion-ios-paw:before,.wf-ion-ios-paw-outline:before,.wf-ion-ios-people:before,.wf-ion-ios-people-outline:before,.wf-ion-ios-person:before,.wf-ion-ios-person-outline:before,.wf-ion-ios-personadd:before,.wf-ion-ios-personadd-outline:before,.wf-ion-ios-photos:before,.wf-ion-ios-photos-outline:before,.wf-ion-ios-pie:before,.wf-ion-ios-pie-outline:before,.wf-ion-ios-pint:before,.wf-ion-ios-pint-outline:before,.wf-ion-ios-play:before,.wf-ion-ios-play-outline:before,.wf-ion-ios-plus:before,.wf-ion-ios-plus-empty:before,.wf-ion-ios-plus-outline:before,.wf-ion-ios-pricetag:before,.wf-ion-ios-pricetag-outline:before,.wf-ion-ios-pricetags:before,.wf-ion-ios-pricetags-outline:before,.wf-ion-ios-printer:before,.wf-ion-ios-printer-outline:before,.wf-ion-ios-pulse:before,.wf-ion-ios-pulse-strong:before,.wf-ion-ios-rainy:before,.wf-ion-ios-rainy-outline:before,.wf-ion-ios-recording:before,.wf-ion-ios-recording-outline:before,.wf-ion-ios-redo:before,.wf-ion-ios-redo-outline:before,.wf-ion-ios-refresh:before,.wf-ion-ios-refresh-empty:before,.wf-ion-ios-refresh-outline:before,.wf-ion-ios-reload:before,.wf-ion-ios-reverse-camera:before,.wf-ion-ios-reverse-camera-outline:before,.wf-ion-ios-rewind:before,.wf-ion-ios-rewind-outline:before,.wf-ion-ios-rose:before,.wf-ion-ios-rose-outline:before,.wf-ion-ios-search:before,.wf-ion-ios-search-strong:before,.wf-ion-ios-settings:before,.wf-ion-ios-settings-strong:before,.wf-ion-ios-shuffle:before,.wf-ion-ios-shuffle-strong:before,.wf-ion-ios-skipbackward:before,.wf-ion-ios-skipbackward-outline:before,.wf-ion-ios-skipforward:before,.wf-ion-ios-skipforward-outline:before,.wf-ion-ios-snowy:before,.wf-ion-ios-speedometer:before,.wf-ion-ios-speedometer-outline:before,.wf-ion-ios-star:before,.wf-ion-ios-star-half:before,.wf-ion-ios-star-outline:before,.wf-ion-ios-stopwatch:before,.wf-ion-ios-stopwatch-outline:before,.wf-ion-ios-sunny:before,.wf-ion-ios-sunny-outline:before,.wf-ion-ios-telephone:before,.wf-ion-ios-telephone-outline:before,.wf-ion-ios-tennisball:before,.wf-ion-ios-tennisball-outline:before,.wf-ion-ios-thunderstorm:before,.wf-ion-ios-thunderstorm-outline:before,.wf-ion-ios-time:before,.wf-ion-ios-time-outline:before,.wf-ion-ios-timer:before,.wf-ion-ios-timer-outline:before,.wf-ion-ios-toggle:before,.wf-ion-ios-toggle-outline:before,.wf-ion-ios-trash:before,.wf-ion-ios-trash-outline:before,.wf-ion-ios-undo:before,.wf-ion-ios-undo-outline:before,.wf-ion-ios-unlocked:before,.wf-ion-ios-unlocked-outline:before,.wf-ion-ios-upload:before,.wf-ion-ios-upload-outline:before,.wf-ion-ios-videocam:before,.wf-ion-ios-videocam-outline:before,.wf-ion-ios-volume-high:before,.wf-ion-ios-volume-low:before,.wf-ion-ios-wineglass:before,.wf-ion-ios-wineglass-outline:before,.wf-ion-ios-world:before,.wf-ion-ios-world-outline:before,.wf-ion-ipad:before,.wf-ion-iphone:before,.wf-ion-ipod:before,.wf-ion-jet:before,.wf-ion-key:before,.wf-ion-knife:before,.wf-ion-laptop:before,.wf-ion-leaf:before,.wf-ion-levels:before,.wf-ion-lightbulb:before,.wf-ion-link:before,.wf-ion-load-a:before,.wf-ion-load-b:before,.wf-ion-load-c:before,.wf-ion-load-d:before,.wf-ion-location:before,.wf-ion-lock-combination:before,.wf-ion-locked:before,.wf-ion-log-in:before,.wf-ion-log-out:before,.wf-ion-loop:before,.wf-ion-magnet:before,.wf-ion-male:before,.wf-ion-man:before,.wf-ion-map:before,.wf-ion-medkit:before,.wf-ion-merge:before,.wf-ion-mic-a:before,.wf-ion-mic-b:before,.wf-ion-mic-c:before,.wf-ion-minus:before,.wf-ion-minus-circled:before,.wf-ion-minus-round:before,.wf-ion-model-s:before,.wf-ion-monitor:before,.wf-ion-more:before,.wf-ion-mouse:before,.wf-ion-music-note:before,.wf-ion-navicon:before,.wf-ion-navicon-round:before,.wf-ion-navigate:before,.wf-ion-network:before,.wf-ion-no-smoking:before,.wf-ion-nuclear:before,.wf-ion-outlet:before,.wf-ion-paintbrush:before,.wf-ion-paintbucket:before,.wf-ion-paper-airplane:before,.wf-ion-paperclip:before,.wf-ion-pause:before,.wf-ion-person:before,.wf-ion-person-add:before,.wf-ion-person-stalker:before,.wf-ion-pie-graph:before,.wf-ion-pin:before,.wf-ion-pinpoint:before,.wf-ion-pizza:before,.wf-ion-plane:before,.wf-ion-planet:before,.wf-ion-play:before,.wf-ion-playstation:before,.wf-ion-plus:before,.wf-ion-plus-circled:before,.wf-ion-plus-round:before,.wf-ion-podium:before,.wf-ion-pound:before,.wf-ion-power:before,.wf-ion-pricetag:before,.wf-ion-pricetags:before,.wf-ion-printer:before,.wf-ion-pull-request:before,.wf-ion-qr-scanner:before,.wf-ion-quote:before,.wf-ion-radio-waves:before,.wf-ion-record:before,.wf-ion-refresh:before,.wf-ion-reply:before,.wf-ion-reply-all:before,.wf-ion-ribbon-a:before,.wf-ion-ribbon-b:before,.wf-ion-sad:before,.wf-ion-sad-outline:before,.wf-ion-scissors:before,.wf-ion-search:before,.wf-ion-settings:before,.wf-ion-share:before,.wf-ion-shuffle:before,.wf-ion-skip-backward:before,.wf-ion-skip-forward:before,.wf-ion-social-android:before,.wf-ion-social-android-outline:before,.wf-ion-social-angular:before,.wf-ion-social-angular-outline:before,.wf-ion-social-apple:before,.wf-ion-social-apple-outline:before,.wf-ion-social-bitcoin:before,.wf-ion-social-bitcoin-outline:before,.wf-ion-social-buffer:before,.wf-ion-social-buffer-outline:before,.wf-ion-social-chrome:before,.wf-ion-social-chrome-outline:before,.wf-ion-social-codepen:before,.wf-ion-social-codepen-outline:before,.wf-ion-social-css3:before,.wf-ion-social-css3-outline:before,.wf-ion-social-designernews:before,.wf-ion-social-designernews-outline:before,.wf-ion-social-dribbble:before,.wf-ion-social-dribbble-outline:before,.wf-ion-social-dropbox:before,.wf-ion-social-dropbox-outline:before,.wf-ion-social-euro:before,.wf-ion-social-euro-outline:before,.wf-ion-social-facebook:before,.wf-ion-social-facebook-outline:before,.wf-ion-social-foursquare:before,.wf-ion-social-foursquare-outline:before,.wf-ion-social-freebsd-devil:before,.wf-ion-social-github:before,.wf-ion-social-github-outline:before,.wf-ion-social-google:before,.wf-ion-social-google-outline:before,.wf-ion-social-googleplus:before,.wf-ion-social-googleplus-outline:before,.wf-ion-social-hackernews:before,.wf-ion-social-hackernews-outline:before,.wf-ion-social-html5:before,.wf-ion-social-html5-outline:before,.wf-ion-social-instagram:before,.wf-ion-social-instagram-outline:before,.wf-ion-social-javascript:before,.wf-ion-social-javascript-outline:before,.wf-ion-social-linkedin:before,.wf-ion-social-linkedin-outline:before,.wf-ion-social-markdown:before,.wf-ion-social-nodejs:before,.wf-ion-social-octocat:before,.wf-ion-social-pinterest:before,.wf-ion-social-pinterest-outline:before,.wf-ion-social-python:before,.wf-ion-social-reddit:before,.wf-ion-social-reddit-outline:before,.wf-ion-social-rss:before,.wf-ion-social-rss-outline:before,.wf-ion-social-sass:before,.wf-ion-social-skype:before,.wf-ion-social-skype-outline:before,.wf-ion-social-snapchat:before,.wf-ion-social-snapchat-outline:before,.wf-ion-social-tumblr:before,.wf-ion-social-tumblr-outline:before,.wf-ion-social-tux:before,.wf-ion-social-twitch:before,.wf-ion-social-twitch-outline:before,.wf-ion-social-twitter:before,.wf-ion-social-twitter-outline:before,.wf-ion-social-usd:before,.wf-ion-social-usd-outline:before,.wf-ion-social-vimeo:before,.wf-ion-social-vimeo-outline:before,.wf-ion-social-whatsapp:before,.wf-ion-social-whatsapp-outline:before,.wf-ion-social-windows:before,.wf-ion-social-windows-outline:before,.wf-ion-social-wordpress:before,.wf-ion-social-wordpress-outline:before,.wf-ion-social-yahoo:before,.wf-ion-social-yahoo-outline:before,.wf-ion-social-yen:before,.wf-ion-social-yen-outline:before,.wf-ion-social-youtube:before,.wf-ion-social-youtube-outline:before,.wf-ion-soup-can:before,.wf-ion-soup-can-outline:before,.wf-ion-speakerphone:before,.wf-ion-speedometer:before,.wf-ion-spoon:before,.wf-ion-star:before,.wf-ion-stats-bars:before,.wf-ion-steam:before,.wf-ion-stop:before,.wf-ion-thermometer:before,.wf-ion-thumbsdown:before,.wf-ion-thumbsup:before,.wf-ion-toggle:before,.wf-ion-toggle-filled:before,.wf-ion-transgender:before,.wf-ion-trash-a:before,.wf-ion-trash-b:before,.wf-ion-trophy:before,.wf-ion-tshirt:before,.wf-ion-tshirt-outline:before,.wf-ion-umbrella:before,.wf-ion-university:before,.wf-ion-unlocked:before,.wf-ion-upload:before,.wf-ion-usb:before,.wf-ion-videocamera:before,.wf-ion-volume-high:before,.wf-ion-volume-low:before,.wf-ion-volume-medium:before,.wf-ion-volume-mute:before,.wf-ion-wand:before,.wf-ion-waterdrop:before,.wf-ion-wifi:before,.wf-ion-wineglass:before,.wf-ion-woman:before,.wf-ion-wrench:before,.wf-ion-xbox:before{display:inline-block;font-family:"Ionicons" !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wf-ion-alert:before{content:""}.wf-ion-alert-circled:before{content:""}.wf-ion-android-add:before{content:""}.wf-ion-android-add-circle:before{content:""}.wf-ion-android-alarm-clock:before{content:""}.wf-ion-android-alert:before{content:""}.wf-ion-android-apps:before{content:""}.wf-ion-android-archive:before{content:""}.wf-ion-android-arrow-back:before{content:""}.wf-ion-android-arrow-down:before{content:""}.wf-ion-android-arrow-dropdown:before{content:""}.wf-ion-android-arrow-dropdown-circle:before{content:""}.wf-ion-android-arrow-dropleft:before{content:""}.wf-ion-android-arrow-dropleft-circle:before{content:""}.wf-ion-android-arrow-dropright:before{content:""}.wf-ion-android-arrow-dropright-circle:before{content:""}.wf-ion-android-arrow-dropup:before{content:""}.wf-ion-android-arrow-dropup-circle:before{content:""}.wf-ion-android-arrow-forward:before{content:""}.wf-ion-android-arrow-up:before{content:""}.wf-ion-android-attach:before{content:""}.wf-ion-android-bar:before{content:""}.wf-ion-android-bicycle:before{content:""}.wf-ion-android-boat:before{content:""}.wf-ion-android-bookmark:before{content:""}.wf-ion-android-bulb:before{content:""}.wf-ion-android-bus:before{content:""}.wf-ion-android-calendar:before{content:""}.wf-ion-android-call:before{content:""}.wf-ion-android-camera:before{content:""}.wf-ion-android-cancel:before{content:""}.wf-ion-android-car:before{content:""}.wf-ion-android-cart:before{content:""}.wf-ion-android-chat:before{content:""}.wf-ion-android-checkbox:before{content:""}.wf-ion-android-checkbox-blank:before{content:""}.wf-ion-android-checkbox-outline:before{content:""}.wf-ion-android-checkbox-outline-blank:before{content:""}.wf-ion-android-checkmark-circle:before{content:""}.wf-ion-android-clipboard:before{content:""}.wf-ion-android-close:before{content:""}.wf-ion-android-cloud:before{content:""}.wf-ion-android-cloud-circle:before{content:""}.wf-ion-android-cloud-done:before{content:""}.wf-ion-android-cloud-outline:before{content:""}.wf-ion-android-color-palette:before{content:""}.wf-ion-android-compass:before{content:""}.wf-ion-android-contact:before{content:""}.wf-ion-android-contacts:before{content:""}.wf-ion-android-contract:before{content:""}.wf-ion-android-create:before{content:""}.wf-ion-android-delete:before{content:""}.wf-ion-android-desktop:before{content:""}.wf-ion-android-document:before{content:""}.wf-ion-android-done:before{content:""}.wf-ion-android-done-all:before{content:""}.wf-ion-android-download:before{content:""}.wf-ion-android-drafts:before{content:""}.wf-ion-android-exit:before{content:""}.wf-ion-android-expand:before{content:""}.wf-ion-android-favorite:before{content:""}.wf-ion-android-favorite-outline:before{content:""}.wf-ion-android-film:before{content:""}.wf-ion-android-folder:before{content:""}.wf-ion-android-folder-open:before{content:""}.wf-ion-android-funnel:before{content:""}.wf-ion-android-globe:before{content:""}.wf-ion-android-hand:before{content:""}.wf-ion-android-hangout:before{content:""}.wf-ion-android-happy:before{content:""}.wf-ion-android-home:before{content:""}.wf-ion-android-image:before{content:""}.wf-ion-android-laptop:before{content:""}.wf-ion-android-list:before{content:""}.wf-ion-android-locate:before{content:""}.wf-ion-android-lock:before{content:""}.wf-ion-android-mail:before{content:""}.wf-ion-android-map:before{content:""}.wf-ion-android-menu:before{content:""}.wf-ion-android-microphone:before{content:""}.wf-ion-android-microphone-off:before{content:""}.wf-ion-android-more-horizontal:before{content:""}.wf-ion-android-more-vertical:before{content:""}.wf-ion-android-navigate:before{content:""}.wf-ion-android-notifications:before{content:""}.wf-ion-android-notifications-none:before{content:""}.wf-ion-android-notifications-off:before{content:""}.wf-ion-android-open:before{content:""}.wf-ion-android-options:before{content:""}.wf-ion-android-people:before{content:""}.wf-ion-android-person:before{content:""}.wf-ion-android-person-add:before{content:""}.wf-ion-android-phone-landscape:before{content:""}.wf-ion-android-phone-portrait:before{content:""}.wf-ion-android-pin:before{content:""}.wf-ion-android-plane:before{content:""}.wf-ion-android-playstore:before{content:""}.wf-ion-android-print:before{content:""}.wf-ion-android-radio-button-off:before{content:""}.wf-ion-android-radio-button-on:before{content:""}.wf-ion-android-refresh:before{content:""}.wf-ion-android-remove:before{content:""}.wf-ion-android-remove-circle:before{content:""}.wf-ion-android-restaurant:before{content:""}.wf-ion-android-sad:before{content:""}.wf-ion-android-search:before{content:""}.wf-ion-android-send:before{content:""}.wf-ion-android-settings:before{content:""}.wf-ion-android-share:before{content:""}.wf-ion-android-share-alt:before{content:""}.wf-ion-android-star:before{content:""}.wf-ion-android-star-half:before{content:""}.wf-ion-android-star-outline:before{content:""}.wf-ion-android-stopwatch:before{content:""}.wf-ion-android-subway:before{content:""}.wf-ion-android-sunny:before{content:""}.wf-ion-android-sync:before{content:""}.wf-ion-android-textsms:before{content:""}.wf-ion-android-time:before{content:""}.wf-ion-android-train:before{content:""}.wf-ion-android-unlock:before{content:""}.wf-ion-android-upload:before{content:""}.wf-ion-android-volume-down:before{content:""}.wf-ion-android-volume-mute:before{content:""}.wf-ion-android-volume-off:before{content:""}.wf-ion-android-volume-up:before{content:""}.wf-ion-android-walk:before{content:""}.wf-ion-android-warning:before{content:""}.wf-ion-android-watch:before{content:""}.wf-ion-android-wifi:before{content:""}.wf-ion-aperture:before{content:""}.wf-ion-archive:before{content:""}.wf-ion-arrow-down-a:before{content:""}.wf-ion-arrow-down-b:before{content:""}.wf-ion-arrow-down-c:before{content:""}.wf-ion-arrow-expand:before{content:""}.wf-ion-arrow-graph-down-left:before{content:""}.wf-ion-arrow-graph-down-right:before{content:""}.wf-ion-arrow-graph-up-left:before{content:""}.wf-ion-arrow-graph-up-right:before{content:""}.wf-ion-arrow-left-a:before{content:""}.wf-ion-arrow-left-b:before{content:""}.wf-ion-arrow-left-c:before{content:""}.wf-ion-arrow-move:before{content:""}.wf-ion-arrow-resize:before{content:""}.wf-ion-arrow-return-left:before{content:""}.wf-ion-arrow-return-right:before{content:""}.wf-ion-arrow-right-a:before{content:""}.wf-ion-arrow-right-b:before{content:""}.wf-ion-arrow-right-c:before{content:""}.wf-ion-arrow-shrink:before{content:""}.wf-ion-arrow-swap:before{content:""}.wf-ion-arrow-up-a:before{content:""}.wf-ion-arrow-up-b:before{content:""}.wf-ion-arrow-up-c:before{content:""}.wf-ion-asterisk:before{content:""}.wf-ion-at:before{content:""}.wf-ion-backspace:before{content:""}.wf-ion-backspace-outline:before{content:""}.wf-ion-bag:before{content:""}.wf-ion-battery-charging:before{content:""}.wf-ion-battery-empty:before{content:""}.wf-ion-battery-full:before{content:""}.wf-ion-battery-half:before{content:""}.wf-ion-battery-low:before{content:""}.wf-ion-beaker:before{content:""}.wf-ion-beer:before{content:""}.wf-ion-bluetooth:before{content:""}.wf-ion-bonfire:before{content:""}.wf-ion-bookmark:before{content:""}.wf-ion-bowtie:before{content:""}.wf-ion-briefcase:before{content:""}.wf-ion-bug:before{content:""}.wf-ion-calculator:before{content:""}.wf-ion-calendar:before{content:""}.wf-ion-camera:before{content:""}.wf-ion-card:before{content:""}.wf-ion-cash:before{content:""}.wf-ion-chatbox:before{content:""}.wf-ion-chatbox-working:before{content:""}.wf-ion-chatboxes:before{content:""}.wf-ion-chatbubble:before{content:""}.wf-ion-chatbubble-working:before{content:""}.wf-ion-chatbubbles:before{content:""}.wf-ion-checkmark:before{content:""}.wf-ion-checkmark-circled:before{content:""}.wf-ion-checkmark-round:before{content:""}.wf-ion-chevron-down:before{content:""}.wf-ion-chevron-left:before{content:""}.wf-ion-chevron-right:before{content:""}.wf-ion-chevron-up:before{content:""}.wf-ion-clipboard:before{content:""}.wf-ion-clock:before{content:""}.wf-ion-close:before{content:""}.wf-ion-close-circled:before{content:""}.wf-ion-close-round:before{content:""}.wf-ion-closed-captioning:before{content:""}.wf-ion-cloud:before{content:""}.wf-ion-code:before{content:""}.wf-ion-code-download:before{content:""}.wf-ion-code-working:before{content:""}.wf-ion-coffee:before{content:""}.wf-ion-compass:before{content:""}.wf-ion-compose:before{content:""}.wf-ion-connection-bars:before{content:""}.wf-ion-contrast:before{content:""}.wf-ion-crop:before{content:""}.wf-ion-cube:before{content:""}.wf-ion-disc:before{content:""}.wf-ion-document:before{content:""}.wf-ion-document-text:before{content:""}.wf-ion-drag:before{content:""}.wf-ion-earth:before{content:""}.wf-ion-easel:before{content:""}.wf-ion-edit:before{content:""}.wf-ion-egg:before{content:""}.wf-ion-eject:before{content:""}.wf-ion-email:before{content:""}.wf-ion-email-unread:before{content:""}.wf-ion-erlenmeyer-flask:before{content:""}.wf-ion-erlenmeyer-flask-bubbles:before{content:""}.wf-ion-eye:before{content:""}.wf-ion-eye-disabled:before{content:""}.wf-ion-female:before{content:""}.wf-ion-filing:before{content:""}.wf-ion-film-marker:before{content:""}.wf-ion-fireball:before{content:""}.wf-ion-flag:before{content:""}.wf-ion-flame:before{content:""}.wf-ion-flash:before{content:""}.wf-ion-flash-off:before{content:""}.wf-ion-folder:before{content:""}.wf-ion-fork:before{content:""}.wf-ion-fork-repo:before{content:""}.wf-ion-forward:before{content:""}.wf-ion-funnel:before{content:""}.wf-ion-gear-a:before{content:""}.wf-ion-gear-b:before{content:""}.wf-ion-grid:before{content:""}.wf-ion-hammer:before{content:""}.wf-ion-happy:before{content:""}.wf-ion-happy-outline:before{content:""}.wf-ion-headphone:before{content:""}.wf-ion-heart:before{content:""}.wf-ion-heart-broken:before{content:""}.wf-ion-help:before{content:""}.wf-ion-help-buoy:before{content:""}.wf-ion-help-circled:before{content:""}.wf-ion-home:before{content:""}.wf-ion-icecream:before{content:""}.wf-ion-image:before{content:""}.wf-ion-images:before{content:""}.wf-ion-information:before{content:""}.wf-ion-information-circled:before{content:""}.wf-ion-ionic:before{content:""}.wf-ion-ios-alarm:before{content:""}.wf-ion-ios-alarm-outline:before{content:""}.wf-ion-ios-albums:before{content:""}.wf-ion-ios-albums-outline:before{content:""}.wf-ion-ios-americanfootball:before{content:""}.wf-ion-ios-americanfootball-outline:before{content:""}.wf-ion-ios-analytics:before{content:""}.wf-ion-ios-analytics-outline:before{content:""}.wf-ion-ios-arrow-back:before{content:""}.wf-ion-ios-arrow-down:before{content:""}.wf-ion-ios-arrow-forward:before{content:""}.wf-ion-ios-arrow-left:before{content:""}.wf-ion-ios-arrow-right:before{content:""}.wf-ion-ios-arrow-thin-down:before{content:""}.wf-ion-ios-arrow-thin-left:before{content:""}.wf-ion-ios-arrow-thin-right:before{content:""}.wf-ion-ios-arrow-thin-up:before{content:""}.wf-ion-ios-arrow-up:before{content:""}.wf-ion-ios-at:before{content:""}.wf-ion-ios-at-outline:before{content:""}.wf-ion-ios-barcode:before{content:""}.wf-ion-ios-barcode-outline:before{content:""}.wf-ion-ios-baseball:before{content:""}.wf-ion-ios-baseball-outline:before{content:""}.wf-ion-ios-basketball:before{content:""}.wf-ion-ios-basketball-outline:before{content:""}.wf-ion-ios-bell:before{content:""}.wf-ion-ios-bell-outline:before{content:""}.wf-ion-ios-body:before{content:""}.wf-ion-ios-body-outline:before{content:""}.wf-ion-ios-bolt:before{content:""}.wf-ion-ios-bolt-outline:before{content:""}.wf-ion-ios-book:before{content:""}.wf-ion-ios-book-outline:before{content:""}.wf-ion-ios-bookmarks:before{content:""}.wf-ion-ios-bookmarks-outline:before{content:""}.wf-ion-ios-box:before{content:""}.wf-ion-ios-box-outline:before{content:""}.wf-ion-ios-briefcase:before{content:""}.wf-ion-ios-briefcase-outline:before{content:""}.wf-ion-ios-browsers:before{content:""}.wf-ion-ios-browsers-outline:before{content:""}.wf-ion-ios-calculator:before{content:""}.wf-ion-ios-calculator-outline:before{content:""}.wf-ion-ios-calendar:before{content:""}.wf-ion-ios-calendar-outline:before{content:""}.wf-ion-ios-camera:before{content:""}.wf-ion-ios-camera-outline:before{content:""}.wf-ion-ios-cart:before{content:""}.wf-ion-ios-cart-outline:before{content:""}.wf-ion-ios-chatboxes:before{content:""}.wf-ion-ios-chatboxes-outline:before{content:""}.wf-ion-ios-chatbubble:before{content:""}.wf-ion-ios-chatbubble-outline:before{content:""}.wf-ion-ios-checkmark:before{content:""}.wf-ion-ios-checkmark-empty:before{content:""}.wf-ion-ios-checkmark-outline:before{content:""}.wf-ion-ios-circle-filled:before{content:""}.wf-ion-ios-circle-outline:before{content:""}.wf-ion-ios-clock:before{content:""}.wf-ion-ios-clock-outline:before{content:""}.wf-ion-ios-close:before{content:""}.wf-ion-ios-close-empty:before{content:""}.wf-ion-ios-close-outline:before{content:""}.wf-ion-ios-cloud:before{content:""}.wf-ion-ios-cloud-download:before{content:""}.wf-ion-ios-cloud-download-outline:before{content:""}.wf-ion-ios-cloud-outline:before{content:""}.wf-ion-ios-cloud-upload:before{content:""}.wf-ion-ios-cloud-upload-outline:before{content:""}.wf-ion-ios-cloudy:before{content:""}.wf-ion-ios-cloudy-night:before{content:""}.wf-ion-ios-cloudy-night-outline:before{content:""}.wf-ion-ios-cloudy-outline:before{content:""}.wf-ion-ios-cog:before{content:""}.wf-ion-ios-cog-outline:before{content:""}.wf-ion-ios-color-filter:before{content:""}.wf-ion-ios-color-filter-outline:before{content:""}.wf-ion-ios-color-wand:before{content:""}.wf-ion-ios-color-wand-outline:before{content:""}.wf-ion-ios-compose:before{content:""}.wf-ion-ios-compose-outline:before{content:""}.wf-ion-ios-contact:before{content:""}.wf-ion-ios-contact-outline:before{content:""}.wf-ion-ios-copy:before{content:""}.wf-ion-ios-copy-outline:before{content:""}.wf-ion-ios-crop:before{content:""}.wf-ion-ios-crop-strong:before{content:""}.wf-ion-ios-download:before{content:""}.wf-ion-ios-download-outline:before{content:""}.wf-ion-ios-drag:before{content:""}.wf-ion-ios-email:before{content:""}.wf-ion-ios-email-outline:before{content:""}.wf-ion-ios-eye:before{content:""}.wf-ion-ios-eye-outline:before{content:""}.wf-ion-ios-fastforward:before{content:""}.wf-ion-ios-fastforward-outline:before{content:""}.wf-ion-ios-filing:before{content:""}.wf-ion-ios-filing-outline:before{content:""}.wf-ion-ios-film:before{content:""}.wf-ion-ios-film-outline:before{content:""}.wf-ion-ios-flag:before{content:""}.wf-ion-ios-flag-outline:before{content:""}.wf-ion-ios-flame:before{content:""}.wf-ion-ios-flame-outline:before{content:""}.wf-ion-ios-flask:before{content:""}.wf-ion-ios-flask-outline:before{content:""}.wf-ion-ios-flower:before{content:""}.wf-ion-ios-flower-outline:before{content:""}.wf-ion-ios-folder:before{content:""}.wf-ion-ios-folder-outline:before{content:""}.wf-ion-ios-football:before{content:""}.wf-ion-ios-football-outline:before{content:""}.wf-ion-ios-game-controller-a:before{content:""}.wf-ion-ios-game-controller-a-outline:before{content:""}.wf-ion-ios-game-controller-b:before{content:""}.wf-ion-ios-game-controller-b-outline:before{content:""}.wf-ion-ios-gear:before{content:""}.wf-ion-ios-gear-outline:before{content:""}.wf-ion-ios-glasses:before{content:""}.wf-ion-ios-glasses-outline:before{content:""}.wf-ion-ios-grid-view:before{content:""}.wf-ion-ios-grid-view-outline:before{content:""}.wf-ion-ios-heart:before{content:""}.wf-ion-ios-heart-outline:before{content:""}.wf-ion-ios-help:before{content:""}.wf-ion-ios-help-empty:before{content:""}.wf-ion-ios-help-outline:before{content:""}.wf-ion-ios-home:before{content:""}.wf-ion-ios-home-outline:before{content:""}.wf-ion-ios-infinite:before{content:""}.wf-ion-ios-infinite-outline:before{content:""}.wf-ion-ios-information:before{content:""}.wf-ion-ios-information-empty:before{content:""}.wf-ion-ios-information-outline:before{content:""}.wf-ion-ios-ionic-outline:before{content:""}.wf-ion-ios-keypad:before{content:""}.wf-ion-ios-keypad-outline:before{content:""}.wf-ion-ios-lightbulb:before{content:""}.wf-ion-ios-lightbulb-outline:before{content:""}.wf-ion-ios-list:before{content:""}.wf-ion-ios-list-outline:before{content:""}.wf-ion-ios-location:before{content:""}.wf-ion-ios-location-outline:before{content:""}.wf-ion-ios-locked:before{content:""}.wf-ion-ios-locked-outline:before{content:""}.wf-ion-ios-loop:before{content:""}.wf-ion-ios-loop-strong:before{content:""}.wf-ion-ios-medical:before{content:""}.wf-ion-ios-medical-outline:before{content:""}.wf-ion-ios-medkit:before{content:""}.wf-ion-ios-medkit-outline:before{content:""}.wf-ion-ios-mic:before{content:""}.wf-ion-ios-mic-off:before{content:""}.wf-ion-ios-mic-outline:before{content:""}.wf-ion-ios-minus:before{content:""}.wf-ion-ios-minus-empty:before{content:""}.wf-ion-ios-minus-outline:before{content:""}.wf-ion-ios-monitor:before{content:""}.wf-ion-ios-monitor-outline:before{content:""}.wf-ion-ios-moon:before{content:""}.wf-ion-ios-moon-outline:before{content:""}.wf-ion-ios-more:before{content:""}.wf-ion-ios-more-outline:before{content:""}.wf-ion-ios-musical-note:before{content:""}.wf-ion-ios-musical-notes:before{content:""}.wf-ion-ios-navigate:before{content:""}.wf-ion-ios-navigate-outline:before{content:""}.wf-ion-ios-nutrition:before{content:""}.wf-ion-ios-nutrition-outline:before{content:""}.wf-ion-ios-paper:before{content:""}.wf-ion-ios-paper-outline:before{content:""}.wf-ion-ios-paperplane:before{content:""}.wf-ion-ios-paperplane-outline:before{content:""}.wf-ion-ios-partlysunny:before{content:""}.wf-ion-ios-partlysunny-outline:before{content:""}.wf-ion-ios-pause:before{content:""}.wf-ion-ios-pause-outline:before{content:""}.wf-ion-ios-paw:before{content:""}.wf-ion-ios-paw-outline:before{content:""}.wf-ion-ios-people:before{content:""}.wf-ion-ios-people-outline:before{content:""}.wf-ion-ios-person:before{content:""}.wf-ion-ios-person-outline:before{content:""}.wf-ion-ios-personadd:before{content:""}.wf-ion-ios-personadd-outline:before{content:""}.wf-ion-ios-photos:before{content:""}.wf-ion-ios-photos-outline:before{content:""}.wf-ion-ios-pie:before{content:""}.wf-ion-ios-pie-outline:before{content:""}.wf-ion-ios-pint:before{content:""}.wf-ion-ios-pint-outline:before{content:""}.wf-ion-ios-play:before{content:""}.wf-ion-ios-play-outline:before{content:""}.wf-ion-ios-plus:before{content:""}.wf-ion-ios-plus-empty:before{content:""}.wf-ion-ios-plus-outline:before{content:""}.wf-ion-ios-pricetag:before{content:""}.wf-ion-ios-pricetag-outline:before{content:""}.wf-ion-ios-pricetags:before{content:""}.wf-ion-ios-pricetags-outline:before{content:""}.wf-ion-ios-printer:before{content:""}.wf-ion-ios-printer-outline:before{content:""}.wf-ion-ios-pulse:before{content:""}.wf-ion-ios-pulse-strong:before{content:""}.wf-ion-ios-rainy:before{content:""}.wf-ion-ios-rainy-outline:before{content:""}.wf-ion-ios-recording:before{content:""}.wf-ion-ios-recording-outline:before{content:""}.wf-ion-ios-redo:before{content:""}.wf-ion-ios-redo-outline:before{content:""}.wf-ion-ios-refresh:before{content:""}.wf-ion-ios-refresh-empty:before{content:""}.wf-ion-ios-refresh-outline:before{content:""}.wf-ion-ios-reload:before{content:""}.wf-ion-ios-reverse-camera:before{content:""}.wf-ion-ios-reverse-camera-outline:before{content:""}.wf-ion-ios-rewind:before{content:""}.wf-ion-ios-rewind-outline:before{content:""}.wf-ion-ios-rose:before{content:""}.wf-ion-ios-rose-outline:before{content:""}.wf-ion-ios-search:before{content:""}.wf-ion-ios-search-strong:before{content:""}.wf-ion-ios-settings:before{content:""}.wf-ion-ios-settings-strong:before{content:""}.wf-ion-ios-shuffle:before{content:""}.wf-ion-ios-shuffle-strong:before{content:""}.wf-ion-ios-skipbackward:before{content:""}.wf-ion-ios-skipbackward-outline:before{content:""}.wf-ion-ios-skipforward:before{content:""}.wf-ion-ios-skipforward-outline:before{content:""}.wf-ion-ios-snowy:before{content:""}.wf-ion-ios-speedometer:before{content:""}.wf-ion-ios-speedometer-outline:before{content:""}.wf-ion-ios-star:before{content:""}.wf-ion-ios-star-half:before{content:""}.wf-ion-ios-star-outline:before{content:""}.wf-ion-ios-stopwatch:before{content:""}.wf-ion-ios-stopwatch-outline:before{content:""}.wf-ion-ios-sunny:before{content:""}.wf-ion-ios-sunny-outline:before{content:""}.wf-ion-ios-telephone:before{content:""}.wf-ion-ios-telephone-outline:before{content:""}.wf-ion-ios-tennisball:before{content:""}.wf-ion-ios-tennisball-outline:before{content:""}.wf-ion-ios-thunderstorm:before{content:""}.wf-ion-ios-thunderstorm-outline:before{content:""}.wf-ion-ios-time:before{content:""}.wf-ion-ios-time-outline:before{content:""}.wf-ion-ios-timer:before{content:""}.wf-ion-ios-timer-outline:before{content:""}.wf-ion-ios-toggle:before{content:""}.wf-ion-ios-toggle-outline:before{content:""}.wf-ion-ios-trash:before{content:""}.wf-ion-ios-trash-outline:before{content:""}.wf-ion-ios-undo:before{content:""}.wf-ion-ios-undo-outline:before{content:""}.wf-ion-ios-unlocked:before{content:""}.wf-ion-ios-unlocked-outline:before{content:""}.wf-ion-ios-upload:before{content:""}.wf-ion-ios-upload-outline:before{content:""}.wf-ion-ios-videocam:before{content:""}.wf-ion-ios-videocam-outline:before{content:""}.wf-ion-ios-volume-high:before{content:""}.wf-ion-ios-volume-low:before{content:""}.wf-ion-ios-wineglass:before{content:""}.wf-ion-ios-wineglass-outline:before{content:""}.wf-ion-ios-world:before{content:""}.wf-ion-ios-world-outline:before{content:""}.wf-ion-ipad:before{content:""}.wf-ion-iphone:before{content:""}.wf-ion-ipod:before{content:""}.wf-ion-jet:before{content:""}.wf-ion-key:before{content:""}.wf-ion-knife:before{content:""}.wf-ion-laptop:before{content:""}.wf-ion-leaf:before{content:""}.wf-ion-levels:before{content:""}.wf-ion-lightbulb:before{content:""}.wf-ion-link:before{content:""}.wf-ion-load-a:before{content:""}.wf-ion-load-b:before{content:""}.wf-ion-load-c:before{content:""}.wf-ion-load-d:before{content:""}.wf-ion-location:before{content:""}.wf-ion-lock-combination:before{content:""}.wf-ion-locked:before{content:""}.wf-ion-log-in:before{content:""}.wf-ion-log-out:before{content:""}.wf-ion-loop:before{content:""}.wf-ion-magnet:before{content:""}.wf-ion-male:before{content:""}.wf-ion-man:before{content:""}.wf-ion-map:before{content:""}.wf-ion-medkit:before{content:""}.wf-ion-merge:before{content:""}.wf-ion-mic-a:before{content:""}.wf-ion-mic-b:before{content:""}.wf-ion-mic-c:before{content:""}.wf-ion-minus:before{content:""}.wf-ion-minus-circled:before{content:""}.wf-ion-minus-round:before{content:""}.wf-ion-model-s:before{content:""}.wf-ion-monitor:before{content:""}.wf-ion-more:before{content:""}.wf-ion-mouse:before{content:""}.wf-ion-music-note:before{content:""}.wf-ion-navicon:before{content:""}.wf-ion-navicon-round:before{content:""}.wf-ion-navigate:before{content:""}.wf-ion-network:before{content:""}.wf-ion-no-smoking:before{content:""}.wf-ion-nuclear:before{content:""}.wf-ion-outlet:before{content:""}.wf-ion-paintbrush:before{content:""}.wf-ion-paintbucket:before{content:""}.wf-ion-paper-airplane:before{content:""}.wf-ion-paperclip:before{content:""}.wf-ion-pause:before{content:""}.wf-ion-person:before{content:""}.wf-ion-person-add:before{content:""}.wf-ion-person-stalker:before{content:""}.wf-ion-pie-graph:before{content:""}.wf-ion-pin:before{content:""}.wf-ion-pinpoint:before{content:""}.wf-ion-pizza:before{content:""}.wf-ion-plane:before{content:""}.wf-ion-planet:before{content:""}.wf-ion-play:before{content:""}.wf-ion-playstation:before{content:""}.wf-ion-plus:before{content:""}.wf-ion-plus-circled:before{content:""}.wf-ion-plus-round:before{content:""}.wf-ion-podium:before{content:""}.wf-ion-pound:before{content:""}.wf-ion-power:before{content:""}.wf-ion-pricetag:before{content:""}.wf-ion-pricetags:before{content:""}.wf-ion-printer:before{content:""}.wf-ion-pull-request:before{content:""}.wf-ion-qr-scanner:before{content:""}.wf-ion-quote:before{content:""}.wf-ion-radio-waves:before{content:""}.wf-ion-record:before{content:""}.wf-ion-refresh:before{content:""}.wf-ion-reply:before{content:""}.wf-ion-reply-all:before{content:""}.wf-ion-ribbon-a:before{content:""}.wf-ion-ribbon-b:before{content:""}.wf-ion-sad:before{content:""}.wf-ion-sad-outline:before{content:""}.wf-ion-scissors:before{content:""}.wf-ion-search:before{content:""}.wf-ion-settings:before{content:""}.wf-ion-share:before{content:""}.wf-ion-shuffle:before{content:""}.wf-ion-skip-backward:before{content:""}.wf-ion-skip-forward:before{content:""}.wf-ion-social-android:before{content:""}.wf-ion-social-android-outline:before{content:""}.wf-ion-social-angular:before{content:""}.wf-ion-social-angular-outline:before{content:""}.wf-ion-social-apple:before{content:""}.wf-ion-social-apple-outline:before{content:""}.wf-ion-social-bitcoin:before{content:""}.wf-ion-social-bitcoin-outline:before{content:""}.wf-ion-social-buffer:before{content:""}.wf-ion-social-buffer-outline:before{content:""}.wf-ion-social-chrome:before{content:""}.wf-ion-social-chrome-outline:before{content:""}.wf-ion-social-codepen:before{content:""}.wf-ion-social-codepen-outline:before{content:""}.wf-ion-social-css3:before{content:""}.wf-ion-social-css3-outline:before{content:""}.wf-ion-social-designernews:before{content:""}.wf-ion-social-designernews-outline:before{content:""}.wf-ion-social-dribbble:before{content:""}.wf-ion-social-dribbble-outline:before{content:""}.wf-ion-social-dropbox:before{content:""}.wf-ion-social-dropbox-outline:before{content:""}.wf-ion-social-euro:before{content:""}.wf-ion-social-euro-outline:before{content:""}.wf-ion-social-facebook:before{content:""}.wf-ion-social-facebook-outline:before{content:""}.wf-ion-social-foursquare:before{content:""}.wf-ion-social-foursquare-outline:before{content:""}.wf-ion-social-freebsd-devil:before{content:""}.wf-ion-social-github:before{content:""}.wf-ion-social-github-outline:before{content:""}.wf-ion-social-google:before{content:""}.wf-ion-social-google-outline:before{content:""}.wf-ion-social-googleplus:before{content:""}.wf-ion-social-googleplus-outline:before{content:""}.wf-ion-social-hackernews:before{content:""}.wf-ion-social-hackernews-outline:before{content:""}.wf-ion-social-html5:before{content:""}.wf-ion-social-html5-outline:before{content:""}.wf-ion-social-instagram:before{content:""}.wf-ion-social-instagram-outline:before{content:""}.wf-ion-social-javascript:before{content:""}.wf-ion-social-javascript-outline:before{content:""}.wf-ion-social-linkedin:before{content:""}.wf-ion-social-linkedin-outline:before{content:""}.wf-ion-social-markdown:before{content:""}.wf-ion-social-nodejs:before{content:""}.wf-ion-social-octocat:before{content:""}.wf-ion-social-pinterest:before{content:""}.wf-ion-social-pinterest-outline:before{content:""}.wf-ion-social-python:before{content:""}.wf-ion-social-reddit:before{content:""}.wf-ion-social-reddit-outline:before{content:""}.wf-ion-social-rss:before{content:""}.wf-ion-social-rss-outline:before{content:""}.wf-ion-social-sass:before{content:""}.wf-ion-social-skype:before{content:""}.wf-ion-social-skype-outline:before{content:""}.wf-ion-social-snapchat:before{content:""}.wf-ion-social-snapchat-outline:before{content:""}.wf-ion-social-tumblr:before{content:""}.wf-ion-social-tumblr-outline:before{content:""}.wf-ion-social-tux:before{content:""}.wf-ion-social-twitch:before{content:""}.wf-ion-social-twitch-outline:before{content:""}.wf-ion-social-twitter:before{content:""}.wf-ion-social-twitter-outline:before{content:""}.wf-ion-social-usd:before{content:""}.wf-ion-social-usd-outline:before{content:""}.wf-ion-social-vimeo:before{content:""}.wf-ion-social-vimeo-outline:before{content:""}.wf-ion-social-whatsapp:before{content:""}.wf-ion-social-whatsapp-outline:before{content:""}.wf-ion-social-windows:before{content:""}.wf-ion-social-windows-outline:before{content:""}.wf-ion-social-wordpress:before{content:""}.wf-ion-social-wordpress-outline:before{content:""}.wf-ion-social-yahoo:before{content:""}.wf-ion-social-yahoo-outline:before{content:""}.wf-ion-social-yen:before{content:""}.wf-ion-social-yen-outline:before{content:""}.wf-ion-social-youtube:before{content:""}.wf-ion-social-youtube-outline:before{content:""}.wf-ion-soup-can:before{content:""}.wf-ion-soup-can-outline:before{content:""}.wf-ion-speakerphone:before{content:""}.wf-ion-speedometer:before{content:""}.wf-ion-spoon:before{content:""}.wf-ion-star:before{content:""}.wf-ion-stats-bars:before{content:""}.wf-ion-steam:before{content:""}.wf-ion-stop:before{content:""}.wf-ion-thermometer:before{content:""}.wf-ion-thumbsdown:before{content:""}.wf-ion-thumbsup:before{content:""}.wf-ion-toggle:before{content:""}.wf-ion-toggle-filled:before{content:""}.wf-ion-transgender:before{content:""}.wf-ion-trash-a:before{content:""}.wf-ion-trash-b:before{content:""}.wf-ion-trophy:before{content:""}.wf-ion-tshirt:before{content:""}.wf-ion-tshirt-outline:before{content:""}.wf-ion-umbrella:before{content:""}.wf-ion-university:before{content:""}.wf-ion-unlocked:before{content:""}.wf-ion-upload:before{content:""}.wf-ion-usb:before{content:""}.wf-ion-videocamera:before{content:""}.wf-ion-volume-high:before{content:""}.wf-ion-volume-low:before{content:""}.wf-ion-volume-medium:before{content:""}.wf-ion-volume-mute:before{content:""}.wf-ion-wand:before{content:""}.wf-ion-waterdrop:before{content:""}.wf-ion-wifi:before{content:""}.wf-ion-wineglass:before{content:""}.wf-ion-woman:before{content:""}.wf-ion-wrench:before{content:""}.wf-ion-xbox:before{content:""} diff --git a/wp/wp-content/plugins/wordfence/css/wf-onboarding.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-onboarding.1704213472.css deleted file mode 100644 index 22d83d01..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-onboarding.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}.wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-switch>li.wf-active{color:#ffffff;background-color:#00709e}#wordfenceWorking{padding:10px 40px 6px 16px;z-index:100000;position:fixed;right:16px;bottom:0px;background-color:#fcb214;border:5px solid #fcb214;border-width:6px 15px 6px 6px;color:#525355;font-size:12px;font-weight:bold;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;background-image:url("../images/icons/working-indicator.gif");background-position:100% 50%;background-repeat:no-repeat}@media (max-width: 960px){#wordfenceWorking{left:auto;right:0px}}.wf-padding-add-left{padding-left:1rem !important}.wf-padding-add-left-small{padding-left:0.5rem !important}.wf-padding-add-left-large{padding-left:1.5rem !important}.wf-onboarding-flex-horizontal{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important}.wf-onboarding-flex-horizontal>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-onboarding-flex-horizontal.wf-onboarding-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-onboarding-flex-horizontal.wf-onboarding-flex-align-right{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.wf-onboarding-flex-horizontal.wf-onboarding-full-width{width:100%}.wf-onboarding-flex-horizontal>li{padding:0;margin:0}#wf-onboarding-plugin-overlay{position:absolute;top:0px;right:0px;bottom:0px;left:160px;background-color:rgba(241,241,241,0.9);z-index:9980;padding:5rem 0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}#wf-onboarding-tour-overlay{position:absolute;top:0px;right:0px;bottom:0px;left:160px;background-color:rgba(0,0,0,0.3);z-index:9980;padding:5rem 0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}.folded #wf-onboarding-plugin-overlay,.folded #wf-onboarding-tour-overlay{left:36px}@media only screen and (max-width: 960px){.auto-fold #wf-onboarding-plugin-overlay,.auto-fold #wf-onboarding-tour-overlay{left:36px}}.rtl #wf-onboarding-plugin-overlay,.rtl #wf-onboarding-tour-overlay{right:160px;left:0px}.rtl .folded #wf-onboarding-plugin-overlay,.rtl .folded #wf-onboarding-tour-overlay{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold #wf-onboarding-plugin-overlay,.rtl .auto-fold #wf-onboarding-tour-overlay{right:36px}}@media screen and (max-width: 782px){#wf-onboarding-plugin-overlay,.folded #wf-onboarding-plugin-overlay,.auto-fold #wf-onboarding-plugin-overlay,.rtl #wf-onboarding-plugin-overlay,.rtl .folded #wf-onboarding-plugin-overlay,.rtl .auto-fold #wf-onboarding-plugin-overlay,#wf-onboarding-tour-overlay,.folded #wf-onboarding-tour-overlay,.auto-fold #wf-onboarding-tour-overlay,.rtl #wf-onboarding-tour-overlay,.rtl .folded #wf-onboarding-tour-overlay,.rtl .auto-fold #wf-onboarding-tour-overlay{left:0px;right:0px}}#wf-onboarding-dismiss{width:44px;height:44px;display:block;position:absolute;right:0px;top:0px;text-align:center;line-height:44px;font-size:1.35rem;color:#9f9fa0;text-decoration:none;z-index:9981}.wf-onboarding-btn{display:inline-block;margin-bottom:0;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:.5rem 1.25rem;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.3125rem;border-radius:4px;font-weight:400;text-transform:uppercase;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.wf-onboarding-btn:focus,.wf-onboarding-btn.wf-focus,.wf-onboarding-btn:active:focus,.wf-onboarding-btn:active.wf-focus,.wf-onboarding-btn.wf-active:focus,.wf-onboarding-btn.wf-active.wf-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wf-onboarding-btn:hover,.wf-onboarding-btn:focus,.wf-onboarding-btn.wf-focus{text-decoration:none}.wf-onboarding-btn:active,.wf-onboarding-btn.wf-active{outline:0;background-image:none;-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-onboarding-btn.wf-disabled,.wf-onboarding-btn[disabled],.wf-onboarding-btn[readonly],fieldset[disabled] .wf-onboarding-btn{cursor:not-allowed;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:.65;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.wf-onboarding-btn.wf-onboarding-btn-primary{color:#fff;border-color:#005e85}.wf-onboarding-btn.wf-onboarding-btn-primary:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.focus{color:#fff;border-color:#000405}.wf-onboarding-btn.wf-onboarding-btn-primary:hover{color:#fff;border-color:#003347}.wf-onboarding-btn.wf-onboarding-btn-primary:active,.wf-onboarding-btn.wf-onboarding-btn-primary.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle{color:#fff;border-color:#003347}.wf-onboarding-btn.wf-onboarding-btn-primary:active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary:active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary:active.focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.active:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle.focus{color:#fff;border-color:#000405}.wf-onboarding-btn.wf-onboarding-btn-primary:active,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-primary.wf-dropdown-toggle{background-image:none}.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-primary.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-primary[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-primary.wf-focus{border-color:#005e85}.wf-onboarding-btn.wf-onboarding-btn-primary .wf-badge{background-color:#fff}.wf-onboarding-btn.wf-onboarding-btn-default{background-color:#fff}.wf-onboarding-btn.wf-onboarding-btn-default:focus,.wf-onboarding-btn.wf-onboarding-btn-default.focus{background-color:#e6e6e6}.wf-onboarding-btn.wf-onboarding-btn-default:hover{background-color:#e6e6e6}.wf-onboarding-btn.wf-onboarding-btn-default:active,.wf-onboarding-btn.wf-onboarding-btn-default.active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{background-color:#e6e6e6}.wf-onboarding-btn.wf-onboarding-btn-default:active:hover,.wf-onboarding-btn.wf-onboarding-btn-default:active:focus,.wf-onboarding-btn.wf-onboarding-btn-default:active.focus,.wf-onboarding-btn.wf-onboarding-btn-default.active:hover,.wf-onboarding-btn.wf-onboarding-btn-default.active:focus,.wf-onboarding-btn.wf-onboarding-btn-default.active.focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle.focus{background-color:#d4d4d4}.wf-onboarding-btn.wf-onboarding-btn-default:active,.wf-onboarding-btn.wf-onboarding-btn-default.wf-active,.wf-open>.wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{background-image:none}.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:hover,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:focus,.wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled.wf-focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:hover,.wf-onboarding-btn.wf-onboarding-btn-default[disabled]:focus,.wf-onboarding-btn.wf-onboarding-btn-default[disabled].wf-focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:hover,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default:focus,fieldset[disabled] .wf-onboarding-btn.wf-onboarding-btn-default.wf-focus{background-color:#fff}.wf-onboarding-btn.wf-onboarding-btn-default .wf-badge{color:#fff}a.wf-onboarding-btn{text-decoration:none}a.wf-onboarding-btn.wf-disabled,fieldset[disabled] a.wf-onboarding-btn{pointer-events:none}.wf-onboarding-modal{background-color:#ffffff;z-index:9981;width:280px;padding:2rem}@media (min-width: 768px){.wf-onboarding-modal{width:450px}}@media (min-width: 992px){.wf-onboarding-modal{width:650px}}@media (min-width: 1200px){.wf-onboarding-modal{width:850px}}.wf-onboarding-modal>.wf-onboarding-modal-content{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-onboarding-modal .wf-onboarding-logo{text-align:center;padding-bottom:1rem}.wf-onboarding-modal .wf-onboarding-logo>img{max-width:350px}.wf-onboarding-modal h1,.wf-onboarding-modal h2,.wf-onboarding-modal h3,.wf-onboarding-modal h4,.wf-onboarding-modal h5,.wf-onboarding-modal h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:700;text-align:center;margin:0;padding:0.25rem 0}.wf-onboarding-modal h2{font-size:1.3125rem;line-height:1.5rem}.wf-onboarding-modal h3,.wf-onboarding-modal h4{font-size:1.15em}.wf-onboarding-modal p{text-align:center}.wf-onboarding-modal #wf-onboarding-alerts{margin:1.5rem auto 0.5rem auto}.wf-onboarding-modal #wf-onboarding-alerts-disclaimer{max-width:700px;font-size:0.65rem;margin:0 auto 1rem auto}.wf-onboarding-modal #wf-onboarding-license{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;width:100%;margin:1rem auto 1rem auto}.wf-onboarding-modal #wf-onboarding-license>input{margin-right:1rem}.wf-onboarding-modal #wf-onboarding-or{position:relative;font-size:12px;font-weight:400;text-align:center;line-height:30px;background:#ffffff;text-transform:uppercase;width:100%;max-width:800px;margin:0 auto}.wf-onboarding-modal #wf-onboarding-or:before{display:inline-block;content:"";position:absolute;height:1px;background:#e2e2e2;top:50%;width:100%;left:0;right:0}.wf-onboarding-modal #wf-onboarding-or>span{display:inline-block;position:relative;padding:0 0.75rem;background-color:#ffffff}.wf-onboarding-modal #wf-onboarding-subscribe,.wf-onboarding-modal #wf-onboarding2-subscribe{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0 auto;max-width:700px}.wf-onboarding-modal #wf-onboarding-subscribe>label,.wf-onboarding-modal #wf-onboarding2-subscribe>label{padding-right:1rem}.wf-onboarding-modal #wf-onboarding-subscribe-controls,.wf-onboarding-modal #wf-onboarding2-subscribe-controls{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-onboarding-modal #wf-onboarding-subscribe-controls>p,.wf-onboarding-modal #wf-onboarding2-subscribe-controls>p{display:none;margin:0;font-size:0.65rem}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li:first-of-type,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li:last-of-type,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-onboarding-modal #wf-onboarding-subscribe .wf-switch>li.wf-active,.wf-onboarding-modal #wf-onboarding2-subscribe .wf-switch>li.wf-active{color:#ffffff}.wf-onboarding-modal [type=checkbox].wf-option-checkbox+label:before{content:"";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:30px !important;font-weight:normal !important}.wf-onboarding-modal [type=radio].wf-option-radio+label:before{content:"";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:30px !important;font-weight:normal !important}.wf-onboarding-modal [type=checkbox].wf-option-checkbox+label,.wf-onboarding-modal [type=radio].wf-option-radio+label{font-size:0.75rem !important}.wf-onboarding-modal [type=checkbox].wf-option-checkbox.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:20px !important}.wf-onboarding-modal [type=radio].wf-option-radio.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:21px !important;font-size:20px !important}.wf-onboarding-modal [type=checkbox].wf-option-checkbox+label:before,.wf-onboarding-modal [type=radio].wf-option-radio+label:before{line-height:1 !important;text-align:center !important;text-indent:2px;display:inline-block;vertical-align:-6px;margin:0px 0.75rem 0px 0px;font-weight:normal;font-style:normal}.wf-onboarding-modal [type=checkbox].wf-option-checkbox.wf-small+label:before,.wf-onboarding-modal [type=radio].wf-option-radio.wf-small+label:before{text-indent:0px;vertical-align:-3px}.wf-onboarding-modal [type=checkbox].wf-option-checkbox:checked+label:before,.wf-onboarding-modal [type=radio].wf-option-radio:checked+label:before{color:#fff !important}.wf-onboarding-modal .wf-option-checkbox[type=checkbox],.wf-onboarding-modal .wf-option-checkbox[type=radio],.wf-onboarding-modal .wf-option-radio[type=checkbox],.wf-onboarding-modal .wf-option-radio[type=radio]{position:absolute;left:-9999px}.wf-onboarding-modal #wf-onboarding-footer{margin:1.5rem auto 0 auto;border-top:1px solid #e2e2e2;padding-top:1.5rem;width:100%;max-width:800px}.wf-onboarding-modal #wf-onboarding-footer>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;width:100%;max-width:700px;margin:0 auto;padding:0}.wf-onboarding-modal #wf-onboarding-footer>ul>li{margin:0;padding:0}.wf-onboarding-modal #wf-onboarding-footer>ul>*:last-child{-webkit-flex-grow:1;flex-grow:1;text-align:right}.wf-onboarding-modal #wf-onboarding-license-footer{margin:0 auto;max-width:800px}.wf-onboarding-modal #wf-onboarding-license-footer>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;margin:0 auto;padding:0}.wf-onboarding-modal #wf-onboarding-license-footer>ul>li{margin:0;padding:0 0.5rem}#wf-onboarding-plugin-header{margin-bottom:1rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;color:#ffffff;padding:1rem 2rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header #wf-onboarding-plugin-header-dismiss{font-size:1.35rem;color:#ffffff;text-decoration:none}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header #wf-onboarding-plugin-header-dismiss:hover{color:#f1f1f1}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-header>*:last-child{-webkit-flex-grow:1;flex-grow:1;text-align:right}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content{background-color:#ffffff}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul>li{margin:0;padding:0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage{border-right:1px solid #f1f1f1}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul>li{border-left:4px solid #ffffff;border-bottom:1px solid #f1f1f1;font-weight:normal;margin:0;padding:1rem 1rem 1rem 2rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul>li.wf-active{font-weight:600}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul>li{margin:0;padding:0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label>ul>*:last-child{visibility:hidden;-webkit-flex-grow:1;flex-grow:1;padding-left:1rem;text-align:right;font-size:1.5rem;font-weight:600}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage>ul .wf-onboarding-plugin-header-stage-label.wf-complete>ul>*:last-child{visibility:visible}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-plugin-header-stage-content{padding:1rem 2rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h1,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h2,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h3,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h4,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h5,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:600;text-align:left;margin:0;padding:0.25rem 0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h2{font-size:1.3125rem;line-height:1.5rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h3,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul h4{font-size:1.15em}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-alerts-disclaimer{font-size:0.65rem;margin:0 0 1rem 0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding-subscribe{text-align:center}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding2-license{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;margin:1rem auto 1rem auto}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-content>ul #wf-onboarding2-license>input{margin-right:1rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer{background-color:#525355;color:#ffffff;padding:0.5rem 2rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul>li{margin:0;padding:0 0 0 1rem}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul a{color:#ffffff}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul a.wf-onboarding-btn-default{color:#525355}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default{color:#ffffff;background-color:#9f9fa0;border-color:#929293}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.focus{color:#ffffff;background-color:#858587;border-color:#535353}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:hover{color:#ffffff;background-color:#858587;border-color:#747475}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:active,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.active,.wf-open>#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{color:#ffffff;background-color:#858587;border-color:#747475}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:active:hover,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:active:focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:active.focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.active:hover,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.active:focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.active.focus,.wf-open>#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:hover,.wf-open>#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle:focus,.wf-open>#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle.focus{color:#ffffff;background-color:#747475;border-color:#535353}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:active,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-active,.wf-open>#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-dropdown-toggle{background-image:none}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:hover,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled:focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-disabled.wf-focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default[disabled]:hover,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default[disabled]:focus,#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default[disabled].wf-focus,fieldset[disabled] #wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:hover,fieldset[disabled] #wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default:focus,fieldset[disabled] #wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default.wf-focus{background-color:#9f9fa0;border-color:#929293}#wf-onboarding-plugin-header #wf-onboarding-plugin-header-footer>ul .wf-onboarding-btn.wf-onboarding-btn-default .wf-badge{color:#9f9fa0;background-color:#ffffff}#wf-onboarding-plugin-header #wf-onboarding-subscribe,#wf-onboarding-plugin-header #wf-onboarding2-subscribe{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;-webkit-flex-direction:row !important;flex-direction:row !important}#wf-onboarding-plugin-header #wf-onboarding-subscribe>label,#wf-onboarding-plugin-header #wf-onboarding2-subscribe>label{padding-right:1rem}#wf-onboarding-plugin-header #wf-onboarding-subscribe-controls,#wf-onboarding-plugin-header #wf-onboarding2-subscribe-controls{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;-webkit-flex-direction:column !important;flex-direction:column !important}#wf-onboarding-plugin-header #wf-onboarding-subscribe-controls>p,#wf-onboarding-plugin-header #wf-onboarding2-subscribe-controls>p{display:none;margin:0;font-size:0.65rem}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li:first-of-type,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li:last-of-type,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}#wf-onboarding-plugin-header #wf-onboarding-subscribe .wf-switch>li.wf-active,#wf-onboarding-plugin-header #wf-onboarding2-subscribe .wf-switch>li.wf-active{color:#ffffff}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox+label:before{content:"";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:30px !important;font-weight:normal !important}#wf-onboarding-plugin-header [type=radio].wf-option-radio+label:before{content:"";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:30px !important;font-weight:normal !important}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox+label,#wf-onboarding-plugin-header [type=radio].wf-option-radio+label{font-size:0.75rem !important}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:20px !important}#wf-onboarding-plugin-header [type=radio].wf-option-radio.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:21px !important;font-size:20px !important}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio+label:before{line-height:1 !important;text-align:center !important;text-indent:2px;display:inline-block;vertical-align:-6px;margin:0px 0.75rem 0px 0px;font-weight:normal;font-style:normal}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox.wf-small+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio.wf-small+label:before{text-indent:0px;vertical-align:-3px}#wf-onboarding-plugin-header [type=checkbox].wf-option-checkbox:checked+label:before,#wf-onboarding-plugin-header [type=radio].wf-option-radio:checked+label:before{color:#fff !important}#wf-onboarding-plugin-header .wf-option-checkbox[type=checkbox],#wf-onboarding-plugin-header .wf-option-checkbox[type=radio],#wf-onboarding-plugin-header .wf-option-radio[type=checkbox],#wf-onboarding-plugin-header .wf-option-radio[type=radio]{position:absolute;left:-9999px}#wf-onboarding-final-attempt .wf-modal-header{background-color:#fcb214}#wf-onboarding-final-attempt .wf-onboarding-modal-content{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}#wf-onboarding-final-attempt h1,#wf-onboarding-final-attempt h2,#wf-onboarding-final-attempt h3,#wf-onboarding-final-attempt h4,#wf-onboarding-final-attempt h5,#wf-onboarding-final-attempt h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:700;text-align:center;margin:0;padding:0.5rem 0}#wf-onboarding-final-attempt h2{font-size:1.3125rem;line-height:1.5rem}#wf-onboarding-final-attempt h3,#wf-onboarding-final-attempt h4{font-size:1.5rem;font-weight:300;line-height:1.2}#wf-onboarding-final-attempt p{text-align:center}#wf-onboarding-final-attempt #wf-onboarding-alerts{margin:1.5rem auto 0.5rem auto}#wf-onboarding-final-attempt #wf-onboarding-alerts-disclaimer{max-width:700px;font-size:0.65rem;margin:0 auto 1rem auto}#wf-onboarding-final-attempt #wf-onboarding-subscribe{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0 auto;max-width:700px}#wf-onboarding-final-attempt #wf-onboarding-subscribe>label{padding-right:1rem;text-align:left}#wf-onboarding-final-attempt #wf-onboarding-subscribe-controls{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;-webkit-flex-direction:column !important;flex-direction:column !important}#wf-onboarding-final-attempt #wf-onboarding-subscribe-controls>p{display:none;margin:0;font-size:0.65rem}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}#wf-onboarding-final-attempt #wf-onboarding-subscribe .wf-switch>li.wf-active{color:#ffffff}#wf-onboarding-final-attempt #wf-onboarding-license{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;width:100%;margin:1rem auto 1rem auto}#wf-onboarding-final-attempt #wf-onboarding-license>input{margin-right:1rem}#wf-onboarding-final-attempt #wf-onboarding-or{position:relative;font-size:12px;font-weight:400;text-align:center;line-height:30px;background:#ffffff;text-transform:uppercase;width:100%;max-width:800px;margin:0 auto}#wf-onboarding-final-attempt #wf-onboarding-or:before{display:inline-block;content:"";position:absolute;height:1px;background:#e2e2e2;top:50%;width:100%;left:0;right:0}#wf-onboarding-final-attempt #wf-onboarding-or>span{display:inline-block;position:relative;padding:0 0.75rem;background-color:#ffffff}#wf-onboarding-final-attempt #wf-onboarding-subscribe{text-align:center}#wf-onboarding-final-attempt #wf-onboarding-subscribe label{font-weight:normal}#wf-onboarding-final-attempt #wf-onboarding-license-footer,#wf-onboarding-final-attempt #wf-onboarding-license-finished{margin:0 auto;max-width:800px}#wf-onboarding-final-attempt #wf-onboarding-license-footer>ul,#wf-onboarding-final-attempt #wf-onboarding-license-finished>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;margin:0 auto;padding:0}#wf-onboarding-final-attempt #wf-onboarding-license-footer>ul>li,#wf-onboarding-final-attempt #wf-onboarding-license-finished>ul>li{margin:0;padding:0 0.5rem}#wf-onboarding-banner{position:relative;z-index:3006;background-color:#fcb214;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal;width:100%;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin:0 0 0 -20px;padding:0}#wf-onboarding-banner>li{margin:0;padding:0.5rem 1rem}.wf-tour-pointer>.wp-pointer-content{-moz-box-shadow:1px 1px 2px 0px rgba(50,50,50,0.75);-webkit-box-shadow:1px 1px 2px 0px rgba(50,50,50,0.75);box-shadow:1px 1px 2px 0px rgba(50,50,50,0.75)}.wf-tour-pointer>.wp-pointer-content>h3{background-color:#ffffff;border:0;text-align:center;color:#2d2d2d;font-weight:300;font-size:1.4rem;padding:1.5rem 1rem 0 1rem}.wf-tour-pointer>.wp-pointer-content>h3:before{content:""}.wf-tour-pointer>.wp-pointer-content>p{padding:0 3rem}.wf-tour-pointer>.wp-pointer-content svg.wf-icon{width:50px;min-width:50px;fill:#9f9fa0}.wf-tour-pointer.wp-pointer-top .wp-pointer-arrow,.wf-tour-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wf-tour-pointer.wp-pointer-undefined .wp-pointer-arrow,.wf-tour-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#fff}.wf-tour-pointer #wf-tour-close{position:absolute;top:1rem;right:1rem}.wf-tour-pointer #wf-tour-close a{color:#525355}.wf-tour-pointer .wf-pointer-footer{position:relative;margin:1.5rem -1px -11px -1px;background-color:#f1f1f1;border-top:1px solid #d9d9d9}.wf-tour-pointer .wf-pointer-footer .wf-tour-pagination{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;margin:auto;padding:1.4rem}.wf-tour-pointer .wf-pointer-footer .wf-tour-pagination>li{padding:0.025rem;margin:0;color:#9f9fa0;font-size:1.4rem}.wf-tour-pointer .wf-pointer-footer #wf-tour-previous{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;position:absolute;left:1rem;top:0px;bottom:0px}.wf-tour-pointer .wf-pointer-footer #wf-tour-continue{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;position:absolute;right:1rem;top:0px;bottom:0px}div.wf-onboarding-registration-prompt{text-align:center;padding-bottom:1rem}div.wf-onboarding-registration-prompt p{font-weight:bold}div.wf-onboarding-registration-prompt a.wf-onboarding-install-type-toggle,div.wf-onboarding-registration-prompt a.wf-onboarding-link{display:inline-block;margin-top:1rem}div.wf-onboarding-registration-prompt div.wf-onboarding-install-existing .wf-onboarding-form-group{text-align:left;margin-bottom:1rem}div.wf-onboarding-registration-prompt div.wf-onboarding-install-existing input[type=email],div.wf-onboarding-registration-prompt div.wf-onboarding-install-existing textarea{display:block;width:100%;padding:0.25rem 0.5rem}div.wf-onboarding-registration-prompt div.wf-onboarding-install-existing #wf-onboarding-license-input{font-family:monospace}div.wf-onboarding-registration-prompt div.wf-onboarding-install-existing label[for=wf-onboarding-consent-input]{display:inline}#wf-install p.wf-onboarding-error{color:#930000;font-weight:bold}#wf-install div.wf-onboarding-registration-prompt{text-align:left}.wf-onboarding-no-thanks-container{text-align:center}.wf-onboarding-form .wf-onboarding-subscription-options{margin-top:0.25rem}.wf-onboarding-form .wf-onboarding-subscription-option-required{display:block;margin-top:0.25rem;color:#930000} diff --git a/wp/wp-content/plugins/wordfence/css/wf-roboto-font.1704213472.css b/wp/wp-content/plugins/wordfence/css/wf-roboto-font.1704213472.css deleted file mode 100644 index d272f8ba..00000000 --- a/wp/wp-content/plugins/wordfence/css/wf-roboto-font.1704213472.css +++ /dev/null @@ -1,80 +0,0 @@ -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 400; - src: local('Roboto Italic'), local('Roboto-Italic'), url(../fonts/roboto-KFOkCnqEu92Fr1Mu51xGIzQXKMnyrYk.woff) format('woff'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 400; - src: local('Roboto Italic'), local('Roboto-Italic'), url(../fonts/roboto-KFOkCnqEu92Fr1Mu51xIIzQXKMny.woff) format('woff'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/roboto-KFOlCnqEu92Fr1MmSU5fChc-AMP6lbBP.woff) format('woff'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/roboto-KFOlCnqEu92Fr1MmSU5fBBc-AMP6lQ.woff) format('woff'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../fonts/roboto-KFOmCnqEu92Fr1Mu7GxMKTU1Kvnz.woff) format('woff'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../fonts/roboto-KFOmCnqEu92Fr1Mu4mxMKTU1Kg.woff) format('woff'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/roboto-KFOlCnqEu92Fr1MmEU9fChc-AMP6lbBP.woff) format('woff'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/roboto-KFOlCnqEu92Fr1MmEU9fBBc-AMP6lQ.woff) format('woff'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../fonts/roboto-KFOlCnqEu92Fr1MmWUlfChc-AMP6lbBP.woff) format('woff'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../fonts/roboto-KFOlCnqEu92Fr1MmWUlfBBc-AMP6lQ.woff) format('woff'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/css/wfselect2.min.1704213472.css b/wp/wp-content/plugins/wordfence/css/wfselect2.min.1704213472.css deleted file mode 100644 index cfbe7a21..00000000 --- a/wp/wp-content/plugins/wordfence/css/wfselect2.min.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wfselect2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.wfselect2-container .wfselect2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.wfselect2-container .wfselect2-selection--single .wfselect2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wfselect2-container .wfselect2-selection--single .wfselect2-selection__clear{position:relative}.wfselect2-container[dir="rtl"] .wfselect2-selection--single .wfselect2-selection__rendered{padding-right:8px;padding-left:20px}.wfselect2-container .wfselect2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.wfselect2-container .wfselect2-selection--multiple .wfselect2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.wfselect2-container .wfselect2-search--inline{float:left}.wfselect2-container .wfselect2-search--inline .wfselect2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.wfselect2-container .wfselect2-search--inline .wfselect2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.wfselect2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:10051}.wfselect2-results{display:block}.wfselect2-results__options{list-style:none;margin:0;padding:0}.wfselect2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.wfselect2-results__option[aria-selected]{cursor:pointer}.wfselect2-container--open .wfselect2-dropdown{left:0}.wfselect2-container--open .wfselect2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.wfselect2-container--open .wfselect2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.wfselect2-search--dropdown{display:block;padding:4px}.wfselect2-search--dropdown .wfselect2-search__field{padding:4px;width:100%;box-sizing:border-box}.wfselect2-search--dropdown .wfselect2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.wfselect2-search--dropdown.wfselect2-search--hide{display:none}.wfselect2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.wfselect2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.wfselect2-container--default .wfselect2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#444;line-height:28px}.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__clear{cursor:pointer;float:right;font-weight:bold}.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__placeholder{color:#999}.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.wfselect2-container--default[dir="rtl"] .wfselect2-selection--single .wfselect2-selection__clear{float:left}.wfselect2-container--default[dir="rtl"] .wfselect2-selection--single .wfselect2-selection__arrow{left:1px;right:auto}.wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection--single{background-color:#eee;cursor:default}.wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection--single .wfselect2-selection__clear{display:none}.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.wfselect2-container--default .wfselect2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__rendered li{list-style:none}.wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice__remove:hover{color:#333}.wfselect2-container--default[dir="rtl"] .wfselect2-selection--multiple .wfselect2-selection__choice,.wfselect2-container--default[dir="rtl"] .wfselect2-selection--multiple .wfselect2-search--inline{float:right}.wfselect2-container--default[dir="rtl"] .wfselect2-selection--multiple .wfselect2-selection__choice{margin-left:5px;margin-right:auto}.wfselect2-container--default[dir="rtl"] .wfselect2-selection--multiple .wfselect2-selection__choice__remove{margin-left:2px;margin-right:auto}.wfselect2-container--default.wfselect2-container--focus .wfselect2-selection--multiple{border:solid black 1px;outline:0}.wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection--multiple{background-color:#eee;cursor:default}.wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__choice__remove{display:none}.wfselect2-container--default.wfselect2-container--open.wfselect2-container--above .wfselect2-selection--single,.wfselect2-container--default.wfselect2-container--open.wfselect2-container--above .wfselect2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.wfselect2-container--default.wfselect2-container--open.wfselect2-container--below .wfselect2-selection--single,.wfselect2-container--default.wfselect2-container--open.wfselect2-container--below .wfselect2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.wfselect2-container--default .wfselect2-search--dropdown .wfselect2-search__field{border:1px solid #aaa}.wfselect2-container--default .wfselect2-search--inline .wfselect2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.wfselect2-container--default .wfselect2-results>.wfselect2-results__options{max-height:200px;overflow-y:auto}.wfselect2-container--default .wfselect2-results__option[role=group]{padding:0}.wfselect2-container--default .wfselect2-results__option[aria-disabled=true]{color:#999}.wfselect2-container--default .wfselect2-results__option[aria-selected=true]{background-color:#ddd}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option{padding-left:1em}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option .wfselect2-results__group{padding-left:0}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option{margin-left:-1em;padding-left:2em}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option{margin-left:-2em;padding-left:3em}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option{margin-left:-3em;padding-left:4em}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option{margin-left:-4em;padding-left:5em}.wfselect2-container--default .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option .wfselect2-results__option{margin-left:-5em;padding-left:6em}.wfselect2-container--default .wfselect2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.wfselect2-container--default .wfselect2-results__group{cursor:default;display:block;padding:6px}.wfselect2-container--classic .wfselect2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.wfselect2-container--classic .wfselect2-selection--single:focus{border:1px solid #5897fb}.wfselect2-container--classic .wfselect2-selection--single .wfselect2-selection__rendered{color:#444;line-height:28px}.wfselect2-container--classic .wfselect2-selection--single .wfselect2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.wfselect2-container--classic .wfselect2-selection--single .wfselect2-selection__placeholder{color:#999}.wfselect2-container--classic .wfselect2-selection--single .wfselect2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.wfselect2-container--classic .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.wfselect2-container--classic[dir="rtl"] .wfselect2-selection--single .wfselect2-selection__clear{float:left}.wfselect2-container--classic[dir="rtl"] .wfselect2-selection--single .wfselect2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.wfselect2-container--classic.wfselect2-container--open .wfselect2-selection--single{border:1px solid #5897fb}.wfselect2-container--classic.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow{background:transparent;border:none}.wfselect2-container--classic.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.wfselect2-container--classic.wfselect2-container--open.wfselect2-container--above .wfselect2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.wfselect2-container--classic.wfselect2-container--open.wfselect2-container--below .wfselect2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.wfselect2-container--classic .wfselect2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.wfselect2-container--classic .wfselect2-selection--multiple:focus{border:1px solid #5897fb}.wfselect2-container--classic .wfselect2-selection--multiple .wfselect2-selection__rendered{list-style:none;margin:0;padding:0 5px}.wfselect2-container--classic .wfselect2-selection--multiple .wfselect2-selection__clear{display:none}.wfselect2-container--classic .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.wfselect2-container--classic .wfselect2-selection--multiple .wfselect2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.wfselect2-container--classic .wfselect2-selection--multiple .wfselect2-selection__choice__remove:hover{color:#555}.wfselect2-container--classic[dir="rtl"] .wfselect2-selection--multiple .wfselect2-selection__choice{float:right;margin-left:5px;margin-right:auto}.wfselect2-container--classic[dir="rtl"] .wfselect2-selection--multiple .wfselect2-selection__choice__remove{margin-left:2px;margin-right:auto}.wfselect2-container--classic.wfselect2-container--open .wfselect2-selection--multiple{border:1px solid #5897fb}.wfselect2-container--classic.wfselect2-container--open.wfselect2-container--above .wfselect2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.wfselect2-container--classic.wfselect2-container--open.wfselect2-container--below .wfselect2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.wfselect2-container--classic .wfselect2-search--dropdown .wfselect2-search__field{border:1px solid #aaa;outline:0}.wfselect2-container--classic .wfselect2-search--inline .wfselect2-search__field{outline:0;box-shadow:none}.wfselect2-container--classic .wfselect2-dropdown{background-color:#fff;border:1px solid transparent}.wfselect2-container--classic .wfselect2-dropdown--above{border-bottom:none}.wfselect2-container--classic .wfselect2-dropdown--below{border-top:none}.wfselect2-container--classic .wfselect2-results>.wfselect2-results__options{max-height:200px;overflow-y:auto}.wfselect2-container--classic .wfselect2-results__option[role=group]{padding:0}.wfselect2-container--classic .wfselect2-results__option[aria-disabled=true]{color:grey}.wfselect2-container--classic .wfselect2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.wfselect2-container--classic .wfselect2-results__group{cursor:default;display:block;padding:6px}.wfselect2-container--classic.wfselect2-container--open .wfselect2-dropdown{border-color:#5897fb} diff --git a/wp/wp-content/plugins/wordfence/css/wordfenceBox.1704213472.css b/wp/wp-content/plugins/wordfence/css/wordfenceBox.1704213472.css deleted file mode 100644 index 5d6ba4f4..00000000 --- a/wp/wp-content/plugins/wordfence/css/wordfenceBox.1704213472.css +++ /dev/null @@ -1,169 +0,0 @@ -/* - ColorBox Core Style: - The following CSS is consistent between example themes and should not be altered. -*/ -#wordfenceBox, #wfboxOverlay, #wfboxWrapper{position:absolute; top:0; left:0; z-index:16777271; overflow:hidden;} -#wfboxOverlay{position:fixed; width:100%; height:100%;} -#wfboxMiddleLeft, #wfboxBottomLeft{clear:left;} -#wfboxContent{position:relative;} -#wfboxLoadedContent{overflow:auto;} -#wfboxTitle{margin:0;} -#wfboxLoadingOverlay, #wfboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;} -#wfboxPrevious, #wfboxNext, #wfboxClose, #wfboxSlideshow{cursor:pointer;} -.wfboxPhoto{float:left; margin:auto; border:0; display:block;} -.wfboxIframe{width:100%; height:100%; display:block; border:0;} - -/* - User Style: - Change the following styles to modify the appearance of ColorBox. They are - ordered & tabbed in a way that represents the nesting of the generated HTML. -*/ -#wfboxOverlay{ - background: #777; - background: -webkit-radial-gradient(rgba(120, 120, 120, 0.8), rgba(100, 100, 100, 0.8) 50%, rgba(70, 70, 70, 1)); - background: -moz-radial-gradient(rgba(120, 120, 120, 0.6), rgba(100, 100, 100, 0.8) 20%, rgba(70, 70, 70, 1)); -} -#wordfenceBox { - color: #444; - font-family: "Open Sans", sans-serif; - font-size: 13px; - line-height: 1.4em; -} -#wfboxContent { background:#fff; overflow:hidden; padding: 0 0 8px; margin: 20px; - -webkit-border-radius: 3px 3px 2px 2px; -moz-border-radius: 3px 3px 2px 2px; border-radius: 3px 3px 2px 2px; /* border radius */ - -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.4); -moz-box-shadow: 0 2px 4px rgba(0,0,0,.4); box-shadow: 0 2px 4px rgba(0,0,0,.4); /* box shadow */ - -webkit-background-clip: padding-box; /* smoother borders with webkit */ } -#wfboxError{padding:50px; border:1px solid #ccc;} -#wfboxLoadedContent { - /* margin-bottom:28px; */ - /* MDM added: */ margin: 10px 20px 28px 20px; font-family: Arial; color: #333; - -webkit-border-radius: 2px 2px 0 0; -moz-border-radius: 2px 2px 0 0; border-radius: 2px 2px 0 0; /* border radius */ -} -#wfboxTitle{position:absolute; bottom:8px; left:5px; text-align:center; width:100%; color:#949494;} -#wfboxCurrent{position:absolute; bottom:8px; left:63px; color:#949494; text-indent: -9999px;} -#wfboxSlideshow{position:absolute; bottom:8px; right:35px; color:#0092ef;} -#wfboxPrevious{position:absolute; bottom:5px; left:5px; background:url(../images/lightbox-controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} -#wfboxPrevious.hover{background-position:-75px -25px;} -#wfboxNext{position:absolute; bottom:5px; left:32px; background:url(../images/lightbox-controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} -#wfboxNext.hover{background-position:-50px -25px;} -#wfboxLoadingOverlay{background:url(../images/loading_background.png) no-repeat center center;} -#wfboxLoadingGraphic{background:url(../images/loading.gif) no-repeat center center;} -#wfboxClose{position:absolute; bottom:5px; right:5px; background:url(../images/lightbox-controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} -#wfboxClose.hover{background-position:-25px -25px;} - -/* - The following fixes a problem where IE7+ replaces a PNG's alpha transparency with a black fill - when an alpha filter (opacity change) is set on the element or ancestor element. -*/ -.wfboxIE #wfboxTopLeft, -.wfboxIE #wfboxTopCenter, -.wfboxIE #wfboxTopRight, -.wfboxIE #wfboxBottomLeft, -.wfboxIE #wfboxBottomCenter, -.wfboxIE #wfboxBottomRight, -.wfboxIE #wfboxMiddleLeft, -.wfboxIE #wfboxMiddleRight { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); -} - -/* - Enforce our styles over any theme styling -*/ -#wordfenceBox, #wordfenceBox:before, #wordfenceBox:after { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -#wordfenceBox h1, #wordfenceBox h2, #wordfenceBox h3, #wordfenceBox h4, #wordfenceBox h5, #wordfenceBox h6 { - display: block; - font-weight: 600 -} - -#wordfenceBox h1 { - font-size: 2em; - margin: .67em 0 -} - -#wordfenceBox h2, #wordfenceBox h3 { - font-size: 1.3em; - margin: 1em 0 -} - -#wordfenceBox h1, #wordfenceBox h2, #wordfenceBox h3 { - color: #23282d -} - -#wordfenceBox p { - font-size: 13px; - line-height: 1.5; - margin: 1em 0; -} - -#wordfenceBox .textright { - text-align: right; -} - -#wordfenceBox .button, #wordfenceBox .button-primary, #wordfenceBox .button-secondary { - display: inline-block; - text-decoration: none; - font-size: 13px; - line-height: 26px; - height: 28px; - margin: 0; - padding: 0 10px 1px; - cursor: pointer; - border-width: 1px; - border-style: solid; - -webkit-appearance: none; - -webkit-border-radius: 3px; - border-radius: 3px; - white-space: nowrap; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box -} - -#wordfenceBox .button, #wordfenceBox .button-secondary { - color: #555; - border-color: #ccc; - background: #f7f7f7; - -webkit-box-shadow: 0 1px 0 #ccc; - box-shadow: 0 1px 0 #ccc; - vertical-align: top -} - -#wordfenceBox p .button { - vertical-align: baseline; - font-family: Arial, san-serif; - font-weight: normal; - text-transform: none; -} - -#wordfenceBox p code { - padding: 3px 5px 2px; - margin: 0 1px; - background: #eaeaea; - background: rgba(0,0,0,.07); - font-size: 13px; -} - -#wordfenceBox .button-secondary:focus, #wordfenceBox .button-secondary:hover, #wordfenceBox .button.focus, #wordfenceBox .button.hover, #wordfenceBox .button:focus, #wordfenceBox .button:hover { - background: #fafafa; - border-color: #999; - color: #23282d -} - -#wordfenceBox a.wfboxhelp { - float: left; - background-image: url(../images/help.png); - width: 12px; - height: 12px; - background-position: 0 0; - background-repeat: no-repeat; - padding: 0; - margin: 9px 0px; - text-decoration: none; - display: inline-block; - vertical-align: middle; -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/fonts/fontawesome-webfont.woff b/wp/wp-content/plugins/wordfence/fonts/fontawesome-webfont.woff deleted file mode 100644 index 400014a4..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/ionicons.woff b/wp/wp-content/plugins/wordfence/fonts/ionicons.woff deleted file mode 100644 index 5f3a14e0..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/ionicons.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOkCnqEu92Fr1Mu51xGIzQXKMnyrYk.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOkCnqEu92Fr1Mu51xGIzQXKMnyrYk.woff deleted file mode 100644 index aa6cf322..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOkCnqEu92Fr1Mu51xGIzQXKMnyrYk.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOkCnqEu92Fr1Mu51xIIzQXKMny.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOkCnqEu92Fr1Mu51xIIzQXKMny.woff deleted file mode 100644 index ae245905..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOkCnqEu92Fr1Mu51xIIzQXKMny.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmEU9fBBc-AMP6lQ.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmEU9fBBc-AMP6lQ.woff deleted file mode 100644 index 11145071..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmEU9fBBc-AMP6lQ.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmEU9fChc-AMP6lbBP.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmEU9fChc-AMP6lbBP.woff deleted file mode 100644 index aa0039d6..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmEU9fChc-AMP6lbBP.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmSU5fBBc-AMP6lQ.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmSU5fBBc-AMP6lQ.woff deleted file mode 100644 index a4f860e1..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmSU5fBBc-AMP6lQ.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmSU5fChc-AMP6lbBP.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmSU5fChc-AMP6lbBP.woff deleted file mode 100644 index 022ae677..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmSU5fChc-AMP6lbBP.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmWUlfBBc-AMP6lQ.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmWUlfBBc-AMP6lQ.woff deleted file mode 100644 index a919069b..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmWUlfBBc-AMP6lQ.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmWUlfChc-AMP6lbBP.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmWUlfChc-AMP6lbBP.woff deleted file mode 100644 index 1ca97344..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOlCnqEu92Fr1MmWUlfChc-AMP6lbBP.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOmCnqEu92Fr1Mu4mxMKTU1Kg.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOmCnqEu92Fr1Mu4mxMKTU1Kg.woff deleted file mode 100644 index d23a887a..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOmCnqEu92Fr1Mu4mxMKTU1Kg.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOmCnqEu92Fr1Mu7GxMKTU1Kvnz.woff b/wp/wp-content/plugins/wordfence/fonts/roboto-KFOmCnqEu92Fr1Mu7GxMKTU1Kvnz.woff deleted file mode 100644 index 6c713e7c..00000000 Binary files a/wp/wp-content/plugins/wordfence/fonts/roboto-KFOmCnqEu92Fr1Mu7GxMKTU1Kvnz.woff and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/2fa-whole.svg b/wp/wp-content/plugins/wordfence/images/2fa-whole.svg deleted file mode 100644 index aeee2e66..00000000 --- a/wp/wp-content/plugins/wordfence/images/2fa-whole.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/wp/wp-content/plugins/wordfence/images/2fa1.svg b/wp/wp-content/plugins/wordfence/images/2fa1.svg deleted file mode 100644 index 6ecd2b74..00000000 --- a/wp/wp-content/plugins/wordfence/images/2fa1.svg +++ /dev/null @@ -1 +0,0 @@ -2fa1 \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/2fa2.svg b/wp/wp-content/plugins/wordfence/images/2fa2.svg deleted file mode 100644 index 69a5d81b..00000000 --- a/wp/wp-content/plugins/wordfence/images/2fa2.svg +++ /dev/null @@ -1 +0,0 @@ -2fa2 \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/back_disabled.jpg b/wp/wp-content/plugins/wordfence/images/back_disabled.jpg deleted file mode 100644 index 3cc8fa50..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/back_disabled.jpg and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/back_enabled.jpg b/wp/wp-content/plugins/wordfence/images/back_enabled.jpg deleted file mode 100644 index 2298da99..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/back_enabled.jpg and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/blocking.svg b/wp/wp-content/plugins/wordfence/images/blocking.svg deleted file mode 100644 index 3e5382a3..00000000 --- a/wp/wp-content/plugins/wordfence/images/blocking.svg +++ /dev/null @@ -1 +0,0 @@ -Firewall \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/button-grad-grey.png b/wp/wp-content/plugins/wordfence/images/button-grad-grey.png deleted file mode 100644 index b3c4996c..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/button-grad-grey.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/checkbox.png b/wp/wp-content/plugins/wordfence/images/checkbox.png deleted file mode 100644 index 4364e76a..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/checkbox.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/flags.png b/wp/wp-content/plugins/wordfence/images/flags.png deleted file mode 100644 index 5a0a64b9..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/flags.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/forward_disabled.jpg b/wp/wp-content/plugins/wordfence/images/forward_disabled.jpg deleted file mode 100644 index f213fb25..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/forward_disabled.jpg and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/forward_enabled.jpg b/wp/wp-content/plugins/wordfence/images/forward_enabled.jpg deleted file mode 100644 index 4295e3c3..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/forward_enabled.jpg and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/help.png b/wp/wp-content/plugins/wordfence/images/help.png deleted file mode 100644 index 86cb5e71..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/help.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/ajax24.gif b/wp/wp-content/plugins/wordfence/images/icons/ajax24.gif deleted file mode 100644 index 53dd589f..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/ajax24.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/ajax3.gif b/wp/wp-content/plugins/wordfence/images/icons/ajax3.gif deleted file mode 100644 index e907ecc2..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/ajax3.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/ajaxRed16.gif b/wp/wp-content/plugins/wordfence/images/icons/ajaxRed16.gif deleted file mode 100644 index dd8511b1..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/ajaxRed16.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/ajaxScan.gif b/wp/wp-content/plugins/wordfence/images/icons/ajaxScan.gif deleted file mode 100644 index 896b49e5..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/ajaxScan.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/ajaxWhite32x32.gif b/wp/wp-content/plugins/wordfence/images/icons/ajaxWhite32x32.gif deleted file mode 100644 index 3c2f7c05..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/ajaxWhite32x32.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/arrow_refresh.png b/wp/wp-content/plugins/wordfence/images/icons/arrow_refresh.png deleted file mode 100644 index 0de26566..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/arrow_refresh.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/bullet_yellow.png b/wp/wp-content/plugins/wordfence/images/icons/bullet_yellow.png deleted file mode 100644 index 6469cea7..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/bullet_yellow.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/check-care.svg b/wp/wp-content/plugins/wordfence/images/icons/check-care.svg deleted file mode 100644 index 412ff8f7..00000000 --- a/wp/wp-content/plugins/wordfence/images/icons/check-care.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wp/wp-content/plugins/wordfence/images/icons/check-premium.svg b/wp/wp-content/plugins/wordfence/images/icons/check-premium.svg deleted file mode 100644 index 42fecacd..00000000 --- a/wp/wp-content/plugins/wordfence/images/icons/check-premium.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wp/wp-content/plugins/wordfence/images/icons/check-response.svg b/wp/wp-content/plugins/wordfence/images/icons/check-response.svg deleted file mode 100644 index d60a17c5..00000000 --- a/wp/wp-content/plugins/wordfence/images/icons/check-response.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wp/wp-content/plugins/wordfence/images/icons/check.svg b/wp/wp-content/plugins/wordfence/images/icons/check.svg deleted file mode 100644 index 7d430caf..00000000 --- a/wp/wp-content/plugins/wordfence/images/icons/check.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wp/wp-content/plugins/wordfence/images/icons/email_go.png b/wp/wp-content/plugins/wordfence/images/icons/email_go.png deleted file mode 100644 index 4a6c5d39..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/email_go.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/error128.png b/wp/wp-content/plugins/wordfence/images/icons/error128.png deleted file mode 100644 index 122a09ce..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/error128.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/magnifier.png b/wp/wp-content/plugins/wordfence/images/icons/magnifier.png deleted file mode 100644 index cf3d97f7..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/magnifier.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/tick128.png b/wp/wp-content/plugins/wordfence/images/icons/tick128.png deleted file mode 100644 index dd4ad0e9..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/tick128.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/warning128.png b/wp/wp-content/plugins/wordfence/images/icons/warning128.png deleted file mode 100644 index 79c6d8a2..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/warning128.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/icons/working-indicator.gif b/wp/wp-content/plugins/wordfence/images/icons/working-indicator.gif deleted file mode 100644 index 2dc12c05..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/icons/working-indicator.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/lightbox-controls.png b/wp/wp-content/plugins/wordfence/images/lightbox-controls.png deleted file mode 100644 index f1ee226e..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/lightbox-controls.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/loading.gif b/wp/wp-content/plugins/wordfence/images/loading.gif deleted file mode 100644 index 53dd589f..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/loading.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/loading_background.png b/wp/wp-content/plugins/wordfence/images/loading_background.png deleted file mode 100644 index 6ae83e69..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/loading_background.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/loading_large.gif b/wp/wp-content/plugins/wordfence/images/loading_large.gif deleted file mode 100644 index 922d6989..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/loading_large.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/logo.png b/wp/wp-content/plugins/wordfence/images/logo.png deleted file mode 100644 index 201f21a9..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/logo.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/logos/shield-care.svg b/wp/wp-content/plugins/wordfence/images/logos/shield-care.svg deleted file mode 100644 index 5c422bd9..00000000 --- a/wp/wp-content/plugins/wordfence/images/logos/shield-care.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/logos/shield-free.svg b/wp/wp-content/plugins/wordfence/images/logos/shield-free.svg deleted file mode 100644 index 7e324e67..00000000 --- a/wp/wp-content/plugins/wordfence/images/logos/shield-free.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/logos/shield-premium.svg b/wp/wp-content/plugins/wordfence/images/logos/shield-premium.svg deleted file mode 100644 index bb806dd2..00000000 --- a/wp/wp-content/plugins/wordfence/images/logos/shield-premium.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/logos/shield-response.svg b/wp/wp-content/plugins/wordfence/images/logos/shield-response.svg deleted file mode 100644 index a7d0fd71..00000000 --- a/wp/wp-content/plugins/wordfence/images/logos/shield-response.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/logos/shield-white.svg b/wp/wp-content/plugins/wordfence/images/logos/shield-white.svg deleted file mode 100644 index 3c7c4e01..00000000 --- a/wp/wp-content/plugins/wordfence/images/logos/shield-white.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wp/wp-content/plugins/wordfence/images/options.svg b/wp/wp-content/plugins/wordfence/images/options.svg deleted file mode 100644 index 8fa913a2..00000000 --- a/wp/wp-content/plugins/wordfence/images/options.svg +++ /dev/null @@ -1 +0,0 @@ -options \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/ratelimiting.svg b/wp/wp-content/plugins/wordfence/images/ratelimiting.svg deleted file mode 100644 index 8c6cc5d3..00000000 --- a/wp/wp-content/plugins/wordfence/images/ratelimiting.svg +++ /dev/null @@ -1 +0,0 @@ -ratelimiting \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/sort_asc.gif b/wp/wp-content/plugins/wordfence/images/sort_asc.gif deleted file mode 100644 index 12078b3d..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_asc.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_asc.png b/wp/wp-content/plugins/wordfence/images/sort_asc.png deleted file mode 100644 index e1ba61a8..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_asc.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_asc_disabled.gif b/wp/wp-content/plugins/wordfence/images/sort_asc_disabled.gif deleted file mode 100644 index 34132c32..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_asc_disabled.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_asc_disabled.png b/wp/wp-content/plugins/wordfence/images/sort_asc_disabled.png deleted file mode 100644 index fb11dfe2..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_asc_disabled.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_both.gif b/wp/wp-content/plugins/wordfence/images/sort_both.gif deleted file mode 100644 index bd168731..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_both.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_both.png b/wp/wp-content/plugins/wordfence/images/sort_both.png deleted file mode 100644 index af5bc7c5..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_both.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_desc.gif b/wp/wp-content/plugins/wordfence/images/sort_desc.gif deleted file mode 100644 index 03dddb1b..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_desc.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_desc.png b/wp/wp-content/plugins/wordfence/images/sort_desc.png deleted file mode 100644 index 0e156deb..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_desc.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_desc_disabled.gif b/wp/wp-content/plugins/wordfence/images/sort_desc_disabled.gif deleted file mode 100644 index 3a4ee988..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_desc_disabled.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/sort_desc_disabled.png b/wp/wp-content/plugins/wordfence/images/sort_desc_disabled.png deleted file mode 100644 index c9fdd8a1..00000000 Binary files a/wp/wp-content/plugins/wordfence/images/sort_desc_disabled.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/images/support.svg b/wp/wp-content/plugins/wordfence/images/support.svg deleted file mode 100644 index 1be1508c..00000000 --- a/wp/wp-content/plugins/wordfence/images/support.svg +++ /dev/null @@ -1 +0,0 @@ -support \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/tools.svg b/wp/wp-content/plugins/wordfence/images/tools.svg deleted file mode 100644 index af372a15..00000000 --- a/wp/wp-content/plugins/wordfence/images/tools.svg +++ /dev/null @@ -1 +0,0 @@ -tools \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/wf-central-logo.svg b/wp/wp-content/plugins/wordfence/images/wf-central-logo.svg deleted file mode 100644 index eca156ad..00000000 --- a/wp/wp-content/plugins/wordfence/images/wf-central-logo.svg +++ /dev/null @@ -1 +0,0 @@ -wordfence-central-icon \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/images/wf-error-badge.svg b/wp/wp-content/plugins/wordfence/images/wf-error-badge.svg deleted file mode 100644 index 8415bbc9..00000000 --- a/wp/wp-content/plugins/wordfence/images/wf-error-badge.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/wp/wp-content/plugins/wordfence/images/wf-horizontal.svg b/wp/wp-content/plugins/wordfence/images/wf-horizontal.svg deleted file mode 100644 index 9d902aee..00000000 --- a/wp/wp-content/plugins/wordfence/images/wf-horizontal.svg +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wp/wp-content/plugins/wordfence/images/wordfence-logo.svg b/wp/wp-content/plugins/wordfence/images/wordfence-logo.svg deleted file mode 100644 index 4e1fbb7d..00000000 --- a/wp/wp-content/plugins/wordfence/images/wordfence-logo.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/wp/wp-content/plugins/wordfence/index.php b/wp/wp-content/plugins/wordfence/index.php deleted file mode 100644 index 1580272c..00000000 --- a/wp/wp-content/plugins/wordfence/index.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/wp/wp-content/plugins/wordfence/js/admin.1704213472.js b/wp/wp-content/plugins/wordfence/js/admin.1704213472.js deleted file mode 100644 index ae7633ca..00000000 --- a/wp/wp-content/plugins/wordfence/js/admin.1704213472.js +++ /dev/null @@ -1,4056 +0,0 @@ -(function($) { - var sprintf, - __; - - if (!window['wordfenceAdmin']) { //To compile for checking: java -jar /usr/local/bin/closure.jar --js=admin.js --js_output_file=test.js - window['wordfenceAdmin'] = { - isSmallScreen: false, - loading16: '
', - loadingCount: 0, - dbCheckTables: [], - dbCheckCount_ok: 0, - dbCheckCount_skipped: 0, - dbCheckCount_errors: 0, - issues: [], - ignoreData: false, - iconErrorMsgs: [], - scanIDLoaded: 0, - colorboxQueue: [], - mode: '', - visibleIssuesPanel: 'new', - preFirstScanMsgsLoaded: false, - newestActivityTime: 0, //must be 0 to force loading of all initially - elementGeneratorIter: 1, - reloadConfigPage: false, - nonce: false, - liveTrafficUpdatePending: false, - activityLogUpdatePending: false, - lastALogCtime: 0, - lastIssueUpdateTime: 0, - activityQueue: [], - totalActAdded: 0, - maxActivityLogItems: 1000, - scanReqAnimation: false, - debugOn: false, - blockedCountriesPending: [], - ownCountry: "", - schedStartHour: false, - currentPointer: false, - countryMap: false, - countryCodesToSave: "", - performanceScale: 3, - performanceMinWidth: 20, - _windowHasFocus: true, - serverTimestampOffset: 0, - serverMicrotime: 0, - wfLiveTraffic: null, - loadingBlockedIPs: false, - scanRunning: false, - basePageName: '', - pendingChanges: {}, - scanStalled: false, - siteCleaningIssueTypes: ['file', 'checkGSB', 'checkSpamIP', 'commentBadURL', 'knownfile', 'optionBadURL', 'postBadTitle', 'postBadURL', 'spamvertizeCheck', 'suspiciousAdminUsers'], - - //Screen sizes - SCREEN_XS: 'xs', - SCREEN_SM: 'sm', - SCREEN_MD: 'md', - SCREEN_LG: 'lg', - - init: function() { - this.isSmallScreen = window.matchMedia("only screen and (max-width: 500px)").matches; - - this.nonce = WordfenceAdminVars.firstNonce; - this.debugOn = WordfenceAdminVars.debugOn == '1' ? true : false; - this.scanRunning = WordfenceAdminVars.scanRunning == '1' ? true : false; - this.basePageName = document.title; - var startTicker = false; - var self = this; - - $(window).on('blur', function() { - self._windowHasFocus = false; - }).on('focus', function() { - self._windowHasFocus = true; - }).focus(); - - $('.do-show').click(function() { - var $this = $(this); - $this.hide(); - $($this.data('selector')).show(); - return false; - }); - - $('.downloadLogFile').each(function() { - $(this).attr('href', WordfenceAdminVars.ajaxURL + '?action=wordfence_downloadLogFile&nonce=' + WFAD.nonce + '&logfile=' + encodeURIComponent($(this).data('logfile'))); - }); - - $('#doSendEmail').click(function() { - var ticket = $('#_ticketnumber').val(); - if (ticket === null || typeof ticket === "undefined" || ticket.length == 0) { - self.colorboxModal((self.isSmallScreen ? '300px' : '400px'), __("Error"), __("Please include your support ticket number or forum username.")); - return; - } - WFAD.ajax('wordfence_sendDiagnostic', {email: $('#_email').val(), ticket: ticket}, function(res) { - if (res.result) { - self.colorboxModal((self.isSmallScreen ? '300px' : '400px'), __("Email Diagnostic Report"), __("Diagnostic report has been sent successfully.")); - } else { - self.colorboxModal((self.isSmallScreen ? '300px' : '400px'), __("Error"), __("There was an error while sending the email.")); - } - }); - }); - - $('#exportDiagnostics').click(function() { - self.showLoading(); - - var diagnosticsExportWindow = window.open(WordfenceAdminVars.ajaxURL + '?action=wordfence_exportDiagnostics&nonce=' + WFAD.nonce); - diagnosticsExportWindow.onbeforeunload = function() { - self.removeLoading(); - }; - return false; - }); - - $('#sendByEmail').click(function() { - $('#sendByEmailForm').removeClass('hidden'); - $(this).hide(); - }); - - $('#expandAllDiagnostics').click(function() { - $('#wf-diagnostics').find('.wf-block').each(function() { - var el = $(this); - if (!el.hasClass('wf-active')) { - el.find('.wf-block-header').trigger('click'); - } - }) - }); - - $(window).bind("scroll", function() { - $(this).scrollTop() > 200 ? $(".wf-scrollTop").fadeIn() : $(".wf-scrollTop").fadeOut() - }); - $(".wf-scrollTop").click(function(e) { - return e.stopPropagation(), $("body,html").animate({ - scrollTop: 0 - }, 800), !1; - }); - - var tabs = jQuery('.wf-page-tabs').find('.wf-tab a'); - if (tabs.length > 0) { - tabs.click(function() { - jQuery('.wf-page-tabs').find('.wf-tab').removeClass('wf-active').find('a').attr('aria-selected', 'false'); - jQuery('.wf-tab-content').removeClass('wf-active'); - - var tab = jQuery(this).closest('.wf-tab'); - tab.addClass('wf-active'); - tab.find('a').attr('aria-selected', 'true'); - var content = jQuery('#' + tab.data('target')); - content.addClass('wf-active'); - document.title = tab.data('pageTitle') + " \u2039 " + self.basePageName; - self.sectionInit(); - $(window).trigger('wfTabChange', [tab.data('target')]); - }); - if (window.location.hash) { - var hashes = WFAD.parseHashes(); - var hash = hashes[hashes.length - 1]; - for (var i = 0; i < tabs.length; i++) { - if (hash == jQuery(tabs[i]).closest('.wf-tab').data('target')) { - jQuery(tabs[i]).trigger('click'); - } - } - } - else { - jQuery(tabs[0]).trigger('click'); - } - jQuery(window).on('hashchange', function () { - var hashes = WFAD.parseHashes(); - var hash = hashes[hashes.length - 1]; - for (var i = 0; i < tabs.length; i++) { - if (hash == jQuery(tabs[i]).closest('.wf-tab').data('target')) { - jQuery(tabs[i]).trigger('click'); - } - } - }); - } - else { - this.sectionInit(); - } - - if (this.mode) { - jQuery(document).bind('cbox_closed', function() { - self.colorboxIsOpen = false; - self.colorboxServiceQueue(); - }); - } - - if ($('.wf-options-controls-spacer').length) { //The WP code doesn't move update nags and we need to - $('.update-nag, #update-nag').insertAfter($('.wf-options-controls-spacer')); - } - - $('.wf-block-header-action-disclosure').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).closest('.wf-block-header').trigger('click'); - } - }); - - $(this).closest('.wf-block-header').css('cursor', 'pointer'); - $(this).closest('.wf-block-header').on('click', function(e) { - // Let links in the header work. - if (e.target && e.target.nodeName === 'A' && e.target.href) { - return; - } - e.preventDefault(); - e.stopPropagation(); - - if ($(this).closest('.wf-block').hasClass('wf-disabled')) { - return; - } - - var isActive = $(this).closest('.wf-block').hasClass('wf-active'); - if (isActive) { - //$(this).closest('.wf-block').removeClass('wf-active'); - $(this).closest('.wf-block').find('.wf-block-content').slideUp({ - always: function() { - $(this).closest('.wf-block').removeClass('wf-active'); - $(this).attr('aria-checked', 'false'); - } - }); - } - else { - //$(this).closest('.wf-block').addClass('wf-active'); - $(this).closest('.wf-block').find('.wf-block-content').slideDown({ - always: function() { - $(this).closest('.wf-block').addClass('wf-active'); - $(this).attr('aria-checked', 'true'); - } - }); - } - - WFAD.ajax('wordfence_saveDisclosureState', {name: $(this).closest('.wf-block').data('persistenceKey'), state: !isActive}, function() {}, function() {}, true); - }); - }); - - //On/Off Option - $('.wf-option.wf-option-toggled .wf-option-checkbox').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wf-option'); - if (optionElement.hasClass('wf-option-premium') || optionElement.hasClass('wf-disabled')) { - return; - } - - var option = optionElement.data('option'); - var value = false; - var isActive = $(this).hasClass('wf-checked'); - if (isActive) { - $(this).removeClass('wf-checked').attr('aria-checked', 'false'); - value = optionElement.data('disabledValue'); - } - else { - $(this).addClass('wf-checked').attr('aria-checked', 'true'); - value = optionElement.data('enabledValue'); - } - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }); - - $(this).parent().find('.wf-option-title').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).parent().find('.wf-option-checkbox').trigger('click'); - }).css('cursor', 'pointer'); - }); - - //On/Off Boolean Switch Option - $('.wf-option.wf-option-toggled-boolean-switch .wf-boolean-switch').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - $(this).find('.wf-boolean-switch-handle').trigger('click'); - }); - - $(this).find('.wf-boolean-switch-handle').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wf-option'); - if (optionElement.hasClass('wf-option-premium') || optionElement.hasClass('wf-disabled')) { - return; - } - - var switchElement = $(this).closest('.wf-boolean-switch'); - var option = optionElement.data('option'); - var value = false; - var isActive = switchElement.hasClass('wf-active'); - if (isActive) { - switchElement.removeClass('wf-active').attr('aria-checked', 'false'); - value = optionElement.data('disabledValue'); - } - else { - switchElement.addClass('wf-active').attr('aria-checked', 'true'); - value = optionElement.data('enabledValue'); - } - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }); - - $(this).parent().find('.wf-option-title').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).parent().find('.wf-boolean-switch-handle').trigger('click'); - }).css('cursor', 'pointer'); - }); - - //On/Off Segmented Option - $('.wf-option.wf-option-toggled-segmented [type=radio]').each(function() { - $(this).on('click', function(e) { - var optionElement = $(this).closest('.wf-option'); - if (optionElement.hasClass('wf-option-premium') || optionElement.hasClass('wf-disabled')) { - return; - } - - var option = optionElement.data('option'); - var value = this.value; - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }); - }); - - //On/Off Multiple Option - $('.wf-option.wf-option-toggled-multiple .wf-option-checkbox').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wf-option'); - if (optionElement.hasClass('wf-option-premium') || optionElement.hasClass('wf-disabled')) { - return; - } - - var checkboxElement = $(this).closest('ul'); - var option = checkboxElement.data('option'); - var value = false; - var isActive = $(this).hasClass('wf-checked'); - if (isActive) { - $(this).removeClass('wf-checked').attr('aria-checked', 'false'); - value = checkboxElement.data('disabledValue'); - } - else { - $(this).addClass('wf-checked').attr('aria-checked', 'true'); - value = checkboxElement.data('enabledValue'); - } - - var originalValue = checkboxElement.data('originalValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }); - }); - - //On/Off Option with menu and Option with menu - $('.wf-option.wf-option-toggled-select .wf-option-checkbox').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wf-option'); - if (optionElement.hasClass('wf-option-premium') || optionElement.hasClass('wf-disabled')) { - return; - } - - var selectElement = optionElement.find('.wf-option-select select'); - var option = optionElement.data('toggleOption'); - var value = false; - var isActive = $(this).hasClass('wf-checked'); - if (isActive) { - $(this).removeClass('wf-checked').attr('aria-checked', 'false'); - selectElement.attr('disabled', true); - value = optionElement.data('disabledToggleValue'); - } - else { - $(this).addClass('wf-checked').attr('aria-checked', 'true'); - selectElement.attr('disabled', false); - value = optionElement.data('enabledToggleValue'); - } - - if (option === undefined) { - return; - } - - var originalValue = optionElement.data('originalToggleValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }); - - $(this).parent().find('.wf-option-title').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).closest('.wf-option').find('.wf-option-checkbox').trigger('click'); - }).css('cursor', 'pointer'); - }); - - $('.wf-option.wf-option-toggled-select > .wf-option-content > ul > li.wf-option-select select, .wf-option.wf-option-select > .wf-option-content > ul > li.wf-option-select select, .wf-option.wf-option-select > li.wf-option-select select').each(function() { - if (!$.fn.wfselect2) { return; } - - var width = WFAD.isSmallScreen ? '200px' : 'resolve'; - if ($(this).data('preferredWidth')) { - width = $(this).data('preferredWidth'); - } - - $(this).wfselect2({ - minimumResultsForSearch: -1, - width: width - }).on('change', function () { - var optionElement = $(this).closest('.wf-option'); - var option = optionElement.data('selectOption'); - var value = $(this).val(); - - if (option === undefined) { - return; - } - - var originalValue = optionElement.data('originalSelectValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }); - }).triggerHandler('change'); - - //Text field option - $('.wf-option.wf-option-text > .wf-option-content > ul > li.wf-option-text input').on('change paste keyup', function() { - var e = this; - - setTimeout(function() { - var optionElement = $(e).closest('.wf-option'); - var option = optionElement.data('textOption'); - - if (typeof option !== 'undefined') { - var value = $(e).val(); - - var originalValue = optionElement.data('originalTextValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - } - }, 4); - }); - - //Text area option - $('.wf-option.wf-option-textarea > .wf-option-content > ul > li.wf-option-textarea textarea').on('change paste keyup', function() { - var e = this; - - setTimeout(function() { - var optionElement = $(e).closest('.wf-option'); - var option = optionElement.data('textOption'); - var value = $(e).val(); - - var originalValue = optionElement.data('originalTextValue'); - if (originalValue == value) { - delete WFAD.pendingChanges[option]; - } - else { - WFAD.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFAD.updatePendingChanges(); - }, 4); - }); - - //Value entry token option - if ($.fn.wfselect2) { - $('.wf-option.wf-option-token select').wfselect2({ - tags: true, - tokenSeparators: [','], - width: 'element', - minimumResultsForSearch: -1, - selectOnClose: true, - matcher: function(params, data) { - return null; - } - }).on('wfselect2:unselect', function(e){ - jQuery(e.params.data.element).remove(); - }).on('wfselect2:opening wfselect2:close', function(e){ - $('body').toggleClass('wf-select2-suppress-dropdown', e.type == 'wfselect2:opening'); - }).on('change', function () { - var optionElement = $(this).closest('.wf-option'); - var option = optionElement.data('tokenOption'); - var value = $(this).val(); - if (!(value instanceof Array)) { - value = []; - } - - var selected = $(this).find('option:selected'); - var tagsElement = optionElement.find('.wf-option-token-tags'); - var list = $(' - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_ips.php b/wp/wp-content/plugins/wordfence/lib/dashboard/widget_ips.php deleted file mode 100644 index 2c553f74..00000000 --- a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_ips.php +++ /dev/null @@ -1,131 +0,0 @@ - - -
-
-
-
-
-
- -
-
-
-
-
- learningModeStatus() !== false): ?> -
- -
    -
  • -
    - -
    - ips24h) == 0): ?> -

    - - ips24h, 0, min($limit, count($d->ips24h)), true); include(dirname(__FILE__) . '/widget_content_ips.php'); ?> - ips24h) > $limit && $initial): ?> -
    - - -
    -
    - ips7d) == 0): ?> -

    - - ips7d, 0, min($limit, count($d->ips7d)), true); include(dirname(__FILE__) . '/widget_content_ips.php'); ?> - ips7d) > $limit && $initial): ?> -
    - - -
    -
    - ips30d) == 0): ?> -

    - - ips30d, 0, min($limit, count($d->ips30d)), true); include(dirname(__FILE__) . '/widget_content_ips.php'); ?> - ips30d) > $limit && $initial): ?> -
    - - -
    - -
    -
  • -
- -
-
-
-
- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_localattacks.php b/wp/wp-content/plugins/wordfence/lib/dashboard/widget_localattacks.php deleted file mode 100644 index 43fc0455..00000000 --- a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_localattacks.php +++ /dev/null @@ -1,78 +0,0 @@ - -
-
-
-
-
-
- -
-
-
-
-
- learningModeStatus() !== false): ?> -
- -
    -
  • - localBlocks as $row) { - if ($row['24h'] > 0 || $row['7d'] > 0 || $row['30d'] > 0) { - $hasSome = true; - break; - } - } - - if (!$hasSome): - ?> -

    - - - - - - 0, '7d' => 0, '30d' => 0); - foreach ($d->localBlocks as $row): ?> - - - - - - - - __('Today', 'wordfence'), '7d' => __('Week', 'wordfence'), '30d' => __('Month', 'wordfence')); - foreach ($keys as $k => $title): ?> - - - localBlocks as $row): ?> - > - - - - - - - - - localBlocks as $row): ?> - > - - - - -
    Block Type', 'wordfence'), array('span'=>array('class'=>array()))); ?>>
    -

    ()

    - -
  • -
- -
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_logins.php b/wp/wp-content/plugins/wordfence/lib/dashboard/widget_logins.php deleted file mode 100644 index ed7fae39..00000000 --- a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_logins.php +++ /dev/null @@ -1,110 +0,0 @@ - - -
-
-
-
-
-
- -
-
-
-
-
-
    -
  • -
    -
    -
      -
    • -
    • -
    -
    -
    - loginsSuccess) == 0): ?> -

    - - loginsSuccess, 0, min(10, count($d->loginsSuccess)), true); include(dirname(__FILE__) . '/widget_content_logins.php'); ?> - loginsSuccess) > 10): ?> -
    - - -
    -
    - loginsFail) == 0): ?> -

    - - loginsFail, 0, min(10, count($d->loginsFail)), true); include(dirname(__FILE__) . '/widget_content_logins.php'); ?> - loginsFail) > 10): ?> -
    - - -
    - -
    -
  • -
-
-
-
-
- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_networkattacks.php b/wp/wp-content/plugins/wordfence/lib/dashboard/widget_networkattacks.php deleted file mode 100644 index 3324bdb3..00000000 --- a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_networkattacks.php +++ /dev/null @@ -1,212 +0,0 @@ - -
-
-
-
-
-
- -
-
-
-
-
-
    -
  • - networkBlock24h === null): ?> -

    - -
    -
    -
      -
    • -
    • -
    -
    -
    -
    -
    -
    - - -
  • -
-

lastGenerated))); ?>

-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_notifications.php b/wp/wp-content/plugins/wordfence/lib/dashboard/widget_notifications.php deleted file mode 100644 index f73274d9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/dashboard/widget_notifications.php +++ /dev/null @@ -1,138 +0,0 @@ - -
-
-
-
-
-
- notifications)); ?> -
-
-
-
-
-
    - notifications as $n): ?> -
  • -
    html; ?>
    - links as $l): ?> - - -
    -
  • - - notifications) == 0): ?> -
  • - -
-
-
-
- -
-
-
- -
-

-

wordfenceCentralConnected) { - echo esc_html(sprintf( - /* translators: 1. Email address. 2. Localized date. */ - __('Connected by %1$s on %2$s', 'wordfence'), $d->wordfenceCentralConnectEmail, date_i18n(get_option('date_format'), $d->wordfenceCentralConnectTime))); - } elseif ($d->wordfenceCentralDisconnected) { - echo esc_html(sprintf( - /* translators: 1. Email address. 2. Localized date. */ - __('Disconnected by %1$s on %2$s', 'wordfence'), $d->wordfenceCentralDisconnectEmail, date_i18n(get_option('date_format'), $d->wordfenceCentralDisconnectTime))); - } elseif (wfCentral::isPartialConnection()) { - _e('It looks like you\'ve tried to connect this site to Wordfence Central, but the installation did not finish.', 'wordfence'); - } else { - _e('Wordfence Central allows you to manage Wordfence on multiple sites from one location. It makes security monitoring and configuring Wordfence easier.', 'wordfence'); - } - ?>

- -
-
-
-
- -
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/diffResult.php b/wp/wp-content/plugins/wordfence/lib/diffResult.php deleted file mode 100644 index ced6aca4..00000000 --- a/wp/wp-content/plugins/wordfence/lib/diffResult.php +++ /dev/null @@ -1,46 +0,0 @@ - - - - - -?ver=' type='text/css' media='all' /> - - -

-

- -

- - -"; - } else if($cType == 'theme'){ - echo esc_html__('Theme File', 'wordfence') . ""; - } else if($cType == 'plugin'){ - echo esc_html__('Plugin File', 'wordfence') . ""; - } else { - echo esc_html__('Unknown Type', 'wordfence') . ""; - } - ?> -
" . - esc_html__('Theme Name:', 'wordfence') - . "" . wp_kses($_GET['cName'], array()) . "
" . - esc_html__('Theme Version:', 'wordfence') . "" . wp_kses($_GET['cVersion'], array()) . "
" . - esc_html__('Plugin Name:', 'wordfence') . "" . wp_kses($_GET['cName'], array()) . "
" . - esc_html__('Plugin Version:', 'wordfence') . "" . wp_kses($_GET['cVersion'], array()) . "
- -" . esc_html__('There are no differences between the original file and the file in the repository.', 'wordfence'); - } - -?> - - -
Wordfence.com for help, security updates and more.', 'wordfence'), date_i18n('Y', WORDFENCE_EPOCH), date_i18n('Y')), array('a'=>array('href'=>array()))) ?>
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/email_genericAlert.php b/wp/wp-content/plugins/wordfence/lib/email_genericAlert.php deleted file mode 100644 index 9b354ad3..00000000 --- a/wp/wp-content/plugins/wordfence/lib/email_genericAlert.php +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - --- - - - - - diff --git a/wp/wp-content/plugins/wordfence/lib/email_newIssues.php b/wp/wp-content/plugins/wordfence/lib/email_newIssues.php deleted file mode 100644 index 5fb17b25..00000000 --- a/wp/wp-content/plugins/wordfence/lib/email_newIssues.php +++ /dev/null @@ -1,164 +0,0 @@ - -scanOptions(); ?> -

- -

0) { - printf( - /* translators: 1. URL to the site's homepage. 2. Number of scan results. */ - _n('Wordfence found the following new issues on "%1$s" (%2$d existing issue was also found again).', - 'Wordfence found the following new issues on "%1$s" (%2$d existing issues were also found again).', - count($previousIssues), - 'wordfence'), - esc_html(get_bloginfo('name', 'raw')), - count($previousIssues) - ); - } else { - echo esc_html(sprintf( - /* translators: 1. URL to the site's homepage. */ - __('Wordfence found the following new issues on "%1$s".', 'wordfence'), - get_bloginfo('name', 'raw') - )); - } - - - ?>

- -

- -
- -

- - -
- -
- - - -
- %2$s or read more about scan options to improve scan speed here: %4$s', 'wordfence'), esc_attr(wfUtils::wpAdminURL('admin.php?page=WordfenceScan&subpage=scan_options#wf-scanner-options-performance')), esc_attr(wfUtils::wpAdminURL('admin.php?page=WordfenceScan&subpage=scan_options')), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_TIME_LIMIT), esc_html(wfSupportController::supportURL(wfSupportController::ITEM_SCAN_TIME_LIMIT))), array('a'=>array('href'=>array()))); ?> -
- - - __('Critical Problems:', 'wordfence'), - wfIssues::SEVERITY_HIGH => __('High Severity Problems:', 'wordfence'), - wfIssues::SEVERITY_MEDIUM => __('Medium Severity Problems:', 'wordfence'), - wfIssues::SEVERITY_LOW => __('Low Severity Problems:', 'wordfence'), -); -?> - - $severityLabel): - if ($severityLevel < $level) { - continue; - } - $hasIssuesAtSeverity = false; - - foreach($issues as $i){ if($i['severity'] == $severityLevel){ ?> - -

- -

*

-' . esc_html__('Plugin contains an unpatched security vulnerability.', 'wordfence') . ''; - if (isset($i['tmplData']['cvssScore'])) { - echo '
' . esc_html__('Vulnerability Severity', 'wordfence') . ': ' . number_format($i['tmplData']['cvssScore'], 1) . '/10.0 (' . wfUpdateCheck::cvssScoreSeverityLabel($i['tmplData']['cvssScore']) . ')'; - } - if (isset($i['tmplData']['vulnerabilityLink'])) { - echo '
' . esc_html__('Vulnerability Information', 'wordfence') . ''; - } - echo '

'; - } - } - if ($i['type'] == 'coreUnknown') { - echo '

' . esc_html__('The core files scan has not run because this version is not currently indexed by Wordfence. New WordPress versions may take up to a day to be indexed.', 'wordfence') . '

'; - } - else if ($i['type'] == 'wafStatus') { - echo '

' . esc_html__('Firewall issues may be caused by file permission changes or other technical problems.', 'wordfence') . ' ' . esc_html__('More Details and Instructions', 'wordfence') . '

'; - } - else if ($i['type'] == 'skippedPaths') { - echo '

' . esc_html__('Scanning additional paths is optional and is not always necessary.', 'wordfence') . ' ' . esc_html__('Learn More', 'wordfence') . '

'; - } - - $showWPParagraph = !empty($i['tmplData']['vulnerable']) || isset($i['tmplData']['wpURL']); - if ($showWPParagraph) { - echo '

'; - } - if (!empty($i['tmplData']['vulnerable'])) { - if (isset($i['tmplData']['updateAvailable']) && $i['tmplData']['updateAvailable'] !== false) - echo '' . esc_html__('Update includes security-related fixes.', 'wordfence') . ''; - if (isset($i['tmplData']['cvssScore'])) { - echo '
' . esc_html__('Vulnerability Severity', 'wordfence') . ': ' . number_format($i['tmplData']['cvssScore'], 1) . '/10.0 (' . wfUpdateCheck::cvssScoreSeverityLabel($i['tmplData']['cvssScore']) . ')'; - } - if (isset($i['tmplData']['vulnerabilityLink'])) { - echo ' ' . esc_html__('Vulnerability Information', 'wordfence') . ''; - } - } - if (isset($i['tmplData']['wpURL'])) { - if(!empty($i['tmplData']['vulnerable'])) - echo '
'; - echo $i['tmplData']['wpURL'] . '/#developers'; - } - if ($showWPParagraph) { - echo '

'; - } - ?> - -getTextImageURL($i['tmplData']['badURL']), 'https'); -?> -

<?php esc_html_e('The malicious URL matched', 'wordfence') ?>

- - - - - - 0) { - $sentences[] = sprintf(/* translators: Number of scan results */ _n('%d issue was omitted from this email due to length limits.', '%d issues were omitted from this email due to length limits.', $issuesNotShown, 'wordfence'), $issuesNotShown); - $sentences[] = esc_html__('View every issue:', 'wordfence') . sprintf(' %s', esc_attr(wfUtils::wpAdminURL('admin.php?page=WordfenceScan')), esc_html(wfUtils::wpAdminURL('admin.php?page=WordfenceScan'))); -} - -if (count($sentences)) { - printf('

%s

', implode(' ', $sentences)); -} -?> - - -

- -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
- -


https://www.wordfence.com/zz2/wordfence-signup/

- - -

\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/email_unlockRequest.php b/wp/wp-content/plugins/wordfence/lib/email_unlockRequest.php deleted file mode 100644 index 21e0e578..00000000 --- a/wp/wp-content/plugins/wordfence/lib/email_unlockRequest.php +++ /dev/null @@ -1,22 +0,0 @@ - -%1$s requested instructions to regain access to the website %3$s.', 'wordfence'), esc_html($IP), esc_attr(wfUtils::getSiteBaseURL()), esc_html($siteName)), array('a'=>array('href'=>array()), 'b'=>array())); ?> -

- -

-
-will be valid for 30 minutes from the time they were sent.', 'wordfence'), array('b'=>array())); ?> -
    -
  • - -
  • -
  • - -
  • -
  • - . -
  • -
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/email_unsubscribeRequest.php b/wp/wp-content/plugins/wordfence/lib/email_unsubscribeRequest.php deleted file mode 100644 index af841e52..00000000 --- a/wp/wp-content/plugins/wordfence/lib/email_unsubscribeRequest.php +++ /dev/null @@ -1,14 +0,0 @@ - -%1$s requested an alert unsubscribe link for the website %3$s.', 'wordfence'), esc_html($IP), esc_attr($siteURL), esc_html($siteName)), array('a'=>array('href'=>array()), 'b'=>array())); ?> -

- -

- -

-Click here (' . esc_html__('opens in new tab', 'wordfence') . ') to stop receiving security alerts.', 'wordfence'), wfUtils::getSiteBaseURL() . '?_wfsf=removeAlertEmail&jwt=' . $jwt), array('a'=>array('href'=>array(), 'target'=>array()))); ?> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/flags.php b/wp/wp-content/plugins/wordfence/lib/flags.php deleted file mode 100644 index da258118..00000000 --- a/wp/wp-content/plugins/wordfence/lib/flags.php +++ /dev/null @@ -1,264 +0,0 @@ - '-0px -0px', - 'ad' => '-16px -0px', - 'ae' => '-32px -0px', - 'af' => '-48px -0px', - 'ag' => '-64px -0px', - 'ai' => '-80px -0px', - 'al' => '-96px -0px', - 'am' => '-112px -0px', - 'an' => '-128px -0px', - 'ao' => '-144px -0px', - 'ap' => '-160px -0px', - 'aq' => '-176px -0px', - 'ar' => '-0px -11px', - 'as' => '-16px -11px', - 'at' => '-32px -11px', - 'au' => '-48px -11px', - 'aw' => '-64px -11px', - 'ax' => '-80px -11px', - 'az' => '-96px -11px', - 'ba' => '-112px -11px', - 'bb' => '-128px -11px', - 'bd' => '-144px -11px', - 'be' => '-160px -11px', - 'bf' => '-176px -11px', - 'bg' => '-0px -22px', - 'bh' => '-16px -22px', - 'bi' => '-32px -22px', - 'bj' => '-48px -22px', - 'bl' => '-64px -22px', - 'bm' => '-80px -22px', - 'bn' => '-96px -22px', - 'bo' => '-112px -22px', - 'bq' => '-128px -22px', - 'br' => '-144px -22px', - 'bs' => '-160px -22px', - 'bt' => '-176px -22px', - 'bv' => '-0px -33px', - 'bw' => '-16px -33px', - 'by' => '-32px -33px', - 'bz' => '-48px -33px', - 'ca' => '-64px -33px', - 'cc' => '-80px -33px', - 'cd' => '-96px -33px', - 'cf' => '-112px -33px', - 'cg' => '-128px -33px', - 'ch' => '-144px -33px', - 'ci' => '-160px -33px', - 'ck' => '-176px -33px', - 'cl' => '-0px -44px', - 'cm' => '-16px -44px', - 'cn' => '-32px -44px', - 'co' => '-48px -44px', - 'cr' => '-64px -44px', - 'cs' => '-80px -44px', - 'cu' => '-96px -44px', - 'cv' => '-112px -44px', - 'cw' => '-128px -44px', - 'cx' => '-144px -44px', - 'cy' => '-160px -44px', - 'cz' => '-176px -44px', - 'de' => '-0px -55px', - 'dj' => '-16px -55px', - 'dk' => '-32px -55px', - 'dm' => '-48px -55px', - 'do' => '-64px -55px', - 'dz' => '-80px -55px', - 'ec' => '-96px -55px', - 'ee' => '-112px -55px', - 'eg' => '-128px -55px', - 'eh' => '-144px -55px', - 'england' => '-160px -55px', - 'er' => '-176px -55px', - 'es' => '-0px -66px', - 'et' => '-16px -66px', - 'eu' => '-32px -66px', - 'fam' => '-48px -66px', - 'fi' => '-64px -66px', - 'fj' => '-80px -66px', - 'fk' => '-96px -66px', - 'fm' => '-112px -66px', - 'fo' => '-128px -66px', - 'fr' => '-144px -66px', - 'ga' => '-160px -66px', - 'gb' => '-176px -66px', - 'gd' => '-0px -77px', - 'ge' => '-16px -77px', - 'gf' => '-32px -77px', - 'gg' => '-48px -77px', - 'gh' => '-64px -77px', - 'gi' => '-80px -77px', - 'gl' => '-96px -77px', - 'gm' => '-112px -77px', - 'gn' => '-128px -77px', - 'gp' => '-144px -77px', - 'gq' => '-160px -77px', - 'gr' => '-176px -77px', - 'gs' => '-0px -88px', - 'gt' => '-16px -88px', - 'gu' => '-32px -88px', - 'gw' => '-48px -88px', - 'gy' => '-64px -88px', - 'hk' => '-80px -88px', - 'hm' => '-96px -88px', - 'hn' => '-112px -88px', - 'hr' => '-128px -88px', - 'ht' => '-144px -88px', - 'hu' => '-160px -88px', - 'id' => '-176px -88px', - 'ie' => '-0px -99px', - 'il' => '-16px -99px', - 'im' => '-32px -99px', - 'in' => '-48px -99px', - 'io' => '-64px -99px', - 'iq' => '-80px -99px', - 'ir' => '-96px -99px', - 'is' => '-112px -99px', - 'it' => '-128px -99px', - 'je' => '-144px -99px', - 'jm' => '-160px -99px', - 'jo' => '-176px -99px', - 'jp' => '-0px -110px', - 'ke' => '-16px -110px', - 'kg' => '-32px -110px', - 'kh' => '-48px -110px', - 'ki' => '-64px -110px', - 'km' => '-80px -110px', - 'kn' => '-96px -110px', - 'kp' => '-112px -110px', - 'kr' => '-128px -110px', - 'kw' => '-144px -110px', - 'ky' => '-160px -110px', - 'kz' => '-176px -110px', - 'la' => '-0px -121px', - 'lb' => '-16px -121px', - 'lc' => '-32px -121px', - 'li' => '-48px -121px', - 'lk' => '-64px -121px', - 'lr' => '-80px -121px', - 'ls' => '-96px -121px', - 'lt' => '-112px -121px', - 'lu' => '-128px -121px', - 'lv' => '-144px -121px', - 'ly' => '-160px -121px', - 'ma' => '-176px -121px', - 'mc' => '-0px -132px', - 'md' => '-16px -132px', - 'me' => '-32px -132px', - 'mf' => '-48px -132px', - 'mg' => '-64px -132px', - 'mh' => '-80px -132px', - 'mk' => '-96px -132px', - 'ml' => '-112px -132px', - 'mm' => '-128px -132px', - 'mn' => '-144px -132px', - 'mo' => '-160px -132px', - 'mp' => '-176px -132px', - 'mq' => '-0px -143px', - 'mr' => '-16px -143px', - 'ms' => '-32px -143px', - 'mt' => '-48px -143px', - 'mu' => '-64px -143px', - 'mv' => '-80px -143px', - 'mw' => '-96px -143px', - 'mx' => '-112px -143px', - 'my' => '-128px -143px', - 'mz' => '-144px -143px', - 'na' => '-160px -143px', - 'nc' => '-176px -143px', - 'ne' => '-0px -154px', - 'nf' => '-16px -154px', - 'ng' => '-32px -154px', - 'ni' => '-48px -154px', - 'nl' => '-64px -154px', - 'no' => '-80px -154px', - 'np' => '-96px -154px', - 'nr' => '-112px -154px', - 'nu' => '-128px -154px', - 'nz' => '-144px -154px', - 'om' => '-160px -154px', - 'pa' => '-176px -154px', - 'pe' => '-0px -165px', - 'pf' => '-16px -165px', - 'pg' => '-32px -165px', - 'ph' => '-48px -165px', - 'pk' => '-64px -165px', - 'pl' => '-80px -165px', - 'pm' => '-96px -165px', - 'pn' => '-112px -165px', - 'pr' => '-128px -165px', - 'ps' => '-144px -165px', - 'pt' => '-160px -165px', - 'pw' => '-176px -165px', - 'py' => '-0px -176px', - 'qa' => '-16px -176px', - 're' => '-32px -176px', - 'ro' => '-48px -176px', - 'rs' => '-64px -176px', - 'ru' => '-80px -176px', - 'rw' => '-96px -176px', - 'sa' => '-112px -176px', - 'sb' => '-128px -176px', - 'sc' => '-144px -176px', - 'scotland' => '-160px -176px', - 'sd' => '-176px -176px', - 'se' => '-0px -187px', - 'sg' => '-16px -187px', - 'sh' => '-32px -187px', - 'si' => '-48px -187px', - 'sj' => '-64px -187px', - 'sk' => '-80px -187px', - 'sl' => '-96px -187px', - 'sm' => '-112px -187px', - 'sn' => '-128px -187px', - 'so' => '-144px -187px', - 'sr' => '-160px -187px', - 'ss' => '-176px -187px', - 'st' => '-0px -198px', - 'sv' => '-16px -198px', - 'sx' => '-32px -198px', - 'sy' => '-48px -198px', - 'sz' => '-64px -198px', - 'tc' => '-80px -198px', - 'td' => '-96px -198px', - 'tf' => '-112px -198px', - 'tg' => '-128px -198px', - 'th' => '-144px -198px', - 'tj' => '-160px -198px', - 'tk' => '-176px -198px', - 'tl' => '-0px -209px', - 'tm' => '-16px -209px', - 'tn' => '-32px -209px', - 'to' => '-48px -209px', - 'tr' => '-64px -209px', - 'tt' => '-80px -209px', - 'tv' => '-96px -209px', - 'tw' => '-112px -209px', - 'tz' => '-128px -209px', - 'ua' => '-144px -209px', - 'ug' => '-160px -209px', - 'uk' => '-176px -209px', - 'um' => '-0px -220px', - 'un' => '-16px -220px', - 'us' => '-32px -220px', - 'uy' => '-48px -220px', - 'uz' => '-64px -220px', - 'va' => '-80px -220px', - 'vc' => '-96px -220px', - 've' => '-112px -220px', - 'vg' => '-128px -220px', - 'vi' => '-144px -220px', - 'vn' => '-160px -220px', - 'vu' => '-176px -220px', - 'wales' => '-0px -231px', - 'wf' => '-16px -231px', - 'ws' => '-32px -231px', - 'xk' => '-48px -231px', - 'ye' => '-64px -231px', - 'yt' => '-80px -231px', - 'za' => '-96px -231px', - 'zm' => '-112px -231px', - 'zw' => '-128px -231px', -); \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/live_activity.php b/wp/wp-content/plugins/wordfence/lib/live_activity.php deleted file mode 100644 index ac5a0e87..00000000 --- a/wp/wp-content/plugins/wordfence/lib/live_activity.php +++ /dev/null @@ -1,12 +0,0 @@ - -
-
-
-
-
-
- -

- -
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_dashboard.php b/wp/wp-content/plugins/wordfence/lib/menu_dashboard.php deleted file mode 100644 index 5d1ef519..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_dashboard.php +++ /dev/null @@ -1,488 +0,0 @@ - -render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
-
-
-
- __('Wordfence Dashboard', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD), - 'helpLabelHTML' => wp_kses(__('Learn more about the Dashboard', 'wordfence'), array('span'=>array('class'=>array()))), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
-
-
    -
  • - $firewall, - 'scanner' => $scanner, - 'dashboard' => $d, - ))->render(); - ?> -
  • -
  • -
      -
    • - 'waf-coverage', - 'percentage' => $firewall->overallStatus(), - 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), - 'title' => __('Firewall', 'wordfence'), - 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('WAF Currently in Learning Mode', 'wordfence') : __('Protection from known and emerging threats', 'wordfence')), - 'link' => wfPage::pageURL(wfPage::PAGE_FIREWALL_OPTIONS, wfPage::PAGE_DASHBOARD), - 'linkLabel' => __('Manage Firewall', 'wordfence'), - 'statusTitle' => __('Firewall Status', 'wordfence'), - 'statusList' => $firewall->statusList(), - 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), - 'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - 'wf-scanner-type', - 'percentage' => $scanner->scanTypeStatus(), - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Scan', 'wordfence'), - 'subtitle' => __('Detection of security issues', 'wordfence'), - 'link' => wfPage::pageURL(wfPage::PAGE_SCAN_OPTIONS, wfPage::PAGE_DASHBOARD), - 'linkLabel' => __('Manage Scan', 'wordfence'), - 'statusTitle' => __('Scan Status', 'wordfence'), - 'statusList' => $scanner->scanTypeStatusList(), - 'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - - 'wf-premium-alert', - 'title' => __('Premium License Conflict', 'wordfence'), - 'subtitle' => __('License already in use', 'wordfence'), - 'link' => 'https://www.wordfence.com/gnl1manageConflict/manage-wordfence-api-keys/', - 'linkLabel' => __('Reset License', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - ?> - - 'wf-premium-alert', - 'title' => __('Premium Protection Disabled', 'wordfence'), - 'subtitle' => __('License is expired', 'wordfence'), - 'link' => 'https://www.wordfence.com/gnl1renewExpired/manage-wordfence-api-keys/', - 'linkLabel' => __('Renew License', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - ?> - - 'wf-premium-alert', - 'title' => __('Premium Protection Disabled', 'wordfence'), - 'subtitleHtml' => wp_kses(__('The license you were using has been removed from your account. Please reach out to billing@wordfence.com or create a Premium support case at https://support.wordfence.com/support/tickets (opens in new tab) for more information. Our staff is happy to help.', 'wordfence'), array('a'=>array('href'=>array(), 'target'=>array()), 'span'=>array('class'=>array()))), - 'link' => null, - 'linkLabel' => null - ))->render(); - ?> - -
      -

      -

      -

         ()

      -
      - - 'wf-premium-alert', - 'title' => __('Premium License Expiring', 'wordfence'), - 'subtitle' => __('Auto-renew is disabled', 'wordfence'), - 'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/', - 'linkLabel' => __('Renew License', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - ?> - - 'wf-premium-alert', - 'title' => $title, - 'subtitle' => $subtitle, - 'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/', - 'linkLabel' => __('Update Payment Method', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - } - else { - $days = floor(((int) wfConfig::get('premiumNextRenew') - time()) / 86400); - if ($days == 0) { - $subtitle = __('License renews today', 'wordfence'); - } - else if ($days == 1) { - $subtitle = __('License renews in 1 day', 'wordfence'); - } - else { - $subtitle = sprintf(__('License renews in %d days', 'wordfence'), $days); - } - - echo wfView::create('dashboard/status-renewing', array( - 'id' => 'wf-premium-alert', - 'title' => __('Premium License Expiring', 'wordfence'), - 'subtitle' => $subtitle, - 'link' => 'https://www.wordfence.com/gnl1reviewExpiring/manage-wordfence-api-keys/', - 'linkLabel' => __('Review Payment Method', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - } - ?> - isPaidAndCurrent()): ?> -
      -
      -
      getTypeLabel(true))); ?>
      - isBelowResponse()): ?> -

      - isBelowCare()): ?> - - - - -

      - -
      - -
    • -
    -
  • -
-
-
-
-
- - - -
-
-
-
-
    -
  • -
      -
    • - 'wf-dashboard-option-tools', - 'img' => 'tools.svg', - 'title' => __('Tools', 'wordfence'), - 'subtitle' => __('Live Traffic, Whois Lookup, Import/Export, and Diagnostics', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceTools'), - ))->render(); - ?> -
    • -
    • - 'wf-dashboard-option-support', - 'img' => 'support.svg', - 'title' => __('Help', 'wordfence'), - 'subtitle' => __('Find the documentation and help you need', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceSupport'), - ))->render(); - ?> -
    • -
    • - 'wf-dashboard-option-options', - 'img' => 'options.svg', - 'title' => __('Global Options', 'wordfence'), - 'subtitle' => __('Manage global options for Wordfence such as alerts, premium status, and more', 'wordfence'), - 'link' => network_admin_url('admin.php?page=Wordfence&subpage=global_options'), - ))->render(); - ?> -
    • -
    -
  • -
-
-
-
-
-
-
- - - -
-
- - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_dashboard_options.php b/wp/wp-content/plugins/wordfence/lib/menu_dashboard_options.php deleted file mode 100644 index f774a688..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_dashboard_options.php +++ /dev/null @@ -1,306 +0,0 @@ - - -
-
-
- $dashboardURL, - 'backLabelHTML' => wp_kses(__('Back to Dashboard', 'wordfence'), array('span'=>array('class'=>array()))), - 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_GLOBAL, - 'restoreDefaultsMessage' => __('Are you sure you want to restore the default global settings? This will undo any custom changes you have made to the options on this page. Your configured license key and alert emails will not be changed.', 'wordfence'), - ))->render(); - ?> -
-
-
-
-render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
-
-
-
-
-
-
-
-
- __('Wordfence Global Options', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTIONS), - 'helpLabelHTML' => wp_kses(__('Learn more about Global Options', 'wordfence'), array('span'=>array('class'=>array()))), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
    -
  • -
      -
    • - 'waf-coverage', - 'percentage' => $firewall->overallStatus(), - 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), - 'title' => __('Firewall', 'wordfence'), - 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('WAF Currently in Learning Mode', 'wordfence') : __('Protection from known and emerging threats', 'wordfence')), - 'link' => wfPage::pageURL(wfPage::PAGE_FIREWALL_OPTIONS, wfPage::PAGE_DASHBOARD_OPTIONS), - 'linkLabel' => __('Manage Firewall', 'wordfence'), - 'statusTitle' => __('Firewall Status', 'wordfence'), - 'statusList' => $firewall->statusList(), - 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), - 'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - 'wf-scanner-type', - 'percentage' => $scanner->scanTypeStatus(), - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Scan', 'wordfence'), - 'subtitle' => __('Detection of security issues', 'wordfence'), - 'link' => wfPage::pageURL(wfPage::PAGE_SCAN_OPTIONS, wfPage::PAGE_DASHBOARD_OPTIONS), - 'linkLabel' => __('Manage Scan', 'wordfence'), - 'statusTitle' => __('Scan Status', 'wordfence'), - 'statusList' => $scanner->scanTypeStatusList(), - 'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - - 'wf-premium-alert', - 'title' => __('Premium License Conflict', 'wordfence'), - 'subtitle' => __('License already in use', 'wordfence'), - 'link' => 'https://www.wordfence.com/gnl1manageConflict/manage-wordfence-api-keys/', - 'linkLabel' => __('Reset License', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - ?> - - 'wf-premium-alert', - 'title' => __('Premium Protection Disabled', 'wordfence'), - 'subtitle' => __('License is expired', 'wordfence'), - 'link' => 'https://www.wordfence.com/gnl1renewExpired/manage-wordfence-api-keys/', - 'linkLabel' => __('Renew License', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - ?> - - 'wf-premium-alert', - 'title' => __('Premium Protection Disabled', 'wordfence'), - 'subtitleHtml' => wp_kses(__('The license you were using has been removed from your account. Please reach out to billing@wordfence.com or create a Premium support case at https://support.wordfence.com/support/tickets (opens in new tab) for more information. Our staff is happy to help.', 'wordfence'), array('a'=>array('href'=>array(), 'target'=>array()), 'span'=>array('class'=>array()))), - 'link' => null, - 'linkLabel' => null - ))->render(); - ?> - -
      -

      -

      -

         ()

      -
      - - 'wf-premium-alert', - 'title' => __('Premium License Expiring', 'wordfence'), - 'subtitle' => __('Auto-renew is disabled', 'wordfence'), - 'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/', - 'linkLabel' => __('Renew License', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - ?> - - 'wf-premium-alert', - 'title' => $title, - 'subtitle' => sprintf(__('License renews %s', 'wordfence'), $days), - 'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/', - 'linkLabel' => __('Update Payment Method', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - } - else { - $days = floor(((int) wfConfig::get('premiumNextRenew') - time()) / 86400); - if ($days == 0) { - $days = __('today', 'wordfence'); - } - else if ($days == 1) { - $days = __('in 1 day', 'wordfence'); - } - else { - $days = sprintf(__('in %d days', 'wordfence'), $days); - } - - echo wfView::create('dashboard/status-renewing', array( - 'id' => 'wf-premium-alert', - 'title' => __('Premium License Expiring', 'wordfence'), - 'subtitle' => sprintf(__('License renews %s', 'wordfence'), $days), - 'link' => 'https://www.wordfence.com/gnl1reviewExpiring/manage-wordfence-api-keys/', - 'linkLabel' => __('Review Payment Method', 'wordfence'), - 'linkNewWindow' => true, - ))->render(); - } - ?> - -
      -
      -
      getPrefixedTypeLabel())); ?>
      - isBelowResponse()): ?> -

      - isBelowCare()): ?> - - - - -

      - -
      - -
    • -
    -
  • -
-
-
-
-
- 'global-options-license', - ))->render(); - - echo wfView::create('dashboard/options-group-view-customization', array( - 'stateKey' => 'global-options-view-customization', - ))->render(); - - echo wfView::create('dashboard/options-group-general', array( - 'stateKey' => 'global-options-general', - ))->render(); - - echo wfView::create('dashboard/options-group-dashboard', array( - 'stateKey' => 'global-options-dashboard', - ))->render(); - - echo wfView::create('dashboard/options-group-alert', array( - 'stateKey' => 'global-options-alert', - ))->render(); - - echo wfView::create('dashboard/options-group-email-summary', array( - 'stateKey' => 'global-options-email-summary', - ))->render(); - ?> -
-
-
-
-
-
- -
-
-
-
-
    -
  • -
      -
    • -
    • - -
    • -
    -
  • -
-
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_firewall.php b/wp/wp-content/plugins/wordfence/lib/menu_firewall.php deleted file mode 100644 index 5077864b..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_firewall.php +++ /dev/null @@ -1,48 +0,0 @@ -render(); - echo wfView::create('gdpr/banner')->render(); -} -?> - -

- -
-
- array( - new wfTab('waf', 'waf', __('Firewall', 'wordfence'), __('Web Application Firewall', 'wordfence')), - new wfTab('blocking', 'blocking', __('Blocking', 'wordfence'), __('Blocking', 'wordfence')), - ), - ))->render(); - ?> -
-
-
- __('Firewall', 'wordfence'), - 'headerID' => 'wf-section-firewall', - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF), - 'helpLabelHTML' => wp_kses(__('Learn more about the Firewall', 'wordfence'), array('span'=>array('class'=>array()))), - ))->render(); - require(dirname(__FILE__) . '/menu_firewall_waf.php'); - ?> -
-
- __('Blocking', 'wordfence'), - 'headerID' => 'wf-section-blocking', - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING), - 'helpLabelHTML' => wp_kses(__('Learn more about Blocking', 'wordfence'), array('span'=>array('class'=>array()))), - ))->render(); - require(dirname(__FILE__) . '/menu_firewall_blocking.php'); - ?> -
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_firewall_blocking.php b/wp/wp-content/plugins/wordfence/lib/menu_firewall_blocking.php deleted file mode 100644 index 8348e2c3..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_firewall_blocking.php +++ /dev/null @@ -1,231 +0,0 @@ - -
-
-
-
-
    -
  • - render(); - ?> -
  • -
-
-
-
-
-
-
-
- -
    -
  • Note: Blocking is disabled when the option "Enable Rate Limiting and Advanced Blocking" is off.', 'wordfence'), array('strong'=>array())); ?>
  • -
  • -
- - -
    -
  • Note: The GeoIP database that is required for country blocking has been updated to a new format. This new format requires sites to run PHP 5.4 or newer, and this site is on PHP %s. To ensure country blocking continues functioning, please update PHP.', 'wordfence'), wfUtils::cleanPHPVersion())); ?>
  • -
  • ()
  • -
- -
-
-
- -
-
-
-
- render(); - ?> -
-
-
-
-render(); -?> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_firewall_blocking_options.php b/wp/wp-content/plugins/wordfence/lib/menu_firewall_blocking_options.php deleted file mode 100644 index 7c4a92cf..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_firewall_blocking_options.php +++ /dev/null @@ -1,133 +0,0 @@ - - -
-
-
- $backPage->url(), - 'backLabelHTML' => wp_kses(sprintf( - /* translators: Page title/label. */ - __('Back to %s', 'wordfence'), $backPage->label()), array('span'=>array('class'=>array()))), - 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_BLOCKING, - 'restoreDefaultsMessage' => __('Are you sure you want to restore the default Blocking settings? This will undo any custom changes you have made to the options on this page. Any existing blocks will be preserved.', 'wordfence'), - ))->render(); - ?> -
-
-
-
-render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
- -
-
-
-
-
-
-
-
- __('Blocking Options', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING), - 'helpLabelHTML' => wp_kses(__('Learn more about Blocking', 'wordfence'), array('span'=>array('class'=>array()))), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
-
- -
-
-
-
-
-
    -
  • - 'displayTopLevelBlocking', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => wfConfig::get('displayTopLevelBlocking') ? 1 : 0, - 'title' => __('Display Blocking menu option', 'wordfence'), - ))->render(); - ?> -
  • -
-
-
-
-
- 'blocking-options-country', - 'collapseable' => false, - ))->render(); - ?> -
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_firewall_waf.php b/wp/wp-content/plugins/wordfence/lib/menu_firewall_waf.php deleted file mode 100644 index a56f6b20..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_firewall_waf.php +++ /dev/null @@ -1,359 +0,0 @@ -countriesNetwork); -$firewall = new wfFirewall(); -$config = $waf->getStorageEngine(); -$wafConfigURL = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#configureAutoPrepend'); -$wafRemoveURL = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#removeAutoPrepend'); -/** @var array $wafData */ -?> - -
-
-
-
-
    -
  • - $firewall, - 'dashboard' => $d, - ))->render(); - ?> -
  • -
  • -
      -
    • - 'waf-coverage', - 'percentage' => $firewall->wafStatus(), - 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), - 'title' => __('Web Application Firewall', 'wordfence'), - 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('Currently in Learning Mode', 'wordfence') : __('Stops Complex Attacks', 'wordfence')), - 'link' => $optionsURL, - 'linkLabel' => __('Manage WAF', 'wordfence'), - 'statusTitle' => __('Web Application Firewall Status', 'wordfence'), - 'statusList' => $firewall->wafStatusList(), - 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), - 'helpLink' => __('https://www.wordfence.com/help/firewall/#firewall-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - 'waf-rules', - 'percentage' => $firewall->ruleStatus(), - 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), - 'title' => __('Firewall Rules: ', 'wordfence') . ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? __('Premium', 'wordfence') : __('Community', 'wordfence')), - 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('Currently in Learning Mode', 'wordfence') : ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? __('Rules updated in real-time', 'wordfence') : __('Rule updates delayed by 30 days', 'wordfence'))), - 'link' => ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? $optionsURL . '#waf-options-advanced' : 'https://www.wordfence.com/gnl1wafUpgrade/wordfence-signup/'), - 'linkLabel' => ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? __('Manage Firewall Rules', 'wordfence') : __('Upgrade to Premium', 'wordfence')), - 'linkNewWindow' => ($firewall->ruleMode() != wfFirewall::RULE_MODE_PREMIUM), - 'statusTitle' => __('Firewall Rules Status', 'wordfence'), - 'statusList' => $firewall->wafStatusList('rules'), - 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), - 'helpLink' => __('https://www.wordfence.com/help/firewall/#firewall-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - 'waf-blacklist', - 'percentage' => $firewall->blacklistStatus(), - 'title' => __('Real-Time IP Blocklist: ', 'wordfence') . ($firewall->blacklistMode() == wfFirewall::BLACKLIST_MODE_ENABLED ? __('Enabled', 'wordfence') : __('Disabled', 'wordfence')), - 'subtitle' => __('Blocks requests from known malicious IPs', 'wordfence'), - 'link' => (($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM) ? network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options') : 'https://www.wordfence.com/gnl1wafUpgrade/wordfence-signup/'), - 'linkLabel' => $firewall->firewallMode() == wfFirewall::FIREWALL_MODE_DISABLED ? null : ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? ($firewall->blacklistMode() == wfFirewall::BLACKLIST_MODE_ENABLED ? __('Manage Real-Time IP Blocklist', 'wordfence') : ($firewall->isSubDirectoryInstallation() ? null : __('Enable', 'wordfence'))) : __('Upgrade to Premium', 'wordfence')), - 'linkNewWindow' => ($firewall->ruleMode() != wfFirewall::RULE_MODE_PREMIUM), - 'statusTitle' => __('Blocklist Status', 'wordfence'), - 'statusList' => $firewall->wafStatusList('blacklist'), - 'helpLink' => __('https://www.wordfence.com/help/firewall/#firewall-status', 'wordfence'), - ))->render(); - - if ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM && $firewall->blacklistMode() == wfFirewall::BLACKLIST_MODE_DISABLED): - ?> - - -
    • -
    • - 'waf-brute', - 'percentage' => $firewall->bruteForceStatus(), - 'title' => __('Brute Force Protection', 'wordfence') . ($firewall->bruteForceStatus() == 0 ? __(': Disabled', 'wordfence') : ''), - 'subtitle' => __('Stops Password Guessing Attacks', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#waf-options-bruteforce'), - 'linkLabel' => __('Manage Brute Force Protection', 'wordfence'), - 'statusTitle' => __('Brute Force Protection Status', 'wordfence'), - 'statusList' => $firewall->bruteForceStatusList(), - 'helpLink' => __('https://www.wordfence.com/help/firewall/#firewall-status', 'wordfence'), - ))->render(); - ?> -
    • -
    -
  • -
-
-
-
-
-
-
-
-
-
    -
  • -
      -
    • - 'waf-option-rate-limiting', - 'img' => 'ratelimiting.svg', - 'title' => __('Rate Limiting', 'wordfence'), - 'subtitle' => __('Block crawlers that are using too many resources or stealing content', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#waf-options-ratelimiting'), - ))->render(); - ?> -
    • -
    • - 'waf-option-blocking', - 'img' => 'blocking.svg', - 'title' => __('Blocking', 'wordfence'), - 'subtitle' => __('Block traffic by country, IP, IP range, user agent, referrer, or hostname', 'wordfence'), - 'link' => '#top#blocking', - ))->render(); - ?> -
    • -
    -
  • -
  • -
      -
    • - 'waf-option-support', - 'img' => 'support.svg', - 'title' => __('Help', 'wordfence'), - 'subtitle' => __('Find the documentation and help you need', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceSupport'), - ))->render(); - ?> -
    • -
    • - 'waf-option-all-options', - 'img' => 'options.svg', - 'title' => __('All Firewall Options', 'wordfence'), - 'subtitle' => __('Manage global and advanced firewall options', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options'), - ))->render(); - ?> -
    • -
    -
  • -
-
-
-
-
-
-
- - - - - - -
-
- - - - - - - - - -
-
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_firewall_waf_options.php b/wp/wp-content/plugins/wordfence/lib/menu_firewall_waf_options.php deleted file mode 100644 index e0136783..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_firewall_waf_options.php +++ /dev/null @@ -1,247 +0,0 @@ -countriesNetwork); -$firewall = new wfFirewall(); -$config = $waf->getStorageEngine(); -$wafURL = wfPage::pageURL(wfPage::PAGE_FIREWALL); -$wafConfigURL = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#configureAutoPrepend'); -$wafRemoveURL = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#removeAutoPrepend'); -/** @var array $wafData */ - -$backPage = new wfPage(wfPage::PAGE_FIREWALL); -if (isset($_GET['source']) && wfPage::isValidPage($_GET['source'])) { - $backPage = new wfPage($_GET['source']); -} -?> - -
-
-
- $backPage->url(), - 'backLabelHTML' => wp_kses(sprintf(__('Back to %s', 'wordfence'), $backPage->label()), array('span'=>array('class'=>array()))), - 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_FIREWALL, - 'restoreDefaultsMessage' => __('Are you sure you want to restore the default Firewall settings? This will undo any custom changes you have made to the options on this page. If you have manually disabled any rules or added any custom allowlisted URLs, those changes will not be overwritten.', 'wordfence'), - ))->render(); - ?> -
-
-
-
-render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
- -
-
-
- -

- -
-
-
-
-
- __('Firewall Options', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF), - 'helpLabelHTML' => wp_kses(__('Learn more about the Firewall', 'wordfence'), array('span'=>array('class'=>array()))), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
    -
  • - 'waf-coverage', - 'percentage' => $firewall->wafStatus(), - 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), - 'title' => __('Web Application Firewall', 'wordfence'), - 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('Currently in Learning Mode', 'wordfence') : __('Stops Complex Attacks', 'wordfence')), - 'link' => $optionsURL, - 'linkLabel' => null, - 'statusTitle' => __('Web Application Firewall Status', 'wordfence'), - 'statusList' => $firewall->wafStatusList(), - 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_STATUS_OVERALL), - ))->render(); - ?> -
  • -
  • - 'waf-rules', - 'percentage' => $firewall->ruleStatus(), - 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), - 'title' => __('Firewall Rules: ', 'wordfence') . ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? __('Premium', 'wordfence') : __('Community', 'wordfence')), - 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('Currently in Learning Mode', 'wordfence') : ($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM ? __('Rules updated in real-time', 'wordfence') : __('Rule updates delayed by 30 days', 'wordfence'))), - 'link' => 'https://www.wordfence.com/gnl1wafUpgrade/wordfence-signup/', - 'linkLabel' => null, - 'linkNewWindow' => true, - 'statusTitle' => __('Firewall Rules Status', 'wordfence'), - 'statusList' => $firewall->wafStatusList('rules'), - 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_STATUS_RULES), - ))->render(); - ?> -
  • -
  • - 'waf-blacklist', - 'percentage' => $firewall->blacklistStatus(), - 'title' => __('Real-Time IP Blocklist: ', 'wordfence') . ($firewall->blacklistMode() == wfFirewall::BLACKLIST_MODE_ENABLED ? __('Enabled', 'wordfence') : __('Disabled', 'wordfence')), - 'subtitle' => __('Blocks requests from known malicious IPs', 'wordfence'), - 'link' => (($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM && $firewall->blacklistMode() == wfFirewall::BLACKLIST_MODE_DISABLED) ? network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#waf-options-advanced') : 'https://www.wordfence.com/gnl1wafUpgrade/wordfence-signup/'), - 'linkLabel' => null, - 'linkNewWindow' => !($firewall->ruleMode() == wfFirewall::RULE_MODE_PREMIUM && $firewall->blacklistMode() == wfFirewall::BLACKLIST_MODE_DISABLED), - 'statusTitle' => __('Blocklist Status', 'wordfence'), - 'statusList' => $firewall->wafStatusList('blacklist'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_STATUS_BLACKLIST), - ))->render(); - ?> -
  • -
  • - 'waf-brute', - 'percentage' => $firewall->bruteForceStatus(), - 'title' => __('Brute Force Protection', 'wordfence') . ($firewall->bruteForceStatus() == 0 ? __(': Disabled', 'wordfence') : ''), - 'subtitle' => __('Stops Password Guessing Attacks', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#waf-options-bruteforce'), - 'linkLabel' => null, - 'statusTitle' => __('Brute Force Protection Status', 'wordfence'), - 'statusList' => $firewall->bruteForceStatusList(), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_STATUS_BRUTE_FORCE), - ))->render(); - ?> -
  • -
-
-
-
-
- $firewall, - 'waf' => $waf, - 'stateKey' => 'waf-options-basic', - 'collapseable' => false, - ))->render(); - ?> - $firewall, - 'waf' => $waf, - 'stateKey' => 'waf-options-advanced', - ))->render(); - ?> - $firewall, - 'waf' => $waf, - 'stateKey' => 'waf-options-bruteforce', - ))->render(); - ?> - $firewall, - 'waf' => $waf, - 'stateKey' => 'waf-options-ratelimiting', - ))->render(); - ?> - $firewall, - 'waf' => $waf, - 'stateKey' => 'waf-options-whitelisted', - ))->render(); - ?> -
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_install.php b/wp/wp-content/plugins/wordfence/lib/menu_install.php deleted file mode 100644 index 12b26941..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_install.php +++ /dev/null @@ -1,43 +0,0 @@ - -
-
-
-
-
- __('Install Wordfence', 'wordfence'), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
- -

- - - 1, 'existing' => true, 'email' => $email, 'license' => $license)) ?> - -
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_options.php b/wp/wp-content/plugins/wordfence/lib/menu_options.php deleted file mode 100644 index c79110d5..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_options.php +++ /dev/null @@ -1,435 +0,0 @@ -countriesNetwork); -$firewall = new wfFirewall(); -$scanner = wfScanner::shared(); -$config = $waf->getStorageEngine(); -$wafURL = wfPage::pageURL(wfPage::PAGE_FIREWALL); -$wafConfigURL = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#configureAutoPrepend'); -$wafRemoveURL = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#removeAutoPrepend'); -/** @var array $wafData */ - -$backPage = new wfPage(wfPage::PAGE_FIREWALL); -if (isset($_GET['source']) && wfPage::isValidPage($_GET['source'])) { - $backPage = new wfPage($_GET['source']); -} -?> - -
-
-
- __('License Key', 'wordfence'), - 'wf-option-displayTopLevelOptions' => __('Display All Options menu item', 'wordfence'), - 'wf-option-displayTopLevelBlocking' => __('Display Blocking menu item', 'wordfence'), - 'wf-option-displayTopLevelLiveTraffic' => __('Display Live Traffic menu item', 'wordfence'), - 'wf-option-autoUpdate' => __('Update Wordfence automatically when a new version is released?', 'wordfence'), - 'wf-option-alertEmails' => __('Where to email alerts', 'wordfence'), - 'wf-option-howGetIPs' => __('How does Wordfence get IPs', 'wordfence'), - 'wf-option-howGetIPs-trusted-proxies' => __('Trusted Proxies', 'wordfence'), - 'wf-option-enableRemoteIpLookup' => __('Look up visitor IP locations via Wordfence servers', 'wordfence'), - 'wf-option-other-hideWPVersion' => __('Hide WordPress version', 'wordfence'), - 'wf-option-disableCodeExecutionUploads' => __('Disable Code Execution for Uploads directory', 'wordfence'), - 'wf-option-liveActivityPauseEnabled' => __('Pause live updates when window loses focus', 'wordfence'), - 'wf-option-actUpdateInterval' => __('Update interval in seconds', 'wordfence'), - 'wf-option-other-bypassLitespeedNoabort' => __('Bypass the LiteSpeed "noabort" check', 'wordfence'), - 'wf-option-deleteTablesOnDeact' => __('Delete Wordfence tables and data on deactivation', 'wordfence'), - 'wf-option-notification-updatesNeeded' => __('Updates Needed (Plugin, Theme, or Core)', 'wordfence'), - 'wf-option-notification-securityAlerts' => __('Security Alerts', 'wordfence'), - 'wf-option-notification-promotions' => __('Promotions', 'wordfence'), - 'wf-option-notification-blogHighlights' => __('Blog Highlights', 'wordfence'), - 'wf-option-notification-productUpdates' => __('Product Updates', 'wordfence'), - 'wf-option-notification-scanStatus' => __('Scan Status', 'wordfence'), - 'wf-option-alertOn-update' => __('Email me when Wordfence is automatically updated', 'wordfence'), - 'wf-option-alertOn-wordfenceDeactivated' => __('Email me if Wordfence is deactivated', 'wordfence'), - 'wf-option-alertOn-wafDeactivated' => __('Email me if the Wordfence Web Application Firewall is turned off', 'wordfence'), - 'wf-option-alertOn-scanIssues' => __('Alert me with scan results of this severity level or greater', 'wordfence'), - 'wf-option-alertOn-block' => __('Alert when an IP address is blocked', 'wordfence'), - 'wf-option-alertOn-loginLockout' => __('Alert when someone is locked out from login', 'wordfence'), - 'wf-option-alertOn-lostPasswdForm' => __('Alert when the "lost password" form is used for a valid user', 'wordfence'), - 'wf-option-alertOn-adminLogin' => __('Alert me when someone with administrator access signs in', 'wordfence'), - 'wf-option-alertOn-firstAdminLoginOnly' => __('Only alert me when that administrator signs in from a new device', 'wordfence'), - 'wf-option-alertOn-nonAdminLogin' => __('Alert me when a non-admin user signs in', 'wordfence'), - 'wf-option-alertOn-firstNonAdminLoginOnly' => __('Only alert me when that user signs in from a new device', 'wordfence'), - 'wf-option-wafAlertOnAttacks' => __('Alert me when there\'s a large increase in attacks detected on my site', 'wordfence'), - 'wf-option-alert-maxHourly' => __('Maximum email alerts to send per hour', 'wordfence'), - 'wf-option-email-summary-enabled' => __('Enable email summary', 'wordfence'), - 'wf-option-email-summary-excluded-directories' => __('List of directories to exclude from recently modified file list', 'wordfence'), - 'wf-option-email-summary-dashboard-widget-enabled' => __('Enable activity report widget on the WordPress dashboard', 'wordfence'), - 'wf-option-wafStatus' => __('Web Application Firewall Status', 'wordfence'), - 'wf-option-protectionMode' => __('Web Application Firewall Protection Level', 'wordfence'), - 'wf-option-disableWAFBlacklistBlocking' => __('Real-Time IP Blocklist', 'wordfence'), - 'wf-option-disableWAFIPBlocking' => __('Delay IP and Country blocking until after WordPress and plugins have loaded (only process firewall rules early)', 'wordfence'), - 'wf-option-whitelisted' => __('Allowlisted IP addresses that bypass all rules', 'wordfence'), - 'wf-option-whitelistedServices' => __('Allowlisted services', 'wordfence'), - 'wf-option-bannedURLs' => __('Immediately block IPs that access these URLs', 'wordfence'), - 'wf-option-wafAlertWhitelist' => __('Ignored IP addresses for Wordfence Web Application Firewall alerting', 'wordfence'), - 'wf-option-wafRules' => __('Web Application Firewall Rules', 'wordfence'), - 'wf-option-loginSecurityEnabled' => __('Enable brute force protection', 'wordfence'), - 'wf-option-loginSec-maxFailures' => __('Lock out after how many login failures', 'wordfence'), - 'wf-option-loginSec-maxForgotPasswd' => __('Lock out after how many forgot password attempts', 'wordfence'), - 'wf-option-loginSec-countFailMins' => __('Count failures over what time period', 'wordfence'), - 'wf-option-loginSec-lockoutMins' => __('Amount of time a user is locked out', 'wordfence'), - 'wf-option-loginSec-lockInvalidUsers' => __('Immediately lock out invalid usernames', 'wordfence'), - 'wf-option-loginSec-userBlacklist' => __('Immediately block the IP of users who try to sign in as these usernames', 'wordfence'), - 'wf-option-loginSec-strongPasswds-enabled' => __('Enforce strong passwords', 'wordfence'), - 'wf-option-loginSec-breachPasswds-enabled' => __('Prevent the use of passwords leaked in data breaches', 'wordfence'), - 'wf-option-loginSec-maskLoginErrors' => __('Don\'t let WordPress reveal valid users in login errors', 'wordfence'), - 'wf-option-loginSec-blockAdminReg' => __('Prevent users registering "admin" username if it doesn\'t exist', 'wordfence'), - 'wf-option-loginSec-disableAuthorScan' => __('Prevent discovery of usernames through "/?author=N" scans, the oEmbed API, the WordPress REST API, and WordPress XML Sitemaps', 'wordfence'), - 'wf-option-loginSec-disableApplicationPasswords' => __('Disable WordPress application passwords', 'wordfence'), - 'wf-option-other-blockBadPOST' => __('Block IPs who send POST requests with blank User-Agent and Referer', 'wordfence'), - 'wf-option-blockCustomText' => __('Custom text shown on block pages', 'wordfence'), - 'wf-option-other-pwStrengthOnUpdate' => __('Check password strength on profile update', 'wordfence'), - 'wf-option-other-WFNet' => __('Participate in the Real-Time Wordfence Security Network', 'wordfence'), - 'wf-option-firewallEnabled' => __('Enable Rate Limiting and Advanced Blocking', 'wordfence'), - 'wf-option-neverBlockBG' => __('How should we treat Google\'s crawlers', 'wordfence'), - 'wf-option-maxGlobalRequests' => __('If anyone\'s requests exceed', 'wordfence'), - 'wf-option-maxRequestsCrawlers' => __('If a crawler\'s page views exceed', 'wordfence'), - 'wf-option-max404Crawlers' => __('If a crawler\'s pages not found (404s) exceed', 'wordfence'), - 'wf-option-maxRequestsHumans' => __('If a human\'s page views exceed', 'wordfence'), - 'wf-option-max404Humans' => __('If a human\'s pages not found (404s) exceed', 'wordfence'), - 'wf-option-blockedTime' => __('How long is an IP address blocked when it breaks a rule', 'wordfence'), - 'wf-option-allowed404s' => __('Allowlisted 404 URLs', 'wordfence'), - 'wf-option-wafWhitelist' => __('Web Application Firewall Allowlisted URLs', 'wordfence'), - 'wf-option-ajaxWatcherDisabled-front' => __('Monitor background requests from an administrator\'s web browser for false positives (Front-end Website)', 'wordfence'), - 'wf-option-ajaxWatcherDisabled-admin' => __('Monitor background requests from an administrator\'s web browser for false positives (Admin Panel)', 'wordfence'), - 'wf-option-cbl-action' => __('What to do when we block someone visiting from a blocked country', 'wordfence'), - 'wf-option-cbl-redirURL' => __('URL to redirect blocked countries to', 'wordfence'), - 'wf-option-cbl-loggedInBlocked' => __('Block countries even if they are logged in', 'wordfence'), - 'wf-option-cbl-bypassRedirURL' => __('If user from a blocked country hits the relative URL ____ then redirect that user to ____ and set a cookie that will bypass all country blocking', 'wordfence'), - 'wf-option-cbl-bypassViewURL' => __('If user who is allowed to access the site views the relative URL ____ then set a cookie that will bypass country blocking in future in case that user hits the site from a blocked country', 'wordfence'), - 'wf-option-scheduledScansEnabled' => __('Schedule Wordfence Scans', 'wordfence'), - 'wf-option-scanType' => __('Scan Type', 'wordfence'), - 'wf-option-scansEnabled-checkGSB' => __('Check if this website is on a domain blocklist', 'wordfence'), - 'wf-option-spamvertizeCheck' => __('Check if this website is being "Spamvertised"', 'wordfence'), - 'wf-option-checkSpamIP' => __('Check if this website IP is generating spam', 'wordfence'), - 'wf-option-scansEnabled-checkHowGetIPs' => __('Scan for misconfigured How does Wordfence get IPs', 'wordfence'), - 'wf-option-scansEnabled-checkReadableConfig' => __('Scan for publicly accessible configuration, backup, or log files', 'wordfence'), - 'wf-option-scansEnabled-suspectedFiles' => __('Scan for publicly accessible quarantined files', 'wordfence'), - 'wf-option-scansEnabled-core' => __('Scan core files against repository versions for changes', 'wordfence'), - 'wf-option-scansEnabled-themes' => __('Scan theme files against repository versions for changes', 'wordfence'), - 'wf-option-scansEnabled-plugins' => __('Scan plugin files against repository versions for changes', 'wordfence'), - 'wf-option-scansEnabled-coreUnknown' => __('Scan wp-admin and wp-includes for files not bundled with WordPress', 'wordfence'), - 'wf-option-scansEnabled-malware' => __('Scan for signatures of known malicious files', 'wordfence'), - 'wf-option-scansEnabled-fileContents' => __('Scan file contents for backdoors, trojans and suspicious code', 'wordfence'), - 'wf-option-scansEnabled-fileContentsGSB' => __('Scan file contents for malicious URLs', 'wordfence'), - 'wf-option-scansEnabled-posts' => __('Scan posts for known dangerous URLs and suspicious content', 'wordfence'), - 'wf-option-scansEnabled-comments' => __('Scan comments for known dangerous URLs and suspicious content', 'wordfence'), - 'wf-option-scansEnabled-suspiciousOptions' => __('Scan WordPress core, plugin, and theme options for known dangerous URLs and suspicious content', 'wordfence'), - 'wf-option-scansEnabled-oldVersions' => __('Scan for out of date, abandoned, and vulnerable plugins, themes, and WordPress versions', 'wordfence'), - 'wf-option-scansEnabled-suspiciousAdminUsers' => __('Scan for suspicious admin users created outside of WordPress', 'wordfence'), - 'wf-option-scansEnabled-passwds' => __('Check the strength of passwords', 'wordfence'), - 'wf-option-scansEnabled-diskSpace' => __('Monitor disk space', 'wordfence'), - 'wf-option-scansEnabled-wafStatus' => __('Monitor Web Application Firewall status', 'wordfence'), - 'wf-option-other-scanOutside' => __('Scan files outside your WordPress installation', 'wordfence'), - 'wf-option-scansEnabled-scanImages' => __('Scan images, binary, and other files as if they were executable', 'wordfence'), - 'wf-option-lowResourceScansEnabled' => __('Use low resource scanning (reduces server load by lengthening the scan duration)', 'wordfence'), - 'wf-option-scan-maxIssues' => __('Limit the number of issues sent in the scan results email', 'wordfence'), - 'wf-option-scan-maxDuration' => __('Time limit that a scan can run in seconds', 'wordfence'), - 'wf-option-maxMem' => __('How much memory should Wordfence request when scanning', 'wordfence'), - 'wf-option-maxExecutionTime' => __('Maximum execution time for each scan stage', 'wordfence'), - 'wf-option-scan-exclude' => __('Exclude files from scan that match these wildcard patterns', 'wordfence'), - 'wf-option-scan-include-extra' => __('Additional scan signatures', 'wordfence'), - 'wf-option-scan-force-ipv4-start' => __('Use only IPv4 to start scans', 'wordfence'), - 'wf-option-scan-max-resume-attempts' => __('Maximum number of attempts to resume each scan stage', 'wordfence'), - 'wf-option-liveTrafficEnabled' => __('Traffic logging mode (Live Traffic)', 'wordfence'), - 'wf-option-liveTraf-ignorePublishers' => __('Don\'t log signed-in users with publishing access', 'wordfence'), - 'wf-option-liveTraf-ignoreUsers' => __('List of comma separated usernames to ignore', 'wordfence'), - 'wf-option-liveTraf-ignoreIPs' => __('List of comma separated IP addresses to ignore', 'wordfence'), - 'wf-option-liveTraf-ignoreUA' => __('Browser user-agent to ignore', 'wordfence'), - 'wf-option-liveTraf-maxRows' => __('Amount of Live Traffic data to store (number of rows)', 'wordfence'), - 'wf-option-liveTraf-maxAge' => __('Maximum days to keep Live Traffic data', 'wordfence'), - 'wf-option-exportOptions' => __('Export this site\'s Wordfence options for import on another site', 'wordfence'), - 'wf-option-importOptions' => __('Import Wordfence options from another site using a token', 'wordfence'), - ); - - if (wfCredentialsController::useLegacy2FA()) { - $indexOptions['wf-option-loginSec-requireAdminTwoFactor'] = __('Require Cellphone Sign-in for all Administrators', 'wordfence'); - $indexOptions['wf-option-loginSec-enableSeparateTwoFactor'] = __('Enable Separate Prompt for Two Factor Code', 'wordfence'); - } - - $indexOptions = array_merge($indexOptions, wfModuleController::shared()->optionIndexes); - - echo wfView::create('options/block-all-options-controls', array( - 'showIcon' => false, - 'indexOptions' => $indexOptions, - 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_ALL, - 'restoreDefaultsMessage' => __('Are you sure you want to restore the default settings? This will undo any custom changes you have made to the options on this page. If you have manually disabled any rules or added any custom allowlisted URLs, those changes will not be overwritten.', 'wordfence'), - ))->render(); - ?> -
-
-
-
-render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
- -
-
-
-
-
-
-
-
- __('All Options', 'wordfence'), - 'stateKeys' => $stateKeys, - 'showIcon' => true, - ))->render(); - ?> - -

- - __('Wordfence Global Options', 'wordfence'), - 'showIcon' => false, - ))->render(); - - echo wfView::create('dashboard/options-group-license', array( - 'stateKey' => 'wf-unified-global-options-license', - ))->render(); - - echo wfView::create('dashboard/options-group-view-customization', array( - 'stateKey' => 'wf-unified-global-options-view-customization', - ))->render(); - - echo wfView::create('dashboard/options-group-general', array( - 'stateKey' => 'wf-unified-global-options-general', - ))->render(); - - echo wfView::create('dashboard/options-group-dashboard', array( - 'stateKey' => 'wf-unified-global-options-dashboard', - ))->render(); - - echo wfView::create('dashboard/options-group-alert', array( - 'stateKey' => 'wf-unified-global-options-alert', - ))->render(); - - echo wfView::create('dashboard/options-group-email-summary', array( - 'stateKey' => 'wf-unified-global-options-email-summary', - ))->render(); - ?> - - __('Firewall Options', 'wordfence'), - 'showIcon' => false, - ))->render(); - - echo wfView::create('waf/options-group-basic-firewall', array( - 'firewall' => $firewall, - 'waf' => $waf, - 'stateKey' => 'wf-unified-waf-options-basic', - ))->render(); - - echo wfView::create('waf/options-group-advanced-firewall', array( - 'firewall' => $firewall, - 'waf' => $waf, - 'stateKey' => 'wf-unified-waf-options-advanced', - ))->render(); - - echo wfView::create('waf/options-group-brute-force', array( - 'firewall' => $firewall, - 'waf' => $waf, - 'stateKey' => 'wf-unified-waf-options-bruteforce', - ))->render(); - - echo wfView::create('waf/options-group-rate-limiting', array( - 'firewall' => $firewall, - 'waf' => $waf, - 'stateKey' => 'wf-unified-waf-options-ratelimiting', - ))->render(); - - echo wfView::create('waf/options-group-whitelisted', array( - 'firewall' => $firewall, - 'waf' => $waf, - 'stateKey' => 'wf-unified-waf-options-whitelisted', - ))->render(); - ?> - - __('Blocking Options', 'wordfence'), - 'showIcon' => false, - ))->render(); - - echo wfView::create('blocking/options-group-advanced-country', array( - 'stateKey' => 'wf-unified-blocking-options-country', - ))->render(); - ?> - - __('Scan Options', 'wordfence'), - 'showIcon' => false, - ))->render(); - - echo wfView::create('scanner/options-group-scan-schedule', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-unified-scanner-options-schedule', - ))->render(); - - echo wfView::create('scanner/options-group-basic', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-unified-scanner-options-basic', - ))->render(); - - echo wfView::create('scanner/options-group-general', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-unified-scanner-options-general', - ))->render(); - - echo wfView::create('scanner/options-group-performance', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-unified-scanner-options-performance', - ))->render(); - - echo wfView::create('scanner/options-group-advanced', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-unified-scanner-options-custom', - ))->render(); - ?> - - __('Tool Options', 'wordfence'), - 'showIcon' => false, - ))->render(); - - if (wfCredentialsController::useLegacy2FA()) { - echo wfView::create('tools/options-group-2fa', array( - 'stateKey' => 'wf-unified-2fa-options', - ))->render(); - } - - echo wfView::create('tools/options-group-live-traffic', array( - 'stateKey' => 'wf-unified-live-traffic-options', - 'hideShowMenuItem' => true, - ))->render(); - ?> - -
-
-
-
-
-
- -
-
-
-
-
    -
  • -
      -
    • -
    • - -
    • -
    - - -
  • -
-
-
-
-
- optionBlocks; - foreach ($moduleOptionBlocks as $b) { - echo $b; - } - ?> -
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_scanner.php b/wp/wp-content/plugins/wordfence/lib/menu_scanner.php deleted file mode 100644 index 39ab29b6..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_scanner.php +++ /dev/null @@ -1,393 +0,0 @@ - - -
-
-

Click inside window to resume', 'wordfence'), array('small'=>array(), 'br'=>array())); ?>

-
- -render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
-
-
-
-
- __('Scan', 'wordfence'), - 'headerID' => 'wf-section-scan', - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN), - 'helpLabelHTML' => wp_kses(__('Learn more about the Scanner', 'wordfence'), array('span'=>array('class'=>array()))), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
    -
  • - $scanner, - 'dashboard' => $dashboard, - ))->render(); - ?> -
  • -
  • -
      -
    • - 'wf-scanner-type', - 'percentage' => $scanner->scanTypeStatus(), - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Scan Type: ', 'wordfence') . wfScanner::displayScanType($scanner->scanType()), - 'subtitle' => wfScanner::displayScanTypeDetail($scanner->scanType()), - 'link' => $optionsURL, - 'linkLabel' => __('Manage Scan', 'wordfence'), - 'statusTitle' => __('Scan Status', 'wordfence'), - 'statusList' => $scanner->scanTypeStatusList(), - 'helpLink' => __('https://www.wordfence.com/help/scan/#scan-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - 'wf-scanner-malware-type', - 'percentage' => $scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? 1.0 : 0.7, - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Malware Signatures: ', 'wordfence') . ($scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? __('Premium', 'wordfence') : __('Community', 'wordfence')), - 'subtitle' => ($scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? __('Signatures updated in real-time', 'wordfence') : __('Signature updates delayed by 30 days', 'wordfence')), - 'link' => 'https://www.wordfence.com/gnl1scanUpgrade/wordfence-signup/', - 'linkLabel' => ($scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? __('Protect More Sites', 'wordfence') : __('Upgrade to Premium', 'wordfence')), - 'linkNewWindow' => true, - 'statusTitle' => __('Malware Signatures Status', 'wordfence'), - 'statusList' => $scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? array() : array(array( - 'percentage' => 0.30, - 'title' => __('Enable Premium Scan Signatures.', 'wordfence'), - )), - 'helpLink' => __('https://www.wordfence.com/help/scan/#scan-status', 'wordfence'), - ))->render(); - ?> -
    • -
    • - 'wf-scanner-reputation', - 'percentage' => $scanner->reputationStatus(), - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Reputation Checks', 'wordfence'), - 'subtitle' => __('Check spam & spamvertising blocklists', 'wordfence'), - 'link' => $optionsURL . '#wf-scanner-options-general', - 'linkLabel' => __('Manage Options', 'wordfence'), - 'statusTitle' => __('Reputation Check Status', 'wordfence'), - 'statusList' => $scanner->reputationStatusList(), - 'helpLink' => __('https://www.wordfence.com/help/scan/#scan-status', 'wordfence'), - ))->render(); - ?> -
    • -
    -
  • -
-
-
-
-
-
-
-
-
-
    -
  • -
      -
    • - wfScanner::shared()->isRunning(), - ))->render(); - ?> -
    • -
    • - 'wf-scan-option-support', - 'img' => 'support.svg', - 'title' => __('Help', 'wordfence'), - 'subtitle' => __('Find the documentation and help you need', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceSupport'), - ))->render(); - ?> -
    • -
    • - 'wf-scan-option-all-options', - 'img' => 'options.svg', - 'title' => __('Scan Options and Scheduling', 'wordfence'), - 'subtitle' => __('Manage scan options including scheduling', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceScan&subpage=scan_options'), - ))->render(); - ?> -
    • -
    -
  • -
  • - $scanner, - 'running' => wfScanner::shared()->isRunning(), - ))->render(); - ?> -
  • -
-
-
-
-
-
-
- $scanner, - ))->render(); - ?> -
-
-
-
- $scanner, - 'issues' => $issues, - ))->render(); - ?> -
-
-
-
- render(); - ?> -
-
-
-
- - - - - - - - -render(); -echo wfView::create('scanner/site-cleaning-high-sense')->render(); -echo wfView::create('scanner/site-cleaning-beta-sigs')->render(); -echo wfView::create('scanner/no-issues')->render(); -echo wfView::create('scanner/issue-wfUpgrade')->render(); -echo wfView::create('scanner/issue-wfUpgradeError')->render(); -echo wfView::create('scanner/issue-wfPluginUpgrade')->render(); -echo wfView::create('scanner/issue-wfThemeUpgrade')->render(); -echo wfView::create('scanner/issue-wfPluginRemoved')->render(); -echo wfView::create('scanner/issue-wfPluginAbandoned')->render(); -echo wfView::create('scanner/issue-wfPluginVulnerable')->render(); -echo wfView::create('scanner/issue-file')->render(); -echo wfView::create('scanner/issue-skippedPaths')->render(); -echo wfView::create('scanner/issue-knownfile')->render(); -echo wfView::create('scanner/issue-configReadable')->render(); -echo wfView::create('scanner/issue-publiclyAccessible')->render(); -echo wfView::create('scanner/issue-coreUnknown')->render(); -echo wfView::create('scanner/issue-diskSpace')->render(); -echo wfView::create('scanner/issue-wafStatus')->render(); -echo wfView::create('scanner/issue-geoipSupport')->render(); -echo wfView::create('scanner/issue-easyPassword')->render(); -echo wfView::create('scanner/issue-commentBadURL')->render(); -echo wfView::create('scanner/issue-postBadURL')->render(); -echo wfView::create('scanner/issue-postBadTitle')->render(); -echo wfView::create('scanner/issue-optionBadURL')->render(); -echo wfView::create('scanner/issue-database')->render(); -echo wfView::create('scanner/issue-checkSpamIP')->render(); -echo wfView::create('scanner/issue-spamvertizeCheck')->render(); -echo wfView::create('scanner/issue-checkGSB')->render(); -echo wfView::create('scanner/issue-checkHowGetIPs')->render(); -echo wfView::create('scanner/issue-suspiciousAdminUsers')->render(); -echo wfView::create('scanner/issue-timelimit')->render(); - -//Currently unused -echo wfView::create('scanner/issue-wpscan_fullPathDiscl')->render(); -echo wfView::create('scanner/issue-wpscan_directoryList')->render(); - -if (wfOnboardingController::willShowNewTour(wfOnboardingController::TOUR_SCAN)): ?> - - - - - - - - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_scanner_credentials.php b/wp/wp-content/plugins/wordfence/lib/menu_scanner_credentials.php deleted file mode 100644 index c756af45..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_scanner_credentials.php +++ /dev/null @@ -1,79 +0,0 @@ - 'WordfenceScan', - 'subpage' => 'scan_credentials', - 'action' => $action, - 'issueID' => (int) @$_GET['issueID'], - 'nonce' => wp_create_nonce('wp-ajax'), - ))); - -switch ($action) { - case 'restoreFile': - $callback = array('wordfence', 'fsActionRestoreFileCallback'); - break; - case 'deleteFile': - $callback = array('wordfence', 'fsActionDeleteFileCallback'); - break; -} -?> -
-
-
- $scanURL, - 'backLabel' => __('Back to Scan', 'wordfence'), - 'suppressControls' => true, - ))->render(); - ?> -
-
-
-
-
-
-
-
-
-
-
-
-
-
- __('File System Credentials Required', 'wordfence'), - ))->render(); - ?> -
-
-
-
- ' . wp_kses(sprintf( - /* translators: URL to the WordPress admin panel. */ - __('Security token has expired. Click here to return to the scan page.', 'wordfence'), esc_url($scanURL)), array('a'=>array('href'=>array()))) . '

'; - } - ?> -
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_scanner_options.php b/wp/wp-content/plugins/wordfence/lib/menu_scanner_options.php deleted file mode 100644 index 7f02eb3f..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_scanner_options.php +++ /dev/null @@ -1,208 +0,0 @@ -scanOptions(); - -$backPage = new wfPage(wfPage::PAGE_SCAN); -if (isset($_GET['source']) && wfPage::isValidPage($_GET['source'])) { - $backPage = new wfPage($_GET['source']); -} -?> - -
-
-
- $backPage->url(), - 'backLabelHTML' => wp_kses(sprintf(__('Back to %s', 'wordfence'), $backPage->label()), array('span'=>array('class'=>array()))), - 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_SCANNER, - 'restoreDefaultsMessage' => __('Are you sure you want to restore the default Scan settings? This will undo any custom changes you have made to the options on this page.', 'wordfence'), - ))->render(); - ?> -
-
-
-
-render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
-
-
-
-
-
-
-
-
- __('Scan Options and Scheduling', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN), - 'helpLabelHTML' => wp_kses(__('Learn more about Scanning', 'wordfence'), array('span'=>array('classes'=>array()))), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
    -
  • - 'wf-scanner-type', - 'percentage' => $scanner->scanTypeStatus(), - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Scan Type: ', 'wordfence') . wfScanner::displayScanType($scanner->scanType()), - 'subtitle' => wfScanner::displayScanTypeDetail($scanner->scanType()), - 'link' => $optionsURL, - 'linkLabel' => null, - 'statusTitle' => __('Scan Status', 'wordfence'), - 'statusList' => $scanner->scanTypeStatusList(), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_STATUS_OVERALL), - ))->render(); - ?> -
  • -
  • - 'wf-scanner-malware-type', - 'percentage' => $scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? 1.0 : 0.7, - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Malware Signatures: ', 'wordfence') . ($scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? __('Premium', 'wordfence') : __('Community', 'wordfence')), - 'subtitle' => ($scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? __('Signatures updated in real-time', 'wordfence') : __('Signature updates delayed by 30 days', 'wordfence')), - 'link' => 'https://www.wordfence.com/gnl1scanUpgrade/wordfence-signup/', - 'linkLabel' => null, - 'statusTitle' => __('Malware Signatures Status', 'wordfence'), - 'statusList' => $scanner->signatureMode() == wfScanner::SIGNATURE_MODE_PREMIUM ? array() : array(array( - 'percentage' => 0.30, - 'title' => __('Enable Premium Scan Signatures.', 'wordfence'), - )), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_STATUS_MALWARE), - ))->render(); - ?> -
  • -
  • - 'wf-scanner-reputation', - 'percentage' => $scanner->reputationStatus(), - 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), - 'title' => __('Reputation Checks', 'wordfence'), - 'subtitle' => __('Check spam & spamvertising blocklists', 'wordfence'), - 'link' => $optionsURL . '#wf-scanner-options-general', - 'linkLabel' => null, - 'statusTitle' => __('Reputation Check Status', 'wordfence'), - 'statusList' => $scanner->reputationStatusList(), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_STATUS_REPUTATION), - ))->render(); - ?> -
  • -
-
-
-
-
- $scanner, - 'stateKey' => 'wf-scanner-options-schedule', - ))->render(); - - echo wfView::create('scanner/options-group-basic', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-scanner-options-basic', - 'collapseable' => false, - ))->render(); - - echo wfView::create('scanner/options-group-general', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-scanner-options-general', - ))->render(); - - echo wfView::create('scanner/options-group-performance', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-scanner-options-performance', - ))->render(); - - echo wfView::create('scanner/options-group-advanced', array( - 'scanner' => $scanner, - 'stateKey' => 'wf-scanner-options-custom', - ))->render(); - ?> -
-
-
-
-
- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_support.php b/wp/wp-content/plugins/wordfence/lib/menu_support.php deleted file mode 100644 index 44db3e56..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_support.php +++ /dev/null @@ -1,310 +0,0 @@ -render(); -} - -$support = @json_decode(wfConfig::get('supportContent'), true); -?> -
-
-
-
-
- __('Help', 'wordfence'), - 'showIcon' => true, - ))->render(); - ?> -
-
-
-
-
    -
  • -
      -
    • - isPaidAndCurrent()): ?> -

      -

      - isResponse()): ?> - - isCare()): ?> - - - - -

      -

      - () -

      - isBelowCare()): ?> - - isBelowResponse()): ?> - - -
      -

      - -

      -

      respond to Premium tickets within a few hours on average and have a direct line to our QA and development teams.', 'wordfence'), array('strong'=>array())); ?>

      -

      ()

      - -
    • -
    • -

      -

      receive an answer within a few days.', 'wordfence'), array('strong'=>array())); ?>

      -

      ()

      -
    • -
    -
  • -
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
    -
  • -
      -
    • - -
    • -
    -
  • -
  • -
      -
    • -
        -
      • -
      • -
      -
    • -
    -
  • -
-
-
-
-
- -
-
-

-
-
-
-
-
-
-
-

-
    - -
  1. ()
  2. - -
-
-
-
-
-
- -
-
-
-

()

-

- - - -
-
-
- -
-
- -
-
-
-
-
-

-

links on any of the plugin\'s pages.', 'wordfence'), array('i'=>array('class'=>array(), 'aria-hidden'=>array()))); ?>

-

()

-
-
-
-
-
- -
-
- - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_tools.php b/wp/wp-content/plugins/wordfence/lib/menu_tools.php deleted file mode 100644 index 9c75d3ea..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_tools.php +++ /dev/null @@ -1,45 +0,0 @@ - -render(); - echo wfView::create('gdpr/banner')->render(); -} -?> -
-
- $tabs, - ))->render(); - ?> -
-
-
- -
-
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_tools_diagnostic.php b/wp/wp-content/plugins/wordfence/lib/menu_tools_diagnostic.php deleted file mode 100644 index 73579828..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_tools_diagnostic.php +++ /dev/null @@ -1,920 +0,0 @@ - - - - -
- -
-
-
- Learn More opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))) ?> -
-
- -
- - - - - -
-
-
- -
- -
- getResults() as $title => $tests): - $key = sanitize_key('wf-diagnostics-' . $title); - $hasFailingTest = false; - foreach ($tests['results'] as $result) { - $infoOnly = isset($result['infoOnly']) && $result['infoOnly']; - if (!$result['test'] && !$infoOnly) { - $hasFailingTest = true; - break; - } - } - - if ($inEmail): ?> - - - - - - - - - - - - - - - -
array(), - 'strong' => array(), - 'em' => array(), - 'a' => array('href' => true), - 'span' => array('class' => true) - ))) ?> - -
- -
- -
- - -


- -
- -
-
-
-
- - -
-
- -
-
-
-
-
    - $result): ?> - -
  • -
    array(), - 'strong' => array(), - 'em' => array(), - 'a' => array('href' => true), - ))) ?>
    -
    - -
    - -
    - -
    - - -

    - - -
    -
  • - -
-
-
- - - - -
-
-
-
- - -
-
- -
-
-
-
- - > - - - - - - - - - 'REMOTE_ADDR', - 'HTTP_CF_CONNECTING_IP' => 'CF-Connecting-IP', - 'HTTP_X_REAL_IP' => 'X-Real-IP', - 'HTTP_X_FORWARDED_FOR' => 'X-Forwarded-For', - ); - foreach (wfUtils::getAllServerVariableIPs() as $variable => $ip): ?> - - - - - - - - - - - - - - - - - - - - - - - -
{$currentIP}", implode(', ', $output)); - } else { - echo esc_html($ip); - } - ?>
- -
-
- -
-
-
-
- - -
-
- -
-
-
-
- > - - $settingData): - $escapedName = esc_html($settingName); - $escapedDescription = ''; - $escapedValue = __('(not set)', 'wordfence'); - if (is_array($settingData)) { - $escapedDescription = esc_html($settingData['description']); - if (isset($settingData['value'])) { - $escapedValue = esc_html($settingData['value']); - } - } else { - $escapedDescription = esc_html($settingData); - if (defined($settingName)) { - $escapedValue = esc_html(constant($settingName)); - } - } - ?> - - - - - - - -
-
-
- -
-
-
-
- - -
-
- -
-
-
-
- > - - $pluginData): ?> - - - - - - - - - - - - - -
- () - - - - -
-
-
-
-
-
-
- - -
-
- -
-
-
-
- > - - - $pluginData): ?> - - - - - - - - - - - - - - - -
- () - - - - -
-
-
-
-
-
-
- - -
-
- -
-
-
-
- > - - array( __( 'Advanced caching plugin', 'wordfence' ), 'WP_CACHE' ), // WP_CACHE - 'db.php' => array( __( 'Custom database class', 'wordfence' ), true ), // auto on load - 'db-error.php' => array( __( 'Custom database error message', 'wordfence' ), true ), // auto on error - 'install.php' => array( __( 'Custom installation script', 'wordfence' ), true ), // auto on installation - 'maintenance.php' => array( __( 'Custom maintenance message', 'wordfence' ), true ), // auto on maintenance - 'object-cache.php' => array( __( 'External object cache', 'wordfence' ), true ), // auto on load - 'php-error.php' => array( __( 'Custom PHP error message', 'wordfence' ), true ), // auto on error - 'fatal-error-handler.php'=> array( __( 'Custom PHP fatal error handler', 'wordfence' ), true ), // auto on error - ); - $dropins['sunrise.php' ] = array( __( 'Executed before Multisite is loaded', 'wordfence' ), is_multisite() && 'SUNRISE' ); // SUNRISE - $dropins['blog-deleted.php' ] = array( __( 'Custom site deleted message', 'wordfence' ), is_multisite() ); // auto on deleted blog - $dropins['blog-inactive.php' ] = array( __( 'Custom site inactive message', 'wordfence' ), is_multisite() ); // auto on inactive blog - $dropins['blog-suspended.php'] = array( __( 'Custom site suspended message', 'wordfence' ), is_multisite() ); // auto on archived or spammed blog - ?> - $data): ?> - - - - - - - - - - - -
- () -
-
-
-
-
-
-
- - -
-
- -
-
-
-
- > - - - $themeData): ?> - - - - - - - - - - - - - - - - - -
- () - - - - - get_stylesheet()): ?> -
-
-
-
-
-
-
- - -
-
- -
-
-
-
- > - - $values) { - if (is_array($values)) { - foreach ($values as $cron_job => $v) { - if (is_numeric($timestamp)) { - $overdue = ((time() - 1800) > $timestamp); - ?> - > - - - - - -
(' . esc_html__('Overdue', 'wordfence') . ')' : '') ?>
-
-
- - querySelect('SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() ORDER BY TABLE_NAME ASC LIMIT 250'); - $total = $wfdb->querySingle('SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE()'); - foreach ($tables as &$t) { - $t = "'" . esc_sql($t['TABLE_NAME']) . "'"; - } - unset($t); - $q = $wfdb->querySelect("SHOW TABLE STATUS WHERE Name IN (" . implode(',', $tables) . ')'); - if ($q): - $databaseCols = count($q[0]); - ?> -
-
-
-
- - -
-
- -
-
-
-
-
    -
  • -
    -
    - 250): ?> -
    - -
    - -
    - - -
    -
  • -
  • -
    -
    -
    -
    -
  • -
-
- > - - - - - - - - - - - - - - - - = 250 && $total > $count) { - ?> - - - - - - -
-
- -
-
- -
-
-
-
- - -
-
- -
-
-
-
-
- > - - - - - - - - - - - - $readable): ?> - format('M j, Y G:i:s') . ' ' . __('UTC', 'wordfence'); - } - } - - $shortLog = $log; - if (strpos($shortLog, ABSPATH) === 0) { - $shortLog = '~/' . substr($shortLog, strlen(ABSPATH)); - } - ?> - - - - - - - -
' . esc_html__('Download', 'wordfence') . ' (' . esc_html__('opens in new tab', 'wordfence') . ')' : '' . esc_html__('Requires downloading from the server directly', 'wordfence') . ''); ?>
-
-
-
-
- - ' . esc_html__('Scan Issues', 'wordfence') . "\n"; - $issues = wfIssues::shared()->getIssues(0, 50, 0, 50); - $issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts()); - $issueTypes = wfIssues::validIssueTypes(); - - echo '

' . esc_html(sprintf(/* translators: Number of scan issues. */ __('New Issues (%d total)', 'wordfence'), $issueCounts['new'])) . "

\n"; - if (isset($issues['new']) && count($issues['new'])) { - foreach ($issues['new'] as $i) { - if (!in_array($i['type'], $issueTypes)) { - continue; - } - - $viewContent = ''; - try { - $viewContent = wfView::create('scanner/issue-' . $i['type'], array('textOutput' => $i))->render(); - } - catch (wfViewNotFoundException $e) { - //Ignore -- should never happen since we validate the type - } - - if (!empty($viewContent)) { - echo nl2br($viewContent) . "

\n"; - } - } - } - else { - echo '

' . esc_html__('No New Issues', 'wordfence') . "

\n"; - } - } - ?> - - - ' . esc_html__('Unable to output phpinfo content because it is disabled', 'wordfence') . "\n"; } ?> - - - -
-
-
-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
-
- -
-
- -
-
-
-
-
-
    -
  • - 'debugOn', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => $w->get('debugOn') ? 1 : 0, - 'title' => __('Enable debugging mode (increases database load)', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_DEBUGGING_MODE), - ))->render(); - ?> -
  • -
  • - 'startScansRemotely', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => $w->get('startScansRemotely') ? 1 : 0, - 'title' => __('Start all scans remotely (Try this if your scans aren\'t starting and your site is publicly accessible)', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_REMOTE_SCANS), - ))->render(); - ?> -
  • -
  • - 'ssl_verify', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => $w->get('ssl_verify') ? 1 : 0, - 'title' => __('Enable SSL Verification (Disable this if you are consistently unable to connect to the Wordfence servers.)', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_SSL_VERIFICATION), - ))->render(); - ?> -
  • -
  • - 'avoid_php_input', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => wfWAF::getInstance()->getStorageEngine()->getConfig('avoid_php_input', false) ? 1 : 0, - 'title' => __('Disable reading of php://input', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_DISABLE_PHP_INPUT), - ))->render(); - ?> -
  • -
  • - 'wordfenceI18n', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => $w->get('wordfenceI18n') ? 1 : 0, - 'title' => 'Enable Wordfence translations', - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DIAGNOSTICS_OPTION_WORDFENCE_TRANSLATIONS), - ))->render(); - ?> -
  • -
  • -

    - - - -

    -
  • -
-
-
-
-
- - -
-
- -
- diff --git a/wp/wp-content/plugins/wordfence/lib/menu_tools_importExport.php b/wp/wp-content/plugins/wordfence/lib/menu_tools_importExport.php deleted file mode 100644 index 34c4a802..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_tools_importExport.php +++ /dev/null @@ -1,28 +0,0 @@ - - -
-
-

- Learn more about importing and exporting options (opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_TOOLS_IMPORT_EXPORT)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array()))); ?> - -
- -

- - 'global-options-import', - 'collapseable' => false, - ))->render(); - ?> -
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_tools_livetraffic.php b/wp/wp-content/plugins/wordfence/lib/menu_tools_livetraffic.php deleted file mode 100644 index da81c879..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_tools_livetraffic.php +++ /dev/null @@ -1,613 +0,0 @@ - - -
-

- Learn more about Live Traffic (opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_TOOLS_LIVE_TRAFFIC)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array()))); ?> - -
- - -
-
-


- -

-
- - -

- -
- - 'live-traffic-options', - 'showControls' => true, -))->render(); -?> - - -

- (opens in new tab))', 'wordfence'), wfSupportController::supportURL(wfSupportController::ITEM_TOOLS_LIVE_TRAFFIC_OPTION_ENABLE)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array()))); - } ?>.

-
- -

- (opens in new tab))', 'wordfence'), wfSupportController::supportURL(wfSupportController::ITEM_TOOLS_LIVE_TRAFFIC_OPTION_ENABLE)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array()))); - } ?>.

-
- - -
-
-
-
-
-
-
-
-
    -
  • -
  • -
  • -
  • -
-
-
-
- -
- -
    -
  • -
    -    - - -
  • -
  • -
      -
    • -
    • - -
    • -
    -
  • -
- -
-
-
-
-
-
-
- -
-
- -
-
- - - - - - - - - - - - -
-
-
- - -
-
-
-
-
- -
-
-
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
    -
  • -
    - -
    - - () -
    -
    - - -
    - -
    - - -
    -
    - -
    - - -
    - - - -
    - - -
    - - -
    - - -
    - - -
    - - -
    - - -
    - - -
    - - -
    - -
    - }" - class="wfTimeAgo wfTimeAgo-timestamp"> -
    - -
    - - - - - - - - - -
    - -
    -
    - ') ?> -
    -
  • - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-

-
- - - () - - - in - - () - - - - (opens in new tab)'), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'data-bind'=>array()), 'span'=>array('class'=>array()))) ?> - - - (opens in new tab)'), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'data-bind'=>array()), 'span'=>array('class'=>array()))) ?> - - - - - (opens in new tab)', ''), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array(), 'data-bind'=>array()), 'span'=>array('class'=>array()))) ?> - - - (opens in new tab)', ''), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array(), 'data-bind'=>array()), 'span'=>array('class'=>array()))) ?> - - - - non-existent page', 'wordfence'), ''), array('span'=>array('style'=>array()))) ?> - - - - - - - - - - ', ''), array('span'=>array('data-bind'=>array()))) ?> - - - ', '') ?> - - - - '), array('strong'=>array('data-bind'=>array()))) ?> - - - - - - - - - failed login as "%2$s".', 'wordfence'), '', ''), array('span'=>array('style'=>array()), 'strong'=>array('data-bind'=>array()))) ?> - - - failed login using an invalid username "%2$s".', 'wordfence'), '', ''), array('span'=>array('style'=>array()), 'strong'=>array('data-bind'=>array()))) ?> - - - - - () -
-
-    -
-
- - - - - - - - - - - - - - - - - - -
-
- -
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- - - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_tools_twoFactor.php b/wp/wp-content/plugins/wordfence/lib/menu_tools_twoFactor.php deleted file mode 100644 index 94a33f56..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_tools_twoFactor.php +++ /dev/null @@ -1,430 +0,0 @@ - __('Two-Factor Authentication', 'wordfence'), - 'helpLink' => $helpLink, - 'helpLabelHTML' => wp_kses(__('Learn more about Two-Factor Authentication', 'wordfence'), array('span'=>array('class'=>array()))), -))->render(); -?> - - - -
- -
- -
-
-
-

.

-

-
-
-
- -
-

-

and have control of your phone to log into your site. Upgrade to Premium now to enable this powerful feature.', 'wordfence'), array('em'=>array())) ?>

- -

- - -

- -

- () -

-
- - -
-
-
-

and have control of your phone to log in to your site. We recommend you enable Two-Factor Authentication for all Administrator level accounts.', 'wordfence'), array('em'=>array())) ?>

-
-
- true, - 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_TWO_FACTOR, - 'restoreDefaultsMessage' => __('Are you sure you want to restore the default Two-Factor Authentication settings? This will undo any custom changes you have made to the options on this page. If you have configured any users to use two-factor authentication, they will not be changed.', 'wordfence'), - ))->render(); - ?> -
-
-
- -
-
-
- -
    -
  • Note: Two-Factor Authentication is disabled when the option "Enable Brute Force Protection" is off.', 'wordfence'), array('strong'=>array())); ?>
  • -
  • -
- -
-
-
- -
-
-
-
-
    -
  • -
      -
    • - -
    • -
    -
  • -
  • -
      -
    • - - -
    • -
    • -
    -
  • -
  • -
      -
    • - - -
    • -
    •   
    • -
    • - -
    • -
    - -
  • -
  • -

    - -

    -
  • - -
- -
-
-
-
-
-
-

- -
-
-
- 'wf-2fa-options', - ))->render(); - ?> - - - - - - -
-
-
-

.

-

-

-
-
-
- -
- - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_tools_whois.php b/wp/wp-content/plugins/wordfence/lib/menu_tools_whois.php deleted file mode 100644 index 61b89e40..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_tools_whois.php +++ /dev/null @@ -1,115 +0,0 @@ - - - -
- -
-
-

- Learn more about Whois Lookup (opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_TOOLS_WHOIS_LOOKUP)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array()))); ?> - -
- -

- -
- -
-
- -
-
- -
-
- -

-

- %s is part of. We've marked the networks we found that this IP address belongs to in red below. Make sure you read all the WHOIS information so that you see all networks this IP belongs to. We recommend blocking the network with the lowest number of addresses. You may find this is listed at the end as part of the 'rWHOIS' query which contacts the local WHOIS server that is run by the network administrator.", 'wordfence'), esc_html($_GET['whoisval'])), array('span'=>array('style'=>array()))); ?> -

- -
-
- - - - - -
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/menu_wordfence_central.php b/wp/wp-content/plugins/wordfence/lib/menu_wordfence_central.php deleted file mode 100644 index d1bc10d1..00000000 --- a/wp/wp-content/plugins/wordfence/lib/menu_wordfence_central.php +++ /dev/null @@ -1,252 +0,0 @@ - __('Testing initial communication with Wordfence Central.', 'wordfence'), - 2 => __('Passing public key to Wordfence Central.', 'wordfence'), - 3 => __('Testing public key authentication with Wordfence Central.', 'wordfence'), - 4 => __('Testing that Wordfence Central is able to communicate with this site.', 'wordfence'), - 5 => __('Retrieving access token using authorization grant.', 'wordfence'), - 6 => __('Redirecting back to Wordfence Central.', 'wordfence'), -); -$connected = wfCentral::isConnected(); -$partialConnection = wfCentral::isPartialConnection(); - -?> -render(); - echo wfView::create('gdpr/banner')->render(); -} - -if (function_exists('network_admin_url') && is_multisite()) { - $wordfenceURL = network_admin_url('admin.php?page=Wordfence'); -} -else { - $wordfenceURL = admin_url('admin.php?page=Wordfence'); -} -?> -
-
-
-
-
- __('Wordfence Central', 'wordfence'), - 'showIcon' => true, - ))->render(); - ?> -
- - -
-
-
-
- -
-

-

-

()

-
-
-
-
-

-

-

-
-
-
- -
-
-
-
- -
-
-
-
    - -
  • -
    -
    -
    - 50, - ))->render(); - ?> -
    -
    -
    -
    -
    -

    -
    -
  • - -
-
-
-
- -
-

-

- - -

-
- -
-

-

-

- -

-
- -
-
-
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/noc1.key b/wp/wp-content/plugins/wordfence/lib/noc1.key deleted file mode 100644 index 13785092..00000000 --- a/wp/wp-content/plugins/wordfence/lib/noc1.key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIErTCCAxWgAwIBAgIJAOj4d3hU6MEPMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV -BAYTAlVTMRMwEQYDVQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMRIw -EAYDVQQKDAlXb3JkZmVuY2UxCzAJBgNVBAsMAklUMRYwFAYDVQQDDA13b3JkZmVu -Y2UuY29tMB4XDTE5MDEwOTE5MDQzMloXDTM5MDEwNDE5MDQzMlowbTELMAkGA1UE -BhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxEjAQ -BgNVBAoMCVdvcmRmZW5jZTELMAkGA1UECwwCSVQxFjAUBgNVBAMMDXdvcmRmZW5j -ZS5jb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDBkaEjT0/Gmxi7 -tl7qaX2/TiHXdP4SgqQepP/gIgKTdj71oBZzVvZPztlStQEUO1u0m6eZT3BHQPV7 -inzsjz5SpCjChjH6se/DwnAJNaU7c2WUWhVATvwSX0gwDYCCbcS2IG0KUllvtWh9 -8JOGG46X/51vxwR3wiJoVvziZJIs8A4n9/qYBWxL7IKAl//EGwm4SacrUVJNxAXo -h3MaIJ5TlEi1xO8NQ/mUzFOJcKhNq94wcco1sffDoe4ctWxydhlpS5GCW/uGveOX -ZLpwiOXVaG1HQx2YoI3Y9RK8y9eXM3IbdKwKSbV7l0TEQBuh20PLk/8DNG4Ba3Gg -yFEMzPjQnyp5OzohLdm4WphRHiA631UcX7ZSrDDfET7a+YsYX2EDcnZRmO/KLkuk -+yXYXRF/1bfuR5sI8l9nPakKXRlG6KbPHKdP//J0ZKVAJyZOhEXfB+X3zFyowUyh -2hjgSZuwS9DYAidNXq/hSMQLALEnwB9YFdxpxSs3sWdbKkDQGHMCAwEAAaNQME4w -HQYDVR0OBBYEFNHk65/wXrYwxPt2wapRH9XU4rRjMB8GA1UdIwQYMBaAFNHk65/w -XrYwxPt2wapRH9XU4rRjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggGB -AGU/5CxUCxFrVY9qoTRwsx24Prphu8H9Y/je7G+HoZJPj70Qv+8EuzxTmsAeNgG4 -xcLIO1WWgAgsvb6XilEaYGO5GOCHctIMjnbauegcmkM4NMTNfzStu+v1mjV/cw/9 -bzEM9Rr1Jc+mQXq8K6zXTaBXo7GU+WqTAadHhbUCWD5afQ9Kq8OCKaM4NBf2guQl -PU2HQts8reYn7VeqWz063RLuRAAwf59vZbi3foqTBYSiDHjAykDe4LsvUWtS1y7t -Dxyz+YSATCxpnkDWEoad+kKZ1qpgqiewp/tLnDR1LOIDmWu9KongslEHUAmAN/T1 -otTWmQOeg/cnT1W/yqapxzpOmvLb28f9shMbGvmQpvle/JNVeoQyM3NF7t1rCbGT -aqCI9kjWOoLd7t4svtGyR6IOKUbXqT5U9q1bMXIWH+ty8KmxzsvEBHXmYF6+jYr+ -tWlXyhcN+OyPcBDHaNlFtQi+eKzjTUhSVvxJaKo3R6q4j8SVR613aa4AxunY2jdi -zQ== ------END CERTIFICATE----- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTAuthenticationController.php b/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTAuthenticationController.php deleted file mode 100644 index b0db6f4a..00000000 --- a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTAuthenticationController.php +++ /dev/null @@ -1,183 +0,0 @@ - WP_REST_Server::READABLE, - 'callback' => array($this, 'nonce'), - 'permission_callback' => '__return_true', - )); - register_rest_route('wordfence/v1', '/authenticate', array( - 'methods' => WP_REST_Server::CREATABLE, - 'callback' => array($this, 'authenticate'), - 'permission_callback' => '__return_true', - )); - register_rest_route('wordfence/v1', '/authenticate-premium', array( - 'methods' => WP_REST_Server::CREATABLE, - 'callback' => array($this, 'authenticatePremium'), - 'permission_callback' => '__return_true', - )); - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function nonce($request) { - $response = rest_ensure_response(array( - 'nonce' => self::generateNonce(), - 'admin_url' => network_admin_url(), - )); - return $response; - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function authenticate($request) { - require_once(WORDFENCE_PATH . '/lib/sodium_compat_fast.php'); - - $siteID = wfConfig::get('wordfenceCentralSiteID'); - if (!$siteID) { - return new WP_Error('rest_forbidden_context', - __('Site is not connected to Wordfence Central.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - // verify signature. - $data = $request->get_param('data'); - $dataChunks = explode('|', $data, 2); - if (count($dataChunks) !== 2) { - return new WP_Error('rest_forbidden_context', - __('Data is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - if (!preg_match('/[0-9a-f]{64}/i', $dataChunks[0])) { - return new WP_Error('rest_forbidden_context', - __('Nonce format is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - if (!preg_match('/[0-9a-f\-]{36}/i', $dataChunks[1])) { - return new WP_Error('rest_forbidden_context', - __('Site ID is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - if (!hash_equals($siteID, $dataChunks[1])) { - return new WP_Error('rest_forbidden_context', - __('Site ID is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - $signature = $request->get_param('signature'); - $nonce1 = self::generateNonce(); - $nonce2 = self::generateNonce(-1); - $verfiedNonce = hash_equals($nonce1, $dataChunks[0]) || hash_equals($nonce2, $dataChunks[0]); - - if (!$verfiedNonce) { - return new WP_Error('rest_forbidden_context', - __('Nonce is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - $signature = pack('H*', $signature); - if (!ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $data, wfConfig::get('wordfenceCentralPK'))) { - return new WP_Error('rest_forbidden_context', - __('Signature is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - $response = rest_ensure_response(array( - 'token' => (string) self::generateToken(), - )); - return $response; - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function authenticatePremium($request) { - require_once(WORDFENCE_PATH . '/lib/sodium_compat_fast.php'); - - // verify signature. - $data = $request->get_param('data'); - $dataChunks = explode('|', $data, 2); - if (count($dataChunks) !== 2) { - return new WP_Error('rest_forbidden_context', - __('Data is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - if (!preg_match('/[0-9a-f]{64}/i', $dataChunks[0])) { - return new WP_Error('rest_forbidden_context', - __('Nonce format is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - if (!is_email($dataChunks[1])) { - return new WP_Error('rest_forbidden_context', - __('Email address is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - $adminEmail = $dataChunks[1]; - - $signature = $request->get_param('signature'); - $nonce1 = self::generateNonce(); - $nonce2 = self::generateNonce(-1); - $verfiedNonce = hash_equals($nonce1, $dataChunks[0]) || hash_equals($nonce2, $dataChunks[0]); - - if (!$verfiedNonce) { - return new WP_Error('rest_forbidden_context', - __('Nonce is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - $signature = pack('H*', $signature); - if (!ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $data, WORDFENCE_CENTRAL_PUBLIC_KEY)) { - return new WP_Error('rest_forbidden_context', - __('Signature is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - $user_query = new WP_User_Query(array( - 'role' => 'administrator', - 'search' => $adminEmail, - 'search_columns' => array('user_email') - )); - $users = $user_query->get_results(); - if (is_array($users) && count($users) === 1) { - $jwt = new wfJWT('wordfence-central-premium'); - $jwt->addClaims(array('email' => $adminEmail)); - $response = rest_ensure_response(array( - 'token' => (string) $jwt, - )); - return $response; - } - - return new WP_Error('rest_forbidden_context', - __('Admin user with this email address not found.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTBaseController.php b/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTBaseController.php deleted file mode 100644 index db77b1be..00000000 --- a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTBaseController.php +++ /dev/null @@ -1,87 +0,0 @@ -isTokenValid($request); - - if ($validToken && - !is_wp_error($validToken) && - $this->tokenData['body']['sub'] === wfConfig::get('wordfenceCentralSiteID') - ) { - return true; - } - - if (is_wp_error($validToken)) { - return $validToken; - } - - return new WP_Error('rest_forbidden_context', - __('Token is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - /** - * @param WP_REST_Request $request - * @return WP_Error|bool - */ - public function verifyTokenPremium($request) { - $validToken = $this->isTokenValid($request); - - if ($validToken && - !is_wp_error($validToken) && - $this->tokenData['body']['sub'] === 'wordfence-central-premium' - ) { - return true; - } - - if (is_wp_error($validToken)) { - return $validToken; - } - - return new WP_Error('rest_forbidden_context', - __('Token is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - /** - * @param WP_REST_Request $request - * @return bool|WP_Error - */ - public function isTokenValid($request) { - $authHeader = $request->get_header('Authorization'); - if (!$authHeader) { - $authHeader = $request->get_header('X-Authorization'); - } - if (stripos($authHeader, 'bearer ') !== 0) { - return new WP_Error('rest_forbidden_context', - __('Authorization header format is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - $token = trim(substr($authHeader, 7)); - $jwt = new wfJWT(); - - try { - $this->tokenData = $jwt->decode($token); - - } catch (wfJWTException $e) { - return new WP_Error('rest_forbidden_context', - $e->getMessage(), - array('status' => rest_authorization_required_code())); - - } catch (Exception $e) { - return new WP_Error('rest_forbidden_context', - __('Token is invalid.', 'wordfence'), - array('status' => rest_authorization_required_code())); - } - - return true; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTConfigController.php b/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTConfigController.php deleted file mode 100644 index 0f2d347a..00000000 --- a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTConfigController.php +++ /dev/null @@ -1,341 +0,0 @@ -query('DELETE FROM ' . wfDB::networkTable('wfConfig') . " WHERE name LIKE 'wordfenceCentral%'"); - - wfConfig::set('wordfenceCentralDisconnected', true); - wfConfig::set('wordfenceCentralDisconnectTime', time()); - wfConfig::set('wordfenceCentralDisconnectEmail', $adminEmail); - wfConfig::set('wordfenceCentralConfigurationIssue', false); - - return !!$result; - } - - public function registerRoutes() { - register_rest_route('wordfence/v1', '/config', array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array($this, 'getConfig'), - 'permission_callback' => array($this, 'verifyToken'), - 'fields' => array( - 'description' => __('Specific config options to return.', 'wordfence'), - 'type' => 'array', - 'required' => false, - ), - )); - register_rest_route('wordfence/v1', '/config', array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array($this, 'setConfig'), - 'permission_callback' => array($this, 'verifyToken'), - 'fields' => array( - 'description' => __('Specific config options to set.', 'wordfence'), - 'type' => 'array', - 'required' => true, - ), - )); - register_rest_route('wordfence/v1', '/disconnect', array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array($this, 'disconnect'), - 'permission_callback' => array($this, 'verifyToken'), - )); - register_rest_route('wordfence/v1', '/premium-connect', array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array($this, 'premiumConnect'), - 'permission_callback' => array($this, 'verifyTokenPremium'), - )); - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function getConfig($request) { - $fields = (array) $request['fields']; - - $config = array(); - - $firewall = new wfFirewall(); - $wafFields = array( - 'autoPrepend' => $firewall->protectionMode() === wfFirewall::PROTECTION_MODE_EXTENDED, - 'avoid_php_input' => wfWAF::getInstance()->getStorageEngine()->getConfig('avoid_php_input', false) ? 1 : 0, - 'disabledRules' => array_keys((array) wfWAF::getInstance()->getStorageEngine()->getConfig('disabledRules')), - 'ruleCount' => count((array) wfWAF::getInstance()->getRules()), - 'disableWAFBlacklistBlocking' => wfWAF::getInstance()->getStorageEngine()->getConfig('disableWAFBlacklistBlocking'), - 'enabled' => $firewall->wafStatus() !== wfFirewall::FIREWALL_MODE_DISABLED, - 'firewallMode' => $firewall->firewallMode(), - 'learningModeGracePeriod' => wfWAF::getInstance()->getStorageEngine()->getConfig('learningModeGracePeriod'), - 'learningModeGracePeriodEnabled' => wfWAF::getInstance()->getStorageEngine()->getConfig('learningModeGracePeriodEnabled'), - 'subdirectoryInstall' => $firewall->isSubDirectoryInstallation(), - 'wafStatus' => $firewall->wafStatus(), - ); - $lsFields = array( - Controller_Settings::OPTION_XMLRPC_ENABLED => Controller_Settings::shared()->get(Controller_Settings::OPTION_XMLRPC_ENABLED), - Controller_Settings::OPTION_2FA_WHITELISTED => Controller_Settings::shared()->get(Controller_Settings::OPTION_2FA_WHITELISTED), - Controller_Settings::OPTION_IP_SOURCE => Controller_Settings::shared()->get(Controller_Settings::OPTION_IP_SOURCE), - Controller_Settings::OPTION_IP_TRUSTED_PROXIES => Controller_Settings::shared()->get(Controller_Settings::OPTION_IP_TRUSTED_PROXIES), - Controller_Settings::OPTION_REQUIRE_2FA_ADMIN => Controller_Settings::shared()->get(Controller_Settings::OPTION_REQUIRE_2FA_ADMIN), - Controller_Settings::OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED => Controller_Settings::shared()->get(Controller_Settings::OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED), - Controller_Settings::OPTION_GLOBAL_NOTICES => Controller_Settings::shared()->get(Controller_Settings::OPTION_GLOBAL_NOTICES), - Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED => Controller_Settings::shared()->get(Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED), - Controller_Settings::OPTION_REMEMBER_DEVICE_DURATION => Controller_Settings::shared()->get(Controller_Settings::OPTION_REMEMBER_DEVICE_DURATION), - Controller_Settings::OPTION_ALLOW_XML_RPC => Controller_Settings::shared()->get(Controller_Settings::OPTION_ALLOW_XML_RPC), - Controller_Settings::OPTION_ENABLE_AUTH_CAPTCHA => Controller_Settings::shared()->get(Controller_Settings::OPTION_ENABLE_AUTH_CAPTCHA), - Controller_Settings::OPTION_RECAPTCHA_THRESHOLD => Controller_Settings::shared()->get(Controller_Settings::OPTION_RECAPTCHA_THRESHOLD), - Controller_Settings::OPTION_LAST_SECRET_REFRESH => Controller_Settings::shared()->get(Controller_Settings::OPTION_LAST_SECRET_REFRESH), - ); - // Convert the database strings to typed values. - foreach ($lsFields as $lsField => $value) { - $lsFields[$lsField] = Controller_Settings::shared()->clean($lsField, $value); - } - - if (!$fields) { - foreach (wfConfig::$defaultConfig as $group => $groupOptions) { - foreach ($groupOptions as $field => $values) { - $fields[] = $field; - } - } - foreach ($wafFields as $wafField => $value) { - $fields[] = 'waf.' . $wafField; - } - foreach ($lsFields as $lsField => $value) { - $fields[] = 'wfls_settings_' . $lsField; - } - } - - foreach ($fields as $field) { - if (strpos($field, 'waf.') === 0) { - $wafField = substr($field, 4); - if (array_key_exists($wafField, $wafFields)) { - $config['waf'][$wafField] = $wafFields[$wafField]; - } - continue; - } - - if (strpos($field, 'wfls_settings_') === 0) { - $lsField = substr($field, 14); - if (array_key_exists($lsField, $lsFields)) { - $config['wfls_settings_' . $lsField] = $lsFields[$lsField]; - } - continue; - } - - if (array_key_exists($field, wfConfig::$defaultConfig['checkboxes'])) { - $config[$field] = (bool) wfConfig::get($field); - - } else if (array_key_exists($field, wfConfig::$defaultConfig['otherParams']) || - array_key_exists($field, wfConfig::$defaultConfig['defaultsOnly'])) { - - $configConfig = !empty(wfConfig::$defaultConfig['otherParams'][$field]) ? - wfConfig::$defaultConfig['otherParams'][$field] : wfConfig::$defaultConfig['defaultsOnly'][$field]; - - if (!empty($configConfig['validation']['type'])) { - switch ($configConfig['validation']['type']) { - case wfConfig::TYPE_INT: - $config[$field] = wfConfig::getInt($field); - break; - - case wfConfig::TYPE_DOUBLE: - case wfConfig::TYPE_FLOAT: - $config[$field] = floatval(wfConfig::get($field)); - break; - - case wfConfig::TYPE_BOOL: - $config[$field] = (bool) wfConfig::get($field); - break; - - case wfConfig::TYPE_ARRAY: - $config[$field] = wfConfig::get_ser($field); - break; - - case wfConfig::TYPE_STRING: - default: - $config[$field] = wfConfig::get($field); - break; - } - } else { - $config[$field] = wfConfig::get($field); - } - - } else if (in_array($field, wfConfig::$serializedOptions)) { - $config[$field] = wfConfig::get_ser($field); - } - } - - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - parse_str($api->makeAPIQueryString(), $qs); - $systemInfo = json_decode(wfUtils::base64url_decode($qs['s']), true); - $systemInfo['output_buffering'] = ini_get('output_buffering'); - $systemInfo['ip'] = wfUtils::getIPAndServerVariable(); - $systemInfo['detected_ips'] = wfUtils::getAllServerVariableIPs(); - $systemInfo['admin_url'] = network_admin_url(); - - $response = rest_ensure_response(array( - 'config' => $config, - 'info' => $systemInfo, - )); - return $response; - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function setConfig($request) { - wfCentral::preventConfigurationSync(); - - $fields = $request['fields']; - if (is_array($fields) && $fields) { - $loginSecurityConfig = array(); - foreach ($fields as $key => $value) { - if (strpos($key, 'wfls_settings_') === 0) { - $lsField = substr($key, 14); - $loginSecurityConfig[$lsField] = $value; - } - } - - if ($loginSecurityConfig) { - $errors = Controller_Settings::shared()->validate_multiple($loginSecurityConfig); - - if ($errors !== true) { - if (count($errors) == 1) { - return new WP_Error('rest_set_config_error', - sprintf( - /* translators: Error message. */ - __('An error occurred while saving the configuration: %s', 'wordfence'), $errors[0]['error']), - array('status' => 422)); - - } else if (count($errors) > 1) { - $compoundMessage = array(); - foreach ($errors as $e) { - $compoundMessage[] = $e['error']; - } - return new WP_Error('rest_set_config_error', - sprintf( - /* translators: Error message. */ - __('Errors occurred while saving the configuration: %s', 'wordfence'), implode(', ', $compoundMessage)), - array('status' => 422)); - } - - return new WP_Error('rest_set_config_error', - __('Errors occurred while saving the configuration.', 'wordfence'), - array('status' => 422)); - } - - try { - Controller_Settings::shared()->set_multiple($loginSecurityConfig); - foreach ($fields as $key => $value) { - if (strpos($key, 'wfls_settings_') === 0) { - unset($fields[$key]); - } - } - - } catch (Exception $e) { - return new WP_Error('rest_save_config_error', - sprintf( - /* translators: Error message. */ - __('A server error occurred while saving the configuration: %s', 'wordfence'), $e->getMessage()), - array('status' => 500)); - } - } - - $errors = wfConfig::validate($fields); - if ($errors !== true) { - if (count($errors) == 1) { - return new WP_Error('rest_set_config_error', - sprintf( - /* translators: Error message. */ - __('An error occurred while saving the configuration: %s', 'wordfence'), $errors[0]['error']), - array('status' => 422)); - - } else if (count($errors) > 1) { - $compoundMessage = array(); - foreach ($errors as $e) { - $compoundMessage[] = $e['error']; - } - return new WP_Error('rest_set_config_error', - sprintf( - /* translators: Error message. */ - __('Errors occurred while saving the configuration: %s', 'wordfence'), implode(', ', $compoundMessage)), - array('status' => 422)); - } - - return new WP_Error('rest_set_config_error', - __('Errors occurred while saving the configuration.', 'wordfence'), - array('status' => 422)); - } - - try { - wfConfig::save($fields); - return rest_ensure_response(array( - 'success' => true, - )); - - } catch (Exception $e) { - return new WP_Error('rest_save_config_error', - sprintf( - /* translators: Error message. */ - __('A server error occurred while saving the configuration: %s', 'wordfence'), $e->getMessage()), - array('status' => 500)); - } - } - return new WP_Error('rest_save_config_error', - __("Validation error: 'fields' parameter is empty or not an array.", 'wordfence'), - array('status' => 422)); - - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function disconnect($request) { - self::disconnectConfig(); - return rest_ensure_response(array( - 'success' => true, - )); - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function premiumConnect($request) { - require_once(WORDFENCE_PATH . '/lib/sodium_compat_fast.php'); - - // Store values sent by Central. - $wordfenceCentralPK = $request['public-key']; - $wordfenceCentralSiteData = $request['site-data']; - $wordfenceCentralSiteID = $request['site-id']; - - $keypair = ParagonIE_Sodium_Compat::crypto_sign_keypair(); - $publicKey = ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair); - $secretKey = ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair); - wfConfig::set('wordfenceCentralSecretKey', $secretKey); - - wfConfig::set('wordfenceCentralConnected', 1); - wfConfig::set('wordfenceCentralCurrentStep', 6); - wfConfig::set('wordfenceCentralPK', pack("H*", $wordfenceCentralPK)); - wfConfig::set('wordfenceCentralSiteData', json_encode($wordfenceCentralSiteData)); - wfConfig::set('wordfenceCentralSiteID', $wordfenceCentralSiteID); - wfConfig::set('wordfenceCentralConnectTime', time()); - wfConfig::set('wordfenceCentralConnectEmail', !empty($this->tokenData['adminEmail']) ? $this->tokenData['adminEmail'] : null); - - // Return values created by Wordfence. - return rest_ensure_response(array( - 'success' => true, - 'public-key' => ParagonIE_Sodium_Compat::bin2hex($publicKey), - )); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTScanController.php b/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTScanController.php deleted file mode 100644 index 7422e9c2..00000000 --- a/wp/wp-content/plugins/wordfence/lib/rest-api/wfRESTScanController.php +++ /dev/null @@ -1,163 +0,0 @@ - WP_REST_Server::READABLE, - 'callback' => array($this, 'getIssuesList'), - 'permission_callback' => array($this, 'verifyToken'), - 'group' => array( - 'description' => __('Scan result group or all results.', 'wordfence'), - 'type' => 'string', - 'required' => false, - ), - 'offset' => array( - 'description' => __('Offset of scan results to return.', 'wordfence'), - 'type' => 'int', - 'required' => false, - ), - 'limit' => array( - 'description' => __('Number of scan results to return.', 'wordfence'), - 'type' => 'int', - 'required' => false, - ), - )); - register_rest_route('wordfence/v1', '/scan', array( - 'methods' => WP_REST_Server::CREATABLE, - 'callback' => array($this, 'startScan'), - 'permission_callback' => array($this, 'verifyToken'), - )); - register_rest_route('wordfence/v1', '/scan', array( - 'methods' => WP_REST_Server::DELETABLE, - 'callback' => array($this, 'stopScan'), - 'permission_callback' => array($this, 'verifyToken'), - )); - register_rest_route('wordfence/v1', '/scan/issue', array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array($this, 'updateIssue'), - 'permission_callback' => array($this, 'verifyToken'), - )); - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function getIssuesList($request) { - $group = $request['group'] ? $request['group'] : 'all'; - $offset = absint($request['offset']); - $limit = absint($request['limit']); - if ($limit === 0) { - $limit = 100; - } - switch ($group) { - case 'pending': - $count = wfIssues::shared()->getPendingIssueCount(); - $issues = wfIssues::shared()->getPendingIssues($offset, $limit); - break; - - default: // Return all issues. - $count = wfIssues::shared()->getIssueCount(); - $issues = wfIssues::shared()->getIssues($offset, $limit); - break; - } - - $response = rest_ensure_response(array( - 'count' => $count, - 'last-scan-time' => wfConfig::get('scanTime'), - 'issues' => $issues, - )); - return $response; - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function startScan($request) { - wordfence::status(1, 'info', sprintf(/* translators: Localized date. */ __('Wordfence scan starting at %s from Wordfence Central', 'wordfence'), - date('l jS \of F Y h:i:s A', current_time('timestamp')))); - - try { - wfScanEngine::startScan(); - - } catch (wfScanEngineTestCallbackFailedException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - wfUtils::clearScanLock(); - $response = rest_ensure_response(array( - 'success' => false, - 'error-code' => $e->getCode(), - 'error' => $e->getMessage(), - )); - return $response; - - } catch (Exception $e) { - if ($e->getCode() != wfScanEngine::SCAN_MANUALLY_KILLED) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_GENERAL); - - $response = rest_ensure_response(array( - 'success' => false, - 'error-code' => $e->getCode(), - 'error' => $e->getMessage(), - )); - return $response; - } - } - - $response = rest_ensure_response(array( - 'success' => true, - )); - return $response; - - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function stopScan($request) { - wordfence::status(1, 'info', __('Scan stop request received from Wordfence Central.', 'wordfence')); - wordfence::status(10, 'info', __('SUM_KILLED:A request was received to stop the previous scan from Wordfence Central.', 'wordfence')); - wfUtils::clearScanLock(); //Clear the lock now because there may not be a scan running to pick up the kill request and clear the lock - wfScanEngine::requestKill(); - wfConfig::remove('scanStartAttempt'); - wfConfig::set('lastScanFailureType', false); - $response = rest_ensure_response(array( - 'success' => true, - )); - return $response; - } - - /** - * @param WP_REST_Request $request - * @return mixed|WP_REST_Response - */ - public function updateIssue($request) { - $issue = $request['issue']; - $id = is_array($issue) && array_key_exists('id', $issue) ? $issue['id'] : null; - $status = is_array($issue) && array_key_exists('status', $issue) ? $issue['status'] : null; - - if ($id) { - $wfdb = new wfDB(); - $wfdb->queryWrite("update " . wfDB::networkTable('wfIssues') . " set status='%s' where id=%d", $status, $id); - $response = rest_ensure_response(array( - 'success' => true, - )); - return $response; - } - $response = rest_ensure_response(array( - 'success' => false, - 'error' => 'Issue not found.', - )); - return $response; - - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/sodium_compat_fast.php b/wp/wp-content/plugins/wordfence/lib/sodium_compat_fast.php deleted file mode 100644 index 4153c85c..00000000 --- a/wp/wp-content/plugins/wordfence/lib/sodium_compat_fast.php +++ /dev/null @@ -1,6 +0,0 @@ - - - - -<?php esc_html_e('Wordfence System Info', 'wordfence') ?> - -?ver=' type='text/css' media='all' /> - -' . esc_html__('Unable to output phpinfo content because it is disabled', 'wordfence') . "\n"; } -$out = ob_get_clean(); -$out = str_replace('width="600"','width="900"', $out); -// $out = preg_replace('//s', '', $out); -$out = preg_replace('/]+>/', '', $out); -$out = preg_replace('/<\/a>/', '', $out); -$out = preg_replace('/[^<]*<\/title>/','', $out); -echo $out; -?> -<div class="diffFooter"><?php echo wp_kses(sprintf(__('© %d to %d Wordfence — Visit <a href="http://wordfence.com/">Wordfence.com</a> for help, security updates and more.', 'wordfence'), date_i18n('Y', WORDFENCE_EPOCH), date_i18n('Y')), array('a'=>array('href'=>array()))) ?></div> -</body> -</html> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/viewFullActivityLog.php b/wp/wp-content/plugins/wordfence/lib/viewFullActivityLog.php deleted file mode 100644 index 4cd09f50..00000000 --- a/wp/wp-content/plugins/wordfence/lib/viewFullActivityLog.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?> -<?php if(! wfUtils::isAdmin()){ exit(); } ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link rel='stylesheet' id='wordfence-main-style-css' href='<?php echo wfUtils::getBaseURL() . wfUtils::versionedAsset('css/fullLog.css'); ?>?ver=<?php echo WORDFENCE_VERSION; ?>' type='text/css' media='all' /> -<style type="text/css"> - -</style> -</head> -<body> -<h1><?php esc_html_e('Wordfence Full Activity Log', 'wordfence') ?></h1> -<?php -$db = new wfDB(); -global $wpdb; -$debugOn = wfConfig::get('debugOn', 0); -$table = wfDB::networkTable('wfStatus'); -$offset = 0; -$timeOffset = 3600 * get_option('gmt_offset'); -$q = $db->querySelect("SELECT ctime, level, type, msg FROM {$table} ORDER BY ctime DESC LIMIT %d, 100", $offset); -while (is_array($q) && count($q) > 0) { - foreach($q as $r){ - if($r['level'] < 4 || $debugOn){ - echo '<div' . ($r['type'] == 'error' ? ' class="error"' : '') . '>[' . date('M d H:i:s', (int) $r['ctime'] + $timeOffset) . ':' . $r['ctime'] . ':' . $r['level'] . ':' . $r['type'] . '] ' . esc_html($r['msg']) . "</div>\n"; - } - } - $offset += count($q); - $q = $db->querySelect("SELECT ctime, level, type, msg FROM {$table} ORDER BY ctime DESC LIMIT %d, 100", $offset); -} -?> -</body> -</html> -<?php exit(0); ?> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wf503.php b/wp/wp-content/plugins/wordfence/lib/wf503.php deleted file mode 100644 index 0b573bd1..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wf503.php +++ /dev/null @@ -1,394 +0,0 @@ -<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?> -<!DOCTYPE html> -<html> - <head> - <title><?php esc_html_e('Your access to this site has been limited', 'wordfence'); ?> - - - -
-
-

-

-

- -
-
- -
- - -

- - - - - - - - - -
:
:
- -
-
- \s*/i', '', $contents); - $contents = preg_replace('/^\s*/i', '', $contents); - $contents = preg_replace('/ -
-
-

-

-

-
-
- -

Documentation (' . esc_html__('opens in new tab', 'wordfence') . ')', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_LOCKED_OUT)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('class'=>array()))); ?>

-

array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?>.
.

-
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfAPI.php b/wp/wp-content/plugins/wordfence/lib/wfAPI.php deleted file mode 100644 index 723cba98..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfAPI.php +++ /dev/null @@ -1,245 +0,0 @@ -APIKey = $apiKey; - $this->wordpressVersion = $wordpressVersion; - } - - public function getStaticURL($url) { // In the form '/something.bin' without quotes - return $this->getURL(rtrim($this->getAPIURL(), '/') . '/' . ltrim($url, '/')); - } - - public function call($action, $getParams = array(), $postParams = array(), $forceSSL = false, $timeout = 900) { - $apiURL = $this->getAPIURL(); - //Sanity check. Developer should call wfAPI::SSLEnabled() to check if SSL is enabled before forcing SSL and return a user friendly msg if it's not. - if ($forceSSL && (!preg_match('/^https:/i', $apiURL))) { - //User's should never see this message unless we aren't calling SSLEnabled() to check if SSL is enabled before using call() with forceSSL - throw new wfAPICallSSLUnavailableException(__("SSL is not supported by your web server and is required to use this function. Please ask your hosting provider or site admin to install cURL with openSSL to use this feature.", 'wordfence')); - } - $json = $this->getURL(rtrim($apiURL, '/') . '/v' . WORDFENCE_API_VERSION . '/?' . $this->makeAPIQueryString() . '&' . self::buildQuery( - array_merge( - array('action' => $action), - $getParams - )), $postParams, $timeout); - if (!$json) { - throw new wfAPICallInvalidResponseException(sprintf(/* translators: API call/action/endpoint. */__("We received an empty data response from the Wordfence scanning servers when calling the '%s' function.", 'wordfence'), $action)); - } - - $dat = json_decode($json, true); - - if (!is_array($dat)) { - throw new wfAPICallInvalidResponseException(sprintf(/* translators: API call/action/endpoint. */ __("We received a data structure that is not the expected array when contacting the Wordfence scanning servers and calling the '%s' function.", 'wordfence'), $action)); - } - - //Only process key data for responses that include it - if (array_key_exists('_isPaidKey', $dat)) - $this->processKeyData($dat); - - if (isset($dat['_touppChanged'])) { - wfConfig::set('touppPromptNeeded', wfUtils::truthyToBoolean($dat['_touppChanged'])); - } - - if (isset($dat['errorMsg'])) { - throw new wfAPICallErrorResponseException($dat['errorMsg']); - } - - return $dat; - } - - private function processKeyData($dat) { - $license = wfLicense::current() - ->setApiKey($this->APIKey) - ->setPaid($dat['_isPaidKey']) - ->setRemainingDays($dat['_keyExpDays']) - ->setType(array_key_exists('_licenseType', $dat) ? $dat['_licenseType'] : null); - - if (isset($dat['_isPaidKey']) && !isset($dat['errorMsg'])) { - wfConfig::setOrRemove('premiumAutoRenew', isset($dat['_autoRenew']) ? wfUtils::truthyToInt($dat['_autoRenew']) : null); - wfConfig::setOrRemove('premiumNextRenew', isset($dat['_nextRenewAttempt']) ? time() + $dat['_nextRenewAttempt'] * 86400 : null); - wfConfig::setOrRemove('premiumPaymentExpiring', isset($dat['_paymentExpiring']) ? wfUtils::truthyToInt($dat['_paymentExpiring']) : null); - wfConfig::setOrRemove('premiumPaymentExpired', isset($dat['_paymentExpired']) ? wfUtils::truthyToInt($dat['_paymentExpired']) : null); - wfConfig::setOrRemove('premiumPaymentMissing', isset($dat['_paymentMissing']) ? wfUtils::truthyToInt($dat['_paymentMissing']) : null); - wfConfig::setOrRemove('premiumPaymentHold', isset($dat['_paymentHold']) ? wfUtils::truthyToInt($dat['_paymentHold']) : null); - } - - $hasKeyConflict = false; - if (isset($dat['_hasKeyConflict'])) { - $hasKeyConflict = ($dat['_hasKeyConflict'] == 1); - if ($hasKeyConflict) { - new wfNotification(null, wfNotification::PRIORITY_HIGH_CRITICAL, '' . esc_html__('The Wordfence license you\'re using does not match this site\'s address. Premium features are disabled.', 'wordfence') . '', 'wfplugin_keyconflict', null, array(array('link' => 'https://www.wordfence.com/manage-wordfence-api-keys/', 'label' => 'Manage Keys'))); - $license->setConflicting(); - } - } - - $license->setDeleted(isset($dat['_keyNoLongerValid']) && $dat['_keyNoLongerValid'] == 1); - - if (!$hasKeyConflict) { - $license->setConflicting(false); - $n = wfNotification::getNotificationForCategory('wfplugin_keyconflict'); - if ($n !== null) { - wordfence::status(1, 'info', 'Idle'); - $n->markAsRead(); - } - } - - $license->save(isset($dat['errorMsg'])); - } - - protected function getURL($url, $postParams = array(), $timeout = 900) { - wordfence::status(4, 'info', sprintf(/* translators: API version. */ __("Calling Wordfence API v%s:", 'wordfence'), WORDFENCE_API_VERSION) . $url); - - if (!function_exists('wp_remote_post')) { - require_once(ABSPATH . WPINC . 'http.php'); - } - - $ssl_verify = (bool) wfConfig::get('ssl_verify'); - $args = array( - 'timeout' => $timeout, - 'user-agent' => "Wordfence.com UA " . (defined('WORDFENCE_VERSION') ? WORDFENCE_VERSION : '[Unknown version]'), - 'body' => $postParams, - 'sslverify' => $ssl_verify, - 'headers' => array('Referer' => false), - ); - if (!$ssl_verify) { - // Some versions of cURL will complain that SSL verification is disabled but the CA bundle was supplied. - $args['sslcertificates'] = false; - } - - $response = wp_remote_post($url, $args); - - $this->lastHTTPStatus = (int) wp_remote_retrieve_response_code($response); - - if (is_wp_error($response)) { - $error_message = $response->get_error_message(); - if ($error_message) { - $apiExceptionMessage = sprintf(/* translators: Error message. */ __('There was an error connecting to the Wordfence scanning servers: %s', 'wordfence'), $error_message); - } else { - $apiExceptionMessage = __('There was an unknown error connecting to the Wordfence scanning servers.', 'wordfence'); - } - - throw new wfAPICallFailedException($apiExceptionMessage); - } - - $dateHeader = @$response['headers']['date']; - if (!empty($dateHeader) && (time() - wfConfig::get('timeoffset_wf_updated', 0) > 3600)) { - if (function_exists('date_create_from_format')) { - $dt = DateTime::createFromFormat('D, j M Y G:i:s O', $dateHeader); - $timestamp = $dt->getTimestamp(); - } - else { - $timestamp = strtotime($dateHeader); - } - $offset = $timestamp - time(); - wfConfig::set('timeoffset_wf', $offset); - wfConfig::set('timeoffset_wf_updated', time()); - } - - if (!empty($response['response']['code'])) { - $this->lastHTTPStatus = (int) $response['response']['code']; - } - - if (200 != $this->lastHTTPStatus) { - throw new wfAPICallFailedException(sprintf(/* translators: HTTP status code. */__("The Wordfence scanning servers are currently unavailable. This may be for maintenance or a temporary outage. If this still occurs in an hour, please contact support. [%s]", 'wordfence'), $this->lastHTTPStatus)); - } - - $content = wp_remote_retrieve_body($response); - return $content; - } - - public function binCall($func, $postData) { - $url = rtrim($this->getAPIURL(), '/') . '/v' . WORDFENCE_API_VERSION . '/?' . $this->makeAPIQueryString() . '&action=' . $func; - - $data = $this->getURL($url, $postData); - - if (preg_match('/\{.*errorMsg/', $data)) { - $jdat = @json_decode($data, true); - if (is_array($jdat) && $jdat['errorMsg']) { - throw new Exception($jdat['errorMsg']); - } - } - return array('code' => $this->lastHTTPStatus, 'data' => $data); - } - - public static function generateSiteStats($wordpressVersion = null) { - if ($wordpressVersion === null) - $wordpressVersion = wfUtils::getWPVersion(); - $cv = null; - $cs = null; - if (function_exists('curl_version')) { - $curl = curl_version(); - $cv = $curl['version']; - $cs = $curl['ssl_version']; - } - - $values = array( - 'wp' => $wordpressVersion, - 'wf' => WORDFENCE_VERSION, - 'ms' => (is_multisite() ? get_blog_count() : false), - 'h' => wfUtils::wpHomeURL(), - 'sslv' => function_exists('openssl_verify') && defined('OPENSSL_VERSION_NUMBER') ? OPENSSL_VERSION_NUMBER : null, - 'pv' => phpversion(), - 'pt' => php_sapi_name(), - 'cv' => $cv, - 'cs' => $cs, - 'sv' => (isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : null), - 'dv' => wfConfig::get('dbVersion', null), - 'lang' => get_site_option('WPLANG'), - ); - - return wfUtils::base64url_encode(wfUtils::jsonEncodeSafely($values)); - } - - public function makeAPIQueryString() { - return self::buildQuery(array( - 'k' => $this->APIKey, - 's' => self::generateSiteStats($this->wordpressVersion) - )); - } - - private function buildQuery($data) { - if (version_compare(phpversion(), '5.1.2', '>=')) { - return http_build_query($data, '', '&'); //arg_separator parameter was only added in PHP 5.1.2. We do this because some PHP.ini's have arg_separator.output set to '&' - } else { - return http_build_query($data); - } - } - - private function getAPIURL() { - return self::SSLEnabled() ? WORDFENCE_API_URL_SEC : WORDFENCE_API_URL_NONSEC; - } - - public static function SSLEnabled() { - if (!function_exists('wp_http_supports')) { - require_once(ABSPATH . WPINC . 'http.php'); - } - return wp_http_supports(array('ssl')); - } - - public function getTextImageURL($text) { - $apiURL = $this->getAPIURL(); - return rtrim($apiURL, '/') . '/v' . WORDFENCE_API_VERSION . '/?' . $this->makeAPIQueryString() . '&' . self::buildQuery(array('action' => 'image', 'txt' => base64_encode($text))); - } -} - -class wfAPICallSSLUnavailableException extends Exception { -} - -class wfAPICallFailedException extends Exception { -} - -class wfAPICallInvalidResponseException extends Exception { -} - -class wfAPICallErrorResponseException extends Exception { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfActivityReport.php b/wp/wp-content/plugins/wordfence/lib/wfActivityReport.php deleted file mode 100644 index 1cc33a1a..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfActivityReport.php +++ /dev/null @@ -1,755 +0,0 @@ -db = $wpdb; - $this->limit = $limit; - } - - /** - * Schedule the activity report cron job. - */ - public static function scheduleCronJob() { - self::clearCronJobs(); - - if (!wfConfig::get('email_summary_enabled', 1)) { - return; - } - - if (is_main_site()) { - list(, $end_time) = wfActivityReport::getReportDateRange(); - wp_schedule_single_event($end_time, 'wordfence_email_activity_report'); - } - } - - /** - * Remove the activity report cron job. - */ - public static function disableCronJob() { - self::clearCronJobs(); - } - - public static function clearCronJobs() { - wp_clear_scheduled_hook('wordfence_email_activity_report'); - } - - /** - * Send out the report and reschedule the next report's cron job. - */ - public static function executeCronJob() { - if (!wfConfig::get('email_summary_enabled', 1)) { - return; - } - - $emails = wfConfig::getAlertEmails(); - if (count($emails)) { - $report = new self(); - $report->sendReportViaEmail($emails); - } - self::scheduleCronJob(); - } - - /** - * Output a compact version of the email for the WP dashboard. - */ - public static function outputDashboardWidget() { - $report = new self(5); - echo $report->toWidgetView(); - } - - /** - * @return array - */ - public static function getReportDateRange() { - $interval = wfConfig::get('email_summary_interval', 'weekly'); - $offset = get_option('gmt_offset'); - return self::_getReportDateRange($interval, $offset); - } - - /** - * Testable code. - * - * @param string $interval - * @param int $offset - * @param null $time - * @return array - */ - public static function _getReportDateRange($interval = 'weekly', $offset = 0, $time = null) { - if ($time === null) { - $time = time(); - } - - $day = (int) gmdate('w', $time); - $month = (int) gmdate("n", $time); - $day_of_month = (int) gmdate("j", $time); - $year = (int) gmdate("Y", $time); - - $start_time = 0; - $end_time = 0; - - switch ($interval) { - // Send a report 4pm every day - case 'daily': - $start_time = gmmktime(16, 0, 0, $month, $day_of_month, $year) + (-$offset * 60 * 60); - $end_time = $start_time + 86400; - break; - - // Send a report 4pm every Monday - case 'weekly': - $start_time = gmmktime(16, 0, 0, $month, $day_of_month - $day + 1, $year) + (-$offset * 60 * 60); - $end_time = $start_time + (86400 * 7); - break; - - // Send a report at 4pm the first of every month - case 'monthly': - $start_time = gmmktime(16, 0, 0, $month, 1, $year) + (-$offset * 60 * 60); - $end_time = gmmktime(16, 0, 0, $month + 1, 1, $year) + (-$offset * 60 * 60); - break; - } - - return array($start_time, $end_time); - } - - /** - * @return int - */ - public static function getReportDateFrom() { - $interval = wfConfig::get('email_summary_interval', 'weekly'); - return self::_getReportDateFrom($interval); - } - - /** - * @param string $interval - * @param null $time - * @return int - */ - public static function _getReportDateFrom($interval = 'weekly', $time = null) { - if ($time === null) { - $time = time(); - } - - // weekly - $from = $time - (86400 * 7); - switch ($interval) { - case 'daily': - $from = $time - 86400; - break; - - // Send a report at 4pm the first of every month - case 'monthly': - $from = strtotime('-1 month', $time); - break; - } - - return $from; - } - - /** - * @return array - */ - public function getFullReport() { - $start_time = microtime(true); - $remainder = 0; - $recent_firewall_activity = $this->getRecentFirewallActivity($this->limit, $remainder); - return array( - 'top_ips_blocked' => $this->getTopIPsBlocked($this->limit), - 'top_countries_blocked' => $this->getTopCountriesBlocked($this->limit), - 'top_failed_logins' => $this->getTopFailedLogins($this->limit), - 'recent_firewall_activity' => $recent_firewall_activity, - 'omitted_firewall_activity'=> $remainder, - 'recently_modified_files' => $this->getRecentFilesModified($this->limit), - 'updates_needed' => $this->getUpdatesNeeded(), - 'microseconds' => microtime(true) - $start_time, - ); - } - - /** - * @return array - */ - public function getWidgetReport() { - $start_time = microtime(true); - return array( - 'top_ips_blocked' => $this->getTopIPsBlocked($this->limit), - 'top_countries_blocked' => $this->getTopCountriesBlocked($this->limit), - 'top_failed_logins' => $this->getTopFailedLogins($this->limit), - 'updates_needed' => $this->getUpdatesNeeded(), - 'microseconds' => microtime(true) - $start_time, - ); - } - - public function getBlockedCount($maxAgeDays = null, $grouping = null) { - $maxAgeDays = (int) $maxAgeDays; - if ($maxAgeDays <= 0) { - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 7 day)) / 86400)'; - switch (wfConfig::get('email_summary_interval', 'weekly')) { - case 'daily': - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 day)) / 86400)'; - break; - case 'monthly': - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 month)) / 86400)'; - break; - } - } - else { - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval ' . $maxAgeDays . ' day)) / 86400)'; - } - - //Possible values for blockType: throttle, manual, brute, fakegoogle, badpost, country, advanced, blacklist, waf - $groupingWHERE = ''; - switch ($grouping) { - case self::BLOCK_TYPE_COMPLEX: - $groupingWHERE = ' AND blockType IN ("fakegoogle", "badpost", "country", "advanced", "waf")'; - break; - case self::BLOCK_TYPE_BRUTE_FORCE: - $groupingWHERE = ' AND blockType IN ("throttle", "brute")'; - break; - case self::BLOCK_TYPE_BLACKLIST: - $groupingWHERE = ' AND blockType IN ("blacklist", "manual")'; - break; - } - - $table_wfBlockedIPLog = wfDB::networkTable('wfBlockedIPLog'); - $count = $this->db->get_var(<<= {$interval}{$groupingWHERE} -SQL - ); - return $count; - } - - /** - * @param int $limit - * @return mixed - */ - public function getTopIPsBlocked($limit = 10, $maxAgeDays = null) { - $maxAgeDays = (int) $maxAgeDays; - if ($maxAgeDays <= 0) { - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 7 day)) / 86400)'; - switch (wfConfig::get('email_summary_interval', 'weekly')) { - case 'daily': - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 day)) / 86400)'; - break; - case 'monthly': - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 month)) / 86400)'; - break; - } - } - else { - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval ' . $maxAgeDays . ' day)) / 86400)'; - } - - $table_wfBlockedIPLog = wfDB::networkTable('wfBlockedIPLog'); - $query=<<= {$interval} -GROUP BY IP -ORDER BY blockCount DESC -LIMIT %d -SQL; - $results = $this->db->get_results($this->db->prepare($query, $limit)); - if ($results) { - foreach ($results as &$row) { - $row->countryName = $this->getCountryNameByCode($row->countryCode); - } - } - return $results; - } - - /** - * @param int $limit - * @return array - */ - public function getTopCountriesBlocked($limit = 10, $maxAgeDays = null) { - $maxAgeDays = (int) $maxAgeDays; - if ($maxAgeDays <= 0) { - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 7 day)) / 86400)'; - switch (wfConfig::get('email_summary_interval', 'weekly')) { - case 'daily': - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 day)) / 86400)'; - break; - case 'monthly': - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 month)) / 86400)'; - break; - } - } - else { - $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval ' . $maxAgeDays . ' day)) / 86400)'; - } - - $table_wfBlockedIPLog = wfDB::networkTable('wfBlockedIPLog'); - $query=<<= {$interval} GROUP BY IP) t -GROUP BY countryCode -ORDER BY totalBlockCount DESC -LIMIT %d -SQL; - $results = $this->db->get_results($this->db->prepare($query, $limit)); - if ($results) { - foreach ($results as &$row) { - $row->countryName = $this->getCountryNameByCode($row->countryCode); - } - } - return $results; - } - - /** - * @param int $limit - * @return mixed - */ - public function getTopFailedLogins($limit = 10) { - $interval = 'UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 7 day))'; - switch (wfConfig::get('email_summary_interval', 'weekly')) { - case 'daily': - $interval = 'UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 day))'; - break; - case 'monthly': - $interval = 'UNIX_TIMESTAMP(DATE_SUB(NOW(), interval 1 month))'; - break; - } - - $table_wfLogins = wfDB::networkTable('wfLogins'); - $failedLogins = $this->db->get_results($this->db->prepare(<< $interval -GROUP BY wfl.username -ORDER BY fail_count DESC -LIMIT %d -SQL - , $limit)); - - foreach ($failedLogins as &$login) { - $exists = $this->db->get_var($this->db->prepare(<<db->users} WHERE user_login = '%s' OR user_email = '%s' -SQL - , $login->username, $login->username)); - $login->is_valid_user = $exists; - } - - return $failedLogins; - } - - /** - * Returns any updates needs or false if everything is up to date. - * - * @return array|bool - */ - public function getUpdatesNeeded($useCachedValued = true) { - $update_check = new wfUpdateCheck(); - $needs_update = $update_check->checkAllUpdates($useCachedValued) - ->needsAnyUpdates(); - if ($needs_update) { - return array( - 'core' => $update_check->getCoreUpdateVersion(), - 'plugins' => $update_check->getPluginUpdates(), - 'themes' => $update_check->getThemeUpdates(), - ); - } - return false; - } - - /** - * Returns list of firewall activity up to $limit number of entries. - * - * @param int $limit Max events to return in results - * @param int $remainder - * @return array - */ - public function getRecentFirewallActivity($limit, &$remainder) { - $dateRange = wfActivityReport::getReportDateRange(); - $recent_firewall_activity = new wfRecentFirewallActivity(null, max(604800, $dateRange[1] - $dateRange[0])); - $recent_firewall_activity->run(); - return $recent_firewall_activity->mostRecentActivity($limit, $remainder); - } - - /** - * Returns list of files modified within given timeframe. - * - * @todo Add option to configure the regex used to filter files allowed in this list. - * @todo Add option to exclude directories (such as cache directories). - * - * @param string $directory Search for files within this directory - * @param int $time_range One week - * @param int $limit Max files to return in results - * @param int $directory_limit Hard limit for number of files to search within a directory. - * @return array - */ - public function getRecentFilesModified($limit = 300, $directory = ABSPATH, $time_range = 604800, $directory_limit = 20000) { - $recently_modified = new wfRecentlyModifiedFiles($directory); - $recently_modified->run(); - return $recently_modified->mostRecentFiles($limit); - } - - /** - * Remove entries older than a month in the IP log. - */ - public function rotateIPLog() { - $table_wfBlockedIPLog = wfDB::networkTable('wfBlockedIPLog'); - $this->db->query(<<query($wpdb->prepare(<<getFullReport() + array( - 'limit' => $this->getLimit(), - )); - } - - /** - * @return wfActivityReportView - */ - public function toWidgetView() { - return new wfActivityReportView('reports/activity-report', $this->getWidgetReport() + array( - 'limit' => $this->getLimit(), - )); - } - - /** - * @return wfActivityReportView - */ - public function toEmailView() { - return new wfActivityReportView('reports/activity-report-email-inline', $this->getFullReport()); - } - - /** - * @param $email_addresses string|array - * @return bool - */ - public function sendReportViaEmail($email_addresses) { - $shortSiteURL = preg_replace('/^https?:\/\//i', '', site_url()); - - $content = $this->toEmailView()->__toString(); - - $success = true; - if (is_string($email_addresses)) { $email_addresses = explode(',', $email_addresses); } - foreach ($email_addresses as $email) { - $uniqueContent = str_replace('', wp_kses(sprintf(/* translators: URL to the WordPress admin panel. */ __('No longer an administrator for this site? Click here to stop receiving security alerts.', 'wordfence'), wfUtils::getSiteBaseURL() . '?_wfsf=removeAlertEmail&jwt=' . wfUtils::generateJWT(array('email' => $email))), array('a'=>array('href'=>array(), 'target'=>array()))), $content); - if (!wp_mail($email, sprintf(/* translators: 1. Site URL. 2. Localized date. */ __('Wordfence activity for %1$s on %2$s', 'wordfence'), date_i18n(get_option('date_format')), $shortSiteURL), $uniqueContent, 'Content-Type: text/html')) { - $success = false; - } - } - - return $success; - } - - /** - * @return string - * @throws wfViewNotFoundException - */ - public function render() { - return $this->toView() - ->render(); - } - - /** - * @return string - */ - public function __toString() { - return $this->toView() - ->__toString(); - } - - /** - * @return int - */ - public function getLimit() { - return $this->limit; - } - - /** - * @param int $limit - */ - public function setLimit($limit) { - $this->limit = $limit; - } -} - -class wfRecentFirewallActivity { - private $activity = array(); - - private $max_fetch = 2000; - private $time_range = 604800; - - public function __construct($max_fetch = null, $time_range = null) { - if ($max_fetch !== null) { - $this->max_fetch = $max_fetch; - } - - if ($time_range !== null) { - $this->time_range = $time_range; - } - } - - public function run() { - global $wpdb; - - $table_wfHits = wfDB::networkTable('wfHits'); - $results = $wpdb->get_results($wpdb->prepare(<< (UNIX_TIMESTAMP() - %d) -ORDER BY attackLogTime DESC -LIMIT %d -SQL - , $this->time_range, $this->max_fetch)); - if ($results) { - foreach ($results as &$row) { - $actionData = json_decode($row->actionData, true); - if (!is_array($actionData) || !isset($actionData['paramKey']) || !isset($actionData['paramValue'])) { - continue; - } - - if (isset($actionData['failedRules']) && $actionData['failedRules'] == 'blocked') { - $row->longDescription = __("Blocked because the IP is blocklisted", 'wordfence'); - } - else { - $row->longDescription = sprintf(__("Blocked for %s", 'wordfence'), $row->actionDescription); - } - - $paramKey = base64_decode($actionData['paramKey']); - $paramValue = base64_decode($actionData['paramValue']); - if (strlen($paramValue) > 100) { - $paramValue = substr($paramValue, 0, 100) . '...'; - } - - if (preg_match('/([a-z0-9_]+\.[a-z0-9_]+)(?:\[(.+?)\](.*))?/i', $paramKey, $matches)) { - switch ($matches[1]) { - case 'request.queryString': - $row->longDescription = sprintf(__('Blocked for %1$s in query string: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - case 'request.body': - $row->longDescription = sprintf(__('Blocked for %1$s in POST body: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - case 'request.cookie': - $row->longDescription = sprintf(__('Blocked for %1$s in cookie: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - case 'request.fileNames': - $row->longDescription = sprintf(__('Blocked for %1$s in file: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - } - } - } - } - - $this->activity = $results; - } - - public function mostRecentActivity($limit, &$remainder = null) { - if ($remainder !== null) { - $remainder = count($this->activity) - $limit; - } - return array_slice($this->activity, 0, $limit); - } -} - -class wfRecentlyModifiedFiles extends wfDirectoryIterator { - - /** - * @var int - */ - private $time_range = 604800; - - /** - * @var array - */ - private $files = array(); - private $excluded_directories; - - /** - * @param string $directory - * @param int $max_files_per_directory - * @param int $max_iterations - * @param int $time_range - */ - public function __construct($directory = ABSPATH, $max_files_per_directory = 20000, $max_iterations = 250000, $time_range = 604800) { - parent::__construct($directory, $max_files_per_directory, $max_iterations); - $this->time_range = $time_range; - $excluded_directories = explode("\n", wfUtils::cleanupOneEntryPerLine(wfConfig::get('email_summary_excluded_directories', ''))); - $this->excluded_directories = array(); - foreach ($excluded_directories as $index => $path) { - if (($dir = realpath(ABSPATH . $path)) !== false) { - $this->excluded_directories[$dir] = 1; - } - } - } - - /** - * @param $dir - * @return bool - */ - protected function scan($dir) { - if (!array_key_exists(realpath($dir), $this->excluded_directories)) { - return parent::scan($dir); - } - return true; - } - - - /** - * @param string $file - */ - public function file($file) { - $mtime = filemtime($file); - if (time() - $mtime < $this->time_range) { - $this->files[] = array($file, $mtime); - } - } - - /** - * @param int $limit - * @return array - */ - public function mostRecentFiles($limit = 300) { - usort($this->files, array( - $this, - '_sortMostRecentFiles', - )); - return array_slice($this->files, 0, $limit); - } - - /** - * Sort in descending order. - * - * @param $a - * @param $b - * @return int - */ - private function _sortMostRecentFiles($a, $b) { - if ($a[1] > $b[1]) { - return -1; - } - if ($a[1] < $b[1]) { - return 1; - } - return 0; - } - - /** - * @return mixed - */ - public function getFiles() { - return $this->files; - } -} - - -class wfActivityReportView extends wfView { - - /** - * @param $file - * @return string - */ - public function displayFile($file) { - $realPath = realpath($file); - if (stripos($realPath, ABSPATH) === 0) { - return substr($realPath, strlen(ABSPATH)); - } - return $realPath; - } - - /** - * @param null $unix_time - * @return string - */ - public function modTime($unix_time = null) { - if ($unix_time === null) { - $unix_time = time(); - } - return wfUtils::formatLocalTime('F j, Y g:ia', $unix_time); - } - - public function attackTime($unix_time = null) { - if ($unix_time === null) { - $unix_time = time(); - } - return wfUtils::formatLocalTime('F j, Y', $unix_time) . "
" . wfUtils::formatLocalTime('g:ia', $unix_time); - } - - public function displayIP($binaryIP) { - $readableIP = wfUtils::inet_ntop($binaryIP); - $country = wfUtils::countryCode2Name(wfUtils::IP2Country($readableIP)); - return "{$readableIP} (" . ($country ? $country : __('Unknown', 'wordfence')) . ")"; - } -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfAdminNoticeQueue.php b/wp/wp-content/plugins/wordfence/lib/wfAdminNoticeQueue.php deleted file mode 100644 index 1f6761f3..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfAdminNoticeQueue.php +++ /dev/null @@ -1,195 +0,0 @@ - $notice) { - if ($notice['category'] === 'php8') { - unset($notices[$id]); - $altered = true; - } - } - if ($altered) - self::_setNotices($notices); - return $notices; - } - - protected static function _setNotices($notices) { - wfConfig::set_ser('adminNoticeQueue', $notices); - } - - /** - * Adds an admin notice to the display queue. - * - * @param string $severity - * @param string $messageHTML - * @param bool|string $category If not false, notices with the same category will be removed prior to adding this one. - * @param bool|array $users If not false, an array of user IDs the notice should show for. - */ - public static function addAdminNotice($severity, $messageHTML, $category = false, $users = false) { - $notices = self::_notices(); - foreach ($notices as $id => $n) { - $usersMatches = false; - if (isset($n['users'])) { - $usersMatches = wfUtils::sets_equal($n['users'], $users); - } - else if ($users === false) { - $usersMatches = true; - } - - $categoryMatches = false; - if ($category !== false && isset($n['category']) && $n['category'] == $category) { - $categoryMatches = true; - } - - if ($usersMatches && $categoryMatches) { - unset($notices[$id]); - } - } - - $id = wfUtils::uuid(); - $notices[$id] = array( - 'severity' => $severity, - 'messageHTML' => $messageHTML, - ); - - if ($category !== false) { - $notices[$id]['category'] = $category; - } - - if ($users !== false) { - $notices[$id]['users'] = $users; - } - - self::_setNotices($notices); - } - - /** - * Removes an admin notice using one of three possible search methods: - * - * 1. If $id matches. $category and $users are ignored - * 2. If $category matches. $users must be false for this. - * 3. If $category matches and the notice's user IDs matches $users. - * - * @param bool|int $id - * @param bool|string $category - * @param bool|int[] $users - */ - public static function removeAdminNotice($id = false, $category = false, $users = false) { - if ($id === false && $category === false && $users === false) { - return; - } - else if ($id !== false) { - $category = false; - $users = false; - } - - $notices = self::_notices(); - $found = false; - foreach ($notices as $nid => $n) { - if ($id == $nid) { //ID match - unset($notices[$nid]); - $found=true; - break; - } - else if ($id !== false) { - continue; - } - - if ($category !== false && isset($n['category']) && $category == $n['category']) { - if ($users !== false) { - if (isset($n['users']) && wfUtils::sets_equal($users, $n['users'])) { - unset($notices[$nid]); - $found=true; - } - } - else { - unset($notices[$nid]); - $found=true; - } - } - } - if($found) - self::_setNotices($notices); - } - - public static function hasNotice($category = false, $users = false) { - $notices = self::_notices(); - foreach ($notices as $nid => $n) { - $categoryMatches = false; - if (($category === false && !isset($n['category'])) || ($category !== false && isset($n['category']) && $category == $n['category'])) { - $categoryMatches = true; - } - - $usersMatches = false; - if (($users === false && !isset($n['users'])) || ($users !== false && isset($n['users']) && wfUtils::sets_equal($users, $n['users']))) { - $usersMatches = true; - } - - if ($categoryMatches && $usersMatches) { - return true; - } - } - return false; - } - - public static function enqueueAdminNotices() { - $user = wp_get_current_user(); - if ($user->ID == 0) { - return false; - } - - $networkAdmin = is_multisite() && is_network_admin(); - $notices = self::_notices(); - $added = false; - foreach ($notices as $nid => $n) { - if (isset($n['users']) && array_search($user->ID, $n['users']) === false) { - continue; - } - - $notice = new wfAdminNotice($nid, $n['severity'], $n['messageHTML']); - if ($networkAdmin) { - add_action('network_admin_notices', array($notice, 'displayNotice')); - } - else { - add_action('admin_notices', array($notice, 'displayNotice')); - } - - $added = true; - } - - return $added; - } -} - -class wfAdminNotice { - const SEVERITY_CRITICAL = 'critical'; - const SEVERITY_WARNING = 'warning'; - const SEVERITY_INFO = 'info'; - - private $_id; - private $_severity; - private $_messageHTML; - - public function __construct($id, $severity, $messageHTML) { - $this->_id = $id; - $this->_severity = $severity; - $this->_messageHTML = $messageHTML; - } - - public function displayNotice() { - $severityClass = 'notice-info'; - if ($this->_severity == self::SEVERITY_CRITICAL) { - $severityClass = 'notice-error'; - } - else if ($this->_severity == self::SEVERITY_WARNING) { - $severityClass = 'notice-warning'; - } - - echo ''; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfAlerts.php b/wp/wp-content/plugins/wordfence/lib/wfAlerts.php deleted file mode 100644 index 64426bdf..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfAlerts.php +++ /dev/null @@ -1,262 +0,0 @@ -IP = $IP; - $this->reason = $reason; - $this->secsToGo = $secsToGo; - } - - public function send() { - if (wfConfig::get('alertOn_block')) { - $message = sprintf(/* translators: IP address. */ __('Wordfence has blocked IP address %s.', 'wordfence'), $this->IP) . "\n"; - $message .= sprintf(/* translators: Description of firewall action. */ __('The reason is: "%s".', 'wordfence'), $this->reason); - if ($this->secsToGo > 0) { - $message .= "\n" . sprintf(/* translators: Time until. */ __('The duration of the block is %s.', 'wordfence'), wfUtils::makeDuration($this->secsToGo, true)); - } - wordfence::alert(sprintf(/* translators: IP address. */__('Blocking IP %s', 'wordfence'), $this->IP), $message, $this->IP); - } - } - -} - -class wfAutoUpdatedAlert extends wfBaseAlert { - - private $version; - - /** - * @param $version - */ - public function __construct($version) { - $this->version = $version; - } - - public function send() { - if (wfConfig::get('alertOn_update') == '1' && $this->version) { - wordfence::alert(sprintf(/* translators: Software version. */ __("Wordfence Upgraded to version %s", 'wordfence'), $this->version), sprintf(/* translators: Software version. */ __("Your Wordfence installation has been upgraded to version %s", 'wordfence'), $this->version), false); - } - } - -} - -class wfWafDeactivatedAlert extends wfBaseAlert { - - private $username; - private $IP; - - /** - * @param $username - * @param $IP - */ - public function __construct($username, $IP) { - $this->username = $username; - $this->IP = $IP; - } - - public function send() { - if (wfConfig::get('alertOn_wafDeactivated')) { - wordfence::alert(__('Wordfence WAF Deactivated', 'wordfence'), sprintf(/* translators: WP username. */__('A user with username "%s" deactivated the Wordfence Web Application Firewall on your WordPress site.', 'wordfence'), $this->username), $this->IP); - } - } - -} - -class wfWordfenceDeactivatedAlert extends wfBaseAlert { - private $username; - private $IP; - - /** - * @param $username - * @param $IP - */ - public function __construct($username, $IP) { - $this->username = $username; - $this->IP = $IP; - } - - public function send() { - if (wfConfig::get('alertOn_wordfenceDeactivated')) { - wordfence::alert(__("Wordfence Deactivated", 'wordfence'), sprintf(/* translators: WP username. */ __("A user with username \"%s\" deactivated Wordfence on your WordPress site.", 'wordfence'), $this->username), $this->IP); - } - } - -} - -class wfLostPasswdFormAlert extends wfBaseAlert { - - private $user; - private $IP; - - /** - * @param $user - * @param $IP - */ - public function __construct($user, $IP) { - $this->user = $user; - $this->IP = $IP; - } - - public function send() { - if (wfConfig::get('alertOn_lostPasswdForm')) { - wordfence::alert(__("Password recovery attempted", 'wordfence'), sprintf(/* translators: Email address. */__("Someone tried to recover the password for user with email address: %s", 'wordfence'), wp_kses($this->user->user_email, array())), $this->IP); - } - } - -} - -class wfLoginLockoutAlert extends wfBaseAlert { - - private $IP; - private $reason; - - /** - * @param $IP - * @param $reason - */ - public function __construct($IP, $reason) { - $this->IP = $IP; - $this->reason = $reason; - } - - public function send() { - if (wfConfig::get('alertOn_loginLockout')) { - $message = sprintf( - /* translators: 1. IP address. 2. Description of firewall action. */ - __('A user with IP address %1$s has been locked out from signing in or using the password recovery form for the following reason: %2$s.', 'wordfence'), $this->IP, $this->reason); - if (wfBlock::lockoutDuration() > 0) { - $message .= "\n" . sprintf(/* translators: Time until. */ __('The duration of the lockout is %s.', 'wordfence'), wfUtils::makeDuration(wfBlock::lockoutDuration(), true)); - } - wordfence::alert(__('User locked out from signing in', 'wordfence'), $message, $this->IP); - } - } -} - -class wfAdminLoginAlert extends wfBaseAlert { - - private $cookieName; - private $username; - private $IP; - private $cookieValue; - - /** - * @param $cookieName - * @param $cookieValue - * @param $username - * @param $IP - */ - public function __construct($cookieName, $cookieValue, $username, $IP) { - $this->cookieName = $cookieName; - $this->cookieValue = $cookieValue; - $this->username = $username; - $this->IP = $IP; - } - - public function send() { - if (wfConfig::get('alertOn_adminLogin')) { - $shouldAlert = true; - if (wfConfig::get('alertOn_firstAdminLoginOnly') && isset($_COOKIE[$this->cookieName])) { - $shouldAlert = !hash_equals($this->cookieValue, $_COOKIE[$this->cookieName]); - } - - if ($shouldAlert) { - wordfence::alert(__("Admin Login", 'wordfence'), sprintf(/* translators: WP username. */ __("A user with username \"%s\" who has administrator access signed in to your WordPress site.", 'wordfence'), $this->username), $this->IP); - } - } - } -} - -class wfNonAdminLoginAlert extends wfBaseAlert { - - private $cookieName; - private $username; - private $IP; - private $cookieValue; - - /** - * @param $cookieName - * @param $cookieValue - * @param $username - * @param $IP - */ - public function __construct($cookieName, $cookieValue, $username, $IP) { - $this->cookieName = $cookieName; - $this->cookieValue = $cookieValue; - $this->username = $username; - $this->IP = $IP; - } - - public function send() { - if (wfConfig::get('alertOn_nonAdminLogin')) { - $shouldAlert = true; - if (wfConfig::get('alertOn_firstNonAdminLoginOnly') && isset($_COOKIE[$this->cookieName])) { - $shouldAlert = !hash_equals($this->cookieValue, $_COOKIE[$this->cookieName]); - } - - if ($shouldAlert) { - wordfence::alert(__("User login", 'wordfence'), sprintf(/* translators: WP username. */ __("A non-admin user with username \"%s\" signed in to your WordPress site.", 'wordfence'), $this->username), $this->IP); - } - } - } -} - -class wfBreachLoginAlert extends wfBaseAlert { - - private $username; - private $lostPasswordUrl; - private $supportUrl; - private $IP; - - /** - * @param $username - * @param $lostPasswordUrl - * @param $supportUrl - * @param $IP - */ - public function __construct($username, $lostPasswordUrl, $supportUrl, $IP) { - $this->username = $username; - $this->lostPasswordUrl = $lostPasswordUrl; - $this->supportUrl = $supportUrl; - $this->IP = $IP; - } - - public function send() { - if (wfConfig::get('alertOn_breachLogin')) { - wordfence::alert(__('User login blocked for insecure password', 'wordfence'), sprintf( - /* translators: 1. WP username. 2. Reset password URL. 3. Support URL. */ - __('A user with username "%1$s" tried to sign in to your WordPress site. Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password (%2$s) to reactivate this account. Learn More: %3$s', 'wordfence'), $this->username, $this->lostPasswordUrl, $this->supportUrl), $this->IP); - } - } -} - -class wfIncreasedAttackRateAlert extends wfBaseAlert { - - private $message; - - /** - * @param $message - */ - public function __construct($message) { - $this->message = $message; - } - - public function send() { - wordfence::alert(__('Increased Attack Rate', 'wordfence'), $this->message, false); - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfArray.php b/wp/wp-content/plugins/wordfence/lib/wfArray.php deleted file mode 100644 index 8f09fbc4..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfArray.php +++ /dev/null @@ -1,46 +0,0 @@ -keys = $keys; - } - public function push($val){ //associative array with keys that match those given to constructor - foreach($this->keys as $key){ - $this->data .= pack('N', wfUtils::strlen($val[$key])) . $val[$key]; - } - $this->size++; - } - public function shift(){ //If you alternately call push and shift you must periodically call collectGarbage() or ->data will keep growing - $arr = array(); - if(wfUtils::strlen($this->data) < 1){ return null; } - if($this->shiftPtr == wfUtils::strlen($this->data)){ return null; } - foreach($this->keys as $key){ - $len = unpack('N', wfUtils::substr($this->data, $this->shiftPtr, 4)); - $len = $len[1]; - $arr[$key] = wfUtils::substr($this->data, $this->shiftPtr + 4, $len); - $this->shiftPtr += 4 + $len; - } - if($this->shiftPtr == wfUtils::strlen($this->data)){ //garbage collection - $this->data = ""; //we don't shorten with substr() because the assignment doubles peak mem - $this->shiftPtr = 0; - } - $this->size--; - return $arr; - } - public function collectGarbage(){ //only call collectGarbage if you're alternating between pushes and shifts and never emptying the array. - //If you don't collect garbage then the data that is shifted is never freed - $this->data = wfUtils::substr($this->data, $this->shiftPtr); //at this point memory usage doubles because of the = assignment (string copy is made), so try not to call collect garbage unless you have to. - $this->shiftPtr = 0; - } - public function zero(){ //Rather call this instead of collect garbage because it's way more mem efficient. - $this->data = ""; - $this->shiftPtr = 0; - $this->size = 0; - } - public function size(){ - return $this->size; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfBrowscap.php b/wp/wp-content/plugins/wordfence/lib/wfBrowscap.php deleted file mode 100644 index 79f5b3da..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfBrowscap.php +++ /dev/null @@ -1,126 +0,0 @@ -_cacheLoaded) { - if (!$this->_loadCache(dirname(__FILE__) . '/wfBrowscapCache.php')) { - throw new Exception('Cannot load this cache version - the cache format is not compatible.'); - } - } - - $browser = array(); - foreach ($this->_patterns as $pattern => $pattern_data) { - if (preg_match($pattern . 'i', $user_agent, $matches)) { - if (1 == count($matches)) { - $key = $pattern_data; - - $simple_match = true; - } else { - $pattern_data = unserialize($pattern_data); - - array_shift($matches); - - $match_string = self::COMPRESSION_PATTERN_START - . implode(self::COMPRESSION_PATTERN_DELIMITER, $matches); - - if (!isset($pattern_data[$match_string])) { - continue; - } - - $key = $pattern_data[$match_string]; - - $simple_match = false; - } - - $browser = array( - $user_agent, - trim(strtolower($pattern), self::REGEX_DELIMITER), - $this->_pregUnQuote($pattern, $simple_match ? false : $matches) - ); - - $browser = $value = $browser + unserialize($this->_browsers[$key]); - - while (array_key_exists(3, $value)) { - $value = unserialize($this->_browsers[$value[3]]); - $browser += $value; - } - - if (!empty($browser[3])) { - $browser[3] = $this->_userAgents[$browser[3]]; - } - - break; - } - } - - $array = array(); - foreach ($browser as $key => $value) { - if ($value === 'true') { - $value = true; - } elseif ($value === 'false') { - $value = false; - } - $array[$this->_properties[$key]] = $value; - } - - return $array; - } - protected function _loadCache($cache_file){ - $cache_version = null; - $browsers = array(); - $userAgents = array(); - $patterns = array(); - $properties = array(); - - $this->_cacheLoaded = false; - - require $cache_file; - - $this->_browsers = $browsers; - $this->_userAgents = $userAgents; - $this->_patterns = $patterns; - $this->_properties = $properties; - - $this->_cacheLoaded = true; - - return true; - } - protected function _pregUnQuote($pattern, $matches){ - $search = array( - '\\' . self::REGEX_DELIMITER, '\\.', '\\\\', '\\+', '\\[', '\\^', '\\]', '\\$', '\\(', '\\)', '\\{', '\\}', - '\\=', '\\!', '\\<', '\\>', '\\|', '\\:', '\\-', '.*', '.', '\\?' - ); - $replace = array( - self::REGEX_DELIMITER, '\\?', '\\', '+', '[', '^', ']', '$', '(', ')', '{', '}', '=', '!', '<', '>', '|', - ':', '-', '*', '?', '.' - ); - - $result = substr(str_replace($search, $replace, $pattern), 2, -2); - - if ($matches) { - foreach ($matches as $one_match) { - $num_pos = strpos($result, '(\d)'); - $result = substr_replace($result, $one_match, $num_pos, 4); - } - } - - return $result; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfBrowscapCache.php b/wp/wp-content/plugins/wordfence/lib/wfBrowscapCache.php deleted file mode 100644 index 0004899a..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfBrowscapCache.php +++ /dev/null @@ -1,4017 +0,0 @@ -'IEMobile 11.0', - 3118=>'Seraphic Sraf 3.9', - 3112=>'Seraphic Sraf 3.0', - 3110=>'Seraphic Sraf 3.5', - 3117=>'Edge 41.0 for iOS', - 3114=>'Edge 42.0 for iOS', - 3064=>'Edge Generic for iOS', - 3096=>'Android Browser 5.0', - 3175=>'Edge Generic', - 3281=>'Edge 16.0', - 3280=>'Edge 14.0', - 3275=>'Edge 13.0', - 3274=>'Edge 15.0', - 3283=>'Edge 17.0', - 3247=>'Coast 4.30', - 3226=>'Coast 4.01', - 3248=>'Coast 4.51', - 3223=>'Coast 3.01', - 3231=>'Coast 3.21', - 3229=>'Coast 3.02', - 3242=>'Coast 5.03', - 3269=>'Coast 4.03', - 3235=>'Coast 4.02', - 3252=>'Coast 5.02', - 3251=>'Coast 5.01', - 3237=>'Coast 4.21', - 3254=>'Coast 4.31', - 3270=>'Coast 5.04', - 3077=>'Android Browser 4.0', - 3285=>'Coast 4.4', - 3279=>'Coast 4.5', - 3277=>'Coast 4.1', - 3282=>'Coast 4.0', - 3276=>'Coast 3.0', - 3278=>'Coast 3.1', - 3293=>'Coast', - 3121=>'Edge Mobile 15.0', - 3122=>'Edge Mobile 17.0', - 3124=>'Edge Mobile 13.0', - 3127=>'Edge Mobile 14.0', - 3126=>'Edge Mobile 16.0', - 3095=>'Android Browser 5.1', - 3092=>'Edge Mobile Generic', - 3104=>'Mobile Safari 12.0', - 3108=>'Mobile Safari 10.0', - 3106=>'Mobile Safari 11.0', - 3102=>'IE 11.0 for Desktop', - 3115=>'Mobile Safari 7.0', - 3113=>'Mobile Safari 8.0', - 3116=>'Mobile Safari 6.0', - 3111=>'Mobile Safari 9.0', - 3078=>'Chrome 61.0 for iOS', - 3088=>'Chrome 65.0 for iOS', - 3085=>'Chrome 58.0 for iOS', - 3080=>'Chrome 60.0 for iOS', - 3098=>'Chrome 63.0 for iOS', - 3089=>'Chrome 62.0 for iOS', - 3101=>'Chrome 64.0 for iOS', - 3079=>'Chrome 57.0 for iOS', - 3076=>'Chrome 56.0 for iOS', - 3081=>'Chrome 59.0 for iOS', - 3094=>'Chrome 48.0 for iOS', - 3091=>'Chrome 51.0 for iOS', - 3090=>'Chrome 52.0 for iOS', - 3074=>'Chrome 49.0 for iOS', - 3097=>'Chrome 54.0 for iOS', - 3082=>'Chrome 67.0 for iOS', - 3072=>'Chrome 55.0 for iOS', - 3083=>'Chrome 66.0 for iOS', - 3070=>'Chrome 69.0 for iOS', - 3086=>'Chrome 68.0 for iOS', - 3069=>'Chrome 70.0 for iOS', - 3100=>'Chrome 50.0 for iOS', - 3071=>'Chrome 71.0 for iOS', - 3084=>'Chrome 53.0 for iOS', - 3123=>'Edge Mobile 12.0', - 3027=>'Chrome Generic for iOS', - 3033=>'Mobile Safari Generic', - 3288=>'IE 8.0', - 3036=>'Edge 42.0 for Android', - 3031=>'Edge 41.0 for Android', - 3051=>'Android WebView 62.0', - 3063=>'Android WebView 45.0', - 3050=>'Android WebView 70.0', - 3060=>'Android WebView 69.0', - 3054=>'Android WebView 65.0', - 3053=>'Android WebView 64.0', - 3055=>'Android WebView 61.0', - 3067=>'Android WebView 43.0', - 3038=>'Android WebView 66.0', - 3066=>'Android WebView 44.0', - 3037=>'Android WebView 67.0', - 3056=>'Android WebView 68.0', - 3061=>'Android WebView 46.0', - 3049=>'Android WebView 71.0', - 3039=>'Android WebView 53.0', - 3052=>'Android WebView 63.0', - 3062=>'Android WebView 54.0', - 3040=>'Android WebView 55.0', - 3057=>'Android WebView 58.0', - 3059=>'Android WebView 60.0', - 3041=>'Android WebView 56.0', - 3042=>'Android WebView 57.0', - 3043=>'Android WebView 52.0', - 3047=>'Android WebView 49.0', - 3046=>'Android WebView 48.0', - 3045=>'Android WebView 47.0', - 3058=>'Android WebView 59.0', - 3048=>'Android WebView 50.0', - 3044=>'Android WebView 51.0', - 3219=>'Chrome 61.0', - 3213=>'Chrome 70.0', - 3205=>'Chrome 60.0', - 3206=>'Chrome 65.0', - 3203=>'Chrome 63.0', - 3197=>'Chrome 67.0', - 3222=>'Chrome 64.0', - 3214=>'Chrome 68.0', - 3195=>'Chrome 62.0', - 3196=>'Chrome 66.0', - 3216=>'Chrome 69.0', - 3201=>'Chrome 52.0', - 3209=>'Chrome 55.0', - 3208=>'Chrome 57.0', - 3198=>'Chrome 71.0', - 3199=>'Chrome 54.0', - 3215=>'Chrome 53.0', - 3211=>'Chrome 50.0', - 3212=>'Chrome 51.0', - 3207=>'Chrome 58.0', - 3210=>'Chrome 56.0', - 3204=>'Chrome 59.0', - 3130=>'Chrome Generic', - 2918=>'Edge Generic for Android', - 3139=>'Chromium 61.0', - 3142=>'Chromium 62.0', - 3140=>'Chromium 63.0', - 3136=>'Chromium 64.0', - 3143=>'Chromium 60.0', - 3148=>'Chromium 59.0', - 3146=>'Chromium 56.0', - 3145=>'Chromium 57.0', - 3151=>'Chromium 58.0', - 3135=>'Chromium 65.0', - 3134=>'Chromium 66.0', - 3153=>'Chromium 45.0', - 3150=>'Chromium 47.0', - 3133=>'Chromium 71.0', - 3147=>'Chromium 46.0', - 3138=>'Chromium 70.0', - 3141=>'Chromium 68.0', - 3132=>'Chromium 69.0', - 3152=>'Chromium 55.0', - 3137=>'Chromium 67.0', - 3157=>'Chromium 52.0', - 3158=>'Chromium 51.0', - 3154=>'Chromium 50.0', - 3149=>'Chromium 48.0', - 3156=>'Chromium 53.0', - 3155=>'Chromium 49.0', - 3159=>'Chromium 54.0', - 3284=>'Edge 12.0', - 3021=>'Mobile Safari UIWebView', - 3008=>'Chrome 49.0 for Android', - 2994=>'Chrome 52.0 for Android', - 2995=>'Chrome 51.0 for Android', - 2993=>'Chrome 53.0 for Android', - 2996=>'Chrome 54.0 for Android', - 3011=>'Chrome 55.0 for Android', - 3002=>'Chrome 50.0 for Android', - 3009=>'Chrome 48.0 for Android', - 3004=>'Chrome 44.0 for Android', - 3005=>'Chrome 43.0 for Android', - 3003=>'Chrome 45.0 for Android', - 3006=>'Chrome 46.0 for Android', - 3007=>'Chrome 47.0 for Android', - 3015=>'Chrome 56.0 for Android', - 3020=>'Chrome 57.0 for Android', - 2992=>'Chrome 66.0 for Android', - 3016=>'Chrome 65.0 for Android', - 3013=>'Chrome 67.0 for Android', - 3010=>'Chrome 68.0 for Android', - 2998=>'Chrome 69.0 for Android', - 3014=>'Chrome 64.0 for Android', - 3012=>'Chrome 63.0 for Android', - 3023=>'Chrome 59.0 for Android', - 3022=>'Chrome 58.0 for Android', - 3019=>'Chrome 60.0 for Android', - 3017=>'Chrome 61.0 for Android', - 3018=>'Chrome 62.0 for Android', - 3000=>'Chrome 70.0 for Android', - 2997=>'Chrome 71.0 for Android', - 3266=>'Opera 52.0', - 3265=>'Opera 53.0', - 3250=>'Opera 43.0', - 3262=>'Opera 51.0', - 3267=>'Opera 33.0', - 3261=>'Opera 54.0', - 3258=>'Opera 41.0', - 3246=>'Opera 28.0', - 3253=>'Opera 27.0', - 3228=>'Opera 55.0', - 3243=>'Opera 42.0', - 3234=>'Opera 34.0', - 3273=>'Opera 50.0', - 3255=>'Opera 44.0', - 3236=>'Opera 46.0', - 3225=>'Opera 37.0', - 3241=>'Opera 45.0', - 3240=>'Opera 47.0', - 3245=>'Opera 48.0', - 3272=>'Opera 49.0', - 3233=>'Opera 35.0', - 3230=>'Opera 36.0', - 3227=>'Opera 38.0', - 3224=>'Opera 39.0', - 3268=>'Opera 32.0', - 3239=>'Opera 29.0', - 3264=>'Opera 31.0', - 3271=>'Opera 40.0', - 3238=>'Opera 30.0', - 3290=>'IE 7.0', - 2906=>'Chrome Generic for Android', - 3125=>'YOLO Browser 1.0', - 3001=>'Android WebView Generic', - 3087=>'Android Browser 4.1', - 3075=>'Android Browser 4.2', - 2913=>'Safari Generic for Darwin', - 3221=>'Safari 10.2', - 3202=>'Safari 10.1', - 3220=>'Safari 11.0', - 3218=>'Safari 11.1', - 3200=>'Safari 10.0', - 3217=>'Safari 12.0', - 3099=>'Android Browser 4.4', - 3073=>'Android Browser 4.3', - 3260=>'Safari 7.0', - 3131=>'Safari Generic', - 3244=>'Safari 8.0', - 3259=>'Safari 6.2', - 3263=>'Safari 6.1', - 3249=>'Safari 9.0', - 3232=>'Safari 6.0', - 3256=>'Safari 9.1', - 3257=>'Safari 7.1', - 3128=>'Headless Chrome', - 3093=>'IE 10.0 for Desktop', - 2991=>'Android Browser Generic', - 3109=>'IE 11.0 for Tablet', - 3186=>'Firefox 40.0', - 3172=>'Firefox 34.0', - 3177=>'Firefox 30.0', - 3171=>'Firefox 37.0', - 3190=>'Firefox 39.0', - 3189=>'Firefox 32.0', - 3164=>'Firefox 33.0', - 3178=>'Firefox 57.0', - 3167=>'Firefox 38.0', - 3163=>'Firefox 54.0', - 3183=>'Firefox 58.0', - 3185=>'Firefox 36.0', - 3161=>'Firefox 31.0', - 3168=>'Firefox 55.0', - 3191=>'Firefox 35.0', - 3174=>'Firefox 50.0', - 3180=>'Firefox 61.0', - 3193=>'Firefox 62.0', - 3173=>'Firefox 60.0', - 3179=>'Firefox 49.0', - 3194=>'Firefox 59.0', - 3181=>'Firefox 56.0', - 3187=>'Firefox 52.0', - 3184=>'Firefox 53.0', - 3162=>'Firefox 63.0', - 3166=>'Firefox 51.0', - 3165=>'Firefox 45.0', - 3170=>'Firefox 44.0', - 3192=>'Firefox 46.0', - 3169=>'Firefox 43.0', - 3160=>'Firefox 41.0', - 3176=>'Firefox 42.0', - 3188=>'Firefox 48.0', - 3182=>'Firefox 47.0', - 2904=>'Firefox Generic for Android', - 3289=>'IE 9.0', - 3065=>'Safari Generic Older', - 3129=>'Firefox Generic', - 3287=>'IE 7.0b', - 2951=>'Firefox 63.0 for Android', - 2941=>'Firefox 22.0 for Android', - 2940=>'Firefox 21.0 for Android', - 2930=>'Firefox 62.0 for Android', - 2957=>'Firefox 17.0 for Android', - 2939=>'Firefox 24.0 for Android', - 2964=>'Firefox 32.0 for Android', - 2955=>'Firefox 18.0 for Android', - 2959=>'Firefox 38.0 for Android', - 2942=>'Firefox 23.0 for Android', - 2954=>'Firefox 36.0 for Android', - 2956=>'Firefox 37.0 for Android', - 2968=>'Firefox 19.0 for Android', - 2932=>'Firefox 59.0 for Android', - 2935=>'Firefox 50.1 for Android', - 2937=>'Firefox 25.0 for Android', - 2936=>'Firefox 50.0 for Android', - 2925=>'Firefox 51.0 for Android', - 2921=>'Firefox 53.0 for Android', - 2926=>'Firefox 52.0 for Android', - 2946=>'Firefox 49.0 for Android', - 2948=>'Firefox 30.0 for Android', - 2950=>'Firefox 29.0 for Android', - 2947=>'Firefox 31.0 for Android', - 2945=>'Firefox 48.0 for Android', - 2922=>'Firefox 54.0 for Android', - 2958=>'Firefox 39.0 for Android', - 2934=>'Firefox 58.0 for Android', - 2952=>'Firefox 60.0 for Android', - 2931=>'Firefox 61.0 for Android', - 2933=>'Firefox 57.0 for Android', - 2927=>'Firefox 55.0 for Android', - 2928=>'Firefox 56.0 for Android', - 2938=>'Firefox 20.0 for Android', - 2929=>'Firefox 12.0 for Android', - 2944=>'Firefox 27.0 for Android', - 2969=>'Firefox 16.0 for Android', - 2967=>'Firefox 34.0 for Android', - 2973=>'Firefox 42.0 for Android', - 2976=>'Firefox 13.0 for Android', - 2962=>'Firefox 33.0 for Android', - 2943=>'Firefox 26.0 for Android', - 2923=>'Firefox 11.0 for Android', - 2972=>'Firefox 41.0 for Android', - 2965=>'Firefox 33.1 for Android', - 2978=>'Firefox 15.0 for Android', - 2963=>'Firefox 46.0 for Android', - 2974=>'Firefox 14.0 for Android', - 2977=>'Firefox 45.0 for Android', - 2975=>'Firefox 44.0 for Android', - 2919=>'Firefox 47.0 for Android', - 2971=>'Firefox 43.0 for Android', - 2970=>'Firefox 40.0 for Android', - 2924=>'Firefox 10.0 for Android', - 2961=>'Firefox 35.0 for Android', - 2949=>'Firefox 28.0 for Android', - 2988=>'Firefox 2.0 for Android', - 2982=>'Firefox 8.0 for Android', - 2990=>'Firefox 9.0 for Android', - 2983=>'Firefox 1.1 for Android', - 2984=>'Firefox 1.0 for Android', - 2987=>'Firefox 6.0 for Android', - 2999=>'Firefox 7.0 for Android', - 2981=>'Firefox 5.0 for Android', - 2986=>'Firefox 2.3 for Android', - 2985=>'Firefox 4.0 for Android', - 2989=>'Firefox 2.1 for Android', - 3105=>'IE 6.0 for Desktop', - 3119=>'DefaultProperties', - 3029=>'Safari 8.0 for Darwin', - 3030=>'Safari 9.1 for Darwin', - 3028=>'Safari 10.0 for Darwin', - 3026=>'Safari 11.0 for Darwin', - 3034=>'Safari 9.0 for Darwin', - 3032=>'Safari 6.0 for Darwin', - 3035=>'Safari 7.0 for Darwin' -); -$patterns=array( - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/(\d)\.0.*rv\:11.*IEMobile.11\.0\) like Android .*; compatible\) like iPhone OS .* Mac OS X WebKit/537\.36 \(.*khtml.*like.*gecko.*\) Chrome.*Safari.*$@'=>'a:2:{s:2:"@7";i:0;s:2:"@8";i:1;}', - '@^Mozilla/5\.0 \(Linux; Linux mips\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chromium/.* Safari/.*\) SRAF/3\.(\d).* \(\+TRICKMODE; NEXUS; Nexus_AN01.*$@'=>'a:3:{s:2:"@9";i:2;s:2:"@0";i:3;s:2:"@5";i:4;}', - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/.* EdgiOS/4(\d)\..* Mobile/.* Safari/.*$@'=>'a:2:{s:2:"@1";i:5;s:2:"@2";i:6;}', - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/.* EdgiOS/.* Mobile/.* Safari/.*$@'=>7, - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_SensationXL_Beats_X315e; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>8, - '@^Mozilla/5\.0 \(.*Windows.* Anonymisiert durch AlMiSoft Browser\-.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/.*$@'=>9, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*Win64. x64.* Xbox; Xbox One\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@6";i:10;s:2:"@4";i:11;s:2:"@3";i:12;s:2:"@5";i:14;s:2:"@7";i:15;}', - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/.* EdgiOS/4(\d)\..* Mobile/.* Safari/.*$@'=>'a:2:{s:2:"@2";i:13;s:2:"@1";i:16;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*Win64. x64.* Xbox; Xbox One\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/.*$@'=>17, - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/.* EdgiOS/.* Mobile/.* Safari/.*$@'=>18, - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_IncredibleS_S710e; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>19, - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d)(\d).* Mobile/.* Safari/.*$@'=>'a:14:{s:6:"@4|3|0";i:20;s:6:"@4|0|1";i:21;s:6:"@4|5|1";i:22;s:6:"@3|0|1";i:23;s:6:"@3|2|1";i:24;s:6:"@3|0|2";i:25;s:6:"@5|0|3";i:26;s:6:"@4|0|3";i:27;s:6:"@4|0|2";i:28;s:6:"@5|0|2";i:29;s:6:"@5|0|1";i:30;s:6:"@4|2|1";i:31;s:6:"@4|3|1";i:32;s:6:"@5|0|4";i:33;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_Flyer_P510e Build/.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>34, - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d).* Mobile/.* Safari/.*$@'=>'a:6:{s:4:"@4|4";i:35;s:4:"@4|5";i:36;s:4:"@4|1";i:37;s:4:"@4|0";i:38;s:4:"@3|0";i:39;s:4:"@3|1";i:40;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_Sensation_Z710e; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>41, - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d)(\d).* Mobile/.* Safari/.*$@'=>'a:14:{s:6:"@5|0|3";i:42;s:6:"@4|0|3";i:43;s:6:"@5|0|4";i:44;s:6:"@3|0|1";i:45;s:6:"@4|5|1";i:46;s:6:"@4|3|0";i:47;s:6:"@5|0|1";i:48;s:6:"@4|3|1";i:49;s:6:"@5|0|2";i:50;s:6:"@4|2|1";i:51;s:6:"@4|0|1";i:52;s:6:"@3|2|1";i:53;s:6:"@4|0|2";i:54;s:6:"@3|0|2";i:55;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_DesireHD_A9191; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>56, - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d).* Mobile/.* Safari/.*$@'=>'a:6:{s:4:"@4|5";i:57;s:4:"@4|1";i:58;s:4:"@4|0";i:59;s:4:"@3|0";i:60;s:4:"@3|1";i:61;s:4:"@4|4";i:62;}', - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/.* Mobile/.* Safari/.*$@'=>63, - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*Xbox; Xbox One\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@5";i:64;s:2:"@7";i:65;s:2:"@3";i:66;s:2:"@4";i:67;s:2:"@6";i:68;}', - '@^Mozilla/5\.(\d) \(Macintosh; .*Mac OS X.*; HTC_EVO3D_X515m; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.(\d).*Safari.*$@'=>'a:3:{s:4:"@2|2";i:69;s:4:"@0|0";i:70;s:4:"@0|1";i:72;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_Flyer_P510e; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>71, - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d)(\d).* Mobile/.* Safari/.*$@'=>'a:14:{s:6:"@4|3|1";i:73;s:6:"@3|2|1";i:74;s:6:"@4|2|1";i:75;s:6:"@5|0|4";i:77;s:6:"@4|5|1";i:78;s:6:"@4|0|2";i:79;s:6:"@3|0|1";i:80;s:6:"@5|0|3";i:81;s:6:"@4|0|1";i:82;s:6:"@3|0|2";i:83;s:6:"@5|0|2";i:84;s:6:"@5|0|1";i:85;s:6:"@4|0|3";i:86;s:6:"@4|3|0";i:87;}', - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/.* Mobile/.* Safari/.*$@'=>76, - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_Flyer_P512; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>88, - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d).* Mobile/.* Safari/.*$@'=>'a:6:{s:4:"@3|1";i:89;s:4:"@3|0";i:90;s:4:"@4|0";i:91;s:4:"@4|1";i:92;s:4:"@4|5";i:93;s:4:"@4|4";i:94;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_Runnymede; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>95, - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC_Sensation; .*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>96, - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*Xbox; Xbox One\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/.*$@'=>97, - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC/WildfireS/.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>98, - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC/Sensation/.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.0.*Safari.*$@'=>99, - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/1(\d)\.0.*Safari/.*$@'=>'a:3:{s:2:"@2";i:100;s:2:"@0";i:101;s:2:"@1";i:102;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*Trident/8\.0; rv\:550\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/7\.0 Safari/.*$@'=>103, - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*Lumia 930\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@4";i:104;s:2:"@6";i:105;s:2:"@7";i:106;s:2:"@5";i:107;s:2:"@3";i:109;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC/DesireHD/.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>108, - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/.* Mobile/.* Safari/.*$@'=>110, - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d)(\d).* Mobile/.* Safari/.*$@'=>'a:14:{s:6:"@3|2|1";i:111;s:6:"@3|0|2";i:112;s:6:"@5|0|4";i:114;s:6:"@5|0|3";i:115;s:6:"@4|5|1";i:117;s:6:"@5|0|2";i:118;s:6:"@4|0|2";i:119;s:6:"@3|0|1";i:120;s:6:"@4|3|1";i:121;s:6:"@4|2|1";i:122;s:6:"@4|3|0";i:123;s:6:"@4|0|1";i:124;s:6:"@4|0|3";i:126;s:6:"@5|0|1";i:127;}', - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/(\d)\.0.*Safari/.*$@'=>'a:4:{s:2:"@7";i:113;s:2:"@8";i:116;s:2:"@6";i:125;s:2:"@9";i:128;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*Trident/8\.0; rv\:550\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/7\.0 Safari/.*$@'=>'a:3:{s:2:"@4";i:129;s:2:"@1";i:130;s:2:"@3";i:131;}', - '@^Mozilla/5\.0 \(Macintosh; .*Mac OS X.*; HTC/DesireS/.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>132, - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*CriOS/(\d)(\d)\.0.*Safari/.*$@'=>'a:24:{s:4:"@6|1";i:133;s:4:"@6|5";i:134;s:4:"@5|8";i:135;s:4:"@6|0";i:136;s:4:"@6|3";i:137;s:4:"@6|2";i:138;s:4:"@6|4";i:139;s:4:"@5|7";i:140;s:4:"@5|6";i:141;s:4:"@5|9";i:145;s:4:"@4|8";i:146;s:4:"@5|1";i:153;s:4:"@5|2";i:154;s:4:"@4|9";i:155;s:4:"@5|4";i:156;s:4:"@6|7";i:157;s:4:"@5|5";i:158;s:4:"@6|6";i:159;s:4:"@6|9";i:160;s:4:"@6|8";i:161;s:4:"@7|0";i:162;s:4:"@5|0";i:163;s:4:"@7|1";i:164;s:4:"@5|3";i:165;}', - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d).* Mobile/.* Safari/.*$@'=>'a:6:{s:4:"@3|1";i:142;s:4:"@4|5";i:143;s:4:"@4|4";i:148;s:4:"@3|0";i:149;s:4:"@4|0";i:150;s:4:"@4|1";i:151;}', - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/1(\d)\.0.*Safari/.*$@'=>'a:3:{s:2:"@1";i:144;s:2:"@0";i:147;s:2:"@2";i:152;}', - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*RM\-1010\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@7";i:166;s:2:"@6";i:167;s:2:"@5";i:168;s:2:"@4";i:170;s:2:"@3";i:171;}', - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*Lumia 930\) applewebkit.*\(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/12.*$@'=>169, - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/(\d)\.0.*Safari/.*$@'=>'a:4:{s:2:"@9";i:172;s:2:"@7";i:173;s:2:"@8";i:174;s:2:"@6";i:175;}', - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/.*Safari/.*$@'=>176, - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*RM\-1104.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/12.*$@'=>177, - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*CriOS/(\d)(\d)\.0.*Safari/.*$@'=>'a:24:{s:4:"@5|5";i:178;s:4:"@6|8";i:179;s:4:"@7|0";i:180;s:4:"@5|2";i:181;s:4:"@5|3";i:182;s:4:"@7|1";i:183;s:4:"@6|7";i:184;s:4:"@6|9";i:185;s:4:"@6|5";i:186;s:4:"@6|3";i:187;s:4:"@6|2";i:188;s:4:"@6|1";i:189;s:4:"@5|9";i:190;s:4:"@6|4";i:191;s:4:"@5|8";i:192;s:4:"@5|6";i:193;s:4:"@6|0";i:194;s:4:"@5|7";i:195;s:4:"@6|6";i:196;s:4:"@5|4";i:197;s:4:"@4|9";i:198;s:4:"@4|8";i:199;s:4:"@5|0";i:200;s:4:"@5|1";i:201;}', - '@^Mozilla/5\.0.*\(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>202, - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/.* Mobile/.* Safari/.*$@'=>203, - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d)(\d).* Mobile/.* Safari/.*$@'=>'a:14:{s:6:"@4|0|2";i:204;s:6:"@3|2|1";i:205;s:6:"@3|0|2";i:206;s:6:"@3|0|1";i:207;s:6:"@4|0|1";i:208;s:6:"@4|2|1";i:209;s:6:"@5|0|1";i:210;s:6:"@5|0|2";i:211;s:6:"@4|5|1";i:212;s:6:"@4|3|1";i:213;s:6:"@5|0|4";i:214;s:6:"@4|3|0";i:215;s:6:"@4|0|3";i:216;s:6:"@5|0|3";i:217;}', - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/(\d)(\d)\.0.*Safari/.*$@'=>'a:24:{s:4:"@5|8";i:218;s:4:"@6|6";i:219;s:4:"@6|5";i:220;s:4:"@7|1";i:221;s:4:"@7|0";i:222;s:4:"@5|6";i:223;s:4:"@4|8";i:224;s:4:"@6|8";i:225;s:4:"@5|7";i:227;s:4:"@6|9";i:228;s:4:"@6|7";i:229;s:4:"@6|4";i:230;s:4:"@4|9";i:231;s:4:"@6|1";i:232;s:4:"@5|1";i:234;s:4:"@5|3";i:235;s:4:"@5|2";i:236;s:4:"@6|0";i:237;s:4:"@5|4";i:238;s:4:"@6|2";i:239;s:4:"@5|0";i:240;s:4:"@5|9";i:241;s:4:"@5|5";i:242;s:4:"@6|3";i:243;}', - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/.*Safari/.*$@'=>226, - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*id336.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/12.*$@'=>233, - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/(\d)\.(\d).* Mobile/.* Safari/.*$@'=>'a:6:{s:4:"@3|1";i:244;s:4:"@3|0";i:245;s:4:"@4|5";i:246;s:4:"@4|4";i:249;s:4:"@4|1";i:251;s:4:"@4|0";i:252;}', - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/1(\d)\.0.*Safari/.*$@'=>'a:3:{s:2:"@1";i:247;s:2:"@0";i:248;s:2:"@2";i:250;}', - '@^Mozilla/5\.0.*\(iPod.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>253, - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0; .*Windows NT 6\.(\d).*Trident/4\.0.*Mozilla/4\.0 \(compatible.*; MSIE 6\.0.*$@'=>'a:2:{s:2:"@0";i:254;s:2:"@1";i:255;}', - '@^.*Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/8\.0.*rv\:11.*IEMobile.11\.0; Microsoft; Lumia 950 XL Dual SIM.*$@'=>256, - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/(\d)\.0.*Safari/.*$@'=>'a:4:{s:2:"@8";i:257;s:2:"@7";i:258;s:2:"@9";i:259;s:2:"@6";i:260;}', - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/8\.0.*rv\:11.*IEMobile.11\.0; Microsoft; Lumia 950 XL Dual SIM.*$@'=>261, - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0; .*Windows.*WOW64.*Trident/4\.0.*Mozilla/4\.0 \(compatible.*; MSIE 6\.0.*$@'=>262, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Mobile Safari/.* EdgA/4(\d)\..*$@'=>'a:2:{s:2:"@2";i:263;s:2:"@1";i:265;}', - '@^Mozilla/5\.0 \(.*Linux.*Android.* Build/.* applewebkit.* \(.*khtml.*like.*gecko.*\) Version/5\.1.* Mobile Safari.*$@'=>264, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Chrome/(\d)(\d)\.0.*Mobile.*Safari.*$@'=>'a:29:{s:4:"@6|2";i:266;s:4:"@4|5";i:267;s:4:"@7|0";i:268;s:4:"@6|9";i:269;s:4:"@6|5";i:270;s:4:"@6|4";i:271;s:4:"@6|1";i:272;s:4:"@4|3";i:273;s:4:"@6|6";i:274;s:4:"@4|4";i:275;s:4:"@6|7";i:276;s:4:"@6|8";i:277;s:4:"@4|6";i:278;s:4:"@7|1";i:279;s:4:"@5|3";i:280;s:4:"@6|3";i:281;s:4:"@5|4";i:282;s:4:"@5|5";i:283;s:4:"@5|8";i:284;s:4:"@6|0";i:285;s:4:"@5|6";i:286;s:4:"@5|7";i:287;s:4:"@5|2";i:288;s:4:"@4|9";i:289;s:4:"@4|8";i:290;s:4:"@4|7";i:291;s:4:"@5|9";i:292;s:4:"@5|0";i:293;s:4:"@5|1";i:294;}', - '@^Mozilla/5\.0 \(.*Windows.*Trident/8\.0; rv\:550\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/7\.0 Safari/.*$@'=>295, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Anonymisiert durch.*$@'=>'a:22:{s:4:"@6|1";i:296;s:4:"@7|0";i:297;s:4:"@6|0";i:298;s:4:"@6|5";i:299;s:4:"@6|3";i:300;s:4:"@6|7";i:301;s:4:"@6|4";i:302;s:4:"@6|8";i:303;s:4:"@6|2";i:304;s:4:"@6|6";i:305;s:4:"@6|9";i:306;s:4:"@5|2";i:307;s:4:"@5|5";i:308;s:4:"@5|7";i:309;s:4:"@7|1";i:310;s:4:"@5|4";i:311;s:4:"@5|3";i:312;s:4:"@5|0";i:313;s:4:"@5|1";i:314;s:4:"@5|8";i:315;s:4:"@5|6";i:316;s:4:"@5|9";i:317;}', - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Coast/.* Mobile/.* Safari/.*$@'=>318, - '@^Mozilla/5\.0 \(.*Linux.*\).*applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.* Large Screen Safari/.* GoogleTV/.*$@'=>319, - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0; .*Windows.*x64.*Trident/4\.0.*Mozilla/4\.0 \(compatible.*; MSIE 6\.0.*$@'=>320, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Anonymisiert durch.*$@'=>'a:88:{s:6:"@4|6|7";i:321;s:6:"@3|6|6";i:322;s:6:"@3|7|0";i:323;s:6:"@3|6|7";i:324;s:6:"@1|6|7";i:325;s:6:"@4|6|6";i:326;s:6:"@4|7|0";i:327;s:6:"@1|6|8";i:328;s:6:"@2|6|7";i:329;s:6:"@3|6|8";i:330;s:6:"@2|7|1";i:331;s:6:"@2|6|9";i:332;s:6:"@3|6|9";i:333;s:6:"@4|6|9";i:334;s:6:"@3|7|1";i:335;s:6:"@1|6|9";i:336;s:6:"@1|7|1";i:337;s:6:"@4|7|1";i:338;s:6:"@2|7|0";i:339;s:6:"@1|7|0";i:340;s:6:"@4|6|8";i:341;s:6:"@2|6|8";i:342;s:6:"@2|5|9";i:343;s:6:"@1|5|5";i:344;s:6:"@2|5|5";i:345;s:6:"@3|5|5";i:346;s:6:"@4|5|4";i:347;s:6:"@3|5|4";i:348;s:6:"@1|5|4";i:349;s:6:"@2|5|4";i:350;s:6:"@4|5|5";i:351;s:6:"@1|5|6";i:352;s:6:"@2|5|7";i:353;s:6:"@3|5|7";i:354;s:6:"@1|5|7";i:355;s:6:"@4|5|6";i:356;s:6:"@2|5|6";i:357;s:6:"@3|5|6";i:358;s:6:"@4|5|3";i:359;s:6:"@3|5|3";i:360;s:6:"@1|5|1";i:361;s:6:"@2|5|1";i:362;s:6:"@4|5|0";i:363;s:6:"@3|5|0";i:364;s:6:"@1|5|0";i:365;s:6:"@2|5|0";i:366;s:6:"@3|5|1";i:367;s:6:"@4|5|1";i:368;s:6:"@1|5|3";i:369;s:6:"@2|5|3";i:370;s:6:"@4|5|2";i:371;s:6:"@3|5|2";i:372;s:6:"@1|5|2";i:373;s:6:"@2|5|2";i:374;s:6:"@4|5|7";i:375;s:6:"@1|5|8";i:376;s:6:"@4|6|3";i:377;s:6:"@1|6|4";i:378;s:6:"@3|6|3";i:379;s:6:"@2|6|3";i:380;s:6:"@4|6|2";i:381;s:6:"@1|6|3";i:382;s:6:"@2|6|4";i:383;s:6:"@3|6|4";i:384;s:6:"@4|6|5";i:385;s:6:"@1|6|6";i:386;s:6:"@3|6|5";i:387;s:6:"@2|6|5";i:388;s:6:"@4|6|4";i:389;s:6:"@1|6|5";i:390;s:6:"@3|6|2";i:391;s:6:"@2|6|2";i:392;s:6:"@3|5|9";i:393;s:6:"@4|5|9";i:394;s:6:"@1|5|9";i:395;s:6:"@4|5|8";i:396;s:6:"@2|5|8";i:397;s:6:"@3|5|8";i:398;s:6:"@1|6|0";i:399;s:6:"@2|6|0";i:400;s:6:"@3|6|1";i:401;s:6:"@1|6|2";i:402;s:6:"@2|6|1";i:403;s:6:"@1|6|1";i:404;s:6:"@3|6|0";i:405;s:6:"@4|6|0";i:406;s:6:"@2|6|6";i:407;s:6:"@4|6|1";i:408;}', - '@^Mozilla/5\.0 \(Linux; Linux mips\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chromium/.* Safari/.*\) SRAF/3\.(\d).*$@'=>'a:3:{s:2:"@5";i:409;s:2:"@0";i:410;s:2:"@9";i:411;}', - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@3";i:412;s:2:"@4";i:413;s:2:"@5";i:414;s:2:"@7";i:415;s:2:"@6";i:416;}', - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/.*Safari/.*$@'=>417, - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/1(\d)\.0.*Safari/.*$@'=>'a:3:{s:2:"@1";i:418;s:2:"@0";i:420;s:2:"@2";i:421;}', - '@^Mozilla/5\.0.*\(.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>419, - '@^Mozilla/5\.0 \(Linux.*; Android Eclair.*Build/.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/.*Safari.*$@'=>422, - '@^Mozilla/5\.0 \(.*Linux.*Velocitymicro/T408.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) .*Version/4\.0.*Safari/.*$@'=>423, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Mobile Safari/.* EdgA/.*$@'=>424, - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/(\d)\.0.*Safari/.*$@'=>'a:4:{s:2:"@9";i:425;s:2:"@7";i:426;s:2:"@6";i:427;s:2:"@8";i:428;}', - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/7\.0.*rv\:11.*IEMobile.11\.0; Microsoft;Lumia 535 Dual SIM.*$@'=>429, - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/12.*$@'=>430, - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*CriOS/(\d)(\d)\.0.*Safari/.*$@'=>'a:24:{s:4:"@4|9";i:431;s:4:"@4|8";i:432;s:4:"@5|1";i:433;s:4:"@5|0";i:434;s:4:"@5|4";i:435;s:4:"@6|5";i:436;s:4:"@6|4";i:437;s:4:"@6|3";i:438;s:4:"@6|6";i:439;s:4:"@6|7";i:440;s:4:"@7|1";i:441;s:4:"@7|0";i:442;s:4:"@6|8";i:443;s:4:"@6|2";i:444;s:4:"@6|1";i:445;s:4:"@5|6";i:446;s:4:"@5|5";i:447;s:4:"@5|3";i:448;s:4:"@5|7";i:449;s:4:"@5|8";i:450;s:4:"@6|0";i:451;s:4:"@5|9";i:452;s:4:"@5|2";i:453;s:4:"@6|9";i:454;}', - '@^Mozilla/5\.0.*\(iPhone.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>455, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.* anonymized by.*$@'=>'a:22:{s:4:"@5|0";i:456;s:4:"@6|9";i:457;s:4:"@5|1";i:458;s:4:"@6|0";i:459;s:4:"@7|0";i:460;s:4:"@6|3";i:461;s:4:"@7|1";i:462;s:4:"@6|1";i:463;s:4:"@6|5";i:464;s:4:"@5|2";i:465;s:4:"@5|3";i:466;s:4:"@5|7";i:467;s:4:"@5|8";i:468;s:4:"@6|6";i:469;s:4:"@5|9";i:470;s:4:"@5|6";i:471;s:4:"@6|7";i:472;s:4:"@6|8";i:473;s:4:"@5|4";i:474;s:4:"@5|5";i:475;s:4:"@6|4";i:476;s:4:"@6|2";i:477;}', - '@^Mozilla/5\.0 \(SMART\-TV.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chromium/(\d)(\d)\..*Chrome/.*Safari/.*$@'=>'a:27:{s:4:"@6|1";i:478;s:4:"@6|2";i:479;s:4:"@6|3";i:480;s:4:"@6|4";i:481;s:4:"@6|0";i:482;s:4:"@5|9";i:483;s:4:"@5|6";i:484;s:4:"@5|7";i:485;s:4:"@5|8";i:486;s:4:"@6|5";i:487;s:4:"@6|6";i:488;s:4:"@4|5";i:489;s:4:"@4|7";i:490;s:4:"@7|1";i:491;s:4:"@4|6";i:493;s:4:"@7|0";i:494;s:4:"@6|8";i:496;s:4:"@6|9";i:497;s:4:"@5|5";i:498;s:4:"@6|7";i:499;s:4:"@5|2";i:501;s:4:"@5|1";i:502;s:4:"@5|0";i:503;s:4:"@4|8";i:505;s:4:"@5|3";i:506;s:4:"@4|9";i:507;s:4:"@5|4";i:510;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@6";i:492;s:2:"@7";i:495;s:2:"@4";i:500;s:2:"@5";i:504;s:2:"@3";i:509;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*Anonymisiert durch.*$@'=>508, - '@^Mozilla/5\.0.*\(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Safari/.*$@'=>511, - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0; .*Windows.*Trident/4\.0.*Mozilla/4\.0 \(compatible.*; MSIE 6\.0.*$@'=>512, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.* anonymized by.*$@'=>'a:88:{s:6:"@3|6|8";i:513;s:6:"@3|5|2";i:514;s:6:"@2|5|2";i:515;s:6:"@1|5|2";i:516;s:6:"@4|5|2";i:517;s:6:"@1|5|3";i:518;s:6:"@3|5|3";i:519;s:6:"@4|5|3";i:520;s:6:"@2|5|3";i:521;s:6:"@4|5|1";i:522;s:6:"@4|6|8";i:523;s:6:"@3|5|9";i:524;s:6:"@3|5|1";i:525;s:6:"@3|5|0";i:526;s:6:"@4|5|0";i:527;s:6:"@2|5|0";i:528;s:6:"@4|5|8";i:529;s:6:"@1|6|0";i:530;s:6:"@1|5|0";i:531;s:6:"@1|5|1";i:532;s:6:"@2|5|1";i:533;s:6:"@2|6|9";i:534;s:6:"@1|6|9";i:535;s:6:"@2|5|8";i:536;s:6:"@4|5|9";i:537;s:6:"@4|6|9";i:538;s:6:"@3|6|9";i:539;s:6:"@2|6|8";i:540;s:6:"@2|5|4";i:541;s:6:"@2|6|6";i:542;s:6:"@1|6|7";i:543;s:6:"@2|6|7";i:544;s:6:"@1|5|8";i:545;s:6:"@4|6|7";i:546;s:6:"@3|6|7";i:547;s:6:"@4|5|6";i:548;s:6:"@3|6|6";i:549;s:6:"@4|5|7";i:550;s:6:"@3|5|7";i:551;s:6:"@2|5|7";i:552;s:6:"@4|6|6";i:553;s:6:"@1|5|7";i:554;s:6:"@1|6|6";i:555;s:6:"@3|6|0";i:556;s:6:"@1|5|5";i:557;s:6:"@3|5|8";i:558;s:6:"@4|5|4";i:559;s:6:"@3|5|4";i:560;s:6:"@1|5|4";i:561;s:6:"@1|5|9";i:562;s:6:"@2|5|5";i:563;s:6:"@3|5|5";i:564;s:6:"@2|5|6";i:565;s:6:"@3|5|6";i:566;s:6:"@1|5|6";i:567;s:6:"@2|5|9";i:568;s:6:"@4|5|5";i:569;s:6:"@1|6|8";i:570;s:6:"@4|6|1";i:571;s:6:"@2|7|1";i:572;s:6:"@2|6|0";i:573;s:6:"@3|7|1";i:574;s:6:"@1|7|1";i:575;s:6:"@4|6|2";i:576;s:6:"@4|6|4";i:577;s:6:"@3|6|2";i:578;s:6:"@4|7|1";i:579;s:6:"@1|6|3";i:580;s:6:"@1|6|4";i:581;s:6:"@4|6|0";i:582;s:6:"@2|6|4";i:583;s:6:"@4|6|3";i:584;s:6:"@3|6|4";i:585;s:6:"@2|6|3";i:586;s:6:"@3|6|3";i:587;s:6:"@1|6|2";i:588;s:6:"@2|6|2";i:589;s:6:"@3|6|1";i:590;s:6:"@2|7|0";i:591;s:6:"@4|7|0";i:592;s:6:"@3|7|0";i:593;s:6:"@4|6|5";i:594;s:6:"@3|6|5";i:595;s:6:"@1|6|5";i:596;s:6:"@1|6|1";i:597;s:6:"@1|7|0";i:598;s:6:"@2|6|5";i:599;s:6:"@2|6|1";i:600;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/12.*$@'=>601, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*Anonymisiert durch.*$@'=>'a:5:{s:2:"@3";i:602;s:2:"@4";i:604;s:2:"@1";i:606;s:2:"@2";i:611;s:2:"@0";i:612;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.4.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/1(\d)\..*$@'=>'a:5:{s:2:"@4";i:603;s:2:"@3";i:607;s:2:"@5";i:608;s:2:"@7";i:609;s:2:"@6";i:610;}', - '@^Mozilla/5\.0 \(.*Windows Phone 10\.0.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/.*$@'=>605, - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Mobile.*$@'=>613, - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/(\d)(\d)\.0.*Safari/.*$@'=>'a:24:{s:4:"@5|9";i:614;s:4:"@5|7";i:615;s:4:"@5|8";i:616;s:4:"@5|0";i:617;s:4:"@4|8";i:618;s:4:"@5|5";i:619;s:4:"@4|9";i:620;s:4:"@5|2";i:621;s:4:"@5|3";i:622;s:4:"@5|4";i:623;s:4:"@6|0";i:624;s:4:"@5|6";i:625;s:4:"@6|1";i:626;s:4:"@6|7";i:628;s:4:"@6|8";i:629;s:4:"@6|9";i:630;s:4:"@7|0";i:631;s:4:"@6|6";i:632;s:4:"@6|5";i:633;s:4:"@6|2";i:634;s:4:"@5|1";i:635;s:4:"@6|3";i:636;s:4:"@6|4";i:637;s:4:"@7|1";i:638;}', - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/.*Safari/.*$@'=>627, - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/1(\d)\.0.*Safari/.*$@'=>'a:3:{s:2:"@0";i:639;s:2:"@1";i:640;s:2:"@2";i:641;}', - '@^Mozilla/5\.0.*\(iPad.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>642, - '@^Mozilla/5\.0.*\(iPod.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>643, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Mobile Safari/.*$@'=>'a:29:{s:4:"@4|9";i:644;s:4:"@5|2";i:645;s:4:"@5|1";i:646;s:4:"@5|3";i:647;s:4:"@5|4";i:648;s:4:"@5|5";i:649;s:4:"@5|0";i:650;s:4:"@4|8";i:651;s:4:"@4|4";i:652;s:4:"@4|3";i:653;s:4:"@4|5";i:654;s:4:"@4|6";i:655;s:4:"@4|7";i:656;s:4:"@5|6";i:657;s:4:"@5|7";i:658;s:4:"@6|6";i:659;s:4:"@6|5";i:660;s:4:"@6|7";i:661;s:4:"@6|8";i:662;s:4:"@6|9";i:663;s:4:"@6|4";i:664;s:4:"@6|3";i:665;s:4:"@5|9";i:666;s:4:"@5|8";i:667;s:4:"@6|0";i:668;s:4:"@6|1";i:669;s:4:"@6|2";i:670;s:4:"@7|0";i:671;s:4:"@7|1";i:672;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.4.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/12.*$@'=>673, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.*Safari/.*OPR/(\d)(\d)\.0.*$@'=>'a:29:{s:4:"@5|2";i:674;s:4:"@5|3";i:675;s:4:"@4|3";i:676;s:4:"@5|1";i:677;s:4:"@3|3";i:678;s:4:"@5|4";i:679;s:4:"@4|1";i:680;s:4:"@2|8";i:681;s:4:"@2|7";i:682;s:4:"@5|5";i:683;s:4:"@4|2";i:684;s:4:"@3|4";i:685;s:4:"@5|0";i:686;s:4:"@4|4";i:687;s:4:"@4|6";i:688;s:4:"@3|7";i:689;s:4:"@4|5";i:690;s:4:"@4|7";i:691;s:4:"@4|8";i:692;s:4:"@4|9";i:693;s:4:"@3|5";i:694;s:4:"@3|6";i:695;s:4:"@3|8";i:696;s:4:"@3|9";i:697;s:4:"@3|2";i:698;s:4:"@2|9";i:699;s:4:"@3|1";i:700;s:4:"@4|0";i:701;s:4:"@3|0";i:702;}', - '@^Mozilla/5\.0.*\(iPod.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Safari/.*$@'=>703, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Chrome/(\d)(\d)\.0.*Safari.*$@'=>'a:29:{s:4:"@4|8";i:704;s:4:"@4|9";i:706;s:4:"@5|0";i:707;s:4:"@4|6";i:709;s:4:"@4|3";i:710;s:4:"@7|0";i:711;s:4:"@7|1";i:712;s:4:"@6|5";i:713;s:4:"@6|9";i:714;s:4:"@4|4";i:716;s:4:"@5|1";i:717;s:4:"@4|5";i:718;s:4:"@4|7";i:719;s:4:"@5|9";i:720;s:4:"@5|8";i:721;s:4:"@5|7";i:722;s:4:"@6|2";i:723;s:4:"@5|2";i:724;s:4:"@6|0";i:726;s:4:"@6|1";i:727;s:4:"@6|6";i:728;s:4:"@6|3";i:729;s:4:"@5|6";i:730;s:4:"@6|8";i:731;s:4:"@5|3";i:732;s:4:"@5|5";i:733;s:4:"@6|4";i:734;s:4:"@5|4";i:735;s:4:"@6|7";i:736;}', - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/(\d)\.0.*Safari/.*$@'=>'a:4:{s:2:"@7";i:705;s:2:"@8";i:708;s:2:"@6";i:715;s:2:"@9";i:725;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/.*$@'=>737, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.*Safari/.*OPR/(\d)(\d)\.0.*$@'=>'a:102:{s:6:"@2|3|5";i:738;s:6:"@0|3|6";i:739;s:6:"@1|3|5";i:740;s:6:"@1|3|6";i:741;s:6:"@4|3|0";i:742;s:6:"@3|3|5";i:743;s:6:"@2|3|0";i:744;s:6:"@2|5|0";i:745;s:6:"@3|5|0";i:746;s:6:"@1|3|0";i:747;s:6:"@2|3|6";i:748;s:6:"@1|5|0";i:749;s:6:"@3|4|9";i:750;s:6:"@1|4|9";i:751;s:6:"@0|3|5";i:752;s:6:"@2|4|9";i:753;s:6:"@3|3|0";i:754;s:6:"@3|3|1";i:755;s:6:"@3|4|6";i:756;s:6:"@2|5|1";i:757;s:6:"@3|3|7";i:758;s:6:"@2|3|7";i:759;s:6:"@2|4|6";i:760;s:6:"@1|4|6";i:761;s:6:"@2|4|5";i:762;s:6:"@3|4|5";i:763;s:6:"@4|3|1";i:764;s:6:"@1|4|7";i:765;s:6:"@2|4|7";i:766;s:6:"@2|4|8";i:767;s:6:"@3|4|8";i:768;s:6:"@0|3|1";i:769;s:6:"@1|4|8";i:770;s:6:"@1|3|1";i:771;s:6:"@3|4|7";i:772;s:6:"@1|3|7";i:773;s:6:"@2|3|1";i:774;s:6:"@3|3|6";i:775;s:6:"@3|3|3";i:776;s:6:"@1|4|5";i:777;s:6:"@3|3|2";i:778;s:6:"@2|3|2";i:779;s:6:"@1|3|2";i:780;s:6:"@3|5|5";i:781;s:6:"@2|5|5";i:782;s:6:"@1|3|3";i:783;s:6:"@0|3|3";i:784;s:6:"@1|5|5";i:785;s:6:"@0|3|2";i:786;s:6:"@0|2|7";i:787;s:6:"@1|2|8";i:788;s:6:"@2|2|8";i:789;s:6:"@3|2|8";i:790;s:6:"@4|2|8";i:791;s:6:"@0|2|8";i:792;s:6:"@4|2|7";i:793;s:6:"@1|2|7";i:794;s:6:"@2|2|7";i:795;s:6:"@3|2|7";i:796;s:6:"@0|2|9";i:797;s:6:"@3|5|4";i:798;s:6:"@4|2|9";i:799;s:6:"@2|5|2";i:800;s:6:"@3|5|2";i:801;s:6:"@0|3|4";i:802;s:6:"@1|3|4";i:803;s:6:"@1|5|2";i:804;s:6:"@0|3|0";i:805;s:6:"@3|3|4";i:806;s:6:"@2|3|4";i:807;s:6:"@3|2|9";i:808;s:6:"@1|5|4";i:810;s:6:"@2|3|3";i:811;s:6:"@2|5|4";i:812;s:6:"@1|2|9";i:813;s:6:"@2|2|9";i:814;s:6:"@1|5|3";i:815;s:6:"@2|5|3";i:816;s:6:"@3|5|3";i:817;s:6:"@3|5|1";i:818;s:6:"@1|5|1";i:819;s:6:"@2|4|2";i:820;s:6:"@3|4|2";i:821;s:6:"@3|4|4";i:822;s:6:"@1|4|2";i:823;s:6:"@2|3|9";i:824;s:6:"@2|4|1";i:825;s:6:"@3|4|1";i:826;s:6:"@1|3|8";i:827;s:6:"@2|4|4";i:828;s:6:"@1|4|4";i:829;s:6:"@2|4|3";i:830;s:6:"@3|4|3";i:831;s:6:"@3|4|0";i:832;s:6:"@1|4|3";i:833;s:6:"@2|4|0";i:834;s:6:"@3|3|8";i:835;s:6:"@1|3|9";i:836;s:6:"@1|4|0";i:837;s:6:"@3|3|9";i:838;s:6:"@2|3|8";i:839;s:6:"@1|4|1";i:840;}', - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Mobile.*$@'=>809, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* anonymized by.*$@'=>841, - '@^Mozilla/5\.0 \(.*Windows NT 6\.4.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* Edge/.*$@'=>842, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/4\.0.*Mobile.*Safari.*$@'=>843, - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0.*; .*Windows NT 6\.0.*Mozilla/4\.0 \(compatible.*; MSIE 6\.0.*$@'=>844, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* anonymized by.*$@'=>'a:5:{s:2:"@1";i:845;s:2:"@4";i:846;s:2:"@3";i:847;s:2:"@2";i:848;s:2:"@0";i:849;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.*Safari/.*OPR/(\d)(\d)\.0.*HbbTV/.*$@'=>'a:24:{s:4:"@5|5";i:850;s:4:"@5|3";i:851;s:4:"@3|5";i:853;s:4:"@3|2";i:854;s:4:"@3|3";i:855;s:4:"@4|7";i:856;s:4:"@4|4";i:857;s:4:"@4|9";i:858;s:4:"@3|8";i:859;s:4:"@4|6";i:860;s:4:"@5|2";i:861;s:4:"@3|9";i:862;s:4:"@5|0";i:863;s:4:"@4|1";i:864;s:4:"@4|0";i:865;s:4:"@3|7";i:866;s:4:"@4|2";i:867;s:4:"@3|4";i:868;s:4:"@5|4";i:869;s:4:"@4|5";i:870;s:4:"@5|1";i:871;s:4:"@4|3";i:872;s:4:"@4|8";i:873;s:4:"@3|6";i:874;}', - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*CriOS/.*Safari/.*$@'=>852, - '@^Mozilla/5\.0.*\(.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>875, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) .*Chrome/.*Mobile Safari/.*$@'=>876, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*YoloBrowser/1\.0.*Safari.*$@'=>877, - '@^Mozilla/5\.0.*\(.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Safari/.*$@'=>878, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khmtl.*like.*gecko.*\).*Version/.*Chrome.*Safari.*$@'=>879, - '@^ELEMENT10 1 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>880, - '@^Tablet\-PC\-4 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>881, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Safari/.*$@'=>'a:22:{s:4:"@5|5";i:882;s:4:"@6|0";i:883;s:4:"@6|9";i:884;s:4:"@5|0";i:885;s:4:"@5|6";i:886;s:4:"@6|7";i:887;s:4:"@6|4";i:888;s:4:"@5|1";i:889;s:4:"@6|5";i:890;s:4:"@7|0";i:891;s:4:"@5|9";i:892;s:4:"@6|3";i:893;s:4:"@5|3";i:894;s:4:"@5|8";i:895;s:4:"@7|1";i:896;s:4:"@6|2";i:897;s:4:"@6|6";i:898;s:4:"@6|1";i:899;s:4:"@5|2";i:900;s:4:"@5|7";i:901;s:4:"@6|8";i:902;s:4:"@5|4";i:903;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.*Safari/.*OPR/(\d)(\d)\.0.*OMI/.*$@'=>'a:29:{s:4:"@3|0";i:904;s:4:"@4|0";i:905;s:4:"@3|6";i:906;s:4:"@5|1";i:907;s:4:"@4|8";i:909;s:4:"@3|4";i:910;s:4:"@2|9";i:911;s:4:"@4|5";i:912;s:4:"@5|2";i:913;s:4:"@5|5";i:914;s:4:"@3|2";i:915;s:4:"@5|3";i:916;s:4:"@3|5";i:917;s:4:"@5|4";i:918;s:4:"@3|8";i:919;s:4:"@3|3";i:920;s:4:"@4|3";i:921;s:4:"@4|2";i:922;s:4:"@2|8";i:924;s:4:"@5|0";i:925;s:4:"@4|4";i:926;s:4:"@3|9";i:927;s:4:"@4|9";i:928;s:4:"@2|7";i:929;s:4:"@4|1";i:930;s:4:"@4|7";i:931;s:4:"@3|7";i:932;s:4:"@3|1";i:933;s:4:"@4|6";i:934;}', - '@^Mozilla/5\.0.*\(.*CPU iPhone OS .* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Mobile.*$@'=>908, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.*\(.*kthml.*like.*gecko.*\).*Version/.*Chrome.*Safari.*$@'=>923, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari.*Chrome.*$@'=>935, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Chrome.*Safari.*$@'=>936, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Safari/.*$@'=>'a:88:{s:6:"@4|6|6";i:937;s:6:"@2|7|1";i:938;s:6:"@4|5|2";i:939;s:6:"@3|7|1";i:940;s:6:"@1|7|1";i:941;s:6:"@1|6|1";i:942;s:6:"@2|6|2";i:943;s:6:"@2|5|2";i:944;s:6:"@3|6|3";i:945;s:6:"@2|5|9";i:946;s:6:"@3|5|9";i:947;s:6:"@4|5|9";i:948;s:6:"@2|6|5";i:949;s:6:"@1|6|5";i:950;s:6:"@3|5|2";i:951;s:6:"@2|5|6";i:952;s:6:"@1|5|2";i:953;s:6:"@1|5|9";i:954;s:6:"@4|6|3";i:955;s:6:"@4|6|8";i:956;s:6:"@1|6|7";i:957;s:6:"@4|5|7";i:958;s:6:"@3|6|1";i:959;s:6:"@4|5|3";i:960;s:6:"@3|5|8";i:961;s:6:"@4|6|1";i:962;s:6:"@2|6|7";i:963;s:6:"@1|5|8";i:964;s:6:"@2|5|8";i:965;s:6:"@1|6|2";i:966;s:6:"@3|5|7";i:967;s:6:"@3|5|3";i:968;s:6:"@4|6|2";i:969;s:6:"@3|6|8";i:970;s:6:"@3|5|6";i:971;s:6:"@1|5|6";i:972;s:6:"@2|6|8";i:973;s:6:"@1|6|8";i:974;s:6:"@4|5|8";i:975;s:6:"@2|5|3";i:976;s:6:"@1|5|3";i:977;s:6:"@2|6|1";i:978;s:6:"@4|7|1";i:979;s:6:"@1|6|6";i:980;s:6:"@1|6|0";i:981;s:6:"@2|5|0";i:982;s:6:"@1|5|0";i:983;s:6:"@2|6|9";i:984;s:6:"@3|5|0";i:985;s:6:"@4|5|0";i:986;s:6:"@3|6|2";i:987;s:6:"@2|6|4";i:988;s:6:"@4|6|5";i:989;s:6:"@3|6|6";i:990;s:6:"@3|6|9";i:991;s:6:"@4|6|9";i:992;s:6:"@2|6|0";i:993;s:6:"@3|5|5";i:994;s:6:"@1|5|4";i:995;s:6:"@2|5|5";i:996;s:6:"@2|5|4";i:997;s:6:"@3|5|4";i:998;s:6:"@4|6|0";i:999;s:6:"@3|6|0";i:1000;s:6:"@4|5|4";i:1001;s:6:"@4|5|6";i:1002;s:6:"@1|7|0";i:1003;s:6:"@4|6|4";i:1004;s:6:"@4|6|7";i:1005;s:6:"@4|5|1";i:1006;s:6:"@3|5|1";i:1007;s:6:"@1|5|7";i:1008;s:6:"@1|6|3";i:1009;s:6:"@2|6|3";i:1010;s:6:"@1|5|5";i:1011;s:6:"@3|6|5";i:1012;s:6:"@2|5|7";i:1013;s:6:"@1|6|9";i:1014;s:6:"@2|5|1";i:1015;s:6:"@3|7|0";i:1016;s:6:"@2|7|0";i:1017;s:6:"@3|6|4";i:1018;s:6:"@1|5|1";i:1019;s:6:"@4|5|5";i:1020;s:6:"@2|6|6";i:1021;s:6:"@3|6|7";i:1022;s:6:"@4|7|0";i:1023;s:6:"@1|6|4";i:1024;}', - '@^Mozilla/5\.0 \(.*Windows.*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*Anonymisiert durch.*$@'=>1025, - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chromium/(\d)(\d)\..*Chrome/.*Safari/.*$@'=>'a:27:{s:4:"@5|9";i:1026;s:4:"@5|0";i:1027;s:4:"@4|9";i:1028;s:4:"@6|0";i:1029;s:4:"@4|8";i:1030;s:4:"@4|7";i:1031;s:4:"@4|5";i:1032;s:4:"@4|6";i:1033;s:4:"@5|1";i:1034;s:4:"@5|2";i:1035;s:4:"@5|5";i:1036;s:4:"@5|6";i:1037;s:4:"@5|4";i:1038;s:4:"@5|3";i:1039;s:4:"@5|8";i:1041;s:4:"@5|7";i:1042;s:4:"@6|9";i:1043;s:4:"@6|5";i:1044;s:4:"@6|1";i:1045;s:4:"@6|4";i:1046;s:4:"@6|2";i:1047;s:4:"@6|3";i:1048;s:4:"@7|1";i:1049;s:4:"@6|6";i:1050;s:4:"@7|0";i:1051;s:4:"@6|8";i:1052;s:4:"@6|7";i:1053;}', - '@^.*Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.*khtml.*like.*gecko.*\) Version/.*Chrome.*Safari.*$@'=>1040, - '@^Mozilla/5\.0 \(Windows NT 6\.2; ARM; Trident/(\d)\.0.*rv\:11\.0; WPDesktop; NOKIA; Lumia 1(\d)20.*$@'=>'a:4:{s:4:"@8|5";i:1054;s:4:"@7|5";i:1055;s:4:"@7|3";i:1056;s:4:"@8|3";i:1057;}', - '@^TERRA_101 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1058, - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/7\.0.*rv\:11.*IEMobile.11\.0; Microsoft; RM\-1(\d)(\d)(\d).*$@'=>'a:5:{s:6:"@0|7|4";i:1059;s:6:"@0|8|9";i:1060;s:6:"@0|3|1";i:1061;s:6:"@0|9|0";i:1062;s:6:"@1|1|3";i:1063;}', - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Safari/.*$@'=>'a:29:{s:4:"@5|5";i:1064;s:4:"@5|4";i:1065;s:4:"@5|6";i:1066;s:4:"@5|8";i:1067;s:4:"@5|3";i:1068;s:4:"@5|7";i:1069;s:4:"@5|0";i:1070;s:4:"@4|8";i:1071;s:4:"@4|9";i:1072;s:4:"@5|9";i:1073;s:4:"@5|1";i:1074;s:4:"@5|2";i:1075;s:4:"@6|2";i:1076;s:4:"@6|8";i:1077;s:4:"@6|9";i:1078;s:4:"@7|0";i:1079;s:4:"@7|1";i:1080;s:4:"@6|6";i:1081;s:4:"@6|5";i:1082;s:4:"@6|1";i:1083;s:4:"@4|7";i:1084;s:4:"@6|3";i:1085;s:4:"@6|4";i:1086;s:4:"@6|0";i:1087;s:4:"@6|7";i:1088;s:4:"@4|5";i:1089;s:4:"@4|3";i:1090;s:4:"@4|6";i:1091;s:4:"@4|4";i:1092;}', - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.*Safari/.*OPR/(\d)(\d)\.0.*$@'=>'a:29:{s:4:"@5|5";i:1093;s:4:"@3|9";i:1094;s:4:"@2|9";i:1095;s:4:"@4|4";i:1096;s:4:"@4|0";i:1097;s:4:"@3|8";i:1098;s:4:"@3|3";i:1099;s:4:"@5|4";i:1100;s:4:"@5|2";i:1101;s:4:"@3|7";i:1102;s:4:"@3|0";i:1103;s:4:"@3|5";i:1104;s:4:"@4|5";i:1105;s:4:"@2|8";i:1106;s:4:"@5|0";i:1107;s:4:"@3|6";i:1108;s:4:"@4|6";i:1109;s:4:"@3|1";i:1110;s:4:"@5|3";i:1111;s:4:"@3|2";i:1112;s:4:"@4|7";i:1113;s:4:"@3|4";i:1114;s:4:"@4|8";i:1115;s:4:"@4|2";i:1117;s:4:"@4|3";i:1118;s:4:"@2|7";i:1119;s:4:"@4|9";i:1120;s:4:"@4|1";i:1122;s:4:"@5|1";i:1123;}', - '@^.*Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/4\.(\d).*Safari.*$@'=>'a:2:{s:2:"@1";i:1116;s:2:"@2";i:1121;}', - '@^Mozilla/5\.0 \(Windows NT 6\.2; ARM; Trident/(\d)\.0.*rv\:11\.0; WPDesktop; NOKIA; Lumia (\d)(\d)(\d).*$@'=>'a:16:{s:8:"@7|9|2|5";i:1124;s:8:"@7|6|3|0";i:1125;s:8:"@7|5|2|0";i:1126;s:8:"@7|6|2|5";i:1127;s:8:"@7|6|3|5";i:1128;s:8:"@7|7|2|0";i:1129;s:8:"@7|8|2|0";i:1130;s:8:"@7|9|2|0";i:1131;s:8:"@8|9|2|5";i:1132;s:8:"@8|9|2|0";i:1133;s:8:"@8|5|2|0";i:1134;s:8:"@8|8|2|0";i:1135;s:8:"@8|7|2|0";i:1136;s:8:"@8|6|3|0";i:1137;s:8:"@8|6|3|5";i:1138;s:8:"@8|6|2|5";i:1139;}', - '@^TBDC1093 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1140, - '@^Mozilla/5\.0 \(Linux;.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* Safari/.* SRAF/3\.(\d).*$@'=>'a:3:{s:2:"@5";i:1141;s:2:"@9";i:1142;s:2:"@0";i:1144;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*ASTON;XenaHd Twin Connect.*$@'=>1143, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Version/4\.(\d).*Safari.*$@'=>'a:2:{s:2:"@1";i:1145;s:2:"@2";i:1147;}', - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khmtl.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>1146, - '@^Mozilla/5\.0.*\(iPad.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Safari/.*$@'=>1148, - '@^TBD1083 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1149, - '@^TBDG773 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1150, - '@^DINO762 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1151, - '@^TBDB863 Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1152, - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/(\d)\.0.*rv\:11.*IEMobile.11\.0; NOKIA; Lumia (\d)(\d)(\d).*$@'=>'a:24:{s:8:"@7|7|3|0";i:1153;s:8:"@7|6|3|5";i:1154;s:8:"@8|6|2|5";i:1155;s:8:"@7|8|2|0";i:1156;s:8:"@7|9|2|5";i:1157;s:8:"@7|9|3|0";i:1158;s:8:"@7|9|2|8";i:1159;s:8:"@7|6|3|0";i:1160;s:8:"@7|6|2|5";i:1161;s:8:"@8|6|3|5";i:1162;s:8:"@8|9|2|0";i:1163;s:8:"@8|7|3|0";i:1164;s:8:"@7|5|2|0";i:1165;s:8:"@8|6|3|0";i:1166;s:8:"@7|6|2|0";i:1167;s:8:"@7|5|3|0";i:1168;s:8:"@8|8|2|0";i:1169;s:8:"@7|9|2|0";i:1170;s:8:"@8|9|2|5";i:1171;s:8:"@8|9|2|8";i:1172;s:8:"@8|6|2|0";i:1173;s:8:"@8|5|3|0";i:1174;s:8:"@8|5|2|0";i:1175;s:8:"@8|9|3|0";i:1176;}', - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.*\(.*kthml.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>1177, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Version/1(\d)\.(\d).* Safari/.*$@'=>'a:6:{s:4:"@0|2";i:1178;s:4:"@0|1";i:1179;s:4:"@1|0";i:1180;s:4:"@1|1";i:1181;s:4:"@0|0";i:1182;s:4:"@2|0";i:1183;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.* Safari/.*$@'=>1184, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/(\d)\.(\d).*Safari.*$@'=>'a:6:{s:4:"@4|1";i:1185;s:4:"@4|4";i:1186;s:4:"@5|0";i:1187;s:4:"@4|3";i:1188;s:4:"@4|0";i:1189;s:4:"@4|2";i:1190;}', - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Mobile.*$@'=>1191, - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0.*; .*Windows.*Mozilla/4\.0 \(compatible.*; MSIE 6\.0.*$@'=>1192, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Version/(\d)\.(\d).* Safari/.*$@'=>'a:8:{s:4:"@7|0";i:1193;s:4:"@8|0";i:1195;s:4:"@6|2";i:1196;s:4:"@6|1";i:1198;s:4:"@9|0";i:1199;s:4:"@6|0";i:1200;s:4:"@9|1";i:1204;s:4:"@7|1";i:1205;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>'a:4:{s:2:"@3";i:1194;s:2:"@0";i:1202;s:2:"@2";i:1203;s:2:"@1";i:1206;}', - '@^Mozilla/5\.0 \(.*Windows.*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.* anonymized by.*$@'=>1197, - '@^Mozilla/5\.0\(.*Linux.*Android.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) Version/4\.0.*Safari.*$@'=>1201, - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*Chrome/.*Safari/.*OPR/(\d)(\d)\.0.*$@'=>'a:29:{s:4:"@2|7";i:1207;s:4:"@4|9";i:1208;s:4:"@3|4";i:1209;s:4:"@4|6";i:1210;s:4:"@4|7";i:1211;s:4:"@3|0";i:1213;s:4:"@4|4";i:1214;s:4:"@4|2";i:1215;s:4:"@4|5";i:1216;s:4:"@5|1";i:1217;s:4:"@3|2";i:1218;s:4:"@5|0";i:1219;s:4:"@4|8";i:1220;s:4:"@4|1";i:1221;s:4:"@5|5";i:1222;s:4:"@3|7";i:1223;s:4:"@5|4";i:1224;s:4:"@3|8";i:1225;s:4:"@3|3";i:1226;s:4:"@5|2";i:1227;s:4:"@2|8";i:1228;s:4:"@3|9";i:1229;s:4:"@5|3";i:1230;s:4:"@3|1";i:1231;s:4:"@4|0";i:1232;s:4:"@3|5";i:1233;s:4:"@2|9";i:1234;s:4:"@4|3";i:1235;s:4:"@3|6";i:1240;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.* Safari/.*$@'=>'a:5:{s:2:"@4";i:1212;s:2:"@1";i:1236;s:2:"@0";i:1237;s:2:"@2";i:1238;s:2:"@3";i:1239;}', - '@^Mozilla/4\.0 \(compatible; MSIE 7\.0.*; .*Windows NT 6\.2.*Trident/3\.1; Xbox; Xbox One.*$@'=>1241, - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) HeadlessChrome.* Safari/.*$@'=>1242, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) .*Chrome/.*Safari/.*$@'=>1243, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0.*Windows NT 6\.2.*Trident/6\.0.*Xbox; Xbox One.*\).*$@'=>1244, - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/7\.0.*rv\:11.*IEMobile.11\.0; NOKIA; RM\-994.*$@'=>1245, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Safari/.*$@'=>'a:22:{s:4:"@5|8";i:1246;s:4:"@5|4";i:1247;s:4:"@5|3";i:1248;s:4:"@5|5";i:1249;s:4:"@5|9";i:1250;s:4:"@7|1";i:1251;s:4:"@6|7";i:1252;s:4:"@6|6";i:1253;s:4:"@6|2";i:1254;s:4:"@5|1";i:1255;s:4:"@6|4";i:1256;s:4:"@6|8";i:1257;s:4:"@6|9";i:1258;s:4:"@6|3";i:1259;s:4:"@7|0";i:1260;s:4:"@5|2";i:1261;s:4:"@5|0";i:1262;s:4:"@6|5";i:1263;s:4:"@6|1";i:1264;s:4:"@6|0";i:1265;s:4:"@5|7";i:1266;s:4:"@5|6";i:1267;}', - '@^Mozilla/5\.0\(.*Linux.*Android.*\)applewebkit.*\(.*khtml.*like.*gecko.*\)Version/4\.0.*Safari.*$@'=>1268, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari.*$@'=>1269, - '@^Mozilla/5\.0.*\(.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Safari/.*$@'=>1270, - '@^Mozilla/5\.0.*\(.*CPU.*OS.* like Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Mobile.*$@'=>1271, - '@^Mozilla/5\.0 \(Windows NT 6\.2; ARM; Trident/(\d)\.0.*rv\:11\.0; WPDesktop; NOKIA; 909.*$@'=>'a:2:{s:2:"@8";i:1272;s:2:"@7";i:1273;}', - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Chrome/.* Safari/.*$@'=>1274, - '@^.* Mozilla/5\.0 \(X11; Linux x86_64\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*$@'=>1275, - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/(\d)\.0.*rv\:11.*IEMobile.11\.0; NOKIA; 909.*$@'=>'a:2:{s:2:"@7";i:1276;s:2:"@8";i:1277;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/(\d)(\d)\.0.*Safari/.*$@'=>'a:22:{s:4:"@7|1";i:1278;s:4:"@6|9";i:1279;s:4:"@6|7";i:1280;s:4:"@5|0";i:1281;s:4:"@6|0";i:1282;s:4:"@6|2";i:1283;s:4:"@6|4";i:1284;s:4:"@5|6";i:1285;s:4:"@6|8";i:1286;s:4:"@5|2";i:1287;s:4:"@5|9";i:1288;s:4:"@5|4";i:1289;s:4:"@5|1";i:1290;s:4:"@5|3";i:1291;s:4:"@7|0";i:1292;s:4:"@5|7";i:1293;s:4:"@6|6";i:1294;s:4:"@5|8";i:1295;s:4:"@5|5";i:1296;s:4:"@6|3";i:1297;s:4:"@6|1";i:1298;s:4:"@6|5";i:1299;}', - '@^Mozilla/5\.0 Slackware.* \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Chrome/.*$@'=>1300, - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.*\(.*khtml.*like.*gecko.*\) .*Version/4\.(\d).*Safari/.*$@'=>'a:2:{s:2:"@1";i:1301;s:2:"@0";i:1302;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; Windows 95; Anonymisiert.*Trident/6\.0.*\).*$@'=>1303, - '@^Mozilla/5\.0 ArchLinux \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Chrome/.*$@'=>1304, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>1305, - '@^Mozilla/5\.0 \(.*Linux.*Android.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/4\.0.*$@'=>1306, - '@^Mozilla/5\.0 \(.*Windows.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.* Safari/.*$@'=>1307, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows NT 10\.0.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:2:{s:2:"@7";i:1308;s:2:"@8";i:1309;}', - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Version/1(\d)\.(\d).*$@'=>'a:4:{s:4:"@0|1";i:1310;s:4:"@0|0";i:1311;s:4:"@1|0";i:1312;s:4:"@0|2";i:1313;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.*$@'=>1314, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows NT 10\.0.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:5:{s:6:"@4|7|8";i:1315;s:6:"@4|8|7";i:1316;s:6:"@4|7|7";i:1317;s:6:"@4|9|7";i:1318;s:6:"@5|9|7";i:1322;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows NT 6\.(\d).*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:4:{s:4:"@3|8";i:1319;s:4:"@3|7";i:1320;s:4:"@4|8";i:1321;s:4:"@4|7";i:1323;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*; rv\:(\d)(\d).*\) Gecko.* Firefox/(\d)(\d).*anonymized by .*$@'=>'a:102:{s:10:"@1|4|0|4|0";i:1324;s:10:"@2|3|4|3|4";i:1325;s:10:"@2|3|0|3|0";i:1326;s:10:"@2|3|7|3|7";i:1327;s:10:"@1|3|9|3|9";i:1328;s:10:"@1|3|2|3|2";i:1329;s:10:"@1|3|4|3|4";i:1330;s:10:"@0|3|4|3|4";i:1331;s:10:"@0|4|0|4|0";i:1332;s:10:"@1|3|3|3|3";i:1333;s:10:"@2|5|7|5|7";i:1334;s:10:"@0|3|3|3|3";i:1335;s:10:"@0|3|8|3|8";i:1336;s:10:"@2|3|2|3|2";i:1337;s:10:"@2|3|9|3|9";i:1338;s:10:"@0|3|0|3|0";i:1339;s:10:"@2|3|3|3|3";i:1340;s:10:"@2|5|4|5|4";i:1341;s:10:"@2|3|8|3|8";i:1342;s:10:"@1|3|8|3|8";i:1343;s:10:"@2|5|8|5|8";i:1344;s:10:"@0|3|6|3|6";i:1345;s:10:"@1|3|6|3|6";i:1346;s:10:"@2|3|6|3|6";i:1347;s:10:"@0|3|1|3|1";i:1348;s:10:"@0|5|5|5|5";i:1349;s:10:"@0|5|8|5|8";i:1350;s:10:"@1|5|8|5|8";i:1351;s:10:"@1|3|1|3|1";i:1352;s:10:"@1|3|7|3|7";i:1353;s:10:"@0|3|5|3|5";i:1354;s:10:"@0|3|2|3|2";i:1355;s:10:"@0|3|7|3|7";i:1356;s:10:"@1|3|5|3|5";i:1357;s:10:"@2|3|5|3|5";i:1358;s:10:"@2|3|1|3|1";i:1359;s:10:"@1|3|0|3|0";i:1360;s:10:"@0|3|9|3|9";i:1361;s:10:"@1|5|7|5|7";i:1362;s:10:"@1|5|0|5|0";i:1363;s:10:"@2|4|0|4|0";i:1364;s:10:"@1|6|1|6|1";i:1365;s:10:"@1|5|5|5|5";i:1366;s:10:"@0|6|2|6|2";i:1367;s:10:"@2|5|0|5|0";i:1368;s:10:"@1|6|2|6|2";i:1369;s:10:"@0|5|4|5|4";i:1370;s:10:"@0|5|0|5|0";i:1371;s:10:"@0|6|0|6|0";i:1372;s:10:"@1|4|9|4|9";i:1373;s:10:"@2|5|9|5|9";i:1374;s:10:"@1|6|0|6|0";i:1375;s:10:"@2|4|9|4|9";i:1376;s:10:"@0|6|1|6|1";i:1377;s:10:"@2|6|0|6|0";i:1378;s:10:"@0|5|7|5|7";i:1379;s:10:"@2|6|2|6|2";i:1380;s:10:"@0|5|6|5|6";i:1381;s:10:"@1|5|2|5|2";i:1382;s:10:"@1|5|6|5|6";i:1383;s:10:"@2|5|2|5|2";i:1384;s:10:"@0|5|3|5|3";i:1385;s:10:"@1|5|3|5|3";i:1386;s:10:"@2|5|5|5|5";i:1387;s:10:"@0|5|2|5|2";i:1388;s:10:"@2|5|3|5|3";i:1389;s:10:"@1|6|3|6|3";i:1390;s:10:"@0|5|1|5|1";i:1391;s:10:"@0|6|3|6|3";i:1392;s:10:"@2|6|3|6|3";i:1393;s:10:"@1|5|1|5|1";i:1394;s:10:"@2|5|6|5|6";i:1395;s:10:"@2|5|1|5|1";i:1396;s:10:"@0|4|9|4|9";i:1397;s:10:"@2|6|1|6|1";i:1398;s:10:"@0|4|5|4|5";i:1399;s:10:"@2|4|4|4|4";i:1400;s:10:"@1|4|4|4|4";i:1401;s:10:"@1|4|5|4|5";i:1402;s:10:"@2|4|5|4|5";i:1403;s:10:"@1|4|6|4|6";i:1404;s:10:"@0|4|6|4|6";i:1405;s:10:"@2|4|3|4|3";i:1406;s:10:"@1|4|3|4|3";i:1407;s:10:"@2|4|1|4|1";i:1408;s:10:"@1|4|1|4|1";i:1409;s:10:"@0|4|1|4|1";i:1410;s:10:"@0|4|2|4|2";i:1411;s:10:"@1|4|2|4|2";i:1412;s:10:"@0|4|3|4|3";i:1413;s:10:"@2|4|2|4|2";i:1414;s:10:"@2|4|6|4|6";i:1415;s:10:"@0|4|4|4|4";i:1416;s:10:"@2|4|8|4|8";i:1417;s:10:"@0|4|7|4|7";i:1418;s:10:"@0|5|9|5|9";i:1419;s:10:"@0|4|8|4|8";i:1420;s:10:"@1|4|8|4|8";i:1421;s:10:"@1|4|7|4|7";i:1422;s:10:"@1|5|9|5|9";i:1423;s:10:"@1|5|4|5|4";i:1424;s:10:"@2|4|7|4|7";i:1425;}', - '@^Mozilla/5\.0 \(.*Linux.*\).*applewebkit.* \(.*khtml.*like.*gecko.*\) Sabayon Chrome/.*$@'=>1426, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) .*Version/(\d)\.(\d).*$@'=>'a:8:{s:4:"@7|0";i:1427;s:4:"@6|0";i:1428;s:4:"@6|2";i:1429;s:4:"@6|1";i:1430;s:4:"@9|0";i:1431;s:4:"@7|1";i:1432;s:4:"@9|1";i:1433;s:4:"@8|0";i:1434;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.*$@'=>'a:5:{s:2:"@1";i:1435;s:2:"@4";i:1436;s:2:"@2";i:1437;s:2:"@0";i:1438;s:2:"@3";i:1439;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*Safari/.*$@'=>1440, - '@^Mozilla/5\.0 \(.*Linux.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.* Safari/.*$@'=>1441, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows NT 6\.(\d).*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:10:{s:8:"@4|7|3|8";i:1442;s:8:"@4|7|4|8";i:1443;s:8:"@4|9|3|7";i:1444;s:8:"@4|8|3|7";i:1445;s:8:"@4|7|3|7";i:1446;s:8:"@4|7|4|7";i:1447;s:8:"@4|8|4|7";i:1448;s:8:"@5|9|4|7";i:1449;s:8:"@5|9|3|7";i:1450;s:8:"@4|9|4|7";i:1451;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*WOW64.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:2:{s:2:"@8";i:1452;s:2:"@7";i:1453;}', - '@^Mozilla/5\.0 \(.*Android.*Mobile.*\).*Gecko.*Firefox/.* anonymized by Abelssoft.*$@'=>1454, - '@^Mozilla/5\.0 \(.*Android.*Tablet.*\).*Gecko.*Firefox/.* anonymized by Abelssoft.*$@'=>1455, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0.*; .*Windows NT 6\.1.*Trident/(\d)\.(\d); Xbox.*$@'=>'a:2:{s:8:"@4|7|3|1";i:1456;s:8:"@5|9|5|0";i:1457;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*WOW64.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:5:{s:6:"@4|9|7";i:1458;s:6:"@4|7|8";i:1459;s:6:"@5|9|7";i:1460;s:6:"@4|8|7";i:1461;s:6:"@4|7|7";i:1462;}', - '@^Mozilla/5\.0 \(X11; \) applewebkit.* \(.*khtml.*like.*gecko.*\) Chrome/.*Safari/.*$@'=>1463, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Safari/(\d)(\d)(\d).*$@'=>'a:9:{s:6:"@1|6|2";i:1464;s:6:"@4|1|2";i:1465;s:6:"@4|1|9";i:1466;s:6:"@1|5|8";i:1467;s:6:"@4|1|7";i:1468;s:6:"@3|1|2";i:1469;s:6:"@1|4|6";i:1470;s:6:"@1|0|0";i:1471;s:6:"@1|2|5";i:1472;}', - '@^Mozilla/5\.0 \(.*Linux.*Android.*\) applewebkit.* \(.*khtml.*like.*gecko.*\).*CrMo/.*$@'=>1473, - '@^Mozilla/5\.0 \(.*Windows NT 6\.0.*; rv\:(\d)(\d).*\) Gecko.* Firefox anonymized by .*$@'=>'a:23:{s:4:"@5|2";i:1474;s:4:"@3|8";i:1475;s:4:"@3|7";i:1476;s:4:"@3|9";i:1477;s:4:"@3|3";i:1478;s:4:"@5|0";i:1479;s:4:"@3|5";i:1480;s:4:"@3|4";i:1481;s:4:"@3|6";i:1482;s:4:"@5|1";i:1483;s:4:"@4|6";i:1484;s:4:"@4|7";i:1485;s:4:"@4|8";i:1486;s:4:"@4|9";i:1487;s:4:"@4|5";i:1488;s:4:"@3|2";i:1489;s:4:"@4|2";i:1490;s:4:"@4|3";i:1491;s:4:"@4|4";i:1492;s:4:"@4|1";i:1493;s:4:"@4|0";i:1494;s:4:"@3|0";i:1495;s:4:"@3|1";i:1496;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*x64.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:2:{s:2:"@8";i:1497;s:2:"@7";i:1498;}', - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) Safari/85.*$@'=>1499, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*x64.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:5:{s:6:"@4|8|7";i:1500;s:6:"@5|9|7";i:1501;s:6:"@4|9|7";i:1502;s:6:"@4|7|8";i:1503;s:6:"@4|7|7";i:1504;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*; rv\:.*\) Gecko.* Firefox/.*anonymized by .*$@'=>'a:2:{s:2:"@0";i:1505;s:2:"@1";i:1506;}', - '@^Mozilla/5\.0 \(Windows NT 6\.2; ARM; Trident/(\d)\.0.*rv\:11\.0; WPDesktop; .*$@'=>'a:2:{s:2:"@8";i:1507;s:2:"@7";i:1508;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows NT 10\.0.*Trident/8\.0.*\).*$@'=>1509, - '@^Mozilla/5\.0 \(.*Windows NT 6\.0.*; rv\:.*\) Gecko.* Firefox anonymized by .*$@'=>1510, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.*\(.*khtml.*like.*gecko.*\).*Version/.*$@'=>1511, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0.*; Trident/6\.0; .*Windows NT 6\.1.*$@'=>1512, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows NT 6\.(\d).*Trident/8\.0.*\).*$@'=>'a:3:{s:2:"@3";i:1513;s:2:"@1";i:1515;s:2:"@4";i:1518;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows NT 10\.0.*Trident/8\.0.*\).*$@'=>'a:5:{s:4:"@5|7";i:1514;s:4:"@4|8";i:1516;s:4:"@4|9";i:1517;s:4:"@4|7";i:1519;s:4:"@5|9";i:1520;}', - '@^Mozilla/5\.0 \(.*Mac OS X.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.*$@'=>1521, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows NT 10\.0.*Trident/7\.0.*$@'=>1522, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows NT 6\.(\d).*Trident/(\d)\.0.*\).*$@'=>'a:23:{s:8:"@4|9|3|8";i:1523;s:8:"@5|9|1|8";i:1524;s:8:"@5|9|3|8";i:1525;s:8:"@4|8|4|8";i:1526;s:8:"@4|8|1|8";i:1527;s:8:"@4|7|1|5";i:1528;s:8:"@5|9|4|8";i:1529;s:8:"@4|9|4|8";i:1530;s:8:"@4|8|3|8";i:1531;s:8:"@5|7|4|8";i:1532;s:8:"@5|7|0|5";i:1533;s:8:"@4|7|3|8";i:1534;s:8:"@4|7|4|8";i:1535;s:8:"@4|8|1|5";i:1536;s:8:"@4|9|1|8";i:1537;s:8:"@4|8|0|5";i:1538;s:8:"@5|7|1|5";i:1539;s:8:"@5|8|1|5";i:1540;s:8:"@4|7|0|5";i:1541;s:8:"@5|7|3|8";i:1542;s:8:"@5|7|1|8";i:1543;s:8:"@4|7|1|8";i:1544;s:8:"@5|8|0|5";i:1545;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) Gecko.* Firefox/(\d)(\d)\.0.* Anonymisiert.*$@'=>'a:38:{s:6:"@1|4|6";i:1546;s:6:"@1|5|9";i:1547;s:6:"@1|4|0";i:1548;s:6:"@1|3|0";i:1549;s:6:"@1|4|3";i:1550;s:6:"@1|3|2";i:1551;s:6:"@1|5|2";i:1552;s:6:"@2|5|2";i:1553;s:6:"@1|5|8";i:1554;s:6:"@1|4|2";i:1555;s:6:"@1|4|1";i:1556;s:6:"@1|4|5";i:1557;s:6:"@1|3|9";i:1558;s:6:"@1|5|7";i:1559;s:6:"@1|5|6";i:1560;s:6:"@1|5|1";i:1561;s:6:"@1|4|8";i:1562;s:6:"@1|3|6";i:1564;s:6:"@1|6|1";i:1565;s:6:"@1|4|7";i:1566;s:6:"@1|6|2";i:1567;s:6:"@1|5|4";i:1568;s:6:"@2|5|1";i:1569;s:6:"@1|3|4";i:1570;s:6:"@1|3|5";i:1571;s:6:"@2|4|9";i:1572;s:6:"@1|4|9";i:1574;s:6:"@1|6|3";i:1575;s:6:"@1|3|3";i:1576;s:6:"@1|3|1";i:1577;s:6:"@1|6|0";i:1579;s:6:"@1|5|5";i:1580;s:6:"@1|4|4";i:1581;s:6:"@1|5|3";i:1582;s:6:"@1|3|7";i:1583;s:6:"@2|5|0";i:1584;s:6:"@1|3|8";i:1585;s:6:"@1|5|0";i:1586;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:2:{s:2:"@8";i:1563;s:2:"@7";i:1573;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*WOW64.*Trident/8\.0.*\).*$@'=>1578, - '@^Mozilla/5\.0 \(.*Windows.*; rv\:(\d)(\d).*\) Gecko.* Firefox/(\d)(\d).*anonymized by .*$@'=>'a:34:{s:8:"@4|9|4|9";i:1587;s:8:"@4|8|4|8";i:1588;s:8:"@6|2|6|2";i:1589;s:8:"@4|4|4|4";i:1590;s:8:"@5|0|5|0";i:1591;s:8:"@4|6|4|6";i:1592;s:8:"@5|8|5|8";i:1593;s:8:"@6|3|6|3";i:1594;s:8:"@6|0|6|0";i:1595;s:8:"@6|1|6|1";i:1596;s:8:"@4|5|4|5";i:1597;s:8:"@5|1|5|1";i:1598;s:8:"@4|7|4|7";i:1599;s:8:"@5|9|5|9";i:1600;s:8:"@3|0|3|0";i:1601;s:8:"@3|9|3|9";i:1602;s:8:"@3|3|3|3";i:1603;s:8:"@4|3|4|3";i:1604;s:8:"@3|4|3|4";i:1605;s:8:"@5|6|5|6";i:1606;s:8:"@5|5|5|5";i:1607;s:8:"@5|2|5|2";i:1608;s:8:"@5|4|5|4";i:1609;s:8:"@3|1|3|1";i:1610;s:8:"@3|7|3|7";i:1611;s:8:"@3|8|3|8";i:1612;s:8:"@3|2|3|2";i:1613;s:8:"@5|3|5|3";i:1614;s:8:"@3|6|3|6";i:1615;s:8:"@4|2|4|2";i:1616;s:8:"@3|5|3|5";i:1617;s:8:"@4|0|4|0";i:1618;s:8:"@4|1|4|1";i:1619;s:8:"@5|7|5|7";i:1620;}', - '@^.*Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/8\.0.*rv\:11.*IEMobile.11\.0.*$@'=>1621, - '@^Mozilla/5\.0 \(.*Mac OS X.*\) applewebkit.*\(.*khtml.*like.*gecko.*\).*Safari.*$@'=>1622, - '@^Mozilla/(\d)\.0 \(.*Windows.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.*$@'=>'a:2:{s:2:"@4";i:1623;s:2:"@5";i:1624;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows NT 10\.0.*Trident/7\.0.*$@'=>'a:6:{s:4:"@5|8";i:1625;s:4:"@4|7";i:1626;s:4:"@4|9";i:1627;s:4:"@5|7";i:1630;s:4:"@4|8";i:1632;s:4:"@5|9";i:1633;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows NT 6\.(\d).*Trident/7\.0.*$@'=>'a:3:{s:2:"@3";i:1628;s:2:"@1";i:1629;s:2:"@4";i:1631;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0.*; .*Windows NT 6\.(\d).*Trident/(\d)\.0.*$@'=>'a:8:{s:8:"@5|9|1|5";i:1634;s:8:"@5|9|0|5";i:1635;s:8:"@4|8|1|4";i:1637;s:8:"@4|8|0|4";i:1638;s:8:"@5|8|0|4";i:1639;s:8:"@4|9|0|5";i:1641;s:8:"@5|8|1|4";i:1642;s:8:"@4|9|1|5";i:1643;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0.*Windows NT 6\.(\d).*Trident/6\.0.*\).*$@'=>'a:2:{s:2:"@1";i:1636;s:2:"@2";i:1640;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*Trident/(\d)\.0.*Touch.*\).*$@'=>'a:5:{s:6:"@4|8|7";i:1644;s:6:"@4|9|7";i:1646;s:6:"@5|9|7";i:1647;s:6:"@4|7|7";i:1651;s:6:"@4|7|8";i:1657;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*WOW64.*Trident/(\d)\.0.*\).*$@'=>'a:9:{s:6:"@5|7|8";i:1645;s:6:"@4|8|8";i:1648;s:6:"@4|7|8";i:1649;s:6:"@4|7|5";i:1650;s:6:"@4|9|8";i:1652;s:6:"@4|8|5";i:1653;s:6:"@5|8|5";i:1654;s:6:"@5|7|5";i:1655;s:6:"@5|9|8";i:1656;}', - '@^Mozilla/5\.0.*\(.*Windows Phone 8\.1.*Trident/(\d)\.0.*rv\:11.*IEMobile.11\.0.*$@'=>'a:2:{s:2:"@7";i:1658;s:2:"@8";i:1659;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows NT 6\.(\d).*Trident/(\d)\.0.*$@'=>'a:22:{s:8:"@5|7|1|4";i:1660;s:8:"@4|7|0|4";i:1661;s:8:"@4|7|1|4";i:1662;s:8:"@4|8|3|7";i:1663;s:8:"@5|9|3|7";i:1664;s:8:"@5|9|4|7";i:1665;s:8:"@5|8|3|7";i:1666;s:8:"@5|9|1|7";i:1667;s:8:"@4|9|4|7";i:1668;s:8:"@4|9|1|7";i:1669;s:8:"@4|9|3|7";i:1670;s:8:"@5|8|4|7";i:1671;s:8:"@4|8|1|7";i:1672;s:8:"@5|7|0|4";i:1673;s:8:"@4|7|1|7";i:1674;s:8:"@4|7|3|7";i:1675;s:8:"@5|7|4|7";i:1676;s:8:"@5|7|3|7";i:1677;s:8:"@4|8|4|7";i:1678;s:8:"@5|7|1|7";i:1679;s:8:"@4|7|4|7";i:1680;s:8:"@5|8|1|7";i:1681;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*WOW64.*Trident/7\.0.*$@'=>1682, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*x64.*Trident/8\.0.*\).*$@'=>1683, - '@^Mozilla/5\.0 \(.*Linux.*\).*applewebkit.*\(.*khtml.*like.*gecko.*\).*Chrome/.*$@'=>1684, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\..*Windows NT 6\.(\d).*Trident/6\.0.*\).*$@'=>'a:12:{s:6:"@5|8|2";i:1685;s:6:"@4|8|1";i:1686;s:6:"@5|8|1";i:1690;s:6:"@4|8|2";i:1691;s:6:"@4|7|1";i:1692;s:6:"@5|7|1";i:1693;s:6:"@5|7|2";i:1696;s:6:"@4|7|2";i:1697;s:6:"@4|9|2";i:1698;s:6:"@4|9|1";i:1700;s:6:"@5|9|1";i:1701;s:6:"@5|9|2";i:1704;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*WOW64.*Trident/(\d)\.0.*$@'=>'a:8:{s:6:"@5|7|7";i:1687;s:6:"@4|7|4";i:1688;s:6:"@5|9|7";i:1689;s:6:"@4|9|7";i:1694;s:6:"@5|8|7";i:1695;s:6:"@4|8|7";i:1699;s:6:"@5|7|4";i:1702;s:6:"@4|7|7";i:1703;}', - '@^Mozilla/5\.0 \(.*Windows.*; rv\:(\d)(\d).*\) Gecko.* Firefox anonymized by .*$@'=>'a:34:{s:4:"@4|6";i:1705;s:4:"@4|5";i:1707;s:4:"@3|9";i:1708;s:4:"@3|8";i:1711;s:4:"@4|1";i:1712;s:4:"@4|0";i:1713;s:4:"@4|2";i:1714;s:4:"@4|4";i:1715;s:4:"@4|3";i:1717;s:4:"@3|7";i:1718;s:4:"@5|0";i:1719;s:4:"@5|1";i:1720;s:4:"@5|2";i:1721;s:4:"@5|3";i:1723;s:4:"@3|1";i:1724;s:4:"@5|6";i:1725;s:4:"@5|7";i:1726;s:4:"@4|8";i:1727;s:4:"@3|2";i:1728;s:4:"@3|3";i:1729;s:4:"@5|5";i:1730;s:4:"@3|0";i:1731;s:4:"@5|8";i:1732;s:4:"@6|1";i:1733;s:4:"@6|2";i:1734;s:4:"@6|3";i:1735;s:4:"@6|0";i:1736;s:4:"@4|9";i:1737;s:4:"@5|9";i:1738;s:4:"@5|4";i:1739;s:4:"@4|7";i:1740;s:4:"@3|5";i:1741;s:4:"@3|6";i:1743;s:4:"@3|4";i:1745;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*x64.*Trident/(\d)\.0.*\).*$@'=>'a:9:{s:6:"@4|9|8";i:1706;s:6:"@5|9|8";i:1709;s:6:"@4|8|8";i:1710;s:6:"@4|7|8";i:1716;s:6:"@5|7|8";i:1722;s:6:"@4|7|5";i:1742;s:6:"@4|8|5";i:1744;s:6:"@5|7|5";i:1746;s:6:"@5|8|5";i:1747;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.* \(.*khtml.*like.*gecko.*\) HbbTV.*$@'=>1748, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*x64.*Trident/7\.0.*$@'=>1749, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\..*Windows.*WOW64.*Trident/6\.0.*\).*$@'=>'a:6:{s:4:"@4|9";i:1750;s:4:"@5|9";i:1751;s:4:"@5|8";i:1752;s:4:"@4|8";i:1753;s:4:"@5|7";i:1754;s:4:"@4|7";i:1755;}', - '@^Mozilla/5\.0 \(.*Windows.*; rv\:.*\) Gecko.* Firefox/.*anonymized by .*$@'=>1756, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*x64.*Trident/(\d)\.0.*$@'=>'a:8:{s:6:"@5|8|7";i:1757;s:6:"@4|9|7";i:1758;s:6:"@5|7|4";i:1759;s:6:"@4|7|4";i:1760;s:6:"@5|9|7";i:1761;s:6:"@4|8|7";i:1762;s:6:"@4|7|7";i:1763;s:6:"@5|7|7";i:1764;}', - '@^Mozilla/5\.0 \(.*Windows.*; rv\:.*\) Gecko.* Firefox anonymized by .*$@'=>1765, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0.*; Trident/6\.0; .*Windows.*$@'=>1766, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*Trident/8\.0.*\).*$@'=>1767, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\..*Windows.*x64.*Trident/6\.0.*\).*$@'=>'a:6:{s:4:"@5|9";i:1768;s:4:"@4|8";i:1769;s:4:"@4|9";i:1770;s:4:"@4|7";i:1771;s:4:"@5|7";i:1772;s:4:"@5|8";i:1773;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*Trident/(\d)\.0.*\).*$@'=>'a:9:{s:6:"@5|8|5";i:1774;s:6:"@5|7|8";i:1775;s:6:"@4|9|8";i:1776;s:6:"@5|7|5";i:1777;s:6:"@4|7|5";i:1778;s:6:"@4|8|8";i:1780;s:6:"@4|8|5";i:1781;s:6:"@4|7|8";i:1782;s:6:"@5|9|8";i:1783;}', - '@^Mozilla/5\.0 \(.*Linux.*\) applewebkit.*THOMSON; Thomson THS845.*$@'=>1779, - '@^Mozilla/5\.0 \(.*Windows.*\) Gecko.* Firefox/(\d)(\d)\.0.* Anonymisiert.*$@'=>'a:34:{s:4:"@5|2";i:1784;s:4:"@5|8";i:1785;s:4:"@5|7";i:1786;s:4:"@5|5";i:1787;s:4:"@4|4";i:1788;s:4:"@5|0";i:1789;s:4:"@3|0";i:1790;s:4:"@4|9";i:1791;s:4:"@4|3";i:1793;s:4:"@3|3";i:1794;s:4:"@4|6";i:1795;s:4:"@4|8";i:1796;s:4:"@3|2";i:1797;s:4:"@4|5";i:1798;s:4:"@5|6";i:1799;s:4:"@3|6";i:1800;s:4:"@3|1";i:1802;s:4:"@3|7";i:1803;s:4:"@4|0";i:1805;s:4:"@3|5";i:1806;s:4:"@3|8";i:1807;s:4:"@6|3";i:1809;s:4:"@4|7";i:1810;s:4:"@3|4";i:1811;s:4:"@6|1";i:1813;s:4:"@3|9";i:1814;s:4:"@4|2";i:1816;s:4:"@5|4";i:1817;s:4:"@4|1";i:1818;s:4:"@5|1";i:1819;s:4:"@6|0";i:1820;s:4:"@5|3";i:1821;s:4:"@5|9";i:1822;s:4:"@6|2";i:1823;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*; rv\:1\.9\.(\d).*\) Gecko.* Firefox .*$@'=>'a:6:{s:4:"@2|2";i:1792;s:4:"@0|2";i:1801;s:4:"@1|2";i:1804;s:4:"@1|1";i:1808;s:4:"@0|1";i:1812;s:4:"@2|1";i:1815;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*Trident/7\.0.*Touch.*rv\:11\.0.*\).*$@'=>1824, - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0; .*Windows.*Trident/7\.0.*$@'=>1825, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0.*; .*Windows.*Trident/(\d)\.0.*$@'=>'a:4:{s:6:"@5|8|4";i:1826;s:6:"@4|8|4";i:1827;s:6:"@5|9|5";i:1829;s:6:"@4|9|5";i:1830;}', - '@^Mozilla/5\.0 \(compatible; MSIE 10\.0.*Windows.*Trident/6\.0.*\).*$@'=>1828, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*Trident/7\.0.*Touch.*rv\:11\.0.*\).*$@'=>'a:2:{s:2:"@3";i:1831;s:2:"@4";i:1832;}', - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0; .*Windows.*Trident/(\d)\.0.*$@'=>'a:8:{s:6:"@4|8|7";i:1833;s:6:"@5|9|7";i:1834;s:6:"@5|7|7";i:1835;s:6:"@4|9|7";i:1836;s:6:"@4|7|4";i:1837;s:6:"@5|8|7";i:1838;s:6:"@4|7|7";i:1839;s:6:"@5|7|4";i:1840;}', - '@^Mozilla/5\.0; TOB.* \(.*Windows NT 10\.0.*Trident/7\.0.*rv\:11\.0.*$@'=>1841, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\..*Windows.*Trident/6\.0.*\).*$@'=>'a:6:{s:4:"@4|8";i:1842;s:4:"@5|8";i:1843;s:4:"@4|9";i:1844;s:4:"@4|7";i:1845;s:4:"@5|7";i:1846;s:4:"@5|9";i:1847;}', - '@^Mozilla/5\.0; TOB.* \(.*Windows NT 6\.(\d).*Trident/7\.0.*rv\:11\.0.*$@'=>'a:3:{s:2:"@4";i:1848;s:2:"@3";i:1849;s:2:"@1";i:1850;}', - '@^Mozilla/5\.0 \(.*MSIE 9\.0.*; .*Windows NT 6\.(\d).*Trident/5\.0.*\).*$@'=>'a:2:{s:2:"@0";i:1851;s:2:"@1";i:1852;}', - '@^Mozilla/5\.0 \(masking\-agent; rv\:.*\) Gecko.* Firefox/(\d)(\d)\.0.*$@'=>'a:34:{s:4:"@6|0";i:1853;s:4:"@5|1";i:1854;s:4:"@6|2";i:1855;s:4:"@5|0";i:1856;s:4:"@6|3";i:1857;s:4:"@6|1";i:1858;s:4:"@3|0";i:1859;s:4:"@5|8";i:1860;s:4:"@3|3";i:1861;s:4:"@5|6";i:1862;s:4:"@4|8";i:1863;s:4:"@3|1";i:1864;s:4:"@5|7";i:1865;s:4:"@4|9";i:1866;s:4:"@3|2";i:1867;s:4:"@5|5";i:1868;s:4:"@5|9";i:1869;s:4:"@3|4";i:1870;s:4:"@4|5";i:1871;s:4:"@4|7";i:1872;s:4:"@5|2";i:1873;s:4:"@4|6";i:1874;s:4:"@3|7";i:1875;s:4:"@5|4";i:1876;s:4:"@3|6";i:1877;s:4:"@4|3";i:1878;s:4:"@4|4";i:1879;s:4:"@4|2";i:1880;s:4:"@4|0";i:1881;s:4:"@4|1";i:1882;s:4:"@5|3";i:1883;s:4:"@3|5";i:1884;s:4:"@3|9";i:1885;s:4:"@3|8";i:1886;}', - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0b.*; .*Windows NT 6\.0.*$@'=>1887, - '@^Mozilla/5\.0 \(.*Windows.*\) Gecko.* Firefox/.* Anonymisiert.*$@'=>1888, - '@^Mozilla/(\d)\.0 \(compatible; MSIE 10\.0.*; .*Windows NT 6\.(\d).*$@'=>'a:4:{s:4:"@4|1";i:1889;s:4:"@4|2";i:1890;s:4:"@5|2";i:1891;s:4:"@5|1";i:1892;}', - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0.*; .*Windows NT 6\.0.*$@'=>1893, - '@^Mozilla/5\.0 \(Windows 95; Anonymisiert.*; Trident/7\.0.*$@'=>1894, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0.*; .*Windows NT 6\.(\d).*$@'=>'a:9:{s:6:"@5|7|0";i:1895;s:6:"@5|8|0";i:1896;s:6:"@5|8|1";i:1897;s:6:"@4|8|1";i:1898;s:6:"@4|8|0";i:1899;s:6:"@5|9|0";i:1900;s:6:"@4|9|1";i:1901;s:6:"@5|9|1";i:1902;s:6:"@4|9|0";i:1903;}', - '@^Mozilla/(\d)\.0 \(.*Windows NT 10\.0.*\) Gecko.* Firefox/(\d)(\d)\.0.*$@'=>'a:68:{s:6:"@4|6|0";i:1904;s:6:"@5|3|7";i:1905;s:6:"@5|5|0";i:1906;s:6:"@5|5|9";i:1907;s:6:"@4|3|3";i:1908;s:6:"@4|3|7";i:1909;s:6:"@5|5|8";i:1910;s:6:"@5|4|9";i:1911;s:6:"@5|5|2";i:1912;s:6:"@5|6|0";i:1913;s:6:"@4|5|9";i:1914;s:6:"@4|5|2";i:1915;s:6:"@4|4|2";i:1916;s:6:"@4|3|4";i:1917;s:6:"@5|6|1";i:1918;s:6:"@4|6|1";i:1919;s:6:"@4|4|1";i:1920;s:6:"@4|4|0";i:1921;s:6:"@5|3|3";i:1922;s:6:"@5|4|0";i:1923;s:6:"@5|3|9";i:1924;s:6:"@4|3|9";i:1925;s:6:"@4|3|8";i:1926;s:6:"@4|5|8";i:1927;s:6:"@4|5|0";i:1928;s:6:"@5|3|8";i:1929;s:6:"@4|6|2";i:1930;s:6:"@5|4|1";i:1931;s:6:"@5|3|4";i:1932;s:6:"@5|4|2";i:1933;s:6:"@5|5|1";i:1934;s:6:"@5|3|5";i:1935;s:6:"@4|4|6";i:1936;s:6:"@4|3|1";i:1937;s:6:"@5|4|5";i:1938;s:6:"@4|5|5";i:1939;s:6:"@5|5|5";i:1940;s:6:"@5|5|4";i:1941;s:6:"@5|3|1";i:1942;s:6:"@5|4|7";i:1943;s:6:"@4|4|7";i:1944;s:6:"@4|3|2";i:1945;s:6:"@4|5|3";i:1946;s:6:"@5|3|2";i:1947;s:6:"@5|3|6";i:1948;s:6:"@4|3|6";i:1949;s:6:"@4|4|5";i:1950;s:6:"@4|5|4";i:1951;s:6:"@4|5|7";i:1952;s:6:"@4|3|0";i:1953;s:6:"@5|4|8";i:1954;s:6:"@5|5|7";i:1955;s:6:"@5|5|3";i:1956;s:6:"@5|4|3";i:1957;s:6:"@4|3|5";i:1958;s:6:"@5|3|0";i:1959;s:6:"@4|5|1";i:1960;s:6:"@4|4|8";i:1961;s:6:"@5|4|4";i:1962;s:6:"@4|4|4";i:1963;s:6:"@5|4|6";i:1964;s:6:"@5|5|6";i:1965;s:6:"@4|5|6";i:1966;s:6:"@4|4|3";i:1967;s:6:"@4|4|9";i:1968;s:6:"@5|6|3";i:1969;s:6:"@4|6|3";i:1970;s:6:"@5|6|2";i:1971;}', - '@^Mozilla/5\.0 \(iPhone.*CPU iPhone OS .* like Mac OS X.*\).*$@'=>1972, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) Gecko.*/.*Mozilla/5\.0.*$@'=>1973, - '@^Mozilla/(\d)\.0 \(.*Windows NT 6\.(\d).*\) Gecko.* Firefox/(\d)(\d)\.0.*$@'=>'a:318:{s:8:"@5|1|4|0";i:1974;s:8:"@5|0|4|0";i:1975;s:8:"@4|4|4|0";i:1976;s:8:"@4|3|4|0";i:1977;s:8:"@5|2|4|0";i:1978;s:8:"@5|3|4|0";i:1979;s:8:"@5|2|5|2";i:1980;s:8:"@5|2|3|6";i:1981;s:8:"@5|3|5|2";i:1982;s:8:"@5|4|5|2";i:1983;s:8:"@4|2|4|0";i:1984;s:8:"@4|1|4|0";i:1985;s:8:"@5|1|5|3";i:1986;s:8:"@5|2|5|3";i:1987;s:8:"@5|3|5|3";i:1988;s:8:"@5|4|5|3";i:1989;s:8:"@5|4|3|9";i:1990;s:8:"@4|4|5|3";i:1991;s:8:"@4|0|4|0";i:1992;s:8:"@4|1|5|3";i:1993;s:8:"@4|2|5|3";i:1994;s:8:"@4|3|5|3";i:1995;s:8:"@5|1|5|2";i:1996;s:8:"@5|0|5|2";i:1997;s:8:"@5|4|4|1";i:1998;s:8:"@5|3|4|1";i:1999;s:8:"@5|2|4|1";i:2000;s:8:"@5|1|4|1";i:2001;s:8:"@4|0|4|2";i:2002;s:8:"@5|1|3|6";i:2003;s:8:"@4|4|4|2";i:2004;s:8:"@4|3|4|2";i:2005;s:8:"@4|2|4|2";i:2006;s:8:"@4|1|4|2";i:2007;s:8:"@5|0|4|1";i:2008;s:8:"@4|4|4|1";i:2009;s:8:"@4|2|5|2";i:2010;s:8:"@4|3|5|2";i:2011;s:8:"@4|4|5|2";i:2012;s:8:"@4|0|4|1";i:2013;s:8:"@4|1|5|2";i:2014;s:8:"@4|0|5|2";i:2015;s:8:"@4|3|4|1";i:2016;s:8:"@4|2|4|1";i:2017;s:8:"@4|1|4|1";i:2018;s:8:"@5|3|3|9";i:2019;s:8:"@5|1|3|9";i:2020;s:8:"@5|1|3|7";i:2021;s:8:"@5|0|3|7";i:2022;s:8:"@4|1|5|5";i:2023;s:8:"@4|2|5|5";i:2024;s:8:"@5|2|3|7";i:2025;s:8:"@5|3|3|7";i:2026;s:8:"@4|2|3|8";i:2027;s:8:"@4|1|3|8";i:2028;s:8:"@4|0|3|8";i:2029;s:8:"@5|4|3|7";i:2030;s:8:"@4|3|5|5";i:2031;s:8:"@4|4|5|5";i:2032;s:8:"@5|4|5|5";i:2033;s:8:"@4|2|3|7";i:2034;s:8:"@4|1|3|7";i:2035;s:8:"@4|0|3|7";i:2036;s:8:"@5|3|5|5";i:2037;s:8:"@5|2|5|5";i:2038;s:8:"@5|3|3|6";i:2039;s:8:"@4|4|3|7";i:2040;s:8:"@4|3|3|7";i:2041;s:8:"@5|1|5|5";i:2042;s:8:"@4|3|3|8";i:2043;s:8:"@4|4|3|8";i:2044;s:8:"@4|1|3|9";i:2045;s:8:"@4|0|3|9";i:2046;s:8:"@5|4|3|8";i:2047;s:8:"@4|1|5|4";i:2048;s:8:"@4|2|3|9";i:2049;s:8:"@4|3|3|9";i:2050;s:8:"@5|4|3|6";i:2051;s:8:"@5|0|3|9";i:2052;s:8:"@5|4|5|1";i:2053;s:8:"@4|4|3|9";i:2054;s:8:"@4|2|5|4";i:2055;s:8:"@4|3|5|4";i:2056;s:8:"@5|3|5|4";i:2057;s:8:"@5|4|5|4";i:2058;s:8:"@5|1|3|8";i:2059;s:8:"@5|0|3|8";i:2060;s:8:"@5|2|5|4";i:2061;s:8:"@5|1|5|4";i:2062;s:8:"@4|4|5|4";i:2063;s:8:"@5|3|3|8";i:2064;s:8:"@5|2|3|8";i:2065;s:8:"@5|2|3|9";i:2066;s:8:"@5|1|5|1";i:2067;s:8:"@4|0|4|6";i:2068;s:8:"@5|4|4|5";i:2069;s:8:"@4|0|4|9";i:2070;s:8:"@4|1|4|9";i:2071;s:8:"@4|1|4|6";i:2072;s:8:"@4|2|4|6";i:2073;s:8:"@5|1|4|6";i:2074;s:8:"@5|0|4|6";i:2075;s:8:"@4|4|4|6";i:2076;s:8:"@4|3|4|6";i:2077;s:8:"@4|2|4|9";i:2078;s:8:"@4|3|4|9";i:2079;s:8:"@5|3|4|9";i:2080;s:8:"@5|4|4|9";i:2081;s:8:"@5|1|4|5";i:2082;s:8:"@5|0|4|5";i:2083;s:8:"@5|2|4|9";i:2084;s:8:"@5|1|4|9";i:2085;s:8:"@4|4|4|9";i:2086;s:8:"@5|3|4|5";i:2087;s:8:"@5|2|4|5";i:2088;s:8:"@5|0|4|9";i:2089;s:8:"@5|2|4|6";i:2090;s:8:"@5|3|4|6";i:2091;s:8:"@4|3|4|8";i:2092;s:8:"@4|2|4|8";i:2093;s:8:"@4|1|4|8";i:2094;s:8:"@4|0|4|8";i:2095;s:8:"@4|4|4|8";i:2096;s:8:"@5|0|4|8";i:2097;s:8:"@5|4|4|8";i:2098;s:8:"@5|3|4|8";i:2099;s:8:"@5|2|4|8";i:2100;s:8:"@5|1|4|8";i:2101;s:8:"@5|1|6|2";i:2102;s:8:"@5|4|4|7";i:2103;s:8:"@4|2|4|7";i:2104;s:8:"@4|1|4|7";i:2105;s:8:"@4|0|4|7";i:2106;s:8:"@5|4|4|6";i:2107;s:8:"@4|3|4|7";i:2108;s:8:"@4|4|4|7";i:2109;s:8:"@5|3|4|7";i:2110;s:8:"@5|2|4|7";i:2111;s:8:"@5|1|4|7";i:2112;s:8:"@5|0|4|7";i:2113;s:8:"@4|4|4|5";i:2114;s:8:"@4|3|4|5";i:2115;s:8:"@4|2|4|3";i:2116;s:8:"@4|1|4|3";i:2117;s:8:"@4|0|4|3";i:2118;s:8:"@5|4|4|2";i:2119;s:8:"@4|3|4|3";i:2120;s:8:"@4|4|4|3";i:2121;s:8:"@5|3|4|3";i:2122;s:8:"@5|2|4|3";i:2123;s:8:"@5|1|4|3";i:2124;s:8:"@5|0|4|3";i:2125;s:8:"@5|3|4|2";i:2126;s:8:"@5|2|4|2";i:2127;s:8:"@5|0|4|2";i:2128;s:8:"@5|0|5|1";i:2129;s:8:"@5|0|3|6";i:2130;s:8:"@5|2|5|1";i:2131;s:8:"@4|4|5|1";i:2132;s:8:"@4|3|5|1";i:2133;s:8:"@5|1|4|2";i:2134;s:8:"@4|0|5|1";i:2135;s:8:"@4|1|5|1";i:2136;s:8:"@4|2|5|1";i:2137;s:8:"@5|4|4|3";i:2138;s:8:"@5|4|5|0";i:2139;s:8:"@5|1|4|4";i:2140;s:8:"@5|0|4|4";i:2141;s:8:"@4|4|4|4";i:2142;s:8:"@4|3|4|4";i:2143;s:8:"@5|2|4|4";i:2144;s:8:"@5|3|4|4";i:2145;s:8:"@4|2|4|5";i:2146;s:8:"@4|1|4|5";i:2147;s:8:"@4|0|4|5";i:2148;s:8:"@5|4|4|4";i:2149;s:8:"@4|2|4|4";i:2150;s:8:"@4|1|4|4";i:2151;s:8:"@5|0|5|0";i:2152;s:8:"@5|1|5|0";i:2153;s:8:"@5|2|5|0";i:2154;s:8:"@5|3|5|0";i:2155;s:8:"@4|4|5|0";i:2156;s:8:"@4|3|5|0";i:2157;s:8:"@4|0|4|4";i:2158;s:8:"@4|0|5|0";i:2159;s:8:"@4|1|5|0";i:2160;s:8:"@4|2|5|0";i:2161;s:8:"@5|3|5|1";i:2162;s:8:"@5|4|4|0";i:2163;s:8:"@4|1|3|2";i:2164;s:8:"@4|1|5|9";i:2165;s:8:"@4|2|5|9";i:2166;s:8:"@4|3|5|9";i:2167;s:8:"@4|2|3|2";i:2168;s:8:"@4|3|3|2";i:2169;s:8:"@5|2|6|3";i:2170;s:8:"@5|1|6|3";i:2171;s:8:"@4|4|3|2";i:2172;s:8:"@4|4|5|9";i:2173;s:8:"@4|0|3|2";i:2174;s:8:"@5|3|3|1";i:2175;s:8:"@5|2|3|1";i:2176;s:8:"@5|1|3|1";i:2177;s:8:"@5|4|3|1";i:2178;s:8:"@5|4|5|9";i:2179;s:8:"@5|1|5|9";i:2180;s:8:"@5|2|5|9";i:2181;s:8:"@5|3|5|9";i:2182;s:8:"@5|3|6|3";i:2183;s:8:"@5|0|3|2";i:2184;s:8:"@4|2|5|8";i:2185;s:8:"@4|3|5|8";i:2186;s:8:"@4|4|5|8";i:2187;s:8:"@4|1|3|3";i:2188;s:8:"@4|1|5|8";i:2189;s:8:"@4|2|3|3";i:2190;s:8:"@5|0|3|3";i:2191;s:8:"@4|4|3|3";i:2192;s:8:"@4|3|3|3";i:2193;s:8:"@5|1|5|8";i:2194;s:8:"@5|2|5|8";i:2195;s:8:"@5|3|3|2";i:2196;s:8:"@5|2|3|2";i:2197;s:8:"@5|1|3|2";i:2198;s:8:"@5|4|3|2";i:2199;s:8:"@4|0|3|3";i:2200;s:8:"@5|3|5|8";i:2201;s:8:"@5|4|5|8";i:2202;s:8:"@5|4|6|3";i:2203;s:8:"@5|0|3|1";i:2204;s:8:"@4|3|6|3";i:2205;s:8:"@4|2|6|1";i:2206;s:8:"@4|3|6|1";i:2207;s:8:"@4|4|6|1";i:2208;s:8:"@5|1|6|1";i:2209;s:8:"@4|1|6|1";i:2210;s:8:"@4|0|3|0";i:2211;s:8:"@4|3|3|0";i:2212;s:8:"@4|2|3|0";i:2213;s:8:"@4|1|3|0";i:2214;s:8:"@5|2|6|1";i:2215;s:8:"@5|3|6|1";i:2216;s:8:"@4|3|6|2";i:2217;s:8:"@4|4|6|2";i:2218;s:8:"@5|2|6|2";i:2219;s:8:"@4|2|6|2";i:2220;s:8:"@4|1|6|2";i:2221;s:8:"@5|4|6|1";i:2222;s:8:"@5|4|6|2";i:2223;s:8:"@5|3|6|2";i:2224;s:8:"@4|4|3|0";i:2225;s:8:"@5|0|3|0";i:2226;s:8:"@4|1|3|1";i:2227;s:8:"@4|0|3|1";i:2228;s:8:"@4|1|6|0";i:2229;s:8:"@4|2|6|0";i:2230;s:8:"@4|2|3|1";i:2231;s:8:"@4|3|3|1";i:2232;s:8:"@4|4|3|1";i:2233;s:8:"@4|2|6|3";i:2234;s:8:"@4|1|6|3";i:2235;s:8:"@4|3|6|0";i:2236;s:8:"@4|4|6|0";i:2237;s:8:"@5|3|3|0";i:2238;s:8:"@5|2|3|0";i:2239;s:8:"@5|1|3|0";i:2240;s:8:"@5|4|3|0";i:2241;s:8:"@5|4|6|0";i:2242;s:8:"@5|1|6|0";i:2243;s:8:"@5|2|6|0";i:2244;s:8:"@5|3|6|0";i:2245;s:8:"@5|1|3|3";i:2246;s:8:"@4|4|6|3";i:2247;s:8:"@4|3|5|6";i:2248;s:8:"@4|3|3|5";i:2249;s:8:"@5|2|5|7";i:2250;s:8:"@5|1|5|7";i:2251;s:8:"@4|2|3|5";i:2252;s:8:"@4|4|3|5";i:2253;s:8:"@5|3|5|7";i:2254;s:8:"@4|4|3|4";i:2255;s:8:"@5|4|5|7";i:2256;s:8:"@5|2|3|4";i:2257;s:8:"@4|4|5|6";i:2258;s:8:"@4|2|5|6";i:2259;s:8:"@4|1|3|5";i:2260;s:8:"@4|3|5|7";i:2261;s:8:"@4|2|5|7";i:2262;s:8:"@4|1|5|7";i:2263;s:8:"@5|1|3|4";i:2264;s:8:"@4|4|5|7";i:2265;s:8:"@5|3|3|4";i:2266;s:8:"@5|0|3|4";i:2267;s:8:"@4|0|3|5";i:2268;s:8:"@4|1|5|6";i:2269;s:8:"@5|4|3|4";i:2270;s:8:"@4|3|3|4";i:2271;s:8:"@5|0|3|5";i:2272;s:8:"@5|4|3|3";i:2273;s:8:"@5|3|3|5";i:2274;s:8:"@5|3|5|6";i:2275;s:8:"@4|1|3|6";i:2276;s:8:"@5|2|5|6";i:2277;s:8:"@5|3|3|3";i:2278;s:8:"@4|2|3|6";i:2279;s:8:"@5|4|3|5";i:2280;s:8:"@4|3|3|6";i:2281;s:8:"@4|4|3|6";i:2282;s:8:"@5|2|3|3";i:2283;s:8:"@5|1|5|6";i:2284;s:8:"@5|4|5|6";i:2285;s:8:"@4|2|3|4";i:2286;s:8:"@4|0|3|6";i:2287;s:8:"@4|0|3|4";i:2288;s:8:"@5|1|3|5";i:2289;s:8:"@4|1|3|4";i:2290;s:8:"@5|2|3|5";i:2291;}', - '@^Mozilla/5\.0 \(.*Android.*Tablet.*\) Gecko.* Firefox/(\d)(\d)\.(\d).*$@'=>'a:56:{s:6:"@6|3|0";i:2292;s:6:"@2|2|0";i:2294;s:6:"@2|1|0";i:2295;s:6:"@6|2|0";i:2296;s:6:"@1|8|0";i:2302;s:6:"@3|8|0";i:2303;s:6:"@2|3|0";i:2306;s:6:"@3|6|0";i:2307;s:6:"@1|9|0";i:2310;s:6:"@2|4|0";i:2311;s:6:"@5|9|0";i:2314;s:6:"@5|0|1";i:2316;s:6:"@5|1|0";i:2319;s:6:"@5|3|0";i:2321;s:6:"@2|5|0";i:2322;s:6:"@5|2|0";i:2324;s:6:"@5|0|0";i:2325;s:6:"@3|0|0";i:2328;s:6:"@2|9|0";i:2330;s:6:"@3|1|0";i:2331;s:6:"@4|9|0";i:2333;s:6:"@4|8|0";i:2335;s:6:"@5|4|0";i:2337;s:6:"@3|9|0";i:2338;s:6:"@5|8|0";i:2341;s:6:"@6|0|0";i:2343;s:6:"@6|1|0";i:2344;s:6:"@5|5|0";i:2350;s:6:"@3|2|0";i:2351;s:6:"@3|7|0";i:2353;s:6:"@5|6|0";i:2354;s:6:"@5|7|0";i:2355;s:6:"@1|6|0";i:2362;s:6:"@3|4|0";i:2363;s:6:"@4|2|0";i:2364;s:6:"@1|3|0";i:2365;s:6:"@1|2|0";i:2367;s:6:"@3|3|1";i:2374;s:6:"@4|6|0";i:2376;s:6:"@4|5|0";i:2378;s:6:"@2|6|0";i:2380;s:6:"@4|4|0";i:2382;s:6:"@1|5|0";i:2383;s:6:"@2|7|0";i:2386;s:6:"@1|4|0";i:2388;s:6:"@4|3|0";i:2389;s:6:"@4|1|0";i:2393;s:6:"@1|7|0";i:2394;s:6:"@1|0|0";i:2396;s:6:"@3|5|0";i:2398;s:6:"@4|0|0";i:2399;s:6:"@1|1|0";i:2401;s:6:"@2|0|0";i:2402;s:6:"@4|7|0";i:2403;s:6:"@2|8|0";i:2405;s:6:"@3|3|0";i:2408;}', - '@^Mozilla/5\.0 \(.*Android.*Mobile.*\) Gecko.* Firefox/(\d)(\d)\.(\d).*$@'=>'a:56:{s:6:"@6|3|0";i:2293;s:6:"@1|7|0";i:2297;s:6:"@2|4|0";i:2299;s:6:"@3|2|0";i:2300;s:6:"@6|2|0";i:2301;s:6:"@3|8|0";i:2304;s:6:"@2|1|0";i:2305;s:6:"@2|3|0";i:2308;s:6:"@3|7|0";i:2309;s:6:"@2|2|0";i:2312;s:6:"@3|6|0";i:2313;s:6:"@5|0|1";i:2315;s:6:"@2|5|0";i:2317;s:6:"@5|0|0";i:2318;s:6:"@5|1|0";i:2320;s:6:"@5|2|0";i:2323;s:6:"@4|9|0";i:2326;s:6:"@3|0|0";i:2327;s:6:"@2|9|0";i:2329;s:6:"@3|1|0";i:2332;s:6:"@4|8|0";i:2334;s:6:"@5|3|0";i:2336;s:6:"@5|8|0";i:2340;s:6:"@5|9|0";i:2342;s:6:"@6|0|0";i:2346;s:6:"@5|7|0";i:2348;s:6:"@5|5|0";i:2349;s:6:"@5|4|0";i:2352;s:6:"@5|6|0";i:2357;s:6:"@6|1|0";i:2358;s:6:"@2|0|0";i:2359;s:6:"@1|2|0";i:2360;s:6:"@2|7|0";i:2361;s:6:"@4|2|0";i:2366;s:6:"@3|3|0";i:2368;s:6:"@3|4|0";i:2369;s:6:"@1|9|0";i:2370;s:6:"@2|6|0";i:2371;s:6:"@1|1|0";i:2372;s:6:"@4|1|0";i:2373;s:6:"@1|5|0";i:2375;s:6:"@1|4|0";i:2377;s:6:"@4|6|0";i:2379;s:6:"@4|4|0";i:2381;s:6:"@4|7|0";i:2384;s:6:"@3|3|1";i:2385;s:6:"@1|3|0";i:2387;s:6:"@4|5|0";i:2390;s:6:"@4|3|0";i:2391;s:6:"@1|6|0";i:2392;s:6:"@4|0|0";i:2395;s:6:"@3|9|0";i:2397;s:6:"@1|0|0";i:2400;s:6:"@1|8|0";i:2404;s:6:"@2|8|0";i:2406;s:6:"@3|5|0";i:2407;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) Gecko.*/.*Mozilla/5\.0.*$@'=>'a:5:{s:2:"@4";i:2298;s:2:"@2";i:2339;s:2:"@3";i:2345;s:2:"@1";i:2347;s:2:"@0";i:2356;}', - '@^Mozilla/5\.0 \(masking\-agent; rv\:.*\) Gecko.* Firefox/.*$@'=>2409, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*Trident/7\.0.*rv\:11\.0.*$@'=>2410, - '@^Mozilla/5\.0 \(iPod.*CPU iPhone OS .* like Mac OS X.*\).*$@'=>2411, - '@^Mozilla/5\.0 \(iPad.*CPU iPhone OS .* like Mac OS X.*\).*$@'=>2412, - '@^Mozilla/5\.0 \(.*Android.*Tablet.*\) Gecko.* Firefox/(\d)\.(\d).*$@'=>'a:11:{s:4:"@2|0";i:2413;s:4:"@1|0";i:2417;s:4:"@9|0";i:2419;s:4:"@6|0";i:2420;s:4:"@7|0";i:2421;s:4:"@1|1";i:2423;s:4:"@5|0";i:2426;s:4:"@8|0";i:2428;s:4:"@4|0";i:2430;s:4:"@2|3";i:2432;s:4:"@2|1";i:2434;}', - '@^Mozilla/5\.0 \(.*Android.*Mobile.*\) Gecko.* Firefox/(\d)\.(\d).*$@'=>'a:11:{s:4:"@8|0";i:2414;s:4:"@9|0";i:2415;s:4:"@1|1";i:2416;s:4:"@6|0";i:2418;s:4:"@1|0";i:2422;s:4:"@2|0";i:2424;s:4:"@7|0";i:2425;s:4:"@2|3";i:2427;s:4:"@4|0";i:2429;s:4:"@2|1";i:2431;s:4:"@5|0";i:2433;}', - '@^Mozilla/5\.0 \(.*Windows.*Trident/7\.0.*Touch.*rv\:11\.0.*\).*$@'=>2435, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*Trident/7\.0.*rv\:11\.0.*$@'=>'a:3:{s:2:"@3";i:2436;s:2:"@4";i:2437;s:2:"@1";i:2438;}', - '@^Mozilla/(\d)\.0 \(.*Windows NT 10\.0.*\) Gecko.* Firefox/.*$@'=>'a:2:{s:2:"@5";i:2439;s:2:"@4";i:2440;}', - '@^Mozilla/5\.0; TOB.* \(.*Windows.*Trident/7\.0.*rv\:11\.0.*$@'=>2441, - '@^Mozilla/5\.0 \(.*MSIE 9\.0.*; .*Windows.*Trident/5\.0.*\).*$@'=>2442, - '@^Mozilla/(\d)\.0 \(.*Windows NT 6\.(\d).*\) Gecko.* Firefox/.*$@'=>'a:10:{s:4:"@4|1";i:2443;s:4:"@4|0";i:2444;s:4:"@5|3";i:2445;s:4:"@4|3";i:2446;s:4:"@4|4";i:2447;s:4:"@5|4";i:2448;s:4:"@4|2";i:2449;s:4:"@5|1";i:2451;s:4:"@5|2";i:2452;s:4:"@5|0";i:2453;}', - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0b.*; .*Windows.*$@'=>2450, - '@^Mozilla/5\.0 \(.*Android.*Tablet.*\) Gecko.* Firefox/.*$@'=>2454, - '@^Mozilla/5\.0 \(.*Android.*Mobile.*\) Gecko.* Firefox/.*$@'=>2455, - '@^Mozilla/(\d)\.0 \(compatible; MSIE 10\.0.*; .*Windows.*$@'=>'a:2:{s:2:"@5";i:2456;s:2:"@4";i:2457;}', - '@^Mozilla/4\.0 \(compatible.*; MSIE 7\.0.*; .*Windows.*$@'=>2458, - '@^Mozilla/5\.0 \(.*CPU iPhone OS .* like Mac OS X.*\).*$@'=>2459, - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*; Trident/8\.0.*\).*$@'=>2460, - '@^Mozilla/5\.0 \(.*Android.*Tablet.*\).*Gecko.*Firefox/.*$@'=>2461, - '@^Mozilla/5\.0 \(.*Android.*Mobile.*\).*Gecko.*Firefox/.*$@'=>2462, - '@^Mozilla/(\d)\.0 \(compatible; MSIE (\d)\.0.*; .*Windows.*$@'=>'a:7:{s:4:"@5|7";i:2463;s:4:"@4|6";i:2464;s:4:"@5|6";i:2465;s:4:"@5|9";i:2466;s:4:"@4|9";i:2467;s:4:"@5|8";i:2468;s:4:"@4|8";i:2469;}', - '@^Mozilla/(\d)\.0 \(.*Mac OS X.*\) Gecko.* Firefox/(\d)(\d)\.0.*$@'=>'a:68:{s:6:"@5|6|0";i:2470;s:6:"@5|3|3";i:2471;s:6:"@5|4|0";i:2472;s:6:"@4|5|8";i:2473;s:6:"@4|4|0";i:2474;s:6:"@4|5|3";i:2475;s:6:"@4|3|4";i:2476;s:6:"@5|5|3";i:2477;s:6:"@4|4|1";i:2478;s:6:"@5|5|8";i:2479;s:6:"@5|4|1";i:2482;s:6:"@4|5|2";i:2483;s:6:"@4|3|3";i:2484;s:6:"@5|5|2";i:2485;s:6:"@5|3|9";i:2487;s:6:"@5|5|7";i:2488;s:6:"@5|5|6";i:2489;s:6:"@4|5|5";i:2490;s:6:"@5|3|7";i:2491;s:6:"@5|5|5";i:2492;s:6:"@4|5|6";i:2493;s:6:"@4|3|7";i:2494;s:6:"@4|3|6";i:2495;s:6:"@4|3|8";i:2496;s:6:"@5|3|5";i:2497;s:6:"@4|5|4";i:2498;s:6:"@4|3|9";i:2499;s:6:"@5|3|4";i:2500;s:6:"@4|5|7";i:2501;s:6:"@5|5|4";i:2502;s:6:"@5|3|8";i:2503;s:6:"@4|3|5";i:2504;s:6:"@5|3|2";i:2505;s:6:"@4|4|2";i:2506;s:6:"@4|3|0";i:2507;s:6:"@5|4|9";i:2508;s:6:"@4|6|1";i:2509;s:6:"@5|4|5";i:2510;s:6:"@5|3|0";i:2511;s:6:"@5|3|6";i:2512;s:6:"@4|4|5";i:2513;s:6:"@4|4|9";i:2514;s:6:"@4|4|6";i:2515;s:6:"@4|4|8";i:2516;s:6:"@4|6|2";i:2517;s:6:"@5|4|8";i:2518;s:6:"@5|4|7";i:2519;s:6:"@4|4|7";i:2520;s:6:"@5|6|1";i:2521;s:6:"@5|4|6";i:2522;s:6:"@5|4|4";i:2523;s:6:"@4|3|1";i:2524;s:6:"@5|5|9";i:2525;s:6:"@4|5|1";i:2526;s:6:"@4|3|2";i:2527;s:6:"@5|5|1";i:2528;s:6:"@4|5|9";i:2529;s:6:"@5|6|3";i:2530;s:6:"@5|4|2";i:2531;s:6:"@4|4|3";i:2532;s:6:"@5|4|3";i:2533;s:6:"@4|6|0";i:2534;s:6:"@4|5|0";i:2535;s:6:"@4|4|4";i:2536;s:6:"@5|5|0";i:2537;s:6:"@5|3|1";i:2538;s:6:"@4|6|3";i:2539;s:6:"@5|6|2";i:2540;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*; Trident/8\.0.*\).*$@'=>'a:3:{s:2:"@3";i:2480;s:2:"@4";i:2481;s:2:"@1";i:2486;}', - '@^Mozilla/5\.0 \(.*Windows NT 10\.0.*\) Gecko.*/(\d)(\d)\.0.*$@'=>'a:34:{s:4:"@4|5";i:2541;s:4:"@3|9";i:2542;s:4:"@3|4";i:2543;s:4:"@4|0";i:2544;s:4:"@3|5";i:2545;s:4:"@3|8";i:2546;s:4:"@3|7";i:2547;s:4:"@3|6";i:2548;s:4:"@4|1";i:2549;s:4:"@3|3";i:2550;s:4:"@3|1";i:2551;s:4:"@3|0";i:2552;s:4:"@4|6";i:2553;s:4:"@4|4";i:2554;s:4:"@4|3";i:2555;s:4:"@4|2";i:2556;s:4:"@3|2";i:2557;s:4:"@4|7";i:2558;s:4:"@4|8";i:2559;s:4:"@5|7";i:2560;s:4:"@5|9";i:2561;s:4:"@5|8";i:2562;s:4:"@5|1";i:2563;s:4:"@5|6";i:2564;s:4:"@6|1";i:2565;s:4:"@6|3";i:2566;s:4:"@5|0";i:2567;s:4:"@5|4";i:2568;s:4:"@5|2";i:2569;s:4:"@6|0";i:2570;s:4:"@5|3";i:2571;s:4:"@6|2";i:2572;s:4:"@5|5";i:2573;s:4:"@4|9";i:2574;}', - '@^Mozilla/5\.0 \(iPhone.*CPU.*OS.* like Mac OS X.*\).*$@'=>2575, - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*; Trident/7\.0.*$@'=>'a:2:{s:2:"@3";i:2576;s:2:"@1";i:2577;}', - '@^Mozilla/5\.0 \(.*Windows NT 6\.(\d).*\) Gecko.*/(\d)(\d)\.0.*$@'=>'a:159:{s:6:"@3|4|9";i:2578;s:6:"@1|3|3";i:2579;s:6:"@3|6|3";i:2580;s:6:"@4|5|9";i:2581;s:6:"@0|5|0";i:2582;s:6:"@4|3|9";i:2583;s:6:"@4|4|9";i:2584;s:6:"@1|6|3";i:2585;s:6:"@2|6|3";i:2586;s:6:"@1|5|0";i:2587;s:6:"@1|3|0";i:2588;s:6:"@4|5|3";i:2589;s:6:"@3|3|3";i:2590;s:6:"@0|4|7";i:2591;s:6:"@2|3|3";i:2592;s:6:"@0|3|0";i:2593;s:6:"@2|5|0";i:2594;s:6:"@3|5|0";i:2595;s:6:"@4|5|0";i:2596;s:6:"@3|6|0";i:2597;s:6:"@2|3|2";i:2598;s:6:"@3|5|9";i:2599;s:6:"@2|5|9";i:2600;s:6:"@1|6|0";i:2601;s:6:"@0|3|9";i:2602;s:6:"@1|3|9";i:2603;s:6:"@1|5|9";i:2604;s:6:"@1|6|2";i:2605;s:6:"@3|5|2";i:2606;s:6:"@1|3|4";i:2607;s:6:"@2|3|4";i:2608;s:6:"@2|6|0";i:2609;s:6:"@2|3|9";i:2610;s:6:"@1|4|6";i:2611;s:6:"@3|3|4";i:2612;s:6:"@0|4|6";i:2613;s:6:"@2|4|6";i:2614;s:6:"@3|4|6";i:2615;s:6:"@3|3|9";i:2616;s:6:"@4|4|6";i:2617;s:6:"@4|4|2";i:2618;s:6:"@0|3|4";i:2619;s:6:"@1|4|5";i:2620;s:6:"@3|5|1";i:2621;s:6:"@4|5|1";i:2622;s:6:"@2|4|1";i:2623;s:6:"@0|3|1";i:2624;s:6:"@1|4|1";i:2625;s:6:"@2|5|1";i:2626;s:6:"@0|4|4";i:2627;s:6:"@0|4|1";i:2628;s:6:"@0|5|1";i:2629;s:6:"@1|5|1";i:2630;s:6:"@3|4|1";i:2631;s:6:"@1|3|1";i:2632;s:6:"@2|4|3";i:2633;s:6:"@1|4|3";i:2634;s:6:"@0|4|3";i:2635;s:6:"@4|4|1";i:2636;s:6:"@3|4|3";i:2637;s:6:"@4|4|3";i:2638;s:6:"@2|3|1";i:2639;s:6:"@3|3|1";i:2640;s:6:"@3|5|4";i:2641;s:6:"@4|3|1";i:2642;s:6:"@1|4|4";i:2643;s:6:"@2|4|4";i:2644;s:6:"@3|3|0";i:2645;s:6:"@4|6|0";i:2646;s:6:"@4|3|0";i:2647;s:6:"@4|6|3";i:2648;s:6:"@2|5|4";i:2649;s:6:"@0|4|5";i:2650;s:6:"@4|4|5";i:2651;s:6:"@3|4|5";i:2652;s:6:"@2|4|5";i:2653;s:6:"@1|4|7";i:2654;s:6:"@3|5|3";i:2655;s:6:"@2|5|3";i:2656;s:6:"@2|6|1";i:2657;s:6:"@1|6|1";i:2658;s:6:"@4|4|4";i:2659;s:6:"@3|4|4";i:2660;s:6:"@3|6|1";i:2661;s:6:"@4|6|1";i:2662;s:6:"@1|5|3";i:2663;s:6:"@2|5|2";i:2664;s:6:"@1|5|2";i:2665;s:6:"@0|5|2";i:2666;s:6:"@2|3|0";i:2667;s:6:"@0|3|3";i:2668;s:6:"@0|3|8";i:2669;s:6:"@1|3|8";i:2670;s:6:"@2|3|8";i:2671;s:6:"@3|3|8";i:2672;s:6:"@2|4|7";i:2673;s:6:"@0|3|5";i:2674;s:6:"@4|3|5";i:2675;s:6:"@3|3|5";i:2676;s:6:"@2|3|5";i:2677;s:6:"@1|3|5";i:2678;s:6:"@4|3|8";i:2679;s:6:"@0|4|0";i:2680;s:6:"@1|5|8";i:2681;s:6:"@4|5|4";i:2682;s:6:"@2|5|8";i:2683;s:6:"@4|4|8";i:2684;s:6:"@4|4|0";i:2685;s:6:"@4|5|2";i:2686;s:6:"@1|4|0";i:2687;s:6:"@2|4|0";i:2688;s:6:"@3|4|0";i:2689;s:6:"@1|5|6";i:2690;s:6:"@3|3|2";i:2691;s:6:"@0|3|6";i:2692;s:6:"@1|3|2";i:2693;s:6:"@1|5|7";i:2694;s:6:"@0|3|2";i:2695;s:6:"@1|3|6";i:2696;s:6:"@2|3|6";i:2697;s:6:"@4|3|6";i:2698;s:6:"@1|5|4";i:2699;s:6:"@3|3|6";i:2700;s:6:"@4|5|6";i:2701;s:6:"@3|5|6";i:2702;s:6:"@3|3|7";i:2703;s:6:"@4|3|7";i:2704;s:6:"@2|5|6";i:2705;s:6:"@4|5|7";i:2706;s:6:"@2|3|7";i:2707;s:6:"@1|3|7";i:2708;s:6:"@2|5|7";i:2709;s:6:"@3|5|7";i:2710;s:6:"@0|3|7";i:2711;s:6:"@3|4|8";i:2712;s:6:"@4|3|2";i:2713;s:6:"@3|5|5";i:2714;s:6:"@2|5|5";i:2715;s:6:"@4|5|5";i:2716;s:6:"@1|4|9";i:2717;s:6:"@3|5|8";i:2718;s:6:"@4|5|8";i:2719;s:6:"@4|3|4";i:2720;s:6:"@4|6|2";i:2721;s:6:"@2|4|2";i:2722;s:6:"@1|5|5";i:2723;s:6:"@4|3|3";i:2724;s:6:"@0|4|9";i:2725;s:6:"@0|4|2";i:2726;s:6:"@2|6|2";i:2727;s:6:"@0|4|8";i:2728;s:6:"@2|4|9";i:2729;s:6:"@1|4|8";i:2730;s:6:"@3|6|2";i:2731;s:6:"@3|4|2";i:2732;s:6:"@1|4|2";i:2733;s:6:"@2|4|8";i:2734;s:6:"@3|4|7";i:2735;s:6:"@4|4|7";i:2736;}', - '@^Mozilla/(\d)\.0 \(.*Linux.*\) Gecko.* Firefox/(\d)(\d)\.0.*$@'=>'a:68:{s:6:"@5|5|0";i:2737;s:6:"@5|6|0";i:2738;s:6:"@4|5|8";i:2739;s:6:"@4|3|2";i:2740;s:6:"@5|3|8";i:2741;s:6:"@4|3|5";i:2742;s:6:"@4|6|3";i:2743;s:6:"@5|4|0";i:2744;s:6:"@4|5|0";i:2745;s:6:"@4|5|6";i:2746;s:6:"@5|4|3";i:2747;s:6:"@5|5|6";i:2749;s:6:"@5|5|3";i:2750;s:6:"@4|3|6";i:2751;s:6:"@5|5|8";i:2752;s:6:"@5|3|5";i:2753;s:6:"@5|4|6";i:2754;s:6:"@4|5|1";i:2755;s:6:"@5|3|0";i:2756;s:6:"@4|5|4";i:2757;s:6:"@5|3|6";i:2758;s:6:"@4|4|3";i:2759;s:6:"@4|4|6";i:2760;s:6:"@5|5|4";i:2761;s:6:"@4|4|1";i:2762;s:6:"@4|4|2";i:2763;s:6:"@4|5|3";i:2764;s:6:"@4|3|0";i:2765;s:6:"@4|3|4";i:2766;s:6:"@4|6|0";i:2767;s:6:"@5|5|9";i:2768;s:6:"@5|3|3";i:2769;s:6:"@4|4|8";i:2770;s:6:"@5|3|7";i:2771;s:6:"@5|4|4";i:2772;s:6:"@4|5|7";i:2773;s:6:"@4|4|7";i:2774;s:6:"@5|4|7";i:2775;s:6:"@5|4|2";i:2776;s:6:"@4|4|9";i:2777;s:6:"@5|4|1";i:2778;s:6:"@4|4|5";i:2779;s:6:"@5|5|2";i:2780;s:6:"@5|4|5";i:2781;s:6:"@5|5|7";i:2782;s:6:"@4|4|0";i:2783;s:6:"@4|5|2";i:2784;s:6:"@5|3|4";i:2785;s:6:"@5|3|9";i:2786;s:6:"@4|3|9";i:2787;s:6:"@5|6|1";i:2788;s:6:"@5|3|1";i:2789;s:6:"@4|5|9";i:2790;s:6:"@5|3|2";i:2791;s:6:"@4|3|3";i:2792;s:6:"@5|6|3";i:2793;s:6:"@5|4|9";i:2794;s:6:"@4|6|1";i:2795;s:6:"@5|5|5";i:2796;s:6:"@4|3|1";i:2797;s:6:"@5|4|8";i:2798;s:6:"@5|6|2";i:2799;s:6:"@4|6|2";i:2800;s:6:"@4|4|4";i:2801;s:6:"@4|5|5";i:2802;s:6:"@4|3|8";i:2803;s:6:"@4|3|7";i:2804;s:6:"@5|5|1";i:2805;}', - '@^Mozilla/5\.0 \(.*Windows.*Trident/7\.0.*rv\:11\.0.*$@'=>2748, - '@^Mozilla/5\.0 \(iPad.*CPU.*OS.* like Mac OS X.*\).*$@'=>2806, - '@^Mozilla/5\.0 \(iPod.*CPU.*OS.* like Mac OS X.*\).*$@'=>2807, - '@^Mozilla/(\d)\.0 \(.*Mac OS X.*\) Gecko.* Firefox/.*$@'=>'a:2:{s:2:"@4";i:2808;s:2:"@5";i:2809;}', - '@^Mozilla/5\.0 \(.*Windows.*; Trident/8\.0.*\).*$@'=>2810, - '@^Mozilla/(\d)\.0 \(.*Linux.*\) Gecko.* Firefox/.*$@'=>'a:2:{s:2:"@4";i:2811;s:2:"@5";i:2812;}', - '@^Mozilla/5\.0 \(.*CPU.*OS.* like Mac OS X.*\).*$@'=>2813, - '@^Firefox/(\d)(\d)\.0.*anonymized by Abelssoft.*$@'=>'a:34:{s:4:"@6|2";i:2814;s:4:"@3|4";i:2815;s:4:"@4|7";i:2816;s:4:"@4|9";i:2817;s:4:"@4|2";i:2818;s:4:"@3|2";i:2819;s:4:"@4|0";i:2820;s:4:"@3|3";i:2821;s:4:"@5|7";i:2822;s:4:"@3|7";i:2823;s:4:"@5|6";i:2824;s:4:"@3|5";i:2825;s:4:"@5|2";i:2826;s:4:"@4|8";i:2827;s:4:"@3|8";i:2828;s:4:"@5|5";i:2829;s:4:"@3|1";i:2830;s:4:"@5|3";i:2831;s:4:"@6|0";i:2832;s:4:"@5|9";i:2833;s:4:"@4|6";i:2834;s:4:"@4|4";i:2835;s:4:"@4|3";i:2836;s:4:"@5|1";i:2837;s:4:"@3|6";i:2838;s:4:"@6|3";i:2839;s:4:"@6|1";i:2840;s:4:"@4|5";i:2841;s:4:"@3|9";i:2842;s:4:"@5|8";i:2843;s:4:"@5|0";i:2844;s:4:"@3|0";i:2845;s:4:"@5|4";i:2846;s:4:"@4|1";i:2847;}', - '@^Mozilla/5\.0 \(.*Mac OS X.*\) Gecko.*/(\d)(\d)\.0.*$@'=>'a:34:{s:4:"@5|4";i:2848;s:4:"@5|9";i:2849;s:4:"@3|3";i:2850;s:4:"@5|3";i:2851;s:4:"@4|0";i:2852;s:4:"@4|1";i:2853;s:4:"@4|5";i:2854;s:4:"@3|9";i:2855;s:4:"@6|3";i:2856;s:4:"@6|2";i:2857;s:4:"@4|7";i:2858;s:4:"@4|6";i:2859;s:4:"@3|2";i:2860;s:4:"@4|4";i:2861;s:4:"@3|0";i:2862;s:4:"@5|0";i:2863;s:4:"@4|9";i:2864;s:4:"@5|5";i:2865;s:4:"@3|7";i:2866;s:4:"@5|7";i:2867;s:4:"@3|6";i:2868;s:4:"@5|6";i:2869;s:4:"@3|5";i:2870;s:4:"@4|8";i:2871;s:4:"@5|8";i:2872;s:4:"@3|8";i:2873;s:4:"@6|1";i:2874;s:4:"@3|4";i:2875;s:4:"@3|1";i:2876;s:4:"@4|3";i:2877;s:4:"@6|0";i:2878;s:4:"@4|2";i:2879;s:4:"@5|2";i:2880;s:4:"@5|1";i:2881;}', - '@^Mozilla/5\.0 \(.*Windows.*; Trident/7\.0.*$@'=>2882, - '@^Firefox/.*anonymized by Abelssoft.*$@'=>2883, - '@^Opera%20Coast/(\d)\.(\d)(\d).* CFNetwork/.*$@'=>'a:14:{s:6:"@4|5|1";i:2884;s:6:"@3|0|2";i:2885;s:6:"@3|0|1";i:2886;s:6:"@4|3|1";i:2887;s:6:"@3|2|1";i:2888;s:6:"@5|0|3";i:2889;s:6:"@5|0|2";i:2890;s:6:"@4|0|2";i:2891;s:6:"@4|2|1";i:2892;s:6:"@4|0|1";i:2893;s:6:"@4|3|0";i:2894;s:6:"@5|0|1";i:2895;s:6:"@4|0|3";i:2896;s:6:"@5|0|4";i:2897;}', - '@^Opera%20Coast/(\d)\.(\d).* CFNetwork/.*$@'=>'a:6:{s:4:"@3|1";i:2898;s:4:"@4|4";i:2899;s:4:"@3|0";i:2900;s:4:"@4|1";i:2901;s:4:"@4|0";i:2902;s:4:"@4|5";i:2903;}', - '@^Opera%20Coast/.* CFNetwork/.*$@'=>2905, - '@^MobileSafari/.* CFNetwork/.*$@'=>2907, - '@^Safari/10600\..* CFNetwork/.*$@'=>2908, - '@^Safari/1(\d)6..\..* CFNetwork/.*$@'=>'a:4:{s:2:"@1";i:2909;s:2:"@2";i:2910;s:2:"@3";i:2911;s:2:"@0";i:2912;}', - '@^Mozilla/(\d)\.0 \(.*MSIE 6\.0.*\).*$@'=>'a:2:{s:2:"@5";i:2914;s:2:"@4";i:2915;}', - '@^Safari/(\d)5..\..* CFNetwork/.*$@'=>'a:2:{s:2:"@8";i:2916;s:2:"@9";i:2917;}', - '@^Mozilla/(\d)\.0 \(.*MSIE 7\.0b.*$@'=>'a:2:{s:2:"@4";i:2979;s:2:"@5";i:2980;}', - '@^Mozilla/(\d)\.0 \(.*MSIE 7\.0.*$@'=>'a:2:{s:2:"@5";i:3024;s:2:"@4";i:3025;}', - '@^Safari/.* CFNetwork/.*$@'=>3068, - '@^.*iPhone.*$@'=>3286, - '@^.*iPod.*$@'=>3291, - '@^.*iPad.*$@'=>3292, - '@^.*$@'=>3294 -); diff --git a/wp/wp-content/plugins/wordfence/lib/wfBulkCountries.php b/wp/wp-content/plugins/wordfence/lib/wfBulkCountries.php deleted file mode 100644 index f397eb0b..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfBulkCountries.php +++ /dev/null @@ -1,255 +0,0 @@ - __("Andorra", 'wordfence'), -"AE" => __("United Arab Emirates", 'wordfence'), -"AF" => __("Afghanistan", 'wordfence'), -"AG" => __("Antigua and Barbuda", 'wordfence'), -"AI" => __("Anguilla", 'wordfence'), -"AL" => __("Albania", 'wordfence'), -"AM" => __("Armenia", 'wordfence'), -"AO" => __("Angola", 'wordfence'), -"AQ" => __("Antarctica", 'wordfence'), -"AR" => __("Argentina", 'wordfence'), -"AS" => __("American Samoa", 'wordfence'), -"AT" => __("Austria", 'wordfence'), -"AU" => __("Australia", 'wordfence'), -"AW" => __("Aruba", 'wordfence'), -"AX" => __("Aland Islands", 'wordfence'), -"AZ" => __("Azerbaijan", 'wordfence'), -"BA" => __("Bosnia and Herzegovina", 'wordfence'), -"BB" => __("Barbados", 'wordfence'), -"BD" => __("Bangladesh", 'wordfence'), -"BE" => __("Belgium", 'wordfence'), -"BF" => __("Burkina Faso", 'wordfence'), -"BG" => __("Bulgaria", 'wordfence'), -"BH" => __("Bahrain", 'wordfence'), -"BI" => __("Burundi", 'wordfence'), -"BJ" => __("Benin", 'wordfence'), -"BL" => __("Saint Bartelemey", 'wordfence'), -"BM" => __("Bermuda", 'wordfence'), -"BN" => __("Brunei Darussalam", 'wordfence'), -"BO" => __("Bolivia", 'wordfence'), -"BQ" => __("Bonaire, Saint Eustatius and Saba", 'wordfence'), -"BR" => __("Brazil", 'wordfence'), -"BS" => __("Bahamas", 'wordfence'), -"BT" => __("Bhutan", 'wordfence'), -"BV" => __("Bouvet Island", 'wordfence'), -"BW" => __("Botswana", 'wordfence'), -"BY" => __("Belarus", 'wordfence'), -"BZ" => __("Belize", 'wordfence'), -"CA" => __("Canada", 'wordfence'), -"CC" => __("Cocos (Keeling) Islands", 'wordfence'), -"CD" => __("Congo, The Democratic Republic of the", 'wordfence'), -"CF" => __("Central African Republic", 'wordfence'), -"CG" => __("Congo", 'wordfence'), -"CH" => __("Switzerland", 'wordfence'), -"CI" => __("Cote dIvoire", 'wordfence'), -"CK" => __("Cook Islands", 'wordfence'), -"CL" => __("Chile", 'wordfence'), -"CM" => __("Cameroon", 'wordfence'), -"CN" => __("China", 'wordfence'), -"CO" => __("Colombia", 'wordfence'), -"CR" => __("Costa Rica", 'wordfence'), -"CU" => __("Cuba", 'wordfence'), -"CV" => __("Cape Verde", 'wordfence'), -"CW" => __("Curacao", 'wordfence'), -"CX" => __("Christmas Island", 'wordfence'), -"CY" => __("Cyprus", 'wordfence'), -"CZ" => __("Czech Republic", 'wordfence'), -"DE" => __("Germany", 'wordfence'), -"DJ" => __("Djibouti", 'wordfence'), -"DK" => __("Denmark", 'wordfence'), -"DM" => __("Dominica", 'wordfence'), -"DO" => __("Dominican Republic", 'wordfence'), -"DZ" => __("Algeria", 'wordfence'), -"EC" => __("Ecuador", 'wordfence'), -"EE" => __("Estonia", 'wordfence'), -"EG" => __("Egypt", 'wordfence'), -"EH" => __("Western Sahara", 'wordfence'), -"ER" => __("Eritrea", 'wordfence'), -"ES" => __("Spain", 'wordfence'), -"ET" => __("Ethiopia", 'wordfence'), -"EU" => __("Europe", 'wordfence'), -"FI" => __("Finland", 'wordfence'), -"FJ" => __("Fiji", 'wordfence'), -"FK" => __("Falkland Islands (Malvinas)", 'wordfence'), -"FM" => __("Micronesia, Federated States of", 'wordfence'), -"FO" => __("Faroe Islands", 'wordfence'), -"FR" => __("France", 'wordfence'), -"GA" => __("Gabon", 'wordfence'), -"GB" => __("United Kingdom", 'wordfence'), -"GD" => __("Grenada", 'wordfence'), -"GE" => __("Georgia", 'wordfence'), -"GF" => __("French Guiana", 'wordfence'), -"GG" => __("Guernsey", 'wordfence'), -"GH" => __("Ghana", 'wordfence'), -"GI" => __("Gibraltar", 'wordfence'), -"GL" => __("Greenland", 'wordfence'), -"GM" => __("Gambia", 'wordfence'), -"GN" => __("Guinea", 'wordfence'), -"GP" => __("Guadeloupe", 'wordfence'), -"GQ" => __("Equatorial Guinea", 'wordfence'), -"GR" => __("Greece", 'wordfence'), -"GS" => __("South Georgia and the South Sandwich Islands", 'wordfence'), -"GT" => __("Guatemala", 'wordfence'), -"GU" => __("Guam", 'wordfence'), -"GW" => __("Guinea-Bissau", 'wordfence'), -"GY" => __("Guyana", 'wordfence'), -"HK" => __("Hong Kong", 'wordfence'), -"HM" => __("Heard Island and McDonald Islands", 'wordfence'), -"HN" => __("Honduras", 'wordfence'), -"HR" => __("Croatia", 'wordfence'), -"HT" => __("Haiti", 'wordfence'), -"HU" => __("Hungary", 'wordfence'), -"ID" => __("Indonesia", 'wordfence'), -"IE" => __("Ireland", 'wordfence'), -"IL" => __("Israel", 'wordfence'), -"IM" => __("Isle of Man", 'wordfence'), -"IN" => __("India", 'wordfence'), -"IO" => __("British Indian Ocean Territory", 'wordfence'), -"IQ" => __("Iraq", 'wordfence'), -"IR" => __("Iran, Islamic Republic of", 'wordfence'), -"IS" => __("Iceland", 'wordfence'), -"IT" => __("Italy", 'wordfence'), -"JE" => __("Jersey", 'wordfence'), -"JM" => __("Jamaica", 'wordfence'), -"JO" => __("Jordan", 'wordfence'), -"JP" => __("Japan", 'wordfence'), -"KE" => __("Kenya", 'wordfence'), -"KG" => __("Kyrgyzstan", 'wordfence'), -"KH" => __("Cambodia", 'wordfence'), -"KI" => __("Kiribati", 'wordfence'), -"KM" => __("Comoros", 'wordfence'), -"KN" => __("Saint Kitts and Nevis", 'wordfence'), -"KP" => __("North Korea", 'wordfence'), -"KR" => __("South Korea", 'wordfence'), -"KW" => __("Kuwait", 'wordfence'), -"KY" => __("Cayman Islands", 'wordfence'), -"KZ" => __("Kazakhstan", 'wordfence'), -"LA" => __("Lao Peoples Democratic Republic", 'wordfence'), -"LB" => __("Lebanon", 'wordfence'), -"LC" => __("Saint Lucia", 'wordfence'), -"LI" => __("Liechtenstein", 'wordfence'), -"LK" => __("Sri Lanka", 'wordfence'), -"LR" => __("Liberia", 'wordfence'), -"LS" => __("Lesotho", 'wordfence'), -"LT" => __("Lithuania", 'wordfence'), -"LU" => __("Luxembourg", 'wordfence'), -"LV" => __("Latvia", 'wordfence'), -"LY" => __("Libyan Arab Jamahiriya", 'wordfence'), -"MA" => __("Morocco", 'wordfence'), -"MC" => __("Monaco", 'wordfence'), -"MD" => __("Moldova, Republic of", 'wordfence'), -"ME" => __("Montenegro", 'wordfence'), -"MF" => __("Saint Martin", 'wordfence'), -"MG" => __("Madagascar", 'wordfence'), -"MH" => __("Marshall Islands", 'wordfence'), -"MK" => __("North Macedonia, Republic of", 'wordfence'), -"ML" => __("Mali", 'wordfence'), -"MM" => __("Myanmar", 'wordfence'), -"MN" => __("Mongolia", 'wordfence'), -"MO" => __("Macao", 'wordfence'), -"MP" => __("Northern Mariana Islands", 'wordfence'), -"MQ" => __("Martinique", 'wordfence'), -"MR" => __("Mauritania", 'wordfence'), -"MS" => __("Montserrat", 'wordfence'), -"MT" => __("Malta", 'wordfence'), -"MU" => __("Mauritius", 'wordfence'), -"MV" => __("Maldives", 'wordfence'), -"MW" => __("Malawi", 'wordfence'), -"MX" => __("Mexico", 'wordfence'), -"MY" => __("Malaysia", 'wordfence'), -"MZ" => __("Mozambique", 'wordfence'), -"NA" => __("Namibia", 'wordfence'), -"NC" => __("New Caledonia", 'wordfence'), -"NE" => __("Niger", 'wordfence'), -"NF" => __("Norfolk Island", 'wordfence'), -"NG" => __("Nigeria", 'wordfence'), -"NI" => __("Nicaragua", 'wordfence'), -"NL" => __("Netherlands", 'wordfence'), -"NO" => __("Norway", 'wordfence'), -"NP" => __("Nepal", 'wordfence'), -"NR" => __("Nauru", 'wordfence'), -"NU" => __("Niue", 'wordfence'), -"NZ" => __("New Zealand", 'wordfence'), -"OM" => __("Oman", 'wordfence'), -"PA" => __("Panama", 'wordfence'), -"PE" => __("Peru", 'wordfence'), -"PF" => __("French Polynesia", 'wordfence'), -"PG" => __("Papua New Guinea", 'wordfence'), -"PH" => __("Philippines", 'wordfence'), -"PK" => __("Pakistan", 'wordfence'), -"PL" => __("Poland", 'wordfence'), -"PM" => __("Saint Pierre and Miquelon", 'wordfence'), -"PN" => __("Pitcairn", 'wordfence'), -"PR" => __("Puerto Rico", 'wordfence'), -"PS" => __("Palestinian Territory", 'wordfence'), -"PT" => __("Portugal", 'wordfence'), -"PW" => __("Palau", 'wordfence'), -"PY" => __("Paraguay", 'wordfence'), -"QA" => __("Qatar", 'wordfence'), -"RE" => __("Reunion", 'wordfence'), -"RO" => __("Romania", 'wordfence'), -"RS" => __("Serbia", 'wordfence'), -"RU" => __("Russian Federation", 'wordfence'), -"RW" => __("Rwanda", 'wordfence'), -"SA" => __("Saudi Arabia", 'wordfence'), -"SB" => __("Solomon Islands", 'wordfence'), -"SC" => __("Seychelles", 'wordfence'), -"SD" => __("Sudan", 'wordfence'), -"SE" => __("Sweden", 'wordfence'), -"SG" => __("Singapore", 'wordfence'), -"SH" => __("Saint Helena", 'wordfence'), -"SI" => __("Slovenia", 'wordfence'), -"SJ" => __("Svalbard and Jan Mayen", 'wordfence'), -"SK" => __("Slovakia", 'wordfence'), -"SL" => __("Sierra Leone", 'wordfence'), -"SM" => __("San Marino", 'wordfence'), -"SN" => __("Senegal", 'wordfence'), -"SO" => __("Somalia", 'wordfence'), -"SR" => __("Suriname", 'wordfence'), -"ST" => __("Sao Tome and Principe", 'wordfence'), -"SV" => __("El Salvador", 'wordfence'), -"SX" => __("Sint Maarten", 'wordfence'), -"SY" => __("Syrian Arab Republic", 'wordfence'), -"SZ" => __("Swaziland", 'wordfence'), -"TC" => __("Turks and Caicos Islands", 'wordfence'), -"TD" => __("Chad", 'wordfence'), -"TF" => __("French Southern Territories", 'wordfence'), -"TG" => __("Togo", 'wordfence'), -"TH" => __("Thailand", 'wordfence'), -"TJ" => __("Tajikistan", 'wordfence'), -"TK" => __("Tokelau", 'wordfence'), -"TL" => __("Timor-Leste", 'wordfence'), -"TM" => __("Turkmenistan", 'wordfence'), -"TN" => __("Tunisia", 'wordfence'), -"TO" => __("Tonga", 'wordfence'), -"TR" => __("Turkey", 'wordfence'), -"TT" => __("Trinidad and Tobago", 'wordfence'), -"TV" => __("Tuvalu", 'wordfence'), -"TW" => __("Taiwan", 'wordfence'), -"TZ" => __("Tanzania, United Republic of", 'wordfence'), -"UA" => __("Ukraine", 'wordfence'), -"UG" => __("Uganda", 'wordfence'), -"UM" => __("United States Minor Outlying Islands", 'wordfence'), -"US" => __("United States", 'wordfence'), -"UY" => __("Uruguay", 'wordfence'), -"UZ" => __("Uzbekistan", 'wordfence'), -"VA" => __("Holy See (Vatican City State)", 'wordfence'), -"VC" => __("Saint Vincent and the Grenadines", 'wordfence'), -"VE" => __("Venezuela", 'wordfence'), -"VG" => __("Virgin Islands, British", 'wordfence'), -"VI" => __("Virgin Islands, U.S.", 'wordfence'), -"VN" => __("Vietnam", 'wordfence'), -"VU" => __("Vanuatu", 'wordfence'), -"WF" => __("Wallis and Futuna", 'wordfence'), -"WS" => __("Samoa", 'wordfence'), -"XK" => __("Kosovo", 'wordfence'), -"YE" => __("Yemen", 'wordfence'), -"YT" => __("Mayotte", 'wordfence'), -"ZA" => __("South Africa", 'wordfence'), -"ZM" => __("Zambia", 'wordfence'), -"ZW" => __("Zimbabwe", 'wordfence'), -); diff --git a/wp/wp-content/plugins/wordfence/lib/wfCache.php b/wp/wp-content/plugins/wordfence/lib/wfCache.php deleted file mode 100644 index e6bbccf9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfCache.php +++ /dev/null @@ -1,200 +0,0 @@ - 0, - 'filesDeleted' => 0, - 'totalData' => 0, - 'totalErrors' => 0, - 'error' => '', - ); - - $cacheDir = WP_CONTENT_DIR . '/wfcache/'; - if (!file_exists($cacheDir)) { - return self::$cacheStats; - } - - $cacheClearLock = WP_CONTENT_DIR . '/wfcache/clear.lock'; - if(! is_file($cacheClearLock)){ - if(! touch($cacheClearLock)){ - self::$cacheStats['error'] = "Could not create a lock file $cacheClearLock to clear the cache."; - self::$cacheStats['totalErrors']++; - return self::$cacheStats; - } - } - $fp = fopen($cacheClearLock, 'w'); - if(! $fp){ - self::$cacheStats['error'] = "Could not open the lock file $cacheClearLock to clear the cache. Please make sure the directory is writable by your web server."; - self::$cacheStats['totalErrors']++; - return self::$cacheStats; - } - if(flock($fp, LOCK_EX | LOCK_NB)){ //non blocking exclusive flock attempt. If we get a lock then it continues and returns true. If we don't lock, then return false, don't block and don't clear the cache. - // This logic means that if a cache clear is currently in progress we don't try to clear the cache. - // This prevents web server children from being queued up waiting to be able to also clear the cache. - self::$lastRecursiveDeleteError = false; - self::recursiveDelete(WP_CONTENT_DIR . '/wfcache/'); - if(self::$lastRecursiveDeleteError){ - self::$cacheStats['error'] = self::$lastRecursiveDeleteError; - self::$cacheStats['totalErrors']++; - } - flock($fp, LOCK_UN); - @unlink($cacheClearLock); - @rmdir($cacheDir); - } - fclose($fp); - - return self::$cacheStats; - } - private static function recursiveDelete($dir) { - $files = array_diff(scandir($dir), array('.','..')); - foreach ($files as $file) { - if(is_dir($dir . '/' . $file)){ - if(! self::recursiveDelete($dir . '/' . $file)){ - return false; - } - } else { - if($file == 'clear.lock'){ continue; } //Don't delete our lock file - $size = filesize($dir . '/' . $file); - if($size){ - self::$cacheStats['totalData'] += round($size / 1024); - } - if(strpos($dir, 'wfcache/') === false){ - self::$lastRecursiveDeleteError = "Not deleting file in directory $dir because it appears to be in the wrong path."; - self::$cacheStats['totalErrors']++; - return false; //Safety check that we're in a subdir of the cache - } - if(@unlink($dir . '/' . $file)){ - self::$cacheStats['filesDeleted']++; - } else { - self::$lastRecursiveDeleteError = "Could not delete file " . $dir . "/" . $file . " : " . wfUtils::getLastError(); - self::$cacheStats['totalErrors']++; - return false; - } - } - } - if($dir != WP_CONTENT_DIR . '/wfcache/'){ - if(strpos($dir, 'wfcache/') === false){ - self::$lastRecursiveDeleteError = "Not deleting directory $dir because it appears to be in the wrong path."; - self::$cacheStats['totalErrors']++; - return false; //Safety check that we're in a subdir of the cache - } - if(@rmdir($dir)){ - self::$cacheStats['dirsDeleted']++; - } else { - self::$lastRecursiveDeleteError = "Could not delete directory $dir : " . wfUtils::getLastError(); - self::$cacheStats['totalErrors']++; - return false; - } - return true; - } else { - return true; - } - } - public static function addHtaccessCode($action){ - if($action != 'remove'){ - die("Error: addHtaccessCode must be called with 'remove' as param"); - } - $htaccessPath = self::getHtaccessPath(); - if(! $htaccessPath){ - return "Wordfence could not find your .htaccess file."; - } - $fh = @fopen($htaccessPath, 'r+'); - if(! $fh){ - $err = error_get_last(); - return $err['message']; - } - flock($fh, LOCK_EX); - fseek($fh, 0, SEEK_SET); //start of file - clearstatcache(); - $contents = fread($fh, filesize($htaccessPath)); - if(! $contents){ - fclose($fh); - return "Could not read from $htaccessPath"; - } - $contents = preg_replace('/#WFCACHECODE.*WFCACHECODE[\r\s\n\t]*/s', '', $contents); - ftruncate($fh, 0); - fflush($fh); - fseek($fh, 0, SEEK_SET); - fwrite($fh, $contents); - flock($fh, LOCK_UN); - fclose($fh); - return false; - } - - /** - * @param $action - * @return bool|string|void - */ - public static function updateBlockedIPs($action){ //'add' or 'remove' - $htaccessPath = self::getHtaccessPath(); - if(! $htaccessPath){ - return "Wordfence could not find your .htaccess file."; - } - if($action == 'remove'){ - $fh = @fopen($htaccessPath, 'r+'); - if(! $fh){ - $err = error_get_last(); - return $err['message']; - } - flock($fh, LOCK_EX); - fseek($fh, 0, SEEK_SET); //start of file - clearstatcache(); - $contents = @fread($fh, filesize($htaccessPath)); - if(! $contents){ - fclose($fh); - return "Could not read from $htaccessPath"; - } - - $contents = preg_replace('/#WFIPBLOCKS.*WFIPBLOCKS[\r\s\n\t]*/s', '', $contents); - - ftruncate($fh, 0); - fflush($fh); - fseek($fh, 0, SEEK_SET); - @fwrite($fh, $contents); - flock($fh, LOCK_UN); - fclose($fh); - return false; - } - return false; - } - public static function getHtaccessPath(){ - - $homePath = wfUtils::getHomePath(); - $htaccessFile = $homePath.'.htaccess'; - return $htaccessFile; - } - public static function doNotCache(){ - if(! defined('WFDONOTCACHE')){ - define('WFDONOTCACHE', true); - } - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfCentralAPI.php b/wp/wp-content/plugins/wordfence/lib/wfCentralAPI.php deleted file mode 100644 index 0d5da854..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfCentralAPI.php +++ /dev/null @@ -1,824 +0,0 @@ -endpoint = $endpoint; - $this->method = $method; - $this->token = $token; - $this->body = $body; - $this->args = $args; - } - - /** - * Handles an internal error when making a Central API request (e.g., a second sodium_compat library with an - * incompatible interface loading instead or in addition to ours). - * - * @param Exception|Throwable $e - */ - public static function handleInternalCentralAPIError($e) { - error_log('Wordfence encountered an internal Central API error: ' . $e->getMessage()); - error_log('Wordfence stack trace: ' . $e->getTraceAsString()); - } - - public function execute() { - $args = array( - 'timeout' => 10, - ); - $args = wp_parse_args($this->getArgs(), $args); - $args['method'] = $this->getMethod(); - if (empty($args['headers'])) { - $args['headers'] = array(); - } - - $token = $this->getToken(); - if ($token) { - $args['headers']['Authorization'] = 'Bearer ' . $token; - } - if ($this->getBody()) { - $args['headers']['Content-Type'] = 'application/json'; - $args['body'] = json_encode($this->getBody()); - } - - $http = _wp_http_get_object(); - $response = $http->request(WORDFENCE_CENTRAL_API_URL_SEC . $this->getEndpoint(), $args); - - if (!is_wp_error($response)) { - $body = wp_remote_retrieve_body($response); - $statusCode = wp_remote_retrieve_response_code($response); - - // Check if site has been disconnected on Central's end, but the plugin is still trying to connect. - if ($statusCode === 404 && strpos($body, 'Site has been disconnected') !== false) { - // Increment attempt count. - $centralDisconnectCount = get_site_transient('wordfenceCentralDisconnectCount'); - set_site_transient('wordfenceCentralDisconnectCount', ++$centralDisconnectCount, 86400); - - // Once threshold is hit, disconnect Central. - if ($centralDisconnectCount > 3) { - wfRESTConfigController::disconnectConfig(); - } - } - } - - return new wfCentralAPIResponse($response); - } - - /** - * @return string - */ - public function getEndpoint() { - return $this->endpoint; - } - - /** - * @param string $endpoint - */ - public function setEndpoint($endpoint) { - $this->endpoint = $endpoint; - } - - /** - * @return string - */ - public function getMethod() { - return $this->method; - } - - /** - * @param string $method - */ - public function setMethod($method) { - $this->method = $method; - } - - /** - * @return null - */ - public function getToken() { - return $this->token; - } - - /** - * @param null $token - */ - public function setToken($token) { - $this->token = $token; - } - - /** - * @return array - */ - public function getBody() { - return $this->body; - } - - /** - * @param array $body - */ - public function setBody($body) { - $this->body = $body; - } - - /** - * @return array - */ - public function getArgs() { - return $this->args; - } - - /** - * @param array $args - */ - public function setArgs($args) { - $this->args = $args; - } -} - -class wfCentralAPIResponse { - - public static function parseErrorJSON($json) { - $data = json_decode($json, true); - if (is_array($data) && array_key_exists('message', $data)) { - return $data['message']; - } - return $json; - } - - /** - * @var array|null - */ - private $response; - - /** - * @param array $response - */ - public function __construct($response = null) { - $this->response = $response; - } - - public function getStatusCode() { - return wp_remote_retrieve_response_code($this->getResponse()); - } - - public function getBody() { - return wp_remote_retrieve_body($this->getResponse()); - } - - public function getJSONBody() { - return json_decode($this->getBody(), true); - } - - public function isError() { - if (is_wp_error($this->getResponse())) { - return true; - } - $statusCode = $this->getStatusCode(); - return !($statusCode >= 200 && $statusCode < 300); - } - - public function returnErrorArray() { - return array( - 'err' => 1, - 'errorMsg' => sprintf( - /* translators: 1. HTTP status code. 2. Error message. */ - __('HTTP %1$d received from Wordfence Central: %2$s', 'wordfence'), - $this->getStatusCode(), $this->parseErrorJSON($this->getBody())), - ); - } - - /** - * @return array|null - */ - public function getResponse() { - return $this->response; - } - - /** - * @param array|null $response - */ - public function setResponse($response) { - $this->response = $response; - } -} - - -class wfCentralAuthenticatedAPIRequest extends wfCentralAPIRequest { - - private $retries = 3; - - /** - * @param string $endpoint - * @param string $method - * @param array $body - * @param array $args - */ - public function __construct($endpoint, $method = 'GET', $body = array(), $args = array()) { - parent::__construct($endpoint, $method, null, $body, $args); - } - - /** - * @return mixed|null - * @throws wfCentralAPIException - */ - public function getToken() { - $token = parent::getToken(); - if ($token) { - return $token; - } - - $token = get_transient('wordfenceCentralJWT' . wfConfig::get('wordfenceCentralSiteID')); - if ($token) { - return $token; - } - - for ($i = 0; $i < $this->retries; $i++) { - try { - $token = $this->fetchToken(); - break; - } catch (wfCentralConfigurationException $e) { - wfConfig::set('wordfenceCentralConfigurationIssue', true); - throw new wfCentralAPIException(__('Fetching token for Wordfence Central authentication due to configuration issue.', 'wordfence')); - } catch (wfCentralAPIException $e) { - continue; - } - } - if (empty($token)) { - if (isset($e)) { - throw $e; - } else { - throw new wfCentralAPIException(__('Unable to authenticate with Wordfence Central.', 'wordfence')); - } - } - $tokenContents = wfJWT::extractTokenContents($token); - - if (!empty($tokenContents['body']['exp'])) { - set_transient('wordfenceCentralJWT' . wfConfig::get('wordfenceCentralSiteID'), $token, $tokenContents['body']['exp'] - time()); - } - wfConfig::set('wordfenceCentralConfigurationIssue', false); - return $token; - } - - public function fetchToken() { - require_once(WORDFENCE_PATH . '/lib/sodium_compat_fast.php'); - - $defaultArgs = array( - 'timeout' => 6, - ); - $siteID = wfConfig::get('wordfenceCentralSiteID'); - if (!$siteID) { - throw new wfCentralAPIException(__('Wordfence Central site ID has not been created yet.', 'wordfence')); - } - $secretKey = wfConfig::get('wordfenceCentralSecretKey'); - if (!$secretKey) { - throw new wfCentralAPIException(__('Wordfence Central secret key has not been created yet.', 'wordfence')); - } - - // Pull down nonce. - $request = new wfCentralAPIRequest(sprintf('/site/%s/login', $siteID), 'GET', null, array(), $defaultArgs); - $nonceResponse = $request->execute(); - if ($nonceResponse->isError()) { - $errorArray = $nonceResponse->returnErrorArray(); - throw new wfCentralAPIException($errorArray['errorMsg']); - } - $body = $nonceResponse->getJSONBody(); - if (!is_array($body) || !isset($body['nonce'])) { - throw new wfCentralAPIException(__('Invalid response received from Wordfence Central when fetching nonce.', 'wordfence')); - } - $nonce = $body['nonce']; - - // Sign nonce to pull down JWT. - $data = $nonce . '|' . $siteID; - try { - $signature = ParagonIE_Sodium_Compat::crypto_sign_detached($data, $secretKey); - } - catch (SodiumException $e) { - throw new wfCentralConfigurationException('Signing failed, likely due to malformed secret key', $e); - } - $request = new wfCentralAPIRequest(sprintf('/site/%s/login', $siteID), 'POST', null, array( - 'data' => $data, - 'signature' => ParagonIE_Sodium_Compat::bin2hex($signature), - ), $defaultArgs); - $authResponse = $request->execute(); - if ($authResponse->isError()) { - $errorArray = $authResponse->returnErrorArray(); - throw new wfCentralAPIException($errorArray['errorMsg']); - } - $body = $authResponse->getJSONBody(); - if (!is_array($body)) { - throw new wfCentralAPIException(__('Invalid response received from Wordfence Central when fetching token.', 'wordfence')); - } - if (!isset($body['jwt'])) { // Possible authentication error. - throw new wfCentralAPIException(__('Unable to authenticate with Wordfence Central.', 'wordfence')); - } - return $body['jwt']; - } -} - -class wfCentralAPIException extends Exception { - -} - -class wfCentralConfigurationException extends RuntimeException { - - public function __construct($message, $previous = null) { - parent::__construct($message, 0, $previous); - } - -} - -class wfCentral { - - /** - * @return bool - */ - public static function isSupported() { - return function_exists('register_rest_route') && version_compare(phpversion(), '5.3', '>='); - } - - /** - * @return bool - */ - public static function isConnected() { - return self::isSupported() && ((bool) self::_isConnected()); - } - - /** - * @return bool - */ - public static function isPartialConnection() { - return !self::_isConnected() && wfConfig::get('wordfenceCentralSiteID'); - } - - public static function _isConnected($forceUpdate = false) { - static $isConnected; - if (!isset($isConnected) || $forceUpdate) { - $isConnected = wfConfig::get('wordfenceCentralConnected', false); - } - return $isConnected; - } - - /** - * @param array $issue - * @return bool|wfCentralAPIResponse - */ - public static function sendIssue($issue) { - return self::sendIssues(array($issue)); - } - - /** - * @param $issues - * @return bool|wfCentralAPIResponse - */ - public static function sendIssues($issues) { - $data = array(); - foreach ($issues as $issue) { - $issueData = array( - 'type' => 'issue', - 'attributes' => $issue, - ); - if (array_key_exists('id', $issueData)) { - $issueData['id'] = $issue['id']; - } - $data[] = $issueData; - } - - $siteID = wfConfig::get('wordfenceCentralSiteID'); - $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'POST', array( - 'data' => $data, - )); - try { - $response = $request->execute(); - return $response; - } - catch (wfCentralAPIException $e) { - error_log($e); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - return false; - } - - /** - * @param int $issueID - * @return bool|wfCentralAPIResponse - */ - public static function deleteIssue($issueID) { - return self::deleteIssues(array($issueID)); - } - - /** - * @param $issues - * @return bool|wfCentralAPIResponse - */ - public static function deleteIssues($issues) { - $siteID = wfConfig::get('wordfenceCentralSiteID'); - $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'DELETE', array( - 'data' => array( - 'type' => 'issue-list', - 'attributes' => array( - 'ids' => $issues, - ) - ), - )); - try { - $response = $request->execute(); - return $response; - } - catch (wfCentralAPIException $e) { - error_log($e); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - return false; - } - - /** - * @return bool|wfCentralAPIResponse - */ - public static function deleteNewIssues() { - $siteID = wfConfig::get('wordfenceCentralSiteID'); - $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'DELETE', array( - 'data' => array( - 'type' => 'issue-list', - 'attributes' => array( - 'status' => 'new', - ) - ), - )); - try { - $response = $request->execute(); - return $response; - } - catch (wfCentralAPIException $e) { - error_log($e); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - return false; - } - - /** - * @param array $types Array of issue types to delete - * @param string $status Issue status to delete - * @return bool|wfCentralAPIResponse - */ - public static function deleteIssueTypes($types, $status = 'new') { - $siteID = wfConfig::get('wordfenceCentralSiteID'); - $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'DELETE', array( - 'data' => array( - 'type' => 'issue-list', - 'attributes' => array( - 'types' => $types, - 'status' => $status, - ) - ), - )); - try { - $response = $request->execute(); - return $response; - } - catch (wfCentralAPIException $e) { - error_log($e); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - return false; - } - - public static function requestConfigurationSync() { - if (! wfCentral::isConnected() || !self::$syncConfig) { - return; - } - - $endpoint = '/site/'.wfConfig::get('wordfenceCentralSiteID').'/config'; - $args = array('timeout' => 0.01, 'blocking' => false); - $request = new wfCentralAuthenticatedAPIRequest($endpoint, 'POST', array(), $args); - - try { - $request->execute(); - } - catch (Exception $e) { - // We can safely ignore an error here for now. - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - } - - protected static $syncConfig = true; - - public static function preventConfigurationSync() { - self::$syncConfig = false; - } - - /** - * @param $scan - * @param $running - * @return bool|wfCentralAPIResponse - */ - public static function updateScanStatus($scan = null) { - if ($scan === null) { - $scan = wfConfig::get_ser('scanStageStatuses'); - if (!is_array($scan)) { - $scan = array(); - } - } - - wfScanner::shared()->flushSummaryItems(); - - $siteID = wfConfig::get('wordfenceCentralSiteID'); - $running = wfScanner::shared()->isRunning(); - $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/scan', 'PATCH', array( - 'data' => array( - 'type' => 'scan', - 'attributes' => array( - 'running' => $running, - 'scan' => $scan, - 'scan-summary' => wfConfig::get('wf_summaryItems'), - ), - ), - )); - try { - $response = $request->execute(); - return $response; - } - catch (wfCentralAPIException $e) { - error_log($e); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - return false; - } - - /** - * @param string $event - * @param array $data - * @param callable|null $alertCallback - */ - public static function sendSecurityEvent($event, $data = array(), $alertCallback = null, $sendImmediately = false) { - return self::sendSecurityEvents(array(array('type' => $event, 'data' => $data, 'event_time' => microtime(true))), $alertCallback, $sendImmediately); - } - - public static function sendSecurityEvents($events, $alertCallback = null, $sendImmediately = false) { - if (empty($events)) { - return true; - } - - if (!$sendImmediately && defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) { - $sendImmediately = true; - } - - $alerted = false; - if (!self::pluginAlertingDisabled() && is_callable($alertCallback)) { - call_user_func($alertCallback); - $alerted = true; - } - - if ($sendImmediately) { - $payload = array(); - foreach ($events as $e) { - $payload[] = array( - 'type' => 'security-event', - 'attributes' => array( - 'type' => $e['type'], - 'data' => $e['data'], - 'event_time' => $e['event_time'], - ), - ); - } - - $siteID = wfConfig::get('wordfenceCentralSiteID'); - $request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/security-events', 'POST', array( - 'data' => $payload, - )); - try { - // Attempt to send the security events to Central. - $response = $request->execute(); - } - catch (wfCentralAPIException $e) { - // If we didn't alert previously, notify the user now in the event Central is down. - if (!$alerted && is_callable($alertCallback)) { - call_user_func($alertCallback); - } - return false; - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - return false; - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - return false; - } - } - else { - $wfdb = new wfDB(); - $table_wfSecurityEvents = wfDB::networkTable('wfSecurityEvents'); - $query = "INSERT INTO {$table_wfSecurityEvents} (`type`, `data`, `event_time`, `state`, `state_timestamp`) VALUES "; - $query .= implode(', ', array_fill(0, count($events), "('%s', '%s', %f, 'new', NOW())")); - - $immediateSendTypes = array('adminLogin', - 'adminLoginNewLocation', - 'nonAdminLogin', - 'nonAdminLoginNewLocation', - 'wordfenceDeactivated', - 'wafDeactivated', - 'autoUpdate'); - $args = array(); - foreach ($events as $e) { - $sendImmediately = $sendImmediately || in_array($e['type'], $immediateSendTypes); - $args[] = $e['type']; - $args[] = json_encode($e['data']); - $args[] = $e['event_time']; - } - $wfdb->queryWriteArray($query, $args); - - if (($ts = self::isScheduledSecurityEventCronOverdue()) || $sendImmediately) { - if ($ts) { - self::unscheduleSendPendingSecurityEvents($ts); - } - self::sendPendingSecurityEvents(); - } - else { - self::scheduleSendPendingSecurityEvents(); - } - } - - return true; - } - - public static function sendPendingSecurityEvents() { - $wfdb = new wfDB(); - $table_wfSecurityEvents = wfDB::networkTable('wfSecurityEvents'); - - $rawEvents = $wfdb->querySelect("SELECT * FROM {$table_wfSecurityEvents} WHERE `state` = 'new' ORDER BY `id` ASC LIMIT 100"); - - if (empty($rawEvents)) - return; - - $ids = array(); - $events = array(); - foreach ($rawEvents as $r) { - $ids[] = intval($r['id']); - $events[] = array( - 'type' => $r['type'], - 'data' => json_decode($r['data'], true), - 'event_time' => $r['event_time'], - ); - } - - $idParam = '(' . implode(', ', $ids) . ')'; - $wfdb->queryWrite("UPDATE {$table_wfSecurityEvents} SET `state` = 'sending', `state_timestamp` = NOW() WHERE `id` IN {$idParam}"); - if (self::sendSecurityEvents($events, null, true)) { - $wfdb->queryWrite("UPDATE {$table_wfSecurityEvents} SET `state` = 'sent', `state_timestamp` = NOW() WHERE `id` IN {$idParam}"); - - self::checkForUnsentSecurityEvents(); - } - else { - $wfdb->queryWrite("UPDATE {$table_wfSecurityEvents} SET `state` = 'new', `state_timestamp` = NOW() WHERE `id` IN {$idParam}"); - self::scheduleSendPendingSecurityEvents(); - } - } - - public static function scheduleSendPendingSecurityEvents() { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $notMainSite = is_multisite() && !is_main_site(); - if ($notMainSite) { - global $current_site; - switch_to_blog($current_site->blog_id); - } - if (!wp_next_scheduled('wordfence_batchSendSecurityEvents')) { - wp_schedule_single_event(time() + 300, 'wordfence_batchSendSecurityEvents'); - } - if ($notMainSite) { - restore_current_blog(); - } - } - - public static function unscheduleSendPendingSecurityEvents($timestamp) { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $notMainSite = is_multisite() && !is_main_site(); - if ($notMainSite) { - global $current_site; - switch_to_blog($current_site->blog_id); - } - if (!wp_next_scheduled('wordfence_batchSendSecurityEvents')) { - wp_unschedule_event($timestamp, 'wordfence_batchSendSecurityEvents'); - } - if ($notMainSite) { - restore_current_blog(); - } - } - - public static function isScheduledSecurityEventCronOverdue() { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $notMainSite = is_multisite() && !is_main_site(); - if ($notMainSite) { - global $current_site; - switch_to_blog($current_site->blog_id); - } - - $overdue = false; - if ($ts = wp_next_scheduled('wordfence_batchSendSecurityEvents')) { - if ((time() - $ts) > 900) { - $overdue = $ts; - } - } - - if ($notMainSite) { - restore_current_blog(); - } - - return $overdue; - } - - public static function checkForUnsentSecurityEvents() { - $wfdb = new wfDB(); - $table_wfSecurityEvents = wfDB::networkTable('wfSecurityEvents'); - $wfdb->queryWrite("UPDATE {$table_wfSecurityEvents} SET `state` = 'new', `state_timestamp` = NOW() WHERE `state` = 'sending' AND `state_timestamp` < DATE_SUB(NOW(), INTERVAL 30 MINUTE)"); - - $count = $wfdb->querySingle("SELECT COUNT(*) AS cnt FROM {$table_wfSecurityEvents} WHERE `state` = 'new'"); - if ($count) { - self::scheduleSendPendingSecurityEvents(); - } - } - - public static function trimSecurityEvents() { - $wfdb = new wfDB(); - $table_wfSecurityEvents = wfDB::networkTable('wfSecurityEvents'); - $count = $wfdb->querySingle("SELECT COUNT(*) AS cnt FROM {$table_wfSecurityEvents}"); - if ($count > 20000) { - $wfdb->truncate($table_wfSecurityEvents); //Similar behavior to other logged data, assume possible DoS so truncate - } - else if ($count > 1000) { - $wfdb->queryWrite("DELETE FROM {$table_wfSecurityEvents} ORDER BY id ASC LIMIT %d", $count - 1000); - } - } - - /** - * @param $event - * @param array $data - * @param callable|null $alertCallback - */ - public static function sendAlertCallback($event, $data = array(), $alertCallback = null) { - if (is_callable($alertCallback)) { - call_user_func($alertCallback); - } - } - - public static function pluginAlertingDisabled() { - if (!self::isConnected()) { - return false; - } - - return wfConfig::get('wordfenceCentralPluginAlertingDisabled', false); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfConfig.php b/wp/wp-content/plugins/wordfence/lib/wfConfig.php deleted file mode 100644 index 65ffac55..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfConfig.php +++ /dev/null @@ -1,2242 +0,0 @@ -"; - private static $tmpDirCache = false; - public static $defaultConfig = array( - //All exportable boolean options - "checkboxes" => array( - "alertOn_update" => array('value' => false, 'autoload' => self::AUTOLOAD), - "alertOn_scanIssues" => array('value' => true, 'autoload' => self::AUTOLOAD), - "alertOn_throttle" => array('value' => false, 'autoload' => self::AUTOLOAD), - "alertOn_block" => array('value' => true, 'autoload' => self::AUTOLOAD), - "alertOn_loginLockout" => array('value' => true, 'autoload' => self::AUTOLOAD), - 'alertOn_breachLogin' => array('value' => true, 'autoload' => self::AUTOLOAD), - "alertOn_lostPasswdForm" => array('value' => true, 'autoload' => self::AUTOLOAD), - "alertOn_adminLogin" => array('value' => true, 'autoload' => self::AUTOLOAD), - "alertOn_firstAdminLoginOnly" => array('value' => false, 'autoload' => self::AUTOLOAD), - "alertOn_nonAdminLogin" => array('value' => false, 'autoload' => self::AUTOLOAD), - "alertOn_firstNonAdminLoginOnly" => array('value' => false, 'autoload' => self::AUTOLOAD), - "alertOn_wordfenceDeactivated" => array('value' => true, 'autoload' => self::AUTOLOAD), - "alertOn_wafDeactivated" => array('value' => true, 'autoload' => self::AUTOLOAD), - "liveTrafficEnabled" => array('value' => false, 'autoload' => self::AUTOLOAD), - "advancedCommentScanning" => array('value' => true, 'autoload' => self::AUTOLOAD), - "checkSpamIP" => array('value' => true, 'autoload' => self::AUTOLOAD), - "spamvertizeCheck" => array('value' => true, 'autoload' => self::AUTOLOAD), - "liveTraf_ignorePublishers" => array('value' => true, 'autoload' => self::AUTOLOAD), - "liveTraf_displayExpandedRecords" => array('value' => false, 'autoload' => self::DONT_AUTOLOAD), - "scheduledScansEnabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "lowResourceScansEnabled" => array('value' => false, 'autoload' => self::AUTOLOAD), - "scansEnabled_checkGSB" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_checkHowGetIPs" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_core" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_themes" => array('value' => false, 'autoload' => self::AUTOLOAD), - "scansEnabled_plugins" => array('value' => false, 'autoload' => self::AUTOLOAD), - "scansEnabled_coreUnknown" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_malware" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_fileContents" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_fileContentsGSB" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_checkReadableConfig" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_suspectedFiles" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_posts" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_comments" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_suspiciousOptions" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_passwds" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_diskSpace" => array('value' => true, 'autoload' => self::AUTOLOAD), - 'scansEnabled_wafStatus' => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_options" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_wpscan_fullPathDisclosure" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_wpscan_directoryListingEnabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_scanImages" => array('value' => false, 'autoload' => self::AUTOLOAD), - "scansEnabled_highSense" => array('value' => false, 'autoload' => self::AUTOLOAD), - "scansEnabled_oldVersions" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scansEnabled_suspiciousAdminUsers" => array('value' => true, 'autoload' => self::AUTOLOAD), - "scan_force_ipv4_start" => array('value' => false, 'autoload' => self::AUTOLOAD), - "liveActivityPauseEnabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "firewallEnabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "autoBlockScanners" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSecurityEnabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_strongPasswds_enabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_breachPasswds_enabled" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_lockInvalidUsers" => array('value' => false, 'autoload' => self::AUTOLOAD), - "loginSec_maskLoginErrors" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_blockAdminReg" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_disableAuthorScan" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_disableApplicationPasswords" => array('value' => true, 'autoload' => self::AUTOLOAD), - "loginSec_disableOEmbedAuthor" => array('value' => false, 'autoload' => self::AUTOLOAD), - 'loginSec_requireAdminTwoFactor' => array('value' => false, 'autoload' => self::AUTOLOAD), - "notification_updatesNeeded" => array('value' => true, 'autoload' => self::AUTOLOAD), - "notification_securityAlerts" => array('value' => true, 'autoload' => self::AUTOLOAD), - "notification_promotions" => array('value' => true, 'autoload' => self::AUTOLOAD), - "notification_blogHighlights" => array('value' => true, 'autoload' => self::AUTOLOAD), - "notification_productUpdates" => array('value' => true, 'autoload' => self::AUTOLOAD), - "notification_scanStatus" => array('value' => true, 'autoload' => self::AUTOLOAD), - "enableRemoteIpLookup" => array('value' => true, 'autoload' => self::AUTOLOAD), - "other_hideWPVersion" => array('value' => false, 'autoload' => self::AUTOLOAD), - "other_blockBadPOST" => array('value' => false, 'autoload' => self::AUTOLOAD), - "other_scanComments" => array('value' => true, 'autoload' => self::AUTOLOAD), - "other_pwStrengthOnUpdate" => array('value' => true, 'autoload' => self::AUTOLOAD), - "other_WFNet" => array('value' => true, 'autoload' => self::AUTOLOAD), - "other_scanOutside" => array('value' => false, 'autoload' => self::AUTOLOAD), - "other_bypassLitespeedNoabort" => array('value' => false, 'autoload' => self::AUTOLOAD), - "deleteTablesOnDeact" => array('value' => false, 'autoload' => self::AUTOLOAD), - "autoUpdate" => array('value' => false, 'autoload' => self::AUTOLOAD), - "startScansRemotely" => array('value' => false, 'autoload' => self::AUTOLOAD), - "disableConfigCaching" => array('value' => false, 'autoload' => self::AUTOLOAD), - "addCacheComment" => array('value' => false, 'autoload' => self::AUTOLOAD), - "disableCodeExecutionUploads" => array('value' => false, 'autoload' => self::AUTOLOAD), - "allowHTTPSCaching" => array('value' => false, 'autoload' => self::AUTOLOAD), - "debugOn" => array('value' => false, 'autoload' => self::AUTOLOAD), - 'email_summary_enabled' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'email_summary_dashboard_widget_enabled' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'ssl_verify' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'ajaxWatcherDisabled_front' => array('value' => false, 'autoload' => self::AUTOLOAD), - 'ajaxWatcherDisabled_admin' => array('value' => false, 'autoload' => self::AUTOLOAD), - 'wafAlertOnAttacks' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'disableWAFIPBlocking' => array('value' => false, 'autoload' => self::AUTOLOAD), - 'showAdminBarMenu' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'displayTopLevelOptions' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'displayTopLevelBlocking' => array('value' => false, 'autoload' => self::AUTOLOAD), - 'displayTopLevelLiveTraffic' => array('value' => false, 'autoload' => self::AUTOLOAD), - 'displayAutomaticBlocks' => array('value' => true, 'autoload' => self::AUTOLOAD), - 'allowLegacy2FA' => array('value' => false, 'autoload' => self::AUTOLOAD), - 'wordfenceI18n' => array('value' => true, 'autoload' => self::AUTOLOAD), - ), - //All exportable variable type options - "otherParams" => array( - "scan_include_extra" => array('value' => "", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "alertEmails" => array('value' => "", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "liveTraf_ignoreUsers" => array('value' => "", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "liveTraf_ignoreIPs" => array('value' => "", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "liveTraf_ignoreUA" => array('value' => "", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "maxMem" => array('value' => 256, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'scan_exclude' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'scan_maxIssues' => array('value' => 1000, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'scan_maxDuration' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "scan_max_resume_attempts" => array('value' => wfScanMonitor::DEFAULT_RESUME_ATTEMPTS, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'whitelisted' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'whitelistedServices' => array('value' => '{}', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_JSON)), - 'bannedURLs' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'maxExecutionTime' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'howGetIPs' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'actUpdateInterval' => array('value' => 2, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'alert_maxHourly' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'loginSec_userBlacklist' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'liveTraf_maxRows' => array('value' => 2000, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'liveTraf_maxAge' => array('value' => 30, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - "neverBlockBG" => array('value' => "neverBlockVerified", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - "loginSec_countFailMins" => array('value' => 240, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - "loginSec_lockoutMins" => array('value' => 240, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'loginSec_strongPasswds' => array('value' => 'pubs', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'loginSec_breachPasswds' => array('value' => 'admins', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'loginSec_maxFailures' => array('value' => 20, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'loginSec_maxForgotPasswd' => array('value' => 20, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'maxGlobalRequests' => array('value' => 'DISABLED', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'maxGlobalRequests_action' => array('value' => "throttle", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'maxRequestsCrawlers' => array('value' => 'DISABLED', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'maxRequestsCrawlers_action' => array('value' => "throttle", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'maxRequestsHumans' => array('value' => 'DISABLED', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'maxRequestsHumans_action' => array('value' => "throttle", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'max404Crawlers' => array('value' => 'DISABLED', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'max404Crawlers_action' => array('value' => "throttle", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'max404Humans' => array('value' => 'DISABLED', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'max404Humans_action' => array('value' => "throttle", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'blockedTime' => array('value' => 300, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'email_summary_interval' => array('value' => 'weekly', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'email_summary_excluded_directories' => array('value' => 'wp-content/cache,wp-content/wflogs', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'allowed404s' => array('value' => "/favicon.ico\n/apple-touch-icon*.png\n/*@2x.png\n/browserconfig.xml", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'wafAlertWhitelist' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'wafAlertInterval' => array('value' => 600, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'wafAlertThreshold' => array('value' => 100, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'howGetIPs_trusted_proxies' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'howGetIPs_trusted_proxy_preset' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'scanType' => array('value' => wfScanner::SCAN_TYPE_STANDARD, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'manualScanType' => array('value' => wfScanner::MANUAL_SCHEDULING_ONCE_DAILY, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'schedStartHour' => array('value' => -1, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'schedMode' => array('value' => wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'cbl_loggedInBlocked' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'cbl_action' => array('value' => 'block', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'cbl_redirURL' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'cbl_bypassRedirURL' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'cbl_bypassRedirDest' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'cbl_bypassViewURL' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'loginSec_enableSeparateTwoFactor' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'blockCustomText' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'alertOn_severityLevel' => array('value' => wfIssues::SEVERITY_LOW, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - ), - //Set as default only, not included automatically in the settings import/export or options page saving - 'defaultsOnly' => array( - "apiKey" => array('value' => "", 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'keyType' => array('value' => wfLicense::KEY_TYPE_FREE, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'isPaid' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'hasKeyConflict' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'timeoffset_wf_updated' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'cacheType' => array('value' => 'disabled', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'detectProxyRecommendation' => array('value' => '', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'dismissAutoPrependNotice' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'onboardingAttempt1' => array('value' => '', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'onboardingAttempt2' => array('value' => '', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'onboardingAttempt3' => array('value' => '', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'onboardingAttempt3Initial' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'onboardingDelayedAt' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'needsNewTour_dashboard' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsNewTour_firewall' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsNewTour_scan' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsNewTour_blocking' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsNewTour_livetraffic' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsNewTour_loginsecurity' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsUpgradeTour_dashboard' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsUpgradeTour_firewall' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsUpgradeTour_scan' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsUpgradeTour_blocking' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsUpgradeTour_livetraffic' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'needsUpgradeTour_loginsecurity' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'supportContent' => array('value' => '{}', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'supportHash' => array('value' => '', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'whitelistPresets' => array('value' => '{}', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'whitelistHash' => array('value' => '', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'touppPromptNeeded' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'touppBypassNextCheck' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - 'autoUpdateAttempts' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'lastPermissionsTemplateCheck' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'previousWflogsFileList' => array('value' => '[]', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'diagnosticsWflogsRemovalHistory' => array('value' => '[]', 'autoload' => self::DONT_AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)), - 'satisfactionPromptDismissed' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'satisfactionPromptInstallDate' => array('value' => 0, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)), - 'satisfactionPromptOverride' => array('value' => true, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)), - ), - ); - public static $serializedOptions = array('lastAdminLogin', 'scanSched', 'emailedIssuesList', 'wf_summaryItems', 'adminUserList', 'twoFactorUsers', 'alertFreqTrack', 'wfStatusStartMsgs', 'vulnerabilities_plugin', 'vulnerabilities_theme', 'dashboardData', 'malwarePrefixes', 'coreHashes', 'noc1ScanSchedule', 'allScansScheduled', 'disclosureStates', 'scanStageStatuses', 'adminNoticeQueue', 'suspiciousAdminUsernames', 'wordpressPluginVersions', 'wordpressThemeVersions'); - // Configuration keypairs that can be set from Central. - private static $wfCentralInternalConfig = array( - 'wordfenceCentralUserSiteAuthGrant', - 'wordfenceCentralConnected', - 'wordfenceCentralPluginAlertingDisabled', - ); - - public static function setDefaults() { - foreach (self::$defaultConfig['checkboxes'] as $key => $config) { - $val = $config['value']; - $autoload = $config['autoload']; - if (self::get($key) === false) { - self::set($key, $val ? '1' : '0', $autoload); - } - } - foreach (self::$defaultConfig['otherParams'] as $key => $config) { - $val = $config['value']; - $autoload = $config['autoload']; - if (self::get($key) === false) { - self::set($key, $val, $autoload); - } - } - foreach (self::$defaultConfig['defaultsOnly'] as $key => $config) { - $val = $config['value']; - $autoload = $config['autoload']; - if (self::get($key) === false) { - if ($val === false) { - self::set($key, '0', $autoload); - } - else if ($val === true) { - self::set($key, '1', $autoload); - } - else { - self::set($key, $val, $autoload); - } - } - } - self::set('encKey', substr(wfUtils::bigRandomHex(), 0, 16)); - self::set('longEncKey', bin2hex(wfWAFUtils::random_bytes(32))); - if (self::get('maxMem', false) === false) { - self::set('maxMem', '256'); - } - if (self::get('other_scanOutside', false) === false) { - self::set('other_scanOutside', 0); - } - - if (self::get('email_summary_enabled')) { - wfActivityReport::scheduleCronJob(); - } else { - wfActivityReport::disableCronJob(); - } - } - public static function loadAllOptions() { - global $wpdb; - - $options = wp_cache_get('alloptions', 'wordfence'); - if (!$options) { - $table = self::table(); - self::updateTableExists(); - $suppress = $wpdb->suppress_errors(); - if (!($rawOptions = $wpdb->get_results("SELECT name, val FROM {$table} WHERE autoload = 'yes'"))) { - $rawOptions = $wpdb->get_results("SELECT name, val FROM {$table}"); - } - $wpdb->suppress_errors($suppress); - $options = array(); - foreach ((array) $rawOptions as $o) { - if (in_array($o->name, self::$serializedOptions)) { - $val = maybe_unserialize($o->val); - if ($val) { - $options[$o->name] = $val; - } - } - else { - $options[$o->name] = $o->val; - } - } - - wp_cache_add_non_persistent_groups('wordfence'); - wp_cache_add('alloptions', $options, 'wordfence'); - } - - return $options; - } - - /** - * Bases the table's existence on the option specified by wfConfig::TABLE_EXISTS_OPTION for performance. We only - * set that option just prior to deletion in the uninstall handler and after table creation in the install handler. - */ - public static function updateTableExists($change = null) { - if ($change !== null) { - self::$tableExists = !!$change; - update_option(wfConfig::TABLE_EXISTS_OPTION, self::$tableExists); - return; - } - - self::$tableExists = true; - $optionValue = get_option(wfConfig::TABLE_EXISTS_OPTION, null); - if ($optionValue === null) { //No value, set an initial one - global $wpdb; - self::updateTableExists(!!$wpdb->get_col($wpdb->prepare('SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME=%s', self::table()))); - return; - } - if (!$optionValue) { - self::$tableExists = false; - } - } - - public static function tableExists() { - return self::$tableExists; - } - - private static function updateCachedOption($name, $val) { - $options = self::loadAllOptions(); - $options[$name] = $val; - wp_cache_set('alloptions', $options, 'wordfence'); - } - private static function removeCachedOption($name) { - $options = self::loadAllOptions(); - if (isset($options[$name])) { - unset($options[$name]); - wp_cache_set('alloptions', $options, 'wordfence'); - } - } - private static function getCachedOption($name) { - $options = self::loadAllOptions(); - if (isset($options[$name])) { - return $options[$name]; - } - - $table = self::table(); - $val = self::getDB()->querySingle("SELECT val FROM {$table} WHERE name='%s'", $name); - if ($val !== null) { - $options[$name] = $val; - wp_cache_set('alloptions', $options, 'wordfence'); - } - return $val; - } - public static function hasCachedOption($name) { - $options = self::loadAllOptions(); - return isset($options[$name]); - } - - /** - * Returns an array of all option keys that are eligible for export with the exception of serialized options. - * - * @return array - */ - public static function getExportableOptionsKeys() { - $ret = array(); - foreach (self::$defaultConfig['checkboxes'] as $key => $val) { - $ret[] = $key; - } - foreach (self::$defaultConfig['otherParams'] as $key => $val) { - $ret[] = $key; - } - return $ret; - } - public static function parseOptions($excludeOmitted = false) { - $ret = array(); - foreach (self::$defaultConfig['checkboxes'] as $key => $val) { //value is not used. We just need the keys for validation - if ($excludeOmitted && isset($_POST[$key])) { - $ret[$key] = (int) $_POST[$key]; - } - else if (!$excludeOmitted || isset($_POST[$key])) { - $ret[$key] = isset($_POST[$key]) ? '1' : '0'; - } - } - foreach (self::$defaultConfig['otherParams'] as $key => $val) { - if (!$excludeOmitted || isset($_POST[$key])) { - if (isset($_POST[$key])) { - $ret[$key] = stripslashes($_POST[$key]); - } - else { - error_log("Missing options param \"$key\" when parsing parameters."); - } - } - } - /* for debugging only: - foreach($_POST as $key => $val){ - if($key != 'action' && $key != 'nonce' && (! array_key_exists($key, self::$checkboxes)) && (! array_key_exists($key, self::$otherParams)) ){ - error_log("Unrecognized option: $key"); - } - } - */ - return $ret; - } - public static function setArray($arr){ - foreach($arr as $key => $val){ - self::set($key, $val); - } - } - public static function getHTML($key){ - return esc_html(self::get($key)); - } - public static function inc($key){ - $val = self::get($key, false); - if(! $val){ - $val = 0; - } - self::set($key, $val + 1); - return $val + 1; - } - public static function atomicInc($key) { - if (!self::$tableExists) { - return false; - } - - global $wpdb; - $old_suppress_errors = $wpdb->suppress_errors(true); - $table = self::table(); - $rowExists = false; - $successful = false; - $attempts = 0; - do { - if (!$rowExists && $wpdb->query($wpdb->prepare("INSERT INTO {$table} (name, val, autoload) values (%s, %s, %s)", $key, 1, self::DONT_AUTOLOAD))) { - $val = 1; - $successful = true; - } - else { - $rowExists = true; - $val = self::get($key, 1); - if ($wpdb->query($wpdb->prepare("UPDATE {$table} SET val = %s WHERE name = %s AND val = %s", $val + 1, $key, $val))) { - $val++; - $successful = true; - } - } - $attempts++; - } while (!$successful && $attempts < 100); - $wpdb->suppress_errors($old_suppress_errors); - return $val; - } - public static function remove($key) { - global $wpdb; - - if (!self::$tableExists) { - return; - } - - $table = self::table(); - $wpdb->query($wpdb->prepare("DELETE FROM {$table} WHERE name = %s", $key)); - self::removeCachedOption($key); - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController') && (substr($key, 0, 4) == 'cbl_' || $key == 'blockedTime' || $key == 'disableWAFIPBlocking')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - public static function set($key, $val, $autoload = self::AUTOLOAD) { - global $wpdb; - - if (is_array($val)) { - $msg = sprintf( - /* translators: 1. Key in key-value store. 2. Value in key-value store. */ - __('wfConfig::set() got an array as second param with key: %1$s and value: %2$s', 'wordfence'), $key, var_export($val, true)); - wordfence::status(1, 'error', $msg); - return; - } - - if (($key == 'apiKey' || $key == 'isPaid' || $key == 'other_WFNet') && wfWAF::getInstance() && !WFWAF_SUBDIRECTORY_INSTALL) { - if ($key == 'isPaid' || $key == 'other_WFNet') { - $val = !!$val; - } - - try { - wfWAF::getInstance()->getStorageEngine()->setConfig($key, $val, 'synced'); - } catch (wfWAFStorageFileException $e) { - error_log($e->getMessage()); - } catch (wfWAFStorageEngineMySQLiException $e) { - error_log($e->getMessage()); - } - } - - if (!self::$tableExists) { - return; - - } - $table = self::table(); - if ($wpdb->query($wpdb->prepare("INSERT INTO {$table} (name, val, autoload) values (%s, %s, %s) ON DUPLICATE KEY UPDATE val = %s, autoload = %s", $key, $val, $autoload, $val, $autoload)) !== false && $autoload != self::DONT_AUTOLOAD) { - self::updateCachedOption($key, $val); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController') && (substr($key, 0, 4) == 'cbl_' || $key == 'blockedTime' || $key == 'disableWAFIPBlocking')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - public static function setJSON($key, $val, $autoload = self::AUTOLOAD) { - self::set($key, @json_encode($val), $autoload); - } - public static function setBool($key, $val, $autoload = self::AUTOLOAD) { - self::set($key, wfUtils::truthyToBoolean($val) ? 1 : 0, $autoload); - } - public static function setOrRemove($key, $value, $autoload = self::AUTOLOAD) { - if ($value === null) { - self::remove($key); - } - else { - self::set($key, $value, $autoload); - } - } - public static function get($key, $default = false, $allowCached = true, &$isDefault = false) { - global $wpdb; - - if ($allowCached && self::hasCachedOption($key)) { - return self::getCachedOption($key); - } - - if (!self::$tableExists) { - $isDefault = true; - return $default; - } - - $table = self::table(); - if (!($option = $wpdb->get_row($wpdb->prepare("SELECT name, val, autoload FROM {$table} WHERE name = %s", $key)))) { - $isDefault = true; - return $default; - } - - if ($option->autoload != self::DONT_AUTOLOAD) { - self::updateCachedOption($key, $option->val); - } - return $option->val; - } - - public static function getInt($key, $default = 0, $allowCached = true) { - return (int) self::get($key, $default, $allowCached); - } - - public static function getJSON($key, $default = false, $allowCached = true) { - $json = self::get($key, $default, $allowCached, $isDefault); - if ($isDefault) - return $json; - $decoded = @json_decode($json, true); - if ($decoded === null) { - return $default; - } - return $decoded; - } - - public static function getBool($key, $default = false, $allowCached = true) { - return wfUtils::truthyToBoolean(self::get($key, $default, $allowCached)); - } - - /** - * Runs a test against the database to verify set_ser is working via MySQLi. - * - * @return bool - */ - public static function testDB() { - $nonce = bin2hex(wfWAFUtils::random_bytes(32)); - $payload = array('nonce' => $nonce); - $allow = wfConfig::get('allowMySQLi', true); - wfConfig::set('allowMySQLi', true); - wfConfig::set_ser('dbTest', $payload, false, wfConfig::DONT_AUTOLOAD); - - $stored = wfConfig::get_ser('dbTest', false, false); - wfConfig::set('allowMySQLi', $allow); - $result = false; - if (is_array($stored) && isset($stored['nonce']) && hash_equals($nonce, $stored['nonce'])) { - $result = true; - } - - wfConfig::delete_ser_chunked('dbTest'); - return $result; - } - - private static function canCompressValue() { - if (!function_exists('gzencode') || !function_exists('gzdecode')) { - return false; - } - $disabled = explode(',', ini_get('disable_functions')); - if (in_array('gzencode', $disabled) || in_array('gzdecode', $disabled)) { - return false; - } - return true; - } - - private static function isCompressedValue($data) { - //Based on http://www.ietf.org/rfc/rfc1952.txt - if (strlen($data) < 2) { - return false; - } - - $magicBytes = substr($data, 0, 2); - if ($magicBytes !== (chr(0x1f) . chr(0x8b))) { - return false; - } - - //Small chance of false positives here -- can check the header CRC if it turns out it's needed - return true; - } - - private static function ser_chunked_key($key) { - return 'wordfence_chunked_' . $key . '_'; - } - - public static function get_ser($key, $default = false, $cache = true) { - if (self::hasCachedOption($key)) { - return self::getCachedOption($key); - } - - if (!self::$tableExists) { - return $default; - } - - //Check for a chunked value first - $chunkedValueKey = self::ser_chunked_key($key); - $header = self::getDB()->querySingle("select val from " . self::table() . " where name=%s", $chunkedValueKey . 'header'); - if ($header) { - $header = unserialize($header); - $count = $header['count']; - $path = tempnam(sys_get_temp_dir(), $key); //Writing to a file like this saves some of PHP's in-memory copying when just appending each chunk to a string - $fh = fopen($path, 'r+'); - $length = 0; - for ($i = 0; $i < $count; $i++) { - $chunk = self::getDB()->querySingle("select val from " . self::table() . " where name=%s", $chunkedValueKey . $i); - self::getDB()->flush(); //clear cache - if (!$chunk) { - wordfence::status(2, 'error', sprintf(/* translators: Key in key-value store. */ __("Error reassembling value for %s", 'wordfence'), $key)); - return $default; - } - fwrite($fh, $chunk); - $length += strlen($chunk); - unset($chunk); - } - - fseek($fh, 0); - $serialized = fread($fh, $length); - fclose($fh); - unlink($path); - - if (self::canCompressValue() && self::isCompressedValue($serialized)) { - $inflated = @gzdecode($serialized); - if ($inflated !== false) { - unset($serialized); - if ($cache) { - self::updateCachedOption($key, unserialize($inflated)); - return self::getCachedOption($key); - } - return unserialize($inflated); - } - } - if ($cache) { - self::updateCachedOption($key, unserialize($serialized)); - return self::getCachedOption($key); - } - return unserialize($serialized); - } - else { - $serialized = self::getDB()->querySingle("select val from " . self::table() . " where name=%s", $key); - self::getDB()->flush(); //clear cache - if ($serialized) { - if (self::canCompressValue() && self::isCompressedValue($serialized)) { - $inflated = @gzdecode($serialized); - if ($inflated !== false) { - unset($serialized); - return unserialize($inflated); - } - } - if ($cache) { - self::updateCachedOption($key, unserialize($serialized)); - return self::getCachedOption($key); - } - return unserialize($serialized); - } - } - - return $default; - } - - public static function set_ser($key, $val, $allowCompression = false, $autoload = self::AUTOLOAD) { - /* - * Because of the small default value for `max_allowed_packet` and `max_long_data_size`, we're stuck splitting - * large values into multiple chunks. To minimize memory use, the MySQLi driver is used directly when possible. - */ - - global $wpdb; - $dbh = $wpdb->dbh; - $useMySQLi = wfUtils::useMySQLi(); - - if (!self::$tableExists) { - return; - } - - self::delete_ser_chunked($key); //Ensure any old values for a chunked value are deleted first - - if (self::canCompressValue() && $allowCompression) { - $data = gzencode(serialize($val)); - } - else { - $data = serialize($val); - } - - if (!$useMySQLi) { - $data = bin2hex($data); - } - - $dataLength = strlen($data); - $maxAllowedPacketBytes = self::getDB()->getMaxAllowedPacketBytes(); - $chunkSize = intval((($maxAllowedPacketBytes < 1024 /* MySQL minimum, probably failure to fetch it */ ? 1024 * 1024 /* MySQL default */ : $maxAllowedPacketBytes) - 50) / 1.2); //Based on max_allowed_packet + 20% for escaping and SQL - $chunkSize = $chunkSize - ($chunkSize % 2); //Ensure it's even - $chunkedValueKey = self::ser_chunked_key($key); - if ($dataLength > $chunkSize) { - $chunks = 0; - while (($chunks * $chunkSize) < $dataLength) { - $dataChunk = substr($data, $chunks * $chunkSize, $chunkSize); - if ($useMySQLi) { - $chunkKey = $chunkedValueKey . $chunks; - $stmt = $dbh->prepare("INSERT IGNORE INTO " . self::table() . " (name, val, autoload) VALUES (?, ?, 'no')"); - if ($stmt === false) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value chunk for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - $null = NULL; - $stmt->bind_param("sb", $chunkKey, $null); - - if (!$stmt->send_long_data(1, $dataChunk)) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value chunk for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - - if (!$stmt->execute()) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value chunk for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - } - else { - if (!self::getDB()->queryWrite(sprintf("insert ignore into " . self::table() . " (name, val, autoload) values (%%s, X'%s', 'no')", $dataChunk), $chunkedValueKey . $chunks)) { - if ($useMySQLi) { - $errno = mysqli_errno($wpdb->dbh); - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value chunk for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $errno, $wpdb->last_error)); - } - else if (function_exists('mysql_errno')) { - // phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved - $errno = mysql_errno($wpdb->dbh); - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value chunk for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $errno, $wpdb->last_error)); - } - - return false; - } - } - $chunks++; - } - - if (!self::getDB()->queryWrite(sprintf("insert ignore into " . self::table() . " (name, val, autoload) values (%%s, X'%s', 'no')", bin2hex(serialize(array('count' => $chunks)))), $chunkedValueKey . 'header')) { - wordfence::status(2, 'error', sprintf( - /* translators: Key in key-value store. */ - __("Error writing value header for %s", 'wordfence'), $key)); - return false; - } - } - else { - $exists = self::getDB()->querySingle("select name from " . self::table() . " where name='%s'", $key); - - if ($useMySQLi) { - if ($exists) { - $stmt = $dbh->prepare("UPDATE " . self::table() . " SET val=? WHERE name=?"); - if ($stmt === false) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - $null = NULL; - $stmt->bind_param("bs", $null, $key); - } - else { - $stmt = $dbh->prepare("INSERT IGNORE INTO " . self::table() . " (val, name, autoload) VALUES (?, ?, ?)"); - if ($stmt === false) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - $null = NULL; - $stmt->bind_param("bss", $null, $key, $autoload); - } - - if (!$stmt->send_long_data(0, $data)) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error writing value for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - - if (!$stmt->execute()) { - wordfence::status(2, 'error', sprintf( - /* translators: 1. Key in key-value store. 2. MySQL error number. 3. MySQL error message. */ - __('Error finishing writing value for %1$s (MySQLi error: [%2$s] %3$s)', 'wordfence'), $key, $dbh->errno, $dbh->error)); - return false; - } - } - else { - if ($exists) { - self::getDB()->queryWrite(sprintf("update " . self::table() . " set val=X'%s' where name=%%s", $data), $key); - } - else { - self::getDB()->queryWrite(sprintf("insert ignore into " . self::table() . " (name, val, autoload) values (%%s, X'%s', %%s)", $data), $key, $autoload); - } - } - } - self::getDB()->flush(); - - if ($autoload != self::DONT_AUTOLOAD) { - self::updateCachedOption($key, $val); - } - return true; - } - - private static function delete_ser_chunked($key) { - if (!self::$tableExists) { - return; - } - - self::removeCachedOption($key); - - $chunkedValueKey = self::ser_chunked_key($key); - $header = self::getDB()->querySingle("select val from " . self::table() . " where name=%s", $chunkedValueKey . 'header'); - if (!$header) { - return; - } - - $header = unserialize($header); - $count = $header['count']; - for ($i = 0; $i < $count; $i++) { - self::getDB()->queryWrite("delete from " . self::table() . " where name='%s'", $chunkedValueKey . $i); - } - self::getDB()->queryWrite("delete from " . self::table() . " where name='%s'", $chunkedValueKey . 'header'); - } - public static function f($key){ - echo esc_attr(self::get($key)); - } - public static function p() { - return self::get('isPaid'); - } - public static function cbp($key){ - if(self::get('isPaid') && self::get($key)){ - echo ' checked '; - } - } - public static function cb($key){ - if(self::get($key)){ - echo ' checked '; - } - } - public static function sel($key, $val, $isDefault = false){ - if((! self::get($key)) && $isDefault){ echo ' selected '; } - if(self::get($key) == $val){ echo ' selected '; } - } - private static function getDB(){ - if(! self::$DB){ - self::$DB = new wfDB(); - } - return self::$DB; - } - private static function table(){ - return wfDB::networkTable('wfConfig'); - } - public static function haveAlertEmails(){ - $emails = self::getAlertEmails(); - return sizeof($emails) > 0 ? true : false; - } - public static function alertEmailBlacklist() { - return array('3c4aa9bd643bd9bb9873014227151a85b24ab8d72fe02cc5799b0edc56eabb67', 'aa06081e3962a3c17a85a06ddf9e418ca1ba8fead3f9b7a20beaf51848a1fd75', 'a25a360bded101e25ebabe5643161ddbb6c3fa33838bbe9a123c2ec0cda8d370', '36e8407dfa80d64cfe42ede4d9d5ce2d4840a5e4781b5f8a7b3b8eacec86fcad', '50cf95aec25369583efdfeff9f0818b4b9266f10e140ea2b648e30202450c21b', '72a09e746cb90ff2646ba1f1d0c0f5ffed6b380642bbbf826d273fffa6ef673b'); - } - public static function getAlertEmails() { - $blacklist = self::alertEmailBlacklist(); - $dat = explode(',', self::get('alertEmails')); - $emails = array(); - foreach ($dat as $email) { - $email = strtolower(trim($email)); - if (preg_match('/\@/', $email)) { - $hash = hash('sha256', $email); - if (!in_array($hash, $blacklist)) { - $emails[] = $email; - } - } - } - return $emails; - } - public static function getAlertLevel(){ - if (self::get('alertOn_scanIssues')) { - return self::get('alertOn_severityLevel', 0); - } - return 0; - } - public static function liveTrafficEnabled(&$overriden = null){ - $enabled = self::get('liveTrafficEnabled'); - if (WORDFENCE_DISABLE_LIVE_TRAFFIC || WF_IS_WP_ENGINE) { - $enabled = false; - if ($overriden !== null) { - $overriden = true; - } - } - return $enabled; - } - public static function enableAutoUpdate(){ - wfConfig::set('autoUpdate', '1'); - wp_clear_scheduled_hook('wordfence_daily_autoUpdate'); - if (is_main_site()) { - wp_schedule_event(time(), 'daily', 'wordfence_daily_autoUpdate'); - } - } - public static function disableAutoUpdate(){ - wfConfig::set('autoUpdate', '0'); - wp_clear_scheduled_hook('wordfence_daily_autoUpdate'); - } - public static function createLock($name, $timeout = null) { //Our own version of WP_Upgrader::create_lock that uses our table instead - global $wpdb; - - if (!$timeout) { - $timeout = 3600; - } - - $table = self::table(); - - $lock_option = $name . '.lock'; - $lock_result = $wpdb->query($wpdb->prepare("INSERT IGNORE INTO `$table` (`name`, `val`, `autoload`) VALUES (%s, %s, 'no')", $lock_option, time())); - - if (!$lock_result) { - $lock_result = self::get($lock_option, false, false); - if (!$lock_result) { - return false; - } - - if ($lock_result > (time() - $timeout)) { - return false; - } - - self::releaseLock($name); - return self::createLock($name, $timeout); - } - - return true; - } - public static function releaseLock($name) { - self::remove($name . '.lock'); - } - public static function autoUpdate(){ - require(dirname(__FILE__) . '/wfVersionSupport.php'); - /** - * @var string $wfPHPDeprecatingVersion - * @var string $wfPHPMinimumVersion - */ - if (version_compare(PHP_VERSION, $wfPHPMinimumVersion, '<')) { - return; - } - - // Prevent WF auto-update if the user has enabled auto-update through the plugins page. - if (version_compare(wfUtils::getWPVersion(), '5.5-x', '>=')) { - $autoUpdatePlugins = get_site_option('auto_update_plugins'); - if (is_array($autoUpdatePlugins) && in_array(WORDFENCE_BASENAME, $autoUpdatePlugins)) { - return; - } - } - - if (!wfConfig::get('other_bypassLitespeedNoabort', false) && getenv('noabort') != '1' && stristr($_SERVER['SERVER_SOFTWARE'], 'litespeed') !== false) { - $lastEmail = self::get('lastLiteSpdEmail', false); - if( (! $lastEmail) || (time() - (int)$lastEmail > (86400 * 30))){ - self::set('lastLiteSpdEmail', time()); - wordfence::alert( - /* translators: Support URL. */ - __("Wordfence Upgrade not run. Please modify your .htaccess", 'wordfence'), sprintf(__("To preserve the integrity of your website we are not running Wordfence auto-update.\n" . - "You are running the LiteSpeed web server which has been known to cause a problem with Wordfence auto-update.\n" . - "Please go to your website now and make a minor change to your .htaccess to fix this.\n" . - "You can find out how to make this change at:\n" . - "%s\n" . - "\nAlternatively you can disable auto-update on your website to stop receiving this message and upgrade Wordfence manually.\n", 'wordfence'), wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_LITESPEED_WARNING)), - false - ); - } - return; - } - - $runUpdate = false; - wp_update_plugins(); - $update_plugins = get_site_transient('update_plugins'); - if ($update_plugins && is_array($update_plugins->response) && isset($update_plugins->response[WORDFENCE_BASENAME])) { - $status = $update_plugins->response[WORDFENCE_BASENAME]; - if (is_object($status) && property_exists($status, 'new_version')) { - $runUpdate = (version_compare($status->new_version, WORDFENCE_VERSION) > 0); - } - } - - if ($runUpdate) { - try { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $response = $api->call('should_auto_update', array(), array('currentVersion' => WORDFENCE_VERSION)); - if (!(is_array($response) && isset($response['ok']) && wfUtils::truthyToBoolean($response['ok']))) { - $runUpdate = false; - } - } - catch (Exception $e) { - wfConfig::inc('autoUpdateAttempts'); - $runUpdate = false; - } - } - - if (!$runUpdate && wfConfig::get('autoUpdateAttempts') < 7) { - return; - } - - try { - require_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'); - require_once(ABSPATH . 'wp-admin/includes/misc.php'); - /* We were creating show_message here so that WP did not write to STDOUT. This had the strange effect of throwing an error about redeclaring show_message function, but only when a crawler hit the site and triggered the cron job. Not a human. So we're now just require'ing misc.php which does generate output, but that's OK because it is a loopback cron request. - if(! function_exists('show_message')){ - function show_message($msg = 'null'){} - } - */ - if(! defined('FS_METHOD')){ - define('FS_METHOD', 'direct'); //May be defined already and might not be 'direct' so this could cause problems. But we were getting reports of a warning that this is already defined, so this check added. - } - require_once(ABSPATH . 'wp-includes/update.php'); - require_once(ABSPATH . 'wp-admin/includes/file.php'); - - if (!self::createLock('wfAutoUpdate')) { - return; - } - - ob_start(); - $upgrader = new Plugin_Upgrader(); - $upret = $upgrader->upgrade(WORDFENCE_BASENAME); - if($upret){ - $cont = file_get_contents(WORDFENCE_FCPATH); - preg_match('/Version: (\d+\.\d+\.\d+)/', $cont, $matches); - $version = !empty($matches) ? $matches[1] : null; - $alertCallback = array(new wfAutoUpdatedAlert($version), 'send'); - do_action('wordfence_security_event', 'autoUpdate', array( - 'version' => $version, - ), $alertCallback); - - wfConfig::set('autoUpdateAttempts', 0); - } - $output = @ob_get_contents(); - @ob_end_clean(); - } catch(Exception $e){} - - self::releaseLock('wfAutoUpdate'); - } - - /** - * .htaccess file contents to disable all script execution in a given directory. - */ - private static $_disable_scripts_htaccess = '# BEGIN Wordfence code execution protection - -php_flag engine 0 - - -php_flag engine 0 - - -php_flag engine 0 - - -AddHandler cgi-script .php .phtml .php3 .pl .py .jsp .asp .htm .shtml .sh .cgi -Options -ExecCGI -# END Wordfence code execution protection -'; - private static $_disable_scripts_regex = '/# BEGIN Wordfence code execution protection.+?# END Wordfence code execution protection/s'; - - private static function _uploadsHtaccessFilePath() { - $upload_dir = wp_upload_dir(); - return $upload_dir['basedir'] . '/.htaccess'; - } - - /** - * Add/Merge .htaccess file in the uploads directory to prevent code execution. - * - * @return bool - * @throws wfConfigException - */ - public static function disableCodeExecutionForUploads() { - $uploads_htaccess_file_path = self::_uploadsHtaccessFilePath(); - $uploads_htaccess_has_content = false; - if (file_exists($uploads_htaccess_file_path)) { - $htaccess_contents = file_get_contents($uploads_htaccess_file_path); - - // htaccess exists and contains our htaccess code to disable script execution, nothing more to do - if (strpos($htaccess_contents, self::$_disable_scripts_htaccess) !== false) { - return true; - } - $uploads_htaccess_has_content = strlen(trim($htaccess_contents)) > 0; - } - if (@file_put_contents($uploads_htaccess_file_path, ($uploads_htaccess_has_content ? "\n\n" : "") . self::$_disable_scripts_htaccess, FILE_APPEND | LOCK_EX) === false) { - throw new wfConfigException(__("Unable to save the .htaccess file needed to disable script execution in the uploads directory. Please check your permissions on that directory.", 'wordfence')); - } - self::set('disableCodeExecutionUploadsPHP7Migrated', true); - return true; - } - - public static function migrateCodeExecutionForUploadsPHP7() { - if (self::get('disableCodeExecutionUploads')) { - if (!self::get('disableCodeExecutionUploadsPHP7Migrated')) { - $uploads_htaccess_file_path = self::_uploadsHtaccessFilePath(); - if (file_exists($uploads_htaccess_file_path)) { - $htaccess_contents = file_get_contents($uploads_htaccess_file_path); - if (preg_match(self::$_disable_scripts_regex, $htaccess_contents)) { - $htaccess_contents = preg_replace(self::$_disable_scripts_regex, self::$_disable_scripts_htaccess, $htaccess_contents); - @file_put_contents($uploads_htaccess_file_path, $htaccess_contents); - self::set('disableCodeExecutionUploadsPHP7Migrated', true); - } - } - } - } - } - - /** - * Remove script execution protections for our the .htaccess file in the uploads directory. - * - * @return bool - * @throws wfConfigException - */ - public static function removeCodeExecutionProtectionForUploads() { - $uploads_htaccess_file_path = self::_uploadsHtaccessFilePath(); - if (file_exists($uploads_htaccess_file_path)) { - $htaccess_contents = file_get_contents($uploads_htaccess_file_path); - - // Check that it is in the file - if (preg_match(self::$_disable_scripts_regex, $htaccess_contents)) { - $htaccess_contents = preg_replace(self::$_disable_scripts_regex, '', $htaccess_contents); - - $error_message = __("Unable to remove code execution protections applied to the .htaccess file in the uploads directory. Please check your permissions on that file.", 'wordfence'); - if (strlen(trim($htaccess_contents)) === 0) { - // empty file, remove it - if (!@unlink($uploads_htaccess_file_path)) { - throw new wfConfigException($error_message); - } - - } elseif (@file_put_contents($uploads_htaccess_file_path, $htaccess_contents, LOCK_EX) === false) { - throw new wfConfigException($error_message); - } - } - } - return true; - } - - /** - * Validates the array of configuration changes without applying any. All bounds checks must be performed here. - * - * @param array $changes - * @return bool|array Returns true if valid, otherwise a displayable error message per error encountered. - * @throws wfWAFStorageFileException - */ - public static function validate($changes) { - $errors = array(); - $waf = wfWAF::getInstance(); - $wafConfig = $waf->getStorageEngine(); - - foreach ($changes as $key => $value) { - $checked = false; - switch ($key) { - //============ WAF - case 'learningModeGracePeriod': - { - //If currently in or will be in learning mode, restrict the grace period to be in the future - $wafStatus = (isset($changes['wafStatus']) ? $changes['wafStatus'] : $wafConfig->getConfig('wafStatus')); - $gracePeriodEnd = strtotime($value); - if ($wafStatus == wfFirewall::FIREWALL_MODE_LEARNING && $gracePeriodEnd <= time()) { - $errors[] = array('option' => $key, 'error' => __('The grace period end time must be in the future.', 'wordfence')); - } - - $checked = true; - break; - } - case 'wafStatus': - { - if ($value != wfFirewall::FIREWALL_MODE_ENABLED && $value != wfFirewall::FIREWALL_MODE_LEARNING && $value != wfFirewall::FIREWALL_MODE_DISABLED) { - $errors[] = array('option' => $key, 'error' => __('Unknown firewall mode.', 'wordfence')); - } - - $checked = true; - break; - } - - //============ Plugin - case 'alertEmails': - { - $dirtyEmails = explode(',', preg_replace('/[\r\n\s\t]+/', '', $value)); - $dirtyEmails = array_filter($dirtyEmails); - $badEmails = array(); - foreach ($dirtyEmails as $email) { - if (!wfUtils::isValidEmail($email)) { - $badEmails[] = $email; - } - } - if (count($badEmails) > 0) { - $errors[] = array('option' => $key, 'error' => __('The following emails are invalid: ', 'wordfence') . esc_html(implode(', ', $badEmails), array())); - } - - $checked = true; - break; - } - case 'scan_include_extra': - { - $dirtyRegexes = explode("\n", $value); - foreach ($dirtyRegexes as $regex) { - if (@preg_match("/$regex/", "") === false) { - $errors[] = array('option' => $key, 'error' => sprintf( - /* translators: Regular expression. */ - __('"%s" is not a valid regular expression.', 'wordfence'), esc_html($regex))); - } - } - $checked = true; - break; - } - case 'whitelisted': - { - $dirtyWhitelisted = explode(',', preg_replace('/[\r\n\s\t]+/', ',', $value)); - $dirtyWhitelisted = array_filter($dirtyWhitelisted); - $badWhiteIPs = array(); - $range = new wfUserIPRange(); - foreach ($dirtyWhitelisted as $whiteIP) { - $range->setIPString($whiteIP); - if (!$range->isValidRange()) { - $badWhiteIPs[] = $whiteIP; - } - } - if (count($badWhiteIPs) > 0) { - $errors[] = array('option' => $key, 'error' => __('Please make sure you separate your IP addresses with commas. The following allowlisted IP addresses are invalid: ', 'wordfence') . esc_html(implode(', ', $badWhiteIPs), array())); - } - - $checked = true; - break; - } - case 'liveTraf_ignoreUsers': - { - $dirtyUsers = explode(',', $value); - $invalidUsers = array(); - foreach ($dirtyUsers as $val) { - $val = trim($val); - if (strlen($val) > 0) { - if (!get_user_by('login', $val)) { - $invalidUsers[] = $val; - } - } - } - if (count($invalidUsers) > 0) { - $errors[] = array('option' => $key, 'error' => __('The following users you selected to ignore in live traffic reports are not valid on this system: ', 'wordfence') . esc_html(implode(', ', $invalidUsers), array())); - } - - $checked = true; - break; - } - case 'liveTraf_ignoreIPs': - { - $dirtyIPs = explode(',', preg_replace('/[\r\n\s\t]+/', '', $value)); - $dirtyIPs = array_filter($dirtyIPs); - $invalidIPs = array(); - foreach ($dirtyIPs as $val) { - if (!wfUtils::isValidIP($val)) { - $invalidIPs[] = $val; - } - } - if (count($invalidIPs) > 0) { - $errors[] = array('option' => $key, 'error' => __('The following IPs you selected to ignore in live traffic reports are not valid: ', 'wordfence') . esc_html(implode(', ', $invalidIPs), array())); - } - - $checked = true; - break; - } - case 'howGetIPs_trusted_proxies': - { - $dirtyIPs = preg_split('/[\r\n,]+/', $value); - $dirtyIPs = array_filter($dirtyIPs); - $invalidIPs = array(); - foreach ($dirtyIPs as $val) { - if (!(wfUtils::isValidIP($val) || wfUtils::isValidCIDRRange($val))) { - $invalidIPs[] = $val; - } - } - if (count($invalidIPs) > 0) { - $errors[] = array('option' => $key, 'error' => __('The following IPs/ranges you selected to trust as proxies are not valid: ', 'wordfence') . esc_html(implode(', ', $invalidIPs), array())); - } - - $checked = true; - break; - } - case 'howGetIPs_trusted_proxy_preset': - { - $presets = wfConfig::getJSON('ipResolutionList', array()); - if (!is_array($presets)) { - $presets = array(); - } - - if (!(empty($value) /* "None" */ || isset($presets[$value]))) { - $errors[] = array('option' => $key, 'error' => __('The selected trusted proxy preset is not valid: ', 'wordfence') . esc_html($value)); - } - - $checked = true; - - break; - } - case 'apiKey': - { - $value = trim($value); - if (empty($value)) { - $errors[] = array('option' => $key, 'error' => __('An empty license key was entered.', 'wordfence')); - } - else if ($value && !preg_match('/^[a-fA-F0-9]+$/', $value)) { - $errors[] = array('option' => $key, 'error' => __('The license key entered is not in a valid format. It must contain only numbers and the letters A-F.', 'wordfence')); - } - - $checked = true; - break; - } - case 'scan_exclude': - { - $exclusionList = explode("\n", trim($value)); - foreach ($exclusionList as $exclusion) { - $exclusion = trim($exclusion); - if ($exclusion === '*') { - $errors[] = array('option' => $key, 'error' => __('A wildcard cannot be used to exclude all files from the scan.', 'wordfence')); - } - } - $checked = true; - break; - } - case 'scan_max_resume_attempts': - { - $value = (int) $value; - wfScanMonitor::validateResumeAttempts($value, $valid); - if (!$valid) - $errors[] = array('option' => $key, 'error' => sprintf(__('Invalid number of scan resume attempts specified: %d', 'wordfence'), $value)); - break; - } - } - } - - if (empty($errors)) { - return true; - } - return $errors; - } - - public static function clean($changes) { - $cleaned = array(); - foreach ($changes as $key => $value) { - if (preg_match('/^whitelistedServices\.([a-z0-9]+)$/i', $key, $matches)) { - if (!isset($cleaned['whitelistedServices']) || !is_array($cleaned['whitelistedServices'])) { - $cleaned['whitelistedServices'] = wfConfig::getJSON('whitelistedServices', array()); - } - - $cleaned['whitelistedServices'][$matches[1]] = wfUtils::truthyToBoolean($value); - } - else { - $cleaned[$key] = $value; - } - } - return $cleaned; - } - - /** - * Saves the array of configuration changes in the correct place. This may currently be the wfConfig table, the WAF's config file, or both. The - * validation function will handle all bounds checks and this will be limited to normalizing the values as needed. - * - * @param array $changes - * @throws wfConfigException - * @throws wfWAFStorageFileException - */ - public static function save($changes) { - $waf = wfWAF::getInstance(); - $wafConfig = $waf->getStorageEngine(); - - $apiKey = false; - if (isset($changes['apiKey'])) { //Defer to end - $apiKey = $changes['apiKey']; - unset($changes['apiKey']); - } - - foreach ($changes as $key => $value) { - $saved = false; - switch ($key) { - //============ WAF - case 'learningModeGracePeriod': - { - $wafStatus = (isset($changes['wafStatus']) ? $changes['wafStatus'] : $wafConfig->getConfig('wafStatus')); - if ($wafStatus == wfFirewall::FIREWALL_MODE_LEARNING) { - $dt = wfUtils::parseLocalTime($value); - $gracePeriodEnd = $dt->format('U'); - $wafConfig->setConfig($key, $gracePeriodEnd); - } - - $saved = true; - break; - } - case 'learningModeGracePeriodEnabled': - { - $wafStatus = (isset($changes['wafStatus']) ? $changes['wafStatus'] : $wafConfig->getConfig('wafStatus')); - if ($wafStatus == wfFirewall::FIREWALL_MODE_LEARNING) { - $wafConfig->setConfig($key, wfUtils::truthyToInt($value)); - } - - $saved = true; - break; - } - case 'wafStatus': - { - $wafConfig->setConfig($key, $value); - if ($value != wfFirewall::FIREWALL_MODE_LEARNING) { - $wafConfig->setConfig('learningModeGracePeriodEnabled', 0); - $wafConfig->unsetConfig('learningModeGracePeriod'); - } - - $firewall = new wfFirewall(); - $firewall->syncStatus(true); - - if ($value == wfFirewall::FIREWALL_MODE_DISABLED) { - $currentUser = wp_get_current_user(); - $username = $currentUser->user_login; - - $alertCallback = array(new wfWafDeactivatedAlert($username, wfUtils::getIP()), 'send'); - do_action('wordfence_security_event', 'wafDeactivated', array( - 'username' => $username, - 'ip' => wfUtils::getIP(), - ), $alertCallback); - } - - $saved = true; - break; - } - case 'wafRules': - { - $disabledRules = (array) $wafConfig->getConfig('disabledRules'); - foreach ($value as $ruleID => $ruleEnabled) { - $ruleID = (int) $ruleID; - if ($ruleEnabled) { - unset($disabledRules[$ruleID]); - } else { - $disabledRules[$ruleID] = true; - } - } - $wafConfig->setConfig('disabledRules', $disabledRules); - - $saved = true; - break; - } - case 'whitelistedURLParams': - { - $whitelistedURLParams = (array) $wafConfig->getConfig('whitelistedURLParams', null, 'livewaf'); - if (isset($value['delete'])) { - foreach ($value['delete'] as $whitelistKey => $unused) { - unset($whitelistedURLParams[$whitelistKey]); - } - } - if (isset($value['enabled'])) { - foreach ($value['enabled'] as $whitelistKey => $enabled) { - if (array_key_exists($whitelistKey, $whitelistedURLParams) && is_array($whitelistedURLParams[$whitelistKey])) { - foreach ($whitelistedURLParams[$whitelistKey] as $ruleID => $data) { - $whitelistedURLParams[$whitelistKey][$ruleID]['disabled'] = !$enabled; - } - } - } - } - $wafConfig->setConfig('whitelistedURLParams', $whitelistedURLParams, 'livewaf'); - - if (isset($value['add'])) { - foreach ($value['add'] as $entry) { - $path = @base64_decode($entry['path']); - $paramKey = @base64_decode($entry['paramKey']); - if (!$path || !$paramKey) { - continue; - } - $data = array( - 'timestamp' => (int) $entry['data']['timestamp'], - 'description' => $entry['data']['description'], - 'ip' => wfUtils::getIP(), - 'disabled' => !!$entry['data']['disabled'], - ); - if (function_exists('get_current_user_id')) { - $data['userID'] = get_current_user_id(); - } - $waf->whitelistRuleForParam($path, $paramKey, 'all', $data); - } - } - - $saved = true; - break; - } - case 'disableWAFBlacklistBlocking': - { - $wafConfig->setConfig($key, wfUtils::truthyToInt($value)); - if (method_exists(wfWAF::getInstance()->getStorageEngine(), 'purgeIPBlocks')) { - wfWAF::getInstance()->getStorageEngine()->purgeIPBlocks(wfWAFStorageInterface::IP_BLOCKS_BLACKLIST); - } - if ($value) { - $cron = wfWAF::getInstance()->getStorageEngine()->getConfig('cron', array(), 'livewaf'); - if (!is_array($cron)) { - $cron = array(); - } - foreach ($cron as $cronKey => $cronJob) { - if ($cronJob instanceof wfWAFCronFetchBlacklistPrefixesEvent) { - unset($cron[$cronKey]); - } - } - $cron[] = new wfWAFCronFetchBlacklistPrefixesEvent(time() - 1); - wfWAF::getInstance()->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - } - - $saved = true; - break; - } - case 'avoid_php_input': - { - $wafConfig->setConfig($key, wfUtils::truthyToInt($value)); - $saved = true; - break; - } - - //============ Plugin (specialty treatment) - case 'alertEmails': - { - $emails = explode(',', preg_replace('/[\r\n\s\t]+/', '', $value)); - $emails = array_filter($emails); //Already validated above - if (count($emails) > 0) { - wfConfig::set($key, implode(',', $emails)); - } - else { - wfConfig::set($key, ''); - } - - $saved = true; - break; - } - case 'loginSec_userBlacklist': - case 'scan_exclude': - case 'email_summary_excluded_directories': - { - if (is_array($value)) { - $value = implode("\n", $value); - } - - wfConfig::set($key, wfUtils::cleanupOneEntryPerLine($value)); - $saved = true; - break; - } - case 'whitelisted': - { - $whiteIPs = explode(',', preg_replace('/[\r\n\s\t]+/', ',', $value)); - $whiteIPs = array_filter($whiteIPs); //Already validated above - if (count($whiteIPs) > 0) { - wfConfig::set($key, implode(',', $whiteIPs)); - } - else { - wfConfig::set($key, ''); - } - - if (method_exists(wfWAF::getInstance()->getStorageEngine(), 'purgeIPBlocks')) { - wfWAF::getInstance()->getStorageEngine()->purgeIPBlocks(wfWAFStorageInterface::IP_BLOCKS_BLACKLIST); - } - - $saved = true; - break; - } - case 'whitelistedServices': - { - if (is_string($value)) { //Already JSON (import/export settings) - wfConfig::set($key, $value); - } - else { - wfConfig::setJSON($key, (array) $value); - } - - $wafConfig->setConfig('whitelistedServiceIPs', @json_encode(wfUtils::whitelistedServiceIPs()), 'synced'); - - if (method_exists(wfWAF::getInstance()->getStorageEngine(), 'purgeIPBlocks')) { - wfWAF::getInstance()->getStorageEngine()->purgeIPBlocks(wfWAFStorageInterface::IP_BLOCKS_BLACKLIST); - } - - $saved = true; - break; - } - case 'liveTraf_ignoreUsers': - { - $dirtyUsers = explode(',', $value); - $validUsers = array(); - foreach ($dirtyUsers as $val) { - $val = trim($val); - if (strlen($val) > 0) { - $validUsers[] = $val; //Already validated above - } - } - if (count($validUsers) > 0) { - wfConfig::set($key, implode(',', $validUsers)); - } - else { - wfConfig::set($key, ''); - } - - $saved = true; - break; - } - case 'liveTraf_ignoreIPs': - { - $validIPs = explode(',', preg_replace('/[\r\n\s\t]+/', '', $value)); - $validIPs = array_filter($validIPs); //Already validated above - if (count($validIPs) > 0) { - wfConfig::set($key, implode(',', $validIPs)); - } - else { - wfConfig::set($key, ''); - } - - $saved = true; - break; - } - case 'liveTraf_ignoreUA': - { - if (preg_match('/[a-zA-Z0-9\d]+/', $value)) { - wfConfig::set($key, trim($value)); - } - else { - wfConfig::set($key, ''); - } - $saved = true; - break; - } - case 'howGetIPs_trusted_proxies': - { - $validIPs = preg_split('/[\r\n,]+/', $value); - $validIPs = array_filter($validIPs); //Already validated above - if (count($validIPs) > 0) { - wfConfig::set($key, implode("\n", $validIPs)); - } - else { - wfConfig::set($key, ''); - } - - $saved = true; - break; - } - case 'other_WFNet': - { - $value = wfUtils::truthyToBoolean($value); - wfConfig::set($key, $value); - if (!$value) { - wfBlock::removeTemporaryWFSNBlocks(); - } - $saved = true; - break; - } - case 'howGetIPs': - { - wfConfig::set($key, $value); - wfConfig::set('detectProxyNextCheck', false, wfConfig::DONT_AUTOLOAD); - $saved = true; - break; - } - case 'bannedURLs': - { - wfConfig::set($key, preg_replace('/[\n\r]+/', ',', $value)); - $saved = true; - break; - } - case 'autoUpdate': - { - if (wfUtils::truthyToBoolean($value)) { - wfConfig::enableAutoUpdate(); //Also sets the option - } - else { - wfConfig::disableAutoUpdate(); - } - $saved = true; - break; - } - case 'disableCodeExecutionUploads': - { - $value = wfUtils::truthyToBoolean($value); - wfConfig::set($key, $value); - if ($value) { - wfConfig::disableCodeExecutionForUploads(); //Can throw wfConfigException - } - else { - wfConfig::removeCodeExecutionProtectionForUploads(); - } - $saved = true; - break; - } - case 'email_summary_interval': - { - wfConfig::set($key, $value); - wfActivityReport::scheduleCronJob(); - $saved = true; - break; - } - case 'email_summary_enabled': - { - $value = wfUtils::truthyToBoolean($value); - wfConfig::set($key, $value); - if ($value) { - wfActivityReport::scheduleCronJob(); - } - else { - wfActivityReport::disableCronJob(); - } - $saved = true; - break; - } - case 'other_hideWPVersion': - { - $value = wfUtils::truthyToBoolean($value); - wfConfig::set($key, $value); - if ($value) { - wfUtils::hideReadme(); - } - else { - wfUtils::showReadme(); - } - $saved = true; - break; - } - case 'liveTraf_maxAge': - { - $value = max(1, $value); - break; - } - - //Scan scheduling - case 'scanSched': - case 'schedStartHour': - case 'manualScanType': - case 'schedMode': - case 'scheduledScansEnabled': - { - wfScanner::setNeedsRescheduling(); - //Letting these fall through to the default save handler - break; - } - } - - //============ Plugin (default treatment) - if (!$saved) { - if (isset(self::$defaultConfig['checkboxes'][$key]) || - (isset(self::$defaultConfig['otherParams'][$key]) && self::$defaultConfig['otherParams'][$key]['validation']['type'] == self::TYPE_BOOL) || - (isset(self::$defaultConfig['defaultsOnly'][$key]) && self::$defaultConfig['defaultsOnly'][$key]['validation']['type'] == self::TYPE_BOOL)) { //Boolean - wfConfig::set($key, wfUtils::truthyToInt($value)); - } - else if ((isset(self::$defaultConfig['otherParams'][$key]) && self::$defaultConfig['otherParams'][$key]['validation']['type'] == self::TYPE_INT) || - (isset(self::$defaultConfig['defaultsOnly'][$key]) && self::$defaultConfig['defaultsOnly'][$key]['validation']['type'] == self::TYPE_INT)) { - wfConfig::set($key, (int) $value); - } - else if ((isset(self::$defaultConfig['otherParams'][$key]) && (self::$defaultConfig['otherParams'][$key]['validation']['type'] == self::TYPE_FLOAT || self::$defaultConfig['otherParams'][$key]['validation']['type'] == self::TYPE_DOUBLE)) || - (isset(self::$defaultConfig['defaultsOnly'][$key]) && (self::$defaultConfig['defaultsOnly'][$key]['validation']['type'] == self::TYPE_FLOAT || self::$defaultConfig['defaultsOnly'][$key]['validation']['type'] == self::TYPE_DOUBLE))) { - wfConfig::set($key, (double) $value); - } - else if ((isset(self::$defaultConfig['otherParams'][$key]) && self::$defaultConfig['otherParams'][$key]['validation']['type'] == self::TYPE_STRING) || - (isset(self::$defaultConfig['defaultsOnly'][$key]) && self::$defaultConfig['defaultsOnly'][$key]['validation']['type'] == self::TYPE_STRING)) { - wfConfig::set($key, (string) $value); - } - else if (in_array($key, self::$serializedOptions)) { - wfConfig::set_ser($key, $value); - } - else if (in_array($key, self::$wfCentralInternalConfig)) { - wfConfig::set($key, $value); - } - else if (WFWAF_DEBUG) { - error_log("*** DEBUG: Config option '{$key}' missing save handler."); - } - } - } - - if ($apiKey !== false) { - $existingAPIKey = wfConfig::get('apiKey', ''); - $apiKey = strtolower(trim($apiKey)); //Already validated above - $ping = false; - if (empty($apiKey)) { //Empty, try getting a free key - $api = new wfAPI('', wfUtils::getWPVersion()); - try { - $keyData = $api->call('get_anon_api_key'); - if ($keyData['ok'] && $keyData['apiKey']) { - wfConfig::set('apiKey', $keyData['apiKey']); - wfConfig::set('isPaid', false); - wfConfig::set('keyType', wfLicense::KEY_TYPE_FREE); - wordfence::licenseStatusChanged(); - wfConfig::set('touppPromptNeeded', true); - } - else { - throw new Exception(__("The Wordfence server's response did not contain the expected elements.", 'wordfence')); - } - } - catch (Exception $e) { - throw new wfConfigException(__('Your options have been saved, but you left your license key blank, so we tried to get you a free license key from the Wordfence servers. There was a problem fetching the free key: ', 'wordfence') . wp_kses($e->getMessage(), array())); - } - } - else if ($existingAPIKey != $apiKey) { //Key changed, try activating - $api = new wfAPI($apiKey, wfUtils::getWPVersion()); - try { - $res = $api->call('check_api_key', array(), array('previousLicense' => $existingAPIKey)); - if ($res['ok'] && isset($res['isPaid'])) { - $isPaid = wfUtils::truthyToBoolean($res['isPaid']); - wfConfig::set('apiKey', $apiKey); - wfConfig::set('isPaid', $isPaid); //res['isPaid'] is boolean coming back as JSON and turned back into PHP struct. Assuming JSON to PHP handles bools. - wordfence::licenseStatusChanged(); - if (!$isPaid) { - wfConfig::set('keyType', wfLicense::KEY_TYPE_FREE); - } - $ping = true; - } - else { - throw new Exception(__("The Wordfence server's response did not contain the expected elements.", 'wordfence')); - } - } - catch (Exception $e) { - throw new wfConfigException(__('Your options have been saved. However we noticed you changed your license key, and we tried to verify it with the Wordfence servers but received an error: ', 'wordfence') . wp_kses($e->getMessage(), array())); - } - } - else { //Key unchanged, just ping it - $ping = true; - } - - if ($ping) { - $api = new wfAPI($apiKey, wfUtils::getWPVersion()); - try { - $keyType = wfLicense::KEY_TYPE_FREE; - $keyData = $api->call('ping_api_key', array(), array('supportHash' => wfConfig::get('supportHash', ''), 'whitelistHash' => wfConfig::get('whitelistHash', ''), 'tldlistHash' => wfConfig::get('tldlistHash', ''), 'ipResolutionListHash' => wfConfig::get('ipResolutionListHash', ''))); - if (isset($keyData['_isPaidKey'])) { - $keyType = wfConfig::get('keyType'); - } - if (isset($keyData['dashboard'])) { - wfConfig::set('lastDashboardCheck', time()); - wfDashboard::processDashboardResponse($keyData['dashboard']); - } - if (isset($keyData['support']) && isset($keyData['supportHash'])) { - wfConfig::set('supportContent', $keyData['support']); - wfConfig::set('supportHash', $keyData['supportHash']); - } - if (isset($keyData['_whitelist']) && isset($keyData['_whitelistHash'])) { - wfConfig::setJSON('whitelistPresets', $keyData['_whitelist']); - wfConfig::set('whitelistHash', $keyData['_whitelistHash']); - } - if (isset($keyData['_tldlist']) && isset($keyData['_tldlistHash'])) { - wfConfig::set('tldlist', $keyData['_tldlist']); - wfConfig::set('tldlistHash', $keyData['_tldlistHash']); - } - if (isset($keyData['_ipResolutionList']) && isset($keyData['_ipResolutionListHash'])) { - wfConfig::setJSON('ipResolutionList', $keyData['_ipResolutionList']); - wfConfig::set('ipResolutionListHash', $keyData['_ipResolutionListHash']); - } - if (isset($keyData['scanSchedule']) && is_array($keyData['scanSchedule'])) { - wfConfig::set_ser('noc1ScanSchedule', $keyData['scanSchedule']); - if (wfScanner::shared()->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC) { - wfScanner::shared()->scheduleScans(); - } - } - if (isset($keyData['showWfCentralUI'])) { - wfConfig::set('showWfCentralUI', (int) $keyData['showWfCentralUI']); - } - - wfConfig::set('keyType', $keyType); - } - catch (Exception $e){ - throw new wfConfigException(__('Your options have been saved. However we tried to verify your license key with the Wordfence servers and received an error: ', 'wordfence') . wp_kses($e->getMessage(), array())); - } - } - } - - wfNotification::reconcileNotificationsWithOptions(); - wfCentral::requestConfigurationSync(); - } - - public static function restoreDefaults($section) { - switch ($section) { - case self::OPTIONS_TYPE_GLOBAL: - $options = array( - 'alertOn_critical', - 'alertOn_update', - 'alertOn_warnings', - 'alertOn_throttle', - 'alertOn_block', - 'alertOn_loginLockout', - 'alertOn_breachLogin', - 'alertOn_lostPasswdForm', - 'alertOn_adminLogin', - 'alertOn_firstAdminLoginOnly', - 'alertOn_nonAdminLogin', - 'alertOn_firstNonAdminLoginOnly', - 'alertOn_wordfenceDeactivated', - 'liveActivityPauseEnabled', - 'notification_updatesNeeded', - 'notification_securityAlerts', - 'notification_promotions', - 'notification_blogHighlights', - 'notification_productUpdates', - 'notification_scanStatus', - 'enableRemoteIpLookup', - 'other_hideWPVersion', - 'other_bypassLitespeedNoabort', - 'deleteTablesOnDeact', - 'autoUpdate', - 'disableCodeExecutionUploads', - 'email_summary_enabled', - 'email_summary_dashboard_widget_enabled', - 'howGetIPs', - 'actUpdateInterval', - 'alert_maxHourly', - 'email_summary_interval', - 'email_summary_excluded_directories', - 'howGetIPs_trusted_proxies', - 'howGetIPs_trusted_proxy_preset', - 'displayTopLevelOptions', - ); - break; - case self::OPTIONS_TYPE_FIREWALL: - $options = array( - 'firewallEnabled', - 'autoBlockScanners', - 'loginSecurityEnabled', - 'loginSec_strongPasswds_enabled', - 'loginSec_breachPasswds_enabled', - 'loginSec_lockInvalidUsers', - 'loginSec_maskLoginErrors', - 'loginSec_blockAdminReg', - 'loginSec_disableAuthorScan', - 'loginSec_disableOEmbedAuthor', - 'other_blockBadPOST', - 'other_pwStrengthOnUpdate', - 'other_WFNet', - 'ajaxWatcherDisabled_front', - 'ajaxWatcherDisabled_admin', - 'wafAlertOnAttacks', - 'disableWAFIPBlocking', - 'whitelisted', - 'whitelistedServices', - 'bannedURLs', - 'loginSec_userBlacklist', - 'neverBlockBG', - 'loginSec_countFailMins', - 'loginSec_lockoutMins', - 'loginSec_strongPasswds', - 'loginSec_breachPasswds', - 'loginSec_maxFailures', - 'loginSec_maxForgotPasswd', - 'maxGlobalRequests', - 'maxGlobalRequests_action', - 'maxRequestsCrawlers', - 'maxRequestsCrawlers_action', - 'maxRequestsHumans', - 'maxRequestsHumans_action', - 'max404Crawlers', - 'max404Crawlers_action', - 'max404Humans', - 'max404Humans_action', - 'blockedTime', - 'allowed404s', - 'wafAlertWhitelist', - 'wafAlertInterval', - 'wafAlertThreshold', - 'dismissAutoPrependNotice', - ); - break; - case self::OPTIONS_TYPE_BLOCKING: - $options = array( - 'displayTopLevelBlocking', - 'cbl_loggedInBlocked', - 'cbl_action', - 'cbl_redirURL', - 'cbl_bypassRedirURL', - 'cbl_bypassRedirDest', - 'cbl_bypassViewURL', - ); - break; - case self::OPTIONS_TYPE_SCANNER: - $options = array( - 'checkSpamIP', - 'spamvertizeCheck', - 'scheduledScansEnabled', - 'lowResourceScansEnabled', - 'scansEnabled_checkGSB', - 'scansEnabled_checkHowGetIPs', - 'scansEnabled_core', - 'scansEnabled_themes', - 'scansEnabled_plugins', - 'scansEnabled_coreUnknown', - 'scansEnabled_malware', - 'scansEnabled_fileContents', - 'scansEnabled_fileContentsGSB', - 'scansEnabled_checkReadableConfig', - 'scansEnabled_suspectedFiles', - 'scansEnabled_posts', - 'scansEnabled_comments', - 'scansEnabled_suspiciousOptions', - 'scansEnabled_passwds', - 'scansEnabled_diskSpace', - 'scansEnabled_wafStatus', - 'scansEnabled_options', - 'scansEnabled_wpscan_fullPathDisclosure', - 'scansEnabled_wpscan_directoryListingEnabled', - 'scansEnabled_scanImages', - 'scansEnabled_highSense', - 'scansEnabled_oldVersions', - 'scansEnabled_suspiciousAdminUsers', - 'scan_include_extra', - 'maxMem', - 'scan_exclude', - 'scan_maxIssues', - 'scan_maxDuration', - 'maxExecutionTime', - 'scanType', - 'manualScanType', - 'schedMode', - ); - break; - case self::OPTIONS_TYPE_TWO_FACTOR: - $options = array( - 'loginSec_requireAdminTwoFactor', - 'loginSec_enableSeparateTwoFactor', - ); - break; - case self::OPTIONS_TYPE_LIVE_TRAFFIC: - $options = array( - 'liveTrafficEnabled', - 'liveTraf_ignorePublishers', - 'liveTraf_displayExpandedRecords', - 'liveTraf_ignoreUsers', - 'liveTraf_ignoreIPs', - 'liveTraf_ignoreUA', - 'liveTraf_maxRows', - 'liveTraf_maxAge', - 'displayTopLevelLiveTraffic', - ); - break; - case self::OPTIONS_TYPE_DIAGNOSTICS: - $options = array( - 'debugOn', - 'startScansRemotely', - 'ssl_verify', - 'wordfenceI18n', - ); - break; - case self::OPTIONS_TYPE_ALL: - $options = array( - 'alertOn_critical', - 'alertOn_update', - 'alertOn_warnings', - 'alertOn_throttle', - 'alertOn_block', - 'alertOn_loginLockout', - 'alertOn_breachLogin', - 'alertOn_lostPasswdForm', - 'alertOn_adminLogin', - 'alertOn_firstAdminLoginOnly', - 'alertOn_nonAdminLogin', - 'alertOn_firstNonAdminLoginOnly', - 'alertOn_wordfenceDeactivated', - 'liveActivityPauseEnabled', - 'notification_updatesNeeded', - 'notification_securityAlerts', - 'notification_promotions', - 'notification_blogHighlights', - 'notification_productUpdates', - 'notification_scanStatus', - 'other_hideWPVersion', - 'other_bypassLitespeedNoabort', - 'deleteTablesOnDeact', - 'autoUpdate', - 'disableCodeExecutionUploads', - 'email_summary_enabled', - 'email_summary_dashboard_widget_enabled', - 'howGetIPs', - 'actUpdateInterval', - 'alert_maxHourly', - 'email_summary_interval', - 'email_summary_excluded_directories', - 'howGetIPs_trusted_proxies', - 'howGetIPs_trusted_proxy_preset', - 'firewallEnabled', - 'autoBlockScanners', - 'loginSecurityEnabled', - 'loginSec_strongPasswds_enabled', - 'loginSec_breachPasswds_enabled', - 'loginSec_lockInvalidUsers', - 'loginSec_maskLoginErrors', - 'loginSec_blockAdminReg', - 'loginSec_disableAuthorScan', - 'loginSec_disableOEmbedAuthor', - 'other_blockBadPOST', - 'other_pwStrengthOnUpdate', - 'other_WFNet', - 'ajaxWatcherDisabled_front', - 'ajaxWatcherDisabled_admin', - 'wafAlertOnAttacks', - 'disableWAFIPBlocking', - 'whitelisted', - 'whitelistedServices', - 'bannedURLs', - 'loginSec_userBlacklist', - 'neverBlockBG', - 'loginSec_countFailMins', - 'loginSec_lockoutMins', - 'loginSec_strongPasswds', - 'loginSec_breachPasswds', - 'loginSec_maxFailures', - 'loginSec_maxForgotPasswd', - 'maxGlobalRequests', - 'maxGlobalRequests_action', - 'maxRequestsCrawlers', - 'maxRequestsCrawlers_action', - 'maxRequestsHumans', - 'maxRequestsHumans_action', - 'max404Crawlers', - 'max404Crawlers_action', - 'max404Humans', - 'max404Humans_action', - 'blockedTime', - 'allowed404s', - 'wafAlertWhitelist', - 'wafAlertInterval', - 'wafAlertThreshold', - 'dismissAutoPrependNotice', - 'displayTopLevelBlocking', - 'cbl_loggedInBlocked', - 'cbl_action', - 'cbl_redirURL', - 'cbl_bypassRedirURL', - 'cbl_bypassRedirDest', - 'cbl_bypassViewURL', - 'checkSpamIP', - 'spamvertizeCheck', - 'scheduledScansEnabled', - 'lowResourceScansEnabled', - 'scansEnabled_checkGSB', - 'scansEnabled_checkHowGetIPs', - 'scansEnabled_core', - 'scansEnabled_themes', - 'scansEnabled_plugins', - 'scansEnabled_coreUnknown', - 'scansEnabled_malware', - 'scansEnabled_fileContents', - 'scansEnabled_fileContentsGSB', - 'scansEnabled_checkReadableConfig', - 'scansEnabled_suspectedFiles', - 'scansEnabled_posts', - 'scansEnabled_comments', - 'scansEnabled_suspiciousOptions', - 'scansEnabled_passwds', - 'scansEnabled_diskSpace', - 'scansEnabled_wafStatus', - 'scansEnabled_options', - 'scansEnabled_wpscan_fullPathDisclosure', - 'scansEnabled_wpscan_directoryListingEnabled', - 'scansEnabled_scanImages', - 'scansEnabled_highSense', - 'scansEnabled_oldVersions', - 'scansEnabled_suspiciousAdminUsers', - 'scan_include_extra', - 'maxMem', - 'scan_exclude', - 'scan_maxIssues', - 'scan_maxDuration', - 'maxExecutionTime', - 'scanType', - 'manualScanType', - 'schedMode', - 'loginSec_requireAdminTwoFactor', - 'loginSec_enableSeparateTwoFactor', - 'liveTrafficEnabled', - 'liveTraf_ignorePublishers', - 'liveTraf_displayExpandedRecords', - 'liveTraf_ignoreUsers', - 'liveTraf_ignoreIPs', - 'liveTraf_ignoreUA', - 'liveTraf_maxRows', - 'liveTraf_maxAge', - 'displayTopLevelLiveTraffic', - 'other_scanComments', - 'advancedCommentScanning', - ); - break; - } - - if (isset($options)) { - $changes = array(); - foreach ($options as $key) { - if (isset(self::$defaultConfig['checkboxes'][$key])) { - $changes[$key] = self::$defaultConfig['checkboxes'][$key]['value']; - } - else if (isset(self::$defaultConfig['otherParams'][$key])) { - $changes[$key] = self::$defaultConfig['otherParams'][$key]['value']; - } - else if (isset(self::$defaultConfig['defaultsOnly'][$key])) { - $changes[$key] = self::$defaultConfig['defaultsOnly'][$key]['value']; - } - } - - try { - self::save($changes); - return true; - } - catch (Exception $e) { - //Do nothing - } - } - - return false; - } -} - -class wfConfigException extends Exception {} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfCrawl.php b/wp/wp-content/plugins/wordfence/lib/wfCrawl.php deleted file mode 100644 index 45b5f093..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfCrawl.php +++ /dev/null @@ -1,192 +0,0 @@ -getBrowser($UA); - if (!$b || $b['Parent'] == 'DefaultProperties') { - $IP = wfUtils::getIP(); - return !wfLog::isHumanRequest($IP, $UA); - } - else if (isset($b['Crawler']) && $b['Crawler']) { - return true; - } - - return false; - } - public static function verifyCrawlerPTR($hostPattern, $IP){ - $table = wfDB::networkTable('wfCrawlers'); - $db = new wfDB(); - $IPn = wfUtils::inet_pton($IP); - $status = $db->querySingle("select status from $table where IP=%s and patternSig=UNHEX(MD5('%s')) and lastUpdate > unix_timestamp() - %d", $IPn, $hostPattern, WORDFENCE_CRAWLER_VERIFY_CACHE_TIME); - if($status){ - if($status == 'verified'){ - return true; - } else { - return false; - } - } - $host = wfUtils::reverseLookup($IP); - if(! $host){ - $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values (%s, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $IPn, $hostPattern, 'noPTR', '', 'noPTR', ''); - return false; - } - if(preg_match($hostPattern, $host)){ - $resultIPs = wfUtils::resolveDomainName($host); - $addrsMatch = false; - foreach($resultIPs as $resultIP){ - if($resultIP == $IP){ - $addrsMatch = true; - break; - } - } - if($addrsMatch){ - $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values (%s, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $IPn, $hostPattern, 'verified', $host, 'verified', $host); - return true; - } else { - $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values (%s, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $IPn, $hostPattern, 'fwdFail', $host, 'fwdFail', $host); - return false; - } - } else { - $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values (%s, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $IPn, $hostPattern, 'badPTR', $host, 'badPTR', $host); - return false; - } - } - public static function isGooglebot($userAgent = null){ - if ($userAgent === null) { - $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; - } - return (bool) preg_match('/Googlebot\/\d\.\d/', $userAgent); - } - public static function isGoogleCrawler($userAgent = null){ - if ($userAgent === null) { - $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; - } - foreach (self::$googPat as $pat) { - if (preg_match($pat . 'i', $userAgent)) { - return true; - } - } - return false; - } - private static $googPat = array( -'@^Mozilla/5\\.0 \\(.*Google Keyword Tool.*\\)$@', -'@^Mozilla/5\\.0 \\(.*Feedfetcher\\-Google.*\\)$@', -'@^Feedfetcher\\-Google\\-iGoogleGadgets.*$@', -'@^searchbot admin\\@google\\.com$@', -'@^Google\\-Site\\-Verification.*$@', -'@^Google OpenSocial agent.*$@', -'@^.*Googlebot\\-Mobile/2\\..*$@', -'@^AdsBot\\-Google\\-Mobile.*$@', -'@^google \\(.*Enterprise.*\\)$@', -'@^Mediapartners\\-Google.*$@', -'@^GoogleFriendConnect.*$@', -'@^googlebot\\-urlconsole$@', -'@^.*Google Web Preview.*$@', -'@^Feedfetcher\\-Google.*$@', -'@^AppEngine\\-Google.*$@', -'@^Googlebot\\-Video.*$@', -'@^Googlebot\\-Image.*$@', -'@^Google\\-Sitemaps.*$@', -'@^Googlebot/Test.*$@', -'@^Googlebot\\-News.*$@', -'@^.*Googlebot/2\\.1.*$@', -'@^AdsBot\\-Google.*$@', -'@^Google$@' - ); - - - /** - * Has correct user agent and PTR record points to .googlebot.com domain. - * - * @param string|null $ip - * @param string|null $ua - * @return bool - */ - public static function isVerifiedGoogleCrawler($ip = null, $ua = null) { - static $verified; - if (!isset($verified)) { - $verified = array(); - } - if ($ip === null) { - $ip = wfUtils::getIP(); - } - - if ($ip === null || $ip === false) { //Likely a CLI execution - return false; - } - - if (array_key_exists($ip, $verified)) { - return $verified[$ip]; - } - if (self::isGoogleCrawler($ua)) { - if (self::verifyCrawlerPTR(wordfence::getLog()->getGooglePattern(), $ip)) { - $verified[$ip] = true; - return $verified[$ip]; - } - $noc1Status = self::verifyGooglebotViaNOC1($ip); - if ($noc1Status == self::GOOGLE_BOT_VERIFIED) { - $verified[$ip] = true; - return $verified[$ip]; - } - else if ($noc1Status == self::GOOGLE_BOT_FAKE) { - $verified[$ip] = false; - return $verified[$ip]; - } - - return true; //We were unable to successfully validate Googlebot status so default to being permissive - } - $verified[$ip] = false; - return $verified[$ip]; - } - - /** - * Attempts to verify whether an IP claiming to be Googlebot is actually Googlebot. - * - * @param string|null $ip - * @return string - */ - public static function verifyGooglebotViaNOC1($ip = null) { - $table = wfDB::networkTable('wfCrawlers'); - if ($ip === null) { - $ip = wfUtils::getIP(); - } - $db = new wfDB(); - $IPn = wfUtils::inet_pton($ip); - $patternSig = 'googlenoc1'; - $status = $db->querySingle("select status from $table - where IP=%s - and patternSig=UNHEX(MD5('%s')) - and lastUpdate > unix_timestamp() - %d", - $IPn, - $patternSig, - WORDFENCE_CRAWLER_VERIFY_CACHE_TIME); - if ($status === 'verified') { - return self::GOOGLE_BOT_VERIFIED; - } else if ($status === 'fakeBot') { - return self::GOOGLE_BOT_FAKE; - } - - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $data = $api->call('verify_googlebot', array( - 'ip' => $ip, - )); - if (is_array($data) && !empty($data['verified'])) { - // Cache results - $db->queryWrite("INSERT INTO {$table} (IP, patternSig, status, lastUpdate) VALUES ('%s', UNHEX(MD5('%s')), '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE status = VALUES(status), lastUpdate = VALUES(lastUpdate)", $IPn, $patternSig, 'verified'); - return self::GOOGLE_BOT_VERIFIED; - } else { - $db->queryWrite("INSERT INTO {$table} (IP, patternSig, status, lastUpdate) VALUES ('%s', UNHEX(MD5('%s')), '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE status = VALUES(status), lastUpdate = VALUES(lastUpdate)", $IPn, $patternSig, 'fakeBot'); - self::GOOGLE_BOT_FAKE; - } - } catch (Exception $e) { - // Do nothing, bail - } - return self::GOOGLE_BOT_UNDETERMINED; - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfCredentialsController.php b/wp/wp-content/plugins/wordfence/lib/wfCredentialsController.php deleted file mode 100644 index 9cd3b553..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfCredentialsController.php +++ /dev/null @@ -1,183 +0,0 @@ -exists()) { - return true; - } - } - } - } - return false; - } - - public static function hasNew2FARecords() { - if (version_compare(phpversion(), '5.3', '>=') && class_exists('\WordfenceLS\Controller_DB')) { - global $wpdb; - $table = WFLSPHP52Compatability::secrets_table(); - return !!intval($wpdb->get_var("SELECT COUNT(*) FROM `{$table}`")); - } - return false; - } - - /** - * Queries the API and returns whether or not the password exists in the breach database. - * - * @param string $login - * @param string $password - * @return bool - */ - public static function isLeakedPassword($login, $password) { - $sha1 = strtoupper(hash('sha1', $password)); - $prefix = substr($sha1, 0, 5); - - $ssl_verify = (bool) wfConfig::get('ssl_verify'); - $args = array( - 'timeout' => 5, - 'user-agent' => "Wordfence.com UA " . (defined('WORDFENCE_VERSION') ? WORDFENCE_VERSION : '[Unknown version]'), - 'sslverify' => $ssl_verify, - 'headers' => array('Referer' => false), - ); - - if (!$ssl_verify) { // Some versions of cURL will complain that SSL verification is disabled but the CA bundle was supplied. - $args['sslcertificates'] = false; - } - - $response = wp_remote_get(sprintf(WORDFENCE_BREACH_URL_BASE_SEC . "%s.txt", $prefix), $args); - - if (!is_wp_error($response)) { - $data = wp_remote_retrieve_body($response); - $lines = explode("\n", $data); - foreach ($lines as $l) { - $components = explode(":", $l); - $teshSHA1 = $prefix . strtoupper($components[0]); - if (hash_equals($sha1, $teshSHA1)) { - return true; - } - } - } - - return false; - } - - /** - * Returns the transient key for the given user. - * - * @param WP_User $user - * @return string - */ - protected static function _cachedCredentialStatusKey($user) { - $key = 'wfcredentialstatus_' . $user->ID; - return $key; - } - - /** - * Returns the cached credential status for the given user: self::UNCACHED, self::NOT_LEAKED, or self::LEAKED. - * - * @param WP_User $user - * @return string - */ - public static function cachedCredentialStatus($user) { - $key = self::_cachedCredentialStatusKey($user); - $value = get_transient($key); - if ($value === false) { - return self::UNCACHED; - } - - $status = substr($value, 0, 1); - if (strlen($value) > 1) { - if (!hash_equals(substr($value, 1), hash('sha256', $user->user_pass))) { //Different hash but our clear function wasn't called so treat it as uncached - return self::UNCACHED; - } - } - - if ($status) { - return self::LEAKED; - } - return self::NOT_LEAKED; - } - - /** - * Stores a cached leak value for the given user. - * - * @param WP_User $user - * @param bool $isLeaked - */ - public static function setCachedCredentialStatus($user, $isLeaked) { - $key = self::_cachedCredentialStatusKey($user); - set_transient($key, ($isLeaked ? '1' : '0') . hash('sha256', $user->user_pass), 3600); - } - - /** - * Clears the cache for the given user. - * - * @param WP_User $user - */ - public static function clearCachedCredentialStatus($user) { - $key = self::_cachedCredentialStatusKey($user); - delete_transient($key); - } - - /** - * Returns whether or not we've seen a successful login from $ip for the given user. - * - * @param WP_User $user - * @param string $ip - * @return bool - */ - public static function hasPreviousLoginFromIP($user, $ip) { - global $wpdb; - $table_wfLogins = wfDB::networkTable('wfLogins'); - - $id = property_exists($user, 'ID') ? $user->ID : 0; - if ($id == 0) { - return false; - } - - $result = $wpdb->get_row($wpdb->prepare("SELECT id FROM {$table_wfLogins} WHERE action = 'loginOK' AND userID = %d AND IP = %s LIMIT 0,1", $id, wfUtils::inet_pton($ip)), ARRAY_A); - if (is_array($result)) { - return true; - } - - $lastAdminLogin = wfConfig::get_ser('lastAdminLogin'); - if (is_array($lastAdminLogin) && isset($lastAdminLogin['userID']) && isset($lastAdminLogin['IP'])) { - if ($lastAdminLogin['userID'] == $id && wfUtils::inet_pton($lastAdminLogin['IP']) == wfUtils::inet_pton($ip)) { - return true; - } - return false; - } - - //Final check -- if the IP recorded at plugin activation matches, let it through. This is __only__ checked when we don't have any other record of an admin login. - $activatingIP = wfConfig::get('activatingIP'); - if (wfUtils::isValidIP($activatingIP)) { - if (wfUtils::inet_pton($activatingIP) == wfUtils::inet_pton($ip)) { - return true; - } - } - - return false; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfCrypt.php b/wp/wp-content/plugins/wordfence/lib/wfCrypt.php deleted file mode 100644 index ad7c3b7a..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfCrypt.php +++ /dev/null @@ -1,86 +0,0 @@ - , 'signature' => ). - */ - public static function noc1_encrypt($payload) { - $payloadJSON = json_encode($payload); - - $keyData = file_get_contents(dirname(__FILE__) . '/noc1.key'); - $key = @openssl_get_publickey($keyData); - if ($key !== false) { - $symmetricKey = wfWAFUtils::random_bytes(32); - $iv = wfWAFUtils::random_bytes(16); - $encrypted = @openssl_encrypt($payloadJSON, 'aes-256-cbc', $symmetricKey, OPENSSL_RAW_DATA, $iv); - if ($encrypted !== false) { - $success = openssl_public_encrypt($symmetricKey, $symmetricKeyEncrypted, $key, OPENSSL_PKCS1_OAEP_PADDING); - if ($success) { - $message = $iv . $symmetricKeyEncrypted . $encrypted; - $signatureRaw = hash('sha256', $message, true); - $success = openssl_public_encrypt($signatureRaw, $signature, $key, OPENSSL_PKCS1_OAEP_PADDING); - if ($success) { - $package = array('message' => bin2hex($message), 'signature' => bin2hex($signature)); - return $package; - } - } - } - } - return array(); - } - - /** - * Returns a SHA256 HMAC for $payload using the local long key. - * - * @param $payload - * @return false|string - */ - public static function local_sign($payload) { - return hash_hmac('sha256', $payload, wfConfig::get('longEncKey')); - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfCurlInterceptor.php b/wp/wp-content/plugins/wordfence/lib/wfCurlInterceptor.php deleted file mode 100644 index 7516b5b0..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfCurlInterceptor.php +++ /dev/null @@ -1,46 +0,0 @@ -requireInterception = $requireInterception; - } - - private function reset() { - $this->handle = null; - } - - public function setOption($option, $value) { - $this->options[$option] = $value; - } - - public function getHandle() { - return $this->handle; - } - - public function handleHook($handle) { - $this->handle = $handle; - curl_setopt_array($handle, $this->options); - } - - public function intercept($callable) { - $this->reset(); - $action = array($this, 'handleHook'); - add_action(self::HOOK_NAME, $action); - $result = $callable(); - if ($this->handle === null && $this->requireInterception) - throw new wfCurlInterceptionFailedException('Hook was not invoked with a valid cURL handle'); - remove_action(self::HOOK_NAME, $action); - return $result; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfDB.php b/wp/wp-content/plugins/wordfence/lib/wfDB.php deleted file mode 100644 index 76cac70e..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfDB.php +++ /dev/null @@ -1,328 +0,0 @@ -base_prefix; - } - - /** - * Returns the table with the site (single site installations) or network (multisite) prefix added. - * - * @param string $table - * @param bool $applyCaseConversion Whether or not to convert the table case to what is actually in use. - * @return string - */ - public static function networkTable($table, $applyCaseConversion = true) { - if (wfSchema::usingLowercase() && $applyCaseConversion) { - $table = strtolower($table); - } - return self::networkPrefix() . $table; - } - - /** - * Returns the table prefix for the given blog ID. On single site installations, this will be equivalent to wfDB::networkPrefix(). - * - * @param int $blogID - * @return string - */ - public static function blogPrefix($blogID) { - global $wpdb; - return $wpdb->get_blog_prefix($blogID); - } - - /** - * Returns the table with the site (single site installations) or blog-specific (multisite) prefix added. - * - * @param string $table - * @param bool $applyCaseConversion Whether or not to convert the table case to what is actually in use. - * @return string - */ - public static function blogTable($table, $blogID, $applyCaseConversion = true) { - if (wfSchema::usingLowercase() && $applyCaseConversion) { - $table = strtolower($table); - } - return self::blogPrefix($blogID) . $table; - } - - public function querySingle(){ - global $wpdb; - if(func_num_args() > 1){ - $args = func_get_args(); - return $wpdb->get_var(call_user_func_array(array($wpdb, 'prepare'), $args)); - } else { - return $wpdb->get_var(func_get_arg(0)); - } - } - public function querySingleRec(){ //queryInSprintfFormat, arg1, arg2, ... :: Returns a single assoc-array or null if nothing found. - global $wpdb; - if(func_num_args() > 1){ - $args = func_get_args(); - return $wpdb->get_row(call_user_func_array(array($wpdb, 'prepare'), $args), ARRAY_A); - } else { - return $wpdb->get_row(func_get_arg(0), ARRAY_A); - } - } - public function queryWrite(){ - global $wpdb; - if(func_num_args() > 1){ - $args = func_get_args(); - return $wpdb->query(call_user_func_array(array($wpdb, 'prepare'), $args)); - } else { - return $wpdb->query(func_get_arg(0)); - } - } - public function queryWriteArray($query, $array) { - global $wpdb; - return $wpdb->query($wpdb->prepare($query, $array)); - } - public function flush(){ //Clear cache - global $wpdb; - $wpdb->flush(); - } - public function querySelect(){ //sprintfString, arguments :: always returns array() and will be empty if no results. - global $wpdb; - if(func_num_args() > 1){ - $args = func_get_args(); - return $wpdb->get_results(call_user_func_array(array($wpdb, 'prepare'), $args), ARRAY_A); - } else { - return $wpdb->get_results(func_get_arg(0), ARRAY_A); - } - } - public function queryWriteIgnoreError(){ //sprintfString, arguments - global $wpdb; - $oldSuppress = $wpdb->suppress_errors(true); - $args = func_get_args(); - call_user_func_array(array($this, 'queryWrite'), $args); - $wpdb->suppress_errors($oldSuppress); - } - public function columnExists($table, $col){ - $table = wfDB::networkTable($table); - $q = $this->querySelect("desc $table"); - foreach($q as $row){ - if($row['Field'] == $col){ - return true; - } - } - return false; - } - public function dropColumn($table, $col){ - $table = wfDB::networkTable($table); - $this->queryWrite("alter table $table drop column $col"); - } - public function createKeyIfNotExists($table, $col, $keyName){ - $table = wfDB::networkTable($table); - - $exists = $this->querySingle(<<querySelect("show keys from $table"); - foreach($q as $row){ - if($row['Key_name'] == $keyName){ - $keyFound = true; - } - } - } - if(! $keyFound){ - $this->queryWrite("alter table $table add KEY $keyName($col)"); - } - } - public function getMaxAllowedPacketBytes(){ - $rec = $this->querySingleRec("show variables like 'max_allowed_packet'"); - return intval($rec['Value']); - } - public function getMaxLongDataSizeBytes() { - $rec = $this->querySingleRec("show variables like 'max_long_data_size'"); - return $rec['Value']; - } - public function truncate($table){ //Ensures everything is deleted if user is using MySQL >= 5.1.16 and does not have "drop" privileges - $this->queryWrite("truncate table $table"); - $this->queryWrite("delete from $table"); - } - public function getLastError(){ - global $wpdb; - return $wpdb->last_error; - } - public function realEscape($str){ - global $wpdb; - return $wpdb->_real_escape($str); - } -} - -abstract class wfModel { - - private $data; - private $db; - private $dirty = false; - - /** - * Column name of the primary key field. - * - * @return string - */ - abstract public function getIDColumn(); - - /** - * Table name. - * - * @return mixed - */ - abstract public function getTable(); - - /** - * Checks if this is a valid column in the table before setting data on the model. - * - * @param string $column - * @return boolean - */ - abstract public function hasColumn($column); - - /** - * wfModel constructor. - * @param array|int|string $data - */ - public function __construct($data = array()) { - if (is_array($data) || is_object($data)) { - $this->setData($data); - } else if (is_numeric($data)) { - $this->fetchByID($data); - } - } - - public function fetchByID($id) { - $id = absint($id); - $data = $this->getDB()->get_row($this->getDB()->prepare('SELECT * FROM ' . $this->getTable() . - ' WHERE ' . $this->getIDColumn() . ' = %d', $id)); - if ($data) { - $this->setData($data); - return true; - } - return false; - } - - /** - * @return bool - */ - public function save() { - if (!$this->dirty) { - return false; - } - $this->dirty = ($this->getPrimaryKey() ? $this->update() : $this->insert()) === false; - return !$this->dirty; - } - - /** - * @return false|int - */ - public function insert() { - $data = $this->getData(); - unset($data[$this->getPrimaryKey()]); - $rowsAffected = $this->getDB()->insert($this->getTable(), $data); - $this->setPrimaryKey($this->getDB()->insert_id); - return $rowsAffected; - } - - /** - * @return false|int - */ - public function update() { - return $this->getDB()->update($this->getTable(), $this->getData(), array( - $this->getIDColumn() => $this->getPrimaryKey(), - )); - } - - /** - * @param $name string - * @return mixed - */ - public function __get($name) { - if (!$this->hasColumn($name)) { - return null; - } - return array_key_exists($name, $this->data) ? $this->data[$name] : null; - } - - /** - * @param $name string - * @param $value mixed - */ - public function __set($name, $value) { - if (!$this->hasColumn($name)) { - return; - } - $this->data[$name] = $value; - $this->dirty = true; - } - - /** - * @return array - */ - public function getData() { - return $this->data; - } - - /** - * @param array $data - * @param bool $flagDirty - */ - public function setData($data, $flagDirty = true) { - $this->data = array(); - foreach ($data as $column => $value) { - if ($this->hasColumn($column)) { - $this->data[$column] = $value; - $this->dirty = (bool) $flagDirty; - } - } - } - - /** - * @return wpdb - */ - public function getDB() { - if ($this->db === null) { - global $wpdb; - $this->db = $wpdb; - } - return $this->db; - } - - /** - * @param wpdb $db - */ - public function setDB($db) { - $this->db = $db; - } - - /** - * @return int - */ - public function getPrimaryKey() { - return $this->{$this->getIDColumn()}; - } - - /** - * @param int $value - */ - public function setPrimaryKey($value) { - $this->{$this->getIDColumn()} = $value; - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfDashboard.php b/wp/wp-content/plugins/wordfence/lib/wfDashboard.php deleted file mode 100644 index 3e31dc61..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfDashboard.php +++ /dev/null @@ -1,234 +0,0 @@ -markAsRead(); - } - } - - unset($data['revoked']); - } - wfConfig::set_ser('dashboardData', $data); - } - - public function __construct() { - // Scan values - $lastScanCompleted = wfConfig::get('lastScanCompleted'); - if ($lastScanCompleted === false || empty($lastScanCompleted)) { - $this->scanLastStatus = self::SCAN_NEVER_RAN; - } - else if ($lastScanCompleted == 'ok') { - $this->scanLastStatus = self::SCAN_SUCCESS; - - $i = new wfIssues(); - $this->scanLastCompletion = (int) wfScanner::shared()->lastScanTime(); - $issueCount = $i->getIssueCount(); - if ($issueCount) { - $this->scanLastStatus = self::SCAN_WARNINGS; - $this->scanLastStatusMessage = "{$issueCount} issue" . ($issueCount == 1 ? ' found' : 's found'); - } - } - else { - $this->scanLastStatus = self::SCAN_FAILED; - $n = wfNotification::getNotificationForCategory('wfplugin_scan', false); - if ($n !== null) { - $this->scanLastStatusMessage = $n->html; - } - else { - $this->scanLastStatusMessage = esc_html(substr($lastScanCompleted, 0, 100) . (strlen($lastScanCompleted) > 100 ? '...' : '')); - } - } - - // Notifications - $this->notifications = wfNotification::notifications(); - - // Features - $countryBlocking = self::FEATURE_PREMIUM; - if (wfConfig::get('isPaid')) { - $countryBlocking = self::FEATURE_DISABLED; - $countryList = wfConfig::get('cbl_countries'); - if (!empty($countryList) && (wfConfig::get('cbl_loggedInBlocked', false) || wfConfig::get('cbl_loginFormBlocked', false) || wfConfig::get('cbl_restOfSiteBlocked', false))) { - $countryBlocking = self::FEATURE_ENABLED; - } - } - - $this->features = array(); //Deprecated - - $data = wfConfig::get_ser('dashboardData'); - $lastChecked = wfConfig::get('lastDashboardCheck', 0); - if ((!is_array($data) || (isset($data['generated']) && $data['generated'] + 3600 < time())) && $lastChecked + 3600 < time()) { - $wp_version = wfUtils::getWPVersion(); - $apiKey = wfConfig::get('apiKey'); - $api = new wfAPI($apiKey, $wp_version); - wfConfig::set('lastDashboardCheck', time()); - try { - $json = $api->getStaticURL('/stats.json'); - $data = @json_decode($json, true); - if ($json && is_array($data)) { - self::processDashboardResponse($data); - } - } - catch (Exception $e) { - //Do nothing - } - } - - // Last Generated - if (is_array($data) && isset($data['generated'])) { - $this->lastGenerated = $data['generated']; - } - - // TDF - if (is_array($data) && isset($data['tdf']) && isset($data['tdf']['community'])) { - $this->tdfCommunity = (int) $data['tdf']['community']; - $this->tdfPremium = (int) $data['tdf']['premium']; - } - - // Top IPs Blocked - $activityReport = new wfActivityReport(); - $this->ips24h = (array) $activityReport->getTopIPsBlocked(100, 1); - foreach ($this->ips24h as &$r24h) { - $r24h = (array) $r24h; - if (empty($r24h['countryName'])) { $r24h['countryName'] = 'Unknown'; } - } - $this->ips7d = (array) $activityReport->getTopIPsBlocked(100, 7); - foreach ($this->ips7d as &$r7d) { - $r7d = (array) $r7d; - if (empty($r7d['countryName'])) { $r7d['countryName'] = 'Unknown'; } - } - $this->ips30d = (array) $activityReport->getTopIPsBlocked(100, 30); - foreach ($this->ips30d as &$r30d) { - $r30d = (array) $r30d; - if (empty($r30d['countryName'])) { $r30d['countryName'] = 'Unknown'; } - } - - // Recent Logins - $logins = wordfence::getLog()->getHits('logins', 'loginLogout', 0, 200); - $this->loginsSuccess = array(); - $this->loginsFail = array(); - foreach ($logins as $l) { - if ($l['fail']) { - $this->loginsFail[] = array('t' => $l['ctime'], 'name' => $l['username'], 'ip' => $l['IP']); - } - else if ($l['action'] != 'logout') { - $this->loginsSuccess[] = array('t' => $l['ctime'], 'name' => $l['username'], 'ip' => $l['IP']); - } - } - - // Local Attack Data - $this->localBlocks = array(); - $this->localBlocks[] = array('title' => __('Complex', 'wordfence'), 'type' => wfActivityReport::BLOCK_TYPE_COMPLEX, - '24h' => (int) $activityReport->getBlockedCount(1, wfActivityReport::BLOCK_TYPE_COMPLEX), - '7d' => (int) $activityReport->getBlockedCount(7, wfActivityReport::BLOCK_TYPE_COMPLEX), - '30d' => (int) $activityReport->getBlockedCount(30, wfActivityReport::BLOCK_TYPE_COMPLEX), - ); - $this->localBlocks[] = array('title' => __('Brute Force', 'wordfence'), 'type' => wfActivityReport::BLOCK_TYPE_BRUTE_FORCE, - '24h' => (int) $activityReport->getBlockedCount(1, wfActivityReport::BLOCK_TYPE_BRUTE_FORCE), - '7d' => (int) $activityReport->getBlockedCount(7, wfActivityReport::BLOCK_TYPE_BRUTE_FORCE), - '30d' => (int) $activityReport->getBlockedCount(30, wfActivityReport::BLOCK_TYPE_BRUTE_FORCE), - ); - $this->localBlocks[] = array('title' => __('Blocklist', 'wordfence'), 'type' => wfActivityReport::BLOCK_TYPE_BLACKLIST, - '24h' => (int) $activityReport->getBlockedCount(1, wfActivityReport::BLOCK_TYPE_BLACKLIST), - '7d' => (int) $activityReport->getBlockedCount(7, wfActivityReport::BLOCK_TYPE_BLACKLIST), - '30d' => (int) $activityReport->getBlockedCount(30, wfActivityReport::BLOCK_TYPE_BLACKLIST), - ); - - // Network Attack Data - if (is_array($data) && isset($data['attackdata']) && isset($data['attackdata']['24h'])) { - $this->networkBlock24h = $data['attackdata']['24h']; - $this->networkBlock7d = $data['attackdata']['7d']; - $this->networkBlock30d = $data['attackdata']['30d']; - } - - // Blocked Countries - $this->countriesLocal = (array) $activityReport->getTopCountriesBlocked(10, 7); - foreach ($this->countriesLocal as &$rLocal) { - $rLocal = (array) $rLocal; - if (empty($rLocal['countryName'])) { $rLocal['countryName'] = 'Unknown'; } - } - - if (is_array($data) && isset($data['countries']) && isset($data['countries']['7d'])) { - $networkCountries = array(); - foreach ($data['countries']['7d'] as $rNetwork) { - $countryCode = $rNetwork['cd']; - $countryName = $activityReport->getCountryNameByCode($countryCode); - if (empty($countryName)) { $countryName = 'Unknown'; } - $totalBlockCount = $rNetwork['ct']; - $networkCountries[] = array('countryCode' => $countryCode, 'countryName' => $countryName, 'totalBlockCount' => $totalBlockCount); - } - $this->countriesNetwork = $networkCountries; - } - - // Wordfence Central - $this->wordfenceCentralConnected = wfCentral::_isConnected(); // This value is cached. - $this->wordfenceCentralConnectTime = wfConfig::get('wordfenceCentralConnectTime'); - $this->wordfenceCentralConnectEmail = wfConfig::get('wordfenceCentralConnectEmail'); - $this->wordfenceCentralDisconnected = wfConfig::get('wordfenceCentralDisconnected'); - $this->wordfenceCentralDisconnectTime = wfConfig::get('wordfenceCentralDisconnectTime'); - $this->wordfenceCentralDisconnectEmail = wfConfig::get('wordfenceCentralDisconnectEmail'); - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfDateLocalization.php b/wp/wp-content/plugins/wordfence/lib/wfDateLocalization.php deleted file mode 100644 index e6c50e5b..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfDateLocalization.php +++ /dev/null @@ -1,326 +0,0 @@ - 'Date.CultureInfo={name:"af-ZA",englishName:"Afrikaans (South Africa)",nativeName:"Afrikaans (Suid Afrika)",dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],abbreviatedDayNames:["Son","Maan","Dins","Woen","Dond","Vry","Sat"],shortestDayNames:["So","Ma","Di","Wo","Do","Vr","Sa"],firstLetterDayNames:["S","M","D","W","D","V","S"],monthNames:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],amDesignator:"",pmDesignator:"nm",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uarie)?/i,feb:/^feb(ruarie)?/i,mar:/^maart/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(ie)?/i,jul:/^jul(ie)?/i,aug:/^aug(ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^des(ember)?/i,sun:/^so(n(dag)?)?/i,mon:/^ma(an(dag)?)?/i,tue:/^di(ns(dag)?)?/i,wed:/^wo(en(sdag)?)?/i,thu:/^do(nd(erdag)?)?/i,fri:/^vr(y(dag)?)?/i,sat:/^sa(t(erdag)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-AE' => 'Date.CultureInfo={name:"ar-AE",englishName:"Arabic (U.A.E.)",nativeName:"العربية (الإمارات العربية المتحدة)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-BH' => 'Date.CultureInfo={name:"ar-BH",englishName:"Arabic (Bahrain)",nativeName:"العربية (البحرين)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-DZ' => 'Date.CultureInfo={name:"ar-DZ",englishName:"Arabic (Algeria)",nativeName:"العربية (الجزائر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^جانفييه/i,feb:/^فيفرييه/i,mar:/^مارس/i,apr:/^أفريل/i,may:/^مي/i,jun:/^جوان/i,jul:/^جوييه/i,aug:/^أوت/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-EG' => 'Date.CultureInfo={name:"ar-EG",englishName:"Arabic (Egypt)",nativeName:"العربية (مصر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-IQ' => 'Date.CultureInfo={name:"ar-IQ",englishName:"Arabic (Iraq)",nativeName:"العربية (العراق)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],abbreviatedMonthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^كانون الثاني/i,feb:/^شباط/i,mar:/^آذار/i,apr:/^نيسان/i,may:/^أيار/i,jun:/^حزيران/i,jul:/^تموز/i,aug:/^آب/i,sep:/^أيلول/i,oct:/^تشرين الأول/i,nov:/^تشرين الثاني/i,dec:/^كانون الأول/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-JO' => 'Date.CultureInfo={name:"ar-JO",englishName:"Arabic (Jordan)",nativeName:"العربية (الأردن)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],abbreviatedMonthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^كانون الثاني/i,feb:/^شباط/i,mar:/^آذار/i,apr:/^نيسان/i,may:/^أيار/i,jun:/^حزيران/i,jul:/^تموز/i,aug:/^آب/i,sep:/^أيلول/i,oct:/^تشرين الأول/i,nov:/^تشرين الثاني/i,dec:/^كانون الأول/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-KW' => 'Date.CultureInfo={name:"ar-KW",englishName:"Arabic (Kuwait)",nativeName:"العربية (الكويت)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-LB' => 'Date.CultureInfo={name:"ar-LB",englishName:"Arabic (Lebanon)",nativeName:"العربية (لبنان)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],abbreviatedMonthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^كانون الثاني/i,feb:/^شباط/i,mar:/^آذار/i,apr:/^نيسان/i,may:/^أيار/i,jun:/^حزيران/i,jul:/^تموز/i,aug:/^آب/i,sep:/^أيلول/i,oct:/^تشرين الأول/i,nov:/^تشرين الثاني/i,dec:/^كانون الأول/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-LY' => 'Date.CultureInfo={name:"ar-LY",englishName:"Arabic (Libya)",nativeName:"العربية (ليبيا)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-MA' => 'Date.CultureInfo={name:"ar-MA",englishName:"Arabic (Morocco)",nativeName:"العربية (المملكة المغربية)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","ماي","يونيو","يوليوز","غشت","شتنبر","اكتوبر","نونبر","دجنبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","ماي","يونيو","يوليوز","غشت","شتنبر","اكتوبر","نونبر","دجنبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^ماي/i,jun:/^يونيو/i,jul:/^يوليوز/i,aug:/^غشت/i,sep:/^شتنبر/i,oct:/^اكتوبر/i,nov:/^نونبر/i,dec:/^دجنبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-OM' => 'Date.CultureInfo={name:"ar-OM",englishName:"Arabic (Oman)",nativeName:"العربية (عمان)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-QA' => 'Date.CultureInfo={name:"ar-QA",englishName:"Arabic (Qatar)",nativeName:"العربية (قطر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-SA' => 'Date.CultureInfo={name:"ar-SA",englishName:"Arabic (Saudi Arabia)",nativeName:"العربية (المملكة العربية السعودية)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],abbreviatedMonthNames:["محرم","صفر","ربيع الاول","ربيع الثاني","جمادى الاولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:1451,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yy",longDate:"dd/MMMM/yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd/MMMM/yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^محرم/i,feb:/^صفر/i,mar:/^ربيع الأول/i,apr:/^ربيع الثاني/i,may:/^جمادى الأولى/i,jun:/^جمادى الثانية/i,jul:/^رجب/i,aug:/^شعبان/i,sep:/^رمضان/i,oct:/^شوال/i,nov:/^ذو القعدة/i,dec:/^ذو الحجة/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-SY' => 'Date.CultureInfo={name:"ar-SY",englishName:"Arabic (Syria)",nativeName:"العربية (سوريا)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],abbreviatedMonthNames:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^كانون الثاني/i,feb:/^شباط/i,mar:/^آذار/i,apr:/^نيسان/i,may:/^أيار/i,jun:/^حزيران/i,jul:/^تموز/i,aug:/^آب/i,sep:/^أيلول/i,oct:/^تشرين الأول/i,nov:/^تشرين الثاني/i,dec:/^كانون الأول/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-TN' => 'Date.CultureInfo={name:"ar-TN",englishName:"Arabic (Tunisia)",nativeName:"العربية (تونس)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["جانفي","فيفري","مارس","افريل","ماي","جوان","جويلية","اوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["جانفي","فيفري","مارس","افريل","ماي","جوان","جويلية","اوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^جانفي/i,feb:/^فيفري/i,mar:/^مارس/i,apr:/^افريل/i,may:/^ماي/i,jun:/^جوان/i,jul:/^جويلية/i,aug:/^اوت/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ar-YE' => 'Date.CultureInfo={name:"ar-YE",englishName:"Arabic (Yemen)",nativeName:"العربية (اليمن)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل/i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oct:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'az-Cyrl-AZ' => 'Date.CultureInfo={name:"az-Cyrl-AZ",englishName:"Azeri (Cyrillic, Azerbaijan)",nativeName:"Азәрбајҹан (Азәрбајҹан)",dayNames:["Базар","Базар ертәси","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"],abbreviatedDayNames:["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"],shortestDayNames:["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"],firstLetterDayNames:["Б","Б","Ч","Ч","Ҹ","Ҹ","Ш"],monthNames:["Јанвар","Феврал","Март","Апрел","Мај","Ијун","Ијул","Август","Сентјабр","Октјабр","Нојабр","Декабр"],abbreviatedMonthNames:["Јан","Фев","Мар","Апр","Мај","Ијун","Ијул","Авг","Сен","Окт","Ноя","Дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^јан(вар)?/i,feb:/^фев(рал)?/i,mar:/^мар(т)?/i,apr:/^апр(ел)?/i,may:/^мај/i,jun:/^ијун/i,jul:/^ијул/i,aug:/^авг(уст)?/i,sep:/^сен(тјабр)?/i,oct:/^окт(јабр)?/i,nov:/^нојабр/i,dec:/^дек(абр)?/i,sun:/^базар/i,mon:/^базар ертәси/i,tue:/^чәршәнбә ахшамы/i,wed:/^чәршәнбә/i,thu:/^ҹүмә ахшамы/i,fri:/^ҹүмә/i,sat:/^шәнбә/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'az-Latn-AZ' => 'Date.CultureInfo={name:"az-Latn-AZ",englishName:"Azeri (Latin, Azerbaijan)",nativeName:"Azərbaycan­ılı (Azərbaycanca)",dayNames:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],abbreviatedDayNames:["B","Be","Ça","Ç","Ca","C","Ş"],shortestDayNames:["B","Be","Ça","Ç","Ca","C","Ş"],firstLetterDayNames:["B","B","Ç","Ç","C","C","Ş"],monthNames:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr"],abbreviatedMonthNames:["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^yan(var)?/i,feb:/^fev(ral)?/i,mar:/^mar(t)?/i,apr:/^apr(el)?/i,may:/^may/i,jun:/^iyun/i,jul:/^iyul/i,aug:/^avg(ust)?/i,sep:/^sen(tyabr)?/i,oct:/^okt(yabr)?/i,nov:/^noy(abr)?/i,dec:/^dek(abr)?/i,sun:/^bazar/i,mon:/^bazar ertəsi/i,tue:/^çərşənbə axşamı/i,wed:/^çərşənbə/i,thu:/^cümə axşamı/i,fri:/^cümə/i,sat:/^şənbə/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'be-BY' => 'Date.CultureInfo={name:"be-BY",englishName:"Belarusian (Belarus)",nativeName:"Беларускі (Беларусь)",dayNames:["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"],abbreviatedDayNames:["нд","пн","аў","ср","чц","пт","сб"],shortestDayNames:["нд","пн","аў","ср","чц","пт","сб"],firstLetterDayNames:["н","п","а","с","ч","п","с"],monthNames:["Студзень","Люты","Сакавік","Красавік","Май","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань"],abbreviatedMonthNames:["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^сту(дзень)?/i,feb:/^лют(ы)?/i,mar:/^сак(авік)?/i,apr:/^кра(савік)?/i,may:/^май/i,jun:/^чэр(вень)?/i,jul:/^ліп(ень)?/i,aug:/^жні(вень)?/i,sep:/^вер(асень)?/i,oct:/^кас(трычнік)?/i,nov:/^ліс(тапад)?/i,dec:/^сне(жань)?/i,sun:/^нядзеля/i,mon:/^панядзелак/i,tue:/^аўторак/i,wed:/^серада/i,thu:/^чацвер/i,fri:/^пятніца/i,sat:/^субота/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'bg-BG' => 'Date.CultureInfo={name:"bg-BG",englishName:"Bulgarian (Bulgaria)",nativeName:"български (България)",dayNames:["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],abbreviatedDayNames:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],shortestDayNames:["не","по","вт","ср","че","пе","съ"],firstLetterDayNames:["н","п","в","с","ч","п","с"],monthNames:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],abbreviatedMonthNames:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.M.yyyy \'г.\'",longDate:"dd MMMM yyyy \'г.\'",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy \'г.\' HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy \'г.\'"},regexPatterns:{jan:/^януари/i,feb:/^февруари/i,mar:/^март/i,apr:/^април/i,may:/^май/i,jun:/^юни/i,jul:/^юли/i,aug:/^август/i,sep:/^септември/i,oct:/^октомври/i,nov:/^ноември/i,dec:/^декември/i,sun:/^не((деля)?)?/i,mon:/^по((неделник)?)?/i,tue:/^вторник/i,wed:/^сряда/i,thu:/^че((твъртък)?)?/i,fri:/^пе((тък)?)?/i,sat:/^съ((бота)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'bs-Latn-BA' => 'Date.CultureInfo={name:"bs-Latn-BA",englishName:"Bosnian (Bosnia and Herzegovina)",nativeName:"bosanski (Bosna i Hercegovina)",dayNames:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sri","čet","pet","sub"],shortestDayNames:["ned","pon","uto","sri","čet","pet","sub"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(t)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun/i,jul:/^jul/i,aug:/^avg(ust)?/i,sep:/^sep(tembar)?/i,oct:/^okt(obar)?/i,nov:/^nov(embar)?/i,dec:/^dec(embar)?/i,sun:/^nedjelja/i,mon:/^ponedjeljak/i,tue:/^utorak/i,wed:/^srijeda/i,thu:/^četvrtak/i,fri:/^petak/i,sat:/^subota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ca-ES' => 'Date.CultureInfo={name:"ca-ES",englishName:"Catalan (Catalan)",nativeName:"català (català)",dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],abbreviatedDayNames:["dg.","dl.","dt.","dc.","dj.","dv.","ds."],shortestDayNames:["dg","dl","dt","dc","dj","dv","ds"],firstLetterDayNames:["d","d","d","d","d","d","d"],monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],abbreviatedMonthNames:["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, d\' / \'MMMM\' / \'yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d\' / \'MMMM\' / \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' / \'yyyy"},regexPatterns:{jan:/^gen(er)?/i,feb:/^feb(rer)?/i,mar:/^març/i,apr:/^abr(il)?/i,may:/^maig/i,jun:/^juny/i,jul:/^jul(iol)?/i,aug:/^ag(ost)?/i,sep:/^set(embre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(embre)?/i,dec:/^des(embre)?/i,sun:/^dg((.(umenge)?)?)?/i,mon:/^dl((.(lluns)?)?)?/i,tue:/^dt((.(marts)?)?)?/i,wed:/^dc((.(mecres)?)?)?/i,thu:/^dj((.(jous)?)?)?/i,fri:/^dv((.(vendres)?)?)?/i,sat:/^ds((.(ssabte)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'cs-CZ' => 'Date.CultureInfo={name:"cs-CZ",englishName:"Czech (Czech Republic)",nativeName:"čeština (Česká republika)",dayNames:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],abbreviatedDayNames:["ne","po","út","st","čt","pá","so"],shortestDayNames:["ne","po","út","st","čt","pá","so"],firstLetterDayNames:["n","p","ú","s","č","p","s"],monthNames:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],abbreviatedMonthNames:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],amDesignator:"dop.",pmDesignator:"odp.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^leden/i,feb:/^únor/i,mar:/^březen/i,apr:/^duben/i,may:/^květen/i,jun:/^červen/i,jul:/^červenec/i,aug:/^srpen/i,sep:/^září/i,oct:/^říjen/i,nov:/^listopad/i,dec:/^prosinec/i,sun:/^neděle/i,mon:/^pondělí/i,tue:/^úterý/i,wed:/^středa/i,thu:/^čtvrtek/i,fri:/^pátek/i,sat:/^sobota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'cy-GB' => 'Date.CultureInfo={name:"cy-GB",englishName:"Welsh (United Kingdom)",nativeName:"Cymraeg (y Deyrnas Unedig)",dayNames:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],abbreviatedDayNames:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],shortestDayNames:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],firstLetterDayNames:["S","L","M","M","I","G","S"],monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],abbreviatedMonthNames:["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ion(awr)?/i,feb:/^chwe(fror)?/i,mar:/^maw(rth)?/i,apr:/^ebr(ill)?/i,may:/^mai/i,jun:/^meh(efin)?/i,jul:/^gor(ffennaf)?/i,aug:/^aws(t)?/i,sep:/^med(i)?/i,oct:/^hyd(ref)?/i,nov:/^tach(wedd)?/i,dec:/^rhag(fyr)?/i,sun:/^dydd sul/i,mon:/^dydd llun/i,tue:/^dydd mawrth/i,wed:/^dydd mercher/i,thu:/^dydd iau/i,fri:/^dydd gwener/i,sat:/^dydd sadwrn/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'da-DK' => 'Date.CultureInfo={name:"da-DK",englishName:"Danish (Denmark)",nativeName:"dansk (Danmark)",dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],abbreviatedDayNames:["sø","ma","ti","on","to","fr","lø"],shortestDayNames:["sø","ma","ti","on","to","fr","lø"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(ts)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^søndag/i,mon:/^mandag/i,tue:/^tirsdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lørdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'de-AT' => 'Date.CultureInfo={name:"de-AT",englishName:"German (Austria)",nativeName:"Deutsch (Österreich)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, dd. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, dd. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jän(ner)?/i,feb:/^feb(ruar)?/i,mar:/^mär(z)?/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'de-CH' => 'Date.CultureInfo={name:"de-CH",englishName:"German (Switzerland)",nativeName:"Deutsch (Schweiz)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^märz/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'de-DE' => 'Date.CultureInfo={name:"de-DE",englishName:"German (Germany)",nativeName:"Deutsch (Deutschland)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^märz/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'de-LI' => 'Date.CultureInfo={name:"de-LI",englishName:"German (Liechtenstein)",nativeName:"Deutsch (Liechtenstein)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^märz/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'de-LU' => 'Date.CultureInfo={name:"de-LU",englishName:"German (Luxembourg)",nativeName:"Deutsch (Luxemburg)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^märz/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'dv-MV' => 'Date.CultureInfo={name:"dv-MV",englishName:"Divehi (Maldives)",nativeName:"ދިވެހިބަސް (ދިވެހި ރާއްޖެ)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],abbreviatedMonthNames:["محرم","صفر","ربيع الاول","ربيع الثاني","جمادى الاولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],amDesignator:"މކ",pmDesignator:"މފ",firstDayOfWeek:0,twoDigitYearMax:1451,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yy",longDate:"dd/MMMM/yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd/MMMM/yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^محرم/i,feb:/^صفر/i,mar:/^ربيع الأول/i,apr:/^ربيع الثاني/i,may:/^جمادى الأولى/i,jun:/^جمادى الثانية/i,jul:/^رجب/i,aug:/^شعبان/i,sep:/^رمضان/i,oct:/^شوال/i,nov:/^ذو القعدة/i,dec:/^ذو الحجة/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'el-GR' => 'Date.CultureInfo={name:"el-GR",englishName:"Greek (Greece)",nativeName:"ελληνικά (Ελλάδα)",dayNames:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],abbreviatedDayNames:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],shortestDayNames:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σά"],firstLetterDayNames:["Κ","Δ","Τ","Τ","Π","Π","Σ"],monthNames:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],abbreviatedMonthNames:["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],amDesignator:"πμ",pmDesignator:"μμ",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d MMMM yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, d MMMM yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ιαν(ουάριος)?/i,feb:/^φεβ(ρουάριος)?/i,mar:/^μάρτιος/i,apr:/^απρ(ίλιος)?/i,may:/^μάιος/i,jun:/^ιούνιος/i,jul:/^ιούλιος/i,aug:/^αύγουστος/i,sep:/^σεπ(τέμβριος)?/i,oct:/^οκτ(ώβριος)?/i,nov:/^νοέμβριος/i,dec:/^δεκ(έμβριος)?/i,sun:/^κυ(ρ(ιακή)?)?/i,mon:/^δε(υ(τέρα)?)?/i,tue:/^τρ(ι(τη)?)?/i,wed:/^τε(τ(άρτη)?)?/i,thu:/^πε(μ(πτη)?)?/i,fri:/^πα(ρ(ασκευή)?)?/i,sat:/^σά(β(βατο)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-029' => 'Date.CultureInfo={name:"en-029",englishName:"English (Caribbean)",nativeName:"English (Caribbean)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"MM/dd/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-AU' => 'Date.CultureInfo={name:"en-AU",englishName:"English (Australia)",nativeName:"English (Australia)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/MM/yyyy",longDate:"dddd, d MMMM yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, d MMMM yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-BZ' => 'Date.CultureInfo={name:"en-BZ",englishName:"English (Belize)",nativeName:"English (Belize)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd MMMM yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-CA' => 'Date.CultureInfo={name:"en-CA",englishName:"English (Canada)",nativeName:"English (Canada)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"MMMM d, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"MMMM d, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-GB' => 'Date.CultureInfo={name:"en-GB",englishName:"English (United Kingdom)",nativeName:"English (United Kingdom)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-IE' => 'Date.CultureInfo={name:"en-IE",englishName:"English (Ireland)",nativeName:"English (Eire)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-JM' => 'Date.CultureInfo={name:"en-JM",englishName:"English (Jamaica)",nativeName:"English (Jamaica)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-NZ' => 'Date.CultureInfo={name:"en-NZ",englishName:"English (New Zealand)",nativeName:"English (New Zealand)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/MM/yyyy",longDate:"dddd, d MMMM yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, d MMMM yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-PH' => 'Date.CultureInfo={name:"en-PH",englishName:"English (Republic of the Philippines)",nativeName:"English (Philippines)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-TT' => 'Date.CultureInfo={name:"en-TT",englishName:"English (Trinidad and Tobago)",nativeName:"English (Trinidad y Tobago)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd MMMM yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-US' => 'Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-ZA' => 'Date.CultureInfo={name:"en-ZA",englishName:"English (South Africa)",nativeName:"English (South Africa)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'en-ZW' => 'Date.CultureInfo={name:"en-ZW",englishName:"English (Zimbabwe)",nativeName:"English (Zimbabwe)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-AR' => 'Date.CultureInfo={name:"es-AR",englishName:"Spanish (Argentina)",nativeName:"Español (Argentina)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-BO' => 'Date.CultureInfo={name:"es-BO",englishName:"Spanish (Bolivia)",nativeName:"Español (Bolivia)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-CL' => 'Date.CultureInfo={name:"es-CL",englishName:"Spanish (Chile)",nativeName:"Español (Chile)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-CO' => 'Date.CultureInfo={name:"es-CO",englishName:"Spanish (Colombia)",nativeName:"Español (Colombia)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-CR' => 'Date.CultureInfo={name:"es-CR",englishName:"Spanish (Costa Rica)",nativeName:"Español (Costa Rica)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-DO' => 'Date.CultureInfo={name:"es-DO",englishName:"Spanish (Dominican Republic)",nativeName:"Español (República Dominicana)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-EC' => 'Date.CultureInfo={name:"es-EC",englishName:"Spanish (Ecuador)",nativeName:"Español (Ecuador)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-ES' => 'Date.CultureInfo={name:"es-ES",englishName:"Spanish (Spain)",nativeName:"español (España)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-GT' => 'Date.CultureInfo={name:"es-GT",englishName:"Spanish (Guatemala)",nativeName:"Español (Guatemala)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-HN' => 'Date.CultureInfo={name:"es-HN",englishName:"Spanish (Honduras)",nativeName:"Español (Honduras)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-MX' => 'Date.CultureInfo={name:"es-MX",englishName:"Spanish (Mexico)",nativeName:"Español (México)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-NI' => 'Date.CultureInfo={name:"es-NI",englishName:"Spanish (Nicaragua)",nativeName:"Español (Nicaragua)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-PA' => 'Date.CultureInfo={name:"es-PA",englishName:"Spanish (Panama)",nativeName:"Español (Panamá)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"MM/dd/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-PE' => 'Date.CultureInfo={name:"es-PE",englishName:"Spanish (Peru)",nativeName:"Español (Perú)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-PR' => 'Date.CultureInfo={name:"es-PR",englishName:"Spanish (Puerto Rico)",nativeName:"Español (Puerto Rico)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-PY' => 'Date.CultureInfo={name:"es-PY",englishName:"Spanish (Paraguay)",nativeName:"Español (Paraguay)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-SV' => 'Date.CultureInfo={name:"es-SV",englishName:"Spanish (El Salvador)",nativeName:"Español (El Salvador)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-UY' => 'Date.CultureInfo={name:"es-UY",englishName:"Spanish (Uruguay)",nativeName:"Español (Uruguay)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'es-VE' => 'Date.CultureInfo={name:"es-VE",englishName:"Spanish (Venezuela)",nativeName:"Español (Republica Bolivariana de Venezuela)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'et-EE' => 'Date.CultureInfo={name:"et-EE",englishName:"Estonian (Estonia)",nativeName:"eesti (Eesti)",dayNames:["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],abbreviatedDayNames:["P","E","T","K","N","R","L"],shortestDayNames:["P","E","T","K","N","R","L"],firstLetterDayNames:["P","E","T","K","N","R","L"],monthNames:["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"],abbreviatedMonthNames:["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],amDesignator:"EL",pmDesignator:"PL",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.MM.yyyy",longDate:"d. MMMM yyyy\'. a.\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy\'. a.\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy\'. a.\'"},regexPatterns:{jan:/^jaan(uar)?/i,feb:/^veebr(uar)?/i,mar:/^märts/i,apr:/^apr(ill)?/i,may:/^mai/i,jun:/^juuni/i,jul:/^juuli/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(oober)?/i,nov:/^nov(ember)?/i,dec:/^dets(ember)?/i,sun:/^pühapäev/i,mon:/^esmaspäev/i,tue:/^teisipäev/i,wed:/^kolmapäev/i,thu:/^neljapäev/i,fri:/^reede/i,sat:/^laupäev/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'eu-ES' => 'Date.CultureInfo={name:"eu-ES",englishName:"Basque (Basque)",nativeName:"euskara (euskara)",dayNames:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],abbreviatedDayNames:["ig.","al.","as.","az.","og.","or.","lr."],shortestDayNames:["ig","al","as","az","og","or","lr"],firstLetterDayNames:["i","a","a","a","o","o","l"],monthNames:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"],abbreviatedMonthNames:["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dddd, yyyy.\'eko\' MMMM\'k \'d",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, yyyy.\'eko\' MMMM\'k \'d HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"yyyy.\'eko\' MMMM"},regexPatterns:{jan:/^urt(.(arrila)?)?/i,feb:/^ots(.(aila)?)?/i,mar:/^mar(.(txoa)?)?/i,apr:/^api(.(rila)?)?/i,may:/^mai(.(atza)?)?/i,jun:/^eka(.(ina)?)?/i,jul:/^uzt(.(aila)?)?/i,aug:/^abu(.(ztua)?)?/i,sep:/^ira(.(ila)?)?/i,oct:/^urr(.(ia)?)?/i,nov:/^aza(.(roa)?)?/i,dec:/^abe(.(ndua)?)?/i,sun:/^ig((.(andea)?)?)?/i,mon:/^al((.(telehena)?)?)?/i,tue:/^as((.(teartea)?)?)?/i,wed:/^az((.(teazkena)?)?)?/i,thu:/^og((.(teguna)?)?)?/i,fri:/^or((.(tirala)?)?)?/i,sat:/^lr((.(runbata)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fa-IR' => 'Date.CultureInfo={name:"fa-IR",englishName:"Persian (Iran)",nativeName:"فارسى (ايران)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"ق.ظ",pmDesignator:"ب.ظ",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fi-FI' => 'Date.CultureInfo={name:"fi-FI",englishName:"Finnish (Finland)",nativeName:"suomi (Suomi)",dayNames:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],abbreviatedDayNames:["su","ma","ti","ke","to","pe","la"],shortestDayNames:["su","ma","ti","ke","to","pe","la"],firstLetterDayNames:["s","m","t","k","t","p","l"],monthNames:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],abbreviatedMonthNames:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM\'ta \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM\'ta \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM\'ta\'",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^tammi(kuu)?/i,feb:/^helmi(kuu)?/i,mar:/^maalis(kuu)?/i,apr:/^huhti(kuu)?/i,may:/^touko(kuu)?/i,jun:/^kesä(kuu)?/i,jul:/^heinä(kuu)?/i,aug:/^elo(kuu)?/i,sep:/^syys(kuu)?/i,oct:/^loka(kuu)?/i,nov:/^marras(kuu)?/i,dec:/^joulu(kuu)?/i,sun:/^sunnuntai/i,mon:/^maanantai/i,tue:/^tiistai/i,wed:/^keskiviikko/i,thu:/^torstai/i,fri:/^perjantai/i,sat:/^lauantai/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fo-FO' => 'Date.CultureInfo={name:"fo-FO",englishName:"Faroese (Faroe Islands)",nativeName:"føroyskt (Føroyar)",dayNames:["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","fríggjadagur","leygardagur"],abbreviatedDayNames:["sun","mán","týs","mik","hós","frí","leyg"],shortestDayNames:["su","má","tý","mi","hó","fr","ley"],firstLetterDayNames:["s","m","t","m","h","f","l"],monthNames:["januar","februar","mars","apríl","mai","juni","juli","august","september","oktober","november","desember"],abbreviatedMonthNames:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"d. MMMM yyyy",shortTime:"HH.mm",longTime:"HH.mm.ss",fullDateTime:"d. MMMM yyyy HH.mm.ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(s)?/i,apr:/^apr(íl)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^des(ember)?/i,sun:/^su(n(nudagur)?)?/i,mon:/^má(n(adagur)?)?/i,tue:/^tý(s(dagur)?)?/i,wed:/^mi(k(udagur)?)?/i,thu:/^hó(s(dagur)?)?/i,fri:/^fr(í(ggjadagur)?)?/i,sat:/^ley(g(ardagur)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fr-BE' => 'Date.CultureInfo={name:"fr-BE",englishName:"French (Belgium)",nativeName:"français (Belgique)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fr-CA' => 'Date.CultureInfo={name:"fr-CA",englishName:"French (Canada)",nativeName:"français (Canada)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fr-CH' => 'Date.CultureInfo={name:"fr-CH",englishName:"French (Switzerland)",nativeName:"français (Suisse)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fr-FR' => 'Date.CultureInfo={name:"fr-FR",englishName:"French (France)",nativeName:"français (France)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fr-LU' => 'Date.CultureInfo={name:"fr-LU",englishName:"French (Luxembourg)",nativeName:"français (Luxembourg)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'fr-MC' => 'Date.CultureInfo={name:"fr-MC",englishName:"French (Principality of Monaco)",nativeName:"français (Principauté de Monaco)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'gl-ES' => 'Date.CultureInfo={name:"gl-ES",englishName:"Galician (Galician)",nativeName:"galego (galego)",dayNames:["domingo","luns","martes","mércores","xoves","venres","sábado"],abbreviatedDayNames:["dom","luns","mar","mér","xov","ven","sab"],shortestDayNames:["do","lu","ma","mé","xo","ve","sa"],firstLetterDayNames:["d","l","m","m","x","v","s"],monthNames:["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro"],abbreviatedMonthNames:["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^xan(eiro)?/i,feb:/^feb(reiro)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^maio/i,jun:/^xuñ(o)?/i,jul:/^xull(o)?/i,aug:/^ago(sto)?/i,sep:/^set(embro)?/i,oct:/^out(ubro)?/i,nov:/^nov(embro)?/i,dec:/^dec(embro)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(1)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mé(r(cores)?)?/i,thu:/^xo(v(es)?)?/i,fri:/^ve(n(res)?)?/i,sat:/^sa(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'gu-IN' => 'Date.CultureInfo={name:"gu-IN",englishName:"Gujarati (India)",nativeName:"ગુજરાતી (ભારત)",dayNames:["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"],abbreviatedDayNames:["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],shortestDayNames:["ર","સ","મ","બ","ગ","શ","શ"],firstLetterDayNames:["ર","સ","મ","બ","ગ","શ","શ"],monthNames:["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટેમ્બર","ઑક્ટ્બર","નવેમ્બર","ડિસેમ્બર"],abbreviatedMonthNames:["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઑક્ટો","નવે","ડિસે"],amDesignator:"પૂર્વ મધ્યાહ્ન",pmDesignator:"ઉત્તર મધ્યાહ્ન",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^જાન્યુ(આરી)?/i,feb:/^ફેબ્રુ(આરી)?/i,mar:/^માર્ચ/i,apr:/^એપ્રિલ/i,may:/^મે/i,jun:/^જૂન/i,jul:/^જુલાઈ/i,aug:/^ઑગસ્ટ/i,sep:/^સપ્ટે(મ્બર)?/i,oct:/^ઑક્ટ્બર/i,nov:/^નવે(મ્બર)?/i,dec:/^ડિસે(મ્બર)?/i,sun:/^ર(વિ(વાર)?)?/i,mon:/^સ(ોમ(વાર)?)?/i,tue:/^મ(ંગળ(વાર)?)?/i,wed:/^બ(ુધ(વાર)?)?/i,thu:/^ગ(ુરુ(વાર)?)?/i,fri:/^શ(ુક્ર(વાર)?)?/i,sat:/^શ(નિ(વાર)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'he-IL' => 'Date.CultureInfo={name:"he-IL",englishName:"Hebrew (Israel)",nativeName:"עברית (ישראל)",dayNames:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],abbreviatedDayNames:["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],shortestDayNames:["א","ב","ג","ד","ה","ו","ש"],firstLetterDayNames:["א","ב","ג","ד","ה","ו","ש"],monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],abbreviatedMonthNames:["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ינו(אר)?/i,feb:/^פבר(ואר)?/i,mar:/^מרץ/i,apr:/^אפר(יל)?/i,may:/^מאי/i,jun:/^יונ(י)?/i,jul:/^יול(י)?/i,aug:/^אוג(וסט)?/i,sep:/^ספט(מבר)?/i,oct:/^אוק(טובר)?/i,nov:/^נוב(מבר)?/i,dec:/^דצמ(בר)?/i,sun:/^א(ום א(אשון)?)?/i,mon:/^ב(ום ב(ני)?)?/i,tue:/^ג(ום ג(לישי)?)?/i,wed:/^ד(ום ד(ביעי)?)?/i,thu:/^ה(ום ה(מישי)?)?/i,fri:/^ו(ום ו(ישי)?)?/i,sat:/^ש(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'hi-IN' => 'Date.CultureInfo={name:"hi-IN",englishName:"Hindi (India)",nativeName:"हिंदी (भारत)",dayNames:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],abbreviatedDayNames:["रवि.","सोम.","मंगल.","बुध.","गुरु.","शुक्र.","शनि."],shortestDayNames:["र","स","म","ब","ग","श","श"],firstLetterDayNames:["र","स","म","ब","ग","श","श"],monthNames:["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर"],abbreviatedMonthNames:["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर"],amDesignator:"पूर्वाह्न",pmDesignator:"अपराह्न",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^जनवरी/i,feb:/^फरवरी/i,mar:/^मार्च/i,apr:/^अप्रैल/i,may:/^मई/i,jun:/^जून/i,jul:/^जुलाई/i,aug:/^अगस्त/i,sep:/^सितम्बर/i,oct:/^अक्तूबर/i,nov:/^नवम्बर/i,dec:/^दिसम्बर/i,sun:/^र(वि(.(वार)?)?)?/i,mon:/^स(ोम(.(वार)?)?)?/i,tue:/^म(ंगल(.(वार)?)?)?/i,wed:/^ब(ुध(.(वार)?)?)?/i,thu:/^ग(ुरु(.(वार)?)?)?/i,fri:/^श(ुक्र(.(वार)?)?)?/i,sat:/^श(नि(.(वार)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'hr-BA' => 'Date.CultureInfo={name:"hr-BA",englishName:"Croatian (Bosnia and Herzegovina)",nativeName:"hrvatski (Bosna i Hercegovina)",dayNames:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sri","čet","pet","sub"],shortestDayNames:["ned","pon","uto","sri","čet","pet","sub"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"],abbreviatedMonthNames:["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^sij(ečanj)?/i,feb:/^veljača/i,mar:/^ožu(jak)?/i,apr:/^tra(vanj)?/i,may:/^svi(banj)?/i,jun:/^lip(anj)?/i,jul:/^srp(anj)?/i,aug:/^kol(ovoz)?/i,sep:/^ruj(an)?/i,oct:/^lis(topad)?/i,nov:/^stu(deni)?/i,dec:/^pro(sinac)?/i,sun:/^nedjelja/i,mon:/^ponedjeljak/i,tue:/^utorak/i,wed:/^srijeda/i,thu:/^četvrtak/i,fri:/^petak/i,sat:/^subota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'hr-HR' => 'Date.CultureInfo={name:"hr-HR",englishName:"Croatian (Croatia)",nativeName:"hrvatski (Hrvatska)",dayNames:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sri","čet","pet","sub"],shortestDayNames:["ne","po","ut","sr","če","pe","su"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"],abbreviatedMonthNames:["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^sij(ečanj)?/i,feb:/^veljača/i,mar:/^ožu(jak)?/i,apr:/^tra(vanj)?/i,may:/^svi(banj)?/i,jun:/^lip(anj)?/i,jul:/^srp(anj)?/i,aug:/^kol(ovoz)?/i,sep:/^ruj(an)?/i,oct:/^lis(topad)?/i,nov:/^stu(deni)?/i,dec:/^pro(sinac)?/i,sun:/^ne(d(jelja)?)?/i,mon:/^po(n(edjeljak)?)?/i,tue:/^ut(o(rak)?)?/i,wed:/^sr(i(jeda)?)?/i,thu:/^če(t(vrtak)?)?/i,fri:/^pe(t(ak)?)?/i,sat:/^su(b(ota)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'hu-HU' => 'Date.CultureInfo={name:"hu-HU",englishName:"Hungarian (Hungary)",nativeName:"magyar (Magyarország)",dayNames:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],abbreviatedDayNames:["V","H","K","Sze","Cs","P","Szo"],shortestDayNames:["V","H","K","Sze","Cs","P","Szo"],firstLetterDayNames:["V","H","K","S","C","P","S"],monthNames:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],abbreviatedMonthNames:["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],amDesignator:"de.",pmDesignator:"du.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy. MM. dd.",longDate:"yyyy. MMMM d.",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy. MMMM d. H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM d.",yearMonth:"yyyy. MMMM"},regexPatterns:{jan:/^jan(.(uár)?)?/i,feb:/^febr(.(uár)?)?/i,mar:/^márc(.(ius)?)?/i,apr:/^ápr(.(ilis)?)?/i,may:/^máj(.(us)?)?/i,jun:/^jún(.(ius)?)?/i,jul:/^júl(.(ius)?)?/i,aug:/^aug(.(usztus)?)?/i,sep:/^szept(.(ember)?)?/i,oct:/^okt(.(óber)?)?/i,nov:/^nov(.(ember)?)?/i,dec:/^dec(.(ember)?)?/i,sun:/^vasárnap/i,mon:/^hétfő/i,tue:/^kedd/i,wed:/^szerda/i,thu:/^csütörtök/i,fri:/^péntek/i,sat:/^szombat/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'hy-AM' => 'Date.CultureInfo={name:"hy-AM",englishName:"Armenian (Armenia)",nativeName:"Հայերեն (Հայաստան)",dayNames:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","ՈՒրբաթ","Շաբաթ"],abbreviatedDayNames:["Կիր","Երկ","Երք","Չրք","Հնգ","ՈՒր","Շբթ"],shortestDayNames:["Կ","Ե","Ե","Չ","Հ","Ո","Շ"],firstLetterDayNames:["Կ","Ե","Ե","Չ","Հ","Ո","Շ"],monthNames:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],abbreviatedMonthNames:["ՀՆՎ","ՓՏՎ","ՄՐՏ","ԱՊՐ","ՄՅՍ","ՀՆՍ","ՀԼՍ","ՕԳՍ","ՍԵՊ","ՀՈԿ","ՆՈՅ","ԴԵԿ"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^հունվար/i,feb:/^փետրվար/i,mar:/^մարտ/i,apr:/^ապր(իլ)?/i,may:/^մայիս/i,jun:/^հունիս/i,jul:/^հուլիս/i,aug:/^օգոստոս/i,sep:/^սեպ(տեմբեր)?/i,oct:/^հոկ(տեմբեր)?/i,nov:/^նոյ(եմբեր)?/i,dec:/^դեկ(տեմբեր)?/i,sun:/^կ(իր(ակի)?)?/i,mon:/^ե(րկ(ուշաբթի)?)?/i,tue:/^ե(րք(քշաբթի)?)?/i,wed:/^չ(րք(եքշաբթի)?)?/i,thu:/^հ(նգ(գշաբթի)?)?/i,fri:/^ո(ւր(բաթ)?)?/i,sat:/^շ(բթ(աթ)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'id-ID' => 'Date.CultureInfo={name:"id-ID",englishName:"Indonesian (Indonesia)",nativeName:"Bahasa Indonesia (Indonesia)",dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],abbreviatedDayNames:["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],shortestDayNames:["M","S","S","R","K","J","S"],firstLetterDayNames:["M","S","S","R","K","J","S"],monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^mar(et)?/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^agust(us)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nop(ember)?/i,dec:/^des(ember)?/i,sun:/^m(1)?/i,mon:/^s(en(in)?)?/i,tue:/^s(el(asa)?)?/i,wed:/^r(1)?/i,thu:/^k(1)?/i,fri:/^j(1)?/i,sat:/^s(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'is-IS' => 'Date.CultureInfo={name:"is-IS",englishName:"Icelandic (Iceland)",nativeName:"íslenska (Ísland)",dayNames:["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],abbreviatedDayNames:["sun.","mán.","þri.","mið.","fim.","fös.","lau."],shortestDayNames:["su","má","þr","mi","fi","fö","la"],firstLetterDayNames:["s","m","þ","m","f","f","l"],monthNames:["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember"],abbreviatedMonthNames:["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(.(úar)?)?/i,feb:/^feb(.(rúar)?)?/i,mar:/^mar(.(s)?)?/i,apr:/^apr(.(íl)?)?/i,may:/^maí/i,jun:/^jún(.(í)?)?/i,jul:/^júl(.(í)?)?/i,aug:/^ágú(.(st)?)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(.(óber)?)?/i,nov:/^nóv(.(ember)?)?/i,dec:/^des(.(ember)?)?/i,sun:/^su(n(.(nudagur)?)?)?/i,mon:/^má(n(.(udagur)?)?)?/i,tue:/^þr(i(.(ðjudagur)?)?)?/i,wed:/^mi(ð(.(vikudagur)?)?)?/i,thu:/^fi(m(.(mtudagur)?)?)?/i,fri:/^fö(s(.(tudagur)?)?)?/i,sat:/^la(u(.(gardagur)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'it-CH' => 'Date.CultureInfo={name:"it-CH",englishName:"Italian (Switzerland)",nativeName:"italiano (Svizzera)",dayNames:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],abbreviatedDayNames:["dom","lun","mar","mer","gio","ven","sab"],shortestDayNames:["do","lu","ma","me","gi","ve","sa"],firstLetterDayNames:["d","l","m","m","g","v","s"],monthNames:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],abbreviatedMonthNames:["gen","feb","mar","apr","mag","gio","lug","ago","set","ott","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^gen(naio)?/i,feb:/^feb(braio)?/i,mar:/^mar(zo)?/i,apr:/^apr(ile)?/i,may:/^mag(gio)?/i,jun:/^giugno/i,jul:/^lug(lio)?/i,aug:/^ago(sto)?/i,sep:/^set(tembre)?/i,oct:/^ott(obre)?/i,nov:/^nov(embre)?/i,dec:/^dic(embre)?/i,sun:/^do(m(enica)?)?/i,mon:/^lu(n(edì)?)?/i,tue:/^ma(r(tedì)?)?/i,wed:/^me(r(coledì)?)?/i,thu:/^gi(o(vedì)?)?/i,fri:/^ve(n(erdì)?)?/i,sat:/^sa(b(ato)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'it-IT' => 'Date.CultureInfo={name:"it-IT",englishName:"Italian (Italy)",nativeName:"italiano (Italia)",dayNames:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],abbreviatedDayNames:["dom","lun","mar","mer","gio","ven","sab"],shortestDayNames:["do","lu","ma","me","gi","ve","sa"],firstLetterDayNames:["d","l","m","m","g","v","s"],monthNames:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],abbreviatedMonthNames:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H.mm",longTime:"H.mm.ss",fullDateTime:"dddd d MMMM yyyy H.mm.ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^gen(naio)?/i,feb:/^feb(braio)?/i,mar:/^mar(zo)?/i,apr:/^apr(ile)?/i,may:/^mag(gio)?/i,jun:/^giu(gno)?/i,jul:/^lug(lio)?/i,aug:/^ago(sto)?/i,sep:/^set(tembre)?/i,oct:/^ott(obre)?/i,nov:/^nov(embre)?/i,dec:/^dic(embre)?/i,sun:/^do(m(enica)?)?/i,mon:/^lu(n(edì)?)?/i,tue:/^ma(r(tedì)?)?/i,wed:/^me(r(coledì)?)?/i,thu:/^gi(o(vedì)?)?/i,fri:/^ve(n(erdì)?)?/i,sat:/^sa(b(ato)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ja-JP' => 'Date.CultureInfo={name:"ja-JP",englishName:"Japanese (Japan)",nativeName:"日本語 (日本)",dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],abbreviatedDayNames:["日","月","火","水","木","金","土"],shortestDayNames:["日","月","火","水","木","金","土"],firstLetterDayNames:["日","月","火","水","木","金","土"],monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],abbreviatedMonthNames:["1","2","3","4","5","6","7","8","9","10","11","12"],amDesignator:"午前",pmDesignator:"午後",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"yyyy\'年\'M\'月\'d\'日\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy\'年\'M\'月\'d\'日\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M\'月\'d\'日\'",yearMonth:"yyyy\'年\'M\'月\'"},regexPatterns:{jan:/^1(月)?/i,feb:/^2(月)?/i,mar:/^3(月)?/i,apr:/^4(月)?/i,may:/^5(月)?/i,jun:/^6(月)?/i,jul:/^7(月)?/i,aug:/^8(月)?/i,sep:/^9(月)?/i,oct:/^10(月)?/i,nov:/^11(月)?/i,dec:/^12(月)?/i,sun:/^日曜日/i,mon:/^月曜日/i,tue:/^火曜日/i,wed:/^水曜日/i,thu:/^木曜日/i,fri:/^金曜日/i,sat:/^土曜日/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ka-GE' => 'Date.CultureInfo={name:"ka-GE",englishName:"Georgian (Georgia)",nativeName:"ქართული (საქართველო)",dayNames:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],abbreviatedDayNames:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],shortestDayNames:["კ","ო","ს","ო","ხ","პ","შ"],firstLetterDayNames:["კ","ო","ს","ო","ხ","პ","შ"],monthNames:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],abbreviatedMonthNames:["იან","თებ","მარ","აპრ","მაის","ივნ","ივლ","აგვ","სექ","ოქტ","ნოემ","დეკ"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"yyyy \'წლის\' dd MM, dddd",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy \'წლის\' dd MM, dddd H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^იან(ვარი)?/i,feb:/^თებ(ერვალი)?/i,mar:/^მარ(ტი)?/i,apr:/^აპრ(ილი)?/i,may:/^მაის(ი)?/i,jun:/^ივნ(ისი)?/i,jul:/^ივლ(ისი)?/i,aug:/^აგვ(ისტო)?/i,sep:/^სექ(ტემბერი)?/i,oct:/^ოქტ(ომბერი)?/i,nov:/^ნოემ(ბერი)?/i,dec:/^დეკ(ემბერი)?/i,sun:/^კ(1)?/i,mon:/^ო(1)?/i,tue:/^ს(1)?/i,wed:/^ო(1)?/i,thu:/^ხ(1)?/i,fri:/^პ(1)?/i,sat:/^შ(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'kk-KZ' => 'Date.CultureInfo={name:"kk-KZ",englishName:"Kazakh (Kazakhstan)",nativeName:"Қазақ (Қазақстан)",dayNames:["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],abbreviatedDayNames:["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],shortestDayNames:["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],firstLetterDayNames:["Ж","Д","С","С","Б","Ж","С"],monthNames:["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан"],abbreviatedMonthNames:["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy \'ж.\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy \'ж.\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^қаң(тар)?/i,feb:/^ақп(ан)?/i,mar:/^нау(рыз)?/i,apr:/^сәу(ір)?/i,may:/^мам(ыр)?/i,jun:/^мау(сым)?/i,jul:/^шіл(де)?/i,aug:/^там(ыз)?/i,sep:/^қыр(күйек)?/i,oct:/^қаз(ан)?/i,nov:/^қар(аша)?/i,dec:/^жел(тоқсан)?/i,sun:/^жексенбі/i,mon:/^дүйсенбі/i,tue:/^сейсенбі/i,wed:/^сәрсенбі/i,thu:/^бейсенбі/i,fri:/^жұма/i,sat:/^сенбі/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'kn-IN' => 'Date.CultureInfo={name:"kn-IN",englishName:"Kannada (India)",nativeName:"ಕನ್ನಡ (ಭಾರತ)",dayNames:["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"],abbreviatedDayNames:["ಭಾನು.","ಸೋಮ.","ಮಂಗಳ.","ಬುಧ.","ಗುರು.","ಶುಕ್ರ.","ಶನಿ."],shortestDayNames:["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"],firstLetterDayNames:["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"],monthNames:["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್"],abbreviatedMonthNames:["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್"],amDesignator:"ಪೂರ್ವಾಹ್ನ",pmDesignator:"ಅಪರಾಹ್ನ",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^ಜನವರಿ/i,feb:/^ಫೆಬ್ರವರಿ/i,mar:/^ಮಾರ್ಚ್/i,apr:/^ಎಪ್ರಿಲ್/i,may:/^ಮೇ/i,jun:/^ಜೂನ್/i,jul:/^ಜುಲೈ/i,aug:/^ಆಗಸ್ಟ್/i,sep:/^ಸೆಪ್ಟಂಬರ್/i,oct:/^ಅಕ್ಟೋಬರ್/i,nov:/^ನವೆಂಬರ್/i,dec:/^ಡಿಸೆಂಬರ್/i,sun:/^ರ(ಾನು(.(ವಾರ)?)?)?/i,mon:/^ಸ(ೋಮ(.(ವಾರ)?)?)?/i,tue:/^ಮ(ಂಗಳ(.(ವಾರ)?)?)?/i,wed:/^ಬ(ುಧ(.(ವಾರ)?)?)?/i,thu:/^ಗ(ುರು(.(ವಾರ)?)?)?/i,fri:/^ಶ(ುಕ್ರ(.(ವಾರ)?)?)?/i,sat:/^ಶ(ನಿ(.(ವಾರ)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ko-KR' => 'Date.CultureInfo={name:"ko-KR",englishName:"Korean (Korea)",nativeName:"한국어 (대한민국)",dayNames:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],abbreviatedDayNames:["일","월","화","수","목","금","토"],shortestDayNames:["일","월","화","수","목","금","토"],firstLetterDayNames:["일","월","화","수","목","금","토"],monthNames:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],abbreviatedMonthNames:["1","2","3","4","5","6","7","8","9","10","11","12"],amDesignator:"오전",pmDesignator:"오후",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"yyyy\'년\' M\'월\' d\'일\' dddd",shortTime:"tt h:mm",longTime:"tt h:mm:ss",fullDateTime:"yyyy\'년\' M\'월\' d\'일\' dddd tt h:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M\'월\' d\'일\'",yearMonth:"yyyy\'년\' M\'월\'"},regexPatterns:{jan:/^1(월)?/i,feb:/^2(월)?/i,mar:/^3(월)?/i,apr:/^4(월)?/i,may:/^5(월)?/i,jun:/^6(월)?/i,jul:/^7(월)?/i,aug:/^8(월)?/i,sep:/^9(월)?/i,oct:/^10(월)?/i,nov:/^11(월)?/i,dec:/^12(월)?/i,sun:/^일요일/i,mon:/^월요일/i,tue:/^화요일/i,wed:/^수요일/i,thu:/^목요일/i,fri:/^금요일/i,sat:/^토요일/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'kok-IN' => 'Date.CultureInfo={name:"kok-IN",englishName:"Konkani (India)",nativeName:"कोंकणी (भारत)",dayNames:["आयतार","सोमार","मंगळार","बुधवार","बिरेस्तार","सुक्रार","शेनवार"],abbreviatedDayNames:["आय.","सोम.","मंगळ.","बुध.","बिरे.","सुक्र.","शेन."],shortestDayNames:["आ","स","म","ब","ब","स","श"],firstLetterDayNames:["आ","स","म","ब","ब","स","श"],monthNames:["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर"],abbreviatedMonthNames:["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर"],amDesignator:"म.पू.",pmDesignator:"म.नं.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^जानेवारी/i,feb:/^फेब्रुवारी/i,mar:/^मार्च/i,apr:/^एप्रिल/i,may:/^मे/i,jun:/^जून/i,jul:/^जुलै/i,aug:/^ऑगस्ट/i,sep:/^सप्टेंबर/i,oct:/^ऑक्टोबर/i,nov:/^नोवेम्बर/i,dec:/^डिसेंबर/i,sun:/^आ(य(.(तार)?)?)?/i,mon:/^स(ोम(.(ार)?)?)?/i,tue:/^म(ंगळ(.(ार)?)?)?/i,wed:/^ब(ुध(.(वार)?)?)?/i,thu:/^ब(िरे(.(स्तार)?)?)?/i,fri:/^स(ुक्र(.(ार)?)?)?/i,sat:/^श(ेन(.(वार)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ky-KG' => 'Date.CultureInfo={name:"ky-KG",englishName:"Kyrgyz (Kyrgyzstan)",nativeName:"Кыргыз (Кыргызстан)",dayNames:["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"],abbreviatedDayNames:["Жш","Дш","Шш","Шр","Бш","Жм","Иш"],shortestDayNames:["Жш","Дш","Шш","Шр","Бш","Жм","Иш"],firstLetterDayNames:["Ж","Д","Ш","Ш","Б","Ж","И"],monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],abbreviatedMonthNames:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yy",longDate:"d\'-\'MMMM yyyy\'-ж.\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d\'-\'MMMM yyyy\'-ж.\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy\'-ж.\'"},regexPatterns:{jan:/^янв(арь)?/i,feb:/^фев(раль)?/i,mar:/^мар(т)?/i,apr:/^апр(ель)?/i,may:/^май/i,jun:/^июн(ь)?/i,jul:/^июл(ь)?/i,aug:/^авг(уст)?/i,sep:/^сен(тябрь)?/i,oct:/^окт(ябрь)?/i,nov:/^ноя(брь)?/i,dec:/^дек(абрь)?/i,sun:/^жекшемби/i,mon:/^дүйшөмбү/i,tue:/^шейшемби/i,wed:/^шаршемби/i,thu:/^бейшемби/i,fri:/^жума/i,sat:/^ишемби/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'lt-LT' => 'Date.CultureInfo={name:"lt-LT",englishName:"Lithuanian (Lithuania)",nativeName:"lietuvių (Lietuva)",dayNames:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],abbreviatedDayNames:["Sk","Pr","An","Tr","Kt","Pn","Št"],shortestDayNames:["S","P","A","T","K","Pn","Š"],firstLetterDayNames:["S","P","A","T","K","P","Š"],monthNames:["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis"],abbreviatedMonthNames:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy.MM.dd",longDate:"yyyy \'m.\' MMMM d \'d.\'",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"yyyy \'m.\' MMMM d \'d.\' HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM d \'d.\'",yearMonth:"yyyy \'m.\' MMMM"},regexPatterns:{jan:/^sau(sis)?/i,feb:/^vas(aris)?/i,mar:/^kov(as)?/i,apr:/^bal(andis)?/i,may:/^geg(užė)?/i,jun:/^bir(želis)?/i,jul:/^lie(pa)?/i,aug:/^rugpjūtis/i,sep:/^rugsėjis/i,oct:/^spalis/i,nov:/^lap(kritis)?/i,dec:/^gruodis/i,sun:/^s(k(kmadienis)?)?/i,mon:/^p(r(rmadienis)?)?/i,tue:/^a(n(tradienis)?)?/i,wed:/^t(r(ečiadienis)?)?/i,thu:/^k(t(tvirtadienis)?)?/i,fri:/^penktadienis/i,sat:/^š(t(štadienis)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'lv-LV' => 'Date.CultureInfo={name:"lv-LV",englishName:"Latvian (Latvia)",nativeName:"latviešu (Latvija)",dayNames:["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],abbreviatedDayNames:["Sv","Pr","Ot","Tr","Ce","Pk","Se"],shortestDayNames:["Sv","Pr","Ot","Tr","Ce","Pk","Se"],firstLetterDayNames:["S","P","O","T","C","P","S"],monthNames:["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy.MM.dd.",longDate:"dddd, yyyy\'. gada \'d. MMMM",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, yyyy\'. gada \'d. MMMM H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"yyyy. MMMM"},regexPatterns:{jan:/^jan(vāris)?/i,feb:/^feb(ruāris)?/i,mar:/^mar(ts)?/i,apr:/^apr(īlis)?/i,may:/^mai(js)?/i,jun:/^jūn(ijs)?/i,jul:/^jūl(ijs)?/i,aug:/^aug(usts)?/i,sep:/^sep(tembris)?/i,oct:/^okt(obris)?/i,nov:/^nov(embris)?/i,dec:/^dec(embris)?/i,sun:/^svētdiena/i,mon:/^pirmdiena/i,tue:/^otrdiena/i,wed:/^trešdiena/i,thu:/^ceturtdiena/i,fri:/^piektdiena/i,sat:/^sestdiena/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'mi-NZ' => 'Date.CultureInfo={name:"mi-NZ",englishName:"Maori (New Zealand)",nativeName:"Reo Māori (Aotearoa)",dayNames:["Rātapu","Mane","Tūrei","Wenerei","Tāite","Paraire","Hātarei"],abbreviatedDayNames:["Ta","Ma","Tū","We","Tāi","Pa","Hā"],shortestDayNames:["Ta","Ma","Tū","We","Tāi","Pa","Hā"],firstLetterDayNames:["T","M","T","W","T","P","H"],monthNames:["Kohi-tātea","Hui-tanguru","Poutū-te-rangi","Paenga-whāwhā","Haratua","Pipiri","Hōngoingoi","Here-turi-kōkā","Mahuru","Whiringa-ā-nuku","Whiringa-ā-rangi","Hakihea"],abbreviatedMonthNames:["Kohi","Hui","Pou","Pae","Hara","Pipi","Hōngoi","Here","Mahu","Whi-nu","Whi-ra","Haki"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/MM/yyyy",longDate:"dddd, d MMMM yyyy",shortTime:"h:mm:ss tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, d MMMM yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^kohi(-tātea)?/i,feb:/^hui(-tanguru)?/i,mar:/^pou(tū-te-rangi)?/i,apr:/^pae(nga-whāwhā)?/i,may:/^hara(tua)?/i,jun:/^pipi(ri)?/i,jul:/^hōngoi(ngoi)?/i,aug:/^here(-turi-kōkā)?/i,sep:/^mahu(ru)?/i,oct:/^whiringa-ā-nuku/i,nov:/^whiringa-ā-rangi/i,dec:/^haki(hea)?/i,sun:/^rātapu/i,mon:/^mane/i,tue:/^tūrei/i,wed:/^wenerei/i,thu:/^tāite/i,fri:/^paraire/i,sat:/^hātarei/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'mk-MK' => 'Date.CultureInfo={name:"mk-MK",englishName:"Macedonian",nativeName:"македонски јазик (Македонија)",dayNames:["недела","понеделник","вторник","среда","четврток","петок","сабота"],abbreviatedDayNames:["нед","пон","втр","срд","чет","пет","саб"],shortestDayNames:["не","по","вт","ср","че","пе","са"],firstLetterDayNames:["н","п","в","с","ч","п","с"],monthNames:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],abbreviatedMonthNames:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^јан(уари)?/i,feb:/^фев(руари)?/i,mar:/^мар(т)?/i,apr:/^апр(ил)?/i,may:/^мај/i,jun:/^јун(и)?/i,jul:/^јул(и)?/i,aug:/^авг(уст)?/i,sep:/^сеп(тември)?/i,oct:/^окт(омври)?/i,nov:/^ное(мври)?/i,dec:/^дек(ември)?/i,sun:/^не(д(ела)?)?/i,mon:/^по(н(еделник)?)?/i,tue:/^вт(р(рник)?)?/i,wed:/^ср(д(да)?)?/i,thu:/^че(т(врток)?)?/i,fri:/^пе(т(ок)?)?/i,sat:/^са(б(ота)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'mn-MN' => 'Date.CultureInfo={name:"mn-MN",englishName:"Mongolian (Cyrillic, Mongolia)",nativeName:"Монгол хэл (Монгол улс)",dayNames:["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],abbreviatedDayNames:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],shortestDayNames:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],firstLetterDayNames:["Н","Д","М","Л","П","Б","Б"],monthNames:["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар"],abbreviatedMonthNames:["I","II","III","IV","V","VI","VII","VШ","IX","X","XI","XII"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yy.MM.dd",longDate:"yyyy \'оны\' MMMM d",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy \'оны\' MMMM d H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"yyyy \'он\' MMMM"},regexPatterns:{jan:/^1 дүгээр сар/i,feb:/^2 дугаар сар/i,mar:/^3 дугаар сар/i,apr:/^4 дүгээр сар/i,may:/^5 дугаар сар/i,jun:/^6 дугаар сар/i,jul:/^7 дугаар сар/i,aug:/^8 дугаар сар/i,sep:/^9 дүгээр сар/i,oct:/^10 дугаар сар/i,nov:/^11 дүгээр сар/i,dec:/^12 дугаар сар/i,sun:/^ням/i,mon:/^даваа/i,tue:/^мягмар/i,wed:/^лхагва/i,thu:/^пүрэв/i,fri:/^баасан/i,sat:/^бямба/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'mr-IN' => 'Date.CultureInfo={name:"mr-IN",englishName:"Marathi (India)",nativeName:"मराठी (भारत)",dayNames:["रविवार","सोमवार","मंगळवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],abbreviatedDayNames:["रवि.","सोम.","मंगळ.","बुध.","गुरु.","शुक्र.","शनि."],shortestDayNames:["र","स","म","ब","ग","श","श"],firstLetterDayNames:["र","स","म","ब","ग","श","श"],monthNames:["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोव्हेंबर","डिसेंबर"],abbreviatedMonthNames:["जाने.","फेब्रु.","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टें.","ऑक्टो.","नोव्हें.","डिसें."],amDesignator:"म.पू.",pmDesignator:"म.नं.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^जाने(.(वारी)?)?/i,feb:/^फेब्रु(.(वारी)?)?/i,mar:/^मार्च/i,apr:/^एप्रिल/i,may:/^मे/i,jun:/^जून/i,jul:/^जुलै/i,aug:/^ऑगस्ट/i,sep:/^सप्टें(.(बर)?)?/i,oct:/^ऑक्टो(.(बर)?)?/i,nov:/^नोव्हें(.(बर)?)?/i,dec:/^डिसें(.(बर)?)?/i,sun:/^र(वि(.(वार)?)?)?/i,mon:/^स(ोम(.(वार)?)?)?/i,tue:/^म(ंगळ(.(वार)?)?)?/i,wed:/^ब(ुध(.(वार)?)?)?/i,thu:/^ग(ुरु(.(वार)?)?)?/i,fri:/^श(ुक्र(.(वार)?)?)?/i,sat:/^श(नि(.(वार)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ms-BN' => 'Date.CultureInfo={name:"ms-BN",englishName:"Malay (Brunei Darussalam)",nativeName:"Bahasa Malaysia (Brunei Darussalam)",dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],abbreviatedDayNames:["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],shortestDayNames:["A","I","S","R","K","J","S"],firstLetterDayNames:["A","I","S","R","K","J","S"],monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],abbreviatedMonthNames:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^mac/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun/i,jul:/^jul(ai)?/i,aug:/^ogos/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dis(ember)?/i,sun:/^a(1)?/i,mon:/^i(1)?/i,tue:/^s(el(asa)?)?/i,wed:/^r(1)?/i,thu:/^k(1)?/i,fri:/^j(1)?/i,sat:/^s(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ms-MY' => 'Date.CultureInfo={name:"ms-MY",englishName:"Malay (Malaysia)",nativeName:"Bahasa Malaysia (Malaysia)",dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],abbreviatedDayNames:["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],shortestDayNames:["A","I","S","R","K","J","S"],firstLetterDayNames:["A","I","S","R","K","J","S"],monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],abbreviatedMonthNames:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^mac/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun/i,jul:/^jul(ai)?/i,aug:/^ogos/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dis(ember)?/i,sun:/^a(1)?/i,mon:/^i(1)?/i,tue:/^s(el(asa)?)?/i,wed:/^r(1)?/i,thu:/^k(1)?/i,fri:/^j(1)?/i,sat:/^s(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'mt-MT' => 'Date.CultureInfo={name:"mt-MT",englishName:"Maltese (Malta)",nativeName:"Malti (Malta)",dayNames:["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"],abbreviatedDayNames:["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],shortestDayNames:["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],firstLetterDayNames:["Ħ","T","T","E","Ħ","Ġ","S"],monthNames:["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awissu","Settembru","Ottubru","Novembru","Diċembru"],abbreviatedMonthNames:["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Awi","Set","Ott","Nov","Diċ"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, d\' ta\\\' \'MMMM yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"dddd, d\' ta\\\' \'MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(nar)?/i,feb:/^fra(r)?/i,mar:/^mar(zu)?/i,apr:/^apr(il)?/i,may:/^mej(ju)?/i,jun:/^ġun(ju)?/i,jul:/^lul(ju)?/i,aug:/^awi(ssu)?/i,sep:/^set(tembru)?/i,oct:/^ott(ubru)?/i,nov:/^nov(embru)?/i,dec:/^diċ(embru)?/i,sun:/^il-ħadd/i,mon:/^it-tnejn/i,tue:/^it-tlieta/i,wed:/^l-erbgħa/i,thu:/^il-ħamis/i,fri:/^il-ġimgħa/i,sat:/^is-sibt/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'nb-NO' => 'Date.CultureInfo={name:"nb-NO",englishName:"Norwegian, Bokmål (Norway)",nativeName:"norsk, bokmål (Norge)",dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],abbreviatedDayNames:["sø","ma","ti","on","to","fr","lø"],shortestDayNames:["sø","ma","ti","on","to","fr","lø"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],abbreviatedMonthNames:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(s)?/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^des(ember)?/i,sun:/^søndag/i,mon:/^mandag/i,tue:/^tirsdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lørdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'nl-BE' => 'Date.CultureInfo={name:"nl-BE",englishName:"Dutch (Belgium)",nativeName:"Nederlands (België)",dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],abbreviatedDayNames:["zo","ma","di","wo","do","vr","za"],shortestDayNames:["zo","ma","di","wo","do","vr","za"],firstLetterDayNames:["z","m","d","w","d","v","z"],monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^maart/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^zondag/i,mon:/^maandag/i,tue:/^dinsdag/i,wed:/^woensdag/i,thu:/^donderdag/i,fri:/^vrijdag/i,sat:/^zaterdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'nl-NL' => 'Date.CultureInfo={name:"nl-NL",englishName:"Dutch (Netherlands)",nativeName:"Nederlands (Nederland)",dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],abbreviatedDayNames:["zo","ma","di","wo","do","vr","za"],shortestDayNames:["zo","ma","di","wo","do","vr","za"],firstLetterDayNames:["z","m","d","w","d","v","z"],monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d-M-yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^maart/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^zondag/i,mon:/^maandag/i,tue:/^dinsdag/i,wed:/^woensdag/i,thu:/^donderdag/i,fri:/^vrijdag/i,sat:/^zaterdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'nn-NO' => 'Date.CultureInfo={name:"nn-NO",englishName:"Norwegian, Nynorsk (Norway)",nativeName:"norsk, nynorsk (Noreg)",dayNames:["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],abbreviatedDayNames:["sø","må","ty","on","to","fr","la"],shortestDayNames:["sø","må","ty","on","to","fr","la"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],abbreviatedMonthNames:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(s)?/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^des(ember)?/i,sun:/^søndag/i,mon:/^måndag/i,tue:/^tysdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^laurdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ns-ZA' => 'Date.CultureInfo={name:"ns-ZA",englishName:"Northern Sotho (South Africa)",nativeName:"Sesotho sa Leboa (Afrika Borwa)",dayNames:["Lamorena","Mošupologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","Ngoatobošego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm:ss tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^pherekgong/i,feb:/^hlakola/i,mar:/^mopitlo/i,apr:/^moranang/i,may:/^mosegamanye/i,jun:/^ngoatobošego/i,jul:/^phuphu/i,aug:/^phato/i,sep:/^lewedi/i,oct:/^diphalana/i,nov:/^dibatsela/i,dec:/^manthole/i,sun:/^lamorena/i,mon:/^mošupologo/i,tue:/^labobedi/i,wed:/^laboraro/i,thu:/^labone/i,fri:/^labohlano/i,sat:/^mokibelo/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'pa-IN' => 'Date.CultureInfo={name:"pa-IN",englishName:"Punjabi (India)",nativeName:"ਪੰਜਾਬੀ (ਭਾਰਤ)",dayNames:["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨੀਚਰਵਾਰ"],abbreviatedDayNames:["ਐਤ.","ਸੋਮ.","ਮੰਗਲ.","ਬੁਧ.","ਵੀਰ.","ਸ਼ੁਕਰ.","ਸ਼ਨੀ."],shortestDayNames:["ਐ","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"],firstLetterDayNames:["ਐ","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"],monthNames:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"],abbreviatedMonthNames:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"],amDesignator:"ਸਵੇਰੇ",pmDesignator:"ਸ਼ਾਮ",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yy",longDate:"dd MMMM yyyy dddd",shortTime:"tt hh:mm",longTime:"tt hh:mm:ss",fullDateTime:"dd MMMM yyyy dddd tt hh:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^ਜਨਵਰੀ/i,feb:/^ਫ਼ਰਵਰੀ/i,mar:/^ਮਾਰਚ/i,apr:/^ਅਪ੍ਰੈਲ/i,may:/^ਮਈ/i,jun:/^ਜੂਨ/i,jul:/^ਜੁਲਾਈ/i,aug:/^ਅਗਸਤ/i,sep:/^ਸਤੰਬਰ/i,oct:/^ਅਕਤੂਬਰ/i,nov:/^ਨਵੰਬਰ/i,dec:/^ਦਸੰਬਰ/i,sun:/^ਐ(ਤ(.(ਵਾਰ)?)?)?/i,mon:/^ਸ(ੋਮ(.(ਵਾਰ)?)?)?/i,tue:/^ਮ(ੰਗਲ(.(ਵਾਰ)?)?)?/i,wed:/^ਬ(ੁਧ(.(ਵਾਰ)?)?)?/i,thu:/^ਵ(ੀਰ(.(ਵਾਰ)?)?)?/i,fri:/^ਸ਼(ੁਕਰ(.(ਰਵਾਰ)?)?)?/i,sat:/^ਸ਼(ਨੀ(.(ਚਰਵਾਰ)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'pl-PL' => 'Date.CultureInfo={name:"pl-PL",englishName:"Polish (Poland)",nativeName:"polski (Polska)",dayNames:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],abbreviatedDayNames:["N","Pn","Wt","Śr","Cz","Pt","So"],shortestDayNames:["N","Pn","Wt","Śr","Cz","Pt","So"],firstLetterDayNames:["N","P","W","Ś","C","P","S"],monthNames:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],abbreviatedMonthNames:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^sty(czeń)?/i,feb:/^lut(y)?/i,mar:/^mar(zec)?/i,apr:/^kwi(ecień)?/i,may:/^maj/i,jun:/^cze(rwiec)?/i,jul:/^lip(iec)?/i,aug:/^sie(rpień)?/i,sep:/^wrz(esień)?/i,oct:/^paź(dziernik)?/i,nov:/^lis(topad)?/i,dec:/^gru(dzień)?/i,sun:/^niedziela/i,mon:/^poniedziałek/i,tue:/^wtorek/i,wed:/^środa/i,thu:/^czwartek/i,fri:/^piątek/i,sat:/^sobota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'pt-BR' => 'Date.CultureInfo={name:"pt-BR",englishName:"Portuguese (Brazil)",nativeName:"Português (Brasil)",dayNames:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],abbreviatedDayNames:["dom","seg","ter","qua","qui","sex","sáb"],shortestDayNames:["dom","seg","ter","qua","qui","sex","sáb"],firstLetterDayNames:["d","s","t","q","q","s","s"],monthNames:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],abbreviatedMonthNames:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d\' de \'MMMM\' de \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, d\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd\' de \'MMMM",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^jan(eiro)?/i,feb:/^fev(ereiro)?/i,mar:/^mar(ço)?/i,apr:/^abr(il)?/i,may:/^mai(o)?/i,jun:/^jun(ho)?/i,jul:/^jul(ho)?/i,aug:/^ago(sto)?/i,sep:/^set(embro)?/i,oct:/^out(ubro)?/i,nov:/^nov(embro)?/i,dec:/^dez(embro)?/i,sun:/^domingo/i,mon:/^segunda-feira/i,tue:/^terça-feira/i,wed:/^quarta-feira/i,thu:/^quinta-feira/i,fri:/^sexta-feira/i,sat:/^sábado/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'pt-PT' => 'Date.CultureInfo={name:"pt-PT",englishName:"Portuguese (Portugal)",nativeName:"português (Portugal)",dayNames:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],abbreviatedDayNames:["dom","seg","ter","qua","qui","sex","sáb"],shortestDayNames:["dom","seg","ter","qua","qui","sex","sáb"],firstLetterDayNames:["d","s","t","q","q","s","s"],monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],abbreviatedMonthNames:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dddd, d\' de \'MMMM\' de \'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, d\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d/M",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^jan(eiro)?/i,feb:/^fev(ereiro)?/i,mar:/^mar(ço)?/i,apr:/^abr(il)?/i,may:/^mai(o)?/i,jun:/^jun(ho)?/i,jul:/^jul(ho)?/i,aug:/^ago(sto)?/i,sep:/^set(embro)?/i,oct:/^out(ubro)?/i,nov:/^nov(embro)?/i,dec:/^dez(embro)?/i,sun:/^domingo/i,mon:/^segunda-feira/i,tue:/^terça-feira/i,wed:/^quarta-feira/i,thu:/^quinta-feira/i,fri:/^sexta-feira/i,sat:/^sábado/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'quz-BO' => 'Date.CultureInfo={name:"quz-BO",englishName:"Quechua (Bolivia)",nativeName:"runasimi (Bolivia Suyu)",dayNames:["intichaw","killachaw","atipachaw","quyllurchaw","Ch\' askachaw","Illapachaw","k\'uychichaw"],abbreviatedDayNames:["int","kil","ati","quy","Ch’","Ill","k\'u"],shortestDayNames:["int","kil","ati","quy","Ch’","Ill","k\'u"],firstLetterDayNames:["i","k","a","q","C","I","k"],monthNames:["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq\'a","Kapaq Raymi"],abbreviatedMonthNames:["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm:ss tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^qul(la puquy)?/i,feb:/^hat(un puquy)?/i,mar:/^pau(qar waray)?/i,apr:/^ayr(iwa)?/i,may:/^aym(uray)?/i,jun:/^int(i raymi)?/i,jul:/^ant(a sitwa)?/i,aug:/^qha(paq sitwa)?/i,sep:/^uma( raymi)?/i,oct:/^kan(taray)?/i,nov:/^aya(marq\'a)?/i,dec:/^kap(aq raymi)?/i,sun:/^intichaw/i,mon:/^killachaw/i,tue:/^atipachaw/i,wed:/^quyllurchaw/i,thu:/^ch\' askachaw/i,fri:/^illapachaw/i,sat:/^k\'uychichaw/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'quz-EC' => 'Date.CultureInfo={name:"quz-EC",englishName:"Quechua (Ecuador)",nativeName:"runasimi (Ecuador Suyu)",dayNames:["intichaw","killachaw","atipachaw","quyllurchaw","Ch\' askachaw","Illapachaw","k\'uychichaw"],abbreviatedDayNames:["int","kil","ati","quy","Ch’","Ill","k\'u"],shortestDayNames:["int","kil","ati","quy","Ch’","Ill","k\'u"],firstLetterDayNames:["i","k","a","q","C","I","k"],monthNames:["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq\'a","Kapaq Raymi"],abbreviatedMonthNames:["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^qul(la puquy)?/i,feb:/^hat(un puquy)?/i,mar:/^pau(qar waray)?/i,apr:/^ayr(iwa)?/i,may:/^aym(uray)?/i,jun:/^int(i raymi)?/i,jul:/^ant(a sitwa)?/i,aug:/^qha(paq sitwa)?/i,sep:/^uma( raymi)?/i,oct:/^kan(taray)?/i,nov:/^aya(marq\'a)?/i,dec:/^kap(aq raymi)?/i,sun:/^intichaw/i,mon:/^killachaw/i,tue:/^atipachaw/i,wed:/^quyllurchaw/i,thu:/^ch\' askachaw/i,fri:/^illapachaw/i,sat:/^k\'uychichaw/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'quz-PE' => 'Date.CultureInfo={name:"quz-PE",englishName:"Quechua (Peru)",nativeName:"runasimi (Peru Suyu)",dayNames:["intichaw","killachaw","atipachaw","quyllurchaw","Ch\' askachaw","Illapachaw","k\'uychichaw"],abbreviatedDayNames:["int","kil","ati","quy","Ch’","Ill","k\'u"],shortestDayNames:["int","kil","ati","quy","Ch’","Ill","k\'u"],firstLetterDayNames:["i","k","a","q","C","I","k"],monthNames:["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq\'a","Kapaq Raymi"],abbreviatedMonthNames:["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap"],amDesignator:"a.m.",pmDesignator:"p.m.",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd\' de \'MMMM\' de \'yyyy",shortTime:"hh:mm:ss tt",longTime:"hh:mm:ss tt",fullDateTime:"dddd, dd\' de \'MMMM\' de \'yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM\' de \'yyyy"},regexPatterns:{jan:/^qul(la puquy)?/i,feb:/^hat(un puquy)?/i,mar:/^pau(qar waray)?/i,apr:/^ayr(iwa)?/i,may:/^aym(uray)?/i,jun:/^int(i raymi)?/i,jul:/^ant(a sitwa)?/i,aug:/^qha(paq sitwa)?/i,sep:/^uma( raymi)?/i,oct:/^kan(taray)?/i,nov:/^aya(marq\'a)?/i,dec:/^kap(aq raymi)?/i,sun:/^intichaw/i,mon:/^killachaw/i,tue:/^atipachaw/i,wed:/^quyllurchaw/i,thu:/^ch\' askachaw/i,fri:/^illapachaw/i,sat:/^k\'uychichaw/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ro-RO' => 'Date.CultureInfo={name:"ro-RO",englishName:"Romanian (Romania)",nativeName:"română (România)",dayNames:["duminică","luni","marţi","miercuri","joi","vineri","sâmbătă"],abbreviatedDayNames:["D","L","Ma","Mi","J","V","S"],shortestDayNames:["D","L","Ma","Mi","J","V","S"],firstLetterDayNames:["D","L","M","M","J","V","S"],monthNames:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],abbreviatedMonthNames:["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ian(.(uarie)?)?/i,feb:/^feb(.(ruarie)?)?/i,mar:/^mar(.(tie)?)?/i,apr:/^apr(.(ilie)?)?/i,may:/^mai(.()?)?/i,jun:/^iun(.(ie)?)?/i,jul:/^iul(.(ie)?)?/i,aug:/^aug(.(ust)?)?/i,sep:/^sep(.(tembrie)?)?/i,oct:/^oct(.(ombrie)?)?/i,nov:/^noiembrie/i,dec:/^dec(.(embrie)?)?/i,sun:/^duminică/i,mon:/^luni/i,tue:/^marţi/i,wed:/^miercuri/i,thu:/^joi/i,fri:/^vineri/i,sat:/^sâmbătă/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ru-RU' => 'Date.CultureInfo={name:"ru-RU",englishName:"Russian (Russia)",nativeName:"русский (Россия)",dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],abbreviatedDayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],shortestDayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],firstLetterDayNames:["В","П","В","С","Ч","П","С"],monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],abbreviatedMonthNames:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy \'г.\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy \'г.\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy \'г.\'"},regexPatterns:{jan:/^янв(арь)?/i,feb:/^фев(раль)?/i,mar:/^мар(т)?/i,apr:/^апр(ель)?/i,may:/^май/i,jun:/^июн(ь)?/i,jul:/^июл(ь)?/i,aug:/^авг(уст)?/i,sep:/^сен(тябрь)?/i,oct:/^окт(ябрь)?/i,nov:/^ноя(брь)?/i,dec:/^дек(абрь)?/i,sun:/^воскресенье/i,mon:/^понедельник/i,tue:/^вторник/i,wed:/^среда/i,thu:/^четверг/i,fri:/^пятница/i,sat:/^суббота/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sa-IN' => 'Date.CultureInfo={name:"sa-IN",englishName:"Sanskrit (India)",nativeName:"संस्कृत (भारतम्)",dayNames:["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],abbreviatedDayNames:["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],shortestDayNames:["र","स","म","ब","ग","श","श"],firstLetterDayNames:["र","स","म","ब","ग","श","श"],monthNames:["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर"],abbreviatedMonthNames:["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर"],amDesignator:"पूर्वाह्न",pmDesignator:"अपराह्न",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM yyyy dddd",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy dddd HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^जनवरी/i,feb:/^फरवरी/i,mar:/^मार्च/i,apr:/^अप्रैल/i,may:/^मई/i,jun:/^जून/i,jul:/^जुलाई/i,aug:/^अगस्त/i,sep:/^सितम्बर/i,oct:/^अक्तूबर/i,nov:/^नवम्बर/i,dec:/^दिसम्बर/i,sun:/^र(1)?/i,mon:/^स(1)?/i,tue:/^म(1)?/i,wed:/^ब(1)?/i,thu:/^ग(1)?/i,fri:/^श(1)?/i,sat:/^श(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'se-FI' => 'Date.CultureInfo={name:"se-FI",englishName:"Sami (Northern) (Finland)",nativeName:"davvisámegiella (Suopma)",dayNames:["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],abbreviatedDayNames:["sotn","vuos","maŋ","gask","duor","bear","láv"],shortestDayNames:["sotn","vuos","maŋ","gask","duor","bear","láv"],firstLetterDayNames:["s","v","m","g","d","b","l"],monthNames:["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu"],abbreviatedMonthNames:["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"MMMM d\'. b. \'yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ođđajagemánnu/i,feb:/^guov(vamánnu)?/i,mar:/^njuk(čamánnu)?/i,apr:/^cuo(ŋománnu)?/i,may:/^mies(semánnu)?/i,jun:/^geas(semánnu)?/i,jul:/^suoi(dnemánnu)?/i,aug:/^borg(emánnu)?/i,sep:/^čakč(amánnu)?/i,oct:/^golg(gotmánnu)?/i,nov:/^skáb(mamánnu)?/i,dec:/^juov(lamánnu)?/i,sun:/^sotnabeaivi/i,mon:/^vuossárga/i,tue:/^maŋŋebárga/i,wed:/^gaskavahkku/i,thu:/^duorastat/i,fri:/^bearjadat/i,sat:/^lávvardat/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'se-NO' => 'Date.CultureInfo={name:"se-NO",englishName:"Sami (Northern) (Norway)",nativeName:"davvisámegiella (Norga)",dayNames:["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],abbreviatedDayNames:["sotn","vuos","maŋ","gask","duor","bear","láv"],shortestDayNames:["sotn","vuos","maŋ","gask","duor","bear","láv"],firstLetterDayNames:["s","v","m","g","d","b","l"],monthNames:["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu"],abbreviatedMonthNames:["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"MMMM d\'. b. \'yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ođđajagemánnu/i,feb:/^guov(vamánnu)?/i,mar:/^njuk(čamánnu)?/i,apr:/^cuo(ŋománnu)?/i,may:/^mies(semánnu)?/i,jun:/^geas(semánnu)?/i,jul:/^suoi(dnemánnu)?/i,aug:/^borg(emánnu)?/i,sep:/^čakč(amánnu)?/i,oct:/^golg(gotmánnu)?/i,nov:/^skáb(mamánnu)?/i,dec:/^juov(lamánnu)?/i,sun:/^sotnabeaivi/i,mon:/^vuossárga/i,tue:/^maŋŋebárga/i,wed:/^gaskavahkku/i,thu:/^duorastat/i,fri:/^bearjadat/i,sat:/^lávvardat/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'se-SE' => 'Date.CultureInfo={name:"se-SE",englishName:"Sami (Northern) (Sweden)",nativeName:"davvisámegiella (Ruoŧŧa)",dayNames:["sotnabeaivi","mánnodat","disdat","gaskavahkku","duorastat","bearjadat","lávvardat"],abbreviatedDayNames:["sotn","mán","dis","gask","duor","bear","láv"],shortestDayNames:["sotn","mán","dis","gask","duor","bear","láv"],firstLetterDayNames:["s","m","d","g","d","b","l"],monthNames:["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu"],abbreviatedMonthNames:["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"MMMM d\'. b. \'yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ođđajagemánnu/i,feb:/^guov(vamánnu)?/i,mar:/^njuk(čamánnu)?/i,apr:/^cuo(ŋománnu)?/i,may:/^mies(semánnu)?/i,jun:/^geas(semánnu)?/i,jul:/^suoi(dnemánnu)?/i,aug:/^borg(emánnu)?/i,sep:/^čakč(amánnu)?/i,oct:/^golg(gotmánnu)?/i,nov:/^skáb(mamánnu)?/i,dec:/^juov(lamánnu)?/i,sun:/^sotnabeaivi/i,mon:/^mánnodat/i,tue:/^disdat/i,wed:/^gaskavahkku/i,thu:/^duorastat/i,fri:/^bearjadat/i,sat:/^lávvardat/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sk-SK' => 'Date.CultureInfo={name:"sk-SK",englishName:"Slovak (Slovakia)",nativeName:"slovenčina (Slovenská republika)",dayNames:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],abbreviatedDayNames:["ne","po","ut","st","št","pi","so"],shortestDayNames:["ne","po","ut","st","št","pi","so"],firstLetterDayNames:["n","p","u","s","š","p","s"],monthNames:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"],abbreviatedMonthNames:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d. M. yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^január/i,feb:/^február/i,mar:/^marec/i,apr:/^apríl/i,may:/^máj/i,jun:/^jún/i,jul:/^júl/i,aug:/^august/i,sep:/^sep(t(ember)?)?/i,oct:/^október/i,nov:/^november/i,dec:/^december/i,sun:/^nedeľa/i,mon:/^pondelok/i,tue:/^utorok/i,wed:/^streda/i,thu:/^štvrtok/i,fri:/^piatok/i,sat:/^sobota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sl-SI' => 'Date.CultureInfo={name:"sl-SI",englishName:"Slovenian (Slovenia)",nativeName:"slovenski (Slovenija)",dayNames:["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"],abbreviatedDayNames:["ned","pon","tor","sre","čet","pet","sob"],shortestDayNames:["ne","po","to","sr","če","pe","so"],firstLetterDayNames:["n","p","t","s","č","p","s"],monthNames:["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(ec)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(ij)?/i,jul:/^jul(ij)?/i,aug:/^avg(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^ne(d(elja)?)?/i,mon:/^po(n(edeljek)?)?/i,tue:/^to(r(ek)?)?/i,wed:/^sr(e(da)?)?/i,thu:/^če(t(rtek)?)?/i,fri:/^pe(t(ek)?)?/i,sat:/^so(b(ota)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sma-NO' => 'Date.CultureInfo={name:"sma-NO",englishName:"Sami (Southern) (Norway)",nativeName:"åarjelsaemiengiele (Nöörje)",dayNames:["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],abbreviatedDayNames:["aej","måa","dæj","gask","duar","bearj","laav"],shortestDayNames:["aej","måa","dæj","gask","duar","bearj","laav"],firstLetterDayNames:["a","m","d","g","d","b","l"],monthNames:["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve"],abbreviatedMonthNames:["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"MMMM d\'. b. \'yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^tsïen(gele)?/i,feb:/^goevt(e)?/i,mar:/^njok(tje)?/i,apr:/^voer(htje)?/i,may:/^sueh(pede)?/i,jun:/^ruff(ie)?/i,jul:/^snja(ltje)?/i,aug:/^mïet(ske)?/i,sep:/^skïer(ede)?/i,oct:/^golk(e)?/i,nov:/^rahk(a)?/i,dec:/^goev(e)?/i,sun:/^aejlege/i,mon:/^måanta/i,tue:/^dæjsta/i,wed:/^gaskevåhkoe/i,thu:/^duarsta/i,fri:/^bearjadahke/i,sat:/^laavvardahke/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sma-SE' => 'Date.CultureInfo={name:"sma-SE",englishName:"Sami (Southern) (Sweden)",nativeName:"åarjelsaemiengiele (Sveerje)",dayNames:["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],abbreviatedDayNames:["aej","måa","dæj","gask","duar","bearj","laav"],shortestDayNames:["aej","måa","dæj","gask","duar","bearj","laav"],firstLetterDayNames:["a","m","d","g","d","b","l"],monthNames:["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve"],abbreviatedMonthNames:["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"MMMM d\'. b. \'yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^tsïen(gele)?/i,feb:/^goevt(e)?/i,mar:/^njok(tje)?/i,apr:/^voer(htje)?/i,may:/^sueh(pede)?/i,jun:/^ruff(ie)?/i,jul:/^snja(ltje)?/i,aug:/^mïet(ske)?/i,sep:/^skïer(ede)?/i,oct:/^golk(e)?/i,nov:/^rahk(a)?/i,dec:/^goev(e)?/i,sun:/^aejlege/i,mon:/^måanta/i,tue:/^dæjsta/i,wed:/^gaskevåhkoe/i,thu:/^duarsta/i,fri:/^bearjadahke/i,sat:/^laavvardahke/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'smj-NO' => 'Date.CultureInfo={name:"smj-NO",englishName:"Sami (Lule) (Norway)",nativeName:"julevusámegiella (Vuodna)",dayNames:["sådnåbiejvve","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],abbreviatedDayNames:["såd","mán","dis","gas","duor","bier","láv"],shortestDayNames:["såd","mán","dis","gas","duor","bier","láv"],firstLetterDayNames:["s","m","d","g","d","b","l"],monthNames:["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno"],abbreviatedMonthNames:["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"MMMM d\'. b. \'yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ådåj(akmánno)?/i,feb:/^guov(vamánno)?/i,mar:/^sjnjuktjamánno/i,apr:/^vuor(atjismánno)?/i,may:/^moar(mesmánno)?/i,jun:/^bieh(tsemánno)?/i,jul:/^sjnjilltjamánno/i,aug:/^bårg(gemánno)?/i,sep:/^ragá(tmánno)?/i,oct:/^gålg(ådismánno)?/i,nov:/^basá(dismánno)?/i,dec:/^javl(lamánno)?/i,sun:/^sådnåbiejvve/i,mon:/^mánnodahka/i,tue:/^dijstahka/i,wed:/^gasskavahkko/i,thu:/^duorastahka/i,fri:/^bierjjedahka/i,sat:/^lávvodahka/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'smj-SE' => 'Date.CultureInfo={name:"smj-SE",englishName:"Sami (Lule) (Sweden)",nativeName:"julevusámegiella (Svierik)",dayNames:["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],abbreviatedDayNames:["ájl","mán","dis","gas","duor","bier","láv"],shortestDayNames:["ájl","mán","dis","gas","duor","bier","láv"],firstLetterDayNames:["á","m","d","g","d","b","l"],monthNames:["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno"],abbreviatedMonthNames:["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"MMMM d\'. b. \'yyyy",shortTime:"HH:mm:ss",longTime:"HH:mm:ss",fullDateTime:"MMMM d\'. b. \'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ådåj(akmánno)?/i,feb:/^guov(vamánno)?/i,mar:/^sjnjuktjamánno/i,apr:/^vuor(atjismánno)?/i,may:/^moar(mesmánno)?/i,jun:/^bieh(tsemánno)?/i,jul:/^sjnjilltjamánno/i,aug:/^bårg(gemánno)?/i,sep:/^ragá(tmánno)?/i,oct:/^gålg(ådismánno)?/i,nov:/^basá(dismánno)?/i,dec:/^javl(lamánno)?/i,sun:/^ájllek/i,mon:/^mánnodahka/i,tue:/^dijstahka/i,wed:/^gasskavahkko/i,thu:/^duorastahka/i,fri:/^bierjjedahka/i,sat:/^lávvodahka/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'smn-FI' => 'Date.CultureInfo={name:"smn-FI",englishName:"Sami (Inari) (Finland)",nativeName:"sämikielâ (Suomâ)",dayNames:["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"],abbreviatedDayNames:["pa","vu","ma","ko","tu","vá","lá"],shortestDayNames:["pa","vu","ma","ko","tu","vá","lá"],firstLetterDayNames:["p","v","m","k","t","v","l"],monthNames:["uđđâivemáánu","kuovâmáánu","njuhčâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","čohčâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu"],abbreviatedMonthNames:["uđiv","kuov","njuh","cuoŋ","vyes","kesi","syei","porg","čoh","roov","ska","juov"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"MMMM d\'. p. \'yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"MMMM d\'. p. \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^uđđâivemáánu/i,feb:/^kuov(âmáánu)?/i,mar:/^njuh(čâmáánu)?/i,apr:/^cuáŋuimáánu/i,may:/^vyes(imáánu)?/i,jun:/^kesi(máánu)?/i,jul:/^syei(nimáánu)?/i,aug:/^porg(emáánu)?/i,sep:/^čoh(čâmáánu)?/i,oct:/^roov(vâdmáánu)?/i,nov:/^ska(mmâmáánu)?/i,dec:/^juov(lâmáánu)?/i,sun:/^pasepeivi/i,mon:/^vuossargâ/i,tue:/^majebargâ/i,wed:/^koskokko/i,thu:/^tuorâstâh/i,fri:/^vástuppeivi/i,sat:/^lávárdâh/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sms-FI' => 'Date.CultureInfo={name:"sms-FI",englishName:"Sami (Skolt) (Finland)",nativeName:"sääm´ǩiõll (Lää´ddjânnam)",dayNames:["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"],abbreviatedDayNames:["pâ","vu","mâ","se","ne","pi","su"],shortestDayNames:["pâ","vu","mâ","se","ne","pi","su"],firstLetterDayNames:["p","v","m","s","n","p","s"],monthNames:["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhččmään","vue´ssmään","ǩie´ssmään","suei´nnmään","på´rǧǧmään","čõhččmään","kålggmään","skamm´mään","rosttovmään"],abbreviatedMonthNames:["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"MMMM d\'. p. \'yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"MMMM d\'. p. \'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ođđee´jjmään/i,feb:/^tä´lvv(mään)?/i,mar:/^pâ´zzlâšttammään/i,apr:/^njuh(ččmään)?/i,may:/^vue(´ssmään)?/i,jun:/^ǩie(´ssmään)?/i,jul:/^suei(´nnmään)?/i,aug:/^på´r(ǧǧmään)?/i,sep:/^čõh(ččmään)?/i,oct:/^kålg(gmään)?/i,nov:/^ska(mm´mään)?/i,dec:/^rost(tovmään)?/i,sun:/^pâ´sspei´vv/i,mon:/^vuõssargg/i,tue:/^mââibargg/i,wed:/^seärad/i,thu:/^nelljdpei´vv/i,fri:/^piâtnâc/i,sat:/^sue´vet/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sq-AL' => 'Date.CultureInfo={name:"sq-AL",englishName:"Albanian (Albania)",nativeName:"shqipe (Shqipëria)",dayNames:["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"],abbreviatedDayNames:["Die","Hën","Mar","Mër","Enj","Pre","Sht"],shortestDayNames:["Di","Hë","Ma","Më","En","Pr","Sh"],firstLetterDayNames:["D","H","M","M","E","P","S"],monthNames:["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor"],abbreviatedMonthNames:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj"],amDesignator:"PD",pmDesignator:"MD",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"yyyy-MM-dd",shortTime:"h:mm.tt",longTime:"h:mm:ss.tt",fullDateTime:"yyyy-MM-dd h:mm:ss.tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"yyyy-MM"},regexPatterns:{jan:/^jan(ar)?/i,feb:/^shk(urt)?/i,mar:/^mar(s)?/i,apr:/^pri(ll)?/i,may:/^maj/i,jun:/^qer(shor)?/i,jul:/^kor(rik)?/i,aug:/^gusht/i,sep:/^sht(ator)?/i,oct:/^tet(or)?/i,nov:/^nën(tor)?/i,dec:/^dhj(etor)?/i,sun:/^di(e(iel)?)?/i,mon:/^hë(n(ënë)?)?/i,tue:/^ma(r(artë)?)?/i,wed:/^më(r(ërkurë)?)?/i,thu:/^en(j(njte)?)?/i,fri:/^pr(e(remte)?)?/i,sat:/^sh(t(htunë)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sr-Cyrl-BA' => 'Date.CultureInfo={name:"sr-Cyrl-BA",englishName:"Serbian (Cyrillic) (Bosnia and Herzegovina)",nativeName:"српски (Босна и Херцеговина)",dayNames:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],abbreviatedDayNames:["нед","пон","уто","сре","чет","пет","суб"],shortestDayNames:["нед","пон","уто","сре","чет","пет","суб"],firstLetterDayNames:["н","п","у","с","ч","п","с"],monthNames:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],abbreviatedMonthNames:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^јан(уар)?/i,feb:/^феб(руар)?/i,mar:/^мар(т)?/i,apr:/^апр(ил)?/i,may:/^мај/i,jun:/^јун/i,jul:/^јул/i,aug:/^авг(уст)?/i,sep:/^сеп(тембар)?/i,oct:/^окт(обар)?/i,nov:/^нов(ембар)?/i,dec:/^дец(ембар)?/i,sun:/^недеља/i,mon:/^понедељак/i,tue:/^уторак/i,wed:/^среда/i,thu:/^четвртак/i,fri:/^петак/i,sat:/^субота/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sr-Cyrl-CS' => 'Date.CultureInfo={name:"sr-Cyrl-CS",englishName:"Serbian (Cyrillic, Serbia)",nativeName:"српски (Србија)",dayNames:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],abbreviatedDayNames:["нед","пон","уто","сре","чет","пет","суб"],shortestDayNames:["не","по","ут","ср","че","пе","су"],firstLetterDayNames:["н","п","у","с","ч","п","с"],monthNames:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],abbreviatedMonthNames:["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^јан(уар)?/i,feb:/^феб(руар)?/i,mar:/^мар(т)?/i,apr:/^апр(ил)?/i,may:/^мај/i,jun:/^јун/i,jul:/^јул/i,aug:/^авг(уст)?/i,sep:/^сеп(тембар)?/i,oct:/^окт(обар)?/i,nov:/^нов(ембар)?/i,dec:/^дец(ембар)?/i,sun:/^не(д(еља)?)?/i,mon:/^по(н(едељак)?)?/i,tue:/^ут(о(рак)?)?/i,wed:/^ср(е(да)?)?/i,thu:/^че(т(вртак)?)?/i,fri:/^пе(т(ак)?)?/i,sat:/^су(б(ота)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sr-Latn-BA' => 'Date.CultureInfo={name:"sr-Latn-BA",englishName:"Serbian (Latin) (Bosnia and Herzegovina)",nativeName:"srpski (Bosna i Hercegovina)",dayNames:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sre","čet","pet","sub"],shortestDayNames:["ned","pon","uto","sre","čet","pet","sub"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(t)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun/i,jul:/^jul/i,aug:/^avg(ust)?/i,sep:/^sep(tembar)?/i,oct:/^okt(obar)?/i,nov:/^nov(embar)?/i,dec:/^dec(embar)?/i,sun:/^nedelja/i,mon:/^ponedeljak/i,tue:/^utorak/i,wed:/^sreda/i,thu:/^četvrtak/i,fri:/^petak/i,sat:/^subota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sr-Latn-CS' => 'Date.CultureInfo={name:"sr-Latn-CS",englishName:"Serbian (Latin, Serbia)",nativeName:"srpski (Srbija)",dayNames:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sre","čet","pet","sub"],shortestDayNames:["ne","po","ut","sr","če","pe","su"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(t)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun/i,jul:/^jul/i,aug:/^avg(ust)?/i,sep:/^sep(tembar)?/i,oct:/^okt(obar)?/i,nov:/^nov(embar)?/i,dec:/^dec(embar)?/i,sun:/^ne(d(elja)?)?/i,mon:/^po(n(edeljak)?)?/i,tue:/^ut(o(rak)?)?/i,wed:/^sr(e(da)?)?/i,thu:/^če(t(vrtak)?)?/i,fri:/^pe(t(ak)?)?/i,sat:/^su(b(ota)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sv-FI' => 'Date.CultureInfo={name:"sv-FI",englishName:"Swedish (Finland)",nativeName:"svenska (Finland)",dayNames:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],abbreviatedDayNames:["sö","må","ti","on","to","fr","lö"],shortestDayNames:["sö","må","ti","on","to","fr","lö"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"\'den \'d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"\'den \'d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"\'den \'d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^mar(s)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(usti)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^söndag/i,mon:/^måndag/i,tue:/^tisdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lördag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sv-SE' => 'Date.CultureInfo={name:"sv-SE",englishName:"Swedish (Sweden)",nativeName:"svenska (Sverige)",dayNames:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],abbreviatedDayNames:["sö","må","ti","on","to","fr","lö"],shortestDayNames:["sö","må","ti","on","to","fr","lö"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"\'den \'d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"\'den \'d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"\'den \'d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^mar(s)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(usti)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^söndag/i,mon:/^måndag/i,tue:/^tisdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lördag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'sw-KE' => 'Date.CultureInfo={name:"sw-KE",englishName:"Kiswahili (Kenya)",nativeName:"Kiswahili (Kenya)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["S","M","T","W","T","F","S"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^s(un(day)?)?/i,mon:/^m(on(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^w(ed(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^f(ri(day)?)?/i,sat:/^s(at(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'syr-SY' => 'Date.CultureInfo={name:"syr-SY",englishName:"Syriac (Syria)",nativeName:"ܣܘܪܝܝܐ (سوريا)",dayNames:["ܚܕ ܒܫܒܐ","ܬܪܝܢ ܒܫܒܐ","ܬܠܬܐ ܒܫܒܐ","ܐܪܒܥܐ ܒܫܒܐ","ܚܡܫܐ ܒܫܒܐ","ܥܪܘܒܬܐ","ܫܒܬܐ"],abbreviatedDayNames:["܏ܐ ܏ܒܫ","܏ܒ ܏ܒܫ","܏ܓ ܏ܒܫ","܏ܕ ܏ܒܫ","܏ܗ ܏ܒܫ","܏ܥܪܘܒ","܏ܫܒ"],shortestDayNames:["܏","܏","܏","܏","܏","܏","܏"],firstLetterDayNames:["܏","܏","܏","܏","܏","܏","܏"],monthNames:["ܟܢܘܢ ܐܚܪܝ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","ܬܫܪܝ ܩܕܝܡ","ܬܫܪܝ ܐܚܪܝ","ܟܢܘܢ ܩܕܝܡ"],abbreviatedMonthNames:["܏ܟܢ ܏ܒ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","܏ܬܫ ܏ܐ","܏ܬܫ ܏ܒ","܏ܟܢ ܏ܐ"],amDesignator:"ܩ.ܛ",pmDesignator:"ܒ.ܛ",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^ܟܢܘܢ ܐܚܪܝ/i,feb:/^ܫܒܛ/i,mar:/^ܐܕܪ/i,apr:/^ܢܝܣܢ/i,may:/^ܐܝܪ/i,jun:/^ܚܙܝܪܢ/i,jul:/^ܬܡܘܙ/i,aug:/^ܐܒ/i,sep:/^ܐܝܠܘܠ/i,oct:/^ܬܫܪܝ ܩܕܝܡ/i,nov:/^ܬܫܪܝ ܐܚܪܝ/i,dec:/^ܟܢܘܢ ܩܕܝܡ/i,sun:/^܏(ܐ ܏ܒܫ(ܐ)?)?/i,mon:/^܏(ܒ ܏ܒܫ(ܫܒܐ)?)?/i,tue:/^܏(ܓ ܏ܒܫ(ܫܒܐ)?)?/i,wed:/^܏(ܕ ܏ܒܫ(ܒܫܒܐ)?)?/i,thu:/^܏(ܗ ܏ܒܫ(ܫܒܐ)?)?/i,fri:/^܏(ܥܪܘܒ(ܐ)?)?/i,sat:/^܏(ܫܒ(ܐ)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ta-IN' => 'Date.CultureInfo={name:"ta-IN",englishName:"Tamil (India)",nativeName:"தமிழ் (இந்தியா)",dayNames:["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],abbreviatedDayNames:["ஞா","தி","செ","பு","வி","வெ","ச"],shortestDayNames:["ஞ","த","ச","ப","வ","வ","ச"],firstLetterDayNames:["ஞ","த","ச","ப","வ","வ","ச"],monthNames:["ஜனவரி","பெப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"],abbreviatedMonthNames:["ஜன.","பெப்.","மார்.","ஏப்.","மே","ஜூன்","ஜூலை","ஆக.","செப்.","அக்.","நவ.","டிச."],amDesignator:"காலை",pmDesignator:"மாலை",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ஜன(.(வரி)?)?/i,feb:/^பெப்(.(ரவரி)?)?/i,mar:/^மார்(.(ச்)?)?/i,apr:/^ஏப்(.(ரல்)?)?/i,may:/^மே/i,jun:/^ஜூன்/i,jul:/^ஜூலை/i,aug:/^ஆக(.(ஸ்ட்)?)?/i,sep:/^செப்(.(டம்பர்)?)?/i,oct:/^அக்(.(டோபர்)?)?/i,nov:/^நவ(.(ம்பர்)?)?/i,dec:/^டிச(.(ம்பர்)?)?/i,sun:/^ஞ(ா(யிறு)?)?/i,mon:/^த(ி(ங்கள்)?)?/i,tue:/^ச(ெ(வ்வாய்)?)?/i,wed:/^ப(ு(தன்)?)?/i,thu:/^வ(ி(யாழன்)?)?/i,fri:/^வ(ெ(ள்ளி)?)?/i,sat:/^சனி/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'te-IN' => 'Date.CultureInfo={name:"te-IN",englishName:"Telugu (India)",nativeName:"తెలుగు (భారత దేశం)",dayNames:["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"],abbreviatedDayNames:["ఆది.","సోమ.","మంగళ.","బుధ.","గురు.","శుక్ర.","శని."],shortestDayNames:["ఆ","స","మ","బ","గ","శ","శ"],firstLetterDayNames:["ఆ","స","మ","బ","గ","శ","శ"],monthNames:["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్"],abbreviatedMonthNames:["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్"],amDesignator:"పూర్వాహ్న",pmDesignator:"అపరాహ్న",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^జనవరి/i,feb:/^ఫిబ్రవరి/i,mar:/^మార్చి/i,apr:/^ఏప్రిల్/i,may:/^మే/i,jun:/^జూన్/i,jul:/^జూలై/i,aug:/^ఆగస్టు/i,sep:/^సెప్టెంబర్/i,oct:/^అక్టోబర్/i,nov:/^నవంబర్/i,dec:/^డిసెంబర్/i,sun:/^ఆ(ది(.(వారం)?)?)?/i,mon:/^స(ోమ(.(వారం)?)?)?/i,tue:/^మ(ంగళ(.(వారం)?)?)?/i,wed:/^బ(ుధ(.(వారం)?)?)?/i,thu:/^గ(ురు(.(వారం)?)?)?/i,fri:/^శ(ుక్ర(.(వారం)?)?)?/i,sat:/^శ(ని(.(వారం)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'th-TH' => 'Date.CultureInfo={name:"th-TH",englishName:"Thai (Thailand)",nativeName:"ไทย (ไทย)",dayNames:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],abbreviatedDayNames:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],shortestDayNames:["อ","จ","อ","พ","พ","ศ","ส"],firstLetterDayNames:["อ","จ","อ","พ","พ","ศ","ส"],monthNames:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],abbreviatedMonthNames:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2572,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ม(.(กราค)?)?/i,feb:/^ก(.(ุมภาพันธ์)?)?/i,mar:/^มี(.(นาคม)?)?/i,apr:/^เม(.(ษายน)?)?/i,may:/^พ(.(ฤษภาคม)?)?/i,jun:/^มิ(.(ถุนายน)?)?/i,jul:/^ก(.(รฎาคม)?)?/i,aug:/^ส(.(ิงหาคม)?)?/i,sep:/^ก(.(ันยายน)?)?/i,oct:/^ต(.(ุลาคม)?)?/i,nov:/^พ(.(ฤศจิกายน)?)?/i,dec:/^ธ(.(ันวาคม)?)?/i,sun:/^อ(า(.(ทิตย์)?)?)?/i,mon:/^จ((.(ันทร์)?)?)?/i,tue:/^อ((.(ังคาร)?)?)?/i,wed:/^พ((.(ุธ)?)?)?/i,thu:/^พ(ฤ(.(หัสบดี)?)?)?/i,fri:/^ศ((.(ุกร์)?)?)?/i,sat:/^ส((.(สาร์)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'tn-ZA' => 'Date.CultureInfo={name:"tn-ZA",englishName:"Tswana (South Africa)",nativeName:"Setswana (Aforika Borwa)",dayNames:["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm:ss tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ferikgong/i,feb:/^tlhakole/i,mar:/^mopitloe/i,apr:/^moranang/i,may:/^motsheganong/i,jun:/^seetebosigo/i,jul:/^phukwi/i,aug:/^phatwe/i,sep:/^lwetse/i,oct:/^diphalane/i,nov:/^ngwanatsele/i,dec:/^sedimothole/i,sun:/^latshipi/i,mon:/^mosupologo/i,tue:/^labobedi/i,wed:/^laboraro/i,thu:/^labone/i,fri:/^labotlhano/i,sat:/^lamatlhatso/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'tr-TR' => 'Date.CultureInfo={name:"tr-TR",englishName:"Turkish (Turkey)",nativeName:"Türkçe (Türkiye)",dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],abbreviatedDayNames:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],shortestDayNames:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],firstLetterDayNames:["P","P","S","Ç","P","C","C"],monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],abbreviatedMonthNames:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dd MMMM yyyy dddd",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy dddd HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^oca(k)?/i,feb:/^şub(at)?/i,mar:/^mar(t)?/i,apr:/^nis(an)?/i,may:/^may(ıs)?/i,jun:/^haz(iran)?/i,jul:/^tem(muz)?/i,aug:/^ağu(stos)?/i,sep:/^eyl(ül)?/i,oct:/^eki(m)?/i,nov:/^kas(ım)?/i,dec:/^ara(lık)?/i,sun:/^pz(z(ar)?)?/i,mon:/^pt(t(artesi)?)?/i,tue:/^sa(l(ı)?)?/i,wed:/^ça(r(şamba)?)?/i,thu:/^pe(r(şembe)?)?/i,fri:/^cu(m(a)?)?/i,sat:/^ct(t(artesi)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'tt-RU' => 'Date.CultureInfo={name:"tt-RU",englishName:"Tatar (Russia)",nativeName:"Татар (Россия)",dayNames:["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"],abbreviatedDayNames:["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"],shortestDayNames:["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"],firstLetterDayNames:["Я","Д","С","Ч","П","Җ","Ш"],monthNames:["Гыйнварь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],abbreviatedMonthNames:["Гыйнв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^гыйнв(арь)?/i,feb:/^фев(раль)?/i,mar:/^мар(т)?/i,apr:/^апр(ель)?/i,may:/^май/i,jun:/^июн(ь)?/i,jul:/^июл(ь)?/i,aug:/^авг(уст)?/i,sep:/^сен(тябрь)?/i,oct:/^окт(ябрь)?/i,nov:/^ноя(брь)?/i,dec:/^дек(абрь)?/i,sun:/^якшәмбе/i,mon:/^дүшәмбе/i,tue:/^сишәмбе/i,wed:/^чәршәмбе/i,thu:/^пәнҗешәмбе/i,fri:/^җомга/i,sat:/^шимбә/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'uk-UA' => 'Date.CultureInfo={name:"uk-UA",englishName:"Ukrainian (Ukraine)",nativeName:"україньска (Україна)",dayNames:["неділя","понеділок","вівторок","середа","четвер","п\'ятниця","субота"],abbreviatedDayNames:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],shortestDayNames:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],firstLetterDayNames:["Н","П","В","С","Ч","П","С"],monthNames:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],abbreviatedMonthNames:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy\' р.\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy\' р.\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy\' р.\'"},regexPatterns:{jan:/^січ(ень)?/i,feb:/^лют(ий)?/i,mar:/^бер(езень)?/i,apr:/^кві(тень)?/i,may:/^тра(вень)?/i,jun:/^чер(вень)?/i,jul:/^лип(ень)?/i,aug:/^сер(пень)?/i,sep:/^вер(есень)?/i,oct:/^жов(тень)?/i,nov:/^лис(топад)?/i,dec:/^гру(день)?/i,sun:/^неділя/i,mon:/^понеділок/i,tue:/^вівторок/i,wed:/^середа/i,thu:/^четвер/i,fri:/^п\'ятниця/i,sat:/^субота/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'ur-PK' => 'Date.CultureInfo={name:"ur-PK",englishName:"Urdu (Islamic Republic of Pakistan)",nativeName:"اُردو (پاکستان)",dayNames:["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],abbreviatedDayNames:["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],shortestDayNames:["ا","پ","م","ب","ج","ج","ه"],firstLetterDayNames:["ا","پ","م","ب","ج","ج","ه"],monthNames:["جنورى","فرورى","مارچ","اپريل","مئ","جون","جولاٸ","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],abbreviatedMonthNames:["جنورى","فرورى","مارچ","اپريل","مئ","جون","جولاٸ","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dd MMMM, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^جنورى/i,feb:/^فرورى/i,mar:/^مارچ/i,apr:/^اپريل/i,may:/^مئ/i,jun:/^جون/i,jul:/^جولاٸ/i,aug:/^اگست/i,sep:/^ستمبر/i,oct:/^اکتوبر/i,nov:/^نومبر/i,dec:/^دسمبر/i,sun:/^ا(1)?/i,mon:/^پ(1)?/i,tue:/^م(1)?/i,wed:/^ب(1)?/i,thu:/^ج(1)?/i,fri:/^ج(1)?/i,sat:/^ه(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'uz-Cyrl-UZ' => 'Date.CultureInfo={name:"uz-Cyrl-UZ",englishName:"Uzbek (Cyrillic, Uzbekistan)",nativeName:"Ўзбек (Ўзбекистон)",dayNames:["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"],abbreviatedDayNames:["якш","дш","сш","чш","пш","ж","ш"],shortestDayNames:["якш","дш","сш","чш","пш","ж","ш"],firstLetterDayNames:["я","д","с","ч","п","ж","ш"],monthNames:["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр"],abbreviatedMonthNames:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"yyyy \'йил\' d-MMMM",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"yyyy \'йил\' d-MMMM HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d-MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^янв(ар)?/i,feb:/^фев(рал)?/i,mar:/^мар(т)?/i,apr:/^апр(ел)?/i,may:/^май/i,jun:/^июн/i,jul:/^июл/i,aug:/^авг(уст)?/i,sep:/^сен(тябр)?/i,oct:/^окт(ябр)?/i,nov:/^ноя(бр)?/i,dec:/^дек(абр)?/i,sun:/^якшанба/i,mon:/^душанба/i,tue:/^сешанба/i,wed:/^чоршанба/i,thu:/^пайшанба/i,fri:/^жума/i,sat:/^шанба/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'uz-Latn-UZ' => 'Date.CultureInfo={name:"uz-Latn-UZ",englishName:"Uzbek (Latin, Uzbekistan)",nativeName:"U\'zbek (U\'zbekiston Respublikasi)",dayNames:["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],abbreviatedDayNames:["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],shortestDayNames:["yak","dsh","sesh","chr","psh","jm","sh"],firstLetterDayNames:["y","d","s","c","p","j","s"],monthNames:["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr"],abbreviatedMonthNames:["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM yyyy",longDate:"yyyy \'yil\' d-MMMM",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"yyyy \'yil\' d-MMMM HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d-MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^yanvar/i,feb:/^fevral/i,mar:/^mart/i,apr:/^aprel/i,may:/^may/i,jun:/^iyun/i,jul:/^iyul/i,aug:/^avgust/i,sep:/^sentyabr/i,oct:/^oktyabr/i,nov:/^noyabr/i,dec:/^dekabr/i,sun:/^yak((.(shanba)?)?)?/i,mon:/^dsh((.(hanba)?)?)?/i,tue:/^sesh((.(anba)?)?)?/i,wed:/^chr((.(rshanba)?)?)?/i,thu:/^psh((.(shanba)?)?)?/i,fri:/^jm((.(ma)?)?)?/i,sat:/^sh((.(anba)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'vi-VN' => 'Date.CultureInfo={name:"vi-VN",englishName:"Vietnamese (Vietnam)",nativeName:"Tiếng Việt (Việt Nam)",dayNames:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],abbreviatedDayNames:["CN","Hai","Ba","Tư","Năm","Sáu","Bảy"],shortestDayNames:["C","H","B","T","N","S","B"],firstLetterDayNames:["C","H","B","T","N","S","B"],monthNames:["Tháng Giêng","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"],abbreviatedMonthNames:["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12"],amDesignator:"SA",pmDesignator:"CH",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dd MMMM yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^tháng giêng/i,feb:/^tháng hai/i,mar:/^tháng ba/i,apr:/^tháng tư/i,may:/^tháng năm/i,jun:/^tháng sáu/i,jul:/^tháng bảy/i,aug:/^tháng tám/i,sep:/^tháng chín/i,oct:/^tháng mười/i,nov:/^tháng mười một/i,dec:/^tháng mười hai/i,sun:/^c(n(ủ nhật)?)?/i,mon:/^h(ai(́ hai)?)?/i,tue:/^b(a(ứ ba)?)?/i,wed:/^t(ư(ứ tư)?)?/i,thu:/^n(ăm(́ năm)?)?/i,fri:/^s(áu( sáu)?)?/i,sat:/^b(ảy( bảy)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'xh-ZA' => 'Date.CultureInfo={name:"xh-ZA",englishName:"Xhosa (South Africa)",nativeName:"isiXhosa (uMzantsi Afrika)",dayNames:["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["eyoMqungu","eyoMdumba","eyoKwindla","Tshazimpuzi","Canzibe","eyeSilimela","eyeKhala","eyeThupha","eyoMsintsi","eyeDwara","eyeNkanga","eyoMnga"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm:ss tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^eyomqungu/i,feb:/^eyomdumba/i,mar:/^eyokwindla/i,apr:/^tshazimpuzi/i,may:/^canzibe/i,jun:/^eyesilimela/i,jul:/^eyekhala/i,aug:/^eyethupha/i,sep:/^eyomsintsi/i,oct:/^eyedwara/i,nov:/^eyenkanga/i,dec:/^eyomnga/i,sun:/^icawa/i,mon:/^umvulo/i,tue:/^ulwesibini/i,wed:/^ulwesithathu/i,thu:/^ulwesine/i,fri:/^ulwesihlanu/i,sat:/^umgqibelo/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'zh-CN' => 'Date.CultureInfo={name:"zh-CN",englishName:"Chinese (People\'s Republic of China)",nativeName:"中文(中华人民共和国)",dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],abbreviatedDayNames:["日","一","二","三","四","五","六"],shortestDayNames:["日","一","二","三","四","五","六"],firstLetterDayNames:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],abbreviatedMonthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],amDesignator:"上午",pmDesignator:"下午",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/M/d",longDate:"yyyy\'年\'M\'月\'d\'日\'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy\'年\'M\'月\'d\'日\' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M\'月\'d\'日\'",yearMonth:"yyyy\'年\'M\'月\'"},regexPatterns:{jan:/^一月/i,feb:/^二月/i,mar:/^三月/i,apr:/^四月/i,may:/^五月/i,jun:/^六月/i,jul:/^七月/i,aug:/^八月/i,sep:/^九月/i,oct:/^十月/i,nov:/^十一月/i,dec:/^十二月/i,sun:/^星期日/i,mon:/^星期一/i,tue:/^星期二/i,wed:/^星期三/i,thu:/^星期四/i,fri:/^星期五/i,sat:/^星期六/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'zh-HK' => 'Date.CultureInfo={name:"zh-HK",englishName:"Chinese (Hong Kong S.A.R.)",nativeName:"中文(香港特别行政區)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, d MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'zh-MO' => 'Date.CultureInfo={name:"zh-MO",englishName:"Chinese (Macao S.A.R.)",nativeName:"中文(澳門特别行政區)",dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],abbreviatedDayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortestDayNames:["日","一","二","三","四","五","六"],firstLetterDayNames:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],abbreviatedMonthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, d MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^一月/i,feb:/^二月/i,mar:/^三月/i,apr:/^四月/i,may:/^五月/i,jun:/^六月/i,jul:/^七月/i,aug:/^八月/i,sep:/^九月/i,oct:/^十月/i,nov:/^十一月/i,dec:/^十二月/i,sun:/^星期日/i,mon:/^星期一/i,tue:/^星期二/i,wed:/^星期三/i,thu:/^星期四/i,fri:/^星期五/i,sat:/^星期六/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'zh-SG' => 'Date.CultureInfo={name:"zh-SG",englishName:"Chinese (Singapore)",nativeName:"中文(新加坡)",dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],abbreviatedDayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortestDayNames:["日","一","二","三","四","五","六"],firstLetterDayNames:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],abbreviatedMonthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d MMMM, yyyy",shortTime:"tt h:mm",longTime:"tt h:mm:ss",fullDateTime:"dddd, d MMMM, yyyy tt h:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^一月/i,feb:/^二月/i,mar:/^三月/i,apr:/^四月/i,may:/^五月/i,jun:/^六月/i,jul:/^七月/i,aug:/^八月/i,sep:/^九月/i,oct:/^十月/i,nov:/^十一月/i,dec:/^十二月/i,sun:/^星期日/i,mon:/^星期一/i,tue:/^星期二/i,wed:/^星期三/i,thu:/^星期四/i,fri:/^星期五/i,sat:/^星期六/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'zh-TW' => 'Date.CultureInfo={name:"zh-TW",englishName:"Chinese (Taiwan)",nativeName:"中文(台灣)",dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],abbreviatedDayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortestDayNames:["日","一","二","三","四","五","六"],firstLetterDayNames:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],abbreviatedMonthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],amDesignator:"上午",pmDesignator:"下午",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/M/d",longDate:"yyyy\'年\'M\'月\'d\'日\'",shortTime:"tt hh:mm",longTime:"tt hh:mm:ss",fullDateTime:"yyyy\'年\'M\'月\'d\'日\' tt hh:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M\'月\'d\'日\'",yearMonth:"yyyy\'年\'M\'月\'"},regexPatterns:{jan:/^一月/i,feb:/^二月/i,mar:/^三月/i,apr:/^四月/i,may:/^五月/i,jun:/^六月/i,jul:/^七月/i,aug:/^八月/i,sep:/^九月/i,oct:/^十月/i,nov:/^十一月/i,dec:/^十二月/i,sun:/^星期日/i,mon:/^星期一/i,tue:/^星期二/i,wed:/^星期三/i,thu:/^星期四/i,fri:/^星期五/i,sat:/^星期六/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', - 'zu-ZA' => 'Date.CultureInfo={name:"zu-ZA",englishName:"Zulu (South Africa)",nativeName:"isiZulu (iNingizimu Afrika)",dayNames:["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["uJanuwari","uFebuwari","uMashi","uAprhili","uMeyi","uJuni","uJulayi","uAgaste","uSepthemba","uOkthoba","uNovemba","uDisemba"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm:ss tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ujanuwari/i,feb:/^ufebuwari/i,mar:/^umashi/i,apr:/^uaprhili/i,may:/^umeyi/i,jun:/^ujuni/i,jul:/^ujulayi/i,aug:/^uagaste/i,sep:/^usepthemba/i,oct:/^uokthoba/i,nov:/^unovemba/i,dec:/^udisemba/i,sun:/^isonto/i,mon:/^umsombuluko/i,tue:/^ulwesibili/i,wed:/^ulwesithathu/i,thu:/^ulwesine/i,fri:/^ulwesihlanu/i,sat:/^umgqibelo/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\\+|after|from)/i,subtract:/^(\\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\\.?m?\\.?|p\\.?m?\\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt)/i,ordinalSuffix:/^\\s*(st|nd|rd|th)/i,timeContext:/^\\s*(\\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; -', -); - - public static function localizationForLanguage($language) { - if (isset(self::$localizations[$language])) { - return self::$localizations[$language]; - } - return false; - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfDeactivationOption.php b/wp/wp-content/plugins/wordfence/lib/wfDeactivationOption.php deleted file mode 100644 index 3c6f44f9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfDeactivationOption.php +++ /dev/null @@ -1,78 +0,0 @@ -key = $key; - $this->label = $label; - $this->deleteMain = $deleteMain; - $this->deleteLoginSecurity = $deleteLoginSecurity; - } - - public function getKey() { - return $this->key; - } - - public function getLabel() { - return $this->label; - } - - public function deletesMain() { - return $this->deleteMain; - } - - public function deletesLoginSecurity() { - return $this->deleteLoginSecurity; - } - - public function matchesState($deleteMain, $deleteLoginSecurity) { - return $deleteMain === $this->deleteMain && $deleteLoginSecurity === $this->deleteLoginSecurity; - } - - private static function registerOption($option) { - self::$options[$option->getKey()] = $option; - } - - private static function initializeOptions() { - if (empty(self::$options)) { - $options = array( - new self(self::RETAIN, __('Keep all Wordfence tables and data', 'wordfence'), false, false), - new self(self::DELETE_MAIN, __('Delete Wordfence tables and data, but keep Login Security tables and 2FA codes', 'wordfence'), true, false), - new self(self::DELETE_LOGIN_SECURITY, __('Delete Login Security tables and 2FA codes, but keep Wordfence tables and data', 'wordfence'), false, true), - new self(self::DELETE_ALL, __('Delete all Wordfence tables and data', 'wordfence'), true, true) - ); - foreach ($options as $option) - self::registerOption($option); - } - } - - public static function getAll() { - self::initializeOptions(); - return self::$options; - } - - public static function forKey($key) { - self::initializeOptions(); - return array_key_exists($key, self::$options) ? self::$options[$key] : null; - } - - public static function forState($deleteMain, $deleteLoginSecurity) { - foreach (self::getAll() as $option) { - if ($option->matchesState($deleteMain, $deleteLoginSecurity)) - return $option; - } - return null; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfDiagnostic.php b/wp/wp-content/plugins/wordfence/lib/wfDiagnostic.php deleted file mode 100644 index 14119e0f..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfDiagnostic.php +++ /dev/null @@ -1,1088 +0,0 @@ -get_results("SHOW GRANTS FOR current_user()", ARRAY_N); - - foreach ($rows as $row) { - preg_match("/GRANT (.+) ON (.+) TO/", $row[0], $matches); - foreach (explode(",", $matches[1]) as $permission) { - $permission = str_replace(" ", "_", trim(strtolower($permission))); - if ($permission === 'all_privileges') { - foreach ($this as $key => $value) { - $this->$key = true; - } - break 2; - } - if (property_exists($this, $permission)) - $this->$permission = true; - } - } - } -} - -class wfDiagnostic -{ - protected $minVersion = array( - 'PHP' => '5.6.20', - 'cURL' => '1.0', - ); - - protected $description = false; //Defined in the constructor to allow for localization - - protected $results = array(); - - public function __construct() - { - $this->description = array( - 'Wordfence Status' => array( - 'description' => __('General information about the Wordfence installation.', 'wordfence'), - 'tests' => array( - 'wfVersion' => __('Wordfence Version', 'wordfence'), - 'geoIPVersion' => __('GeoIP Version', 'wordfence'), - 'cronStatus' => __('Cron Status', 'wordfence'), - ), - ), - 'Filesystem' => array( - 'description' => __('Ability to read/write various files.', 'wordfence'), - 'tests' => array( - 'isPluginReadable' => __('Checking if web server can read from ~/plugins/wordfence', 'wordfence'), - 'isPluginWritable' => __('Checking if web server can write to ~/plugins/wordfence', 'wordfence'), - 'isWAFReadable' => __('Checking if web server can read from ~/wp-content/wflogs', 'wordfence'), - 'isWAFWritable' => __('Checking if web server can write to ~/wp-content/wflogs', 'wordfence'), - ), - ), - 'Wordfence Config' => array( - 'description' => __('Ability to save Wordfence settings to the database.', 'wordfence'), - 'tests' => array( - 'configWritableSet' => __('Checking basic config reading/writing', 'wordfence'), - 'configWritableSetSer' => __('Checking serialized config reading/writing', 'wordfence'), - ), - ), - 'Wordfence Firewall' => array( - 'description' => __('Current WAF configuration.', 'wordfence'), - 'tests' => array( - 'wafAutoPrepend' => __('WAF auto prepend active', 'wordfence'), - 'wafStorageEngine' => __('Configured WAF storage engine (WFWAF_STORAGE_ENGINE)', 'wordfence'), - 'wafActiveStorageEngine' => __('Active WAF storage engine', 'wordfence'), - 'wafLogPath' => __('WAF log path', 'wordfence'), - 'wafSubdirectoryInstall' => __('WAF subdirectory installation', 'wordfence'), - 'wafAutoPrependFilePath' => __('wordfence-waf.php path', 'wordfence'), - 'wafFilePermissions' => __('WAF File Permissions', 'wordfence'), - 'wafRecentlyRemoved' => __('Recently removed wflogs files', 'wordfence'), - 'wafLoaded' => __('WAF Loaded Successfully', 'wordfence'), - 'wafAutoPrependHtaccess' => __('WAF .htaccess contents', 'wordfence'), - 'wafAutoPrependUserIni' => __('WAF .user.ini contents', 'wordfence'), - 'wafAutoPrependHtaccessOther' => __('.htaccess other auto prepend', 'wordfence'), - 'wafAutoPrependUserIniOther' => __('.user.ini other auto prepend', 'wordfence'), - ), - ), - 'MySQL' => array( - 'description' => __('Database version and privileges.', 'wordfence'), - 'tests' => array( - 'databaseVersion' => __('Database Version', 'wordfence'), - 'userCanDelete' => __('Checking if MySQL user has DELETE privilege', 'wordfence'), - 'userCanInsert' => __('Checking if MySQL user has INSERT privilege', 'wordfence'), - 'userCanUpdate' => __('Checking if MySQL user has UPDATE privilege', 'wordfence'), - 'userCanSelect' => __('Checking if MySQL user has SELECT privilege', 'wordfence'), - 'userCanCreate' => __('Checking if MySQL user has CREATE TABLE privilege', 'wordfence'), - 'userCanAlter' => __('Checking if MySQL user has ALTER TABLE privilege', 'wordfence'), - 'userCanDrop' => __('Checking if MySQL user has DROP privilege', 'wordfence'), - 'userCanTruncate' => __('Checking if MySQL user has TRUNCATE privilege', 'wordfence'), - ) - ), - 'PHP Environment' => array( - 'description' => __('PHP version, important PHP extensions.', 'wordfence'), - 'tests' => array( - 'phpVersion' => array('raw' => true, 'value' => wp_kses(sprintf(/* translators: Support URL. */ __('PHP version >= PHP 5.6.20
(Minimum version required by WordPress) (opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array())))), - 'processOwner' => __('Process Owner', 'wordfence'), - 'hasOpenSSL' => __('Checking for OpenSSL support', 'wordfence'), - 'openSSLVersion' => __('Checking OpenSSL version', 'wordfence'), - 'hasCurl' => __('Checking for cURL support', 'wordfence'), - 'curlFeatures' => __('cURL Features Code', 'wordfence'), - 'curlHost' => __('cURL Host', 'wordfence'), - 'curlProtocols' => __('cURL Support Protocols', 'wordfence'), - 'curlSSLVersion' => __('cURL SSL Version', 'wordfence'), - 'curlLibZVersion' => __('cURL libz Version', 'wordfence'), - 'displayErrors' => array('raw' => true, 'value' => wp_kses(__('Checking display_errors
(Should be disabled on production servers (opens in new tab))', 'wordfence'), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('class'=>array()), 'em'=>array(), 'code'=>array(), 'br'=>array()))), - ) - ), - 'Connectivity' => array( - 'description' => __('Ability to connect to the Wordfence servers and your own site.', 'wordfence'), - 'tests' => array( - 'connectToServer2' => __('Connecting to Wordfence servers (https)', 'wordfence'), - 'connectToSelf' => __('Connecting back to this site', 'wordfence'), - 'connectToSelfIpv6' => array('raw' => true, 'value' => wp_kses(sprintf(__('Connecting back to this site via IPv6 (not required; failure to connect may not be an issue on some sites) (opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_IPV6)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array(), 'class'=>array()), 'span'=>array('class'=>array())))), - 'serverIP' => __('IP(s) used by this server', 'wordfence'), - ) - ), - 'Time' => array( - 'description' => __('Server time accuracy and applied offsets.', 'wordfence'), - 'tests' => array( - 'wfTime' => __('Wordfence Network Time', 'wordfence'), - 'serverTime' => __('Server Time', 'wordfence'), - 'wfTimeOffset' => __('Wordfence Network Time Offset', 'wordfence'), - 'ntpTimeOffset' => __('NTP Time Offset', 'wordfence'), - 'ntpStatus' => __('NTP Status', 'wordfence'), - 'timeSourceInUse' => __('TOTP Time Source', 'wordfence'), - 'wpTimeZone' => __('WordPress Time Zone', 'wordfence'), - ), - ), - ); - - foreach ($this->description as $title => $tests) { - $this->results[$title] = array( - 'description' => $tests['description'], - ); - foreach ($tests['tests'] as $name => $description) { - if (!method_exists($this, $name)) { - continue; - } - - $result = $this->$name(); - - if (is_bool($result)) { - $result = array( - 'test' => $result, - 'message' => $result ? 'OK' : 'FAIL', - ); - } - - $result['label'] = $description; - $result['name'] = $name; - - $this->results[$title]['results'][] = $result; - } - } - } - - public function getResults() - { - return $this->results; - } - - public function wfVersion() { - return array('test' => true, 'message' => WORDFENCE_VERSION . ' (' . WORDFENCE_BUILD_NUMBER . ')'); - } - - public function geoIPVersion() { - return array('test' => true, 'infoOnly' => true, 'message' => wfUtils::geoIPVersion()); - } - - public function cronStatus() { - $cron = _get_cron_array(); - $overdue = 0; - foreach ($cron as $timestamp => $values) { - if (is_array($values)) { - foreach ($values as $cron_job => $v) { - if (is_numeric($timestamp)) { - if ((time() - 1800) > $timestamp) { $overdue++; } - } - } - } - } - - return array('test' => true, 'infoOnly' => true, 'message' => $overdue ? sprintf(/* translators: Number of jobs. */ _n('%d Job Overdue', '%d Jobs Overdue', $overdue, 'wordfence'), $overdue) : __('Normal', 'wordfence')); - } - - public function geoIPError() { - $error = wfUtils::last_error('geoip'); - return array('test' => true, 'infoOnly' => true, 'message' => $error ? $error : __('None', 'wordfence')); - } - - public function isPluginReadable() { - return is_readable(WORDFENCE_PATH); - } - - public function isPluginWritable() { - return is_writable(WORDFENCE_PATH); - } - - public function isWAFReadable() { - if (!is_readable(WFWAF_LOG_PATH)) { - if (defined('WFWAF_STORAGE_ENGINE') && WFWAF_STORAGE_ENGINE == 'mysqli') { - return array('test' => false, 'infoOnly' => true, 'message' => __('No files readable', 'wordfence')); - } - - return array('test' => false, 'message' => __('No files readable', 'wordfence')); - } - - $files = array( - WFWAF_LOG_PATH . 'attack-data.php', - WFWAF_LOG_PATH . 'ips.php', - WFWAF_LOG_PATH . 'config.php', - WFWAF_LOG_PATH . 'rules.php', - ); - $unreadable = array(); - foreach ($files as $f) { - if (!file_exists($f)) { - $unreadable[] = sprintf(__('File "%s" does not exist', 'wordfence'), basename($f)); - } - else if (!is_readable($f)) { - $unreadable[] = sprintf(/* translators: File path. */ __('File "%s" is unreadable', 'wordfence'), basename($f)); - } - } - - if (count($unreadable) > 0) { - if (defined('WFWAF_STORAGE_ENGINE') && WFWAF_STORAGE_ENGINE == 'mysqli') { - return array('test' => false, 'infoOnly' => true, 'message' => implode(', ', $unreadable)); - } - - return array('test' => false, 'message' => implode(', ', $unreadable)); - } - - return true; - } - - public function isWAFWritable() { - if (!is_writable(WFWAF_LOG_PATH)) { - if (defined('WFWAF_STORAGE_ENGINE') && WFWAF_STORAGE_ENGINE == 'mysqli') { - return array('test' => false, 'infoOnly' => true, 'message' => __('No files writable', 'wordfence')); - } - - return array('test' => false, 'message' => __('No files writable', 'wordfence')); - } - - $files = array( - WFWAF_LOG_PATH . 'attack-data.php', - WFWAF_LOG_PATH . 'ips.php', - WFWAF_LOG_PATH . 'config.php', - WFWAF_LOG_PATH . 'rules.php', - ); - $unwritable = array(); - foreach ($files as $f) { - if (!file_exists($f)) { - $unwritable[] = sprintf(/* translators: File name. */__('File "%s" does not exist', 'wordfence'), basename($f)); - } - else if (!is_writable($f)) { - $unwritable[] = sprintf(/* translators: File name. */__('File "%s" is unwritable', 'wordfence'), basename($f)); - } - } - - if (count($unwritable) > 0) { - if (defined('WFWAF_STORAGE_ENGINE') && WFWAF_STORAGE_ENGINE == 'mysqli') { - return array('test' => false, 'infoOnly' => true, 'message' => implode(', ', $unwritable)); - } - - return array('test' => false, 'message' => implode(', ', $unwritable)); - } - - return true; - } - - public function databaseVersion() { - global $wpdb; - $version = $wpdb->get_var("SELECT VERSION()"); - return array('test' => true, 'message' => $version); - } - - public function userCanInsert() { - return wfGrant::get()->insert; - } - - public function userCanUpdate() { - return wfGrant::get()->update; - } - - public function userCanDelete() { - return wfGrant::get()->delete; - } - - public function userCanSelect() { - return wfGrant::get()->select; - } - - public function userCanCreate() { - return wfGrant::get()->create; - } - - public function userCanDrop() { - return wfGrant::get()->drop; - } - - public function userCanTruncate() { - return wfGrant::get()->drop && wfGrant::get()->delete; - } - - public function userCanAlter() { - return wfGrant::get()->alter; - } - - public function phpVersion() - { - return array( - 'test' => version_compare(phpversion(), $this->minVersion['PHP'], '>='), - 'message' => phpversion(), - ); - } - - public function configWritableSet() { - global $wpdb; - $show = $wpdb->hide_errors(); - $val = md5(time()); - wfConfig::set('configWritingTest', $val, wfConfig::DONT_AUTOLOAD); - $testVal = wfConfig::get('configWritingTest'); - $wpdb->show_errors($show); - return array( - 'test' => ($val === $testVal), - 'message' => __('Basic config writing', 'wordfence') - ); - } - public function configWritableSetSer() { - global $wpdb; - $show = $wpdb->hide_errors(); - $val = md5(time()); - wfConfig::set_ser('configWritingTest_ser', array($val), false, wfConfig::DONT_AUTOLOAD); - $testVal = @array_shift(wfConfig::get_ser('configWritingTest_ser', array(), false)); - $wpdb->show_errors($show); - return array( - 'test' => ($val === $testVal), - 'message' => __('Serialized config writing', 'wordfence') - ); - } - - public function wafAutoPrepend() { - return array('test' => true, 'infoOnly' => true, 'message' => (defined('WFWAF_AUTO_PREPEND') && WFWAF_AUTO_PREPEND ? __('Yes', 'wordfence') : __('No', 'wordfence'))); - } - public function wafAutoPrependHtaccess() { - $htaccessPath = wfWAFAutoPrependHelper::getHtaccessPath(); - if (!file_exists($htaccessPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.htaccess not present)', 'wordfence')); - } - else if (!is_readable($htaccessPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.htaccess not readable)', 'wordfence')); - } - - $htaccessContents = file_get_contents($htaccessPath); - $section = wfWAFAutoPrependHelper::getHtaccessSectionContent($htaccessContents); - if ($section === false) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(not set)', 'wordfence')); - } - - $snippet = wfUtils::pregExtract("/auto_prepend_file\s+['\"]?[^'\"]*['\"]?/", $section); - return array('test' => true, 'infoOnly' => true, 'message' => $snippet, 'detail' => array('escaped' => nl2br(esc_html($section)), 'textonly' => $section)); - } - public function wafAutoPrependHtaccessOther() { - $htaccessPath = wfWAFAutoPrependHelper::getHtaccessPath(); - if (!file_exists($htaccessPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.htaccess not present)', 'wordfence')); - } - else if (!is_readable($htaccessPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.htaccess not readable)', 'wordfence')); - } - - $htaccessContents = file_get_contents($htaccessPath); - $section = wfWAFAutoPrependHelper::getHtaccessSectionContent($htaccessContents); - if ($section !== false) { - $htaccessContents = str_replace($section, '', $htaccessContents); - } - - $snippet = wfUtils::pregExtract("/auto_prepend_file\s+['\"]?[^'\"]*['\"]?/", $htaccessContents, true); - return array('test' => true, 'infoOnly' => true, 'message' => ($snippet === false ? __('(not present)', 'wordfence') : trim($snippet))); - } - public function wafAutoPrependUserIni() { - $userIniPath = wfWAFAutoPrependHelper::getUserIniPath(); - if (!file_exists($userIniPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.user.ini not present)', 'wordfence')); - } - else if (!is_readable($userIniPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.user.ini not readable)', 'wordfence')); - } - - $userIniContents = file_get_contents($userIniPath); - $section = wfWAFAutoPrependHelper::getUserIniSectionContent($userIniContents); - if ($section === false) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(not set)', 'wordfence')); - } - - $snippet = wfUtils::pregExtract("/auto_prepend_file\s*=\s*['\"]?[^'\"]*['\"]?/", $section); - return array('test' => true, 'infoOnly' => true, 'message' => $snippet, 'detail' => $section); - } - public function wafAutoPrependUserIniOther() { - $userIniPath = wfWAFAutoPrependHelper::getUserIniPath(); - if (!file_exists($userIniPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.user.ini not present)', 'wordfence')); - } - else if (!is_readable($userIniPath)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('(.user.ini not readable)', 'wordfence')); - } - - $userIniContents = file_get_contents($userIniPath); - $section = wfWAFAutoPrependHelper::getUserIniSectionContent($userIniContents); - if ($section !== false) { - $userIniContents = str_replace($section, '', $userIniContents); - } - - $snippet = wfUtils::pregExtract("/auto_prepend_file\s*=\s*['\"]?[^'\"]*['\"]?/", $userIniContents, true); - return array('test' => true, 'infoOnly' => true, 'message' => ($snippet === false ? __('(not present)', 'wordfence') : trim($snippet))); - } - public function wafStorageEngine() { - return array('test' => true, 'infoOnly' => true, 'message' => (defined('WFWAF_STORAGE_ENGINE') ? WFWAF_STORAGE_ENGINE : __('(default)', 'wordfence'))); - } - private static function getStorageEngineDescription($storageEngine) { - if ($storageEngine === null) { - return __('None', 'wordfence'); - } - else if (method_exists($storageEngine, 'getDescription')) { - return $storageEngine->getDescription(); - } - else { - return __('Unknown (mixed plugin version)', 'wordfence'); - } - } - public function wafActiveStorageEngine() { - return array('test' => true, 'infoOnly' => true, 'message' => self::getStorageEngineDescription(wfWAF::getSharedStorageEngine())); - } - public function wafLogPath() { - $logPath = __('(not set)', 'wordfence'); - if (defined('WFWAF_LOG_PATH')) { - $logPath = WFWAF_LOG_PATH; - if (strpos($logPath, ABSPATH) === 0) { - $logPath = '~/' . substr($logPath, strlen(ABSPATH)); - } - } - - return array('test' => true, 'infoOnly' => true, 'message' => $logPath); - } - - public function wafSubdirectoryInstall() { - return array('test' => true, 'infoOnly' => true, 'message' => (defined('WFWAF_SUBDIRECTORY_INSTALL') && WFWAF_SUBDIRECTORY_INSTALL ? __('Yes', 'wordfence') : __('No', 'wordfence'))); - } - - public function wafAutoPrependFilePath() { - $path = wordfence::getWAFBootstrapPath(); - if (!file_exists($path)) { - $path = ''; - } - return array('test' => true, 'infoOnly' => true, 'message' => $path); - } - - public function wafFilePermissions() { - if (defined('WFWAF_LOG_FILE_MODE')) { - return array('test' => true, 'infoOnly' => true, 'message' => sprintf(/* translators: Unix file permissions in octal (example 0777). */ __('%s - using constant', 'wordfence'), str_pad(decoct(WFWAF_LOG_FILE_MODE), 4, '0', STR_PAD_LEFT))); - } - - if (defined('WFWAF_LOG_PATH')) { - $template = rtrim(WFWAF_LOG_PATH, '/') . '/template.php'; - if (file_exists($template)) { - $stat = @stat($template); - if ($stat !== false) { - $mode = $stat[2]; - $updatedMode = 0600; - if (($mode & 0020) == 0020) { - $updatedMode = $updatedMode | 0060; - } - return array('test' => true, 'infoOnly' => true, 'message' => sprintf(/* translators: Unix file permissions in octal (example 0777). */ __('%s - using template', 'wordfence'), str_pad(decoct($updatedMode), 4, '0', STR_PAD_LEFT))); - } - } - } - return array('test' => true, 'infoOnly' => true, 'message' => __('0660 - using default', 'wordfence')); - } - - public function wafRecentlyRemoved() { - $removalHistory = wfConfig::getJSON('diagnosticsWflogsRemovalHistory', array()); - if (empty($removalHistory)) { - return array('test' => true, 'infoOnly' => true, 'message' => __('None', 'wordfence')); - } - - $message = array(); - foreach ($removalHistory as $r) { - $m = wfUtils::formatLocalTime('M j, Y', $r[0]) . ': (' . count($r[1]) . ')'; - $r[1] = array_filter($r[1], array($this, '_filterOutNestedEntries')); - $m .= ' ' . implode(', ', array_slice($r[1], 0, 5)); - if (count($r[1]) > 5) { - $m .= ', ...'; - } - $message[] = $m; - } - - return array('test' => true, 'infoOnly' => true, 'message' => implode("\n", $message)); - } - - public function wafLoaded() { - $waf = wfWAF::getInstance(); - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => $waf !== null && ($waf instanceof wfWAFWordPress) ? __('Yes', 'wordfence') : __('No', 'wordfence') - ); - } - - private function _filterOutNestedEntries($a) { - return !is_array($a); - } - - public function processOwner() { - $disabledFunctions = explode(',', ini_get('disable_functions')); - - if (is_callable('posix_geteuid')) { - if (!is_callable('posix_getpwuid') || in_array('posix_getpwuid', $disabledFunctions)) { - return array( - 'test' => false, - 'message' => __('Unavailable', 'wordfence'), - ); - } - - $processOwner = posix_getpwuid(posix_geteuid()); - if ($processOwner !== false) - { - return array( - 'test' => true, - 'message' => $processOwner['name'], - ); - } - } - - $usernameOrUserEnv = getenv('USERNAME') ? getenv('USERNAME') : getenv('USER'); - if (!empty($usernameOrUserEnv)) { //Check some environmental variable possibilities - return array( - 'test' => true, - 'message' => $usernameOrUserEnv, - ); - } - - $currentUser = get_current_user(); - if (!empty($currentUser)) { //php.net comments indicate on Windows this returns the process owner rather than the file owner - return array( - 'test' => true, - 'message' => $currentUser, - ); - } - - if (!empty($_SERVER['LOGON_USER'])) { //Last resort for IIS since POSIX functions are unavailable, Source: https://msdn.microsoft.com/en-us/library/ms524602(v=vs.90).aspx - return array( - 'test' => true, - 'message' => $_SERVER['LOGON_USER'], - ); - } - - return array( - 'test' => false, - 'message' => __('Unknown', 'wordfence'), - ); - } - - public function hasOpenSSL() { - return is_callable('openssl_open'); - } - - public function openSSLVersion() { - if (!function_exists('openssl_verify') || !defined('OPENSSL_VERSION_NUMBER') || !defined('OPENSSL_VERSION_TEXT')) { - return false; - } - $compare = wfVersionCheckController::shared()->checkOpenSSLVersion(); - return array( - 'test' => $compare == wfVersionCheckController::VERSION_COMPATIBLE, - 'message' => OPENSSL_VERSION_TEXT . ' (0x' . dechex(OPENSSL_VERSION_NUMBER) . ')', - ); - } - - public function hasCurl() { - if (!is_callable('curl_version')) { - return false; - } - $version = curl_version(); - return array( - 'test' => version_compare($version['version'], $this->minVersion['cURL'], '>='), - 'message' => $version['version'] . ' (0x' . dechex($version['version_number']) . ')', - ); - } - - public function curlFeatures() { - if (!is_callable('curl_version')) { - return false; - } - $version = curl_version(); - return array( - 'test' => true, - 'message' => '0x' . dechex($version['features']), - 'infoOnly' => true, - ); - } - - public function curlHost() { - if (!is_callable('curl_version')) { - return false; - } - $version = curl_version(); - return array( - 'test' => true, - 'message' => $version['host'], - 'infoOnly' => true, - ); - } - - public function curlProtocols() { - if (!is_callable('curl_version')) { - return false; - } - $version = curl_version(); - return array( - 'test' => true, - 'message' => implode(', ', $version['protocols']), - 'infoOnly' => true, - ); - } - - public function curlSSLVersion() { - if (!is_callable('curl_version')) { - return false; - } - $version = curl_version(); - return array( - 'test' => true, - 'message' => $version['ssl_version'], - 'infoOnly' => true, - ); - } - - public function curlLibZVersion() { - if (!is_callable('curl_version')) { - return false; - } - $version = curl_version(); - return array( - 'test' => true, - 'message' => $version['libz_version'], - 'infoOnly' => true, - ); - } - - public function displayErrors() { - if (!is_callable('ini_get')) { - return false; - } - $value = ini_get('display_errors'); - $isOn = strtolower($value) == 'on' || $value == 1; - return array( - 'test' => !$isOn, - 'message' => $isOn ? __('On', 'wordfence') : __('Off', 'wordfence'), - 'infoOnly' => true, - ); - } - - public function connectToServer2() { - return $this->_connectToServer('https'); - } - - public function _connectToServer($protocol) { - $cronURL = admin_url('admin-ajax.php'); - $cronURL = preg_replace('/^(https?:\/\/)/i', '://noc1.wordfence.com/scanptest/', $cronURL); - $cronURL .= '?action=wordfence_doScan&isFork=0&cronKey=47e9d1fa6a675b5999999333'; - $cronURL = $protocol . $cronURL; - $result = wp_remote_post($cronURL, array( - 'timeout' => 10, //Must be less than max execution time or more than 2 HTTP children will be occupied by scan - 'blocking' => true, //Non-blocking seems to block anyway, so we use blocking - // This causes cURL to throw errors in some versions since WordPress uses its own certificate bundle ('CA certificate set, but certificate verification is disabled') - // 'sslverify' => false, - 'headers' => array() - )); - if( (! is_wp_error($result)) && $result['response']['code'] == 200 && strpos($result['body'], "scanptestok") !== false){ - return true; - } - - $detail = ''; - if (is_wp_error($result)) { - $message = __('wp_remote_post() test to noc1.wordfence.com failed! Response was: ', 'wordfence') . $result->get_error_message(); - } - else { - $message = __('wp_remote_post() test to noc1.wordfence.com failed! Response was: ', 'wordfence') . $result['response']['code'] . " " . $result['response']['message'] . "\n"; - $message .= __('This likely means that your hosting provider is blocking requests to noc1.wordfence.com or has set up a proxy that is not behaving itself.', 'wordfence') . "\n"; - if (isset($result['http_response']) && is_object($result['http_response']) && method_exists($result['http_response'], 'get_response_object') && is_object($result['http_response']->get_response_object()) && property_exists($result['http_response']->get_response_object(), 'raw')) { - $detail = str_replace("\r\n", "\n", $result['http_response']->get_response_object()->raw); - } - } - - return array( - 'test' => false, - 'message' => $message, - 'detail' => $detail, - ); - } - - public function connectToSelf($ipVersion = null) { - $adminAJAX = admin_url('admin-ajax.php?action=wordfence_testAjax'); - $result = wp_remote_post($adminAJAX, array( - 'timeout' => 10, //Must be less than max execution time or more than 2 HTTP children will be occupied by scan - 'blocking' => true, //Non-blocking seems to block anyway, so we use blocking - 'headers' => array() - )); - - if ((!is_wp_error($result)) && $result['response']['code'] == 200 && strpos($result['body'], "WFSCANTESTOK") !== false) { - $host = parse_url($adminAJAX, PHP_URL_HOST); - if ($host !== null) { - $ips = wfUtils::resolveDomainName($host, $ipVersion); - if (!empty($ips)) { - $ips = implode(', ', $ips); - return array('test' => true, 'message' => sprintf('OK - %s', $ips)); - } - } - return true; - } - - $detail = ''; - if (is_wp_error($result)) { - $message = __('wp_remote_post() test back to this server failed! Response was: ', 'wordfence') . $result->get_error_message(); - $messageTextOnly = __('wp_remote_post() test back to this server failed! Response was: ', 'wordfence') . $result->get_error_message(); - } - else { - $message = __('wp_remote_post() test back to this server failed! Response was: ', 'wordfence') . '
' . $result['response']['code'] . ' ' . $result['response']['message'] . '

'; - $messageTextOnly = __('wp_remote_post() test back to this server failed! Response was: ', 'wordfence') . "\n" . $result['response']['code'] . ' ' . $result['response']['message'] . "\n\n"; - if ($this->_detectBlockedByCloudflare($result)) { - $message .= __('Cloudflare appears to be blocking your site from connecting to itself.', 'wordfence') . '
' . sprintf(' ', wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_CLOUDFLARE_BLOCK)) . __('Get help with Cloudflare compatibility', 'wordfence') . '

'; - $messageTextOnly .= __('Cloudflare appears to be blocking your site from connecting to itself.', 'wordfence') . "\n" . __('Get help with Cloudflare compatibility', 'wordfence') . ': ' . wfSupportController::esc_supportURL(wfSupportController::ITEM_DIAGNOSTICS_CLOUDFLARE_BLOCK) . "\n\n"; - } - $message .= __('This additional info may help you diagnose the issue. The response headers we received were:', 'wordfence') . '

'; - $messageTextOnly .= __('This additional info may help you diagnose the issue. The response headers we received were:', 'wordfence') . "\n\n"; - if (isset($result['http_response']) && is_object($result['http_response']) && method_exists($result['http_response'], 'get_response_object') && is_object($result['http_response']->get_response_object()) && property_exists($result['http_response']->get_response_object(), 'raw')) { - $detail = str_replace("\r\n", "\n", $result['http_response']->get_response_object()->raw); - } - } - - $message = wp_kses($message, array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()), 'em' => array(), 'code' => array(), 'br' => array())); - - return array( - 'test' => false, - 'message' => array('escaped' => $message, 'textonly' => $messageTextOnly), - 'detail' => $detail, - ); - } - - public function connectToSelfIpv6() { - if (wfUtils::isCurlSupported()) { - $interceptor = new wfCurlInterceptor(); - $interceptor->setOption(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); - try { - $instance = $this; - $result = $interceptor->intercept(function() use ($instance) { - return $instance->connectToSelf(6); - }); - if ($result !== true && !$result['test']) { - $handle = $interceptor->getHandle(); - $errorNumber = curl_errno($handle); - if ($errorNumber === 6 /* COULDNT_RESOLVE_HOST */) { - $detail = sprintf(/* translators: error message from failed request */ __('This likely indicates that the server either does not support IPv6 or does not have an IPv6 address assigned or associated with the domain. Original error message: %s', 'wordfence'), is_array($result['message']) ? $result['message']['escaped'] : $result['message']); - $detail = wp_kses($detail, array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()), 'em' => array(), 'code' => array(), 'br' => array())); - $detailTextOnly = sprintf(/* translators: error message from failed request */ __('This likely indicates that the server either does not support IPv6 or does not have an IPv6 address assigned or associated with the domain. Original error message: %s', 'wordfence'), is_array($result['message']) ? $result['message']['textonly'] : strip_tags($result['message'])); - - return array( - 'test' => false, - 'infoOnly' => true, - 'message' => __('IPv6 DNS resolution failed', 'wordfence'), - 'detail' => array('escaped' => $detail, 'textonly' => $detailTextOnly), - ); - } - } - return $result; - } - catch (wfCurlInterceptionFailedException $e) { - return array( - 'test' => false, - 'message' => __('This diagnostic is unavailable as cURL appears to be supported, but was not used by WordPress for this request', 'wordfence') - ); - } - } - return array( - 'test' => false, - 'message' => __('This diagnostic requires cURL', 'wordfence') - ); - } - - /** - * Looks for markers in $result that indicate it was challenged/blocked by Cloudflare. - * - * @param $result - * @return bool - */ - private function _detectBlockedByCloudflare($result) { - $headers = $result['headers']; - if (isset($headers['cf-mitigated']) && strtolower($headers['cf-mitigated']) == 'challenge' /* managed challenge */) { //$headers is an instance of Requests_Utility_CaseInsensitiveDictionary - return true; - } - - $body = $result['body']; - $search = array( - '/cdn-cgi/styles/challenges.css', //managed challenge - '/cdn-cgi/challenge-platform', //managed challenge - '/cdn-cgi/styles/cf.errors.css', //block - 'cf-error-details', //block - 'Cloudflare Ray ID', //block - ); - foreach ($search as $s) { - if (stripos($body, $s) !== false) { - return true; - } - } - return false; - } - - public function serverIP() { - $serverIPs = wfUtils::serverIPs(); - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => implode(',', $serverIPs), - ); - } - - public function howGetIPs() - { - $howGet = wfConfig::get('howGetIPs', false); - if ($howGet) { - if (empty($_SERVER[$howGet])) { - return array( - 'test' => false, - 'message' => sprintf(/* translators: PHP super global key. */ __('We cannot read $_SERVER[%s]', 'wordfence'), $howGet), - ); - } - return array( - 'test' => true, - 'message' => $howGet, - ); - } - foreach (array('HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR') as $test) { - if (!empty($_SERVER[$test])) { - return array( - 'test' => false, - 'message' => __('Should be: ', 'wordfence') . $test - ); - } - } - return array( - 'test' => true, - 'message' => 'REMOTE_ADDR', - ); - } - - public function serverTime() { - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => date('Y-m-d H:i:s', time()) . ' UTC', - ); - } - - public function wfTime() { - try { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $response = $api->call('timestamp'); - if (!is_array($response) || !isset($response['timestamp'])) { - throw new Exception('Unexpected payload returned'); - } - } - catch (Exception $e) { - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => '-', - ); - } - - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => date('Y-m-d H:i:s', $response['timestamp']) . ' UTC', - ); - } - - public function wfTimeOffset() { - $delta = wfUtils::normalizedTime() - time(); - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => ($delta < 0 ? '-' : '+') . ' ' . wfUtils::makeDuration(abs($delta), true), - ); - } - - public function ntpTimeOffset() { - if (class_exists('WFLSPHP52Compatability')) { - $time = WFLSPHP52Compatability::ntp_time(); - if ($time === false) { - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => __('Blocked', 'wordfence'), - ); - } - - $delta = $time - time(); - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => ($delta < 0 ? '-' : '+') . ' ' . wfUtils::makeDuration(abs($delta), true), - ); - } - - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => '-', - ); - } - - public function ntpStatus() { - $maxFailures = \WordfenceLS\Controller_Time::FAILURE_LIMIT; - $cronDisabled = \WordfenceLS\Controller_Settings::shared()->is_ntp_cron_disabled($failureCount); - if ($cronDisabled) { - $constant = \WordfenceLS\Controller_Settings::shared()->is_ntp_disabled_via_constant(); - $status = __('Disabled ', 'wordfence'); - if ($constant) { - $status .= __('(WORDFENCE_LS_DISABLE_NTP)', 'wordfence'); - } - else if ($failureCount > 0) { - $status .= __('(failures exceeded limit)', 'wordfence'); - } - else { - $status .= __('(settings)', 'wordfence'); - } - } - else { - $status = __('Enabled', 'wordfence'); - if ($failureCount > 0) { - $remainingAttempts = $maxFailures - $failureCount; - $status .= sprintf(__(' (%d of %d attempts remaining)', 'wordfence'), $remainingAttempts, $maxFailures); - } - } - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => $status - ); - } - - public function timeSourceInUse() { - if (class_exists('WFLSPHP52Compatability')) { - $time = WFLSPHP52Compatability::ntp_time(); - if (WFLSPHP52Compatability::using_ntp_time()) { - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => __('NTP', 'wordfence'), - ); - } - else if (WFLSPHP52Compatability::using_wf_time()) { - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => __('Wordfence Network', 'wordfence'), - ); - } - - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => __('Server Time', 'wordfence'), - ); - } - - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => '-', - ); - } - - public function wpTimeZone() { - $tz = get_option('timezone_string'); - if (empty($tz)) { - $offset = get_option('gmt_offset'); - $tz = 'UTC' . ($offset >= 0 ? '+' . $offset : $offset); - } - - return array( - 'test' => true, - 'infoOnly' => true, - 'message' => $tz, - ); - } - - public static function getWordpressValues() { - require(ABSPATH . 'wp-includes/version.php'); - $postRevisions = (defined('WP_POST_REVISIONS') ? WP_POST_REVISIONS : true); - return array( - 'WordPress Version' => array('description' => '', 'value' => $wp_version), - 'Multisite' => array('description' => __('Return value of is_multisite()', 'wordfence'), 'value' => is_multisite() ? __('Yes', 'wordfence') : __('No', 'wordfence')), - 'ABSPATH' => __('WordPress base path', 'wordfence'), - 'WP_DEBUG' => array('description' => __('WordPress debug mode', 'wordfence'), 'value' => (defined('WP_DEBUG') && WP_DEBUG ? __('On', 'wordfence') : __('Off', 'wordfence'))), - 'WP_DEBUG_LOG' => array('description' => __('WordPress error logging override', 'wordfence'), 'value' => defined('WP_DEBUG_LOG') ? (WP_DEBUG_LOG ? 'Enabled' : 'Disabled') : __('(not set)', 'wordfence')), - 'WP_DEBUG_DISPLAY' => array('description' => __('WordPress error display override', 'wordfence'), 'value' => defined('WP_DEBUG_DISPLAY') ? (WP_DEBUG_DISPLAY ? 'Enabled' : 'Disabled') : __('(not set)', 'wordfence')), - 'SCRIPT_DEBUG' => array('description' => __('WordPress script debug mode', 'wordfence'), 'value' => (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? __('On', 'wordfence') : __('Off', 'wordfence'))), - 'SAVEQUERIES' => array('description' => __('WordPress query debug mode', 'wordfence'), 'value' => (defined('SAVEQUERIES') && SAVEQUERIES ? __('On', 'wordfence') : __('Off', 'wordfence'))), - 'DB_CHARSET' => __('Database character set', 'wordfence'), - 'DB_COLLATE' => __('Database collation', 'wordfence'), - 'WP_SITEURL' => __('Explicitly set site URL', 'wordfence'), - 'WP_HOME' => __('Explicitly set blog URL', 'wordfence'), - 'WP_CONTENT_DIR' => array('description' => __('"wp-content" folder is in default location', 'wordfence'), 'value' => (realpath(WP_CONTENT_DIR) === realpath(ABSPATH . 'wp-content') ? __('Yes', 'wordfence') : sprintf(/* translators: WordPress content directory. */ __('No: %s', 'wordfence'), WP_CONTENT_DIR))), - 'WP_CONTENT_URL' => __('URL to the "wp-content" folder', 'wordfence'), - 'WP_PLUGIN_DIR' => array('description' => __('"plugins" folder is in default location', 'wordfence'), 'value' => (realpath(WP_PLUGIN_DIR) === realpath(ABSPATH . 'wp-content/plugins') ? __('Yes', 'wordfence') : sprintf(/* translators: WordPress plugins directory. */ __('No: %s', 'wordfence'), WP_PLUGIN_DIR))), - 'WP_LANG_DIR' => array('description' => __('"languages" folder is in default location', 'wordfence'), 'value' => (realpath(WP_LANG_DIR) === realpath(ABSPATH . 'wp-content/languages') ? __('Yes', 'wordfence') : sprintf(/* translators: WordPress languages directory. */ __('No: %s', 'wordfence'), WP_LANG_DIR))), - 'WPLANG' => __('Language choice', 'wordfence'), - 'UPLOADS' => __('Custom upload folder location', 'wordfence'), - 'TEMPLATEPATH' => array('description' => __('Theme template folder override', 'wordfence'), 'value' => (defined('TEMPLATEPATH') && realpath(get_template_directory()) !== realpath(TEMPLATEPATH) ? sprintf(/* translators: WordPress theme template directory. */ __('Overridden: %s', 'wordfence'), TEMPLATEPATH) : __('(not set)', 'wordfence'))), - 'STYLESHEETPATH' => array('description' => __('Theme stylesheet folder override', 'wordfence'), 'value' => (defined('STYLESHEETPATH') && realpath(get_stylesheet_directory()) !== realpath(STYLESHEETPATH) ? sprintf(/* translators: WordPress theme stylesheet directory. */ __('Overridden: %s', 'wordfence'), STYLESHEETPATH) : __('(not set)', 'wordfence'))), - 'AUTOSAVE_INTERVAL' => __('Post editing automatic saving interval', 'wordfence'), - 'WP_POST_REVISIONS' => array('description' => __('Post revisions saved by WordPress', 'wordfence'), 'value' => is_numeric($postRevisions) ? $postRevisions : ($postRevisions ? __('Unlimited', 'wordfence') : __('None', 'wordfence'))), - 'COOKIE_DOMAIN' => __('WordPress cookie domain', 'wordfence'), - 'COOKIEPATH' => __('WordPress cookie path', 'wordfence'), - 'SITECOOKIEPATH' => __('WordPress site cookie path', 'wordfence'), - 'ADMIN_COOKIE_PATH' => __('WordPress admin cookie path', 'wordfence'), - 'PLUGINS_COOKIE_PATH' => __('WordPress plugins cookie path', 'wordfence'), - 'NOBLOGREDIRECT' => __('URL redirected to if the visitor tries to access a nonexistent blog', 'wordfence'), - 'CONCATENATE_SCRIPTS' => array('description' => __('Concatenate JavaScript files', 'wordfence'), 'value' => (defined('CONCATENATE_SCRIPTS') && CONCATENATE_SCRIPTS ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'WP_MEMORY_LIMIT' => __('WordPress memory limit', 'wordfence'), - 'WP_MAX_MEMORY_LIMIT' => __('Administrative memory limit', 'wordfence'), - 'WP_CACHE' => array('description' => __('Built-in caching', 'wordfence'), 'value' => (defined('WP_CACHE') && WP_CACHE ? __('Enabled', 'wordfence') : __('Disabled', 'wordfence'))), - 'CUSTOM_USER_TABLE' => array('description' => __('Custom "users" table', 'wordfence'), 'value' => (defined('CUSTOM_USER_TABLE') ? sprintf(/* translators: WordPress custom user table. */ __('Set: %s', 'wordfence'), CUSTOM_USER_TABLE) : __('(not set)', 'wordfence'))), - 'CUSTOM_USER_META_TABLE' => array('description' => __('Custom "usermeta" table', 'wordfence'), 'value' => (defined('CUSTOM_USER_META_TABLE') ? sprintf(/* translators: WordPress custom user meta table. */ __('Set: %s', 'wordfence'), CUSTOM_USER_META_TABLE) : __('(not set)', 'wordfence'))), - 'FS_CHMOD_DIR' => array('description' => __('Overridden permissions for a new folder', 'wordfence'), 'value' => defined('FS_CHMOD_DIR') ? decoct(FS_CHMOD_DIR) : __('(not set)', 'wordfence')), - 'FS_CHMOD_FILE' => array('description' => __('Overridden permissions for a new file', 'wordfence'), 'value' => defined('FS_CHMOD_FILE') ? decoct(FS_CHMOD_FILE) : __('(not set)', 'wordfence')), - 'ALTERNATE_WP_CRON' => array('description' => __('Alternate WP cron', 'wordfence'), 'value' => (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON ? __('Enabled', 'wordfence') : __('Disabled', 'wordfence'))), - 'DISABLE_WP_CRON' => array('description' => __('WP cron status', 'wordfence'), 'value' => (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ? __('Cron is disabled', 'wordfence') : __('Cron is enabled', 'wordfence'))), - 'WP_CRON_LOCK_TIMEOUT' => __('Cron running frequency lock', 'wordfence'), - 'EMPTY_TRASH_DAYS' => array('description' => __('Interval the trash is automatically emptied at in days', 'wordfence'), 'value' => (EMPTY_TRASH_DAYS > 0 ? EMPTY_TRASH_DAYS : __('Never', 'wordfence'))), - 'WP_ALLOW_REPAIR' => array('description' => __('Automatic database repair', 'wordfence'), 'value' => (defined('WP_ALLOW_REPAIR') && WP_ALLOW_REPAIR ? __('Enabled', 'wordfence') : __('Disabled', 'wordfence'))), - 'DO_NOT_UPGRADE_GLOBAL_TABLES' => array('description' => __('Do not upgrade global tables', 'wordfence'), 'value' => (defined('DO_NOT_UPGRADE_GLOBAL_TABLES') && DO_NOT_UPGRADE_GLOBAL_TABLES ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'DISALLOW_FILE_EDIT' => array('description' => __('Disallow plugin/theme editing', 'wordfence'), 'value' => (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'DISALLOW_FILE_MODS' => array('description' => __('Disallow plugin/theme update and installation', 'wordfence'), 'value' => (defined('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'IMAGE_EDIT_OVERWRITE' => array('description' => __('Overwrite image edits when restoring the original', 'wordfence'), 'value' => (defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'FORCE_SSL_ADMIN' => array('description' => __('Force SSL for administrative logins', 'wordfence'), 'value' => (defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'WP_HTTP_BLOCK_EXTERNAL' => array('description' => __('Block external URL requests', 'wordfence'), 'value' => (defined('WP_HTTP_BLOCK_EXTERNAL') && WP_HTTP_BLOCK_EXTERNAL ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'WP_ACCESSIBLE_HOSTS' => __('Allowlisted hosts', 'wordfence'), - 'WP_AUTO_UPDATE_CORE' => array('description' => __('Automatic WP Core updates', 'wordfence'), 'value' => defined('WP_AUTO_UPDATE_CORE') ? (is_bool(WP_AUTO_UPDATE_CORE) ? (WP_AUTO_UPDATE_CORE ? __('Everything', 'wordfence') : __('None', 'wordfence')) : WP_AUTO_UPDATE_CORE) : __('Default', 'wordfence')), - 'WP_PROXY_HOST' => array('description' => __('Hostname for a proxy server', 'wordfence'), 'value' => defined('WP_PROXY_HOST') ? WP_PROXY_HOST : __('(not set)', 'wordfence')), - 'WP_PROXY_PORT' => array('description' => __('Port for a proxy server', 'wordfence'), 'value' => defined('WP_PROXY_PORT') ? WP_PROXY_PORT : __('(not set)', 'wordfence')), - 'MULTISITE' => array('description' => __('Multisite enabled', 'wordfence'), 'value' => defined('MULTISITE') ? (MULTISITE ? __('Yes', 'wordfence') : __('No', 'wordfence')) : __('(not set)', 'wordfence')), - 'WP_ALLOW_MULTISITE' => array('description' => __('Multisite/network ability enabled', 'wordfence'), 'value' => (defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'SUNRISE' => array('description' => __('Multisite enabled, WordPress will load the /wp-content/sunrise.php file', 'wordfence'), 'value' => defined('SUNRISE') ? __('Yes', 'wordfence') : __('(not set)', 'wordfence')), - 'SUBDOMAIN_INSTALL' => array('description' => __('Multisite enabled, subdomain installation constant', 'wordfence'), 'value' => defined('SUBDOMAIN_INSTALL') ? (SUBDOMAIN_INSTALL ? __('Yes', 'wordfence') : __('No', 'wordfence')) : __('(not set)', 'wordfence')), - 'VHOST' => array('description' => __('Multisite enabled, Older subdomain installation constant', 'wordfence'), 'value' => defined('VHOST') ? (VHOST == 'yes' ? __('Yes', 'wordfence') : __('No', 'wordfence')) : __('(not set)', 'wordfence')), - 'DOMAIN_CURRENT_SITE' => __('Defines the multisite domain for the current site', 'wordfence'), - 'PATH_CURRENT_SITE' => __('Defines the multisite path for the current site', 'wordfence'), - 'BLOG_ID_CURRENT_SITE' => __('Defines the multisite database ID for the current site', 'wordfence'), - 'WP_DISABLE_FATAL_ERROR_HANDLER' => array('description' => __('Disable the fatal error handler', 'wordfence'), 'value' => (defined('WP_DISABLE_FATAL_ERROR_HANDLER') && WP_DISABLE_FATAL_ERROR_HANDLER ? __('Yes', 'wordfence') : __('No', 'wordfence'))), - 'AUTOMATIC_UPDATER_DISABLED' => array('description' => __('Disables automatic updates', 'wordfence'), 'value' => (defined('AUTOMATIC_UPDATER_DISABLED') ? (AUTOMATIC_UPDATER_DISABLED ? __('Automatic updates disabled', 'wordfence') : __('Automatic updates enabled', 'wordfence')) : __('(not set)', 'wordfence'))) - ); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfDict.php b/wp/wp-content/plugins/wordfence/lib/wfDict.php deleted file mode 100644 index 554ab93d..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfDict.php +++ /dev/null @@ -1,89 +0,0 @@ -directory = $directory; - $this->directory_limit = $max_files_per_directory; - $this->max_iterations = $max_iterations; - } - - public function run() { - $this->iterations = 0; - $this->scan($this->directory); - } - - protected function scan($dir) { - $dir = rtrim($dir, DIRECTORY_SEPARATOR); - $handle = opendir($dir); - $file_count = 0; - while ($file = readdir($handle)) { - if ($file == '.' || $file == '..') { - continue; - } - $file_path = $dir . '/' . $file; - $real_path = realpath($file_path); - if (isset($this->directories_processed[$real_path]) || isset($this->directories_entered[$real_path])) { //Already processed or being processed, possibly a recursive symlink - continue; - } - - else if (is_dir($file_path)) { - $this->directories_entered[$real_path] = 1; - if ($this->scan($file_path) === false) { - closedir($handle); - return false; - } - $this->directories_processed[$real_path] = 1; - unset($this->directories_entered[$real_path]); - } - else { - if ($this->file($file_path) === false) { - closedir($handle); - return false; - } - } - if (++$file_count >= $this->directory_limit) { - break; - } - if (++$this->iterations >= $this->max_iterations) { - closedir($handle); - return false; - } - } - closedir($handle); - return true; - } -} - diff --git a/wp/wp-content/plugins/wordfence/lib/wfFileUtils.php b/wp/wp-content/plugins/wordfence/lib/wfFileUtils.php deleted file mode 100644 index eb032d68..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfFileUtils.php +++ /dev/null @@ -1,91 +0,0 @@ - 0) { - $carries = 0; - } - if ($val >= 0x100000000) { - $val -= 0x100000000; - $carries++; - } - $return[] = $val; - } - if ($carries) { - $return[] += $carries; - } - $return = array_reverse($return); - array_unshift($return, 'N*'); - $return = call_user_func_array('pack', $return); - $return = ltrim($return, "\x00"); - return strlen($return) == 0 ? "\x00" : $return; - } - - /** - * Convert binary string to the 10101's representation. - * - * @param string $string - * @return string - */ - public static function bin2str($string) { - $return = ''; - for ($i = 0; $i < strlen($string); $i++) { - $return .= str_pad(decbin(ord($string[$i])), 8, '0', STR_PAD_LEFT); - } - $return = ltrim($return, '0'); - return strlen($return) == 0 ? '0' : $return; - } - - /** - * Convert 10101's representation back to the binary data. - * - * @param string $string - * @return string - */ - public static function str2bin($string) { - if (strlen($string) % 32 > 0) { - $string = str_repeat('0', 32 - (strlen($string) % 32)) . $string; - } - $ints = str_split($string, 32); - $return = ''; - foreach ($ints as $int) { - $return .= pack('N', bindec($int)); - } - $return = ltrim($return, "\0"); - return strlen($return) == 0 ? "\0" : $return; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfHelperString.php b/wp/wp-content/plugins/wordfence/lib/wfHelperString.php deleted file mode 100644 index 4616f15b..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfHelperString.php +++ /dev/null @@ -1,65 +0,0 @@ - $colLengths[$col]) { - $colLengths[$col] = $len; - } - } - } - } - $hr = str_repeat('-', array_sum($colLengths) + (count($colLengths) * 3) + 1); - $output = $hr . "\n"; - for ($row = 0; $row < count($table); $row++) { - $colHeight = 0; - for ($col = 0; $col < count($table[$row]); $col++) { - $height = substr_count($table[$row][$col], "\n"); - if ($height > $colHeight) { - $colHeight = $height; - } - } - for ($colRow = 0; $colRow <= $colHeight; $colRow++) { - for ($col = 0; $col < count($table[$row]); $col++) { - $colRows = explode("\n", $table[$row][$col]); - $output .= '| ' . str_pad(isset($colRows[$colRow]) ? $colRows[$colRow] : '', $colLengths[$col], ' ', STR_PAD_RIGHT) . ' '; - } - $output .= "|\n"; - } - if ($row === 0) { - $output .= $hr . "\n"; - } - } - return trim($output . (count($table) > 1 ? $hr : '')); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfIPWhitelist.php b/wp/wp-content/plugins/wordfence/lib/wfIPWhitelist.php deleted file mode 100644 index 3eb07654..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfIPWhitelist.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - //We've modified this and removed some addresses which may be routable on the Net and cause auto-whitelisting. - //'0.0.0.0/8', #Broadcast addr - '10.0.0.0/8', #Private addrs - //'100.64.0.0/10', #carrier-grade-nat for comms between ISP and subscribers - '127.0.0.0/8', #loopback - //'169.254.0.0/16', #link-local when DHCP fails e.g. os x - '172.16.0.0/12', #private addrs - '192.0.0.0/29', #used for NAT with IPv6, so basically a private addr - //'192.0.2.0/24', #Only for use in docs and examples, not for public use - //'192.88.99.0/24', #Used by 6to4 anycast relays - '192.168.0.0/16', #Used for local communications within a private network - //'198.18.0.0/15', #Used for testing of inter-network communications between two separate subnets - //'198.51.100.0/24', #Assigned as "TEST-NET-2" in RFC 5737 for use solely in documentation and example source code and should not be used publicly. - //'203.0.113.0/24', #Assigned as "TEST-NET-3" in RFC 5737 for use solely in documentation and example source code and should not be used publicly. - //'224.0.0.0/4', #Reserved for multicast assignments as specified in RFC 5771 - //'240.0.0.0/4', #Reserved for future use, as specified by RFC 6890 - //'255.255.255.255/32', #Reserved for the "limited broadcast" destination address, as specified by RFC 6890 - ), - 'wordfence' => array( - '54.68.32.247', // Central @ AWS - '44.235.211.232', - '54.71.203.174' - ), -); diff --git a/wp/wp-content/plugins/wordfence/lib/wfImportExportController.php b/wp/wp-content/plugins/wordfence/lib/wfImportExportController.php deleted file mode 100644 index bbed73c2..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfImportExportController.php +++ /dev/null @@ -1,117 +0,0 @@ -call('export_options', array(), array('export' => json_encode($export))); - if ($res['ok'] && $res['token']) { - return array( - 'ok' => 1, - 'token' => $res['token'], - ); - } - else if ($res['err']) { - return array('err' => __("An error occurred: ", 'wordfence') . $res['err']); - } - else { - throw new Exception(__("Invalid response: ", 'wordfence') . var_export($res, true)); - } - } - catch (Exception $e) { - return array('err' => __("An error occurred: ", 'wordfence') . $e->getMessage()); - } - } - - public function import($token) { - try { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $res = $api->call('import_options', array(), array('token' => $token)); - if ($res['ok'] && $res['export']) { - $totalSet = 0; - $import = @json_decode($res['export'], true); - if (!is_array($import)) { - return array('err' => __("An error occurred: Invalid options format received.", 'wordfence')); - } - - //Basic Options - $keys = wfConfig::getExportableOptionsKeys(); - $toSet = array(); - foreach ($keys as $key) { - if (isset($import[$key])) { - $toSet[$key] = $import[$key]; - } - } - - if (count($toSet)) { - $validation = wfConfig::validate($toSet); - $skipped = array(); - if ($validation !== true) { - foreach ($validation as $error) { - $skipped[$error['option']] = $error['error']; - unset($toSet[$error['option']]); - } - } - - $totalSet += count($toSet); - wfConfig::save(wfConfig::clean($toSet)); - } - - //Serialized Options - if (isset($import['scanSched']) && is_array($import['scanSched'])) { - wfConfig::set_ser('scanSched', $import['scanSched']); - wfScanner::shared()->scheduleScans(); - $totalSet++; - } - - //Table-based Options - if (isset($import['blocks']) && is_array($import['blocks'])) { - wfBlock::importBlocks($import['blocks']); - $totalSet += count($import['blocks']); - } - - return array( - 'ok' => 1, - 'totalSet' => $totalSet, - ); - } - else if ($res['err']) { - return array('err' => sprintf(/* translators: Error message. */ __("An error occurred: %s", 'wordfence'), $res['err'])); - } - else { - throw new Exception(sprintf(/* translators: Error message. */ __("Invalid response: %s", 'wordfence'), var_export($res, true))); - } - } - catch (Exception $e) { - return array('err' => sprintf(/* translators: Error message. */ __("An error occurred: %s", 'wordfence'), $e->getMessage())); - } - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfInaccessibleDirectoryException.php b/wp/wp-content/plugins/wordfence/lib/wfInaccessibleDirectoryException.php deleted file mode 100644 index 2e8a5272..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfInaccessibleDirectoryException.php +++ /dev/null @@ -1,16 +0,0 @@ -directory = $directory; - } - - public function getDirectory() { - return $this->directory; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfInvalidPathException.php b/wp/wp-content/plugins/wordfence/lib/wfInvalidPathException.php deleted file mode 100644 index e244ab14..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfInvalidPathException.php +++ /dev/null @@ -1,16 +0,0 @@ -path = $path; - } - - public function getPath() { - return $this->path; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfIpLocation.php b/wp/wp-content/plugins/wordfence/lib/wfIpLocation.php deleted file mode 100644 index 70b75402..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfIpLocation.php +++ /dev/null @@ -1,65 +0,0 @@ -record = is_array($record) ? $record : array(); - } - - public function getCountryRecord() { - if (array_key_exists('country', $this->record)) { - $country = $this->record['country']; - if (is_array($country)) - return $country; - } - return array(); - } - - public function getCountryField($field) { - $country = $this->getCountryRecord(); - if (array_key_exists($field, $country)) - return $country[$field]; - return null; - } - - public function getCountryCode() { - $isoCode = $this->getCountryField('iso_code'); - if (is_string($isoCode) && strlen($isoCode) === 2) - return $isoCode; - return null; - } - - private function findBestLanguageMatch($options, $preferredLanguage = self::LANGUAGE_DEFAULT) { - $languages = array(); - if (is_string($preferredLanguage)) - $languages[] = $preferredLanguage; - if (strpos($preferredLanguage, self::LANGUAGE_SEPARATOR) !== false) { - $components = explode(self::LANGUAGE_SEPARATOR, $preferredLanguage); - $baseLanguage = $components[0]; - if ($baseLanguage !== self::LANGUAGE_DEFAULT) - $languages[] = $baseLanguage; - } - if ($preferredLanguage !== self::LANGUAGE_DEFAULT) - $languages[] = self::LANGUAGE_DEFAULT; - foreach ($languages as $language) { - if (array_key_exists($language, $options)) - return $options[$language]; - } - if (!empty($options)) - return reset($options); - return null; - } - - public function getCountryName($preferredLanguage = self::LANGUAGE_DEFAULT) { - $names = $this->getCountryField('names'); - if (is_array($names) && !empty($names)) - return $this->findBestLanguageMatch($names, $preferredLanguage); - return null; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfIpLocator.php b/wp/wp-content/plugins/wordfence/lib/wfIpLocator.php deleted file mode 100644 index 58bc48da..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfIpLocator.php +++ /dev/null @@ -1,110 +0,0 @@ -database = $database; - $this->preferred = $preferred; - } - - public function isPreferred() { - return $this->preferred; - } - - private static function logError($message) { - if (class_exists('wfUtils')) - wfUtils::check_and_log_last_error('ip_locator', 'IP Location Error:', $message, 0); - } - - public function locate($ip) { - if ($this->database !== null) { - try { - $record = $this->database->search($ip); - if ($record !== null) - return new wfIpLocation($record); - } - catch (MmdbThrowable $t) { - self::logError('Failed to locate IP address: ' . $t->getMessage()); - } - } - return null; - } - - public function getCountryCode($ip, $default = '') { - $record = $this->locate($ip); - if ($record !== null) - return $record->getCountryCode(); - return $default; - } - - public function getDatabaseVersion() { - if ($this->database !== null) { - try { - return $this->database->getMetadata()->getBuildEpoch(); - } - catch (MmdbThrowable $t) { - self::logError('Failed to retrieve database version: ' . $t->getMessage()); - } - } - return null; - } - - private static function getDatabaseDirectory($source) { - switch ($source) { - case self::SOURCE_BUNDLED: - return WFWAF_LOG_PATH; - case self::SOURCE_BUNDLED: - default: - return __DIR__; - } - } - - private static function initializeDatabase($preferredSource, &$isPreferred) { - $sources = array(); - if ($preferredSource !== self::SOURCE_BUNDLED) - $sources[] = $preferredSource; - $sources[] = self::SOURCE_BUNDLED; - $isPreferred = true; - foreach ($sources as $source) { - $directory = self::getDatabaseDirectory($source); - try { - $path = $directory . '/' . self::DATABASE_FILE_NAME; - if (file_exists($path)) //Preemptive check to prevent warnings - return Database::open($path); - } - catch (MmdbThrowable $t) { - self::logError('Failed to initialize IP location database: ' . $t->getMessage()); - } - $preferred = false; - } - return null; - } - - public static function getInstance($preferredSource = null) { - if ($preferredSource === null) - $preferredSource = self::SOURCE_WFLOGS; - if (!array_key_exists($preferredSource, self::$instances)) { - $database = self::initializeDatabase($preferredSource, $isPreferred); - self::$instances[$preferredSource] = new wfIpLocator($database, $isPreferred); - } - return self::$instances[$preferredSource]; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfIssues.php b/wp/wp-content/plugins/wordfence/lib/wfIssues.php deleted file mode 100644 index 52225b8d..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfIssues.php +++ /dev/null @@ -1,771 +0,0 @@ - wfIssues::SEVERITY_CRITICAL, - 'checkSpamIP' => wfIssues::SEVERITY_HIGH, - 'spamvertizeCheck' => wfIssues::SEVERITY_CRITICAL, - 'commentBadURL' => wfIssues::SEVERITY_LOW, - 'postBadTitle' => wfIssues::SEVERITY_HIGH, - 'postBadURL' => wfIssues::SEVERITY_HIGH, - 'file' => wfIssues::SEVERITY_CRITICAL, - 'timelimit' => wfIssues::SEVERITY_HIGH, - 'checkHowGetIPs' => wfIssues::SEVERITY_HIGH, - 'diskSpace' => wfIssues::SEVERITY_HIGH, - 'wafStatus' => wfIssues::SEVERITY_CRITICAL, - 'configReadable' => wfIssues::SEVERITY_CRITICAL, - 'wfPluginVulnerable' => wfIssues::SEVERITY_HIGH, - 'coreUnknown' => wfIssues::SEVERITY_HIGH, - 'easyPasswordWeak' => wfIssues::SEVERITY_HIGH, - 'knownfile' => wfIssues::SEVERITY_HIGH, - 'optionBadURL' => wfIssues::SEVERITY_HIGH, - 'publiclyAccessible' => wfIssues::SEVERITY_HIGH, - 'suspiciousAdminUsers' => wfIssues::SEVERITY_HIGH, - 'wfPluginAbandoned' => wfIssues::SEVERITY_MEDIUM, - 'wfPluginRemoved' => wfIssues::SEVERITY_CRITICAL, - 'wfPluginUpgrade' => wfIssues::SEVERITY_MEDIUM, - 'wfThemeUpgrade' => wfIssues::SEVERITY_MEDIUM, - 'wfUpgradeError' => wfIssues::SEVERITY_MEDIUM, - 'wfUpgrade' => wfIssues::SEVERITY_HIGH, - 'wpscan_directoryList' => wfIssues::SEVERITY_HIGH, - 'wpscan_fullPathDiscl' => wfIssues::SEVERITY_HIGH, - ); - - public static function validIssueTypes() { - return array('checkHowGetIPs', 'checkSpamIP', 'commentBadURL', 'configReadable', 'coreUnknown', 'database', 'diskSpace', 'wafStatus', 'easyPassword', 'file', 'geoipSupport', 'knownfile', 'optionBadURL', 'postBadTitle', 'postBadURL', 'publiclyAccessible', 'spamvertizeCheck', 'suspiciousAdminUsers', 'timelimit', 'wfPluginAbandoned', 'wfPluginRemoved', 'wfPluginUpgrade', 'wfPluginVulnerable', 'wfThemeUpgrade', 'wfUpgradeError', 'wfUpgrade', 'wpscan_directoryList', 'wpscan_fullPathDiscl', 'skippedPaths'); - } - - public static function statusPrep(){ - wfConfig::set_ser('wfStatusStartMsgs', array()); - wordfence::status(10, 'info', "SUM_PREP:Preparing a new scan."); - wfIssues::updateScanStillRunning(); - } - - public static function statusStart($message) { - $statusStartMsgs = wfConfig::get_ser('wfStatusStartMsgs', array()); - $statusStartMsgs[] = $message; - wfConfig::set_ser('wfStatusStartMsgs', $statusStartMsgs); - wordfence::status(10, 'info', 'SUM_START:' . $message); - wfIssues::updateScanStillRunning(); - return count($statusStartMsgs) - 1; - } - - public static function statusEnd($index, $state) { - $statusStartMsgs = wfConfig::get_ser('wfStatusStartMsgs', array()); - if ($state == self::STATUS_SKIPPED) { - wordfence::status(10, 'info', 'SUM_ENDSKIPPED:' . $statusStartMsgs[$index]); - } - else if ($state == self::STATUS_IGNORED) { - wordfence::status(10, 'info', 'SUM_ENDIGNORED:' . $statusStartMsgs[$index]); - } - else if ($state == self::STATUS_PROBLEM) { - wordfence::status(10, 'info', 'SUM_ENDBAD:' . $statusStartMsgs[$index]); - } - else if ($state == self::STATUS_SECURE) { - wordfence::status(10, 'info', 'SUM_ENDOK:' . $statusStartMsgs[$index]); - } - else if ($state == self::STATUS_FAILED) { - wordfence::status(10, 'info', 'SUM_ENDFAILED:' . $statusStartMsgs[$index]); - } - else if ($state == self::STATUS_SUCCESS) { - wordfence::status(10, 'info', 'SUM_ENDSUCCESS:' . $statusStartMsgs[$index]); - } - wfIssues::updateScanStillRunning(); - $statusStartMsgs[$index] = ''; - wfConfig::set_ser('wfStatusStartMsgs', $statusStartMsgs); - } - - public static function statusEndErr() { - $statusStartMsgs = wfConfig::get_ser('wfStatusStartMsgs', array()); - for ($i = 0; $i < count($statusStartMsgs); $i++) { - if (empty($statusStartMsgs[$i]) === false) { - wordfence::status(10, 'info', 'SUM_ENDERR:' . $statusStartMsgs[$i]); - $statusStartMsgs[$i] = ''; - } - } - wfIssues::updateScanStillRunning(); - } - - public static function statusPaidOnly($message) { - wordfence::status(10, 'info', "SUM_PAIDONLY:" . $message); - wfIssues::updateScanStillRunning(); - } - - public static function statusDisabled($message) { - wordfence::status(10, 'info', "SUM_DISABLED:" . $message); - wfIssues::updateScanStillRunning(); - } - - public static function updateScanStillRunning($running = true) { - $timestamp = time(); - if (!$running) { - $timestamp = 0; - } - wfConfig::set('wf_scanLastStatusTime', $timestamp); - } - - /** - * Returns false if the scan has not been detected as failed. If it has, returns a constant corresponding to the reason. - * - * @return bool|string - */ - public static function hasScanFailed() { - $lastStatusUpdate = self::lastScanStatusUpdate(); - if ($lastStatusUpdate !== false && wfScanner::shared()->isRunning()) { - $threshold = WORDFENCE_SCAN_FAILURE_THRESHOLD; - if (time() - $lastStatusUpdate > $threshold) { - return self::SCAN_FAILED_TIMEOUT; - } - } - - $scanStartAttempt = wfConfig::get('scanStartAttempt', 0); - if ($scanStartAttempt && time() - $scanStartAttempt > WORDFENCE_SCAN_START_FAILURE_THRESHOLD) { - return self::SCAN_FAILED_START_TIMEOUT; - } - - $recordedFailure = wfConfig::get('lastScanFailureType'); - switch ($recordedFailure) { - case self::SCAN_FAILED_GENERAL: - case self::SCAN_FAILED_DURATION_REACHED: - case self::SCAN_FAILED_VERSION_CHANGE: - case self::SCAN_FAILED_FORK_FAILED: - case self::SCAN_FAILED_CALLBACK_TEST_FAILED: - case self::SCAN_FAILED_API_SSL_UNAVAILABLE: - case self::SCAN_FAILED_API_CALL_FAILED: - case self::SCAN_FAILED_API_INVALID_RESPONSE: - case self::SCAN_FAILED_API_ERROR_RESPONSE: - return $recordedFailure; - } - - return false; - } - - /** - * Returns false if the scan has not been detected as timed out. If it has, it returns the timestamp of the last status update. - * - * @return bool|int - */ - public static function lastScanStatusUpdate() { - if (wfConfig::get('wf_scanLastStatusTime', 0) === 0) { - return false; - } - - $threshold = WORDFENCE_SCAN_FAILURE_THRESHOLD; - return (time() > wfConfig::get('wf_scanLastStatusTime', 0) + $threshold) ? wfConfig::get('wf_scanLastStatusTime', 0) : false; - } - - /** - * Returns the singleton wfIssues. - * - * @return wfIssues - */ - public static function shared() { - static $_issues = null; - if ($_issues === null) { - $_issues = new wfIssues(); - } - return $_issues; - } - - public function __sleep(){ //Same order here as vars above - return array('updateCalled', 'issuesTable', 'pendingIssuesTable', 'maxIssues', 'newIssues', 'totalIssues', 'totalIgnoredIssues', 'totalIssuesBySeverity'); - } - public function __construct(){ - $this->issuesTable = wfDB::networkTable('wfIssues'); - $this->pendingIssuesTable = wfDB::networkTable('wfPendingIssues'); - $this->maxIssues = wfConfig::get('scan_maxIssues', 0); - } - public function __wakeup(){ - $this->db = new wfDB(); - } - - public function addIssue($type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData, $alreadyHashed = false) { - return $this->_addIssue('issue', $type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData, $alreadyHashed); - } - public function addPendingIssue($type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData) { - return $this->_addIssue('pending', $type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData); - } - - /** - * Create a new issue - * - * @param string $group The issue type (e.g., issue or pending - * @param string $type - * @param int $severity - * @param string $ignoreP string to compare against for permanent ignores - * @param string $ignoreC string to compare against for ignoring until something changes - * @param string $shortMsg - * @param string $longMsg - * @param array $templateData - * @param bool $alreadyHashed If true, don't re-hash $ignoreP and $ignoreC - * @return string One of the ISSUE_ constants - */ - private function _addIssue($group, $type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData, $alreadyHashed = false) { - if ($group == 'pending') { - $table = $this->pendingIssuesTable; - } - else { - $table = $this->issuesTable; - } - - if (!$alreadyHashed) { - $ignoreP = md5($ignoreP); - $ignoreC = md5($ignoreC); - } - - $results = $this->getDB()->querySelect("SELECT id, status, ignoreP, ignoreC FROM {$table} WHERE (ignoreP = '%s' OR ignoreC = '%s')", $ignoreP, $ignoreC); - foreach ($results as $row) { - if ($row['status'] == 'new' && ($row['ignoreC'] == $ignoreC || $row['ignoreP'] == $ignoreP)) { - if ($type != 'file' && $type != 'database') { //Filter out duplicate new issues except for infected files because we want to see all infections even if file contents are identical - return self::ISSUE_DUPLICATE; - } - } - - if ($row['status'] == 'ignoreP' && $row['ignoreP'] == $ignoreP) { $this->totalIgnoredIssues++; return self::ISSUE_IGNOREP; } //Always ignore - else if ($row['status'] == 'ignoreC' && $row['ignoreC'] == $ignoreC) { $this->totalIgnoredIssues++; return self::ISSUE_IGNOREC; } //Unchanged, ignore - else if ($row['status'] == 'ignoreC') { - $updateID = $row['id']; //Re-use the existing issue row - break; - } - } - - if ($group != 'pending') { - if (!array_key_exists($severity, $this->totalIssuesBySeverity)) { - $this->totalIssuesBySeverity[$severity] = 0; - } - $this->totalIssuesBySeverity[$severity]++; - $this->totalIssues++; - if (empty($this->maxIssues) || $this->totalIssues <= $this->maxIssues) - { - $this->newIssues[] = array( - 'type' => $type, - 'severity' => $severity, - 'ignoreP' => $ignoreP, - 'ignoreC' => $ignoreC, - 'shortMsg' => $shortMsg, - 'longMsg' => $longMsg, - 'tmplData' => $templateData - ); - } - } - - if (isset($updateID)) { - if ($group !== 'pending' && wfCentral::isConnected()) { - wfCentral::sendIssue(array( - 'id' => $updateID, - 'lastUpdated' => time(), - 'type' => $type, - 'severity' => $severity, - 'ignoreP' => $ignoreP, - 'ignoreC' => $ignoreC, - 'shortMsg' => $shortMsg, - 'longMsg' => $longMsg, - 'data' => $templateData, - )); - } - - $this->getDB()->queryWrite( - "UPDATE {$table} SET lastUpdated = UNIX_TIMESTAMP(), status = '%s', type = '%s', severity = %d, ignoreP = '%s', ignoreC = '%s', shortMsg = '%s', longMsg = '%s', data = '%s' WHERE id = %d", - 'new', - $type, - $severity, - $ignoreP, - $ignoreC, - $shortMsg, - $longMsg, - serialize($templateData), - $updateID); - - - return self::ISSUE_UPDATED; - } - - $this->getDB()->queryWrite("INSERT INTO {$table} (time, lastUpdated, status, type, severity, ignoreP, ignoreC, shortMsg, longMsg, data) VALUES (UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s')", - 'new', - $type, - $severity, - $ignoreP, - $ignoreC, - $shortMsg, - $longMsg, - serialize($templateData)); - - if ($group !== 'pending' && wfCentral::isConnected()) { - global $wpdb; - wfCentral::sendIssue(array( - 'id' => $wpdb->insert_id, - 'status' => 'new', - 'time' => time(), - 'lastUpdated' => time(), - 'type' => $type, - 'severity' => $severity, - 'ignoreP' => $ignoreP, - 'ignoreC' => $ignoreC, - 'shortMsg' => $shortMsg, - 'longMsg' => $longMsg, - 'data' => $templateData, - )); - } - - return self::ISSUE_ADDED; - } - public function deleteIgnored(){ - if (wfCentral::isConnected()) { - $result = $this->getDB()->querySelect("SELECT id from " . $this->issuesTable . " where status='ignoreP' or status='ignoreC'"); - $issues = array(); - foreach ($result as $row) { - $issues[] = $row['id']; - } - wfCentral::deleteIssues($issues); - } - - $this->getDB()->queryWrite("delete from " . $this->issuesTable . " where status='ignoreP' or status='ignoreC'"); - } - public function deleteNew($types = null) { - if (!is_array($types)) { - if (wfCentral::isConnected()) { - wfCentral::deleteNewIssues(); - } - - $this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new'"); - } - else { - if (wfCentral::isConnected()) { - wfCentral::deleteIssueTypes($types, 'new'); - } - - $query = "DELETE FROM {$this->issuesTable} WHERE status = 'new' AND type IN (" . implode(',', array_fill(0, count($types), "'%s'")) . ")"; - array_unshift($types, $query); - call_user_func_array(array($this->getDB(), 'queryWrite'), $types); - } - } - public function ignoreAllNew(){ - if (wfCentral::isConnected()) { - $issues = $this->getDB()->querySelect('SELECT * FROM ' . $this->issuesTable . ' WHERE status=\'new\''); - if ($issues) { - wfCentral::sendIssues($issues); - } - } - - $this->getDB()->queryWrite("update " . $this->issuesTable . " set status='ignoreC' where status='new'"); - } - public function emailNewIssues($timeLimitReached = false, $scanController = false){ - $level = wfConfig::getAlertLevel(); - $emails = wfConfig::getAlertEmails(); - if (!count($emails)) { - return; - } - - $shortSiteURL = preg_replace('/^https?:\/\//i', '', site_url()); - $subject = "[Wordfence Alert] Problems found on $shortSiteURL"; - - if(sizeof($emails) < 1){ return; } - if($level < 1){ return; } - $needsToAlert = false; - foreach ($this->totalIssuesBySeverity as $issueSeverity => $totalIssuesBySeverity) { - if ($issueSeverity >= $level && $totalIssuesBySeverity > 0) { - $needsToAlert = true; - break; - } - } - if (!$needsToAlert) { - return; - } - $emailedIssues = wfConfig::get_ser('emailedIssuesList', array()); - if(! is_array($emailedIssues)){ - $emailedIssues = array(); - } - $overflowCount = $this->totalIssues - count($this->newIssues); - $finalIssues = array(); - $previousIssues = array(); - foreach($this->newIssues as $newIssue){ - $alreadyEmailed = false; - foreach($emailedIssues as $emailedIssue){ - if($newIssue['ignoreP'] == $emailedIssue['ignoreP'] || $newIssue['ignoreC'] == $emailedIssue['ignoreC']){ - $alreadyEmailed = true; - $previousIssues[] = $newIssue; - break; - } - } - if(! $alreadyEmailed){ - $finalIssues[] = $newIssue; - } - else { - $overflowCount--; - } - } - if(sizeof($finalIssues) < 1){ return; } - - $this->newIssues = array(); - $this->totalIssues = 0; - - $totals = array(); - foreach($finalIssues as $i){ - $emailedIssues[] = array( 'ignoreC' => $i['ignoreC'], 'ignoreP' => $i['ignoreP'] ); - if (!array_key_exists($i['severity'], $totals)) { - $totals[$i['severity']] = 0; - } - $totals[$i['severity']]++; - } - wfConfig::set_ser('emailedIssuesList', $emailedIssues); - $needsToAlert = false; - foreach ($totals as $issueSeverity => $totalIssuesBySeverity) { - if ($issueSeverity >= $level && $totalIssuesBySeverity > 0) { - $needsToAlert = true; - break; - } - } - if (!$needsToAlert) { - return; - } - - $content = wfUtils::tmpl('email_newIssues.php', array( - 'isPaid' => wfConfig::get('isPaid'), - 'issues' => $finalIssues, - 'previousIssues' => $previousIssues, - 'totals' => $totals, - 'level' => $level, - 'issuesNotShown' => $overflowCount, - 'adminURL' => get_admin_url(), - 'timeLimitReached' => $timeLimitReached, - 'scanController' => ($scanController ? $scanController : wfScanner::shared()), - )); - - foreach ($emails as $email) { - $uniqueContent = str_replace('', wp_kses(sprintf(__('No longer an administrator for this site? Click here to stop receiving security alerts.', 'wordfence'), wfUtils::getSiteBaseURL() . '?_wfsf=removeAlertEmail&jwt=' . wfUtils::generateJWT(array('email' => $email))), array('a'=>array('href'=>array(), 'target'=>array()))), $content); - wp_mail($email, $subject, $uniqueContent, 'Content-type: text/html'); - } - } - public function clearEmailedStatus($issues) { - if (empty($issues)) { return; } - - $emailed_issues = wfConfig::get_ser('emailedIssuesList', array()); - if (!is_array($emailed_issues)) { return; } - - $updated = array(); - foreach ($emailed_issues as $ei) { - $cleared = false; - foreach ($issues as $issue) { - if ($issue['ignoreP'] == $ei['ignoreP'] || $issue['ignoreC'] == $ei['ignoreC']) { - //Discard this one - $cleared = true; - } - } - if (!$cleared) { - $updated[] = $ei; - } - } - - wfConfig::set_ser('emailedIssuesList', $updated); - } - public function deleteIssue($id){ - $this->clearEmailedStatus(array($this->getIssueByID($id))); - $this->getDB()->queryWrite("delete from " . $this->issuesTable . " where id=%d", $id); - if (wfCentral::isConnected()) { - wfCentral::deleteIssue($id); - } - } - - public function deleteUpdateIssues($type) { - $issues = $this->getDB()->querySelect("SELECT id, status, ignoreP, ignoreC FROM {$this->issuesTable} WHERE status = 'new' AND type = '%s'", $type); - $this->clearEmailedStatus($issues); - - $this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new' AND type = '%s'", $type); - - if (wfCentral::isConnected()) { - wfCentral::deleteIssueTypes(array($type)); - } - } - - public function deleteAllUpdateIssues() { - $issues = $this->getDB()->querySelect("SELECT id, status, ignoreP, ignoreC FROM {$this->issuesTable} WHERE status = 'new' AND (type = 'wfUpgrade' OR type = 'wfUpgradeError' OR type = 'wfPluginUpgrade' OR type = 'wfThemeUpgrade')"); - $this->clearEmailedStatus($issues); - - $this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new' AND (type = 'wfUpgrade' OR type = 'wfUpgradeError' OR type = 'wfPluginUpgrade' OR type = 'wfThemeUpgrade')"); - - if (wfCentral::isConnected()) { - wfCentral::deleteIssueTypes(array('wfUpgrade', 'wfUpgradeError', 'wfPluginUpgrade', 'wfThemeUpgrade')); - } - } - - public function updateIssue($id, $status){ //ignoreC, ignoreP, delete or new - if($status == 'delete'){ - if (wfCentral::isConnected()) { - wfCentral::deleteIssue($id); - } - $this->clearEmailedStatus(array($this->getIssueByID($id))); - $this->getDB()->queryWrite("delete from " . $this->issuesTable . " where id=%d", $id); - } else if($status == 'ignoreC' || $status == 'ignoreP' || $status == 'new'){ - $this->getDB()->queryWrite("update " . $this->issuesTable . " set status='%s' where id=%d", $status, $id); - - if (wfCentral::isConnected()) { - $issue = $this->getDB()->querySelect('SELECT * FROM ' . $this->issuesTable . ' where id=%d', $id); - if ($issue) { - wfCentral::sendIssues($issue); - } - } - } - } - public function getIssueByID($id) { - $rec = $this->getDB()->querySingleRec("select * from " . $this->issuesTable . " where id=%d", $id); - $rec['data'] = unserialize($rec['data']); - return $rec; - } - public function getIssueCounts() { - global $wpdb; - $counts = $wpdb->get_results('SELECT COUNT(*) AS c, status FROM ' . $this->issuesTable . ' WHERE status = "new" OR status = "ignoreP" OR status = "ignoreC" GROUP BY status', ARRAY_A); - $result = array(); - foreach ($counts as $row) { - $result[$row['status']] = $row['c']; - } - return $result; - } - public function getIssues($offset = 0, $limit = 100, $ignoredOffset = 0, $ignoredLimit = 100) { - /** @var wpdb $wpdb */ - global $wpdb; - - $siteCleaningTypes = array('file', 'checkGSB', 'checkSpamIP', 'commentBadURL', 'knownfile', 'optionBadURL', 'postBadTitle', 'postBadURL', 'spamvertizeCheck', 'suspiciousAdminUsers'); - $sortTagging = 'CASE'; - foreach ($siteCleaningTypes as $index => $t) { - $sortTagging .= ' WHEN type = \'' . esc_sql($t) . '\' THEN ' . ((int) $index); - } - $sortTagging .= ' ELSE 999 END'; - - $ret = array( - 'new' => array(), - 'ignored' => array() - ); - $userIni = ini_get('user_ini.filename'); - $q1 = $this->getDB()->querySelect("SELECT *, {$sortTagging} AS sortTag FROM " . $this->issuesTable . " WHERE status = 'new' ORDER BY severity DESC, sortTag ASC, type ASC, time DESC LIMIT %d,%d", $offset, $limit); - $q2 = $this->getDB()->querySelect("SELECT *, {$sortTagging} AS sortTag FROM " . $this->issuesTable . " WHERE status = 'ignoreP' OR status = 'ignoreC' ORDER BY severity DESC, sortTag ASC, type ASC, time DESC LIMIT %d,%d", $ignoredOffset, $ignoredLimit); - $q = array_merge($q1, $q2); - foreach($q as $i){ - $i['data'] = unserialize($i['data']); - $i['timeAgo'] = wfUtils::makeTimeAgo(time() - $i['time']); - $i['displayTime'] = wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), $i['time']); - $i['longMsg'] = wp_kses($i['longMsg'], 'post'); - if($i['status'] == 'new'){ - $ret['new'][] = $i; - } else if($i['status'] == 'ignoreP' || $i['status'] == 'ignoreC'){ - $ret['ignored'][] = $i; - } else { - error_log("Issue has bad status: " . $i['status']); - continue; - } - } - foreach($ret as $status => &$issueList){ - for($i = 0; $i < sizeof($issueList); $i++){ - if ($issueList[$i]['type'] == 'file' || $issueList[$i]['type'] == 'knownfile') { - if (array_key_exists('realFile', $issueList[$i]['data'])) { - $localFile = $issueList[$i]['data']['realFile']; - $issueList[$i]['data']['realFileToken'] = self::generateRealFileToken($localFile); - } - else { - $localFile = $issueList[$i]['data']['file']; - if ($localFile != '.htaccess' && $localFile != $userIni) { - $localFile = ABSPATH . '/' . preg_replace('/^[\.\/]+/', '', $localFile); - } - else { - $localFile = ABSPATH . '/' . $localFile; - } - } - - if(file_exists($localFile)){ - $issueList[$i]['data']['fileExists'] = true; - } else { - $issueList[$i]['data']['fileExists'] = ''; - } - } - if ($issueList[$i]['type'] == 'database') { - $issueList[$i]['data']['optionExists'] = false; - if (!empty($issueList[$i]['data']['site_id'])) { - $table_options = wfDB::blogTable('options', $issueList[$i]['data']['site_id']); - $issueList[$i]['data']['optionExists'] = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM {$table_options} WHERE option_name = %s", $issueList[$i]['data']['option_name'])) > 0; - } - } - $issueList[$i]['issueIDX'] = $i; - if (isset($issueList[$i]['data']['cType'])) { - $issueList[$i]['data']['ucType'] = ucwords($issueList[$i]['data']['cType']); - } - } - } - return $ret; //array of lists of issues by status - } - public function getPendingIssues($offset = 0, $limit = 100){ - /** @var wpdb $wpdb */ - global $wpdb; - $issues = $this->getDB()->querySelect("SELECT * FROM {$this->pendingIssuesTable} ORDER BY id ASC LIMIT %d,%d", $offset, $limit); - foreach($issues as &$i){ - $i['data'] = unserialize($i['data']); - } - return $issues; - } - public function getFixableIssueCount() { - global $wpdb; - $issues = $this->getDB()->querySelect("SELECT * FROM {$this->issuesTable} WHERE data LIKE '%s:6:\"canFix\";b:1;%'"); - $count = 0; - foreach ($issues as $i) { - $i['data'] = unserialize($i['data']); - if (isset($i['data']['canFix']) && $i['data']['canFix']) { - $count++; - } - } - return $count; - } - public function getDeleteableIssueCount() { - global $wpdb; - $issues = $this->getDB()->querySelect("SELECT * FROM {$this->issuesTable} WHERE data LIKE '%s:9:\"canDelete\";b:1;%'"); - $count = 0; - foreach ($issues as $i) { - $i['data'] = unserialize($i['data']); - if (isset($i['data']['canDelete']) && $i['data']['canDelete']) { - $count++; - } - } - return $count; - } - public function getIssueCount() { - return (int) $this->getDB()->querySingle("select COUNT(*) from " . $this->issuesTable . " WHERE status = 'new'"); - } - public function getPendingIssueCount() { - return (int) $this->getDB()->querySingle("select COUNT(*) from " . $this->pendingIssuesTable . " WHERE status = 'new'"); - } - public function getLastIssueUpdateTimestamp() { - return (int) $this->getDB()->querySingle("select MAX(lastUpdated) from " . $this->issuesTable); - } - public function reconcileUpgradeIssues($report = null, $useCachedValued = false) { - if ($report === null) { - $report = new wfActivityReport(); - } - - $updatesNeeded = $report->getUpdatesNeeded($useCachedValued); - if ($updatesNeeded) { - if (!$updatesNeeded['core']) { - $this->deleteUpdateIssues('wfUpgrade'); - } - - if ($updatesNeeded['plugins']) { - $upgradeNames = array(); - foreach ($updatesNeeded['plugins'] as $p) { - $name = $p['Name']; - $upgradeNames[$name] = 1; - } - $upgradeIssues = $this->getDB()->querySelect("SELECT * FROM {$this->issuesTable} WHERE status = 'new' AND type = 'wfPluginUpgrade'"); - foreach ($upgradeIssues as $issue) { - $data = unserialize($issue['data']); - $name = $data['Name']; - if (!isset($upgradeNames[$name])) { //Some plugins don't have a slug associated with them, so we anchor on the name - $this->deleteIssue($issue['id']); - } - } - } - else { - $this->deleteUpdateIssues('wfPluginUpgrade'); - } - - if ($updatesNeeded['themes']) { - $upgradeNames = array(); - foreach ($updatesNeeded['themes'] as $t) { - $name = $t['Name']; - $upgradeNames[$name] = 1; - } - $upgradeIssues = $this->getDB()->querySelect("SELECT * FROM {$this->issuesTable} WHERE status = 'new' AND type = 'wfThemeUpgrade'"); - foreach ($upgradeIssues as $issue) { - $data = unserialize($issue['data']); - $name = $data['Name']; - if (!isset($upgradeNames[$name])) { //Some themes don't have a slug associated with them, so we anchor on the name - $this->deleteIssue($issue['id']); - } - } - } - else { - $this->deleteUpdateIssues('wfThemeUpgrade'); - } - } - else { - $this->deleteAllUpdateIssues(); - } - - wfScanEngine::refreshScanNotification($this); - } - private function getDB(){ - if(! $this->db){ - $this->db = new wfDB(); - } - return $this->db; - } - - /** - * @return string - */ - public function getIssuesTable() { - return $this->issuesTable; - } - - private static function getRealFileTokenKey($realFile) { - return 'wf-real-file-' . base64_encode($realFile); - } - - private static function generateRealFileToken($realFile) { - $key = self::getRealFileTokenKey($realFile); - return wp_create_nonce($key); - } - - public static function verifyRealFileToken($token, $realFile) { - $key = self::getRealFileTokenKey($realFile); - return wp_verify_nonce($token, $key); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfJWT.php b/wp/wp-content/plugins/wordfence/lib/wfJWT.php deleted file mode 100644 index 0fffc6eb..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfJWT.php +++ /dev/null @@ -1,237 +0,0 @@ - $header, - 'body' => $body, - 'signature' => $signature, - ); - - } - - /** - * @param mixed $subject - */ - public function __construct($subject = null) { - $this->claims = $this->getClaimDefaults(); - $this->claims['sub'] = $subject; - } - - /** - * @return string - */ - public function encode() { - $header = $this->encodeString($this->buildHeader()); - $body = $this->encodeString($this->buildBody()); - return sprintf('%s.%s.%s', $header, $body, - $this->encodeString($this->sign(sprintf('%s.%s', $header, $body)))); - } - - /** - * @param string $token - * @return array - * @throws wfJWTException|InvalidArgumentException - */ - public function decode($token) { - if (!is_string($token)) { - throw new InvalidArgumentException('Token is not a string. ' . gettype($token) . ' given.'); - } - - // Verify the token matches the JWT format. - if (!preg_match('/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?$/', $token)) { - throw new wfJWTException('Invalid token format.'); - } - list($header, $body, $signature) = explode('.', $token); - - // Verify signature matches the supplied payload. - if (!$this->verifySignature($this->decodeString($signature), sprintf('%s.%s', $header, $body))) { - throw new wfJWTException('Invalid signature.'); - } - - // Test that the token is valid and not expired. - $decodedHeader = base64_decode($header); - - if (!(is_string($decodedHeader) && $decodedHeader)) { - throw new wfJWTException('Token header is invalid.'); - } - - $header = json_decode($decodedHeader, true); - if (!( - is_array($header) && - array_key_exists('alg', $header) && - $header['alg'] === 'HS256' && - $header['typ'] === 'JWT' - )) { - throw new wfJWTException('Token header is invalid.'); - } - - $decodedBody = base64_decode($body); - - if (!(is_string($decodedBody) && $decodedBody)) { - throw new wfJWTException('Token body is invalid.'); - } - - $body = json_decode($decodedBody, true); - if (!( - is_array($body) && - - // Check the token not before now timestamp. - array_key_exists('nbf', $body) && - is_numeric($body['nbf']) && - $body['nbf'] <= time() && - - // Check the token is not expired. - array_key_exists('exp', $body) && - is_numeric($body['exp']) && - $body['exp'] >= time() && - - // Check the issuer and audience is ours. - $body['iss'] === 'Wordfence ' . WORDFENCE_VERSION && - $body['aud'] === 'Wordfence Central' - )) { - throw new wfJWTException('Token is invalid or expired.'); - } - - return array( - 'header' => $header, - 'body' => $body, - ); - } - - /** - * @param string $string - * @return string - */ - public function sign($string) { - $salt = wp_salt('auth'); - - return hash_hmac('sha256', $string, $salt, true); - } - - /** - * @param string $signature - * @param string $message - * @return bool - */ - public function verifySignature($signature, $message) { - return hash_equals($this->sign($message), $signature); - } - - /** - * @return string - */ - public function __toString() { - return $this->encode(); - } - - /** - * @param string $data - * @return string - */ - public function encodeString($data) { - return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); - } - - /** - * @param string $data - * @return bool|string - */ - public function decodeString($data) { - return base64_decode(strtr($data, '-_', '+/')); - } - - /** - * @return mixed|string - */ - protected function buildHeader() { - return '{"alg":"HS256","typ":"JWT"}'; - } - - /** - * @return mixed|string - */ - protected function buildBody() { - return json_encode($this->getClaims()); - } - - /** - * @return array - */ - protected function getClaimDefaults() { - $now = time(); - return array( - 'iss' => 'Wordfence ' . WORDFENCE_VERSION, - 'aud' => 'Wordfence Central', - 'nbf' => $now, - 'iat' => $now, - 'exp' => $now + self::JWT_TTL, - ); - } - - /** - * @param array $claims - */ - public function addClaims($claims) { - if (!is_array($claims)) { - throw new InvalidArgumentException(__METHOD__ . ' expects argument 1 to be array.'); - } - $this->setClaims(array_merge($this->getClaims(), $claims)); - } - - /** - * @return array - */ - public function getClaims() { - return $this->claims; - } - - /** - * @param array $claims - */ - public function setClaims($claims) { - $this->claims = $claims; - } -} - -class wfJWTException extends Exception { - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfLicense.php b/wp/wp-content/plugins/wordfence/lib/wfLicense.php deleted file mode 100644 index 0aad51ae..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfLicense.php +++ /dev/null @@ -1,394 +0,0 @@ -apiKey = $apiKey; - $this->paid = $paid; - $this->setType($type); - $this->remainingDays = $remainingDays; - $this->conflicting = $conflicting; - $this->deleted = $deleted; - $this->keyType = $keyType; - } - - public function setApiKey($apiKey) { - $this->apiKey = $apiKey; - return $this; - } - - public function getApiKey() { - return $this->apiKey; - } - - public function setPaid($paid) { - $this->paid = $paid; - return $this; - } - - public function isPaid() { - return $this->paid; - } - - public function setType($type) { - $this->type = $type !== null && self::isValidType($type) ? (string) $type : ($this->isPaid() ? self::TYPE_PREMIUM : self::TYPE_FREE); - return $this; - } - - public function getType() { - return $this->type === null ? self::TYPE_FREE : $this->type; - } - - public function is($type, $orGreater = false) { - return $this->type === $type || ($orGreater && $this->isAtLeast($type)); - } - - public function setRemainingDays($days) { - $this->remainingDays = (int) $days; - return $this; - } - - public function getRemainingDays() { - return $this->remainingDays; - } - - public function setConflicting($conflicting = true) { - $this->conflicting = $conflicting; - return $this; - } - - public function hasConflict() { - return $this->conflicting; - } - - public function setDeleted($deleted = true) { - $this->deleted = $deleted; - return $this; - } - - public function isExpired() { - return $this->getKeyType() === self::KEY_TYPE_PAID_EXPIRED; - } - - public function isValid() { - return !$this->isExpired(); - } - - public function isPaidAndCurrent() { - return $this->getKeyType() === self::KEY_TYPE_PAID_CURRENT; - } - - private function resolveKeyType() { - if ($this->deleted) - return self::KEY_TYPE_PAID_DELETED; - if ($this->paid) { - if ($this->remainingDays >= 0) - return self::KEY_TYPE_PAID_CURRENT; - else - return self::KEY_TYPE_PAID_EXPIRED; - } - return self::KEY_TYPE_FREE; - } - - public function getKeyType() { - if (!$this->keyType) - $this->keyType = $this->resolveKeyType(); - return $this->keyType; - } - - private function clearCache() { - $this->keyType = null; - } - - private function compareTiers($a, $b, $inclusive = true) { - if ($a === $b) - return $inclusive; - foreach (self::$TYPES as $tier) { - if ($tier === $a) - return true; - if ($tier === $b) - return false; - } - return false; - } - - /** - * Check if the license type is at or above the given tier - */ - public function isAtLeast($type) { - if ($type !== self::TYPE_FREE && !$this->isValid()) - return false; - return $this->compareTiers($type, $this->getType()); - } - - public function isBelow($type) { - if ($type !== self::TYPE_FREE && !$this->isValid()) - return true; - return $this->compareTiers($this->getType(), $type, false); - } - - public function isPremium($orGreater = false) { - return $this->is(self::TYPE_PREMIUM, $orGreater); - } - - public function isAtLeastPremium() { - return $this->isPremium(true); - } - - public function isBelowPremium() { - return $this->isBelow(self::TYPE_PREMIUM); - } - - public function isCare($orGreater = false) { - return $this->is(self::TYPE_CARE, $orGreater); - } - - public function isAtLeastCare() { - return $this->isCare(true); - } - - public function isBelowCare() { - return $this->isBelow(self::TYPE_CARE); - } - - public function isResponse($orGreater = false) { - return $this->is(self::TYPE_RESPONSE, $orGreater); - } - - public function isAtLeastResponse() { - return $this->isResponse(true); - } - - public function isBelowResponse() { - return $this->isBelow(self::TYPE_RESPONSE); - } - - public function getShieldLogo() { - $type = $this->getType(); - return wfUtils::getBaseURL() . "images/logos/shield-{$type}.svg"; - } - - public function getStylesheet($global = false) { - $type = $this->getType(); - $suffix = $global ? '-global' : ''; - return wfUtils::getBaseURL() . wfUtils::versionedAsset("css/license/{$type}{$suffix}.css", '', WORDFENCE_VERSION); - } - - public function getGlobalStylesheet() { - return $this->getStylesheet(true); - } - - public function getTypeLabel($requireCurrent = true, $includePrefix = null) { - $paidKeyTypes = array(self::KEY_TYPE_PAID_CURRENT); - if (!$requireCurrent) { - $paidKeyTypes[] = self::KEY_TYPE_PAID_EXPIRED; - $paidKeyTypes[] = self::KEY_TYPE_PAID_DELETED; - } - if (in_array($this->getKeyType(), $paidKeyTypes)) { - switch ($this->type) { - case self::TYPE_CARE: - return $includePrefix || $includePrefix === null ? __('Wordfence Care', 'wordfence') : __('Care', 'wordfence'); - case self::TYPE_RESPONSE: - return $includePrefix || $includePrefix === null ? __('Wordfence Response', 'wordfence') : __('Response', 'wordfence'); - case self::TYPE_PREMIUM: - default: - return $includePrefix ? __('Wordfence Premium', 'wordfence') : __('Premium', 'wordfence'); - } - } - return $includePrefix ? __('Wordfence Free', 'wordfence') : __('Free', 'wordfence'); - } - - public function getPrefixedTypeLabel($requireCurrent = true) { - return $this->getTypeLabel($requireCurrent, true); - } - - private function generateLicenseUrl($path, $query = array(), $campaign = null) { - if ($campaign !== null) - $campaign = "gnl1{$campaign}"; - $url = implode( - '/', - array_filter(array( - 'https://www.wordfence.com', - $campaign, - $path - )) - ); - return $url . (empty($query) ? '' : ('?' . http_build_query($query))); - } - - public function getSupportUrl($campaign = null) { - return $this->generateLicenseUrl( - 'get-help', - array( - 'license' => $this->apiKey - ), - $campaign - ); - } - - public function getUpgradeUrl($campaign = null) { - if ($this->isAtLeastPremium()) { - return $this->generateLicenseUrl( - 'licenses', - array( - 'upgrade' => $this->apiKey - ), - $campaign - ); - } - else { - return $this->generateLicenseUrl( - 'products/pricing/', - array(), - $campaign - ); - } - } - - private function writeConfig($hasError = false) { - $this->clearCache(); - $keyType = $this->getKeyType(); - wfConfig::set(self::CONFIG_API_KEY, $this->apiKey); - wfConfig::set(self::CONFIG_TYPE, $this->type); - wfConfig::set(self::CONFIG_REMAINING_DAYS, $this->remainingDays); - wfConfig::set(self::CONFIG_PAID, $keyType === self::KEY_TYPE_PAID_CURRENT); - wfConfig::setOrRemove(self::CONFIG_HAS_KEY_CONFLICT, $this->conflicting ? 1 : null); - if (!$hasError) { //Only save a limited subset of the config if an API error occurred - wfConfig::set(self::CONFIG_KEY_TYPE, $keyType); - } - } - - /** - * @param bool $hasError whether or not an error occurred while retrieving the current license data - */ - public function save($hasError = false) { - $this->writeConfig($hasError); - } - - public function downgradeToFree($apiKey) { - $this->apiKey = $apiKey; - $this->type = self::TYPE_FREE; - $this->paid = false; - $this->keyType = self::KEY_TYPE_FREE; - $this->conflicting = false; - $this->deleted = false; - $this->remainingDays = -1; - return $this; - } - - public static function isValidType($type) { - return in_array($type, self::$TYPES); - } - - private static function fromConfig() { - $remainingDays = wfConfig::get(self::CONFIG_REMAINING_DAYS, null); - if ($remainingDays !== null) - $remainingDays = (int) $remainingDays; - $keyType = wfConfig::get(self::CONFIG_KEY_TYPE, null); - return new self( - (string) wfConfig::get(self::CONFIG_API_KEY), - (bool) wfConfig::get(self::CONFIG_PAID), - (string) wfConfig::get(self::CONFIG_TYPE, self::TYPE_FREE), - $remainingDays, - (bool) wfConfig::get(self::CONFIG_HAS_KEY_CONFLICT, false), - $keyType === self::KEY_TYPE_PAID_DELETED, - $keyType - ); - } - - public static function current() { - if (self::$current === null) { - self::$current = self::fromConfig(); - } - return self::$current; - } - - const REGISTRATION_TOKEN_TTL = 86400; //24 hours - const REGISTRATION_TOKEN_KEY = 'wfRegistrationToken'; - const REGISTRATION_TOKEN_LENGTH = 32; - - public static function getRegistrationToken($refreshTtl = false) { - $token = get_transient(self::REGISTRATION_TOKEN_KEY); - if ($token === false) { - $token = openssl_random_pseudo_bytes(self::REGISTRATION_TOKEN_LENGTH); - if ($token === false) - throw new Exception('Unable to generate registration token'); - $token = wfUtils::base64url_encode($token); - $refreshTtl = true; - } - if ($refreshTtl) - set_transient(self::REGISTRATION_TOKEN_KEY, $token, self::REGISTRATION_TOKEN_TTL); - return $token; - } - - public static function validateRegistrationToken($token) { - $expected = self::getRegistrationToken(); - //Note that the length of $expected is publicly known since it's in the plugin source, so differening lengths immediately triggering a false return is not a cause for concern - return hash_equals($expected, $token); - } - - public static function generateRegistrationLink() { - $wfWebsite = wfWebsite::getInstance(); - $stats = wfAPI::generateSiteStats(); - $token = self::getRegistrationToken(true); - $returnUrl = network_admin_url('admin.php?page=WordfenceInstall'); - $payload = array( - self::REGISTRATION_PAYLOAD_VERSION, - $stats, - $token, - $returnUrl, - ); - $payload = implode(';', $payload); - $payload = wfUtils::base64url_encode($payload); - return $wfWebsite->getUrl("plugin/registration/{$payload}"); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfLockedOut.php b/wp/wp-content/plugins/wordfence/lib/wfLockedOut.php deleted file mode 100644 index c6e79f36..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfLockedOut.php +++ /dev/null @@ -1,404 +0,0 @@ - - - - - <?php esc_html_e('You are temporarily locked out', 'wordfence'); ?> - - - -
-
-

-

-

- -
-
- -
-
    -
  • -
  • -
- - -

- - - - - - - - - -
- -
-
- \s*/i', '', $contents); - $contents = preg_replace('/^\s*/i', '', $contents); - $contents = preg_replace('/ -
-
-

-

-

-
-
- -

Documentation (opens in new tab)', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_LOCKED_OUT)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('class'=>array()))); ?>

-

.
.

-
- - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfLog.php b/wp/wp-content/plugins/wordfence/lib/wfLog.php deleted file mode 100644 index b2ff49ee..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfLog.php +++ /dev/null @@ -1,2118 +0,0 @@ -get_var($wpdb->prepare("SELECT COUNT(*) FROM {$table} WHERE IP = %s AND identifier = %s AND expiration >= UNIX_TIMESTAMP()", wfUtils::inet_pton($IP), hash('sha256', $UA, true)))) { - return true; - } - return false; - } - - /** - * Creates a cache record for the requester to tag it as human. - * - * @param bool|string $IP - * @param bool|string $UA - * @return bool - */ - public static function cacheHumanRequester($IP = false, $UA = false) { - global $wpdb; - - if ($IP === false) { - $IP = wfUtils::getIP(); - } - - if ($UA === false) { - $UA = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''); - } - - $table = wfDB::networkTable('wfLiveTrafficHuman'); - if ($wpdb->get_var($wpdb->prepare("INSERT IGNORE INTO {$table} (IP, identifier, expiration) VALUES (%s, %s, UNIX_TIMESTAMP() + 86400)", wfUtils::inet_pton($IP), hash('sha256', $UA, true)))) { - return true; - } - } - - /** - * Prunes any expired records from the human cache. - */ - public static function trimHumanCache() { - global $wpdb; - $table = wfDB::networkTable('wfLiveTrafficHuman'); - $wpdb->query("DELETE FROM {$table} WHERE `expiration` < UNIX_TIMESTAMP()"); - } - - public function __construct($apiKey, $wp_version){ - $this->apiKey = $apiKey; - $this->wp_version = $wp_version; - $this->hitsTable = wfDB::networkTable('wfHits'); - $this->loginsTable = wfDB::networkTable('wfLogins'); - $this->statusTable = wfDB::networkTable('wfStatus'); - - add_filter('determine_current_user', array($this, '_userIDDetermined'), 99, 1); - } - - public function _userIDDetermined($userID) { - //Needed because the REST API will clear the authenticated user if it fails a nonce check on the request - $this->effectiveUserID = (int) $userID; - return $userID; - } - - public function initLogRequest() { - if ($this->currentRequest === null) { - $this->currentRequest = new wfRequestModel(); - - $this->currentRequest->ctime = sprintf('%.6f', microtime(true)); - $this->currentRequest->statusCode = 200; - $this->currentRequest->isGoogle = (wfCrawl::isGoogleCrawler() ? 1 : 0); - $this->currentRequest->IP = wfUtils::inet_pton(wfUtils::getIP()); - $this->currentRequest->userID = $this->getCurrentUserID(); - $this->currentRequest->URL = wfUtils::getRequestedURL(); - $this->currentRequest->referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''); - $this->currentRequest->UA = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''); - $this->currentRequest->jsRun = 0; - - add_action('wp_loaded', array($this, 'actionSetRequestJSEnabled')); - add_action('init', array($this, 'actionSetRequestOnInit'), 9999); - - if (function_exists('register_shutdown_function')) { - register_shutdown_function(array($this, 'logHit')); - } - } - } - - public function actionSetRequestJSEnabled() { - if (get_current_user_id() > 0) { - $this->currentRequest->jsRun = true; - return; - } - - $IP = wfUtils::getIP(); - $UA = $this->currentRequest->UA; - $this->currentRequest->jsRun = wfLog::isHumanRequest($IP, $UA); - } - - /** - * CloudFlare's plugin changes $_SERVER['REMOTE_ADDR'] on init. - */ - public function actionSetRequestOnInit() { - $this->currentRequest->IP = wfUtils::inet_pton(wfUtils::getIP()); - $this->currentRequest->userID = $this->getCurrentUserID(); - } - - /** - * @return wfRequestModel - */ - public function getCurrentRequest() { - return $this->currentRequest; - } - - public function logLogin($action, $fail, $username){ - if(! $username){ - return; - } - $user = get_user_by('login', $username); - $userID = 0; - if($user){ - $userID = $user->ID; - if(! $userID){ - return; - } - } - else { - $user = get_user_by('email', $username); - if ($user) { - $userID = $user->ID; - if (!$userID) { - return; - } - } - } - // change the action flag here if the user does not exist. - if ($action == 'loginFailValidUsername' && $userID == 0) { - $action = 'loginFailInvalidUsername'; - } - - $hitID = 0; - if ($this->currentRequest !== null) { - $this->currentRequest->userID = $userID; - $this->currentRequest->action = $action; - $this->currentRequest->save(); - $hitID = $this->currentRequest->getPrimaryKey(); - } - - //Else userID stays 0 but we do log this even though the user doesn't exist. - $this->getDB()->queryWrite("insert into " . $this->loginsTable . " (hitID, ctime, fail, action, username, userID, IP, UA) values (%d, %f, %d, '%s', '%s', %s, %s, '%s')", - $hitID, - sprintf('%.6f', microtime(true)), - $fail, - $action, - $username, - $userID, - wfUtils::inet_pton(wfUtils::getIP()), - (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '') - ); - } - private function getCurrentUserID(){ - if (!function_exists('get_current_user_id') || !defined('AUTH_COOKIE')) { //If pluggable.php is loaded early by some other plugin on a multisite installation, it leads to an error because AUTH_COOKIE is undefined and WP doesn't check for it first - return 0; - } - $id = get_current_user_id(); - return $id ? $id : 0; - } - public function logLeechAndBlock($type) { //404 or hit - if (!wfRateLimit::mightRateLimit($type)) { - return; - } - - wfRateLimit::countHit($type, wfUtils::getIP()); - - if (wfRateLimit::globalRateLimit()->shouldEnforce($type)) { - $this->takeBlockingAction('maxGlobalRequests', __("Exceeded the maximum global requests per minute for crawlers or humans.", 'wordfence')); - } - else if (wfRateLimit::crawlerViewsRateLimit()->shouldEnforce($type)) { - $this->takeBlockingAction('maxRequestsCrawlers', __("Exceeded the maximum number of requests per minute for crawlers.", 'wordfence')); //may not exit - } - else if (wfRateLimit::crawler404sRateLimit()->shouldEnforce($type)) { - $this->takeBlockingAction('max404Crawlers', __("Exceeded the maximum number of page not found errors per minute for a crawler.", 'wordfence')); - } - else if (wfRateLimit::humanViewsRateLimit()->shouldEnforce($type)) { - $this->takeBlockingAction('maxRequestsHumans', __("Exceeded the maximum number of page requests per minute for humans.", 'wordfence')); - } - else if (wfRateLimit::human404sRateLimit()->shouldEnforce($type)) { - $this->takeBlockingAction('max404Humans', __("Exceeded the maximum number of page not found errors per minute for humans.", 'wordfence')); - } - } - - public function tagRequestForBlock($reason, $wfsn = false) { - if ($this->currentRequest !== null) { - $this->currentRequest->statusCode = 403; - $this->currentRequest->action = 'blocked:' . ($wfsn ? 'wfsn' : 'wordfence'); - $this->currentRequest->actionDescription = $reason; - } - } - - public function tagRequestForLockout($reason) { - if ($this->currentRequest !== null) { - $this->currentRequest->statusCode = 503; - $this->currentRequest->action = 'lockedOut'; - $this->currentRequest->actionDescription = $reason; - } - } - - /** - * @return bool|int - */ - public function logHit() { - $liveTrafficEnabled = wfConfig::liveTrafficEnabled(); - $action = $this->currentRequest->action; - $logHitOK = $this->logHitOK(); - if (!$logHitOK) { - return false; - } - if (!$liveTrafficEnabled && !$action) { - return false; - } - if ($this->currentRequest !== null) { - if ($this->currentRequest->save()) { - return $this->currentRequest->getPrimaryKey(); - } - } - return false; - } - - public function getHits($hitType /* 'hits' or 'logins' */, $type, $afterTime, $limit = 50, $IP = false){ - global $wpdb; - $IPSQL = ""; - if($IP){ - $IPSQL = " and IP=%s "; - $sqlArgs = array($afterTime, wfUtils::inet_pton($IP), $limit); - } else { - $sqlArgs = array($afterTime, $limit); - } - if($hitType == 'hits'){ - $securityOnly = !wfConfig::liveTrafficEnabled(); - $delayedHumanBotFiltering = false; - - if($type == 'hit'){ - $typeSQL = " "; - } else if($type == 'crawler'){ - if ($securityOnly) { - $typeSQL = " "; - $delayedHumanBotFiltering = true; - } - else { - $now = time(); - $typeSQL = " and jsRun = 0 and {$now} - ctime > 30 "; - } - } else if($type == 'gCrawler'){ - $typeSQL = " and isGoogle = 1 "; - } else if($type == '404'){ - $typeSQL = " and statusCode = 404 "; - } else if($type == 'human'){ - if ($securityOnly) { - $typeSQL = " "; - $delayedHumanBotFiltering = true; - } - else { - $typeSQL = " and jsRun = 1 "; - } - } else if($type == 'ruser'){ - $typeSQL = " and userID > 0 "; - } else { - wordfence::status(1, 'error', sprintf(/* translators: Error message. */ __("Invalid log type to wfLog: %s", 'wordfence'), $type)); - return false; - } - array_unshift($sqlArgs, "select h.*, u.display_name from {$this->hitsTable} h - LEFT JOIN {$wpdb->users} u on h.userID = u.ID - where ctime > %f $IPSQL $typeSQL order by ctime desc limit %d"); - $results = call_user_func_array(array($this->getDB(), 'querySelect'), $sqlArgs); - - if ($delayedHumanBotFiltering) { - $browscap = wfBrowscap::shared(); - foreach ($results as $index => $res) { - if ($res['UA']) { - $b = $browscap->getBrowser($res['UA']); - if ($b && $b['Parent'] != 'DefaultProperties') { - $jsRun = wfUtils::truthyToBoolean($res['jsRun']); - if (!wfConfig::liveTrafficEnabled() && !$jsRun) { - $jsRun = !(isset($b['Crawler']) && $b['Crawler']); - } - - if ($type == 'crawler' && $jsRun || $type == 'human' && !$jsRun) { - unset($results[$index]); - } - } - } - } - } - - } else if($hitType == 'logins'){ - array_unshift($sqlArgs, "select l.*, u.display_name from {$this->loginsTable} l - LEFT JOIN {$wpdb->users} u on l.userID = u.ID - where ctime > %f $IPSQL order by ctime desc limit %d"); - $results = call_user_func_array(array($this->getDB(), 'querySelect'), $sqlArgs ); - - } else { - wordfence::status(1, 'error', sprintf(/* translators: Error message. */ __("getHits got invalid hitType: %s", 'wordfence'), $hitType)); - return false; - } - $this->processGetHitsResults($type, $results); - return $results; - } - - private function processActionDescription($description) { - switch ($description) { - case wfWAFIPBlocksController::WFWAF_BLOCK_UAREFIPRANGE: - return __('UA/Hostname/Referrer/IP Range not allowed', 'wordfence'); - default: - return $description; - } - } - - /** - * @param string $type - * @param array $results - * @throws Exception - */ - public function processGetHitsResults($type, &$results) { - $serverTime = $this->getDB()->querySingle("select unix_timestamp()"); - - $this->resolveIPs($results); - $ourURL = parse_url(site_url()); - $ourHost = strtolower($ourURL['host']); - $ourHost = preg_replace('/^www\./i', '', $ourHost); - $browscap = wfBrowscap::shared(); - - $patternBlocks = wfBlock::patternBlocks(true); - - foreach($results as &$res){ - $res['type'] = $type; - $res['IP'] = wfUtils::inet_ntop($res['IP']); - $res['timeAgo'] = wfUtils::makeTimeAgo($serverTime - $res['ctime']); - $res['blocked'] = false; - $res['rangeBlocked'] = false; - $res['ipRangeID'] = -1; - if (array_key_exists('actionDescription', $res)) - $res['actionDescription'] = $this->processActionDescription($res['actionDescription']); - - $ipBlock = wfBlock::findIPBlock($res['IP']); - if ($ipBlock !== false) { - $res['blocked'] = true; - $res['blockID'] = $ipBlock->id; - } - - foreach ($patternBlocks as $b) { - if (empty($b->ipRange)) { continue; } - $range = new wfUserIPRange($b->ipRange); - if ($range->isIPInRange($res['IP'])) { - $res['rangeBlocked'] = true; - $res['ipRangeID'] = $b->id; - break; - } - } - - $res['extReferer'] = false; - if(isset( $res['referer'] ) && $res['referer']){ - if(wfUtils::hasXSS($res['referer'] )){ //filtering out XSS - $res['referer'] = ''; - } - } - if( isset( $res['referer'] ) && $res['referer']){ - $refURL = parse_url($res['referer']); - if(is_array($refURL) && isset($refURL['host']) && $refURL['host']){ - $refHost = strtolower(preg_replace('/^www\./i', '', $refURL['host'])); - if($refHost != $ourHost){ - $res['extReferer'] = true; - //now extract search terms - $q = false; - if(preg_match('/(?:google|bing|alltheweb|aol|ask)\./i', $refURL['host'])){ - $q = 'q'; - } else if(stristr($refURL['host'], 'yahoo.')){ - $q = 'p'; - } else if(stristr($refURL['host'], 'baidu.')){ - $q = 'wd'; - } - if($q){ - $queryVars = array(); - if( isset( $refURL['query'] ) ) { - parse_str($refURL['query'], $queryVars); - if(isset($queryVars[$q])){ - $res['searchTerms'] = urlencode($queryVars[$q]); - } - } - } - } - } - if($res['extReferer']){ - if ( isset( $referringPage ) && stristr( $referringPage['host'], 'google.' ) ) - { - parse_str( $referringPage['query'], $queryVars ); - // echo $queryVars['q']; // This is the search term used - } - } - } - $res['browser'] = false; - if($res['UA']){ - $b = $browscap->getBrowser($res['UA']); - if($b && $b['Parent'] != 'DefaultProperties'){ - $res['browser'] = array( - 'browser' => !empty($b['Browser']) ? $b['Browser'] : "", - 'version' => !empty($b['Version']) ? $b['Version'] : "", - 'platform' => !empty($b['Platform']) ? $b['Platform'] : "", - 'isMobile' => !empty($b['isMobileDevice']) ? $b['isMobileDevice'] : "", - 'isCrawler' => !empty($b['Crawler']) ? $b['Crawler'] : "", - ); - - if (isset($res['jsRun']) && !wfConfig::liveTrafficEnabled() && !wfUtils::truthyToBoolean($res['jsRun'])) { - $res['jsRun'] = !(isset($b['Crawler']) && $b['Crawler']) ? '1' : '0'; - } - } - else { - $IP = wfUtils::getIP(); - $res['browser'] = array( - 'isCrawler' => !wfLog::isHumanRequest($IP, $res['UA']) ? 'true' : '' - ); - } - } - - - if($res['userID']){ - $ud = get_userdata($res['userID']); - if($ud){ - $res['user'] = array( - 'editLink' => wfUtils::editUserLink($res['userID']), - 'display_name' => $res['display_name'], - 'ID' => $res['userID'] - ); - } - } else { - $res['user'] = false; - } - } - } - - public function resolveIPs(&$results){ - if(sizeof($results) < 1){ return; } - $IPs = array(); - foreach($results as &$res){ - if($res['IP']){ //Can also be zero in case of non IP events - $IPs[] = $res['IP']; - } - } - $IPLocs = wfUtils::getIPsGeo($IPs); //Creates an array with IP as key and data as value - - foreach($results as &$res){ - $ip_printable = wfUtils::inet_ntop($res['IP']); - if(isset($IPLocs[$ip_printable])){ - $res['loc'] = $IPLocs[$ip_printable]; - } else { - $res['loc'] = false; - } - } - } - public function logHitOK(){ - if (!$this->canLogHit) { - return false; - } - if (is_admin()) { return false; } //Don't log admin pageviews - if (isset($_SERVER['HTTP_USER_AGENT'])) { - if (preg_match('/WordPress\/' . $this->wp_version . '/i', $_SERVER['HTTP_USER_AGENT'])) { return false; } //Ignore regular requests generated by WP UA. - } - $userID = get_current_user_id(); - if (!$userID) { - $userID = $this->effectiveUserID; - } - if ($userID) { - $user = new WP_User($userID); - if ($user && $user->exists()) { - if (wfConfig::get('liveTraf_ignorePublishers') && ($user->has_cap('publish_posts') || $user->has_cap('publish_pages'))) { - return false; - } - - if (wfConfig::get('liveTraf_ignoreUsers')) { - $ignored = explode(',', wfConfig::get('liveTraf_ignoreUsers')); - foreach ($ignored as $entry) { - if($user->user_login == $entry){ - return false; - } - } - } - } - } - if(wfConfig::get('liveTraf_ignoreIPs')){ - $IPs = explode(',', wfConfig::get('liveTraf_ignoreIPs')); - $IP = wfUtils::getIP(); - foreach($IPs as $ignoreIP){ - if($ignoreIP == $IP){ - return false; - } - } - } - if( isset($_SERVER['HTTP_USER_AGENT']) && wfConfig::get('liveTraf_ignoreUA') ){ - if($_SERVER['HTTP_USER_AGENT'] == wfConfig::get('liveTraf_ignoreUA')){ - return false; - } - } - - return true; - } - private function getDB(){ - if(! $this->db){ - $this->db = new wfDB(); - } - return $this->db; - } - public function firewallBadIPs() { - $IP = wfUtils::getIP(); - if (wfBlock::isWhitelisted($IP)) { - return; - } - - //Range and UA pattern blocking - $patternBlocks = wfBlock::patternBlocks(true); - $userAgent = !empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; - $referrer = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; - foreach ($patternBlocks as $b) { - if ($b->matchRequest($IP, $userAgent, $referrer) !== wfBlock::MATCH_NONE) { - $b->recordBlock(); - wfActivityReport::logBlockedIP($IP, null, 'advanced'); - $this->currentRequest->actionDescription = __('UA/Referrer/IP Range not allowed', 'wordfence'); - $this->do503(3600, __("Advanced blocking in effect.", 'wordfence')); //exits - } - } - - // Country blocking - $countryBlocks = wfBlock::countryBlocks(true); - foreach ($countryBlocks as $b) { - $match = $b->matchRequest($IP, false, false); - if ($match === wfBlock::MATCH_COUNTRY_REDIR_BYPASS) { - $bypassRedirDest = wfConfig::get('cbl_bypassRedirDest', ''); - - $this->initLogRequest(); - $this->getCurrentRequest()->actionDescription = __('redirected to bypass URL', 'wordfence'); - $this->getCurrentRequest()->statusCode = 302; - $this->currentRequest->action = 'cbl:redirect'; - $this->logHit(); - - wfUtils::doNotCache(); - wp_redirect($bypassRedirDest, 302); - exit(); - } - else if ($match === wfBlock::MATCH_COUNTRY_REDIR) { - $b->recordBlock(); - wfConfig::inc('totalCountryBlocked'); - - $this->initLogRequest(); - $this->getCurrentRequest()->actionDescription = sprintf(/* translators: URL */ __('blocked access via country blocking and redirected to URL (%s)', 'wordfence'), wfConfig::get('cbl_redirURL')); - $this->getCurrentRequest()->statusCode = 503; - if (!$this->getCurrentRequest()->action) { - $this->currentRequest->action = 'blocked:wordfence'; - } - $this->logHit(); - - wfActivityReport::logBlockedIP($IP, null, 'country'); - - wfUtils::doNotCache(); - wp_redirect(wfConfig::get('cbl_redirURL'), 302); - exit(); - } - else if ($match !== wfBlock::MATCH_NONE) { - $b->recordBlock(); - $this->currentRequest->actionDescription = __('blocked access via country blocking', 'wordfence'); - wfConfig::inc('totalCountryBlocked'); - wfActivityReport::logBlockedIP($IP, null, 'country'); - $this->do503(3600, __('Access from your area has been temporarily limited for security reasons', 'wordfence')); - } - } - - //Specific IP blocks - $ipBlock = wfBlock::findIPBlock($IP); - if ($ipBlock !== false) { - $ipBlock->recordBlock(); - $secsToGo = max(0, $ipBlock->expiration - time()); - if (wfConfig::get('other_WFNet') && self::isAuthRequest()) { //It's an auth request and this IP has been blocked - $this->getCurrentRequest()->action = 'blocked:wfsnrepeat'; - wordfence::wfsnReportBlockedAttempt($IP, 'login'); - } - $reason = $ipBlock->reason; - if ($ipBlock->type == wfBlock::TYPE_IP_MANUAL || $ipBlock->type == wfBlock::TYPE_IP_AUTOMATIC_PERMANENT) { - $reason = __('Manual block by administrator', 'wordfence'); - } - $this->do503($secsToGo, $reason); //exits - } - } - - private function takeBlockingAction($configVar, $reason) { - if ($this->googleSafetyCheckOK()) { - $action = wfConfig::get($configVar . '_action'); - if (!$action) { - return; - } - - $IP = wfUtils::getIP(); - $secsToGo = 0; - if ($action == 'block') { //Rate limited - block temporarily - $secsToGo = wfBlock::blockDuration(); - wfBlock::createRateBlock($reason, $IP, $secsToGo); - wfActivityReport::logBlockedIP($IP, null, 'throttle'); - $this->tagRequestForBlock($reason); - - $alertCallback = array(new wfBlockAlert($IP, $reason, $secsToGo), 'send'); - - do_action('wordfence_security_event', 'block', array( - 'ip' => $IP, - 'reason' => $reason, - 'duration' => $secsToGo, - ), $alertCallback); - wordfence::status(2, 'info', sprintf(/* translators: 1. IP address. 2. Description of firewall action. */ __('Blocking IP %1$s. %2$s', 'wordfence'), $IP, $reason)); - } - else if ($action == 'throttle') { //Rate limited - throttle - $secsToGo = wfBlock::rateLimitThrottleDuration(); - wfBlock::createRateThrottle($reason, $IP, $secsToGo); - wfActivityReport::logBlockedIP($IP, null, 'throttle'); - - do_action('wordfence_security_event', 'throttle', array( - 'ip' => $IP, - 'reason' => $reason, - 'duration' => $secsToGo, - )); - wordfence::status(2, 'info', sprintf(/* translators: 1. IP address. 2. Description of firewall action. */ __('Throttling IP %1$s. %2$s', 'wordfence'), $IP, $reason)); - wfConfig::inc('totalIPsThrottled'); - } - $this->do503($secsToGo, $reason, false); - } - - return; - } - - /** - * Test if the current request is for wp-login.php or xmlrpc.php - * - * @return boolean - */ - private static function isAuthRequest() { - if ((strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false)) { - return true; - } - return false; - } - - public function do503($secsToGo, $reason, $sendEventToCentral = true){ - $this->initLogRequest(); - - if ($sendEventToCentral) { - do_action('wordfence_security_event', 'block', array( - 'ip' => wfUtils::inet_ntop($this->currentRequest->IP), - 'reason' => $this->currentRequest->actionDescription ? $this->currentRequest->actionDescription : $reason, - 'duration' => $secsToGo, - )); - } - - $this->currentRequest->statusCode = 503; - if (!$this->currentRequest->action) { - $this->currentRequest->action = 'blocked:wordfence'; - } - if (!$this->currentRequest->actionDescription) { - $this->currentRequest->actionDescription = "blocked: " . $reason; - } - - $this->logHit(); - - wfConfig::inc('total503s'); - wfUtils::doNotCache(); - header('HTTP/1.1 503 Service Temporarily Unavailable'); - header('Status: 503 Service Temporarily Unavailable'); - if($secsToGo){ - header('Retry-After: ' . $secsToGo); - } - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require_once(dirname(__FILE__) . '/wf503.php'); - exit(); - } - private function redirect($URL){ - wfUtils::doNotCache(); - wp_redirect($URL, 302); - exit(); - } - private function googleSafetyCheckOK(){ //returns true if OK to block. Returns false if we must not block. - $cacheKey = md5( (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '') . ' ' . wfUtils::getIP()); - //Cache so we can call this multiple times in one request - if(! isset(self::$gbSafeCache[$cacheKey])){ - $nb = wfConfig::get('neverBlockBG'); - if($nb == 'treatAsOtherCrawlers'){ - self::$gbSafeCache[$cacheKey] = true; //OK to block because we're treating google like everyone else - } else if($nb == 'neverBlockUA' || $nb == 'neverBlockVerified'){ - if(wfCrawl::isGoogleCrawler()){ //Check the UA using regex - if($nb == 'neverBlockVerified'){ - if(wfCrawl::isVerifiedGoogleCrawler(wfUtils::getIP())){ //UA check passed, now verify using PTR if configured to - self::$gbSafeCache[$cacheKey] = false; //This is a verified Google crawler, so no we can't block it - } else { - self::$gbSafeCache[$cacheKey] = true; //This is a crawler claiming to be Google but it did not verify - } - } else { //neverBlockUA - self::$gbSafeCache[$cacheKey] = false; //User configured us to only do a UA check and this claims to be google so don't block - } - } else { - self::$gbSafeCache[$cacheKey] = true; //This isn't a Google UA, so it's OK to block - } - } else { - //error_log("Wordfence error: neverBlockBG option is not set."); - self::$gbSafeCache[$cacheKey] = false; //Oops the config option is not set. This should never happen because it's set on install. So we return false to indicate it's not OK to block just for safety. - } - } - if(! isset(self::$gbSafeCache[$cacheKey])){ - //error_log("Wordfence assertion fail in googleSafetyCheckOK: cached value is not set."); - return false; //for safety - } - return self::$gbSafeCache[$cacheKey]; //return cached value - } - public function addStatus($level, $type, $msg){ - //$msg = '[' . sprintf('%.2f', memory_get_usage(true) / (1024 * 1024)) . '] ' . $msg; - $this->getDB()->queryWrite("insert into " . $this->statusTable . " (ctime, level, type, msg) values (%s, %d, '%s', '%s')", sprintf('%.6f', microtime(true)), $level, $type, $msg); - } - public function getStatusEvents($lastCtime){ - if($lastCtime < 1){ - $lastCtime = $this->getDB()->querySingle("select ctime from " . $this->statusTable . " order by ctime desc limit 1000,1"); - if(! $lastCtime){ - $lastCtime = 0; - } - } - $results = $this->getDB()->querySelect("select ctime, level, type, msg from " . $this->statusTable . " where ctime > %f order by ctime asc", $lastCtime); - $timeOffset = 3600 * get_option('gmt_offset'); - foreach($results as &$rec){ - //$rec['timeAgo'] = wfUtils::makeTimeAgo(time() - $rec['ctime']); - $rec['date'] = date('M d H:i:s', (int) $rec['ctime'] + $timeOffset); - $rec['msg'] = wp_kses_data( (string) $rec['msg']); - } - return $results; - } - public function getSummaryEvents(){ - $results = $this->getDB()->querySelect("select ctime, level, type, msg from " . $this->statusTable . " where level = 10 order by ctime desc limit 100"); - $timeOffset = 3600 * get_option('gmt_offset'); - foreach($results as &$rec){ - $rec['date'] = date('M d H:i:s', (int) $rec['ctime'] + $timeOffset); - if(strpos($rec['msg'], 'SUM_PREP:') === 0){ - break; - } - } - return array_reverse($results); - } - - /** - * @return string - */ - public function getGooglePattern() { - return $this->googlePattern; - } - -} - -/** - * - */ -class wfUserIPRange { - - /** - * @var string|null - */ - private $ip_string; - - /** - * @param string|null $ip_string - */ - public function __construct($ip_string = null) { - $this->setIPString($ip_string); - } - - /** - * Check if the supplied IP address is within the user supplied range. - * - * @param string $ip - * @return bool - */ - public function isIPInRange($ip) { - $ip_string = $this->getIPString(); - - if (strpos($ip_string, '/') !== false) { //CIDR range -- 127.0.0.1/24 - return wfUtils::subnetContainsIP($ip_string, $ip); - } - else if (strpos($ip_string, '[') !== false) //Bracketed range -- 127.0.0.[1-100] - { - // IPv4 range - if (strpos($ip_string, '.') !== false && strpos($ip, '.') !== false) { - // IPv4-mapped-IPv6 - if (preg_match('/:ffff:([^:]+)$/i', $ip_string, $matches)) { - $ip_string = $matches[1]; - } - if (preg_match('/:ffff:([^:]+)$/i', $ip, $matches)) { - $ip = $matches[1]; - } - - // Range check - if (preg_match('/\[\d+\-\d+\]/', $ip_string)) { - $IPparts = explode('.', $ip); - $whiteParts = explode('.', $ip_string); - $mismatch = false; - if (count($whiteParts) != 4 || count($IPparts) != 4) { - return false; - } - - for ($i = 0; $i <= 3; $i++) { - if (preg_match('/^\[(\d+)\-(\d+)\]$/', $whiteParts[$i], $m)) { - if ($IPparts[$i] < $m[1] || $IPparts[$i] > $m[2]) { - $mismatch = true; - } - } - else if ($whiteParts[$i] != $IPparts[$i]) { - $mismatch = true; - } - } - if ($mismatch === false) { - return true; // Is whitelisted because we did not get a mismatch - } - } - else if ($ip_string == $ip) { - return true; - } - - // IPv6 range - } - else if (strpos($ip_string, ':') !== false && strpos($ip, ':') !== false) { - $ip = strtolower(wfUtils::expandIPv6Address($ip)); - $ip_string = strtolower(self::expandIPv6Range($ip_string)); - if (preg_match('/\[[a-f0-9]+\-[a-f0-9]+\]/i', $ip_string)) { - $IPparts = explode(':', $ip); - $whiteParts = explode(':', $ip_string); - $mismatch = false; - if (count($whiteParts) != 8 || count($IPparts) != 8) { - return false; - } - - for ($i = 0; $i <= 7; $i++) { - if (preg_match('/^\[([a-f0-9]+)\-([a-f0-9]+)\]$/i', $whiteParts[$i], $m)) { - $ip_group = hexdec($IPparts[$i]); - $range_group_from = hexdec($m[1]); - $range_group_to = hexdec($m[2]); - if ($ip_group < $range_group_from || $ip_group > $range_group_to) { - $mismatch = true; - break; - } - } - else if ($whiteParts[$i] != $IPparts[$i]) { - $mismatch = true; - break; - } - } - if ($mismatch === false) { - return true; // Is whitelisted because we did not get a mismatch - } - } - else if ($ip_string == $ip) { - return true; - } - } - } - else if (strpos($ip_string, '-') !== false) { //Linear range -- 127.0.0.1 - 127.0.1.100 - list($ip1, $ip2) = explode('-', $ip_string); - $ip1N = wfUtils::inet_pton($ip1); - $ip2N = wfUtils::inet_pton($ip2); - $ipN = wfUtils::inet_pton($ip); - return (strcmp($ip1N, $ipN) <= 0 && strcmp($ip2N, $ipN) >= 0); - } - else { //Treat as a literal IP - $ip1 = @wfUtils::inet_pton($ip_string); - $ip2 = @wfUtils::inet_pton($ip); - if ($ip1 !== false && $ip1 == $ip2) { - return true; - } - } - - return false; - } - - private static function repeatString($string, $count) { - if ($count <= 0) - return ''; - return str_repeat($string, $count); - } - - /** - * Expand a compressed printable range representation of an IPv6 address. - * - * @todo Hook up exceptions for better error handling. - * @todo Allow IPv4 mapped IPv6 addresses (::ffff:192.168.1.1). - * @param string $ip_range - * @return string - */ - public static function expandIPv6Range($ip_range) { - $colon_count = substr_count($ip_range, ':'); - $dbl_colon_count = substr_count($ip_range, '::'); - if ($dbl_colon_count > 1) { - return false; - } - $dbl_colon_pos = strpos($ip_range, '::'); - if ($dbl_colon_pos !== false) { - $ip_range = str_replace('::', self::repeatString(':0000', - (($dbl_colon_pos === 0 || $dbl_colon_pos === strlen($ip_range) - 2) ? 9 : 8) - $colon_count) . ':', $ip_range); - $ip_range = trim($ip_range, ':'); - } - $colon_count = substr_count($ip_range, ':'); - if ($colon_count != 7) { - return false; - } - - $groups = explode(':', $ip_range); - $expanded = ''; - foreach ($groups as $group) { - if (preg_match('/\[([a-f0-9]{1,4})\-([a-f0-9]{1,4})\]/i', $group, $matches)) { - $expanded .= sprintf('[%s-%s]', str_pad(strtolower($matches[1]), 4, '0', STR_PAD_LEFT), str_pad(strtolower($matches[2]), 4, '0', STR_PAD_LEFT)) . ':'; - } else if (preg_match('/[a-f0-9]{1,4}/i', $group)) { - $expanded .= str_pad(strtolower($group), 4, '0', STR_PAD_LEFT) . ':'; - } else { - return false; - } - } - return trim($expanded, ':'); - } - - /** - * @return bool - */ - public function isValidRange() { - return $this->isValidCIDRRange() || $this->isValidBracketedRange() || $this->isValidLinearRange() || wfUtils::isValidIP($this->getIPString()); - } - - public function isValidCIDRRange() { //e.g., 192.0.2.1/24 - $ip_string = $this->getIPString(); - if (preg_match('/[^0-9a-f:\/\.]/i', $ip_string)) { return false; } - return wfUtils::isValidCIDRRange($ip_string); - } - - public function isValidBracketedRange() { //e.g., 192.0.2.[1-10] - $ip_string = $this->getIPString(); - if (preg_match('/[^0-9a-f:\.\[\]\-]/i', $ip_string)) { return false; } - if (strpos($ip_string, '.') !== false) { //IPv4 - if (preg_match_all('/(\d+)/', $ip_string, $matches) > 0) { - foreach ($matches[1] as $match) { - $group = (int) $match; - if ($group > 255 || $group < 0) { - return false; - } - } - } - - $group_regex = '([0-9]{1,3}|\[[0-9]{1,3}\-[0-9]{1,3}\])'; - return preg_match('/^' . str_repeat("{$group_regex}\\.", 3) . $group_regex . '$/i', $ip_string) > 0; - } - - //IPv6 - if (strpos($ip_string, '::') !== false) { - $ip_string = self::expandIPv6Range($ip_string); - } - if (!$ip_string) { - return false; - } - $group_regex = '([a-f0-9]{1,4}|\[[a-f0-9]{1,4}\-[a-f0-9]{1,4}\])'; - return preg_match('/^' . str_repeat("$group_regex:", 7) . $group_regex . '$/i', $ip_string) > 0; - } - - public function isValidLinearRange() { //e.g., 192.0.2.1-192.0.2.100 - $ip_string = $this->getIPString(); - if (preg_match('/[^0-9a-f:\.\-]/i', $ip_string)) { return false; } - list($ip1, $ip2) = explode("-", $ip_string); - $ip1N = @wfUtils::inet_pton($ip1); - $ip2N = @wfUtils::inet_pton($ip2); - - if ($ip1N === false || !wfUtils::isValidIP($ip1) || $ip2N === false || !wfUtils::isValidIP($ip2)) { - return false; - } - - return strcmp($ip1N, $ip2N) <= 0; - } - - public function isMixedRange() { //e.g., 192.0.2.1-2001:db8::ffff - $ip_string = $this->getIPString(); - if (preg_match('/[^0-9a-f:\.\-]/i', $ip_string)) { return false; } - list($ip1, $ip2) = explode("-", $ip_string); - - $ipv4Count = 0; - $ipv4Count += filter_var($ip1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false ? 1 : 0; - $ipv4Count += filter_var($ip2, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false ? 1 : 0; - - $ipv6Count = 0; - $ipv6Count += filter_var($ip1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false ? 1 : 0; - $ipv6Count += filter_var($ip2, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false ? 1 : 0; - - if ($ipv4Count != 2 && $ipv6Count != 2) { - return true; - } - - return false; - } - - protected function _sanitizeIPRange($ip_string) { - if (!is_string($ip_string)) - return null; - $ip_string = preg_replace('/\s/', '', $ip_string); //Strip whitespace - $ip_string = preg_replace('/[\\x{2013}-\\x{2015}]/u', '-', $ip_string); //Non-hyphen dashes to hyphen - $ip_string = strtolower($ip_string); - - if (preg_match('/^\d+-\d+$/', $ip_string)) { //v5 32 bit int style format - list($start, $end) = explode('-', $ip_string); - $start = long2ip($start); - $end = long2ip($end); - $ip_string = "{$start}-{$end}"; - } - - return $ip_string; - } - - /** - * @return string|null - */ - public function getIPString() { - return $this->ip_string; - } - - /** - * @param string|null $ip_string - */ - public function setIPString($ip_string) { - $this->ip_string = $this->_sanitizeIPRange($ip_string); - } -} - -/** - * The function of this class is to detect admin users created via direct access to the database (in other words, not - * through WordPress). - */ -class wfAdminUserMonitor { - - protected $currentAdminList = array(); - - public function isEnabled() { - $options = wfScanner::shared()->scanOptions(); - $enabled = $options['scansEnabled_suspiciousAdminUsers']; - if ($enabled && is_multisite()) { - if (!function_exists('wp_is_large_network')) { - require_once(ABSPATH . WPINC . '/ms-functions.php'); - } - $enabled = !wp_is_large_network('sites') && !wp_is_large_network('users'); - } - return $enabled; - } - - /** - * - */ - public function createInitialList() { - $admins = $this->getCurrentAdmins(); - $adminUserList = array(); - foreach ($admins as $id => $user) { - $adminUserList[$id] = 1; - } - wfConfig::set_ser('adminUserList', $adminUserList); - } - - /** - * @param int $userID - */ - public function grantSuperAdmin($userID = null) { - if ($userID) { - $this->addAdmin($userID); - } - } - - /** - * @param int $userID - */ - public function revokeSuperAdmin($userID = null) { - if ($userID) { - $this->removeAdmin($userID); - } - } - - /** - * @param int $ID - * @param mixed $role - * @param mixed $old_roles - */ - public function updateToUserRole($ID = null, $role = null, $old_roles = null) { - $admins = $this->getLoggedAdmins(); - if ($role !== 'administrator' && array_key_exists($ID, $admins)) { - $this->removeAdmin($ID); - } else if ($role === 'administrator') { - $this->addAdmin($ID); - } - } - - /** - * @return array|bool - */ - public function checkNewAdmins() { - $loggedAdmins = $this->getLoggedAdmins(); - $admins = $this->getCurrentAdmins(); - $suspiciousAdmins = array(); - foreach ($admins as $adminID => $v) { - if (!array_key_exists($adminID, $loggedAdmins)) { - $suspiciousAdmins[] = $adminID; - } - } - return $suspiciousAdmins ? $suspiciousAdmins : false; - } - - /** - * Checks if the supplied user ID is suspicious. - * - * @param int $userID - * @return bool - */ - public function isAdminUserLogged($userID) { - $loggedAdmins = $this->getLoggedAdmins(); - return array_key_exists($userID, $loggedAdmins); - } - - /** - * @param bool $forceReload - * @return array - */ - public function getCurrentAdmins($forceReload = false) { - if (empty($this->currentAdminList) || $forceReload) { - require_once(ABSPATH . WPINC . '/user.php'); - if (is_multisite()) { - if (function_exists("get_sites")) { - $sites = get_sites(array( - 'network_id' => null, - )); - } - else { - $sites = wp_get_sites(array( - 'network_id' => null, - )); - } - } else { - $sites = array(array( - 'blog_id' => get_current_blog_id(), - )); - } - - // not very efficient, but the WordPress API doesn't provide a good way to do this. - $this->currentAdminList = array(); - foreach ($sites as $siteRow) { - $siteRowArray = (array) $siteRow; - $user_query = new WP_User_Query(array( - 'blog_id' => $siteRowArray['blog_id'], - 'role' => 'administrator', - )); - $users = $user_query->get_results(); - if (is_array($users)) { - /** @var WP_User $user */ - foreach ($users as $user) { - $this->currentAdminList[$user->ID] = $user; - } - } - } - - // Add any super admins that aren't also admins on a network - $superAdmins = get_super_admins(); - foreach ($superAdmins as $userLogin) { - $user = get_user_by('login', $userLogin); - if ($user) { - $this->currentAdminList[$user->ID] = $user; - } - } - } - - return $this->currentAdminList; - } - - public function getLoggedAdmins() { - $loggedAdmins = wfConfig::get_ser('adminUserList', false); - if (!is_array($loggedAdmins)) { - $this->createInitialList(); - $loggedAdmins = wfConfig::get_ser('adminUserList', false); - } - if (!is_array($loggedAdmins)) { - $loggedAdmins = array(); - } - return $loggedAdmins; - } - - /** - * @param int $userID - */ - public function addAdmin($userID) { - $loggedAdmins = $this->getLoggedAdmins(); - if (!array_key_exists($userID, $loggedAdmins)) { - $loggedAdmins[$userID] = 1; - wfConfig::set_ser('adminUserList', $loggedAdmins); - } - } - - /** - * @param int $userID - */ - public function removeAdmin($userID) { - $loggedAdmins = $this->getLoggedAdmins(); - if (array_key_exists($userID, $loggedAdmins) && !array_key_exists($userID, $this->getCurrentAdmins())) { - unset($loggedAdmins[$userID]); - wfConfig::set_ser('adminUserList', $loggedAdmins); - } - } -} - -/** - * Represents a request record - * - * @property int $id - * @property float $attackLogTime - * @property float $ctime - * @property string $IP - * @property bool $jsRun - * @property int $statusCode - * @property bool $isGoogle - * @property int $userID - * @property string $URL - * @property string $referer - * @property string $UA - * @property string $action - * @property string $actionDescription - * @property string $actionData - */ -class wfRequestModel extends wfModel { - - private static $actionDataEncodedParams = array( - 'paramKey', - 'paramValue', - 'path', - ); - - /** - * @param $actionData - * @return mixed|string|void - */ - public static function serializeActionData($actionData, $optionalKeys = array(), $maxLength = 65535) { - if (is_array($actionData)) { - foreach (self::$actionDataEncodedParams as $key) { - if (array_key_exists($key, $actionData)) { - $actionData[$key] = base64_encode($actionData[$key]); - } - } - } - do { - $serialized = json_encode($actionData, JSON_UNESCAPED_SLASHES); - $length = strlen($serialized); - if ($length <= $maxLength) - return $serialized; - $excess = $length - $maxLength; - $truncated = false; - foreach ($optionalKeys as $key) { - if (array_key_exists($key, $actionData)) { - $fieldValue = $actionData[$key]; - $fieldLength = strlen($fieldValue); - $truncatedLength = min($fieldLength, $excess); - $truncated = true; - if ($truncatedLength > 0) { - $actionData[$key] = substr($fieldValue, 0, -$truncatedLength); - $excess -= $truncatedLength; - } - else { - unset($actionData[$key]); - break; - } - } - } - } while ($truncated); - return null; - } - - /** - * @param $actionDataJSON - * @return mixed|string|void - */ - public static function unserializeActionData($actionDataJSON) { - $actionData = json_decode($actionDataJSON, true); - if (is_array($actionData)) { - foreach (self::$actionDataEncodedParams as $key) { - if (array_key_exists($key, $actionData)) { - $actionData[$key] = base64_decode($actionData[$key]); - } - } - } - else { - $actionData = array(); - } - return $actionData; - } - - private $columns = array( - 'id', - 'attackLogTime', - 'ctime', - 'IP', - 'jsRun', - 'statusCode', - 'isGoogle', - 'userID', - 'URL', - 'referer', - 'UA', - 'action', - 'actionDescription', - 'actionData', - ); - - public function getIDColumn() { - return 'id'; - } - - public function getTable() { - return wfDB::networkTable('wfHits'); - } - - public function hasColumn($column) { - return in_array($column, $this->columns); - } - - public function save() { - $sapi = @php_sapi_name(); - if ($sapi == "cli") { - return false; - } - - return parent::save(); - } -} - - -class wfLiveTrafficQuery { - - protected $validParams = array( - 'id' => 'h.id', - 'ctime' => 'h.ctime', - 'ip' => 'h.ip', - 'jsrun' => 'h.jsrun', - 'statuscode' => 'h.statuscode', - 'isgoogle' => 'h.isgoogle', - 'userid' => 'h.userid', - 'url' => 'h.url', - 'referer' => 'h.referer', - 'ua' => 'h.ua', - 'action' => 'h.action', - 'actiondescription' => 'h.actiondescription', - 'actiondata' => 'h.actiondata', - - // wfLogins - 'user_login' => 'u.user_login', - 'username' => 'l.username', - ); - - /** @var wfLiveTrafficQueryFilterCollection */ - private $filters = array(); - - /** @var wfLiveTrafficQueryGroupBy */ - private $groupBy; - /** - * @var float|null - */ - private $startDate; - /** - * @var float|null - */ - private $endDate; - /** - * @var int - */ - private $limit; - /** - * @var int - */ - private $offset; - - private $tableName; - - /** @var wfLog */ - private $wfLog; - - /** - * wfLiveTrafficQuery constructor. - * - * @param wfLog $wfLog - * @param wfLiveTrafficQueryFilterCollection $filters - * @param wfLiveTrafficQueryGroupBy $groupBy - * @param float $startDate - * @param float $endDate - * @param int $limit - * @param int $offset - */ - public function __construct($wfLog, $filters = null, $groupBy = null, $startDate = null, $endDate = null, $limit = 20, $offset = 0) { - $this->wfLog = $wfLog; - $this->filters = $filters; - $this->groupBy = $groupBy; - $this->startDate = $startDate; - $this->endDate = $endDate; - $this->limit = $limit; - $this->offset = $offset; - } - - /** - * @return array|null|object - */ - public function execute() { - global $wpdb; - $delayedHumanBotFiltering = false; - $humanOnly = false; - $sql = $this->buildQuery($delayedHumanBotFiltering, $humanOnly); - $results = $wpdb->get_results($sql, ARRAY_A); - - if ($delayedHumanBotFiltering) { - $browscap = wfBrowscap::shared(); - foreach ($results as $index => $res) { - if ($res['UA']) { - $b = $browscap->getBrowser($res['UA']); - $jsRun = wfUtils::truthyToBoolean($res['jsRun']); - if ($b && $b['Parent'] != 'DefaultProperties') { - $jsRun = wfUtils::truthyToBoolean($res['jsRun']); - if (!wfConfig::liveTrafficEnabled() && !$jsRun) { - $jsRun = !(isset($b['Crawler']) && $b['Crawler']); - } - } - - if (!$humanOnly && $jsRun || $humanOnly && !$jsRun) { - unset($results[$index]); - } - } - } - } - - $this->getWFLog()->processGetHitsResults('', $results); - - $verifyCrawlers = false; - if ($this->filters !== null && count($this->filters->getFilters()) > 0) { - $filters = $this->filters->getFilters(); - foreach ($filters as $f) { - if (strtolower($f->getParam()) == "isgoogle") { - $verifyCrawlers = true; - break; - } - } - } - - foreach ($results as $key => &$row) { - if ($row['isGoogle'] && $verifyCrawlers) { - if (!wfCrawl::isVerifiedGoogleCrawler($row['IP'], $row['UA'])) { - unset($results[$key]); //foreach copies $results and iterates on the copy, so it is safe to mutate $results within the loop - continue; - } - } - - $row['actionData'] = $row['actionData'] === null ? array() : (array) json_decode($row['actionData'], true); - } - return array_values($results); - } - - /** - * @param mixed $delayedHumanBotFiltering Whether or not human/bot filtering should be applied in PHP rather than SQL. - * @param mixed $humanOnly When using delayed filtering, whether to show only humans or only bots. - * - * @return string - * @throws wfLiveTrafficQueryException - */ - public function buildQuery(&$delayedHumanBotFiltering, &$humanOnly) { - global $wpdb; - $filters = $this->getFilters(); - $groupBy = $this->getGroupBy(); - $startDate = $this->getStartDate(); - $endDate = $this->getEndDate(); - $limit = absint($this->getLimit()); - $offset = absint($this->getOffset()); - - $wheres = array("h.action != 'logged:waf'", "h.action != 'scan:detectproxy'"); - if ($startDate) { - $wheres[] = $wpdb->prepare('h.ctime > %f', $startDate); - } - if ($endDate) { - $wheres[] = $wpdb->prepare('h.ctime < %f', $endDate); - } - - if ($filters instanceof wfLiveTrafficQueryFilterCollection) { - if (!wfConfig::liveTrafficEnabled()) { - $individualFilters = $filters->getFilters(); - foreach ($individualFilters as $index => $f) { - if ($f->getParam() == 'jsRun' && $delayedHumanBotFiltering !== null && $humanOnly !== null) { - $humanOnly = wfUtils::truthyToBoolean($f->getValue()); - if ($f->getOperator() == '!=') { - $humanOnly = !$humanOnly; - } - $delayedHumanBotFiltering = true; - unset($individualFilters[$index]); - } - } - $filters->setFilters($individualFilters); - } - - $filtersSQL = $filters->toSQL(); - if ($filtersSQL) { - $wheres[] = $filtersSQL; - } - } - - $orderBy = 'ORDER BY h.ctime DESC'; - $select = ', l.username'; - $groupBySQL = ''; - if ($groupBy && $groupBy->validate()) { - $groupBySQL = "GROUP BY {$groupBy->getParam()}"; - $orderBy = 'ORDER BY hitCount DESC'; - $select .= ', COUNT(h.id) as hitCount, MAX(h.ctime) AS lastHit, u.user_login AS username'; - - if ($groupBy->getParam() == 'user_login') { - $wheres[] = 'user_login IS NOT NULL'; - } - else if ($groupBy->getParam() == 'action') { - $wheres[] = '(statusCode = 403 OR statusCode = 503)'; - } - } - - $where = join(' AND ', $wheres); - if ($where) { - $where = 'WHERE ' . $where; - } - if (!$limit || $limit > 1000) { - $limit = 20; - } - $limitSQL = $wpdb->prepare('LIMIT %d, %d', $offset, $limit); - - $table_wfLogins = wfDB::networkTable('wfLogins'); - $sql = <<getTableName()} h -LEFT JOIN {$wpdb->users} u on h.userID = u.ID -LEFT JOIN {$table_wfLogins} l on h.id = l.hitID -$where -$groupBySQL -$orderBy -$limitSQL -SQL; - - return $sql; - } - - /** - * @param $param - * @return bool - */ - public function isValidParam($param) { - return array_key_exists(strtolower($param), $this->validParams); - } - - /** - * @param $getParam - * @return bool|string - */ - public function getColumnFromParam($getParam) { - $getParam = strtolower($getParam); - if (array_key_exists($getParam, $this->validParams)) { - return $this->validParams[$getParam]; - } - return false; - } - - /** - * @return wfLiveTrafficQueryFilterCollection - */ - public function getFilters() { - return $this->filters; - } - - /** - * @param wfLiveTrafficQueryFilterCollection $filters - */ - public function setFilters($filters) { - $this->filters = $filters; - } - - /** - * @return float|null - */ - public function getStartDate() { - return $this->startDate; - } - - /** - * @param float|null $startDate - */ - public function setStartDate($startDate) { - $this->startDate = $startDate; - } - - /** - * @return float|null - */ - public function getEndDate() { - return $this->endDate; - } - - /** - * @param float|null $endDate - */ - public function setEndDate($endDate) { - $this->endDate = $endDate; - } - - /** - * @return wfLiveTrafficQueryGroupBy - */ - public function getGroupBy() { - return $this->groupBy; - } - - /** - * @param wfLiveTrafficQueryGroupBy $groupBy - */ - public function setGroupBy($groupBy) { - $this->groupBy = $groupBy; - } - - /** - * @return int - */ - public function getLimit() { - return $this->limit; - } - - /** - * @param int $limit - */ - public function setLimit($limit) { - $this->limit = $limit; - } - - /** - * @return int - */ - public function getOffset() { - return $this->offset; - } - - /** - * @param int $offset - */ - public function setOffset($offset) { - $this->offset = $offset; - } - - /** - * @return string - */ - public function getTableName() { - if ($this->tableName === null) { - $this->tableName = wfDB::networkTable('wfHits'); - } - return $this->tableName; - } - - /** - * @param string $tableName - */ - public function setTableName($tableName) { - $this->tableName = $tableName; - } - - /** - * @return wfLog - */ - public function getWFLog() { - return $this->wfLog; - } - - /** - * @param wfLog $wfLog - */ - public function setWFLog($wfLog) { - $this->wfLog = $wfLog; - } -} - -class wfLiveTrafficQueryFilterCollection { - - private $filters = array(); - - /** - * wfLiveTrafficQueryFilterCollection constructor. - * - * @param array $filters - */ - public function __construct($filters = array()) { - $this->filters = $filters; - } - - public function toSQL() { - $params = array(); - $sql = ''; - $filters = $this->getFilters(); - if ($filters) { - /** @var wfLiveTrafficQueryFilter $filter */ - foreach ($filters as $filter) { - $params[$filter->getParam()][] = $filter; - } - } - - foreach ($params as $param => $filters) { - // $sql .= '('; - $filtersSQL = ''; - foreach ($filters as $filter) { - $filterSQL = $filter->toSQL(); - if ($filterSQL) { - $filtersSQL .= $filterSQL . ' OR '; - } - } - if ($filtersSQL) { - $sql .= '(' . substr($filtersSQL, 0, -4) . ') AND '; - } - } - if ($sql) { - $sql = substr($sql, 0, -5); - } - return $sql; - } - - public function addFilter($filter) { - $this->filters[] = $filter; - } - - /** - * @return array - */ - public function getFilters() { - return $this->filters; - } - - /** - * @param array $filters - */ - public function setFilters($filters) { - $this->filters = $filters; - } -} - -class wfLiveTrafficQueryFilter { - - private $param; - private $operator; - private $value; - - protected $validOperators = array( - '=', - '!=', - 'contains', - 'match', - 'hregexp', - 'hnotregexp', - ); - - /** - * @var wfLiveTrafficQuery - */ - private $query; - - /** - * wfLiveTrafficQueryFilter constructor. - * - * @param wfLiveTrafficQuery $query - * @param string $param - * @param string $operator - * @param string $value - */ - public function __construct($query, $param, $operator, $value) { - $this->query = $query; - $this->param = $param; - $this->operator = $operator; - $this->value = $value; - } - - /** - * @return string|void - */ - public function toSQL() { - $sql = ''; - if ($this->validate()) { - /** @var wpdb $wpdb */ - global $wpdb; - $operator = $this->getOperator(); - $param = $this->getQuery()->getColumnFromParam($this->getParam()); - if (!$param) { - return $sql; - } - $value = $this->getValue(); - switch ($operator) { - case 'contains': - $like = addcslashes($value, '_%\\'); - $sql = $wpdb->prepare("$param LIKE %s", "%$like%"); - break; - - case 'match': - $sql = $wpdb->prepare("$param LIKE %s", $value); - break; - - case 'hregexp': - $sql = $wpdb->prepare("HEX($param) REGEXP %s", $value); - break; - - case 'hnotregexp': - $sql = $wpdb->prepare("HEX($param) NOT REGEXP %s", $value); - break; - - default: - $sql = $wpdb->prepare("$param $operator %s", $value); - break; - } - } - return $sql; - } - - /** - * @return bool - */ - public function validate() { - $valid = $this->isValidParam($this->getParam()) && $this->isValidOperator($this->getOperator()); - if (defined('WP_DEBUG') && WP_DEBUG) { - if (!$valid) { - throw new wfLiveTrafficQueryException("Invalid param/operator [{$this->getParam()}]/[{$this->getOperator()}] passed to " . get_class($this)); - } - return true; - } - return $valid; - } - - /** - * @param string $param - * @return bool - */ - public function isValidParam($param) { - return $this->getQuery() && $this->getQuery()->isValidParam($param); - } - - /** - * @param string $operator - * @return bool - */ - public function isValidOperator($operator) { - return in_array($operator, $this->validOperators); - } - - /** - * @return mixed - */ - public function getParam() { - return $this->param; - } - - /** - * @param mixed $param - */ - public function setParam($param) { - $this->param = $param; - } - - /** - * @return mixed - */ - public function getOperator() { - return $this->operator; - } - - /** - * @param mixed $operator - */ - public function setOperator($operator) { - $this->operator = $operator; - } - - /** - * @return mixed - */ - public function getValue() { - return $this->value; - } - - /** - * @param mixed $value - */ - public function setValue($value) { - $this->value = $value; - } - - /** - * @return wfLiveTrafficQuery - */ - public function getQuery() { - return $this->query; - } - - /** - * @param wfLiveTrafficQuery $query - */ - public function setQuery($query) { - $this->query = $query; - } -} - -class wfLiveTrafficQueryGroupBy { - - private $param; - - /** - * @var wfLiveTrafficQuery - */ - private $query; - - /** - * wfLiveTrafficQueryGroupBy constructor. - * - * @param wfLiveTrafficQuery $query - * @param string $param - */ - public function __construct($query, $param) { - $this->query = $query; - $this->param = $param; - } - - /** - * @return bool - * @throws wfLiveTrafficQueryException - */ - public function validate() { - $valid = $this->isValidParam($this->getParam()); - if (defined('WP_DEBUG') && WP_DEBUG) { - if (!$valid) { - throw new wfLiveTrafficQueryException("Invalid param [{$this->getParam()}] passed to " . get_class($this)); - } - return true; - } - return $valid; - } - - /** - * @param string $param - * @return bool - */ - public function isValidParam($param) { - return $this->getQuery() && $this->getQuery()->isValidParam($param); - } - - /** - * @return wfLiveTrafficQuery - */ - public function getQuery() { - return $this->query; - } - - /** - * @param wfLiveTrafficQuery $query - */ - public function setQuery($query) { - $this->query = $query; - } - - /** - * @return mixed - */ - public function getParam() { - return $this->param; - } - - /** - * @param mixed $param - */ - public function setParam($param) { - $this->param = $param; - } - -} - - -class wfLiveTrafficQueryException extends Exception { - -} - -class wfErrorLogHandler { - public static function getErrorLogs($deepSearch = false) { - static $errorLogs = null; - - if ($errorLogs === null) { - $searchPaths = array(ABSPATH, ABSPATH . 'wp-admin', ABSPATH . 'wp-content'); - - $homePath = wfUtils::getHomePath(); - if (!in_array($homePath, $searchPaths)) { - $searchPaths[] = $homePath; - } - - $errorLogPath = ini_get('error_log'); - if (!empty($errorLogPath) && !in_array($errorLogPath, $searchPaths)) { - $searchPaths[] = $errorLogPath; - } - - $errorLogs = array(); - foreach ($searchPaths as $s) { - $errorLogs = array_merge($errorLogs, self::_scanForLogs($s, $deepSearch)); - } - } - return $errorLogs; - } - - private static function _scanForLogs($path, $deepSearch = false) { - static $processedFolders = array(); //Protection for endless loops caused by symlinks - if (is_file($path)) { - $file = basename($path); - if (preg_match('#(?:^php_errorlog$|error_log(\-\d+)?$|\.log$)#i', $file)) { - return array($path => is_readable($path)); - } - return array(); - } - - $path = untrailingslashit($path); - $contents = @scandir($path); - if (!is_array($contents)) { - return array(); - } - - $processedFolders[$path] = true; - $errorLogs = array(); - foreach ($contents as $name) { - if ($name == '.' || $name == '..') { continue; } - $testPath = $path . DIRECTORY_SEPARATOR . $name; - if (!array_key_exists($testPath, $processedFolders)) { - if ((is_dir($testPath) && $deepSearch) || !is_dir($testPath)) { - $errorLogs = array_merge($errorLogs, self::_scanForLogs($testPath, $deepSearch)); - } - } - } - return $errorLogs; - } - - public static function outputErrorLog($path) { - $errorLogs = self::getErrorLogs(); - if (!isset($errorLogs[$path])) { //Only allow error logs we've identified - global $wp_query; - $wp_query->set_404(); - status_header(404); - nocache_headers(); - - $template = get_404_template(); - if ($template && file_exists($template)) { - include($template); - } - exit; - } - - $fh = @fopen($path, 'r'); - if (!$fh) { - status_header(503); - nocache_headers(); - echo "503 Service Unavailable"; - exit; - } - - $headersOutputted = false; - while (!feof($fh)) { - $data = fread($fh, 1 * 1024 * 1024); //read 1 megs max per chunk - if ($data === false) { //Handle the error where the file was reported readable but we can't actually read it - status_header(503); - nocache_headers(); - echo "503 Service Unavailable"; - exit; - } - - if (!$headersOutputted) { - header('Content-Type: text/plain'); - header('Content-Disposition: attachment; filename="' . basename($path)); - $headersOutputted = true; - } - echo $data; - } - exit; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfMD5BloomFilter.php b/wp/wp-content/plugins/wordfence/lib/wfMD5BloomFilter.php deleted file mode 100644 index 1b82bec9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfMD5BloomFilter.php +++ /dev/null @@ -1,133 +0,0 @@ -m != $bf2->m) throw new Exception('Unable to merge due to vector difference.'); - if ($bf1->k != $bf2->k) throw new Exception('Unable to merge due to hash count difference.'); - $length = strlen($bfout->bit_array); - if ($union){ - $bfout->bit_array = $bf1->bit_array | $bf2->bit_array; - $bfout->n = $bf1->n + $bf2->n; - } else { - $bfout->bit_array = $bf1->bit_array & $bf2->bit_array; - $bfout->n = abs($bf1->n - $bf2->n); - } - } - public static function createFromProbability($n, $p){ - if ($p <= 0 || $p >= 1) throw new Exception('Invalid false positive rate requested.'); - if ($n <= 0) throw new Exception('Invalid capacity requested.'); - $k = floor(log(1/$p,2)); - $m = pow(2,ceil(log(-$n*log($p)/pow(log(2),2),2))); //approximate estimator method - return new self($m,$k); - } - public static function getUnion($bf1,$bf2){ - $bf = new self($bf1->m,$bf1->k,$bf1->hash); - self::merge($bf1,$bf2,$bf,true); - return $bf; - } - public static function getIntersection($bf1,$bf2){ - $bf = new self($bf1->m,$bf1->k,$bf1->hash); - self::merge($bf1,$bf2,$bf,false); - return $bf; - } - private $n = 0; // # of entries - private $m; // # of bits in array - private $k; // # of hash functions - private $k2; - private $mask; - private $bit_array; // data structure - public function __construct($m, $k){ - if ($m < 8) throw new Exception('The bit array length must be at least 8 bits.'); - if (($m & ($m - 1)) !== 0) throw new Exception('The bit array length must be power of 2.'); - if ($m > 65536) throw new Exception('The maximum data structure size is 8KB.'); - if ($k > 8) throw new Exception('The maximum bits to set is 8.'); - $this->m = $m; - $this->k = $k; - $this->k2 = $k * 2; - $address_bits = (int)log($m,2); - $this->mask = (1 << $address_bits) - 8; - $this->bit_array = (binary)(str_repeat("\0",$this->getArraySize(true))); - } - public function __sleep() { - return array('n', 'm', 'k', 'k2', 'mask', 'bit_array'); - } - public function calculateProbability($n = 0){ - return pow(1-pow(1-1/$this->m,$this->k*($n ? $n : $this->n)),$this->k); - } - public function calculateCapacity($p){ - return floor($this->m*log(2)/log($p,1-pow(1-1/$this->m,$this->m*log(2)))); - } - public function getElementCount(){ - return $this->n; - } - public function getArraySize($bytes = false){ - return $this->m >> ($bytes ? 3 : 0); - } - public function getHashCount(){ - return $this->k; - } - public function getInfo($p = null){ - $units = array('','K','M','G','T','P','E','Z','Y'); - $M = $this->getArraySize(true); - $magnitude = intval(floor(log($M,1024))); - $unit = $units[$magnitude]; - $M /= pow(1024,$magnitude); - return 'Allocated '.$this->getArraySize().' bits ('.$M.' '.$unit.'Bytes)'.PHP_EOL. - 'Using '.$this->getHashCount(). ' (16b) hashes'.PHP_EOL. - 'Contains '.$this->getElementCount().' elements'.PHP_EOL. - (isset($p) ? 'Capacity of '.number_format($this->calculateCapacity($p)).' (p='.$p.')'.PHP_EOL : ''); - } - public function add($key){ - $hash = md5($key,true); - for ($index = 0; $index < $this->k2; $index++){ - $hash_sub = (ord($hash[$index++]) << 8) | ord($hash[$index]); - $word = ($hash_sub & $this->mask) >> 3; - $this->bit_array[$word] = $this->bit_array[$word] | chr(1 << ($hash_sub & 7)); - } - $this->n++; - } - public function contains($key){ - $hash = md5($key,true); - for ($index = 0; $index < $this->k2; $index++){ - $hash_sub = (ord($hash[$index++]) << 8) | ord($hash[$index]); - if ((ord($this->bit_array[($hash_sub & $this->mask) >> 3]) & (1 << ($hash_sub & 7))) === 0) return false; - } - return true; - } - public function unionWith($bf){ - self::merge($this,$bf,$this,true); - } - public function intersectWith($bf){ - self::merge($this,$bf,$this,false); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfModuleController.php b/wp/wp-content/plugins/wordfence/lib/wfModuleController.php deleted file mode 100644 index 2ff0a319..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfModuleController.php +++ /dev/null @@ -1,38 +0,0 @@ -_optionIndexes = array(); - $this->_optionBlocks = array(); - } - - public function __get($key) { - switch ($key) { - case 'optionIndexes': - return $this->_optionIndexes; - case 'optionBlocks': - return $this->_optionBlocks; - } - - throw new OutOfBoundsException('Invalid key'); - } - - public function addOptionIndex($target, $text) { - $this->_optionIndexes[$target] = $text; - } - - public function addOptionBlock($html) { - $this->_optionBlocks[] = $html; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfNotification.php b/wp/wp-content/plugins/wordfence/lib/wfNotification.php deleted file mode 100644 index 1fbffda9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfNotification.php +++ /dev/null @@ -1,162 +0,0 @@ -get_results($wpdb->prepare("SELECT * FROM {$table_wfNotifications} WHERE `new` = 1 AND `ctime` > %d ORDER BY `priority` ASC, `ctime` DESC", $since), ARRAY_A); - $notifications = array(); - foreach ($rawNotifications as $raw) { - $notifications[] = new wfNotification($raw['id'], $raw['priority'], $raw['html'], $raw['category'], $raw['ctime'], json_decode($raw['links'], true), true); - } - return $notifications; - } - - public static function getNotificationForID($id) { - global $wpdb; - $table_wfNotifications = wfDB::networkTable('wfNotifications'); - $rawNotifications = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$table_wfNotifications} WHERE `id` = %s ORDER BY `priority` ASC, `ctime` DESC", $id), ARRAY_A); - if (count($rawNotifications) == 1) { - $raw = $rawNotifications[0]; - return new wfNotification($raw['id'], $raw['priority'], $raw['html'], $raw['category'], $raw['ctime'], json_decode($raw['links'], true), true); - } - return null; - } - - public static function getNotificationForCategory($category, $requireNew = true) { - global $wpdb; - $table_wfNotifications = wfDB::networkTable('wfNotifications'); - $rawNotifications = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$table_wfNotifications} WHERE " . ($requireNew ? '`new` = 1 AND ' : '') . "`category` = %s ORDER BY `priority` ASC, `ctime` DESC LIMIT 1", $category), ARRAY_A); - if (count($rawNotifications) == 1) { - $raw = $rawNotifications[0]; - return new wfNotification($raw['id'], $raw['priority'], $raw['html'], $raw['category'], $raw['ctime'], json_decode($raw['links'], true), true); - } - return null; - } - - public static function reconcileNotificationsWithOptions() { - $notification_updatesNeeded = wfConfig::get('notification_updatesNeeded'); - $notification_securityAlerts = wfConfig::get('notification_securityAlerts') || !wfConfig::p(); - $notification_promotions = wfConfig::get('notification_promotions') || !wfConfig::p(); - $notification_blogHighlights = wfConfig::get('notification_blogHighlights') || !wfConfig::p(); - $notification_productUpdates = wfConfig::get('notification_productUpdates') || !wfConfig::p(); - $notification_scanStatus = wfConfig::get('notification_scanStatus'); - - $notifications = self::notifications(); - foreach ($notifications as $n) { - $category = $n->category; - - if (preg_match('/^release/i', $category) && !$notification_productUpdates) { $n->markAsRead(); } - if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { $n->markAsRead(); } - if (preg_match('/^alert/i', $category) && !$notification_securityAlerts) { $n->markAsRead(); } - if (preg_match('/^promo/i', $category) && !$notification_promotions) { $n->markAsRead(); } - - switch ($category) { - case 'wfplugin_scan': - if (!$notification_scanStatus) { $n->markAsRead(); } - break; - case 'wfplugin_updates': - if (!$notification_updatesNeeded) { $n->markAsRead(); } - break; - case 'wfplugin_keyconflict': - default: - //Allow it - break; - } - } - } - - public function __construct($id, $priority, $html, $category = null, $ctime = null, $links = null, $memoryOnly = false) { - if ($id === null) { - $id = 'site-' . wfUtils::base32_encode(pack('I', wfConfig::atomicInc('lastNotificationID'))); - } - - if ($category === null) { - $category = ''; - } - - if ($ctime === null) { - $ctime = time(); - } - - if (!is_array($links)) { - $links = array(); - } - - $this->_id = $id; - $this->_category = $category; - $this->_priority = $priority; - $this->_ctime = $ctime; - $this->_html = $html; - $this->_links = $links; - - global $wpdb; - if (!$memoryOnly) { - $linksJSON = json_encode($links); - - $notification_updatesNeeded = wfConfig::get('notification_updatesNeeded'); - $notification_securityAlerts = wfConfig::get('notification_securityAlerts') || !wfConfig::p(); - $notification_promotions = wfConfig::get('notification_promotions') || !wfConfig::p(); - $notification_blogHighlights = wfConfig::get('notification_blogHighlights') || !wfConfig::p(); - $notification_productUpdates = wfConfig::get('notification_productUpdates') || !wfConfig::p(); - $notification_scanStatus = wfConfig::get('notification_scanStatus'); - - if (preg_match('/^release/i', $category) && !$notification_productUpdates) { return; } - if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { return; } - if (preg_match('/^alert/i', $category) && !$notification_securityAlerts) { return; } - if (preg_match('/^promo/i', $category) && !$notification_promotions) { return; } - - switch ($category) { - case 'wfplugin_scan': - if (!$notification_scanStatus) { return; } - break; - case 'wfplugin_updates': - if (!$notification_updatesNeeded) { return; } - break; - case 'wfplugin_keyconflict': - default: - //Allow it - break; - } - - $table_wfNotifications = wfDB::networkTable('wfNotifications'); - if (!empty($category)) { - $existing = self::getNotificationForCategory($category); - if ($existing) { - $wpdb->query($wpdb->prepare("UPDATE {$table_wfNotifications} SET priority = %d, ctime = %d, html = %s, links = %s WHERE id = %s", $priority, $ctime, $html, $linksJSON, $existing->id)); - return; - } - } - - $wpdb->query($wpdb->prepare("INSERT IGNORE INTO {$table_wfNotifications} (id, category, priority, ctime, html, links) VALUES (%s, %s, %d, %d, %s, %s)", $id, $category, $priority, $ctime, $html, $linksJSON)); - } - } - - public function __get($key){ - if ($key == 'id') { return $this->_id; } - else if ($key == 'category') { return $this->_category; } - else if ($key == 'priority') { return $this->_priority; } - else if ($key == 'ctime') { return $this->_ctime; } - else if ($key == 'html') { return $this->_html; } - else if ($key == 'links') { return $this->_links; } - throw new InvalidArgumentException(); - } - - public function markAsRead() { - global $wpdb; - $table_wfNotifications = wfDB::networkTable('wfNotifications'); - $wpdb->query($wpdb->prepare("UPDATE {$table_wfNotifications} SET `new` = 0 WHERE `id` = %s", $this->_id)); - } -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfOnboardingController.php b/wp/wp-content/plugins/wordfence/lib/wfOnboardingController.php deleted file mode 100644 index f88de98a..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfOnboardingController.php +++ /dev/null @@ -1,199 +0,0 @@ - - add_action('pre_current_active_plugins', 'wfOnboardingController::_pre_plugins'); //Called immediately after
- add_action('admin_enqueue_scripts', 'wfOnboardingController::_enqueue_scripts'); - } - - /** - * Enqueues the scripts and styles we need globally on the backend for onboarding. - */ - public static function _enqueue_scripts() { - $willShowAnyPluginOnboarding = (self::shouldShowAttempt1() || self::shouldShowAttempt2()); - $willShowAnyTour = (self::shouldShowNewTour(self::TOUR_DASHBOARD) || self::shouldShowUpgradeTour(self::TOUR_DASHBOARD) || - self::shouldShowNewTour(self::TOUR_FIREWALL) || self::shouldShowUpgradeTour(self::TOUR_FIREWALL) || - self::shouldShowNewTour(self::TOUR_SCAN) || self::shouldShowUpgradeTour(self::TOUR_SCAN) || - self::shouldShowNewTour(self::TOUR_BLOCKING) || self::shouldShowUpgradeTour(self::TOUR_BLOCKING) || - self::shouldShowNewTour(self::TOUR_LIVE_TRAFFIC) || self::shouldShowUpgradeTour(self::TOUR_LIVE_TRAFFIC) || - self::shouldShowNewTour(self::TOUR_LOGIN_SECURITY) || self::shouldShowUpgradeTour(self::TOUR_LOGIN_SECURITY)); - - if (wfUtils::isAdmin() && - (($willShowAnyPluginOnboarding && preg_match('~(?:^|/)wp-admin(?:/network)?/plugins\.php~i', $_SERVER['REQUEST_URI'])) || - (isset($_GET['page']) && - (preg_match('/^Wordfence/', @$_GET['page']) || preg_match('/^WFLS/', @$_GET['page'])) - ) - ) - ) { - self::enqueue_assets(); - } - } - - public static function enqueue_assets() { - wp_enqueue_style('wordfence-font', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-roboto-font.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-ionicons-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-ionicons.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfenceOnboardingCSS', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-onboarding.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-colorbox-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-colorbox.css'), '', WORDFENCE_VERSION); - wp_enqueue_script('jquery.wfcolorbox', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery.colorbox-min.js'), array('jquery'), WORDFENCE_VERSION); - } - - /** - * Outputs the onboarding overlay if it needs to be shown on the plugins page. - */ - public static function _admin_header() { - $willShowAnyTour = (self::shouldShowNewTour(self::TOUR_DASHBOARD) || self::shouldShowUpgradeTour(self::TOUR_DASHBOARD) || - self::shouldShowNewTour(self::TOUR_FIREWALL) || self::shouldShowUpgradeTour(self::TOUR_FIREWALL) || - self::shouldShowNewTour(self::TOUR_SCAN) || self::shouldShowUpgradeTour(self::TOUR_SCAN) || - self::shouldShowNewTour(self::TOUR_BLOCKING) || self::shouldShowUpgradeTour(self::TOUR_BLOCKING) || - self::shouldShowNewTour(self::TOUR_LIVE_TRAFFIC) || self::shouldShowUpgradeTour(self::TOUR_LIVE_TRAFFIC) || - self::shouldShowNewTour(self::TOUR_LOGIN_SECURITY) || self::shouldShowUpgradeTour(self::TOUR_LOGIN_SECURITY)); - - $screen = get_current_screen(); - if ($screen->base == 'plugins' && self::shouldShowAttempt1()) { - register_shutdown_function('wfOnboardingController::_markAttempt1Shown'); - $freshInstall = wfView::create('onboarding/fresh-install')->render(); - - echo wfView::create('onboarding/overlay', array( - 'contentHTML' => $freshInstall, - ))->render(); - } - else if (preg_match('/wordfence/i', $screen->base) && $willShowAnyTour) { - echo wfView::create('onboarding/tour-overlay')->render(); - } - } - - public static function _markAttempt1Shown() { - wfConfig::set('onboardingAttempt1', self::ONBOARDING_SKIPPED); //Only show it once, default to skipped after outputting the first time - } - - public static function shouldShowAttempt1() { //Overlay on plugin page - if (wfConfig::get('onboardingAttempt3') == self::ONBOARDING_LICENSE) { - return false; - } - - switch (wfConfig::get('onboardingAttempt1')) { - case self::ONBOARDING_LICENSE: - case self::ONBOARDING_SKIPPED: - return false; - } - return true; - } - - public static function _pre_plugins() { - if (self::shouldShowAttempt2()) { - echo wfView::create('onboarding/plugin-header')->render(); - } - } - - private static function needsApiKey() { - $key = wfConfig::get('apiKey'); - return empty($key); - } - - public static function shouldShowAttempt2() { //Header on plugin page - if (wfConfig::get('onboardingAttempt3') == self::ONBOARDING_LICENSE) { - return false; - } - - return !wfConfig::get('onboardingAttempt2') && self::needsApiKey(); - } - - public static function shouldShowAttempt3($dismissable = false) { - if (self::needsApiKey()) { - if (!$dismissable) - return true; - $delayedAt = (int) wfConfig::get('onboardingDelayedAt', 0); - if (time() - $delayedAt > 43200 /*12 hours in seconds*/) - return true; - } - return false; - } - - /** - * Whether or not to pop up attempt 3 at page load or wait for user interaction. - * - * @return bool - */ - public static function shouldShowAttempt3Automatically() { - static $_shouldShowAttempt3Automatically = null; - if ($_shouldShowAttempt3Automatically !== null) { //We cache this so the answer remains the same for the whole request - return $_shouldShowAttempt3Automatically; - } - - if (!self::shouldShowAttempt3()) { - $_shouldShowAttempt3Automatically = false; - return false; - } - - return $_shouldShowAttempt3Automatically = self::shouldShowAttempt3(); - } - - public static function willShowNewTour($page) { - $key = 'needsNewTour_' . $page; - return wfConfig::get($key); - } - - public static function shouldShowNewTour($page) { - $key = 'needsNewTour_' . $page; - return (!self::shouldShowAttempt3Automatically() && !wfConfig::get('touppPromptNeeded') && wfConfig::get($key)); - } - - public static function willShowUpgradeTour($page) { - $key = 'needsUpgradeTour_' . $page; - return wfConfig::get($key); - } - - public static function shouldShowUpgradeTour($page) { - $key = 'needsUpgradeTour_' . $page; - return (!self::shouldShowAttempt3Automatically() && !wfConfig::get('touppPromptNeeded') && wfConfig::get($key)); - } - - public static function shouldShowAnyAttempt() { - return self::shouldShowAttempt1() || self::shouldShowAttempt2() || self::shouldShowAttempt3(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfPersistenceController.php b/wp/wp-content/plugins/wordfence/lib/wfPersistenceController.php deleted file mode 100644 index fb70c461..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfPersistenceController.php +++ /dev/null @@ -1,40 +0,0 @@ -_disclosureStates = wfConfig::get_ser('disclosureStates', array()); - } - - /** - * Returns whether the options block is in an active state. - * - * @param $key - * @return bool - */ - public function isActive($key) { - if (!isset($this->_disclosureStates[$key])) { - return false; - } - return !!$this->_disclosureStates[$key]; - } - - /** - * Returns whether the options block has been set. - * - * @param $key - * @return bool - */ - public function isConfigured($key) { - return isset($this->_disclosureStates[$key]); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfRESTAPI.php b/wp/wp-content/plugins/wordfence/lib/wfRESTAPI.php deleted file mode 100644 index f959841b..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfRESTAPI.php +++ /dev/null @@ -1,14 +0,0 @@ -namespace . '/' . $controller->rest_base, '/'); - } - - public function _wfGetURLBase() { - return rtrim($this->namespace, '/' . $this->rest_base, '/'); - } -} -} diff --git a/wp/wp-content/plugins/wordfence/lib/wfScan.php b/wp/wp-content/plugins/wordfence/lib/wfScan.php deleted file mode 100644 index 4bbc7ff9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScan.php +++ /dev/null @@ -1,362 +0,0 @@ -/false based - * on whether or not the cronkey is expired. - * - * @param null $expired - * @return bool|string - */ - private static function storedCronKey(&$expired = null) { - $currentCronKey = wfConfig::get('currentCronKey', false); - if (empty($currentCronKey)) - { - if ($expired !== null) { - $expired = false; - } - return false; - } - - $savedKey = explode(',',$currentCronKey); - if (time() - $savedKey[0] > 86400) { - if ($expired !== null) { - $expired = $savedKey[0]; - } - return $savedKey[1]; - } - - if ($expired !== null) { - $expired = false; - } - return $savedKey[1]; - } - - public static function wfScanMain(){ - self::$peakMemAtStart = memory_get_peak_usage(true); - $db = new wfDB(); - if($db->errorMsg){ - self::errorExit(sprintf(/* translators: Error message. */ __("Could not connect to database to start scan: %s", 'wordfence'), $db->errorMsg)); - } - if(! wordfence::wfSchemaExists()){ - self::errorExit(__("Looks like the Wordfence database tables have been deleted. You can fix this by de-activating and re-activating the Wordfence plugin from your Plugins menu.", 'wordfence')); - } - if( isset( $_GET['test'] ) && $_GET['test'] == '1'){ - echo "WFCRONTESTOK:" . wfConfig::get('cronTestID'); - self::status(4, 'info', __("Cron test received and message printed", 'wordfence')); - exit(); - } - - self::status(4, 'info', __("Scan engine received request.", 'wordfence')); - - /* ----------Starting signature check -------- */ - self::status(4, 'info', __("Verifying start request signature.", 'wordfence')); - if (!isset($_GET['signature']) || !wfScanEngine::verifyStartSignature($_GET['signature'], isset($_GET['isFork']) ? wfUtils::truthyToBoolean($_GET['isFork']) : false, isset($_GET['scanMode']) ? $_GET['scanMode'] : '', isset($_GET['cronKey']) ? $_GET['cronKey'] : '', isset($_GET['remote']) ? wfUtils::truthyToBoolean($_GET['remote']) : false)) { - self::errorExit(__('The signature on the request to start a scan is invalid. Please try again.', 'wordfence')); - } - - /* ----------Starting cronkey check -------- */ - self::status(4, 'info', __("Fetching stored cronkey for comparison.", 'wordfence')); - $expired = false; - $storedCronKey = self::storedCronKey($expired); - $displayCronKey_received = (isset($_GET['cronKey']) ? (preg_match('/^[a-f0-9]+$/i', $_GET['cronKey']) && strlen($_GET['cronKey']) == 32 ? $_GET['cronKey'] : __('[invalid]', 'wordfence')) : __('[none]', 'wordfence')); - $displayCronKey_stored = (!empty($storedCronKey) && !$expired ? $storedCronKey : __('[none]', 'wordfence')); - self::status(4, 'info', sprintf(/* translators: 1. WordPress nonce. 2. WordPress nonce. */ __('Checking cronkey: %1$s (expecting %2$s)', 'wordfence'), $displayCronKey_received, $displayCronKey_stored)); - if (empty($_GET['cronKey'])) { - self::status(4, 'error', __("Wordfence scan script accessed directly, or WF did not receive a cronkey.", 'wordfence')); - echo "If you see this message it means Wordfence is working correctly. You should not access this URL directly. It is part of the Wordfence security plugin and is designed for internal use only."; - exit(); - } - - if ($expired) { - self::errorExit(sprintf( - /* translators: 1. Unix timestamp. 2. WordPress nonce. 3. Unix timestamp. */ - __('The key used to start a scan expired. The value is: %1$s and split is: %2$s and time is: %3$d', 'wordfence'), $expired, $storedCronKey, time())); - } //keys only last 60 seconds and are used within milliseconds of creation - - if (!$storedCronKey) { - wordfence::status(4, 'error', __("Wordfence could not find a saved cron key to start the scan so assuming it started and exiting.", 'wordfence')); - exit(); - } - - self::status(4, 'info', __("Checking saved cronkey against cronkey param", 'wordfence')); - if (!hash_equals($storedCronKey, $_GET['cronKey'])) { - self::errorExit( - sprintf( - /* translators: 1. WordPress nonce (used for debugging). 2. WordPress nonce (used for debugging). 3. WordPress nonce (used for debugging). */ - __('Wordfence could not start a scan because the cron key does not match the saved key. Saved: %1$s Sent: %2$s Current unexploded: %3$s', 'wordfence'), - $storedCronKey, - $_GET['cronKey'], - wfConfig::get('currentCronKey', false) - ) - ); - } - wfConfig::set('currentCronKey', ''); - /* --------- end cronkey check ---------- */ - - wfScanMonitor::logLastSuccess(); - - $scanMode = wfScanner::SCAN_TYPE_STANDARD; - if (isset($_GET['scanMode']) && wfScanner::isValidScanType($_GET['scanMode'])) { - $scanMode = $_GET['scanMode']; - } - $scanController = new wfScanner($scanMode); - - wfConfig::remove('scanStartAttempt'); - $isFork = ($_GET['isFork'] == '1' ? true : false); - - wfScanMonitor::handleStageStart($isFork); - - if(! $isFork){ - self::status(4, 'info', __("Checking if scan is already running", 'wordfence')); - if(! wfUtils::getScanLock()){ - self::errorExit(__("There is already a scan running.", 'wordfence')); - } - - wfIssues::updateScanStillRunning(); - wfConfig::set('wfPeakMemory', 0, wfConfig::DONT_AUTOLOAD); - wfConfig::set('wfScanStartVersion', wfUtils::getWPVersion()); - wfConfig::set('lowResourceScanWaitStep', false); - - if ($scanController->useLowResourceScanning()) { - self::status(1, 'info', __("Using low resource scanning", 'wordfence')); - } - } - self::status(4, 'info', __("Requesting max memory", 'wordfence')); - wfUtils::requestMaxMemory(); - self::status(4, 'info', __("Setting up error handling environment", 'wordfence')); - set_error_handler('wfScan::error_handler', E_ALL); - register_shutdown_function('wfScan::shutdown'); - if(! self::$debugMode){ - ob_start('wfScan::obHandler'); - } - @error_reporting(E_ALL); - wfUtils::iniSet('display_errors','On'); - self::status(4, 'info', __("Setting up scanRunning and starting scan", 'wordfence')); - try { - if ($isFork) { - $scan = wfConfig::get_ser('wfsd_engine', false, false); - if ($scan) { - self::status(4, 'info', sprintf(/* translators: Error message (used for debugging). */ __("Got a true deserialized value back from 'wfsd_engine' with type: %s", 'wordfence'), gettype($scan))); - wfConfig::set('wfsd_engine', '', wfConfig::DONT_AUTOLOAD); - } - else { - self::status(2, 'error', sprintf(/* translators: Error message (used for debugging). */ __("Scan can't continue - stored data not found after a fork. Got type: %s", 'wordfence'), gettype($scan))); - wfConfig::set('wfsd_engine', '', wfConfig::DONT_AUTOLOAD); - wfConfig::set('lastScanCompleted', __('Scan can\'t continue - stored data not found after a fork.', 'wordfence')); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_FORK_FAILED); - wfUtils::clearScanLock(); - self::status(2, 'error', "Scan terminated with error: " . __('Scan can\'t continue - stored data not found after a fork.', 'wordfence')); - self::status(10, 'info', "SUM_KILLED:" . __('Previous scan terminated with an error. See below.', 'wordfence')); - exit(); - } - } - else { - $delay = -1; - $isScheduled = false; - $originalScanStart = wfConfig::get('originalScheduledScanStart', 0); - $lastScanStart = wfConfig::get('lastScheduledScanStart', 0); - $minimumFrequency = ($scanController->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_MANUAL ? 1800 : 43200); - if ($lastScanStart && (time() - $lastScanStart) < $minimumFrequency) { - $isScheduled = true; - - if ($originalScanStart > 0) { - $delay = max($lastScanStart - $originalScanStart, 0); - } - } - - wfIssues::statusPrep(); //Re-initializes all status counters - $scanController->resetStages(); - $scanController->resetSummaryItems(); - - if ($scanMode != wfScanner::SCAN_TYPE_QUICK) { - wordfence::status(1, 'info', __("Contacting Wordfence to initiate scan", 'wordfence')); - $wp_version = wfUtils::getWPVersion(); - $apiKey = wfConfig::get('apiKey'); - $api = new wfAPI($apiKey, $wp_version); - $response = $api->call('log_scan', array(), array('delay' => $delay, 'scheduled' => (int) $isScheduled, 'mode' => wfConfig::get('schedMode')/*, 'forcedefer' => 1*/)); - - if ($scanController->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC && $isScheduled) { - if (isset($response['defer'])) { - $defer = (int) $response['defer']; - wordfence::status(2, 'info', sprintf(/* translators: Time until. */ __("Deferring scheduled scan by %s", 'wordfence'), wfUtils::makeDuration($defer))); - wfConfig::set('lastScheduledScanStart', 0); - wfConfig::set('lastScanCompleted', 'ok'); - wfConfig::set('lastScanFailureType', false); - wfConfig::set_ser('wfStatusStartMsgs', array()); - $scanController->recordLastScanTime(); - $i = new wfIssues(); - wfScanEngine::refreshScanNotification($i); - wfScanner::shared()->scheduleSingleScan(time() + $defer, $originalScanStart); - wfUtils::clearScanLock(); - exit(); - } - } - - $malwarePrefixesHash = (isset($response['malwarePrefixes']) ? $response['malwarePrefixes'] : ''); - $coreHashesHash = (isset($response['coreHashes']) ? $response['coreHashes'] : ''); - - $scan = new wfScanEngine($malwarePrefixesHash, $coreHashesHash, $scanMode); - $scan->deleteNewIssues(); - } - else { - wordfence::status(1, 'info', __("Initiating quick scan", 'wordfence')); - $scan = new wfScanEngine('', '', $scanMode); - } - } - - $scan->go(); - } - catch (wfScanEngineDurationLimitException $e) { //User error set in wfScanEngine - wfUtils::clearScanLock(); - $peakMemory = self::logPeakMemory(); - self::status(2, 'info', sprintf( - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - self::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - self::status(2, 'error', sprintf(__("Scan terminated with error: %s", 'wordfence'), $e->getMessage())); - exit(); - } - catch (wfScanEngineCoreVersionChangeException $e) { //User error set in wfScanEngine - wfUtils::clearScanLock(); - $peakMemory = self::logPeakMemory(); - self::status(2, 'info', sprintf( - /* translators: 1. Bytes of memory. 2. Bytes of memory. */ - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - self::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - self::status(2, 'error', sprintf(/* translators: Error message. */ __("Scan terminated with error: %s", 'wordfence'), $e->getMessage())); - - $nextScheduledScan = wordfence::getNextScanStartTimestamp(); - if ($nextScheduledScan !== false && $nextScheduledScan - time() > 21600 /* 6 hours */) { - $nextScheduledScan = time() + 3600; - wfScanner::shared()->scheduleSingleScan($nextScheduledScan); - } - self::status(2, 'error', wordfence::getNextScanStartTime($nextScheduledScan)); - - exit(); - } - catch (wfAPICallSSLUnavailableException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_API_SSL_UNAVAILABLE); - - wfUtils::clearScanLock(); - $peakMemory = self::logPeakMemory(); - self::status(2, 'info', sprintf( - /* translators: 1. Bytes of memory. 2. Bytes of memory. */ - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - self::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - self::status(2, 'error', sprintf(/* translators: Error message. */__("Scan terminated with error: %s", 'wordfence'), $e->getMessage())); - exit(); - } - catch (wfAPICallFailedException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_API_CALL_FAILED); - - wfUtils::clearScanLock(); - $peakMemory = self::logPeakMemory(); - self::status(2, 'info', sprintf( - /* translators: 1. Bytes of memory. 2. Bytes of memory. */ - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - self::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - self::status(2, 'error', sprintf(/* translators: Error message. */ __("Scan terminated with error: %s", 'wordfence'), $e->getMessage())); - exit(); - } - catch (wfAPICallInvalidResponseException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_API_INVALID_RESPONSE); - - wfUtils::clearScanLock(); - $peakMemory = self::logPeakMemory(); - self::status(2, 'info', sprintf( - /* translators: 1. Bytes of memory. 2. Bytes of memory. */ - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - self::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - self::status(2, 'error', sprintf(/* translators: Error message. */ __("Scan terminated with error: %s", 'wordfence'), $e->getMessage())); - exit(); - } - catch (wfAPICallErrorResponseException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_API_ERROR_RESPONSE); - - wfUtils::clearScanLock(); - $peakMemory = self::logPeakMemory(); - self::status(2, 'info', sprintf( - /* translators: 1. Bytes of memory. 2. Bytes of memory. */ - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - self::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - self::status(2, 'error', sprintf(/* translators: Error message. */ __("Scan terminated with error: %s", 'wordfence'), $e->getMessage())); - - if (preg_match('/The Wordfence API key you\'re using is already being used by: (\S*?) /', $e->getMessage(), $matches)) { - wordfence::alert(__('Wordfence scan failed because of license site URL conflict', 'wordfence'), sprintf( - /* translators: Site URL. */ - __(<<getMessage())); - self::status(10, 'info', "SUM_KILLED:" . __('Previous scan terminated with an error. See below.', 'wordfence')); - exit(); - } - wfUtils::clearScanLock(); - } - public static function logPeakMemory(){ - $oldPeak = wfConfig::get('wfPeakMemory', 0, false); - $peak = memory_get_peak_usage(true); - if ($peak > $oldPeak) { - wfConfig::set('wfPeakMemory', $peak, wfConfig::DONT_AUTOLOAD); - return $peak; - } - return $oldPeak; - } - public static function obHandler($buf){ - if(strlen($buf) > 1000){ - $buf = substr($buf, 0, 255); - } - if(empty($buf) === false && preg_match('/[a-zA-Z0-9]+/', $buf)){ - self::status(1, 'error', $buf); - } - } - public static function error_handler($errno, $errstr, $errfile, $errline){ - if(self::$errorHandlingOn && error_reporting() > 0){ - if(preg_match('/wordfence\//', $errfile)){ - $level = 1; //It's one of our files, so level 1 - } else { - $level = 4; //It's someone elses plugin so only show if debug is enabled - } - self::status($level, 'error', "$errstr ($errno) File: $errfile Line: $errline"); - } - return false; - } - public static function shutdown(){ - self::logPeakMemory(); - } - private static function errorExit($msg){ - wordfence::status(1, 'error', sprintf(/* translators: Error message. */ __('Scan Engine Error: %s', 'wordfence'), $msg)); - exit(); - } - private static function status($level, $type, $msg){ - wordfence::status($level, $type, $msg); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfScanEngine.php b/wp/wp-content/plugins/wordfence/lib/wfScanEngine.php deleted file mode 100644 index e22fbc28..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScanEngine.php +++ /dev/null @@ -1,3129 +0,0 @@ - false, - 'plugin' => false, - 'theme' => false, - 'unknown' => false - ); - private $userPasswdQueue = ""; - private $passwdHasIssues = wfIssues::STATUS_SECURE; - private $suspectedFiles = false; //Files found with the ".suspected" extension - private $gsbMultisiteBlogOffset = 0; - private $updateCheck = false; - private $pluginRepoStatus = array(); - private $malwarePrefixesHash; - private $coreHashesHash; - private $scanMode = wfScanner::SCAN_TYPE_STANDARD; - private $pluginsCounted = false; - private $themesCounted = false; - private $cycleStartTime; - - /** - * @var wfScanner - */ - private $scanController; //Not serialized - - /** - * @var wordfenceDBScanner - */ - private $dbScanner; - - /** - * @var wfScanKnownFilesLoader - */ - private $knownFilesLoader; - - private $metrics = array(); - - private $checkHowGetIPsRequestTime = 0; - - /** - * Returns whether or not the Wordfence scan is running. When $inThisProcessOnly is true, it returns true only - * if the scan is running in this process. Otherwise it returns true if the scan is running at all. - * - * @param bool $inThisProcessOnly - * @return bool - */ - public static function isScanRunning($inThisProcessOnly = true) { - if ($inThisProcessOnly) { - return self::$scanIsRunning; - } - - return wfScanner::shared()->isRunning(); - } - - public static function testForFullPathDisclosure($url = null, $filePath = null) { - if ($url === null && $filePath === null) { - $url = includes_url('rss-functions.php'); - $filePath = ABSPATH . WPINC . '/rss-functions.php'; - } - - $response = wp_remote_get($url); - $html = wp_remote_retrieve_body($response); - return preg_match("/" . preg_quote(realpath($filePath), "/") . "/i", $html); - } - - public static function isDirectoryListingEnabled($url = null) { - if ($url === null) { - $uploadPaths = wp_upload_dir(); - $url = $uploadPaths['baseurl']; - } - - $response = wp_remote_get($url); - return !is_wp_error($response) && ($responseBody = wp_remote_retrieve_body($response)) && - stripos($responseBody, 'Index of') !== false; - } - - public static function refreshScanNotification($issuesInstance = null) { - if ($issuesInstance === null) { - $issuesInstance = new wfIssues(); - } - - $message = wfConfig::get('lastScanCompleted', false); - if ($message === false || empty($message)) { - $n = wfNotification::getNotificationForCategory('wfplugin_scan'); - if ($n !== null) { - $n->markAsRead(); - } - } else if ($message == 'ok') { - $issueCount = $issuesInstance->getIssueCount(); - if ($issueCount) { - new wfNotification(null, wfNotification::PRIORITY_HIGH_WARNING, "<a href=\"" . wfUtils::wpAdminURL('admin.php?page=WordfenceScan') . "\">" . - /* translators: Number of scan results. */ - sprintf(_n('%d issue found in most recent scan', '%d issues found in most recent scan', $issueCount, 'wordfence'), $issueCount) - . '</a>', 'wfplugin_scan'); - } else { - $n = wfNotification::getNotificationForCategory('wfplugin_scan'); - if ($n !== null) { - $n->markAsRead(); - } - } - } else { - $failureType = wfConfig::get('lastScanFailureType'); - if ($failureType == 'duration') { - new wfNotification(null, wfNotification::PRIORITY_HIGH_WARNING, '<a href="' . wfUtils::wpAdminURL('admin.php?page=WordfenceScan') . '">Scan aborted due to duration limit</a>', 'wfplugin_scan'); - } else if ($failureType == 'versionchange') { - //No need to create a notification - } else { - $trimmedError = substr($message, 0, 100) . (strlen($message) > 100 ? '...' : ''); - new wfNotification(null, wfNotification::PRIORITY_HIGH_WARNING, '<a href="' . wfUtils::wpAdminURL('admin.php?page=WordfenceScan') . '">Scan failed: ' . esc_html($trimmedError) . '</a>', 'wfplugin_scan'); - } - } - } - - public function __sleep() { //Same order here as above for properties that are included in serialization - return array('hasher', 'jobList', 'i', 'wp_version', 'apiKey', 'startTime', 'maxExecTime', 'publicScanEnabled', 'fileContentsResults', 'scanner', 'scanQueue', 'hoover', 'scanData', 'statusIDX', 'userPasswdQueue', 'passwdHasIssues', 'suspectedFiles', 'dbScanner', 'knownFilesLoader', 'metrics', 'checkHowGetIPsRequestTime', 'gsbMultisiteBlogOffset', 'updateCheck', 'pluginRepoStatus', 'malwarePrefixesHash', 'coreHashesHash', 'scanMode', 'pluginsCounted', 'themesCounted'); - } - - public function __construct($malwarePrefixesHash = '', $coreHashesHash = '', $scanMode = wfScanner::SCAN_TYPE_STANDARD) { - $this->startTime = time(); - $this->recordMetric('scan', 'start', $this->startTime); - $this->maxExecTime = self::getMaxExecutionTime(); - $this->i = new wfIssues(); - $this->cycleStartTime = time(); - $this->wp_version = wfUtils::getWPVersion(); - $this->apiKey = wfConfig::get('apiKey'); - $this->api = new wfAPI($this->apiKey, $this->wp_version); - $this->malwarePrefixesHash = $malwarePrefixesHash; - $this->coreHashesHash = $coreHashesHash; - include(dirname(__FILE__) . '/wfDict.php'); //$dictWords - $this->dictWords = $dictWords; - $this->scanMode = $scanMode; - - $this->scanController = new wfScanner($scanMode); - $jobs = $this->scanController->jobs(); - foreach ($jobs as $job) { - if (method_exists($this, 'scan_' . $job . '_init')) { - foreach (array('init', 'main', 'finish') as $op) { - $this->jobList[] = $job . '_' . $op; - } - } else if (method_exists($this, 'scan_' . $job)) { - $this->jobList[] = $job; - } - } - } - - public function scanController() { - return $this->scanController; - } - - /** - * Deletes all new issues. To only delete specific types, provide an array of issue types. - * - * @param null|array $types - */ - public function deleteNewIssues($types = null) { - $this->i->deleteNew($types); - } - - public function __wakeup() { - $this->cycleStartTime = time(); - $this->api = new wfAPI($this->apiKey, $this->wp_version); - include(dirname(__FILE__) . '/wfDict.php'); //$dictWords - $this->dictWords = $dictWords; - $this->scanController = new wfScanner($this->scanMode); - } - - public function isFullScan() { - return $this->scanMode != wfScanner::SCAN_TYPE_QUICK; - } - - public function go() { - self::$scanIsRunning = true; - try { - self::checkForKill(); - $this->doScan(); - wfConfig::set('lastScanCompleted', 'ok'); - wfConfig::set('lastScanFailureType', false); - self::checkForKill(); - //updating this scan ID will trigger the scan page to load/reload the results. - $this->scanController->recordLastScanTime(); - //scan ID only incremented at end of scan to make UI load new results - $this->emailNewIssues(); - if ($this->isFullScan()) { - $this->recordMetric('scan', 'duration', (time() - $this->startTime)); - $this->recordMetric('scan', 'memory', wfConfig::get('wfPeakMemory', 0, false)); - $this->submitMetrics(); - } - - wfScanEngine::refreshScanNotification($this->i); - - if (wfCentral::isConnected()) { - wfCentral::updateScanStatus(); - } - self::$scanIsRunning = false; - } catch (wfScanEngineDurationLimitException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_DURATION_REACHED); - $this->scanController->recordLastScanTime(); - - $this->emailNewIssues(true); - $this->recordMetric('scan', 'duration', (time() - $this->startTime)); - $this->recordMetric('scan', 'memory', wfConfig::get('wfPeakMemory', 0, false)); - $this->submitMetrics(); - - wfScanEngine::refreshScanNotification($this->i); - self::$scanIsRunning = false; - throw $e; - } catch (wfScanEngineCoreVersionChangeException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_VERSION_CHANGE); - $this->scanController->recordLastScanTime(); - - $this->recordMetric('scan', 'duration', (time() - $this->startTime)); - $this->recordMetric('scan', 'memory', wfConfig::get('wfPeakMemory', 0, false)); - $this->submitMetrics(); - - $this->deleteNewIssues(); - - wfScanEngine::refreshScanNotification($this->i); - self::$scanIsRunning = false; - throw $e; - } catch (wfScanEngineTestCallbackFailedException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - $this->scanController->recordLastScanTime(); - - $this->recordMetric('scan', 'duration', (time() - $this->startTime)); - $this->recordMetric('scan', 'memory', wfConfig::get('wfPeakMemory', 0, false)); - $this->recordMetric('scan', 'failure', $e->getMessage()); - $this->submitMetrics(); - - wfScanEngine::refreshScanNotification($this->i); - self::$scanIsRunning = false; - throw $e; - } catch (Exception $e) { - if ($e->getCode() != wfScanEngine::SCAN_MANUALLY_KILLED) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_GENERAL); - } - - $this->recordMetric('scan', 'duration', (time() - $this->startTime)); - $this->recordMetric('scan', 'memory', wfConfig::get('wfPeakMemory', 0, false)); - $this->recordMetric('scan', 'failure', $e->getMessage()); - $this->submitMetrics(); - - wfScanEngine::refreshScanNotification($this->i); - self::$scanIsRunning = false; - throw $e; - } - } - - public function checkForDurationLimit() { - static $timeLimit = false; - if ($timeLimit === false) { - $timeLimit = intval(wfConfig::get('scan_maxDuration')); - if ($timeLimit < 1) { - $timeLimit = WORDFENCE_DEFAULT_MAX_SCAN_TIME; - } - } - - if ((time() - $this->startTime) > $timeLimit) { - $error = sprintf( - /* translators: 1. Time duration. 2. Support URL. */ - __('The scan time limit of %1$s has been exceeded and the scan will be terminated. This limit can be customized on the options page. <a href="%2$s" target="_blank" rel="noopener noreferrer">Get More Information<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - wfUtils::makeDuration($timeLimit), - wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_TIME_LIMIT) - ); - $this->addIssue('timelimit', wfIssues::SEVERITY_HIGH, md5($this->startTime), md5($this->startTime), __('Scan Time Limit Exceeded', 'wordfence'), $error, array()); - - $this->status(1, 'info', '-------------------'); - $this->status(1, 'info', sprintf( - /* translators: 1. Number of files. 2. Number of plugins. 3. Number of themes. 4. Number of posts. 5. Number of comments. 6. Number of URLs. 7. Time duration. */ - __('Scan interrupted. Scanned %1$d files, %2$d plugins, %3$d themes, %4$d posts, %5$d comments and %6$d URLs in %7$s.', 'wordfence'), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0), - wfUtils::makeDuration(time() - $this->startTime, true) - )); - if ($this->i->totalIssues > 0) { - $this->status(10, 'info', "SUM_FINAL:" . sprintf( - /* translators: Number of scan results. */ - _n( - "Scan interrupted. You have %d new issue to fix. See below.", - "Scan interrupted. You have %d new issues to fix. See below.", - $this->i->totalIssues, - 'wordfence'), - $this->i->totalIssues - ) - ); - } else { - $this->status(10, 'info', "SUM_FINAL:" . __('Scan interrupted. No problems found prior to stopping.', 'wordfence')); - } - throw new wfScanEngineDurationLimitException($error); - } - } - - public function checkForCoreVersionChange() { - $startVersion = wfConfig::get('wfScanStartVersion'); - $currentVersion = wfUtils::getWPVersion(true); - if (version_compare($startVersion, $currentVersion) != 0) { - throw new wfScanEngineCoreVersionChangeException(sprintf( - /* translators: 1. Software version. 2. Software version. */ - __('Aborting scan because WordPress updated from version %1$s to %2$s. The scan will be reattempted later.', 'wordfence'), $startVersion, $currentVersion)); - } - } - - public function shouldFork() { - static $lastCheck = 0; - - if (time() - $this->cycleStartTime > $this->maxExecTime) { - return true; - } - - if ($lastCheck > time() - $this->maxExecTime) { - return false; - } - $lastCheck = time(); - - $this->checkForCoreVersionChange(); - wfIssues::updateScanStillRunning(); - self::checkForKill(); - $this->checkForDurationLimit(); - - return false; - } - - public function forkIfNeeded() { - wfIssues::updateScanStillRunning(); - $this->checkForCoreVersionChange(); - self::checkForKill(); - $this->checkForDurationLimit(); - if (time() - $this->cycleStartTime > $this->maxExecTime) { - wordfence::status(4, 'info', __("Forking during hash scan to ensure continuity.", 'wordfence')); - $this->fork(); - } - } - - public function fork() { - wordfence::status(4, 'info', __("Entered fork()", 'wordfence')); - if (wfConfig::set_ser('wfsd_engine', $this, true, wfConfig::DONT_AUTOLOAD)) { - $this->scanController->flushSummaryItems(); - wordfence::status(4, 'info', __("Calling startScan(true)", 'wordfence')); - self::startScan(true, $this->scanMode); - } //Otherwise there was an error so don't start another scan. - exit(0); - } - - public function emailNewIssues($timeLimitReached = false) { - if (!wfCentral::pluginAlertingDisabled()) { - $this->i->emailNewIssues($timeLimitReached, $this->scanController); - } - } - - public function submitMetrics() { - if (wfConfig::get('other_WFNet', true)) { - //Trim down the malware matches if needed to allow the report call to succeed - if (isset($this->metrics['malwareSignature'])) { - //Get count - $count = 0; - $extra_count = 0; - $rules_with_extras = 0; - foreach ($this->metrics['malwareSignature'] as $rule => $payloads) { - $count += count($payloads); - $extra_count += (count($payloads) - 1); - if (count($payloads) > 1) { - $rules_with_extras++; - } - } - - //Trim additional matches - $overage = $extra_count - WORDFENCE_SCAN_ISSUES_MAX_REPORT; - if ($overage > 0) { - foreach ($this->metrics['malwareSignature'] as $rule => $payloads) { - $percent = min(1, (count($payloads) - 1) / $extra_count); //Percentage of the overage this rule is responsible for - $to_remove = min(count($payloads) - 1, ceil($percent * $overage)); //Remove the lesser of (all but one, the percentage of the overage) - $sliced = array_slice($this->metrics['malwareSignature'][$rule], 0, max(1, count($payloads) - $to_remove)); - $count -= (count($this->metrics['malwareSignature'][$rule]) - count($sliced)); - $this->metrics['malwareSignature'][$rule] = $sliced; - } - } - - //Trim single matches - if ($count > WORDFENCE_SCAN_ISSUES_MAX_REPORT) { - $sliced = array_slice($this->metrics['malwareSignature'], 0, WORDFENCE_SCAN_ISSUES_MAX_REPORT, true); - $this->metrics['malwareSignature'] = $sliced; - } - } - - $this->api->call('record_scan_metrics', array(), array('metrics' => $this->metrics)); - } - } - - private function doScan() { - if ($this->scanController->useLowResourceScanning()) { - $isFork = ($_GET['isFork'] == '1' ? true : false); - wfConfig::set('lowResourceScanWaitStep', !wfConfig::get('lowResourceScanWaitStep')); - if ($isFork && wfConfig::get('lowResourceScanWaitStep')) { - sleep((int) round($this->maxExecTime / 2)); - $this->fork(); //exits - } - } - - while (sizeof($this->jobList) > 0) { - self::checkForKill(); - $jobName = $this->jobList[0]; - $callback = array($this, 'scan_' . $jobName); - if (is_callable($callback)) { - call_user_func($callback); - } - array_shift($this->jobList); //only shift once we're done because we may pause halfway through a job and need to pick up where we left off - self::checkForKill(); - if ($this->forkRequested) { - $this->fork(); - } else { - $this->forkIfNeeded(); - } - } - - $this->status(1, 'info', '-------------------'); - - $peakMemory = wfScan::logPeakMemory(); - $this->status(2, 'info', sprintf( - /* translators: 1. Memory in bytes. 2. Memory in bytes. */ - __('Wordfence used %1$s of memory for scan. Server peak memory usage was: %2$s', 'wordfence'), - wfUtils::formatBytes($peakMemory - wfScan::$peakMemAtStart), - wfUtils::formatBytes($peakMemory) - )); - - wfScanMonitor::endMonitoring(); - - if ($this->isFullScan()) { - $this->status(1, 'info', sprintf( - /* translators: 1. Number of files. 2. Number of plugins. 3. Number of themes. 4. Number of posts. 5. Number of comments. 6. Number of URLs. 7. Time duration. */ - __('Scan Complete. Scanned %1$d files, %2$d plugins, %3$d themes, %4$d posts, %5$d comments and %6$d URLs in %7$s.', 'wordfence'), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0), - $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0), - wfUtils::makeDuration(time() - $this->startTime, true) - )); - } else { - $this->status(1, 'info', sprintf( - /* translators: 1. Time duration. */ - __("Quick Scan Complete. Scanned in %s.", 'wordfence'), - wfUtils::makeDuration(time() - $this->startTime, true) - )); - } - - $ignoredText = ''; - if ($this->i->totalIgnoredIssues > 0) { - $ignoredText = ' ' . sprintf( - /* translators: Number of scan results. */ - _n( - '%d ignored issue was also detected.', - '%d ignored issues were also detected.', - $this->i->totalIgnoredIssues, - 'wordfence' - ), $this->i->totalIgnoredIssues); - } - - if ($this->i->totalIssues > 0) { - $this->status(10, 'info', "SUM_FINAL:" . sprintf( - /* translators: Number of scan results. */ - _n( - "Scan complete. You have %d new issue to fix.", - "Scan complete. You have %d new issues to fix.", - $this->i->totalIssues, - 'wordfence'), - $this->i->totalIssues - ) . - $ignoredText . ' ' . - __('See below.', 'wordfence') - ); - } else { - $this->status(10, 'info', "SUM_FINAL:" . __('Scan complete. Congratulations, no new problems found.', 'wordfence') . $ignoredText); - } - return; - } - - public function getCurrentJob() { - return $this->jobList[0]; - } - - private function scan_checkSpamIP() { - if ($this->scanController->isPremiumScan()) { - $this->statusIDX['checkSpamIP'] = wfIssues::statusStart(__("Checking if your site IP is generating spam", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SPAM_CHECK); - $result = $this->api->call('check_spam_ip', array(), array( - 'siteURL' => site_url() - )); - $haveIssues = wfIssues::STATUS_SECURE; - if (!empty($result['haveIssues']) && is_array($result['issues'])) { - foreach ($result['issues'] as $issue) { - $added = $this->addIssue($issue['type'], wfIssues::SEVERITY_HIGH, $issue['ignoreP'], $issue['ignoreC'], $issue['shortMsg'], $issue['longMsg'], $issue['data']); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - wfIssues::statusEnd($this->statusIDX['checkSpamIP'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SPAM_CHECK, $haveIssues); - } else { - wfIssues::statusPaidOnly(__("Checking if your IP is generating spam is for paid members only", 'wordfence')); - sleep(2); - } - } - - private function scan_checkGSB_init() { - if ($this->scanController->isPremiumScan()) { - $this->statusIDX['checkGSB'] = wfIssues::statusStart(__("Checking if your site is on a domain blocklist", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_BLACKLIST_CHECK); - $h = new wordfenceURLHoover($this->apiKey, $this->wp_version); - $h->cleanup(); - } else { - wfIssues::statusPaidOnly(__("Checking if your site is on a domain blocklist is for paid members only", 'wordfence')); - sleep(2); - } - } - - private function scan_checkGSB_main() { - if ($this->scanController->isPremiumScan()) { - if (is_multisite()) { - global $wpdb; - $h = new wordfenceURLHoover($this->apiKey, $this->wp_version, false, true); - $blogIDs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM {$wpdb->blogs} WHERE blog_id > %d ORDER BY blog_id ASC", $this->gsbMultisiteBlogOffset)); //Can't use wp_get_sites or get_sites because they return empty at 10k sites - foreach ($blogIDs as $id) { - $homeURL = get_home_url($id); - $h->hoover($id, $homeURL); - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS); - $siteURL = get_site_url($id); - if ($homeURL != $siteURL) { - $h->hoover($id, $siteURL); - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS); - } - - if ($this->shouldFork()) { - $this->gsbMultisiteBlogOffset = $id; - $this->forkIfNeeded(); - } - } - } - } - } - - private function scan_checkGSB_finish() { - if ($this->scanController->isPremiumScan()) { - if (is_multisite()) { - $h = new wordfenceURLHoover($this->apiKey, $this->wp_version, false, true); - $badURLs = $h->getBaddies(); - if ($h->errorMsg) { - $this->status(4, 'info', sprintf(/* translators: Error message. */ __("Error checking domain blocklists: %s", 'wordfence'), $h->errorMsg)); - wfIssues::statusEnd($this->statusIDX['checkGSB'], wfIssues::STATUS_FAILED); - $this->scanController->completeStage(wfScanner::STAGE_BLACKLIST_CHECK, wfIssues::STATUS_FAILED); - return; - } - $h->cleanup(); - } else { - $urlsToCheck = array(array(wfUtils::wpHomeURL(), wfUtils::wpSiteURL())); - $badURLs = $this->api->call('check_bad_urls', array(), array('toCheck' => json_encode($urlsToCheck))); //Skipping the separate prefix check since there are just two URLs - $finalResults = array(); - foreach ($badURLs as $file => $badSiteList) { - if (!isset($finalResults[$file])) { - $finalResults[$file] = array(); - } - foreach ($badSiteList as $badSite) { - $finalResults[$file][] = array( - 'URL' => $badSite[0], - 'badList' => $badSite[1] - ); - } - } - $badURLs = $finalResults; - } - - $haveIssues = wfIssues::STATUS_SECURE; - if (is_array($badURLs) && count($badURLs) > 0) { - foreach ($badURLs as $id => $badSiteList) { - foreach ($badSiteList as $badSite) { - $url = $badSite['URL']; - $badList = $badSite['badList']; - $data = array('badURL' => $url); - - if ($badList == 'goog-malware-shavar') { - if (is_multisite()) { - $shortMsg = sprintf(/* translators: WordPress site ID. */ __('The multisite blog with ID %d is listed on Google\'s Safe Browsing malware list.', 'wordfence'), intval($id)); - $data['multisite'] = intval($id); - } else { - $shortMsg = __('Your site is listed on Google\'s Safe Browsing malware list.', 'wordfence'); - } - $longMsg = sprintf( - /* translators: 1. URL. 2. URL. */ - __('The URL %1$s is on the malware list. More info available at <a href="http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%2$s&client=googlechrome&hl=en-US" target="_blank" rel="noopener noreferrer">Google Safe Browsing diagnostic page<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>.', 'wordfence'), esc_html($url), urlencode($url)); - $data['gsb'] = $badList; - } else if ($badList == 'googpub-phish-shavar') { - if (is_multisite()) { - $shortMsg = sprintf( - /* translators: WordPress site ID. */ - __('The multisite blog with ID %d is listed on Google\'s Safe Browsing phishing list.', 'wordfence'), intval($id)); - $data['multisite'] = intval($id); - } else { - $shortMsg = __('Your site is listed on Google\'s Safe Browsing phishing list.', 'wordfence'); - } - $longMsg = sprintf( - /* translators: 1. URL. 2. URL. */ - __('The URL %1$s is on the phishing list. More info available at <a href="http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%2$s&client=googlechrome&hl=en-US" target="_blank" rel="noopener noreferrer">Google Safe Browsing diagnostic page<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>.', 'wordfence'), esc_html($url), urlencode($url)); - $data['gsb'] = $badList; - } else if ($badList == 'wordfence-dbl') { - if (is_multisite()) { - $shortMsg = sprintf( - /* translators: WordPress site ID. */ - __('The multisite blog with ID %d is listed on the Wordfence domain blocklist.', 'wordfence'), intval($id)); - $data['multisite'] = intval($id); - } else { - $shortMsg = __('Your site is listed on the Wordfence domain blocklist.', 'wordfence'); - } - $longMsg = sprintf( - /* translators: URL. */ - __("The URL %s is on the blocklist.", 'wordfence'), esc_html($url)); - $data['gsb'] = $badList; - } else { - if (is_multisite()) { - $shortMsg = sprintf( - /* translators: WordPress site ID. */ - __('The multisite blog with ID %d is listed on a domain blocklist.', 'wordfence'), intval($id)); - $data['multisite'] = intval($id); - } else { - $shortMsg = __('Your site is listed on a domain blocklist.', 'wordfence'); - } - $longMsg = sprintf(/* translators: URL. */ __("The URL is: %s", 'wordfence'), esc_html($url)); - $data['gsb'] = 'unknown'; - } - - $added = $this->addIssue('checkGSB', wfIssues::SEVERITY_CRITICAL, 'checkGSB', 'checkGSB' . $url, $shortMsg, $longMsg, $data); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - } - - wfIssues::statusEnd($this->statusIDX['checkGSB'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_BLACKLIST_CHECK, $haveIssues); - } - } - - private function scan_checkHowGetIPs_init() { - $this->statusIDX['checkHowGetIPs'] = wfIssues::statusStart(__("Checking for the most secure way to get IPs", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SERVER_STATE); - $this->checkHowGetIPsRequestTime = time(); - wfUtils::requestDetectProxyCallback(); - } - - private function scan_checkHowGetIPs_main() { - if (!defined('WORDFENCE_CHECKHOWGETIPS_TIMEOUT')) { - define('WORDFENCE_CHECKHOWGETIPS_TIMEOUT', 30); - } - - $haveIssues = wfIssues::STATUS_SECURE; - $existing = wfConfig::get('howGetIPs', ''); - $recommendation = wfConfig::get('detectProxyRecommendation', ''); - while (empty($recommendation) && (time() - $this->checkHowGetIPsRequestTime) < WORDFENCE_CHECKHOWGETIPS_TIMEOUT) { - sleep(1); - $this->forkIfNeeded(); - $recommendation = wfConfig::get('detectProxyRecommendation', ''); - } - - if ($recommendation == 'DEFERRED') { - //Do nothing - $haveIssues = wfIssues::STATUS_SKIPPED; - } else if (empty($recommendation)) { - $haveIssues = wfIssues::STATUS_FAILED; - } else if ($recommendation == 'UNKNOWN') { - $added = $this->addIssue('checkHowGetIPs', wfIssues::SEVERITY_HIGH, 'checkHowGetIPs', 'checkHowGetIPs' . $recommendation . WORDFENCE_VERSION, - __("Unable to accurately detect IPs", 'wordfence'), - sprintf(/* translators: Support URL. */ __('Wordfence was unable to validate a test request to your website. This can happen if your website is behind a proxy that does not use one of the standard ways to convey the IP of the request or it is unreachable publicly. IP blocking and live traffic information may not be accurate. <a href="%s" target="_blank" rel="noopener noreferrer">Get More Information<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS)) - , array()); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } else if (!empty($existing) && $existing != $recommendation) { - $extraMsg = ''; - if ($recommendation == 'REMOTE_ADDR') { - $extraMsg = ' ' . __('For maximum security use PHP\'s built in REMOTE_ADDR.', 'wordfence'); - } else if ($recommendation == 'HTTP_X_FORWARDED_FOR') { - $extraMsg = ' ' . __('This site appears to be behind a front-end proxy, so using the X-Forwarded-For HTTP header will resolve to the correct IPs.', 'wordfence'); - } else if ($recommendation == 'HTTP_X_REAL_IP') { - $extraMsg = ' ' . __('This site appears to be behind a front-end proxy, so using the X-Real-IP HTTP header will resolve to the correct IPs.', 'wordfence'); - } else if ($recommendation == 'HTTP_CF_CONNECTING_IP') { - $extraMsg = ' ' . __('This site appears to be behind Cloudflare, so using the Cloudflare "CF-Connecting-IP" HTTP header will resolve to the correct IPs.', 'wordfence'); - } - - $added = $this->addIssue('checkHowGetIPs', wfIssues::SEVERITY_HIGH, 'checkHowGetIPs', 'checkHowGetIPs' . $recommendation . WORDFENCE_VERSION, - __("'How does Wordfence get IPs' is misconfigured", 'wordfence'), - sprintf( - /* translators: Support URL. */ - __('A test request to this website was detected on a different value for this setting. IP blocking and live traffic information may not be accurate. <a href="%s" target="_blank" rel="noopener noreferrer">Get More Information<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS) - ) . $extraMsg, - array('recommendation' => $recommendation)); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - - wfIssues::statusEnd($this->statusIDX['checkHowGetIPs'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, $haveIssues); - } - - private function scan_checkHowGetIPs_finish() { - /* Do nothing */ - } - - private function scan_checkReadableConfig() { - $haveIssues = wfIssues::STATUS_SECURE; - $status = wfIssues::statusStart(__("Check for publicly accessible configuration files, backup files and logs", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_PUBLIC_FILES); - - $backupFileTests = array( - wfCommonBackupFileTest::createFromRootPath('.env'), - wfCommonBackupFileTest::createFromRootPath('.user.ini'), -// wfCommonBackupFileTest::createFromRootPath('.htaccess'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.bak'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.bak.a2'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.swo'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.save'), - new wfCommonBackupFileTest(home_url('%23wp-config.php%23'), ABSPATH . '#wp-config.php#'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php~'), - wfCommonBackupFileTest::createFromRootPath('wp-config.old'), - wfCommonBackupFileTest::createFromRootPath('.wp-config.php.swp'), - wfCommonBackupFileTest::createFromRootPath('wp-config.bak'), - wfCommonBackupFileTest::createFromRootPath('wp-config.save'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php_bak'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.swp'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.old'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.original'), - wfCommonBackupFileTest::createFromRootPath('wp-config.php.orig'), - wfCommonBackupFileTest::createFromRootPath('wp-config.txt'), - wfCommonBackupFileTest::createFromRootPath('wp-config.original'), - wfCommonBackupFileTest::createFromRootPath('wp-config.orig'), - new wfCommonBackupFileTest(content_url('/debug.log'), WP_CONTENT_DIR . '/debug.log', array( - 'headers' => array( - 'Range' => 'bytes=0-700', - ), - )), - ); - $backupFileTests = array_merge($backupFileTests, wfCommonBackupFileTest::createAllForFile('searchreplacedb2.php', wfCommonBackupFileTest::MATCH_REGEX, '/<title>Search and replace DB/i')); - - $userIniFilename = ini_get('user_ini.filename'); - if ($userIniFilename && $userIniFilename !== '.user.ini') { - $backupFileTests[] = wfCommonBackupFileTest::createFromRootPath($userIniFilename); - } - - - /** @var wfCommonBackupFileTest $test */ - foreach ($backupFileTests as $test) { - $pathFromRoot = (strpos($test->getPath(), ABSPATH) === 0) ? substr($test->getPath(), strlen(ABSPATH)) : $test->getPath(); - wordfence::status(4, 'info', "Testing {$pathFromRoot}"); - if ($test->fileExists() && $test->isPubliclyAccessible()) { - $key = "configReadable" . bin2hex($test->getUrl()); - $added = $this->addIssue( - 'configReadable', - wfIssues::SEVERITY_CRITICAL, - $key, - $key, - sprintf( - /* translators: File path. */ - __('Publicly accessible config, backup, or log file found: %s', 'wordfence'), esc_html($pathFromRoot)), - sprintf( - /* translators: 1. URL to publicly accessible file. 2. Support URL. */ - __('<a href="%1$s" target="_blank" rel="noopener noreferrer">%1$s</a> is publicly accessible and may expose source code or sensitive information about your site. Files such as this one are commonly checked for by scanners and should be made inaccessible. Alternately, some can be removed if you are certain your site does not need them. Sites using the nginx web server may need manual configuration changes to protect such files. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn more<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - $test->getUrl(), - wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_PUBLIC_CONFIG) - ), - array( - 'url' => $test->getUrl(), - 'file' => $pathFromRoot, - 'realFile' => $test->getPath(), - 'canDelete' => true, - ) - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - - wfIssues::statusEnd($status, $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_PUBLIC_FILES, $haveIssues); - } - - private function scan_wpscan_fullPathDisclosure() { - $file = realpath(ABSPATH . WPINC . "/rss-functions.php"); - if (!$file) { - return; - } - - $haveIssues = wfIssues::STATUS_SECURE; - $status = wfIssues::statusStart(__("Checking if your server discloses the path to the document root", 'wordfence')); - $testPage = includes_url() . basename($file); - - if (self::testForFullPathDisclosure($testPage, $file)) { - $key = 'wpscan_fullPathDisclosure' . $testPage; - $added = $this->addIssue( - 'wpscan_fullPathDisclosure', - wfIssues::SEVERITY_HIGH, - $key, - $key, - __('Web server exposes the document root', 'wordfence'), - __('Full Path Disclosure (FPD) vulnerabilities enable the attacker to see the path to the webroot/file. e.g.: /home/user/htdocs/file/. Certain vulnerabilities, such as using the load_file() (within a SQL Injection) query to view the page source, require the attacker to have the full path to the file they wish to view.', 'wordfence'), - array('url' => $testPage) - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - - wfIssues::statusEnd($status, $haveIssues); - } - - private function scan_wpscan_directoryListingEnabled() { - $this->statusIDX['wpscan_directoryListingEnabled'] = wfIssues::statusStart("Checking to see if directory listing is enabled"); - - $uploadPaths = wp_upload_dir(); - $enabled = self::isDirectoryListingEnabled($uploadPaths['baseurl']); - - $haveIssues = wfIssues::STATUS_SECURE; - if ($enabled) { - $added = $this->addIssue( - 'wpscan_directoryListingEnabled', - wfIssues::SEVERITY_HIGH, - 'wpscan_directoryListingEnabled', - 'wpscan_directoryListingEnabled', - __("Directory listing is enabled", 'wordfence'), - __("Directory listing provides an attacker with the complete index of all the resources located inside of the directory. The specific risks and consequences vary depending on which files are listed and accessible, but it is recommended that you disable it unless it is needed.", 'wordfence'), - array( - 'url' => $uploadPaths['baseurl'], - ) - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - wfIssues::statusEnd($this->statusIDX['wpscan_directoryListingEnabled'], $haveIssues); - } - - private function scan_checkSpamvertized() { - if ($this->scanController->isPremiumScan()) { - $this->statusIDX['spamvertizeCheck'] = wfIssues::statusStart(__("Checking if your site is being Spamvertised", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SPAMVERTISING_CHECKS); - $result = $this->api->call('spamvertize_check', array(), array( - 'siteURL' => site_url() - )); - $haveIssues = wfIssues::STATUS_SECURE; - if ($result['haveIssues'] && is_array($result['issues'])) { - foreach ($result['issues'] as $issue) { - $added = $this->addIssue($issue['type'], wfIssues::SEVERITY_CRITICAL, $issue['ignoreP'], $issue['ignoreC'], $issue['shortMsg'], $issue['longMsg'], $issue['data']); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - wfIssues::statusEnd($this->statusIDX['spamvertizeCheck'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SPAMVERTISING_CHECKS, $haveIssues); - } else { - wfIssues::statusPaidOnly(__("Check if your site is being Spamvertized is for paid members only", 'wordfence')); - sleep(2); - } - } - - private function _scannedSkippedPaths() { - static $_cache = null; - if ($_cache === null) { - $scanPaths = array(); - $directoryConstants = array( - 'WP_PLUGIN_DIR' => '/wp-content/plugins', - 'UPLOADS' => '/wp-content/uploads', - 'WP_CONTENT_DIR' => '/wp-content', - ); - foreach ($directoryConstants as $constant => $wordpressPath) { - if (!defined($constant)) - continue; - $path = constant($constant); - if (!empty($path)) { - if ($constant === 'UPLOADS') - $path = ABSPATH . $path; - try { - $scanPaths[] = new wfScanPath( - ABSPATH, - $path, - $wordpressPath - ); - } - catch (wfInvalidPathException $e) { - //Ignore invalid scan paths - wordfence::status(4, 'info', sprintf(__("Ignoring invalid scan path: %s", 'wordfence'), $e->getPath())); - } - } - } - $scanPaths[] = new wfScanPath( - ABSPATH, - ABSPATH, - '/', - array('.htaccess', 'index.php', 'license.txt', 'readme.html', 'wp-activate.php', 'wp-admin', 'wp-app.php', 'wp-blog-header.php', 'wp-comments-post.php', 'wp-config-sample.php', 'wp-content', 'wp-cron.php', 'wp-includes', 'wp-links-opml.php', 'wp-load.php', 'wp-login.php', 'wp-mail.php', 'wp-pass.php', 'wp-register.php', 'wp-settings.php', 'wp-signup.php', 'wp-trackback.php', 'xmlrpc.php', '.well-known', 'cgi-bin') - ); - if (WF_IS_FLYWHEEL && !empty($_SERVER['DOCUMENT_ROOT'])) { - $scanPaths[] = new wfScanPath( - ABSPATH, - $_SERVER['DOCUMENT_ROOT'], - '/../' - ); - } - $scanOutside = $this->scanController->scanOutsideWordPress(); - $entrypoints = array(); - foreach ($scanPaths as $scanPath) { - if (!$scanOutside && $scanPath->hasExpectedFiles()) { - try { - foreach ($scanPath->getContents() as $fileName) { - try { - $file = $scanPath->createScanFile($fileName); - if (wfUtils::fileTooBig($file->getRealPath())) - continue; - $entrypoint = new wfScanEntrypoint($file); - if ($scanPath->expectsFile($fileName) || wfFileUtils::isReadableFile($file->getRealPath())) { - $entrypoint->setIncluded(); - } - $entrypoint->addTo($entrypoints); - } - catch (wfInvalidPathException $e) { - wordfence::status(4, 'info', sprintf(__("Ignoring invalid expected scan file: %s", 'wordfence'), $e->getPath())); - } - } - } - catch (wfInaccessibleDirectoryException $e) { - throw new Exception(__("Wordfence could not read the content of your WordPress directory. This usually indicates your permissions are so strict that your web server can't read your WordPress directory.", 'wordfence')); - } - } - else { - try { - $entrypoint = new wfScanEntrypoint($scanPath->createScanFile('/'), true); - $entrypoint->addTo($entrypoints); - } - catch (wfInvalidPathException $e) { - wordfence::status(4, 'info', sprintf(__("Ignoring invalid base scan file: %s", 'wordfence'), $e->getPath())); - } - } - } - $_cache = wfScanEntrypoint::getScannedSkippedFiles($entrypoints); - } - return $_cache; - } - - private function scan_checkSkippedFiles() { - $haveIssues = wfIssues::STATUS_SECURE; - $status = wfIssues::statusStart(__("Checking for paths skipped due to scan settings", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SERVER_STATE); - - $paths = $this->_scannedSkippedPaths(); - if (!empty($paths['skipped'])) { - $skippedList = ''; - foreach ($paths['skipped'] as $index => $file) { - $path = esc_html($file->getDisplayPath()); - - if ($index >= 10) { - $skippedList .= sprintf(/* translators: Number of paths skipped in scan. */ __(', and %d more.', 'wordfence'), count($paths['skipped']) - 10); - break; - } - - if (!empty($skippedList)) { - if (count($paths['skipped']) == 2) { - $skippedList .= ' and '; - } else if ($index == count($paths['skipped']) - 1) { - $skippedList .= ', and '; - } else { - $skippedList .= ', '; - } - } - - $skippedList .= $path; - } - - $c = count($paths['skipped']); - $key = "skippedPaths"; - $added = $this->addIssue( - 'skippedPaths', - wfIssues::SEVERITY_LOW, - $key, - $key, - sprintf(/* translators: Number of paths skipped in scan. */ _n('%d path was skipped for the malware scan due to scan settings', '%d paths were skipped for the malware scan due to scan settings', $c, 'wordfence'), $c), - sprintf( - /* translators: 1. Number of paths skipped in scan. 2. Support URL. 3. List of skipped paths. */ - _n( - 'The option "Scan files outside your WordPress installation" is off by default, which means %1$d path and its file(s) will not be scanned for malware or unauthorized changes. To continue skipping this path, you may ignore this issue. Or to start scanning it, enable the option and subsequent scans will include it. Some paths may not be necessary to scan, so this is optional. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a><br><br>The path skipped is %3$s', - 'The option "Scan files outside your WordPress installation" is off by default, which means %1$d paths and their file(s) will not be scanned for malware or unauthorized changes. To continue skipping these paths, you may ignore this issue. Or to start scanning them, enable the option and subsequent scans will include them. Some paths may not be necessary to scan, so this is optional. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a><br><br>The paths skipped are %3$s', - $c, - 'wordfence' - ), - $c, - wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_SKIPPED_PATHS), - $skippedList - ), - array() - ); - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - - wfIssues::statusEnd($status, $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, $haveIssues); - } - - private function scan_knownFiles_init() { - $paths = $this->_scannedSkippedPaths(); - $includeInKnownFilesScan = $paths['scanned']; - if ($this->scanController->scanOutsideWordPress()) { - wordfence::status(2, 'info', __("Including files that are outside the WordPress installation in the scan.", 'wordfence')); - } - - $this->status(2, 'info', __("Getting plugin list from WordPress", 'wordfence')); - $knownFilesPlugins = $this->getPlugins(); - $this->status(2, 'info', sprintf(/* translators: Number of plugins. */ _n("Found %d plugin", "Found %d plugins", sizeof($knownFilesPlugins), 'wordfence'), sizeof($knownFilesPlugins))); - - $this->status(2, 'info', __("Getting theme list from WordPress", 'wordfence')); - $knownFilesThemes = $this->getThemes(); - $this->status(2, 'info', sprintf(/* translators: Number of themes. */ _n("Found %d theme", "Found %d themes", sizeof($knownFilesThemes), 'wordfence'), sizeof($knownFilesThemes))); - - $this->hasher = new wordfenceHash($includeInKnownFilesScan, $this, wfUtils::hex2bin($this->malwarePrefixesHash), $this->coreHashesHash, $this->scanMode); - } - - private function scan_knownFiles_main() { - $this->hasher->run($this); //Include this so we can call addIssue and ->api-> - $this->suspectedFiles = $this->hasher->getSuspectedFiles(); - $this->hasher = false; - } - - private function scan_knownFiles_finish() { - } - - private function scan_fileContents_init() { - $options = $this->scanController->scanOptions(); - if ($options['scansEnabled_fileContents']) { - $this->statusIDX['infect'] = wfIssues::statusStart(__('Scanning file contents for infections and vulnerabilities', 'wordfence')); - //This stage is marked as started earlier in the hasher rather than here - } else { - wfIssues::statusDisabled(__("Skipping scan of file contents for infections and vulnerabilities", 'wordfence')); - } - - if ($options['scansEnabled_fileContentsGSB']) { - $this->statusIDX['GSB'] = wfIssues::statusStart(__('Scanning file contents for URLs on a domain blocklist', 'wordfence')); - //This stage is marked as started earlier in the hasher rather than here - } else { - wfIssues::statusDisabled(__("Skipping scan of file contents for URLs on a domain blocklist", 'wordfence')); - } - - if ($options['scansEnabled_fileContents'] || $options['scansEnabled_fileContentsGSB']) { - $this->scanner = new wordfenceScanner($this->apiKey, $this->wp_version, ABSPATH, $this); - $this->status(2, 'info', __("Starting scan of file contents", 'wordfence')); - } else { - $this->scanner = false; - } - } - - private function scan_fileContents_main() { - $options = $this->scanController->scanOptions(); - if ($options['scansEnabled_fileContents'] || $options['scansEnabled_fileContentsGSB']) { - $this->fileContentsResults = $this->scanner->scan($this); - } - } - - private function scan_fileContents_finish() { - $options = $this->scanController->scanOptions(); - if ($options['scansEnabled_fileContents'] || $options['scansEnabled_fileContentsGSB']) { - $this->status(2, 'info', __("Done file contents scan", 'wordfence')); - if ($this->scanner->errorMsg) { - throw new Exception($this->scanner->errorMsg); - } - $this->scanner = null; - $haveIssues = wfIssues::STATUS_SECURE; - $haveIssuesGSB = wfIssues::STATUS_SECURE; - foreach ($this->fileContentsResults as $issue) { - $this->status(2, 'info', sprintf(/* translators: Scan result description. */ __("Adding issue: %s", 'wordfence'), $issue['shortMsg'])); - $added = $this->addIssue($issue['type'], $issue['severity'], $issue['ignoreP'], $issue['ignoreC'], $issue['shortMsg'], $issue['longMsg'], $issue['data']); - - if (isset($issue['data']['gsb'])) { - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssuesGSB = wfIssues::STATUS_PROBLEM; - } else if ($haveIssuesGSB != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssuesGSB = wfIssues::STATUS_IGNORED; - } - } else { - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - $this->fileContentsResults = null; - - if ($options['scansEnabled_fileContents']) { - wfIssues::statusEnd($this->statusIDX['infect'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_MALWARE_SCAN, $haveIssues); - } - - if ($options['scansEnabled_fileContentsGSB']) { - wfIssues::statusEnd($this->statusIDX['GSB'], $haveIssuesGSB); - $this->scanController->completeStage(wfScanner::STAGE_CONTENT_SAFETY, $haveIssuesGSB); - } - } - } - - private function scan_suspectedFiles() { - $haveIssues = wfIssues::STATUS_SECURE; - $status = wfIssues::statusStart(__("Scanning for publicly accessible quarantined files", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_PUBLIC_FILES); - - if (is_array($this->suspectedFiles) && count($this->suspectedFiles) > 0) { - foreach ($this->suspectedFiles as $file) { - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Testing accessibility of: %s", 'wordfence'), $file)); - $test = wfPubliclyAccessibleFileTest::createFromRootPath($file); - if ($test->fileExists() && $test->isPubliclyAccessible()) { - $key = "publiclyAccessible" . bin2hex($test->getUrl()); - $added = $this->addIssue( - 'publiclyAccessible', - wfIssues::SEVERITY_HIGH, - $key, - $key, - sprintf(/* translators: File path. */ __('Publicly accessible quarantined file found: %s', 'wordfence'), esc_html($file)), - sprintf( - /* translators: URL to publicly accessible file. */ - __('<a href="%1$s" target="_blank" rel="noopener noreferrer">%1$s<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a> is publicly accessible and may expose source code or sensitive information about your site. Files such as this one are commonly checked for by scanners and should be removed or made inaccessible.', 'wordfence'), - $test->getUrl() - ), - array( - 'url' => $test->getUrl(), - 'file' => $file, - 'canDelete' => true, - ) - ); - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - } - - wfIssues::statusEnd($status, $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_PUBLIC_FILES, $haveIssues); - } - - private function scan_posts_init() { - $this->statusIDX['posts'] = wfIssues::statusStart(__('Scanning posts for URLs on a domain blocklist', 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_CONTENT_SAFETY); - $blogsToScan = self::getBlogsToScan('posts'); - $this->scanQueue = ''; - $wfdb = new wfDB(); - $this->hoover = new wordfenceURLHoover($this->apiKey, $this->wp_version); - foreach ($blogsToScan as $blog) { - $q1 = $wfdb->querySelect("select ID from " . $blog['table'] . " where post_type IN ('page', 'post') and post_status = 'publish'"); - foreach ($q1 as $idRow) { - $this->scanQueue .= pack('LL', $blog['blog_id'], $idRow['ID']); - } - } - } - - private function scan_posts_main() { - global $wpdb; - $wfdb = new wfDB(); - while (strlen($this->scanQueue) > 0) { - $segment = substr($this->scanQueue, 0, 8); - $this->scanQueue = substr($this->scanQueue, 8); - $elem = unpack('Lblog/Lpost', $segment); - $queueSize = strlen($this->scanQueue) / 8; - if ($queueSize > 0 && $queueSize % 1000 == 0) { - wordfence::status(2, 'info', sprintf(/* translators: Number of posts left to scan. */ __("Scanning posts with %d left to scan.", 'wordfence'), $queueSize)); - } - - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS); - - $blogID = $elem['blog']; - $postID = $elem['post']; - - $blogs = self::getBlogsToScan('posts', $blogID); - $blog = array_shift($blogs); - - $table = wfDB::blogTable('posts', $blogID); - - $row = $wfdb->querySingleRec("select ID, post_title, post_type, post_date, post_content from {$table} where ID = %d", $postID); - $found = $this->hoover->hoover($blogID . '-' . $row['ID'], $row['post_title'] . ' ' . $row['post_content'], wordfenceURLHoover::standardExcludedHosts()); - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, $found); - if (preg_match('/(?:<[\s\n\r\t]*script[\r\s\n\t]+.*>|<[\s\n\r\t]*meta.*refresh)/i', $row['post_title'])) { - $this->addIssue( - 'postBadTitle', - wfIssues::SEVERITY_HIGH, - $row['ID'], - md5($row['post_title']), - __("Post title contains suspicious code", 'wordfence'), - __("This post contains code that is suspicious. Please check the title of the post and confirm that the code in the title is not malicious.", 'wordfence'), - array( - 'postID' => $postID, - 'postTitle' => $row['post_title'], - 'permalink' => get_permalink($postID), - 'editPostLink' => get_edit_post_link($postID), - 'type' => $row['post_type'], - 'postDate' => $row['post_date'], - 'isMultisite' => $blog['isMultisite'], - 'domain' => $blog['domain'], - 'path' => $blog['path'], - 'blog_id' => $blog['blog_id'] - ) - ); - } - - $this->forkIfNeeded(); - } - } - - private function scan_posts_finish() { - global $wpdb; - $wfdb = new wfDB(); - $this->status(2, 'info', __("Examining URLs found in posts we scanned for dangerous websites", 'wordfence')); - $hooverResults = $this->hoover->getBaddies(); - $this->status(2, 'info', __("Done examining URLs", 'wordfence')); - if ($this->hoover->errorMsg) { - wfIssues::statusEndErr(); - throw new Exception($this->hoover->errorMsg); - } - $this->hoover->cleanup(); - $haveIssues = wfIssues::STATUS_SECURE; - foreach ($hooverResults as $idString => $hresults) { - $arr = explode('-', $idString); - $blogID = $arr[0]; - $postID = $arr[1]; - $table = wfDB::blogTable('posts', $blogID); - $blog = null; - $post = null; - foreach ($hresults as $result) { - if ($result['badList'] != 'goog-malware-shavar' && $result['badList'] != 'googpub-phish-shavar' && $result['badList'] != 'wordfence-dbl') { - continue; //A list type that may be new and the plugin has not been upgraded yet. - } - - if ($blog === null) { - $blogs = self::getBlogsToScan('posts', $blogID); - $blog = array_shift($blogs); - } - - if ($post === null) { - $post = $wfdb->querySingleRec("select ID, post_title, post_type, post_date, post_content from {$table} where ID = %d", $postID); - $type = $post['post_type'] ? $post['post_type'] : 'comment'; - $uctype = ucfirst($type); - $postDate = $post['post_date']; - $title = $post['post_title']; - $contentMD5 = md5($post['post_content']); - } - - if ($result['badList'] == 'goog-malware-shavar') { - $shortMsg = sprintf( - /* translators: 1. WordPress Post type. 2. URL. */ - __('%1$s contains a suspected malware URL: %2$s', 'wordfence'), - $uctype, - esc_html($title) - ); - $longMsg = sprintf( - /* translators: 1. WordPress Post type. 2. URL. 3. URL. */ - __('This %1$s contains a suspected malware URL listed on Google\'s list of malware sites. The URL is: %2$s - More info available at <a href="http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%3$s&client=googlechrome&hl=en-US" target="_blank" rel="noopener noreferrer">Google Safe Browsing diagnostic page<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>.', 'wordfence'), - esc_html($type), - esc_html($result['URL']), - urlencode($result['URL']) - ); - } else if ($result['badList'] == 'googpub-phish-shavar') { - $shortMsg = sprintf(/* translators: 1. WordPress Post type. 2. URL. */ __('%1$s contains a suspected phishing site URL: %2$s', 'wordfence'), $uctype, esc_html($title)); - $longMsg = sprintf( - /* translators: 1. WordPress Post type. 2. URL. */ - __('This %1$s contains a URL that is a suspected phishing site that is currently listed on Google\'s list of known phishing sites. The URL is: %2$s', 'wordfence'), - esc_html($type), - esc_html($result['URL']) - ); - } else if ($result['badList'] == 'wordfence-dbl') { - $shortMsg = sprintf(/* translators: 1. WordPress Post type. 2. URL. */ __('%1$s contains a suspected malware URL: %2$s', 'wordfence'), $uctype, esc_html($title)); - $longMsg = sprintf( - /* translators: 1. WordPress Post type. 2. URL. */ - __('This %1$s contains a URL that is currently listed on Wordfence\'s domain blocklist. The URL is: %2$s', 'wordfence'), - esc_html($type), - esc_html($result['URL']) - ); - } else { - //A list type that may be new and the plugin has not been upgraded yet. - continue; - } - - $this->status(2, 'info', sprintf(/* translators: Scan result description. */ __('Adding issue: %1$s', 'wordfence'), $shortMsg)); - if (is_multisite()) { - switch_to_blog($blogID); - } - $ignoreP = $idString; - $ignoreC = $idString . $contentMD5; - $added = $this->addIssue('postBadURL', wfIssues::SEVERITY_HIGH, $ignoreP, $ignoreC, $shortMsg, $longMsg, array( - 'postID' => $postID, - 'badURL' => $result['URL'], - 'postTitle' => $title, - 'type' => $type, - 'uctype' => $uctype, - 'permalink' => get_permalink($postID), - 'editPostLink' => get_edit_post_link($postID), - 'postDate' => $postDate, - 'isMultisite' => $blog['isMultisite'], - 'domain' => $blog['domain'], - 'path' => $blog['path'], - 'blog_id' => $blogID - )); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - if (is_multisite()) { - restore_current_blog(); - } - } - } - wfIssues::statusEnd($this->statusIDX['posts'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_CONTENT_SAFETY, $haveIssues); - $this->scanQueue = ''; - } - - private function scan_comments_init() { - $this->statusIDX['comments'] = wfIssues::statusStart(__('Scanning comments for URLs on a domain blocklist', 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_CONTENT_SAFETY); - $this->scanData = array(); - $this->scanQueue = ''; - $this->hoover = new wordfenceURLHoover($this->apiKey, $this->wp_version); - $blogsToScan = self::getBlogsToScan('comments'); - $wfdb = new wfDB(); - foreach ($blogsToScan as $blog) { - $q1 = $wfdb->querySelect("select comment_ID from " . $blog['table'] . " where comment_approved=1 and not comment_type = 'order_note'"); - foreach ($q1 as $idRow) { - $this->scanQueue .= pack('LL', $blog['blog_id'], $idRow['comment_ID']); - } - } - } - - private function scan_comments_main() { - global $wpdb; - $wfdb = new wfDB(); - while (strlen($this->scanQueue) > 0) { - $segment = substr($this->scanQueue, 0, 8); - $this->scanQueue = substr($this->scanQueue, 8); - $elem = unpack('Lblog/Lcomment', $segment); - $queueSize = strlen($this->scanQueue) / 8; - if ($queueSize > 0 && $queueSize % 1000 == 0) { - wordfence::status(2, 'info', sprintf(/* translators: Number of comments left to scan. */ __("Scanning comments with %d left to scan.", 'wordfence'), $queueSize)); - } - - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS); - - $blogID = $elem['blog']; - $commentID = $elem['comment']; - - $table = wfDB::blogTable('comments', $blogID); - - $row = $wfdb->querySingleRec("select comment_ID, comment_date, comment_type, comment_author, comment_author_url, comment_content from {$table} where comment_ID=%d", $commentID); - $found = $this->hoover->hoover($blogID . '-' . $row['comment_ID'], $row['comment_author_url'] . ' ' . $row['comment_author'] . ' ' . $row['comment_content'], wordfenceURLHoover::standardExcludedHosts()); - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, $found); - $this->forkIfNeeded(); - } - } - - private function scan_comments_finish() { - $wfdb = new wfDB(); - $hooverResults = $this->hoover->getBaddies(); - if ($this->hoover->errorMsg) { - wfIssues::statusEndErr(); - throw new Exception($this->hoover->errorMsg); - } - $this->hoover->cleanup(); - $haveIssues = wfIssues::STATUS_SECURE; - foreach ($hooverResults as $idString => $hresults) { - $arr = explode('-', $idString); - $blogID = $arr[0]; - $commentID = $arr[1]; - $blog = null; - $comment = null; - foreach ($hresults as $result) { - if ($result['badList'] != 'goog-malware-shavar' && $result['badList'] != 'googpub-phish-shavar' && $result['badList'] != 'wordfence-dbl') { - continue; //A list type that may be new and the plugin has not been upgraded yet. - } - - if ($blog === null) { - $blogs = self::getBlogsToScan('comments', $blogID); - $blog = array_shift($blogs); - } - - if ($comment === null) { - $comment = $wfdb->querySingleRec("select comment_ID, comment_date, comment_type, comment_author, comment_author_url, comment_content from " . $blog['table'] . " where comment_ID=%d", $commentID); - $type = $comment['comment_type'] ? $comment['comment_type'] : 'comment'; - $uctype = ucfirst($type); - $author = $comment['comment_author']; - $date = $comment['comment_date']; - $contentMD5 = md5($comment['comment_content'] . $comment['comment_author'] . $comment['comment_author_url']); - } - - if ($result['badList'] == 'goog-malware-shavar') { - $shortMsg = sprintf( - /* translators: 1. WordPress post type. 2. WordPress author username. */ - __('%1$s with author %2$s contains a suspected malware URL.', 'wordfence'), $uctype, esc_html($author)); - $longMsg = sprintf( - /* translators: 1. WordPress post type. 2. URL. 3. URL. */ - __('This %1$s contains a suspected malware URL listed on Google\'s list of malware sites. The URL is: %2$s - More info available at <a href="http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%3$s&client=googlechrome&hl=en-US" target="_blank" rel="noopener noreferrer">Google Safe Browsing diagnostic page<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>.', 'wordfence'), - esc_html($type), - esc_html($result['URL']), - urlencode($result['URL']) - ); - } else if ($result['badList'] == 'googpub-phish-shavar') { - $shortMsg = sprintf(/* translators: WordPress post type. */ __("%s contains a suspected phishing site URL.", 'wordfence'), $uctype); - $longMsg = sprintf( - /* translators: 1. WordPress post type. 2. URL. */ - __('This %1$s contains a URL that is a suspected phishing site that is currently listed on Google\'s list of known phishing sites. The URL is: %2$s', 'wordfence'), - esc_html($type), - esc_html($result['URL']) - ); - } else if ($result['badList'] == 'wordfence-dbl') { - $shortMsg = sprintf(/* translators: URL. */ __("%s contains a suspected malware URL.", 'wordfence'), $uctype); - $longMsg = sprintf( - /* translators: 1. WordPress post type. 2. URL. */ - __('This %1$s contains a URL that is currently listed on Wordfence\'s domain blocklist. The URL is: %2$s', 'wordfence'), - esc_html($type), - esc_html($result['URL']) - ); - } - - if (is_multisite()) { - switch_to_blog($blogID); - } - - $ignoreP = $idString; - $ignoreC = $idString . '-' . $contentMD5; - $added = $this->addIssue('commentBadURL', wfIssues::SEVERITY_LOW, $ignoreP, $ignoreC, $shortMsg, $longMsg, array( - 'commentID' => $commentID, - 'badURL' => $result['URL'], - 'author' => $author, - 'type' => $type, - 'uctype' => $uctype, - 'editCommentLink' => get_edit_comment_link($commentID), - 'commentDate' => $date, - 'isMultisite' => $blog['isMultisite'], - 'domain' => $blog['domain'], - 'path' => $blog['path'], - 'blog_id' => $blogID - )); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - - if (is_multisite()) { - restore_current_blog(); - } - } - } - wfIssues::statusEnd($this->statusIDX['comments'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_CONTENT_SAFETY, $haveIssues); - $this->scanQueue = ''; - } - - public function isBadComment($author, $email, $url, $IP, $content) { - $content = $author . ' ' . $email . ' ' . $url . ' ' . $IP . ' ' . $content; - $cDesc = ''; - if ($author) { - $cDesc = sprintf(/* translators: WordPress username. */ __("Author: %s", 'wordfence'), $author) . ' '; - } - if ($email) { - $cDesc .= sprintf(/* translators: Email address. */ __("Email: %s", 'wordfence'), $email) . ' '; - } - $cDesc .= sprintf(/* translators: IP address. */ __("Source IP: %s", 'wordfence'), $IP) . ' '; - $this->status(2, 'info', sprintf(/* translators: Comment description. */ __("Scanning comment with %s", 'wordfence'), $cDesc)); - - $h = new wordfenceURLHoover($this->apiKey, $this->wp_version); - $h->hoover(1, $content, wordfenceURLHoover::standardExcludedHosts()); - $hooverResults = $h->getBaddies(); - if ($h->errorMsg) { - return false; - } - $h->cleanup(); - if (sizeof($hooverResults) > 0 && isset($hooverResults[1])) { - $hresults = $hooverResults[1]; - foreach ($hresults as $result) { - if ($result['badList'] == 'goog-malware-shavar') { - $this->status(2, 'info', sprintf(/* translators: Comment description. */ __("Marking comment as spam for containing a malware URL. Comment has %s", 'wordfence'), $cDesc)); - return true; - } else if ($result['badList'] == 'googpub-phish-shavar') { - $this->status(2, 'info', sprintf(/* translators: Comment description. */ __("Marking comment as spam for containing a phishing URL. Comment has %s", 'wordfence'), $cDesc)); - return true; - } else if ($result['badList'] == 'wordfence-dbl') { - $this->status(2, 'info', sprintf(/* translators: Comment description. */ __("Marking comment as spam for containing a malware URL. Comment has %s", 'wordfence'), $cDesc)); - } else { - //A list type that may be new and the plugin has not been upgraded yet. - continue; - } - } - } - $this->status(2, 'info', sprintf(/* translators: Comment description. */ __("Scanned comment with %s", 'wordfence'), $cDesc)); - return false; - } - - public static function getBlogsToScan($table, $withID = null) { - $wfdb = new wfDB(); - global $wpdb; - $blogsToScan = array(); - if (is_multisite()) { - if ($withID === null) { - $q1 = $wfdb->querySelect("select blog_id, domain, path from {$wpdb->blogs} where deleted=0 order by blog_id asc"); - } else { - $q1 = $wfdb->querySelect("select blog_id, domain, path from {$wpdb->blogs} where deleted=0 and blog_id = %d", $withID); - } - - foreach ($q1 as $row) { - $row['isMultisite'] = true; - $row['table'] = wfDB::blogTable($table, $row['blog_id']); - $blogsToScan[] = $row; - } - } else { - $blogsToScan[] = array( - 'isMultisite' => false, - 'table' => wfDB::networkTable($table), - 'blog_id' => '1', - 'domain' => '', - 'path' => '', - ); - } - return $blogsToScan; - } - - private function highestCap($caps) { - foreach (array('administrator', 'editor', 'author', 'contributor', 'subscriber') as $cap) { - if (empty($caps[$cap]) === false && $caps[$cap]) { - return $cap; - } - } - return ''; - } - - private function isEditor($caps) { - foreach (array('contributor', 'author', 'editor', 'administrator') as $cap) { - if (empty($caps[$cap]) === false && $caps[$cap]) { - return true; - } - } - return false; - } - - private function scan_passwds_init() { - $this->statusIDX['passwds'] = wfIssues::statusStart(__('Scanning for weak passwords', 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_PASSWORD_STRENGTH); - global $wpdb; - $counter = 0; - $query = "select ID from " . $wpdb->users; - $dbh = $wpdb->dbh; - $useMySQLi = wfUtils::useMySQLi(); - if ($useMySQLi) { //If direct-access MySQLi is available, we use it to minimize the memory footprint instead of letting it fetch everything into an array first - $result = $dbh->query($query); - if (!is_object($result)) { - return array( - 'errorMsg' => __("We were unable to generate the user list for your password check.", 'wordfence'), - ); - } - while ($rec = $result->fetch_assoc()) { - $this->userPasswdQueue .= pack('N', $rec['ID']); - $counter++; - } - } else { - $res1 = $wpdb->get_results($query, ARRAY_A); - foreach ($res1 as $rec) { - $this->userPasswdQueue .= pack('N', $rec['ID']); - $counter++; - } - } - wordfence::status(2, 'info', sprintf( - /* translators: Number of users. */ - _n("Starting password strength check on %d user.", "Starting password strength check on %d users.", $counter, 'wordfence'), $counter)); - } - - private function scan_passwds_main() { - while (strlen($this->userPasswdQueue) > 3) { - $usersLeft = strlen($this->userPasswdQueue) / 4; //4 byte ints - if ($usersLeft % 100 == 0) { - wordfence::status(2, 'info', sprintf( - /* translators: Number of users. */ - _n( - "Total of %d users left to process in password strength check.", - "Total of %d users left to process in password strength check.", - $usersLeft, - 'wordfence'), - $usersLeft - )); - } - $userID = unpack('N', substr($this->userPasswdQueue, 0, 4)); - $userID = $userID[1]; - $this->userPasswdQueue = substr($this->userPasswdQueue, 4); - $state = $this->scanUserPassword($userID); - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_USERS); - if ($state == wfIssues::STATUS_PROBLEM) { - $this->passwdHasIssues = wfIssues::STATUS_PROBLEM; - } else if ($this->passwdHasIssues != wfIssues::STATUS_PROBLEM && $state == wfIssues::STATUS_IGNORED) { - $this->passwdHasIssues = wfIssues::STATUS_IGNORED; - } - - $this->forkIfNeeded(); - } - } - - private function scan_passwds_finish() { - wfIssues::statusEnd($this->statusIDX['passwds'], $this->passwdHasIssues); - $this->scanController->completeStage(wfScanner::STAGE_PASSWORD_STRENGTH, $this->passwdHasIssues); - } - - public function scanUserPassword($userID) { - $suspended = wp_suspend_cache_addition(); - wp_suspend_cache_addition(true); - require_once(ABSPATH . 'wp-includes/class-phpass.php'); - $passwdHasher = new PasswordHash(8, TRUE); - $userDat = get_userdata($userID); - if ($userDat === false) { - wordfence::status(2, 'error', sprintf(/* translators: WordPress user ID. */ __("Could not get username for user with ID %d when checking password strength.", 'wordfence'), $userID)); - return false; - } - //user_login - $this->status(4, 'info', sprintf( - /* translators: 1. WordPress username. 2. WordPress user ID. */ - __('Checking password strength of user \'%1$s\' with ID %2$d', 'wordfence'), - $userDat->user_login, - $userID - ) . (function_exists('memory_get_usage') ? " (Mem:" . sprintf('%.1f', memory_get_usage(true) / (1024 * 1024)) . "M)" : "")); - $highCap = $this->highestCap($userDat->wp_capabilities); - if ($this->isEditor($userDat->wp_capabilities)) { - $shortMsg = sprintf( - /* translators: 1. WordPress username. 2. WordPress capability. */ - __('User "%1$s" with "%2$s" access has an easy password.', 'wordfence'), - esc_html($userDat->user_login), - esc_html($highCap) - ); - $longMsg = sprintf( - /* translators: WordPress capability. */ - __("A user with the a role of '%s' has a password that is easy to guess. Please change this password yourself or ask the user to change it.", 'wordfence'), - esc_html($highCap) - ); - $level = wfIssues::SEVERITY_CRITICAL; - $words = $this->dictWords; - } else { - $shortMsg = sprintf( - /* translators: WordPress username. */ - __("User \"%s\" with 'subscriber' access has a very easy password.", 'wordfence'), esc_html($userDat->user_login)); - $longMsg = __("A user with 'subscriber' access has a password that is very easy to guess. Please either change it or ask the user to change their password.", 'wordfence'); - $level = wfIssues::SEVERITY_HIGH; - $words = array($userDat->user_login); - } - $haveIssues = wfIssues::STATUS_SECURE; - for ($i = 0; $i < sizeof($words); $i++) { - if ($passwdHasher->CheckPassword($words[$i], $userDat->user_pass)) { - $this->status(2, 'info', sprintf(/* translators: Scan result description. */ __('Adding issue %s', 'wordfence'), $shortMsg)); - $added = $this->addIssue('easyPassword', $level, $userDat->ID, $userDat->ID . '-' . $userDat->user_pass, $shortMsg, $longMsg, array( - 'ID' => $userDat->ID, - 'user_login' => $userDat->user_login, - 'user_email' => $userDat->user_email, - 'first_name' => $userDat->first_name, - 'last_name' => $userDat->last_name, - 'editUserLink' => wfUtils::editUserLink($userDat->ID) - )); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_SECURE && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - break; - } - } - $this->status(4, 'info', sprintf(/* translators: WordPress username. */ __("Completed checking password strength of user '%s'", 'wordfence'), $userDat->user_login)); - wp_suspend_cache_addition($suspended); - return $haveIssues; - } - - /* - private function scan_sitePages(){ - if(is_multisite()){ return; } //Multisite not supported by this function yet - $this->statusIDX['sitePages'] = wordfence::statusStart("Scanning externally for malware"); - $resp = wp_remote_get(site_url()); - if(is_array($resp) && isset($resp['body']) && strlen($rep['body']) > 0){ - $this->hoover = new wordfenceURLHoover($this->apiKey, $this->wp_version); - $this->hoover->hoover(1, $rep['body']); - $hooverResults = $this->hoover->getBaddies(); - if($this->hoover->errorMsg){ - wordfence::statusEndErr(); - throw new Exception($this->hoover->errorMsg); - } - $badURLs = array(); - foreach($hooverResults as $idString => $hresults){ - foreach($hresults as $result){ - if(! in_array($result['URL'], $badURLs)){ - $badURLs[] = $result['URL']; - } - } - } - if(sizeof($badURLs) > 0){ - $this->addIssue('badSitePage', 1, 'badSitePage1', 'badSitePage1', "Your home page contains a malware URL"); - } - } - } - */ - private function scan_diskSpace() { - $this->statusIDX['diskSpace'] = wfIssues::statusStart(__('Scanning to check available disk space', 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SERVER_STATE); - wfUtils::errorsOff(); - $total = function_exists('disk_total_space')?@disk_total_space('.'):false; - $free = function_exists('disk_free_space')?@disk_free_space('.'):false; //Normally false if unreadable but can return 0 on some hosts even when there's space available - wfUtils::errorsOn(); - if (!$total || !$free) { - $this->status(2, 'info', __('Unable to access available disk space information', 'wordfence')); - wfIssues::statusEnd($this->statusIDX['diskSpace'], wfIssues::STATUS_SECURE); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, wfIssues::STATUS_SECURE); - return; - } - - - $this->status(2, 'info', sprintf( - /* translators: 1. Number of bytes. 2. Number of bytes. */ - __('Total disk space: %1$s -- Free disk space: %2$s', 'wordfence'), - wfUtils::formatBytes($total), - wfUtils::formatBytes($free) - )); - $freeMegs = round($free / 1024 / 1024, 2); - $this->status(2, 'info', sprintf(/* translators: Number of bytes. */ __('The disk has %s MB available', 'wordfence'), $freeMegs)); - if ($freeMegs < 5) { - $level = wfIssues::SEVERITY_CRITICAL; - } else if ($freeMegs < 20) { - $level = wfIssues::SEVERITY_HIGH; - } else { - wfIssues::statusEnd($this->statusIDX['diskSpace'], wfIssues::STATUS_SECURE); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, wfIssues::STATUS_SECURE); - return; - } - $haveIssues = wfIssues::STATUS_SECURE; - $added = $this->addIssue('diskSpace', - $level, - 'diskSpace', - 'diskSpace' . $level, - sprintf(/* translators: Number of bytes. */ __('You have %s disk space remaining', 'wordfence'), wfUtils::formatBytes($free)), - sprintf(/* translators: Number of bytes. */ __('You only have %s of your disk space remaining. Please free up disk space or your website may stop serving requests.', 'wordfence'), wfUtils::formatBytes($free)), - array('spaceLeft' => wfUtils::formatBytes($free)) - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_SECURE && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - wfIssues::statusEnd($this->statusIDX['diskSpace'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, $haveIssues); - } - - private function scan_wafStatus() { - $this->statusIDX['wafStatus'] = wfIssues::statusStart(__('Checking Web Application Firewall status', 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SERVER_STATE); - - $haveIssues = wfIssues::STATUS_SECURE; - $added = false; - $firewall = new wfFirewall(); - if (wfConfig::get('waf_status') !== $firewall->firewallMode() && $firewall->firewallMode() == wfFirewall::FIREWALL_MODE_DISABLED) { - $added = $this->addIssue('wafStatus', - wfIssues::SEVERITY_CRITICAL, - 'wafStatus', - 'wafStatus' . $firewall->firewallMode(), - __('Web Application Firewall is disabled', 'wordfence'), - sprintf(/* translators: Support URL. */ __('Wordfence\'s Web Application Firewall has been unexpectedly disabled. If you see a notice at the top of the Wordfence admin pages that says "The Wordfence Web Application Firewall cannot run," click the link in that message to rebuild the configuration. If this does not work, you may need to fix file permissions. <a href="%s" target="_blank" rel="noopener noreferrer">More Details<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_WAF_DISABLED)), - array('wafStatus' => $firewall->firewallMode(), 'wafStatusDisplay' => $firewall->displayText()) - ); - } - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_SECURE && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - wfIssues::statusEnd($this->statusIDX['wafStatus'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, $haveIssues); - } - - private function scan_oldVersions_init() { - $this->statusIDX['oldVersions'] = wfIssues::statusStart(__("Scanning for old themes, plugins and core files", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_VULNERABILITY_SCAN); - - $this->updateCheck = new wfUpdateCheck(); - if ($this->isFullScan()) { - $this->updateCheck->checkAllUpdates(false); - $this->updateCheck->checkAllVulnerabilities(); - } else { - $this->updateCheck->checkAllUpdates(); - } - - foreach ($this->updateCheck->getPluginSlugs() as $slug) { - $this->pluginRepoStatus[$slug] = false; - } - - //Strip plugins that have a pending update - if (count($this->updateCheck->getPluginUpdates()) > 0) { - foreach ($this->updateCheck->getPluginUpdates() as $plugin) { - if (!empty($plugin['slug'])) { - unset($this->pluginRepoStatus[$plugin['slug']]); - } - } - } - } - - private function scan_oldVersions_main() { - if (!$this->isFullScan()) { - return; - } - - if (!function_exists('plugins_api')) { - require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); - } - - foreach ($this->pluginRepoStatus as $slug => $status) { - if ($status === false) { - try { - $result = plugins_api('plugin_information', array( - 'slug' => $slug, - 'fields' => array( - 'short_description' => false, - 'description' => false, - 'sections' => false, - 'tested' => true, - 'requires' => true, - 'rating' => false, - 'ratings' => false, - 'downloaded' => false, - 'downloadlink' => false, - 'last_updated' => true, - 'added' => false, - 'tags' => false, - 'compatibility' => true, - 'homepage' => true, - 'versions' => false, - 'donate_link' => false, - 'reviews' => false, - 'banners' => false, - 'icons' => false, - 'active_installs' => false, - 'group' => false, - 'contributors' => false, - ), - )); - unset($result->versions); - unset($result->screenshots); - $this->pluginRepoStatus[$slug] = $result; - } - catch (Exception $e) { - error_log(sprintf('Caught exception while attempting to refresh update status for slug %s: %s', $slug, $e->getMessage())); - $this->pluginRepoStatus[$slug] = false; - wfConfig::set(wfUpdateCheck::LAST_UPDATE_CHECK_ERROR_KEY, sprintf('%s [%s]', $e->getMessage(), $slug), false); - wfConfig::set(wfUpdateCheck::LAST_UPDATE_CHECK_ERROR_SLUG_KEY, $slug, false); - } - catch (Throwable $t) { - error_log(sprintf('Caught error while attempting to refresh update status for slug %s: %s', $slug, $t->getMessage())); - $this->pluginRepoStatus[$slug] = false; - wfConfig::set(wfUpdateCheck::LAST_UPDATE_CHECK_ERROR_KEY, sprintf('%s [%s]', $t->getMessage(), $slug), false); - wfConfig::set(wfUpdateCheck::LAST_UPDATE_CHECK_ERROR_SLUG_KEY, $slug, false); - } - - $this->forkIfNeeded(); - } - } - } - - private function scan_oldVersions_finish() { - $haveIssues = wfIssues::STATUS_SECURE; - - if (!$this->isFullScan()) { - $this->deleteNewIssues(array('wfUpgradeError', 'wfUpgrade', 'wfPluginUpgrade', 'wfThemeUpgrade')); - } - - if ($lastError = wfConfig::get(wfUpdateCheck::LAST_UPDATE_CHECK_ERROR_KEY)) { - $lastSlug = wfConfig::get(wfUpdateCheck::LAST_UPDATE_CHECK_ERROR_SLUG_KEY); - $longMsg = sprintf(/* translators: error message. */ __("The update check performed during the scan encountered an error: %s", 'wordfence'), esc_html($lastError)); - if ($lastSlug === false) { - $longMsg .= ' ' . __('Wordfence cannot detect if the installed plugins and themes are up to date. This might be caused by a PHP compatibility issue in one or more plugins/themes.', 'wordfence'); - } - else { - $longMsg .= ' ' . __('Wordfence cannot detect if this plugin/theme is up to date. This might be caused by a PHP compatibility issue in the plugin.', 'wordfence'); - } - $longMsg .= ' ' . sprintf( - /* translators: Support URL. */ - __('<a href="%s" target="_blank" rel="noopener noreferrer">Get more information.<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_UPDATE_CHECK_FAILED)); - - $ignoreKey = ($lastSlug === false ? 'wfUpgradeErrorGeneral' : sprintf('wfUpgradeError-%s', $lastSlug)); - - $added = $this->addIssue( - 'wfUpgradeError', - wfIssues::SEVERITY_MEDIUM, - $ignoreKey, - $ignoreKey, - ($lastSlug === false ? __("Update Check Encountered Error", 'wordfence') : sprintf(/* translators: plugin/theme slug. */ __("Update Check Encountered Error on '%s'", 'wordfence'), esc_html($lastSlug))), - $longMsg, - array() - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } - else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - - // WordPress core updates needed - if ($this->updateCheck->needsCoreUpdate()) { - $added = $this->addIssue( - 'wfUpgrade', - wfIssues::SEVERITY_HIGH, - 'wfUpgrade' . $this->updateCheck->getCoreUpdateVersion(), - 'wfUpgrade' . $this->updateCheck->getCoreUpdateVersion(), - __("Your WordPress version is out of date", 'wordfence'), - sprintf(/* translators: Software version. */ __("WordPress version %s is now available. Please upgrade immediately to get the latest security updates from WordPress.", 'wordfence'), esc_html($this->updateCheck->getCoreUpdateVersion())), - array( - 'currentVersion' => $this->wp_version, - 'newVersion' => $this->updateCheck->getCoreUpdateVersion(), - ) - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - - $allPlugins = $this->updateCheck->getAllPlugins(); - - // Plugin updates needed - if (count($this->updateCheck->getPluginUpdates()) > 0) { - foreach ($this->updateCheck->getPluginUpdates() as $plugin) { - $severity = wfIssues::SEVERITY_CRITICAL; - if (isset($plugin['vulnerable'])) { - if (!$plugin['vulnerable']) { - $severity = wfIssues::SEVERITY_MEDIUM; - } - } - $key = 'wfPluginUpgrade' . ' ' . $plugin['pluginFile'] . ' ' . $plugin['newVersion'] . ' ' . $plugin['Version']; - $shortMsg = sprintf( - /* translators: 1. Plugin name. 2. Software version. 3. Software version. */ - __('The Plugin "%1$s" needs an upgrade (%2$s -> %3$s).', 'wordfence'), - empty($plugin['Name']) ? $plugin['pluginFile'] : $plugin['Name'], - $plugin['Version'], - $plugin['newVersion'] - ); - $added = $this->addIssue('wfPluginUpgrade', $severity, $key, $key, $shortMsg, - sprintf( - __("You need to upgrade \"%s\" to the newest version to ensure you have any security fixes the developer has released.", 'wordfence'), - empty($plugin['Name']) ? $plugin['pluginFile'] : $plugin['Name'] - ), $plugin); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - - if (isset($plugin['slug'])) { - unset($allPlugins[$plugin['slug']]); - } - } - } - - // Theme updates needed - if (count($this->updateCheck->getThemeUpdates()) > 0) { - foreach ($this->updateCheck->getThemeUpdates() as $theme) { - $severity = wfIssues::SEVERITY_CRITICAL; - if (isset($theme['vulnerable'])) { - if (!$theme['vulnerable']) { - $severity = wfIssues::SEVERITY_MEDIUM; - } - } - $key = 'wfThemeUpgrade' . ' ' . $theme['Name'] . ' ' . $theme['version'] . ' ' . $theme['newVersion']; - $shortMsg = sprintf( - /* translators: 1. Theme name. 2. Software version. 3. Software version. */ - __('The Theme "%1$s" needs an upgrade (%2$s -> %3$s).', 'wordfence'), - $theme['Name'], - $theme['version'], - $theme['newVersion'] - ); - $added = $this->addIssue('wfThemeUpgrade', $severity, $key, $key, $shortMsg, sprintf( - /* translators: Theme name. */ - __("You need to upgrade \"%s\" to the newest version to ensure you have any security fixes the developer has released.", 'wordfence'), - esc_html($theme['Name']) - ), $theme); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - - if ($this->isFullScan()) { - //Abandoned plugins - foreach ($this->pluginRepoStatus as $slug => $status) { - if ($status !== false && !is_wp_error($status) && ((is_object($status) && property_exists($status, 'last_updated')) || (is_array($status) && array_key_exists('last_updated', $status)))) { - $statusArray = (array) $status; - $hasVersion = array_key_exists('version', $statusArray); - if (!$hasVersion) { - $statusArray['version'] = null; - wordfence::status(3, 'error', "Unable to determine version for plugin $slug"); - } - - if (array_key_exists('last_updated', $statusArray) && - is_string($statusArray['last_updated']) && - ($lastUpdateTimestamp = strtotime($statusArray['last_updated'])) && - (time() - $lastUpdateTimestamp) > 63072000 /* ~2 years */) { - - try { - $statusArray['dateUpdated'] = wfUtils::formatLocalTime(get_option('date_format'), $lastUpdateTimestamp); - } - catch (Exception $e) { //DateMalformedStringException in PHP >= 8.3, Exception previously - wordfence::status(3, 'error', sprintf( - /* translators: 1. Plugin slug. 2. Malformed date string. */ - __('Encountered bad date string for plugin "%s" in abandoned plugin check: %s', 'wordfence'), - $slug, - $statusArray['last_updated'])); - continue; - } - $severity = wfIssues::SEVERITY_MEDIUM; - $statusArray['abandoned'] = true; - $statusArray['vulnerable'] = false; - $vulnerable = $hasVersion && $this->updateCheck->isPluginVulnerable($slug, $statusArray['version']); - if ($vulnerable) { - $severity = wfIssues::SEVERITY_CRITICAL; - $statusArray['vulnerable'] = true; - if (is_array($vulnerable) && isset($vulnerable['vulnerabilityLink'])) { $statusArray['vulnerabilityLink'] = $vulnerable['vulnerabilityLink']; } - if (is_array($vulnerable) && isset($vulnerable['cvssScore'])) { $statusArray['cvssScore'] = $vulnerable['cvssScore']; } - if (is_array($vulnerable) && isset($vulnerable['cvssVector'])) { $statusArray['cvssVector'] = $vulnerable['cvssVector']; } - } - - if (isset($allPlugins[$slug]) && isset($allPlugins[$slug]['wpURL'])) { - $statusArray['wpURL'] = $allPlugins[$slug]['wpURL']; - } - - $key = "wfPluginAbandoned {$slug} {$statusArray['version']}"; - if (isset($statusArray['tested'])) { - $shortMsg = sprintf( - /* translators: 1. Plugin name. 2. Software version. 3. Software version. */ - __('The Plugin "%1$s" appears to be abandoned (updated %2$s, tested to WP %3$s).', 'wordfence'), - (empty($statusArray['name']) ? $slug : $statusArray['name']), - $statusArray['dateUpdated'], - $statusArray['tested'] - ); - $longMsg = sprintf( - /* translators: 1. Plugin name. 2. Software version. */ - __('It was last updated %1$s ago and tested up to WordPress %2$s.', 'wordfence'), - wfUtils::makeTimeAgo(time() - $lastUpdateTimestamp), - esc_html($statusArray['tested']) - ); - } else { - $shortMsg = sprintf( - /* translators: 1. Plugin name. 2. Software version. */ - __('The Plugin "%1$s" appears to be abandoned (updated %2$s).', 'wordfence'), - (empty($statusArray['name']) ? $slug : $statusArray['name']), - $statusArray['dateUpdated'] - ); - $longMsg = sprintf( - /* translators: Time duration. */ - __('It was last updated %s ago.', 'wordfence'), - wfUtils::makeTimeAgo(time() - $lastUpdateTimestamp) - ); - } - - if ($statusArray['vulnerable']) { - $longMsg .= ' ' . __('It has unpatched security issues and may have compatibility problems with the current version of WordPress.', 'wordfence'); - } else { - $longMsg .= ' ' . __('It may have compatibility problems with the current version of WordPress or unknown security issues.', 'wordfence'); - } - $longMsg .= ' ' . sprintf( - /* translators: Support URL. */ - __('<a href="%s" target="_blank" rel="noopener noreferrer">Get more information.<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_PLUGIN_ABANDONED)); - $added = $this->addIssue('wfPluginAbandoned', $severity, $key, $key, $shortMsg, $longMsg, $statusArray); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - - unset($allPlugins[$slug]); - } - } else if ($status !== false && is_wp_error($status) && isset($status->errors['plugins_api_failed'])) { //The plugin does not exist in the wp.org repo - $knownFiles = $this->getKnownFilesLoader()->getKnownFiles(); - if (isset($knownFiles['status']) && is_array($knownFiles['status']) && isset($knownFiles['status']['plugins']) && is_array($knownFiles['status']['plugins'])) { - $requestedPlugins = $this->getPlugins(); - foreach ($requestedPlugins as $key => $data) { - if ($data['ShortDir'] == $slug && isset($knownFiles['status']['plugins'][$slug]) && $knownFiles['status']['plugins'][$slug] == 'r') { //It existed in the repo at some point and was removed - $pluginFile = wfUtils::getPluginBaseDir() . $key; - $pluginData = get_plugin_data($pluginFile); - $pluginData['wpRemoved'] = true; - $pluginData['vulnerable'] = false; - $vulnerable = $this->updateCheck->isPluginVulnerable($slug, $pluginData['Version']); - if ($vulnerable) { - $pluginData['vulnerable'] = true; - if (is_array($vulnerable) && isset($vulnerable['vulnerabilityLink'])) { $statusArray['vulnerabilityLink'] = $vulnerable['vulnerabilityLink']; } - if (is_array($vulnerable) && isset($vulnerable['cvssScore'])) { $statusArray['cvssScore'] = $vulnerable['cvssScore']; } - if (is_array($vulnerable) && isset($vulnerable['cvssVector'])) { $statusArray['cvssVector'] = $vulnerable['cvssVector']; } - } - - $key = "wfPluginRemoved {$slug} {$pluginData['Version']}"; - $shortMsg = sprintf( - /* translators: Plugin name. */ - __('The Plugin "%s" has been removed from wordpress.org but is still installed on your site.', 'wordfence'), (empty($pluginData['Name']) ? $slug : $pluginData['Name'])); - if ($pluginData['vulnerable']) { - $longMsg = __('It has unpatched security issues and may have compatibility problems with the current version of WordPress.', 'wordfence'); - } else { - $longMsg = __('Your site is still using this plugin, but it is not currently available on wordpress.org. Plugins can be removed from wordpress.org for various reasons. This can include benign issues like a plugin author discontinuing development or moving the plugin distribution to their own site, but some might also be due to security issues. In any case, future updates may or may not be available, so it is worth investigating the cause and deciding whether to temporarily or permanently replace or remove the plugin.', 'wordfence'); - } - $longMsg .= ' ' . sprintf( - /* translators: Support URL. */ - __('<a href="%s" target="_blank" rel="noopener noreferrer">Get more information.<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_PLUGIN_REMOVED)); - $added = $this->addIssue('wfPluginRemoved', wfIssues::SEVERITY_CRITICAL, $key, $key, $shortMsg, $longMsg, $pluginData); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - - unset($allPlugins[$slug]); - } - } - } - } - } - - //Handle plugins that either do not exist in the repo or do not have updates available - foreach ($allPlugins as $slug => $plugin) { - if ($plugin['vulnerable']) { - $key = implode(' ', array('wfPluginVulnerable', $plugin['pluginFile'], $plugin['Version'])); - $shortMsg = sprintf(__('The Plugin "%s" has a security vulnerability.', 'wordfence'), $plugin['Name']); - $longMsg = sprintf( - wp_kses( - __('To protect your site from this vulnerability, the safest option is to deactivate and completely remove "%s" until a patched version is available. <a href="%s" target="_blank" rel="noopener noreferrer">Get more information.<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), - array( - 'a' => array( - 'href' => array(), - 'target' => array(), - 'rel' => array(), - ), - 'span' => array( - 'class' => array() - ) - ) - ), - $plugin['Name'], - wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_PLUGIN_VULNERABLE) - ); - if (is_array($plugin['vulnerable']) && isset($plugin['vulnerable']['vulnerabilityLink'])) { $statusArray['vulnerabilityLink'] = $plugin['vulnerable']['vulnerabilityLink']; } - if (is_array($plugin['vulnerable']) && isset($plugin['vulnerable']['cvssScore'])) { $statusArray['cvssScore'] = $plugin['vulnerable']['cvssScore']; } - if (is_array($plugin['vulnerable']) && isset($plugin['vulnerable']['cvssVector'])) { $statusArray['cvssVector'] = $plugin['vulnerable']['cvssVector']; } - $plugin['updatedAvailable'] = false; - $added = $this->addIssue('wfPluginVulnerable', wfIssues::SEVERITY_CRITICAL, $key, $key, $shortMsg, $longMsg, $plugin); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; } - else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; } - - unset($allPlugins[$slug]); - } - } - } - - $this->updateCheck = false; - $this->pluginRepoStatus = array(); - - wfIssues::statusEnd($this->statusIDX['oldVersions'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_VULNERABILITY_SCAN, $haveIssues); - } - - public function scan_suspiciousAdminUsers() { - $this->statusIDX['suspiciousAdminUsers'] = wfIssues::statusStart(__("Scanning for admin users not created through WordPress", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_OPTIONS_AUDIT); - $haveIssues = wfIssues::STATUS_SECURE; - - $adminUsers = new wfAdminUserMonitor(); - if ($adminUsers->isEnabled()) { - try { - $response = $this->api->call('suspicious_admin_usernames'); - if (is_array($response) && isset($response['ok']) && wfUtils::truthyToBoolean($response['ok']) && !empty($response['patterns'])) { - wfConfig::set_ser('suspiciousAdminUsernames', $response['patterns']); - } - } catch (Exception $e) { - // Let the rest of the scan continue - } - - $suspiciousAdmins = $adminUsers->checkNewAdmins(); - if (is_array($suspiciousAdmins)) { - foreach ($suspiciousAdmins as $userID) { - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_USERS); - $user = new WP_User($userID); - $key = 'suspiciousAdminUsers' . $userID; - $added = $this->addIssue('suspiciousAdminUsers', wfIssues::SEVERITY_HIGH, $key, $key, - sprintf(/* translators: WordPress username. */ __("An admin user with the username %s was created outside of WordPress.", 'wordfence'), esc_html($user->user_login)), - sprintf(/* translators: WordPress username. */ __("An admin user with the username %s was created outside of WordPress. It's possible a plugin could have created the account, but if you do not recognize the user, we suggest you remove it.", 'wordfence'), esc_html($user->user_login)), - array( - 'userID' => $userID, - )); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - - $admins = $adminUsers->getCurrentAdmins(); - /** - * @var WP_User $adminUser - */ - foreach ($admins as $userID => $adminUser) { - $added = false; - $key = 'suspiciousAdminUsers' . $userID; - - // Check against user name list here. - $suspiciousAdminUsernames = wfConfig::get_ser('suspiciousAdminUsernames'); - if (is_array($suspiciousAdminUsernames)) { - foreach ($suspiciousAdminUsernames as $usernamePattern) { - if (preg_match($usernamePattern, $adminUser->user_login)) { - $added = $this->addIssue('suspiciousAdminUsers', wfIssues::SEVERITY_HIGH, $key, $key, - sprintf(/* translators: WordPress username. */ __("An admin user with a suspicious username %s was found.", 'wordfence'), esc_html($adminUser->user_login)), - sprintf(/* translators: WordPress username. */ __("An admin user with a suspicious username %s was found. Administrators accounts with usernames similar to this are commonly seen created by hackers. It's possible a plugin could have created the account, but if you do not recognize the user, we suggest you remove it.", 'wordfence'), esc_html($adminUser->user_login)), - array( - 'userID' => $userID, - )); - } - } - } - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - } - - wfIssues::statusEnd($this->statusIDX['suspiciousAdminUsers'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_OPTIONS_AUDIT, $haveIssues); - } - - public function scan_suspiciousOptions() { - $this->statusIDX['suspiciousOptions'] = wfIssues::statusStart(__("Scanning for suspicious site options", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_OPTIONS_AUDIT); - $haveIssues = wfIssues::STATUS_SECURE; - - $blogsToScan = self::getBlogsToScan('options'); - $wfdb = new wfDB(); - - $this->hoover = new wordfenceURLHoover($this->apiKey, $this->wp_version); - foreach ($blogsToScan as $blog) { - $excludedHosts = array(); - $homeURL = get_home_url($blog['blog_id']); - $host = parse_url($homeURL, PHP_URL_HOST); - if ($host) { - $excludedHosts[$host] = 1; - } - $siteURL = get_site_url($blog['blog_id']); - $host = parse_url($siteURL, PHP_URL_HOST); - if ($host) { - $excludedHosts[$host] = 1; - } - $excludedHosts = array_keys($excludedHosts); - - //Newspaper Theme - if (defined('TD_THEME_OPTIONS_NAME')) { - $q = $wfdb->querySelect("SELECT option_name, option_value FROM " . $blog['table'] . " WHERE option_name REGEXP '^td_[0-9]+$' OR option_name = '%s'", TD_THEME_OPTIONS_NAME); - } else { - $q = $wfdb->querySelect("SELECT option_name, option_value FROM " . $blog['table'] . " WHERE option_name REGEXP '^td_[0-9]+$'"); - } - foreach ($q as $row) { - $found = $this->hoover->hoover($blog['blog_id'] . '-' . $row['option_name'], $row['option_value'], $excludedHosts); - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, $found); - } - } - - - $this->status(2, 'info', __("Examining URLs found in the options we scanned for dangerous websites", 'wordfence')); - $hooverResults = $this->hoover->getBaddies(); - $this->status(2, 'info', __("Done examining URLs", 'wordfence')); - if ($this->hoover->errorMsg) { - wfIssues::statusEndErr(); - throw new Exception($this->hoover->errorMsg); - } - $this->hoover->cleanup(); - foreach ($hooverResults as $idString => $hresults) { - $arr = explode('-', $idString); - $blogID = $arr[0]; - $optionKey = $arr[1]; - $blog = null; - foreach ($hresults as $result) { - if ($result['badList'] != 'goog-malware-shavar' && $result['badList'] != 'googpub-phish-shavar' && $result['badList'] != 'wordfence-dbl') { - continue; //A list type that may be new and the plugin has not been upgraded yet. - } - - if ($blog === null) { - $blogs = self::getBlogsToScan('options', $blogID); - $blog = array_shift($blogs); - } - - if ($result['badList'] == 'goog-malware-shavar') { - $shortMsg = sprintf(/* translators: URL. */ __("Option contains a suspected malware URL: %s", 'wordfence'), esc_html($optionKey)); - $longMsg = sprintf(/* translators: URL. */ __("This option contains a suspected malware URL listed on Google's list of malware sites. It may indicate your site is infected with malware. The URL is: %s", 'wordfence'), esc_html($result['URL'])); - } else if ($result['badList'] == 'googpub-phish-shavar') { - $shortMsg = sprintf(/* translators: URL. */ __("Option contains a suspected phishing site URL: %s", 'wordfence'), esc_html($optionKey)); - $longMsg = sprintf(/* translators: URL. */ __("This option contains a URL that is a suspected phishing site that is currently listed on Google's list of known phishing sites. It may indicate your site is infected with malware. The URL is: %s", 'wordfence'), esc_html($result['URL'])); - } else if ($result['badList'] == 'wordfence-dbl') { - $shortMsg = sprintf(/* translators: URL. */ __("Option contains a suspected malware URL: %s", 'wordfence'), esc_html($optionKey)); - $longMsg = sprintf(/* translators: URL. */ __("This option contains a URL that is currently listed on Wordfence's domain blocklist. It may indicate your site is infected with malware. The URL is: %s", 'wordfence'), esc_html($result['URL'])); - } else { - //A list type that may be new and the plugin has not been upgraded yet. - continue; - } - - $longMsg .= ' - ' . sprintf(/* translators: Support URL. */ __('<a href="%s" target="_blank" rel="noopener noreferrer">Get more information.<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_OPTION_MALWARE_URL)); - - $this->status(2, 'info', sprintf(/* translators: Scan result description. */ __("Adding issue: %s", 'wordfence'), $shortMsg)); - - if (is_multisite()) { - switch_to_blog($blogID); - } - - $ignoreP = $idString; - $ignoreC = $idString . md5(serialize(get_option($optionKey, ''))); - $added = $this->addIssue('optionBadURL', wfIssues::SEVERITY_HIGH, $ignoreP, $ignoreC, $shortMsg, $longMsg, array( - 'optionKey' => $optionKey, - 'badURL' => $result['URL'], - 'isMultisite' => $blog['isMultisite'], - 'domain' => $blog['domain'], - 'path' => $blog['path'], - 'blog_id' => $blogID - )); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - if (is_multisite()) { - restore_current_blog(); - } - } - } - - wfIssues::statusEnd($this->statusIDX['suspiciousOptions'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_OPTIONS_AUDIT, $haveIssues); - } - - public function scan_geoipSupport() { - $this->statusIDX['geoipSupport'] = wfIssues::statusStart(__("Checking for future GeoIP support", 'wordfence')); - $this->scanController->startStage(wfScanner::STAGE_SERVER_STATE); - $haveIssues = wfIssues::STATUS_SECURE; - - if (version_compare(phpversion(), '5.4') < 0 && wfConfig::get('isPaid') && wfBlock::hasCountryBlock()) { - $shortMsg = __('PHP Update Needed for Country Blocking', 'wordfence'); - $longMsg = sprintf(/* translators: Software version. */ __('The GeoIP database that is required for country blocking has been updated to a new format. This new format requires sites to run PHP 5.4 or newer, and this site is on PHP %s. To ensure country blocking continues functioning, please update PHP.', 'wordfence'), wfUtils::cleanPHPVersion()); - - $longMsg .= ' ' . sprintf(/* translators: Support URL. */ __('<a href="%s" target="_blank" rel="noopener noreferrer">Get more information.<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_GEOIP_UPDATE)); - - $this->status(2, 'info', sprintf(/* translators: Scan result description. */ __("Adding issue: %s", 'wordfence'), $shortMsg)); - - $ignoreP = 'geoIPPHPDiscontinuing'; - $ignoreC = $ignoreP; - $added = $this->addIssue('geoipSupport', wfIssues::SEVERITY_MEDIUM, $ignoreP, $ignoreC, $shortMsg, $longMsg, array()); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { - $haveIssues = wfIssues::STATUS_PROBLEM; - } else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { - $haveIssues = wfIssues::STATUS_IGNORED; - } - } - - wfIssues::statusEnd($this->statusIDX['geoipSupport'], $haveIssues); - $this->scanController->completeStage(wfScanner::STAGE_SERVER_STATE, $haveIssues); - } - - public function status($level, $type, $msg) { - wordfence::status($level, $type, $msg); - } - - public function addIssue($type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData, $alreadyHashed = false) { - wfIssues::updateScanStillRunning(); - return $this->i->addIssue($type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData, $alreadyHashed); - } - - public function addPendingIssue($type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData) { - wfIssues::updateScanStillRunning(); - return $this->i->addPendingIssue($type, $severity, $ignoreP, $ignoreC, $shortMsg, $longMsg, $templateData); - } - - public function getPendingIssueCount() { - return $this->i->getPendingIssueCount(); - } - - public function getPendingIssues($offset = 0, $limit = 100) { - return $this->i->getPendingIssues($offset, $limit); - } - - public static function requestKill() { - wfScanMonitor::endMonitoring(); - wfConfig::set('wfKillRequested', time(), wfConfig::DONT_AUTOLOAD); - } - - public static function checkForKill() { - $kill = wfConfig::get('wfKillRequested', 0); - if ($kill && time() - $kill < 600) { //Kill lasts for 10 minutes - wordfence::status(10, 'info', "SUM_KILLED:" . __('Previous scan was stopped successfully.', 'wordfence')); - throw new Exception(__("Scan was stopped on administrator request.", 'wordfence'), wfScanEngine::SCAN_MANUALLY_KILLED); - } - } - - public static function startScan($isFork = false, $scanMode = false, $isResume = false) { - if (!defined('DONOTCACHEDB')) { - define('DONOTCACHEDB', true); - } - - if ($scanMode === false) { - $scanMode = wfScanner::shared()->scanType(); - } - - if (!$isFork) { //beginning of scan - wfConfig::inc('totalScansRun'); - wfConfig::set('wfKillRequested', 0, wfConfig::DONT_AUTOLOAD); - wordfence::status(4, 'info', __("Entering start scan routine", 'wordfence')); - if (wfScanner::shared()->isRunning()) { - return __("A scan is already running. Use the stop scan button if you would like to terminate the current scan.", 'wordfence'); - } - wfConfig::set('currentCronKey', ''); //Ensure the cron key is cleared - if (!$isResume) - wfScanMonitor::handleScanStart($scanMode); - } - wfScanMonitor::logLastAttempt($isFork); - $timeout = self::getMaxExecutionTime() - 2; //2 seconds shorter than max execution time which ensures that only 2 HTTP processes are ever occupied - $testURL = admin_url('admin-ajax.php?action=wordfence_testAjax'); - $forceIpv4 = wfConfig::get('scan_force_ipv4_start'); - $interceptor = new wfCurlInterceptor($forceIpv4); - if ($forceIpv4) - $interceptor->setOption(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); - if (!wfConfig::get('startScansRemotely', false)) { - if ($isFork) { - $testSuccessful = (bool) wfConfig::get('scanAjaxTestSuccessful'); - wordfence::status(4, 'info', sprintf(__("Cached result for scan start test: %s", 'wordfence'), var_export($testSuccessful, true))); - } - else { - try { - $testResult = $interceptor->intercept(function () use ($testURL, $timeout) { - return wp_remote_post($testURL, array( - 'timeout' => $timeout, - 'blocking' => true, - 'sslverify' => false, - 'headers' => array() - )); - }); - } catch (Exception $e) { - //Fall through to the remote start test below - } - - wordfence::status(4, 'info', sprintf(/* translators: Scan start test result data. */ __("Test result of scan start URL fetch: %s", 'wordfence'), var_export($testResult, true))); - - $testSuccessful = !is_wp_error($testResult) && (is_array($testResult) || $testResult instanceof ArrayAccess) && strstr($testResult['body'], 'WFSCANTESTOK') !== false; - wfConfig::set('scanAjaxTestSuccessful', $testSuccessful); - } - } - - $cronKey = wfUtils::bigRandomHex(); - wfConfig::set('currentCronKey', time() . ',' . $cronKey); - if ((!wfConfig::get('startScansRemotely', false)) && $testSuccessful) { - //ajax requests can be sent by the server to itself - $cronURL = self::_localStartURL($isFork, $scanMode, $cronKey); - $headers = array('Referer' => false/*, 'Cookie' => 'XDEBUG_SESSION=1'*/); - wordfence::status(4, 'info', sprintf(/* translators: WordPress admin panel URL. */ __("Starting cron with normal ajax at URL %s", 'wordfence'), $cronURL)); - - try { - wfConfig::set('scanStartAttempt', time()); - $response = $interceptor->intercept(function () use ($cronURL, $headers) { - return wp_remote_get($cronURL, array( - 'timeout' => 0.01, - 'blocking' => false, - 'sslverify' => false, - 'headers' => $headers - )); - }); - if (wfCentral::isConnected()) { - wfCentral::updateScanStatus(); - } - } catch (Exception $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - return false; - } - - if (is_wp_error($response)) { - $error_message = $response->get_error_message(); - if ($error_message) { - $lastScanCompletedMessage = sprintf(/* translators: Error message. */ __("There was an error starting the scan: %s.", 'wordfence'), $error_message); - } else { - $lastScanCompletedMessage = __("There was an unknown error starting the scan.", 'wordfence'); - } - - wfConfig::set('lastScanCompleted', $lastScanCompletedMessage); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - } - - wordfence::status(4, 'info', __("Scan process ended after forking.", 'wordfence')); - } else { - $cronURL = self::_remoteStartURL($isFork, $scanMode, $cronKey); - $headers = array(); - wordfence::status(4, 'info', sprintf(/* translators: WordPress admin panel URL. */ __("Starting cron via proxy at URL %s", 'wordfence'), $cronURL)); - - try { - wfConfig::set('scanStartAttempt', time()); - $response = wp_remote_get($cronURL, array( - 'timeout' => 0.01, - 'blocking' => false, - 'sslverify' => false, - 'headers' => $headers - )); - if (wfCentral::isConnected()) { - wfCentral::updateScanStatus(); - } - } catch (Exception $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - return false; - } - - if (is_wp_error($response)) { - $error_message = $response->get_error_message(); - if ($error_message) { - $lastScanCompletedMessage = sprintf(/* translators: WordPress admin panel URL. */ __("There was an error starting the scan: %s.", 'wordfence'), $error_message); - } else { - $lastScanCompletedMessage = __("There was an unknown error starting the scan.", 'wordfence'); - } - wfConfig::set('lastScanCompleted', $lastScanCompletedMessage); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - } - - wordfence::status(4, 'info', __("Scan process ended after forking.", 'wordfence')); - } - return false; //No error - } - - public static function verifyStartSignature($signature, $isFork, $scanMode, $cronKey, $remote) { - $url = self::_baseStartURL($isFork, $scanMode, $cronKey); - if ($remote) { - $url = self::_remoteStartURL($isFork, $scanMode, $cronKey); - $url = remove_query_arg('signature', $url); - } - $test = self::_signStartURL($url); - return hash_equals($signature, $test); - } - - protected static function _baseStartURL($isFork, $scanMode, $cronKey) { - $url = admin_url('admin-ajax.php'); - $url .= '?action=wordfence_doScan&isFork=' . ($isFork ? '1' : '0') . '&scanMode=' . urlencode($scanMode) . '&cronKey=' . urlencode($cronKey); - return $url; - } - - protected static function _localStartURL($isFork, $scanMode, $cronKey) { - $url = self::_baseStartURL($isFork, $scanMode, $cronKey); - return add_query_arg('signature', self::_signStartURL($url), $url); - } - - protected static function _remoteStartURL($isFork, $scanMode, $cronKey) { - $url = self::_baseStartURL($isFork, $scanMode, $cronKey); - $url = preg_replace('/^https?:\/\//i', (wfAPI::SSLEnabled() ? WORDFENCE_API_URL_SEC : WORDFENCE_API_URL_NONSEC) . 'scanp/', $url); - $url = add_query_arg('k', wfConfig::get('apiKey'), $url); - $url = add_query_arg('ssl', wfUtils::isFullSSL() ? '1' : '0', $url); - return add_query_arg('signature', self::_signStartURL($url), $url); - } - - protected static function _signStartURL($url) { - $payload = preg_replace('~^https?://[^/]+~i', '', $url); - return wfCrypt::local_sign($payload); - } - - public function processResponse($result) { - return false; - } - - public static function getMaxExecutionTime($staySilent = false) { - $config = wfConfig::get('maxExecutionTime'); - if (!$staySilent) { - wordfence::status(4, 'info', sprintf(/* translators: Time in seconds. */ __("Got value from wf config maxExecutionTime: %s", 'wordfence'), $config)); - } - if (is_numeric($config) && $config >= WORDFENCE_SCAN_MIN_EXECUTION_TIME) { - if (!$staySilent) { - wordfence::status(4, 'info', sprintf(/* translators: Time in seconds. */ __("getMaxExecutionTime() returning config value: %s", 'wordfence'), $config)); - } - return $config; - } - - $ini = @ini_get('max_execution_time'); - if (!$staySilent) { - wordfence::status(4, 'info', sprintf(/* translators: PHP ini value. */ __("Got max_execution_time value from ini: %s", 'wordfence'), $ini)); - } - if (is_numeric($ini) && $ini >= WORDFENCE_SCAN_MIN_EXECUTION_TIME) { - if ($ini > WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME) { - if (!$staySilent) { - wordfence::status(4, 'info', sprintf( - /* translators: 1. PHP ini setting. 2. Time in seconds. */ - __('ini value of %1$d is higher than value for WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME (%2$d), reducing', 'wordfence'), - $ini, - WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME - )); - } - $ini = WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME; - } - - $ini = floor($ini / 2); - if (!$staySilent) { - wordfence::status(4, 'info', sprintf(/* translators: PHP ini setting. */ __("getMaxExecutionTime() returning half ini value: %d", 'wordfence'), $ini)); - } - return $ini; - } - - if (!$staySilent) { - wordfence::status(4, 'info', __("getMaxExecutionTime() returning default of: 15", 'wordfence')); - } - return 15; - } - - /** - * @return wfScanKnownFilesLoader - */ - public function getKnownFilesLoader() { - if ($this->knownFilesLoader === null) { - $this->knownFilesLoader = new wfScanKnownFilesLoader($this->api, $this->getPlugins(), $this->getThemes()); - } - return $this->knownFilesLoader; - } - - /** - * @return array - */ - public function getPlugins() { - static $plugins = null; - if ($plugins !== null) { - return $plugins; - } - - if (!function_exists('get_plugins')) { - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - $pluginData = get_plugins(); - $plugins = array(); - foreach ($pluginData as $key => $data) { - if (preg_match('/^([^\/]+)\//', $key, $matches)) { - $pluginDir = $matches[1]; - $pluginFullDir = "wp-content/plugins/" . $pluginDir; - $plugins[$key] = array( - 'Name' => $data['Name'], - 'Version' => $data['Version'], - 'ShortDir' => $pluginDir, - 'FullDir' => $pluginFullDir - ); - } - if (!$this->pluginsCounted) { - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS); - } - } - - $this->pluginsCounted = true; - return $plugins; - } - - /** - * @return array - */ - public function getThemes() { - static $themes = null; - if ($themes !== null) { - return $themes; - } - - if (!function_exists('wp_get_themes')) { - require_once(ABSPATH . '/wp-includes/theme.php'); - } - $themeData = wp_get_themes(); - $themes = array(); - foreach ($themeData as $themeName => $themeVal) { - if (preg_match('/\/([^\/]+)$/', $themeVal['Stylesheet Dir'], $matches)) { - $shortDir = $matches[1]; //e.g. evo4cms - $fullDir = "wp-content/themes/{$shortDir}"; //e.g. wp-content/themes/evo4cms - $themes[$themeName] = array( - 'Name' => $themeVal['Name'], - 'Version' => $themeVal['Version'], - 'ShortDir' => $shortDir, - 'FullDir' => $fullDir - ); - } - if (!$this->themesCounted) { - $this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES); - } - } - - $this->themesCounted = true; - return $themes; - } - - public function recordMetric($type, $key, $value, $singular = true) { - if (!isset($this->metrics[$type])) { - $this->metrics[$type] = array(); - } - - if (!isset($this->metrics[$type][$key])) { - $this->metrics[$type][$key] = array(); - } - - if ($singular) { - $this->metrics[$type][$key] = $value; - } else { - $this->metrics[$type][$key][] = $value; - } - } -} - -class wfScanKnownFilesLoader { - /** - * @var array - */ - private $plugins; - - /** - * @var array - */ - private $themes; - - /** - * @var array - */ - private $knownFiles = array(); - - /** - * @var wfAPI - */ - private $api; - - - /** - * @param wfAPI $api - * @param array $plugins - * @param array $themes - */ - public function __construct($api, $plugins = null, $themes = null) { - $this->api = $api; - $this->plugins = $plugins; - $this->themes = $themes; - } - - /** - * @return bool - */ - public function isLoaded() { - return is_array($this->knownFiles) && count($this->knownFiles) > 0; - } - - /** - * @param $file - * @return bool - * @throws wfScanKnownFilesException - */ - public function isKnownFile($file) { - if (!$this->isLoaded()) { - $this->fetchKnownFiles(); - } - - return isset($this->knownFiles['core'][$file]) || - isset($this->knownFiles['plugins'][$file]) || - isset($this->knownFiles['themes'][$file]); - } - - /** - * @param $file - * @return bool - * @throws wfScanKnownFilesException - */ - public function isKnownCoreFile($file) { - if (!$this->isLoaded()) { - $this->fetchKnownFiles(); - } - return isset($this->knownFiles['core'][$file]); - } - - /** - * @param $file - * @return bool - * @throws wfScanKnownFilesException - */ - public function isKnownPluginFile($file) { - if (!$this->isLoaded()) { - $this->fetchKnownFiles(); - } - return isset($this->knownFiles['plugins'][$file]); - } - - /** - * @param $file - * @return bool - * @throws wfScanKnownFilesException - */ - public function isKnownThemeFile($file) { - if (!$this->isLoaded()) { - $this->fetchKnownFiles(); - } - return isset($this->knownFiles['themes'][$file]); - } - - /** - * @throws wfScanKnownFilesException - */ - public function fetchKnownFiles() { - try { - $dataArr = $this->api->binCall('get_known_files', json_encode(array( - 'plugins' => $this->plugins, - 'themes' => $this->themes - ))); - - if ($dataArr['code'] != 200) { - throw new wfScanKnownFilesException(sprintf(/* translators: 1. HTTP status code. */ __("Got error response from Wordfence servers: %s", 'wordfence'), $dataArr['code']), $dataArr['code']); - } - $this->knownFiles = @json_decode($dataArr['data'], true); - if (!is_array($this->knownFiles)) { - throw new wfScanKnownFilesException(__("Invalid response from Wordfence servers.", 'wordfence')); - } - } catch (Exception $e) { - throw new wfScanKnownFilesException($e->getMessage(), $e->getCode(), $e); - } - } - - public function getKnownPluginData($file) { - if ($this->isKnownPluginFile($file)) { - return $this->knownFiles['plugins'][$file]; - } - return null; - } - - public function getKnownThemeData($file) { - if ($this->isKnownThemeFile($file)) { - return $this->knownFiles['themes'][$file]; - } - return null; - } - - /** - * @return array - */ - public function getPlugins() { - return $this->plugins; - } - - /** - * @param array $plugins - */ - public function setPlugins($plugins) { - $this->plugins = $plugins; - } - - /** - * @return array - */ - public function getThemes() { - return $this->themes; - } - - /** - * @param array $themes - */ - public function setThemes($themes) { - $this->themes = $themes; - } - - /** - * @return array - * @throws wfScanKnownFilesException - */ - public function getKnownFiles() { - if (!$this->isLoaded()) { - $this->fetchKnownFiles(); - } - return $this->knownFiles; - } - - /** - * @param array $knownFiles - */ - public function setKnownFiles($knownFiles) { - $this->knownFiles = $knownFiles; - } - - /** - * @return wfAPI - */ - public function getAPI() { - return $this->api; - } - - /** - * @param wfAPI $api - */ - public function setAPI($api) { - $this->api = $api; - } -} - -class wfScanKnownFilesException extends Exception { - -} - -class wfCommonBackupFileTest { - const MATCH_EXACT = 'exact'; - const MATCH_REGEX = 'regex'; - - /** - * @param string $path - * @param string $mode - * @param bool|string $matcher If $mode is MATCH_REGEX, this will be the regex pattern. - * @return wfCommonBackupFileTest - */ - public static function createFromRootPath($path, $mode = self::MATCH_EXACT, $matcher = false) { - return new self(site_url($path), ABSPATH . $path, array(), $mode, $matcher); - } - - /** - * Identical to createFromRootPath except it returns an entry for each file in the index that matches $name - * - * @param $name - * @param string $mode - * @param bool|string $matcher - * @return array - */ - public static function createAllForFile($file, $mode = self::MATCH_EXACT, $matcher = false) { - global $wpdb; - $escapedFile = esc_sql(preg_quote($file)); - $table_wfKnownFileList = wfDB::networkTable('wfKnownFileList'); - $files = $wpdb->get_col("SELECT path FROM {$table_wfKnownFileList} WHERE path REGEXP '(^|/){$escapedFile}$'"); - $tests = array(); - foreach ($files as $f) { - $tests[] = new self(site_url($f), ABSPATH . $f, array(), $mode, $matcher); - } - - return $tests; - } - - private $url; - private $path; - /** - * @var array - */ - private $requestArgs; - private $mode; - private $matcher; - private $response; - - - /** - * @param string $url - * @param string $path - * @param array $requestArgs - */ - public function __construct($url, $path, $requestArgs = array(), $mode = self::MATCH_EXACT, $matcher = false) { - $this->url = $url; - $this->path = $path; - $this->mode = $mode; - $this->matcher = $matcher; - $this->requestArgs = $requestArgs; - } - - /** - * @return bool - */ - public function fileExists() { - return file_exists($this->path); - } - - /** - * @return bool - */ - public function isPubliclyAccessible() { - $this->response = wp_remote_get($this->url, $this->requestArgs); - if ((int) floor(((int) wp_remote_retrieve_response_code($this->response) / 100)) === 2) { - $handle = @fopen($this->path, 'r'); - if ($handle) { - $contents = fread($handle, 700); - fclose($handle); - $remoteContents = substr(wp_remote_retrieve_body($this->response), 0, 700); - if ($this->mode == self::MATCH_REGEX) { - return preg_match($this->matcher, $remoteContents); - } - //else MATCH_EXACT - return $contents === $remoteContents; - } - } - return false; - } - - /** - * @return string - */ - public function getUrl() { - return $this->url; - } - - /** - * @param string $url - */ - public function setUrl($url) { - $this->url = $url; - } - - /** - * @return string - */ - public function getPath() { - return $this->path; - } - - /** - * @param string $path - */ - public function setPath($path) { - $this->path = $path; - } - - /** - * @return array - */ - public function getRequestArgs() { - return $this->requestArgs; - } - - /** - * @param array $requestArgs - */ - public function setRequestArgs($requestArgs) { - $this->requestArgs = $requestArgs; - } - - /** - * @return mixed - */ - public function getResponse() { - return $this->response; - } -} - -class wfPubliclyAccessibleFileTest extends wfCommonBackupFileTest { - -} - -class wfScanEngineDurationLimitException extends Exception { -} - -class wfScanEngineCoreVersionChangeException extends Exception { -} - -class wfScanEngineTestCallbackFailedException extends Exception { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfScanEntrypoint.php b/wp/wp-content/plugins/wordfence/lib/wfScanEntrypoint.php deleted file mode 100644 index 72266a85..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScanEntrypoint.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -class wfScanEntrypoint { - - private $file; - private $included; - - public function __construct($file, $included = false) { - $this->file = $file; - $this->included = $included; - } - - public function getKey() { - return $this->file->getRealPath(); - } - - public function setIncluded($included = true) { - $this->included = $included; - return $this; - } - - public function isIncluded() { - return $this->included; - } - - public function getFile() { - return $this->file; - } - - public function addTo(&$entrypoints) { - $key = $this->getKey(); - if (array_key_exists($key, $entrypoints)) { - if ($this->isIncluded()) - $entrypoints[$key]->setIncluded(); - } - else { - $entrypoints[$key] = $this; - } - } - - public static function getScannedSkippedFiles($entrypoints) { - $scanned = array(); - $skipped = array(); - foreach ($entrypoints as $entrypoint) { - if ($entrypoint->isIncluded()) { - $scanned[] = $entrypoint->getFile(); - } - else { - $skipped[] = $entrypoint->getFile(); - } - } - return array( - 'scanned' => $scanned, - 'skipped' => $skipped - ); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfScanFile.php b/wp/wp-content/plugins/wordfence/lib/wfScanFile.php deleted file mode 100644 index d3a23367..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScanFile.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -require_once __DIR__ . '/wfFileUtils.php'; - -class wfScanFile { - - private $realPath = null; - private $wordpressPath = null; - - public function __construct($realPath, $wordpressPath) { - $this->realPath = $realPath; - $this->wordpressPath = $wordpressPath; - } - - public function getRealPath() { - return $this->realPath; - } - - public function getWordpressPath() { - return $this->wordpressPath; - } - - public function getDisplayPath() { - if (wfFileUtils::matchPaths($this->realPath, $this->wordpressPath)) { - return '~/' . $this->getWordpressPath(); - } - return $this->realPath; - } - - public function createChild($childPath) { - return new self( - wfFileUtils::realPath(wfFileUtils::joinPaths($this->realPath, $childPath)), - wfFileUtils::joinPaths($this->wordpressPath, $childPath) - ); - } - - public function __toString() { - return $this->getRealPath(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfScanFileLink.php b/wp/wp-content/plugins/wordfence/lib/wfScanFileLink.php deleted file mode 100644 index ef5ed7bd..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScanFileLink.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -require_once __DIR__ . '/wfScanFile.php'; - -class wfScanFileLink extends wfScanFile { - - private $linkPath; - - public function __construct($linkPath, $realPath, $wordpressPath) { - parent::__construct($realPath, $wordpressPath); - $this->linkPath = $linkPath; - } - - public function getLinkPath() { - return $this->linkPath; - } - - public function getDisplayPath() { - return $this->getLinkPath(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfScanMonitor.php b/wp/wp-content/plugins/wordfence/lib/wfScanMonitor.php deleted file mode 100644 index cd3deaf7..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScanMonitor.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -class wfScanMonitor { - - const CRON_INTERVAL_NAME = 'wf_scan_monitor_interval'; - const CRON_INTERVAL_AMOUNT = 60; //Seconds - const CRON_HOOK = 'wf_scan_monitor'; - - const CONFIG_LAST_ATTEMPT = 'scanMonitorLastAttempt'; - const CONFIG_LAST_ATTEMPT_WAS_FORK = 'scanMonitorLastAttemptWasFork'; - const CONFIG_LAST_ATTEMPT_MODE = 'scanMonitorLastAttemptMode'; - const CONFIG_LAST_SUCCESS = 'scanMonitorLastSuccess'; - const CONFIG_MAX_RESUME_ATTEMPTS = 'scan_max_resume_attempts'; - const CONFIG_REMAINING_RESUME_ATTEMPTS = 'scanMonitorRemainingResumeAttempts'; - - const DEFAULT_RESUME_ATTEMPTS = 2; - const MAX_RESUME_ATTEMPTS = 5; - const SCAN_START_TIMEOUT = 30; //Seconds - - public static function beginMonitoring() { - if (wp_next_scheduled(self::CRON_HOOK)) - return; - wp_schedule_event(time(), self::CRON_INTERVAL_NAME, self::CRON_HOOK); - } - - public static function endMonitoring() { - $timestamp = wp_next_scheduled(self::CRON_HOOK); - if ($timestamp !== false) - wp_unschedule_event($timestamp, self::CRON_HOOK); - } - - public static function validateResumeAttempts($attempts, &$valid = null) { - if ($attempts < 0 || $attempts > self::MAX_RESUME_ATTEMPTS) { - $valid = false; - return self::DEFAULT_RESUME_ATTEMPTS; - } - $valid = true; - return $attempts; - } - - private static function setRemainingResumeAttempts($attempts) { - wfConfig::set(self::CONFIG_REMAINING_RESUME_ATTEMPTS, $attempts); - } - - public static function getConfiguredResumeAttempts() { - $attempts = (int) wfConfig::get(self::CONFIG_MAX_RESUME_ATTEMPTS, self::DEFAULT_RESUME_ATTEMPTS); - return self::validateResumeAttempts($attempts); - } - - private static function resetResumeAttemptCounter() { - $attempts = self::getConfiguredResumeAttempts(); - self::setRemainingResumeAttempts($attempts); - return $attempts; - } - - private static function getRemainingResumeAttempts() { - $attempts = (int) wfConfig::get(self::CONFIG_REMAINING_RESUME_ATTEMPTS, 0); - return self::validateResumeAttempts($attempts); - } - - public static function handleScanStart($mode) { - wfConfig::set(self::CONFIG_LAST_ATTEMPT_MODE, $mode); - $maxAttempts = self::resetResumeAttemptCounter(); - if ($maxAttempts > 0) - self::beginMonitoring(); - } - - public static function monitorScan() { - $remainingAttempts = self::getRemainingResumeAttempts(); - if ($remainingAttempts > 0) { - $now = time(); - $lastAttempt = wfConfig::get(self::CONFIG_LAST_ATTEMPT); - if ($lastAttempt === null || $now - $lastAttempt < self::SCAN_START_TIMEOUT) - return; - $lastSuccess = wfConfig::get(self::CONFIG_LAST_SUCCESS); - self::setRemainingResumeAttempts(--$remainingAttempts); - if ($lastSuccess === null || $lastAttempt > $lastSuccess) { - wordfence::status(2, 'info', sprintf(__('Attempting to resume scan stage (%d attempt(s) remaining)...', 'wordfence'), $remainingAttempts)); - self::resumeScan(); - } - } - else { - self::endMonitoring(); - } - } - - private static function resumeScan() { - $mode = wfConfig::get(self::CONFIG_LAST_ATTEMPT_MODE); - if (!wfScanner::isValidScanType($mode)) - $mode = false; - wfScanEngine::startScan(wfConfig::get(self::CONFIG_LAST_ATTEMPT_WAS_FORK), $mode, true); - } - - private static function logTimestamp($key) { - wfConfig::set($key, time()); - } - - public static function logLastAttempt($fork) { - self::logTimestamp(self::CONFIG_LAST_ATTEMPT); - wfConfig::set(self::CONFIG_LAST_ATTEMPT_WAS_FORK, $fork); - } - - public static function logLastSuccess() { - self::logTimestamp(self::CONFIG_LAST_SUCCESS); - } - - public static function handleStageStart($fork) { - if ($fork) - self::resetResumeAttemptCounter(); - } - - public static function registerCronInterval($schedules) { - if (!array_key_exists(self::CRON_INTERVAL_NAME, $schedules)) { - $schedules[self::CRON_INTERVAL_NAME] = array( - 'interval' => self::CRON_INTERVAL_AMOUNT, - 'display' => 'Wordfence Scan Monitor' - ); - } - return $schedules; - } - - public static function registerActions() { - add_filter('cron_schedules', array(self::class, 'registerCronInterval')); - add_action(self::CRON_HOOK, array(self::class, 'monitorScan')); - } - - public static function handleDeactivation() { - self::endMonitoring(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfScanPath.php b/wp/wp-content/plugins/wordfence/lib/wfScanPath.php deleted file mode 100644 index 441bdcb3..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfScanPath.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -require_once __DIR__ . '/wfFileUtils.php'; -require_once __DIR__ . '/wfScanFile.php'; -require_once __DIR__ . '/wfScanFileLink.php'; - -class wfScanPath { - - private $baseDirectory; - private $path; - private $realPath; - private $wordpressPath; - private $expectedFiles; - - public function __construct($baseDirectory, $path, $wordpressPath = null, $expectedFiles = null) { - $this->baseDirectory = $baseDirectory; - $this->path = $path; - $this->realPath = wfFileUtils::realPath($path); - $this->wordpressPath = $wordpressPath; - $this->expectedFiles = is_array($expectedFiles) ? array_flip($expectedFiles) : null; - } - - public function getPath() { - return $this->path; - } - - public function getRealPath() { - return $this->realPath; - } - - public function getWordpressPath() { - return $this->wordpressPath; - } - - public function hasExpectedFiles() { - return $this->expectedFiles !== null && !empty($this->expectedFiles); - } - - public function expectsFile($name) { - return array_key_exists($name, $this->expectedFiles); - } - - public function isBaseDirectory() { - return $this->path === $this->baseDirectory; - } - - public function isBelowBaseDirectory() { - return wfFileUtils::belongsTo($this->path, $this->baseDirectory); - } - - public function getContents() { - return wfFileUtils::getContents($this->realPath); - } - - public function createScanFile($relativePath) { - $path = wfFileUtils::joinPaths($this->realPath, $relativePath); - $realPath = wfFileUtils::realPath($path); - $wordpressPath = wfFileUtils::trimSeparators(wfFileUtils::joinPaths($this->wordpressPath, $relativePath), true, false); - if (is_link($path)) { - return new wfScanFileLink($path, $realPath, $wordpressPath); - } - else { - return new wfScanFile($realPath, $wordpressPath); - } - } - - public function __toString() { - return $this->realPath; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfSchema.php b/wp/wp-content/plugins/wordfence/lib/wfSchema.php deleted file mode 100644 index 75f13a85..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfSchema.php +++ /dev/null @@ -1,310 +0,0 @@ -<?php -require_once(dirname(__FILE__) . '/wfDB.php'); -class wfSchema { - const TABLE_CASE_OPTION = 'wordfence_case'; //false is camel case, true is lower - - private static $_usingLowercase = null; - private static $deprecatedTables = array( - 'wfBlocks', - 'wfBlocksAdv', - 'wfLockedOut', - 'wfThrottleLog', - 'wfNet404s', - 'wfBlockedCommentLog', - 'wfVulnScanners', - 'wfBadLeechers', - 'wfLeechers', - 'wfScanners', - ); - - private static $tables = array( -"wfSecurityEvents" => "( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `type` varchar(255) NOT NULL DEFAULT '', - `data` text NOT NULL, - `event_time` double(14,4) NOT NULL, - `state` enum('new','sending','sent') NOT NULL DEFAULT 'new', - `state_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8", -"wfBlocks7" => "( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `type` int(10) unsigned NOT NULL DEFAULT '0', - `IP` binary(16) NOT NULL DEFAULT '\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0\\\0', - `blockedTime` bigint(20) NOT NULL, - `reason` varchar(255) NOT NULL, - `lastAttempt` int(10) unsigned DEFAULT '0', - `blockedHits` int(10) unsigned DEFAULT '0', - `expiration` bigint(20) unsigned NOT NULL DEFAULT '0', - `parameters` text, - PRIMARY KEY (`id`), - KEY `type` (`type`), - KEY `IP` (`IP`), - KEY `expiration` (`expiration`) -) DEFAULT CHARSET=utf8", -"wfConfig" => "( - `name` varchar(100) NOT NULL, - `val` longblob, - `autoload` enum('no','yes') NOT NULL DEFAULT 'yes', - PRIMARY KEY (`name`) -) DEFAULT CHARSET=utf8", -"wfCrawlers" => "( - `IP` binary(16) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `patternSig` binary(16) NOT NULL, - `status` char(8) NOT NULL, - `lastUpdate` int(10) unsigned NOT NULL, - `PTR` varchar(255) DEFAULT '', - PRIMARY KEY (`IP`,`patternSig`) -) DEFAULT CHARSET=utf8", -"wfFileChanges" => "( - `filenameHash` char(64) NOT NULL, - `file` varchar(1000) NOT NULL, - `md5` char(32) NOT NULL, - PRIMARY KEY (`filenameHash`) -) CHARSET=utf8", -"wfHits" => "( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `attackLogTime` double(17,6) unsigned NOT NULL, - `ctime` double(17,6) unsigned NOT NULL, - `IP` binary(16) DEFAULT NULL, - `jsRun` tinyint(4) DEFAULT '0', - `statusCode` int(11) NOT NULL DEFAULT '200', - `isGoogle` tinyint(4) NOT NULL, - `userID` int(10) unsigned NOT NULL, - `newVisit` tinyint(3) unsigned NOT NULL, - `URL` text, - `referer` text, - `UA` text, - `action` varchar(64) NOT NULL DEFAULT '', - `actionDescription` text, - `actionData` text, - PRIMARY KEY (`id`), - KEY `k1` (`ctime`), - KEY `k2` (`IP`,`ctime`), - KEY `attackLogTime` (`attackLogTime`) -) DEFAULT CHARSET=utf8", -"wfIssues" => "( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `time` int(10) unsigned NOT NULL, - `lastUpdated` int(10) unsigned NOT NULL, - `status` varchar(10) NOT NULL, - `type` varchar(20) NOT NULL, - `severity` tinyint(3) unsigned NOT NULL, - `ignoreP` char(32) NOT NULL, - `ignoreC` char(32) NOT NULL, - `shortMsg` varchar(255) NOT NULL, - `longMsg` text, - `data` text, - PRIMARY KEY (`id`), - KEY `lastUpdated` (`lastUpdated`), - KEY `status` (`status`), - KEY `ignoreP` (`ignoreP`), - KEY `ignoreC` (`ignoreC`) -) DEFAULT CHARSET=utf8", -"wfPendingIssues" => "( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `time` int(10) unsigned NOT NULL, - `lastUpdated` int(10) unsigned NOT NULL, - `status` varchar(10) NOT NULL, - `type` varchar(20) NOT NULL, - `severity` tinyint(3) unsigned NOT NULL, - `ignoreP` char(32) NOT NULL, - `ignoreC` char(32) NOT NULL, - `shortMsg` varchar(255) NOT NULL, - `longMsg` text, - `data` text, - PRIMARY KEY (`id`), - KEY `lastUpdated` (`lastUpdated`), - KEY `status` (`status`), - KEY `ignoreP` (`ignoreP`), - KEY `ignoreC` (`ignoreC`) -) DEFAULT CHARSET=utf8", -"wfTrafficRates" => "( - `eMin` int(10) unsigned NOT NULL, - `IP` binary(16) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `hitType` enum('hit','404') NOT NULL DEFAULT 'hit', - `hits` int(10) unsigned NOT NULL, - PRIMARY KEY (`eMin`,`IP`,`hitType`) -) DEFAULT CHARSET=utf8", -"wfLocs" => "( - `IP` binary(16) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `ctime` int(10) unsigned NOT NULL, - `failed` tinyint(3) unsigned NOT NULL, - `city` varchar(255) DEFAULT '', - `region` varchar(255) DEFAULT '', - `countryName` varchar(255) DEFAULT '', - `countryCode` char(2) DEFAULT '', - `lat` float(10,7) DEFAULT '0.0000000', - `lon` float(10,7) DEFAULT '0.0000000', - PRIMARY KEY (`IP`) -) DEFAULT CHARSET=utf8", -"wfLogins" => "( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `hitID` int(11) DEFAULT NULL, - `ctime` double(17,6) unsigned NOT NULL, - `fail` tinyint(3) unsigned NOT NULL, - `action` varchar(40) NOT NULL, - `username` varchar(255) NOT NULL, - `userID` int(10) unsigned NOT NULL, - `IP` binary(16) DEFAULT NULL, - `UA` text, - PRIMARY KEY (`id`), - KEY `k1` (`IP`,`fail`), - KEY `hitID` (`hitID`) -) DEFAULT CHARSET=utf8", -"wfReverseCache" => "( - `IP` binary(16) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `host` varchar(255) NOT NULL, - `lastUpdate` int(10) unsigned NOT NULL, - PRIMARY KEY (`IP`) -) DEFAULT CHARSET=utf8", -"wfStatus" => "( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `ctime` double(17,6) unsigned NOT NULL, - `level` tinyint(3) unsigned NOT NULL, - `type` char(5) NOT NULL, - `msg` varchar(1000) NOT NULL, - PRIMARY KEY (`id`), - KEY `k1` (`ctime`), - KEY `k2` (`type`) -) DEFAULT CHARSET=utf8", -'wfHoover' => "( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `owner` text, - `host` text, - `path` text, - `hostKey` varbinary(124) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `k2` (`hostKey`) -) DEFAULT CHARSET=utf8", -'wfFileMods' => "( - `filenameMD5` binary(16) NOT NULL, - `filename` varchar(1000) NOT NULL, - `knownFile` tinyint(3) unsigned NOT NULL, - `oldMD5` binary(16) NOT NULL, - `newMD5` binary(16) NOT NULL, - `SHAC` binary(32) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `stoppedOnSignature` varchar(255) NOT NULL DEFAULT '', - `stoppedOnPosition` int(10) unsigned NOT NULL DEFAULT '0', - `isSafeFile` varchar(1) NOT NULL DEFAULT '?', - PRIMARY KEY (`filenameMD5`) -) DEFAULT CHARSET=utf8", -'wfBlockedIPLog' => "( - `IP` binary(16) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `countryCode` varchar(2) NOT NULL, - `blockCount` int(10) unsigned NOT NULL DEFAULT '0', - `unixday` int(10) unsigned NOT NULL, - `blockType` varchar(50) NOT NULL DEFAULT 'generic', - PRIMARY KEY (`IP`,`unixday`,`blockType`) -) DEFAULT CHARSET=utf8", -'wfSNIPCache' => "( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `IP` varchar(45) NOT NULL DEFAULT '', - `expiration` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `body` varchar(255) NOT NULL DEFAULT '', - `count` int(10) unsigned NOT NULL DEFAULT '0', - `type` int(10) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `expiration` (`expiration`), - KEY `IP` (`IP`), - KEY `type` (`type`) -) DEFAULT CHARSET=utf8", -'wfKnownFileList' => "( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `path` text NOT NULL, - PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8", -'wfNotifications' => "( - `id` varchar(32) NOT NULL DEFAULT '', - `new` tinyint(3) unsigned NOT NULL DEFAULT '1', - `category` varchar(255) NOT NULL, - `priority` int(11) NOT NULL DEFAULT '1000', - `ctime` int(10) unsigned NOT NULL, - `html` text NOT NULL, - `links` text NOT NULL, - PRIMARY KEY (`id`) -) DEFAULT CHARSET=utf8;", -'wfLiveTrafficHuman' => "( - `IP` binary(16) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `identifier` binary(32) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0', - `expiration` int(10) unsigned NOT NULL, - PRIMARY KEY (`IP`,`identifier`), - KEY `expiration` (`expiration`) -) DEFAULT CHARSET=utf8;", -'wfWafFailures' => "( - `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, - `throwable` TEXT NOT NULL, - `rule_id` INT(10) UNSIGNED, - `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP -) DEFAULT CHARSET=utf8" -); - private $db = false; - public function __construct($dbhost = false, $dbuser = false, $dbpassword = false, $dbname = false){ - $this->db = new wfDB(); - } - public function dropAll(){ - foreach(self::$tables as $table => $def) { - $originalTable = wfDB::networkPrefix() . $table; - $convertedTable = wfDB::networkPrefix() . strtolower($table); - - $this->db->queryWrite("DROP TABLE IF EXISTS {$convertedTable}"); - $this->db->queryWrite("DROP TABLE IF EXISTS {$originalTable}"); - } - - foreach (self::$deprecatedTables as $table) { - $originalTable = wfDB::networkTable($table, false); - $convertedTable = wfDB::networkTable($table); - - $this->db->queryWrite("DROP TABLE IF EXISTS {$convertedTable}"); - if ($originalTable !== $convertedTable) { - $this->db->queryWrite("DROP TABLE IF EXISTS {$originalTable}"); - } - } - } - public function createAll() { - foreach(self::$tables as $table => $def){ - $this->db->queryWrite("CREATE TABLE IF NOT EXISTS " . wfDB::networkTable($table) . " " . $def); - } - } - public function create($table) { - $this->db->queryWrite("CREATE TABLE IF NOT EXISTS " . wfDB::networkTable($table) . " " . self::$tables[$table]); - } - public function drop($table) { - $originalTable = wfDB::networkTable($table, false); - $convertedTable = wfDB::networkTable($table); - - $this->db->queryWrite("DROP TABLE IF EXISTS {$convertedTable}"); - if ($originalTable !== $convertedTable) { - $this->db->queryWrite("DROP TABLE IF EXISTS {$originalTable}"); - } - } - - public static function tableList() { - return array_keys(self::$tables); - } - - public static function updateTableCase() { - global $wpdb; - $hasCamelCaseTable = !!$wpdb->get_var($wpdb->prepare('SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME=%s', wfDB::networkTable('wfConfig', false))); - if (is_multisite() && function_exists('update_network_option')) { - update_network_option(null, self::TABLE_CASE_OPTION, !$hasCamelCaseTable); - self::$_usingLowercase = !$hasCamelCaseTable; - } - else { - update_option(self::TABLE_CASE_OPTION, !$hasCamelCaseTable); - self::$_usingLowercase = !$hasCamelCaseTable; - } - } - - public static function usingLowercase() { - if (self::$_usingLowercase === null) { - if (is_multisite() && function_exists('update_network_option')) { - self::$_usingLowercase = !!get_network_option(null, self::TABLE_CASE_OPTION); - } - else { - self::$_usingLowercase = !!get_option(self::TABLE_CASE_OPTION); - } - } - return self::$_usingLowercase; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfStyle.php b/wp/wp-content/plugins/wordfence/lib/wfStyle.php deleted file mode 100644 index 5d67f38c..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfStyle.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -class wfStyle { - /** - * Returns the classes for the main content body of the page, adjusting for the paid status. - * - * @return string - */ - public static function contentClasses() { - if (wfConfig::get('isPaid')) { - return 'wf-col-xs-12'; - } - return 'wf-col-xs-12'; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfSupportController.php b/wp/wp-content/plugins/wordfence/lib/wfSupportController.php deleted file mode 100644 index 7bcf9bf1..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfSupportController.php +++ /dev/null @@ -1,438 +0,0 @@ -<?php - -class wfSupportController { - const ITEM_INDEX = 'index'; - const ITEM_FREE = 'free'; - const ITEM_PREMIUM = 'premium'; - - const ITEM_CHANGELOG = 'changelog'; - - const ITEM_NOTICE_WAF_INACCESSIBLE_CONFIG = 'notice-waf-inaccessible-config'; - const ITEM_NOTICE_WAF_MOD_PHP_FIX = 'notice-waf-mod-php-fix'; - const ITEM_NOTICE_WAF_READ_ONLY_WARNING = 'notice-waf-read-only-warning'; - const ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS = 'notice-misconfigured-how-get-ips'; - const ITEM_NOTICE_SWITCH_LIVE_TRAFFIC = 'notice-switch-live-traffic'; - - const ITEM_LOCKED_OUT = 'locked-out'; - const ITEM_AJAX_BLOCKED = 'ajax-blocked'; - const ITEM_USING_BREACH_PASSWORD = 'using-breach-password'; - - const ITEM_WIDGET_LOCAL_ATTACKS = 'widget-local-attacks'; - - const ITEM_VERSION_WORDPRESS = 'version-wordpress'; - const ITEM_VERSION_PHP = 'version-php'; - const ITEM_VERSION_OPENSSL = 'version-ssl'; - - const ITEM_GDPR = 'gdpr'; - const ITEM_GDPR_DPA = 'gdpr-dpa'; - - const ITEM_GENERAL_REMOTE_IP_LOOKUP = 'general-remote-ip-lookup'; - - const ITEM_DASHBOARD = 'dashboard'; - const ITEM_DASHBOARD_STATUS_FIREWALL = 'dashboard-status-firewall'; - const ITEM_DASHBOARD_STATUS_SCAN = 'dashboard-status-scan'; - const ITEM_DASHBOARD_OPTIONS = 'dashboard-options'; - const ITEM_DASHBOARD_OPTION_API_KEY = 'dashboard-option-api-key'; - const ITEM_DASHBOARD_OPTION_HOW_GET_IPS = 'dashboard-option-how-get-ips'; - const ITEM_DASHBOARD_OPTION_AUTOMATIC_UPDATE = 'dashboard-option-automatic-update'; - const ITEM_DASHBOARD_OPTION_ALERT_EMAILS = 'dashboard-option-alert-emails'; - const ITEM_DASHBOARD_OPTION_HIDE_VERSION = 'dashboard-option-hide-version'; - const ITEM_DASHBOARD_OPTION_DISABLE_UPLOADS_EXECUTION = 'dashboard-option-disable-uploads-execution'; - const ITEM_DASHBOARD_OPTION_DISABLE_COOKIES = 'dashboard-option-disable-cookies'; - const ITEM_DASHBOARD_OPTION_PAUSE_LIVE_UPDATES = 'dashboard-option-pause-live-updates'; - const ITEM_DASHBOARD_OPTION_UPDATE_INTERVAL = 'dashboard-option-refresh-period'; - const ITEM_DASHBOARD_OPTION_LITESPEED_WARNING = 'dashboard-litespeed-warning'; - const ITEM_DASHBOARD_OPTION_BYPASS_LITESPEED_CHECK = 'dashboard-option-bypass-litespeed-check'; - const ITEM_DASHBOARD_OPTION_DELETE_DEACTIVATION = 'dashboard-option-delete-deactivation'; - const ITEM_DASHBOARD_OPTION_EXPORT = 'dashboard-option-export'; - const ITEM_DASHBOARD_OPTION_IMPORT = 'dashboard-option-import'; - - const ITEM_FIREWALL_WAF = 'firewall-waf'; - const ITEM_FIREWALL_WAF_STATUS_OVERALL = 'firewall-waf-status-overall'; - const ITEM_FIREWALL_WAF_STATUS_RULES = 'firewall-waf-status-rules'; - const ITEM_FIREWALL_WAF_STATUS_BLACKLIST = 'firewall-waf-status-blacklist'; - const ITEM_FIREWALL_WAF_STATUS_BRUTE_FORCE = 'firewall-waf-status-brute-force'; - const ITEM_FIREWALL_WAF_INSTALL_MANUALLY = 'firewall-waf-install-manually'; - const ITEM_FIREWALL_WAF_INSTALL_NGINX = 'firewall-waf-install-nginx'; - const ITEM_FIREWALL_WAF_REMOVE_MANUALLY = 'firewall-waf-remove-manually'; - const ITEM_FIREWALL_WAF_LEARNING_MODE = 'firewall-waf-learning-mode'; - const ITEM_FIREWALL_WAF_RULES = 'firewall-waf-rules'; - const ITEM_FIREWALL_WAF_WHITELIST = 'firewall-waf-whitelist'; - const ITEM_FIREWALL_WAF_OPTION_DELAY_BLOCKING = 'firewall-waf-option-delay-blocking'; - const ITEM_FIREWALL_WAF_OPTION_WHITELISTED_IPS = 'firewall-waf-option-whitelisted-ips'; - const ITEM_FIREWALL_WAF_OPTION_WHITELISTED_SERVICES = 'firewall-waf-option-whitelisted-services'; - const ITEM_FIREWALL_WAF_IGNORED_ALERT_IPS = 'firewall-waf-option-ignored-alert-ips'; - const ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_BLOCK_URLS = 'firewall-waf-option-immediately-block-urls'; - const ITEM_FIREWALL_WAF_OPTION_ENABLE_LOGIN_SECURITY = 'firewall-waf-option-enable-login-security'; - const ITEM_FIREWALL_WAF_OPTION_LOCK_OUT_FAILURE_COUNT = 'firewall-waf-option-lock-out-failure-count'; - const ITEM_FIREWALL_WAF_OPTION_LOCK_OUT_FORGOT_PASSWORD_COUNT = 'firewall-waf-option-lock-out-forgot-password-count'; - const ITEM_FIREWALL_WAF_OPTION_COUNT_TIME_PERIOD = 'firewall-waf-option-count-time-period'; - const ITEM_FIREWALL_WAF_OPTION_LOCKOUT_DURATION = 'firewall-waf-option-lockout-duration'; - const ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_LOCK_OUT_INVALID_USERS = 'firewall-waf-option-immediately-lock-out-invalid-users'; - const ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_BLOCK_USERS = 'firewall-waf-option-immediately-block-users'; - const ITEM_FIREWALL_WAF_OPTION_ENFORCE_STRONG_PASSWORDS = 'firewall-waf-option-enforce-strong-passwords'; - const ITEM_FIREWALL_WAF_OPTION_PREVENT_BREACH_PASSWORDS = 'firewall-waf-option-prevent-breach-passwords'; - const ITEM_FIREWALL_WAF_OPTION_MASK_LOGIN_ERRORS = 'firewall-waf-option-mask-login-errors'; - const ITEM_FIREWALL_WAF_OPTION_PREVENT_ADMIN_REGISTRATION = 'firewall-waf-option-prevent-admin-registration'; - const ITEM_FIREWALL_WAF_OPTION_PREVENT_AUTHOR_SCAN = 'firewall-waf-option-prevent-author-scan'; - const ITEM_FIREWALL_WAF_OPTION_DISABLE_APPLICATION_PASSWORDS = 'firewall-waf-option-disable-application-passwords'; - const ITEM_FIREWALL_WAF_OPTION_BLOCK_BAD_POST = 'firewall-waf-option-block-bad-post'; - const ITEM_FIREWALL_WAF_OPTION_CUSTOM_BLOCK_TEXT = 'firewall-waf-option-custom-block-text'; - const ITEM_FIREWALL_WAF_OPTION_CHECK_PASSWORD = 'firewall-waf-option-check-password'; - const ITEM_FIREWALL_WAF_OPTION_PARTICIPATE_WFSN = 'firewall-waf-option-participate-wfsn'; - const ITEM_FIREWALL_WAF_OPTION_ENABLE_ADVANCED_BLOCKING = 'firewall-waf-option-enable-advanced-blocking'; - const ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_BLOCK_FAKE_GOOGLE = 'firewall-waf-option-immediately-block-fake-google'; - const ITEM_FIREWALL_WAF_OPTION_GOOGLE_ACTION = 'firewall-waf-option-google-action'; - const ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_ANY = 'firewall-waf-option-rate-limit-any'; - const ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_CRAWLER = 'firewall-waf-option-rate-limit-crawler'; - const ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_CRAWLER_404 = 'firewall-waf-option-rate-limit-crawler-404'; - const ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_HUMAN = 'firewall-waf-option-rate-limit-human'; - const ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_HUMAN_404 = 'firewall-waf-option-rate-limit-human-404'; - const ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_ANY_404 = 'firewall-waf-option-rate-limit-any-404'; - const ITEM_FIREWALL_WAF_OPTION_AUTOMATIC_BLOCK_DURATION = 'firewall-waf-option-automatic-block-duration'; - const ITEM_FIREWALL_WAF_OPTION_WHITELISTED_404 = 'firewall-waf-option-whitelisted-404'; - const ITEM_FIREWALL_WAF_OPTION_MONITOR_AJAX = 'firewall-waf-option-monitor-ajax'; - - const ITEM_FIREWALL_BLOCKING = 'firewall-blocking'; - const ITEM_FIREWALL_BLOCKING_FILTER = 'firewall-blocking-filter'; - const ITEM_FIREWALL_BLOCKING_OPTION_WHAT_TO_DO = 'firewall-blocking-option-what-to-do'; - const ITEM_FIREWALL_BLOCKING_OPTION_REDIRECT = 'firewall-blocking-option-redirect'; - const ITEM_FIREWALL_BLOCKING_OPTION_BLOCK_LOGGED_IN = 'firewall-blocking-option-block-logged-in'; - const ITEM_FIREWALL_BLOCKING_BYPASS_COOKIE = 'firewall-blocking-bypass-cookie'; - const ITEM_FIREWALL_BLOCKING_BYPASS_REDIRECT = 'firewall-blocking-bypass-redirect'; - const ITEM_FIREWALL_BLOCKING_FULL_SITE = 'firewall-blocking-full-site'; - - const ITEM_FIREWALL_REMOVE_OPTIMIZATION = 'firewall-remove-optimization'; - - const ITEM_SCAN = 'scan'; - const ITEM_SCAN_STATUS_OVERALL = 'scan-status-overall'; - const ITEM_SCAN_STATUS_MALWARE = 'scan-status-malware'; - const ITEM_SCAN_STATUS_REPUTATION = 'scan-status-reputation'; - const ITEM_SCAN_OPTION_CHECK_SITE_BLACKLISTED = 'scan-option-check-site-blacklisted'; - const ITEM_SCAN_OPTION_CHECK_SITE_SPAMVERTIZED = 'scan-option-check-site-spamvertized'; - const ITEM_SCAN_OPTION_CHECK_IP_SPAMMING = 'scan-option-ip-spamming'; - const ITEM_SCAN_OPTION_CHECK_MISCONFIGURED_HOW_GET_IPS = 'scan-option-misconfigured-how-get-ips'; - const ITEM_SCAN_OPTION_PUBLIC_CONFIG = 'scan-option-public-config'; - const ITEM_SCAN_OPTION_PUBLIC_QUARANTINED = 'scan-option-public-quarantined'; - const ITEM_SCAN_OPTION_CORE_CHANGES = 'scan-option-core-changes'; - const ITEM_SCAN_OPTION_THEME_CHANGES = 'scan-option-theme-changes'; - const ITEM_SCAN_OPTION_PLUGIN_CHANGES = 'scan-option-plugin-changes'; - const ITEM_SCAN_OPTION_UNKNOWN_CORE = 'scan-option-unknown-core'; - const ITEM_SCAN_OPTION_MALWARE_HASHES = 'scan-option-malware-hashes'; - const ITEM_SCAN_OPTION_MALWARE_SIGNATURES = 'scan-option-malware-signatures'; - const ITEM_SCAN_OPTION_MALWARE_URLS = 'scan-option-malware-urls'; - const ITEM_SCAN_OPTION_POST_URLS = 'scan-option-post-urls'; - const ITEM_SCAN_OPTION_COMMENT_URLS = 'scan-option-comment-urls'; - const ITEM_SCAN_OPTION_MALWARE_OPTIONS = 'scan-option-malware-options'; - const ITEM_SCAN_OPTION_UPDATES = 'scan-option-updates'; - const ITEM_SCAN_OPTION_UNKNOWN_ADMINS = 'scan-option-unknown-admins'; - const ITEM_SCAN_OPTION_PASSWORD_STRENGTH = 'scan-option-password-strength'; - const ITEM_SCAN_OPTION_DISK_SPACE = 'scan-option-disk-space'; - const ITEM_SCAN_OPTION_WAF_STATUS = 'scan-option-waf-status'; - const ITEM_SCAN_OPTION_OUTSIDE_WORDPRESS = 'scan-option-outside-wordpress'; - const ITEM_SCAN_OPTION_IMAGES_EXECUTABLE = 'scan-option-images-executable'; - const ITEM_SCAN_OPTION_HIGH_SENSITIVITY = 'scan-option-high-sensitivity'; - const ITEM_SCAN_OPTION_LOW_RESOURCE = 'scan-option-low-resource'; - const ITEM_SCAN_OPTION_LIMIT_ISSUES = 'scan-option-limit-issues'; - const ITEM_SCAN_OPTION_OVERALL_TIME_LIMIT = 'scan-option-overall-time-limit'; - const ITEM_SCAN_OPTION_MEMORY_LIMIT = 'scan-option-memory-limit'; - const ITEM_SCAN_OPTION_STAGE_TIME_LIMIT = 'scan-option-stage-time-limit'; - const ITEM_SCAN_OPTION_EXCLUDE_PATTERNS = 'scan-option-exclude-patterns'; - const ITEM_SCAN_OPTION_CUSTOM_MALWARE_SIGNATURES = 'scan-option-custom-malware-signatures'; - const ITEM_SCAN_OPTION_MAX_RESUME_ATTEMPTS = 'scan-option-max-resume-attempts'; - const ITEM_SCAN_OPTION_USE_ONLY_IPV4 = 'scan-option-use-only-ipv4'; - const ITEM_SCAN_TIME_LIMIT = 'scan-time-limit'; - const ITEM_SCAN_FAILS = 'scan-fails'; - const ITEM_SCAN_FAILED_START = 'scan-failed-start'; - const ITEM_SCAN_BULK_DELETE_WARNING = 'scan-bulk-delete-warning'; - const ITEM_SCAN_SCHEDULING = 'scan-scheduling'; - const ITEM_SCAN_RESULT_PUBLIC_CONFIG = 'scan-result-public-config'; - const ITEM_SCAN_RESULT_PLUGIN_ABANDONED = 'scan-result-plugin-abandoned'; - const ITEM_SCAN_RESULT_PLUGIN_REMOVED = 'scan-result-plugin-removed'; - const ITEM_SCAN_RESULT_UPDATE_CHECK_FAILED = 'scan-result-update-check-failed'; - const ITEM_SCAN_RESULT_OPTION_MALWARE_URL = 'scan-result-option-malware-url'; - const ITEM_SCAN_RESULT_GEOIP_UPDATE = 'scan-result-geoip-update'; - const ITEM_SCAN_RESULT_WAF_DISABLED = 'scan-result-waf-disabled'; - const ITEM_SCAN_RESULT_UNKNOWN_FILE_CORE = 'scan-result-unknown-file-in-wordpress-core'; - const ITEM_SCAN_RESULT_SKIPPED_PATHS = 'scan-result-skipped-paths'; - const ITEM_SCAN_RESULT_REPAIR_MODIFIED_FILES = 'scan-result-repair-modified-files'; - const ITEM_SCAN_RESULT_MODIFIED_PLUGIN = 'scan-result-modified-plugin'; - const ITEM_SCAN_RESULT_MODIFIED_THEME = 'scan-result-modified-theme'; - const ITEM_SCAN_RESULT_PLUGIN_VULNERABLE = 'scan-result-plugin-vulnerable'; - - const ITEM_TOOLS_TWO_FACTOR = 'tools-two-factor'; - const ITEM_TOOLS_LIVE_TRAFFIC = 'tools-live-traffic'; - const ITEM_TOOLS_LIVE_TRAFFIC_OPTION_ENABLE = 'tools-live-traffic-option-enable'; - const ITEM_TOOLS_WHOIS_LOOKUP = 'tools-whois-lookup'; - const ITEM_TOOLS_IMPORT_EXPORT = 'tools-import-export'; - - const ITEM_DIAGNOSTICS = 'diagnostics'; - const ITEM_DIAGNOSTICS_SYSTEM_CONFIGURATION = 'diagnostics-system-configuration'; - const ITEM_DIAGNOSTICS_TEST_MEMORY = 'diagnostics-test-memory'; - const ITEM_DIAGNOSTICS_TEST_EMAIL = 'diagnostics-test-email'; - const ITEM_DIAGNOSTICS_TEST_ACTIVITY_REPORT = 'diagnostics-test-activity-report'; - const ITEM_DIAGNOSTICS_REMOVE_CENTRAL_DATA = 'diagnostics-remove-central-data'; - const ITEM_DIAGNOSTICS_OPTION_DEBUGGING_MODE = 'diagnostics-option-debugging-mode'; - const ITEM_DIAGNOSTICS_OPTION_REMOTE_SCANS = 'diagnostics-option-remote-scans'; - const ITEM_DIAGNOSTICS_OPTION_SSL_VERIFICATION = 'diagnostics-option-ssl-verification'; - const ITEM_DIAGNOSTICS_OPTION_DISABLE_PHP_INPUT = 'diagnostics-option-disable-php-input'; - const ITEM_DIAGNOSTICS_OPTION_BETA_TDF = 'diagnostics-option-beta-tdf'; - const ITEM_DIAGNOSTICS_OPTION_WORDFENCE_TRANSLATIONS = 'diagnostics-option-wordfence-translations'; - const ITEM_DIAGNOSTICS_IPV6 = 'diagnostics-ipv6'; - const ITEM_DIAGNOSTICS_CLOUDFLARE_BLOCK = 'compatibility-cloudflare'; - - const ITEM_MODULE_LOGIN_SECURITY = 'module-login-security'; - const ITEM_MODULE_LOGIN_SECURITY_2FA = 'module-login-security-2fa'; - const ITEM_MODULE_LOGIN_SECURITY_CAPTCHA = 'module-login-security-captcha'; - - public static function esc_supportURL($item = self::ITEM_INDEX) { - return esc_url(self::supportURL($item)); - } - - public static function supportURL($item = self::ITEM_INDEX) { - $base = 'https://www.wordfence.com/help/'; - switch ($item) { - case self::ITEM_INDEX: - return 'https://www.wordfence.com/help/'; - case self::ITEM_FREE: - return 'https://wordpress.org/support/plugin/wordfence/'; - case self::ITEM_PREMIUM: - return 'https://support.wordfence.com/'; - - //These all fall through to the query format - - case self::ITEM_NOTICE_WAF_INACCESSIBLE_CONFIG: - case self::ITEM_NOTICE_WAF_MOD_PHP_FIX: - case self::ITEM_NOTICE_WAF_READ_ONLY_WARNING: - case self::ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS: - case self::ITEM_NOTICE_SWITCH_LIVE_TRAFFIC: - - case self::ITEM_LOCKED_OUT: - case self::ITEM_AJAX_BLOCKED: - case self::ITEM_USING_BREACH_PASSWORD: - - case self::ITEM_WIDGET_LOCAL_ATTACKS: - - case self::ITEM_VERSION_WORDPRESS: - case self::ITEM_VERSION_PHP: - case self::ITEM_VERSION_OPENSSL: - - case self::ITEM_GDPR: - case self::ITEM_GDPR_DPA: - - case self::ITEM_GENERAL_REMOTE_IP_LOOKUP: - - case self::ITEM_DASHBOARD: - case self::ITEM_DASHBOARD_STATUS_FIREWALL: - case self::ITEM_DASHBOARD_STATUS_SCAN: - case self::ITEM_DASHBOARD_OPTIONS: - case self::ITEM_DASHBOARD_OPTION_API_KEY: - case self::ITEM_DASHBOARD_OPTION_HOW_GET_IPS: - case self::ITEM_DASHBOARD_OPTION_AUTOMATIC_UPDATE: - case self::ITEM_DASHBOARD_OPTION_ALERT_EMAILS: - case self::ITEM_DASHBOARD_OPTION_HIDE_VERSION: - case self::ITEM_DASHBOARD_OPTION_DISABLE_UPLOADS_EXECUTION: - case self::ITEM_DASHBOARD_OPTION_DISABLE_COOKIES: - case self::ITEM_DASHBOARD_OPTION_PAUSE_LIVE_UPDATES: - case self::ITEM_DASHBOARD_OPTION_UPDATE_INTERVAL: - case self::ITEM_DASHBOARD_OPTION_LITESPEED_WARNING: - case self::ITEM_DASHBOARD_OPTION_BYPASS_LITESPEED_CHECK: - case self::ITEM_DASHBOARD_OPTION_DELETE_DEACTIVATION: - case self::ITEM_DASHBOARD_OPTION_EXPORT: - case self::ITEM_DASHBOARD_OPTION_IMPORT: - - case self::ITEM_FIREWALL_WAF: - case self::ITEM_FIREWALL_WAF_STATUS_OVERALL: - case self::ITEM_FIREWALL_WAF_STATUS_RULES: - case self::ITEM_FIREWALL_WAF_STATUS_BLACKLIST: - case self::ITEM_FIREWALL_WAF_STATUS_BRUTE_FORCE: - case self::ITEM_FIREWALL_WAF_INSTALL_MANUALLY: - case self::ITEM_FIREWALL_WAF_INSTALL_NGINX: - case self::ITEM_FIREWALL_WAF_REMOVE_MANUALLY: - case self::ITEM_FIREWALL_WAF_LEARNING_MODE: - case self::ITEM_FIREWALL_WAF_RULES: - case self::ITEM_FIREWALL_WAF_WHITELIST: - case self::ITEM_FIREWALL_WAF_OPTION_DELAY_BLOCKING: - case self::ITEM_FIREWALL_WAF_OPTION_WHITELISTED_IPS: - case self::ITEM_FIREWALL_WAF_OPTION_WHITELISTED_SERVICES: - case self::ITEM_FIREWALL_WAF_IGNORED_ALERT_IPS: - case self::ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_BLOCK_URLS: - case self::ITEM_FIREWALL_WAF_OPTION_ENABLE_LOGIN_SECURITY: - case self::ITEM_FIREWALL_WAF_OPTION_LOCK_OUT_FAILURE_COUNT: - case self::ITEM_FIREWALL_WAF_OPTION_LOCK_OUT_FORGOT_PASSWORD_COUNT: - case self::ITEM_FIREWALL_WAF_OPTION_COUNT_TIME_PERIOD: - case self::ITEM_FIREWALL_WAF_OPTION_LOCKOUT_DURATION: - case self::ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_LOCK_OUT_INVALID_USERS: - case self::ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_BLOCK_USERS: - case self::ITEM_FIREWALL_WAF_OPTION_ENFORCE_STRONG_PASSWORDS: - case self::ITEM_FIREWALL_WAF_OPTION_PREVENT_BREACH_PASSWORDS: - case self::ITEM_FIREWALL_WAF_OPTION_MASK_LOGIN_ERRORS: - case self::ITEM_FIREWALL_WAF_OPTION_PREVENT_ADMIN_REGISTRATION: - case self::ITEM_FIREWALL_WAF_OPTION_PREVENT_AUTHOR_SCAN: - case self::ITEM_FIREWALL_WAF_OPTION_DISABLE_APPLICATION_PASSWORDS: - case self::ITEM_FIREWALL_WAF_OPTION_BLOCK_BAD_POST: - case self::ITEM_FIREWALL_WAF_OPTION_CUSTOM_BLOCK_TEXT: - case self::ITEM_FIREWALL_WAF_OPTION_CHECK_PASSWORD: - case self::ITEM_FIREWALL_WAF_OPTION_PARTICIPATE_WFSN: - case self::ITEM_FIREWALL_WAF_OPTION_ENABLE_ADVANCED_BLOCKING: - case self::ITEM_FIREWALL_WAF_OPTION_IMMEDIATELY_BLOCK_FAKE_GOOGLE: - case self::ITEM_FIREWALL_WAF_OPTION_GOOGLE_ACTION: - case self::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_ANY: - case self::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_CRAWLER: - case self::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_CRAWLER_404: - case self::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_HUMAN: - case self::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_HUMAN_404: - case self::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_ANY_404: - case self::ITEM_FIREWALL_WAF_OPTION_AUTOMATIC_BLOCK_DURATION: - case self::ITEM_FIREWALL_WAF_OPTION_WHITELISTED_404: - case self::ITEM_FIREWALL_WAF_OPTION_MONITOR_AJAX: - - case self::ITEM_FIREWALL_BLOCKING: - case self::ITEM_FIREWALL_BLOCKING_FILTER: - case self::ITEM_FIREWALL_BLOCKING_OPTION_WHAT_TO_DO: - case self::ITEM_FIREWALL_BLOCKING_OPTION_REDIRECT: - case self::ITEM_FIREWALL_BLOCKING_OPTION_BLOCK_LOGGED_IN: - case self::ITEM_FIREWALL_BLOCKING_BYPASS_COOKIE: - case self::ITEM_FIREWALL_BLOCKING_BYPASS_REDIRECT: - case self::ITEM_FIREWALL_BLOCKING_FULL_SITE: - - case self::ITEM_FIREWALL_REMOVE_OPTIMIZATION: - - case self::ITEM_SCAN: - case self::ITEM_SCAN_STATUS_OVERALL: - case self::ITEM_SCAN_STATUS_MALWARE: - case self::ITEM_SCAN_STATUS_REPUTATION: - case self::ITEM_SCAN_TIME_LIMIT: - case self::ITEM_SCAN_FAILS: - case self::ITEM_SCAN_FAILED_START: - case self::ITEM_SCAN_BULK_DELETE_WARNING: - case self::ITEM_SCAN_SCHEDULING: - case self::ITEM_SCAN_OPTION_CHECK_SITE_BLACKLISTED: - case self::ITEM_SCAN_OPTION_CHECK_SITE_SPAMVERTIZED: - case self::ITEM_SCAN_OPTION_CHECK_IP_SPAMMING: - case self::ITEM_SCAN_OPTION_CHECK_MISCONFIGURED_HOW_GET_IPS: - case self::ITEM_SCAN_OPTION_PUBLIC_CONFIG: - case self::ITEM_SCAN_OPTION_PUBLIC_QUARANTINED: - case self::ITEM_SCAN_OPTION_CORE_CHANGES: - case self::ITEM_SCAN_OPTION_THEME_CHANGES: - case self::ITEM_SCAN_OPTION_PLUGIN_CHANGES: - case self::ITEM_SCAN_OPTION_UNKNOWN_CORE: - case self::ITEM_SCAN_OPTION_MALWARE_HASHES: - case self::ITEM_SCAN_OPTION_MALWARE_SIGNATURES: - case self::ITEM_SCAN_OPTION_MALWARE_URLS: - case self::ITEM_SCAN_OPTION_POST_URLS: - case self::ITEM_SCAN_OPTION_COMMENT_URLS: - case self::ITEM_SCAN_OPTION_MALWARE_OPTIONS: - case self::ITEM_SCAN_OPTION_UPDATES: - case self::ITEM_SCAN_OPTION_UNKNOWN_ADMINS: - case self::ITEM_SCAN_OPTION_PASSWORD_STRENGTH: - case self::ITEM_SCAN_OPTION_DISK_SPACE: - case self::ITEM_SCAN_OPTION_WAF_STATUS: - case self::ITEM_SCAN_OPTION_OUTSIDE_WORDPRESS: - case self::ITEM_SCAN_OPTION_IMAGES_EXECUTABLE: - case self::ITEM_SCAN_OPTION_HIGH_SENSITIVITY: - case self::ITEM_SCAN_OPTION_LOW_RESOURCE: - case self::ITEM_SCAN_OPTION_LIMIT_ISSUES: - case self::ITEM_SCAN_OPTION_OVERALL_TIME_LIMIT: - case self::ITEM_SCAN_OPTION_MEMORY_LIMIT: - case self::ITEM_SCAN_OPTION_STAGE_TIME_LIMIT: - case self::ITEM_SCAN_OPTION_EXCLUDE_PATTERNS: - case self::ITEM_SCAN_OPTION_CUSTOM_MALWARE_SIGNATURES: - case self::ITEM_SCAN_OPTION_MAX_RESUME_ATTEMPTS: - case self::ITEM_SCAN_OPTION_USE_ONLY_IPV4: - case self::ITEM_SCAN_RESULT_PUBLIC_CONFIG: - case self::ITEM_SCAN_RESULT_PLUGIN_ABANDONED: - case self::ITEM_SCAN_RESULT_PLUGIN_REMOVED: - case self::ITEM_SCAN_RESULT_UPDATE_CHECK_FAILED: - case self::ITEM_SCAN_RESULT_OPTION_MALWARE_URL: - case self::ITEM_SCAN_RESULT_GEOIP_UPDATE: - case self::ITEM_SCAN_RESULT_WAF_DISABLED: - case self::ITEM_SCAN_RESULT_UNKNOWN_FILE_CORE: - case self::ITEM_SCAN_RESULT_SKIPPED_PATHS: - case self::ITEM_SCAN_RESULT_REPAIR_MODIFIED_FILES: - case self::ITEM_SCAN_RESULT_MODIFIED_PLUGIN: - case self::ITEM_SCAN_RESULT_MODIFIED_THEME: - case self::ITEM_SCAN_RESULT_PLUGIN_VULNERABLE: - - case self::ITEM_TOOLS_TWO_FACTOR: - case self::ITEM_TOOLS_LIVE_TRAFFIC: - case self::ITEM_TOOLS_LIVE_TRAFFIC_OPTION_ENABLE: - case self::ITEM_TOOLS_WHOIS_LOOKUP: - case self::ITEM_TOOLS_IMPORT_EXPORT: - - case self::ITEM_DIAGNOSTICS: - case self::ITEM_DIAGNOSTICS_SYSTEM_CONFIGURATION: - case self::ITEM_DIAGNOSTICS_TEST_MEMORY: - case self::ITEM_DIAGNOSTICS_TEST_EMAIL: - case self::ITEM_DIAGNOSTICS_TEST_ACTIVITY_REPORT: - case self::ITEM_DIAGNOSTICS_REMOVE_CENTRAL_DATA: - case self::ITEM_DIAGNOSTICS_OPTION_DEBUGGING_MODE: - case self::ITEM_DIAGNOSTICS_OPTION_REMOTE_SCANS: - case self::ITEM_DIAGNOSTICS_OPTION_SSL_VERIFICATION: - case self::ITEM_DIAGNOSTICS_OPTION_DISABLE_PHP_INPUT: - case self::ITEM_DIAGNOSTICS_OPTION_BETA_TDF: - case self::ITEM_DIAGNOSTICS_OPTION_WORDFENCE_TRANSLATIONS: - case self::ITEM_DIAGNOSTICS_IPV6: - case self::ITEM_DIAGNOSTICS_CLOUDFLARE_BLOCK: - - case self::ITEM_MODULE_LOGIN_SECURITY: - case self::ITEM_MODULE_LOGIN_SECURITY_2FA: - case self::ITEM_MODULE_LOGIN_SECURITY_CAPTCHA: - return $base . '?query=' . $item; - } - - return ''; - } - - public static function shouldShowSatisfactionPrompt() { - //Don't show if overridden - if (!wfConfig::getBool('satisfactionPromptOverride')) { - return false; - } - - //Only show on our pages - if (!isset($_REQUEST['page'])) { - return false; - } - - if (!preg_match('/^Wordfence/', $_REQUEST['page'])) { - return false; - } - - //Only show until dismissed - if (wfConfig::get('satisfactionPromptDismissed') > 0) { - return false; - } - - //Only show to users installing after the release date of the version this was introduced - if (WORDFENCE_FEEDBACK_EPOCH > wfConfig::get('satisfactionPromptInstallDate')) { - return false; - } - - //Don't show for at least 7 days post-install - if ((time() - wfConfig::get('satisfactionPromptInstallDate')) < 86400 * 7) { - return false; - } - - return true; - } - - public static function satisfactionPromptNotice() { -?> - <div id="wordfenceSatisfactionPrompt" class="fade notice notice-info"> - <p id="wordfenceSatisfactionPrompt-initial"><strong><?php printf(__('Are you enjoying using Wordfence Security?', 'wordfence')); ?></strong>   <a href="#" onclick="WFAD.wordfenceSatisfactionChoice('yes'); return false;" class="wf-btn wf-btn-default wf-btn-sm" role="button"><?php printf(__('Yes', 'wordfence')); ?></a>   <a href="#" onclick="WFAD.wordfenceSatisfactionChoice('no'); return false;" class="wf-btn wf-btn-default wf-btn-sm" role="button"><?php printf(__('No', 'wordfence')); ?></a></p> - <div id="wordfenceSatisfactionPrompt-yes" style="display: none;"> - <p><?php printf(__('Please consider leaving us a 5-star review on wordpress.org. Your review helps other members of the WordPress community find plugins that fit their needs.', 'wordfence')); ?></p> - <p><a href="https://wordpress.org/support/plugin/wordfence/reviews/" class="wf-btn wf-btn-default wf-btn-sm" role="button" target="_blank" rel="noopener noreferrer"><?php printf(__('Leave Review', 'wordfence')); ?></a></p> - </div> - <div id="wordfenceSatisfactionPrompt-no" style="display: none;"> - <p><?php printf(__('What can we do to improve Wordfence Security?', 'wordfence')); ?></p> - <p><textarea rows="6" cols="50" id="wordfenceSatisfactionPrompt-feedback"></textarea></p> - <p><a href="#" onclick="WFAD.wordfenceSatisfactionChoice('feedback'); return false;" class="wf-btn wf-btn-default wf-btn-sm" role="button" target="_blank" rel="noopener noreferrer"><?php printf(__('Submit Feedback', 'wordfence')); ?></a>   <a href="#" onclick="WFAD.wordfenceSatisfactionChoice('dismiss'); return false;" class="wf-btn wf-btn-default wf-btn-sm" role="button"><?php printf(__('Dismiss', 'wordfence')); ?></a></p> - </div> - <p id="wordfenceSatisfactionPrompt-complete" style="display: none;"><?php printf(__('Thank you for providing your feedback on Wordfence Security', 'wordfence')); ?></p> - <button type="button" class="notice-dismiss" onclick="WFAD.wordfenceSatisfactionChoice('dismiss'); return false;"><span class="screen-reader-text">Dismiss this notice.</span></button> - </div> -<?php - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfUnlockMsg.php b/wp/wp-content/plugins/wordfence/lib/wfUnlockMsg.php deleted file mode 100644 index 91244fd8..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfUnlockMsg.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?> -<p><?php esc_html_e('If you are a WordPress user with administrative privileges on this site please enter your email in the box below and click "Send". You will then receive an email that helps you regain access.', 'wordfence'); ?></p> -<form method="POST" id="unlock-form" action="#"> - <?php require_once(ABSPATH . 'wp-includes/pluggable.php'); ?> - <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('wf-form'); ?>"> - <input type="text" size="50" name="email" id="unlock-email" value="" maxlength="255" placeholder="email@example.com">  <input type="submit" class="wf-btn wf-btn-default" id="unlock-submit" name="s" value="<?php esc_attr_e('Send Unlock Email', 'wordfence'); ?>" disabled> -</form> -<script type="application/javascript"> - (function() { - var textfield = document.getElementById('unlock-email'); - textfield.addEventListener('focus', function() { - document.getElementById('unlock-form').action = "<?php echo esc_js(wfUtils::getSiteBaseURL()); ?>" + "?_wfsf=unlockEmail"; - document.getElementById('unlock-submit').disabled = false; - }); - })(); -</script> diff --git a/wp/wp-content/plugins/wordfence/lib/wfUpdateCheck.php b/wp/wp-content/plugins/wordfence/lib/wfUpdateCheck.php deleted file mode 100644 index 4661fd7b..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfUpdateCheck.php +++ /dev/null @@ -1,667 +0,0 @@ -<?php - -class wfUpdateCheck { - const VULN_SEVERITY_CRITICAL = 90; - const VULN_SEVERITY_HIGH = 70; - const VULN_SEVERITY_MEDIUM = 40; - const VULN_SEVERITY_LOW = 1; - const VULN_SEVERITY_NONE = 0; - - const LAST_UPDATE_CHECK_ERROR_KEY = 'lastUpdateCheckError'; - const LAST_UPDATE_CHECK_ERROR_SLUG_KEY = 'lastUpdateCheckErrorSlug'; - - private $needs_core_update = false; - private $core_update_version = 0; - private $plugin_updates = array(); - private $all_plugins = array(); - private $plugin_slugs = array(); - private $theme_updates = array(); - private $api = null; - - /** - * This hook exists because some plugins override their own update check and can return invalid - * responses (e.g., null) due to logic errors or their update check server being unreachable. This - * can interfere with our scan running the outdated plugins check. When scanning, we adjust the - * response in those cases to be `false`, which causes WP to fall back to the plugin repo data. - */ - public static function installPluginAPIFixer() { - add_filter('plugins_api', 'wfUpdateCheck::_pluginAPIFixer', 999, 3); - } - - public static function _pluginAPIFixer($result, $action, $args) { - if ($result === false || is_object($result) || is_array($result)) { - return $result; - } - - if (!wfScanEngine::isScanRunning(true)) { //Skip fixing if it's not the call the scanner made - return $result; - } - - $slug = null; - if (is_object($args) && isset($args->slug)) { - $slug = $args->slug; - } - else if (is_array($args) && isset($args['slug'])) { - $slug = $args['slug']; - } - wordfence::status(2, 'info', sprintf(/* translators: 1. Plugin slug. */ __('Outdated plugin scan adjusted invalid return value in plugins_api filter for %s', 'wordfence'), $slug)); - return false; - } - - public static function syncAllVersionInfo() { - // Load the core/plugin/theme versions into the WAF configuration. - wfConfig::set('wordpressVersion', wfUtils::getWPVersion()); - wfWAFConfig::set('wordpressVersion', wfUtils::getWPVersion(), wfWAF::getInstance(), 'synced'); - - if (!function_exists('get_plugins')) { - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - - $pluginVersions = array(); - foreach (get_plugins() as $pluginFile => $pluginData) { - $slug = plugin_basename($pluginFile); - if (preg_match('/^([^\/]+)\//', $pluginFile, $matches)) { - $slug = $matches[1]; - } else if (preg_match('/^([^\/.]+)\.php$/', $pluginFile, $matches)) { - $slug = $matches[1]; - } - $pluginVersions[$slug] = isset($pluginData['Version']) ? $pluginData['Version'] : null; - } - - wfConfig::set_ser('wordpressPluginVersions', $pluginVersions); - wfWAFConfig::set('wordpressPluginVersions', $pluginVersions, wfWAF::getInstance(), 'synced'); - - if (!function_exists('wp_get_themes')) { - require_once(ABSPATH . '/wp-includes/theme.php'); - } - - $themeVersions = array(); - foreach (wp_get_themes() as $slug => $theme) { - $themeVersions[$slug] = isset($theme['Version']) ? $theme['Version'] : null; - } - - wfConfig::set_ser('wordpressThemeVersions', $themeVersions); - wfWAFConfig::set('wordpressThemeVersions', $themeVersions, wfWAF::getInstance(), 'synced'); - } - - public static function cvssScoreSeverity($score) { - $intScore = floor($score * 10); - if ($intScore >= self::VULN_SEVERITY_CRITICAL) { - return self::VULN_SEVERITY_CRITICAL; - } - else if ($intScore >= self::VULN_SEVERITY_HIGH) { - return self::VULN_SEVERITY_HIGH; - } - else if ($intScore >= self::VULN_SEVERITY_MEDIUM) { - return self::VULN_SEVERITY_MEDIUM; - } - else if ($intScore >= self::VULN_SEVERITY_LOW) { - return self::VULN_SEVERITY_LOW; - } - - return self::VULN_SEVERITY_NONE; - } - - public static function cvssScoreSeverityLabel($score) { - $severity = self::cvssScoreSeverity($score); - switch ($severity) { - case self::VULN_SEVERITY_CRITICAL: - return __('Critical', 'wordfence'); - case self::VULN_SEVERITY_HIGH: - return __('High', 'wordfence'); - case self::VULN_SEVERITY_MEDIUM: - return __('Medium', 'wordfence'); - case self::VULN_SEVERITY_LOW: - return __('Low', 'wordfence'); - } - return __('None', 'wordfence'); - } - - public static function cvssScoreSeverityHexColor($score) { - $severity = self::cvssScoreSeverity($score); - switch ($severity) { - case self::VULN_SEVERITY_CRITICAL: - return '#cc0500'; - case self::VULN_SEVERITY_HIGH: - return '#df3d03'; - case self::VULN_SEVERITY_MEDIUM: - return '#f9a009'; - case self::VULN_SEVERITY_LOW: - return '#ffcb0d'; - } - return '#000000'; - } - - public static function cvssScoreSeverityClass($score) { - $severity = self::cvssScoreSeverity($score); - switch ($severity) { - case self::VULN_SEVERITY_CRITICAL: - return 'wf-vulnerability-severity-critical'; - case self::VULN_SEVERITY_HIGH: - return 'wf-vulnerability-severity-high'; - case self::VULN_SEVERITY_MEDIUM: - return 'wf-vulnerability-severity-medium'; - case self::VULN_SEVERITY_LOW: - return 'wf-vulnerability-severity-low'; - } - return 'wf-vulnerability-severity-none'; - } - - public function __construct() { - $this->api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - } - - public function __sleep() { - return array('needs_core_update', 'core_update_version', 'plugin_updates', 'all_plugins', 'plugin_slugs', 'theme_updates'); - } - - public function __wakeup() { - $this->api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - } - - /** - * @return bool - */ - public function needsAnyUpdates() { - return $this->needsCoreUpdate() || count($this->getPluginUpdates()) > 0 || count($this->getThemeUpdates()) > 0; - } - - /** - * Check for any core, plugin or theme updates. - * - * @return $this - */ - public function checkAllUpdates($useCachedValued = true) { - if (!$useCachedValued) { - wfConfig::remove(self::LAST_UPDATE_CHECK_ERROR_KEY); - wfConfig::remove(self::LAST_UPDATE_CHECK_ERROR_SLUG_KEY); - } - - return $this->checkCoreUpdates($useCachedValued) - ->checkPluginUpdates($useCachedValued) - ->checkThemeUpdates($useCachedValued); - } - - /** - * Check if there is an update to the WordPress core. - * - * @return $this - */ - public function checkCoreUpdates($useCachedValued = true) { - $this->needs_core_update = false; - - if (!function_exists('wp_version_check')) { - require_once(ABSPATH . WPINC . '/update.php'); - } - if (!function_exists('get_preferred_from_update_core')) { - require_once(ABSPATH . 'wp-admin/includes/update.php'); - } - - include(ABSPATH . WPINC . '/version.php'); /** @var $wp_version */ - - $update_core = get_preferred_from_update_core(); - if ($useCachedValued && isset($update_core->last_checked) && isset($update_core->version_checked) && 12 * HOUR_IN_SECONDS > (time() - $update_core->last_checked) && $update_core->version_checked == $wp_version) { //Duplicate of _maybe_update_core, which is a private call - //Do nothing, use cached value - } - else { - wp_version_check(); - $update_core = get_preferred_from_update_core(); - } - - if (isset($update_core->response) && $update_core->response == 'upgrade') { - $this->needs_core_update = true; - $this->core_update_version = $update_core->current; - } - - return $this; - } - - private function checkPluginFile($plugin, &$installedPlugins) { - if (!array_key_exists($plugin, $installedPlugins)) - return null; - $file = wfUtils::getPluginBaseDir() . $plugin; - if (!file_exists($file)) { - unset($installedPlugins[$plugin]); - return null; - } - return $file; - } - - private function initializePluginUpdateData($plugin, &$installedPlugins, $checkVulnerabilities, $populator = null) { - $file = $this->checkPluginFile($plugin, $installedPlugins); - if ($file === null) - return null; - $data = $installedPlugins[$plugin]; - $data['pluginFile'] = $file; - if ($populator !== null) - $populator($data, $file); - if (!array_key_exists('slug', $data) || empty($data['slug'])) - $data['slug'] = $this->extractSlug($plugin); - $slug = $data['slug']; - if ($slug !== null) { - $vulnerable = $checkVulnerabilities ? $this->isPluginVulnerable($slug, $data['Version']) : null; - $data['vulnerable'] = !empty($vulnerable); - if ($data['vulnerable']) { - if (isset($vulnerable['link']) && is_string($vulnerable['link'])) { $data['vulnerabilityLink'] = $vulnerable['link']; } - if (isset($vulnerable['score'])) { - $data['cvssScore'] = number_format(floatval($vulnerable['score']), 1); - $data['severityColor'] = self::cvssScoreSeverityHexColor($data['cvssScore']); - $data['severityLabel'] = self::cvssScoreSeverityLabel($data['cvssScore']); - $data['severityClass'] = self::cvssScoreSeverityClass($data['cvssScore']); - } - if (isset($vulnerable['vector']) && is_string($vulnerable['vector'])) { $data['cvssVector'] = $vulnerable['vector']; } - } - $this->plugin_slugs[] = $slug; - $this->all_plugins[$slug] = $data; - } - unset($installedPlugins[$plugin]); - return $data; - } - - public function extractSlug($plugin, $data = null) { - $slug = null; - if (is_array($data) && array_key_exists('slug', $data)) - $slug = $data['slug']; - if (!is_string($slug) || empty($slug)) { - if (preg_match('/^([^\/]+)\//', $plugin, $matches)) { - $slug = $matches[1]; - } - else if (preg_match('/^([^\/.]+)\.php$/', $plugin, $matches)) { - $slug = $matches[1]; - } - } - return $slug; - } - - private static function requirePluginsApi() { - if (!function_exists('plugins_api')) - require_once(ABSPATH . '/wp-admin/includes/plugin-install.php'); - } - - private function fetchPluginUpdates($useCache = true) { - $update_plugins = get_site_transient('update_plugins'); - if ($useCache && isset($update_plugins->last_checked) && 12 * HOUR_IN_SECONDS > (time() - $update_plugins->last_checked)) //Duplicate of _maybe_update_plugins, which is a private call - return $update_plugins; - if (!function_exists('wp_update_plugins')) - require_once(ABSPATH . WPINC . '/update.php'); - try { - wp_update_plugins(); - } - catch (Exception $e) { - wfConfig::set(self::LAST_UPDATE_CHECK_ERROR_KEY, $e->getMessage(), false); - wfConfig::remove(self::LAST_UPDATE_CHECK_ERROR_SLUG_KEY); - error_log('Caught exception while attempting to refresh plugin update status: ' . $e->getMessage()); - } - catch (Throwable $t) { - wfConfig::set(self::LAST_UPDATE_CHECK_ERROR_KEY, $t->getMessage(), false); - wfConfig::remove(self::LAST_UPDATE_CHECK_ERROR_SLUG_KEY); - error_log('Caught error while attempting to refresh plugin update status: ' . $t->getMessage()); - } - return get_site_transient('update_plugins'); - } - - /** - * Check if any plugins need an update. - * - * @param bool $checkVulnerabilities whether or not to check for vulnerabilities while checking updates - * - * @return $this - */ - public function checkPluginUpdates($useCachedValued = true, $checkVulnerabilities = true) { - if($checkVulnerabilities) - $this->plugin_updates = array(); - - self::requirePluginsApi(); - - $update_plugins = $this->fetchPluginUpdates($useCachedValued); - - //Get the full plugin list - if (!function_exists('get_plugins')) { - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - $installedPlugins = get_plugins(); - - $context = $this; - - if ($update_plugins && !empty($update_plugins->response)) { - foreach ($update_plugins->response as $plugin => $vals) { - $data = $this->initializePluginUpdateData($plugin, $installedPlugins, $checkVulnerabilities, function (&$data, $file) use ($context, $plugin, $vals) { - $vals = (array) $vals; - $data['slug'] = $context->extractSlug($plugin, $vals); - $data['newVersion'] = (isset($vals['new_version']) ? $vals['new_version'] : 'Unknown'); - $data['wpURL'] = (isset($vals['url']) ? rtrim($vals['url'], '/') : null); - $data['updateAvailable'] = true; - }); - - if($checkVulnerabilities && $data !== null) - $this->plugin_updates[] = $data; - } - } - - //We have to grab the slugs from the update response because no built-in function exists to return the true slug from the local files - if ($update_plugins && !empty($update_plugins->no_update)) { - foreach ($update_plugins->no_update as $plugin => $vals) { - $this->initializePluginUpdateData($plugin, $installedPlugins, $checkVulnerabilities, function (&$data, $file) use ($context, $plugin, $vals) { - $vals = (array) $vals; - $data['slug'] = $context->extractSlug($plugin, $vals); - $data['wpURL'] = (isset($vals['url']) ? rtrim($vals['url'], '/') : null); - }); - } - } - - //Get the remaining plugins (not in the wordpress.org repo for whatever reason) - foreach ($installedPlugins as $plugin => $data) { - $data = $this->initializePluginUpdateData($plugin, $installedPlugins, $checkVulnerabilities); - } - - return $this; - } - - /** - * Check if any themes need an update. - * - * @param bool $checkVulnerabilities whether or not to check for vulnerabilities while checking for updates - * - * @return $this - */ - public function checkThemeUpdates($useCachedValued = true, $checkVulnerabilities = true) { - if($checkVulnerabilities) - $this->theme_updates = array(); - - if (!function_exists('wp_update_themes')) { - require_once(ABSPATH . WPINC . '/update.php'); - } - - $update_themes = get_site_transient('update_themes'); - if ($useCachedValued && isset($update_themes->last_checked) && 12 * HOUR_IN_SECONDS > (time() - $update_themes->last_checked)) { //Duplicate of _maybe_update_themes, which is a private call - //Do nothing, use cached value - } - else { - try { - wp_update_themes(); - } - catch (Exception $e) { - wfConfig::set(self::LAST_UPDATE_CHECK_ERROR_KEY, $e->getMessage(), false); - error_log('Caught exception while attempting to refresh theme update status: ' . $e->getMessage()); - } - catch (Throwable $t) { - wfConfig::set(self::LAST_UPDATE_CHECK_ERROR_KEY, $t->getMessage(), false); - error_log('Caught error while attempting to refresh theme update status: ' . $t->getMessage()); - } - - $update_themes = get_site_transient('update_themes'); - } - - if ($update_themes && (!empty($update_themes->response)) && $checkVulnerabilities) { - if (!function_exists('wp_get_themes')) { - require_once(ABSPATH . '/wp-includes/theme.php'); - } - $themes = wp_get_themes(); - foreach ($update_themes->response as $theme => $vals) { - foreach ($themes as $name => $themeData) { - if (strtolower($name) == $theme) { - $vulnerable = false; - if (isset($themeData['Version'])) { - $vulnerable = $this->isThemeVulnerable($theme, $themeData['Version']); - } - - $data = array( - 'newVersion' => (isset($vals['new_version']) ? $vals['new_version'] : 'Unknown'), - 'package' => (isset($vals['package']) ? $vals['package'] : null), - 'URL' => (isset($vals['url']) ? $vals['url'] : null), - 'Name' => $themeData['Name'], - 'name' => $themeData['Name'], - 'version' => $themeData['Version'], - 'vulnerable' => $vulnerable - ); - - $data['vulnerable'] = !empty($vulnerable); - if ($data['vulnerable']) { - if (isset($vulnerable['link']) && is_string($vulnerable['link'])) { $data['vulnerabilityLink'] = $vulnerable['link']; } - if (isset($vulnerable['score'])) { - $data['cvssScore'] = number_format(floatval($vulnerable['score']), 1); - $data['severityColor'] = self::cvssScoreSeverityHexColor($data['cvssScore']); - $data['severityLabel'] = self::cvssScoreSeverityLabel($data['cvssScore']); - $data['severityClass'] = self::cvssScoreSeverityClass($data['cvssScore']); - } - if (isset($vulnerable['vector']) && is_string($vulnerable['vector'])) { $data['cvssVector'] = $vulnerable['vector']; } - } - - $this->theme_updates[] = $data; - } - } - } - } - return $this; - } - - public function checkAllVulnerabilities() { - $this->checkPluginVulnerabilities(); - $this->checkThemeVulnerabilities(); - } - - private function initializePluginVulnerabilityData($plugin, &$installedPlugins, &$records, $values = null, $update = false) { - $file = $this->checkPluginFile($plugin, $installedPlugins); - if ($file === null) - return null; - $data = $installedPlugins[$plugin]; - $record = array( - 'slug' => $this->extractSlug($plugin, $values), - 'fromVersion' => isset($data['Version']) ? $data['Version'] : 'Unknown', - 'vulnerable' => false - ); - if ($update && is_array($values)) - $record['toVersion'] = isset($values['new_version']) ? $values['new_version'] : 'Unknown'; - $records[] = $record; - unset($installedPlugins[$plugin]); - } - - /** - * @param bool $initial if true, treat as the initial scan run - */ - public function checkPluginVulnerabilities($initial=false) { - - self::requirePluginsApi(); - - $vulnerabilities = array(); - - //Get the full plugin list - if (!function_exists('get_plugins')) { - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - $installedPlugins = get_plugins(); - - //Get the info for plugins on wordpress.org - $update_plugins = $this->fetchPluginUpdates(); - if ($update_plugins) { - if (!empty($update_plugins->response)) { - foreach ($update_plugins->response as $plugin => $vals) { - $this->initializePluginVulnerabilityData($plugin, $installedPlugins, $vulnerabilities, (array) $vals, true); - } - } - - if (!empty($update_plugins->no_update)) { - foreach ($update_plugins->no_update as $plugin => $vals) { - $this->initializePluginVulnerabilityData($plugin, $installedPlugins, $vulnerabilities, (array) $vals); - } - } - } - - //Get the remaining plugins (not in the wordpress.org repo for whatever reason) - foreach ($installedPlugins as $plugin => $data) { - $this->initializePluginVulnerabilityData($plugin, $installedPlugins, $vulnerabilities, $data); - } - - if (count($vulnerabilities) > 0) { - try { - $result = $this->api->call('plugin_vulnerability_check', array(), array( - 'plugins' => json_encode($vulnerabilities), - )); - - foreach ($vulnerabilities as &$v) { - $vulnerableList = $result['vulnerable']; - foreach ($vulnerableList as $r) { - if ($r['slug'] == $v['slug']) { - $v['vulnerable'] = !!$r['vulnerable']; - if (isset($r['link'])) { - $v['link'] = $r['link']; - } - if (isset($r['score'])) { - $v['score'] = $r['score']; - } - if (isset($r['vector'])) { - $v['vector'] = $r['vector']; - } - break; - } - } - } - } - catch (Exception $e) { - //Do nothing - } - - wfConfig::set_ser('vulnerabilities_plugin', $vulnerabilities); - } - } - - /** - * @param bool $initial whether or not this is the initial run - */ - public function checkThemeVulnerabilities($initial = false) { - if (!function_exists('wp_update_themes')) { - require_once(ABSPATH . WPINC . '/update.php'); - } - - self::requirePluginsApi(); - - $this->checkThemeUpdates(!$initial, false); - $update_themes = get_site_transient('update_themes'); - - $vulnerabilities = array(); - if ($update_themes && !empty($update_themes->response)) { - if (!function_exists('get_plugin_data')) - { - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - - foreach ($update_themes->response as $themeSlug => $vals) { - - $valsArray = (array) $vals; - $theme = wp_get_theme($themeSlug); - - $record = array(); - $record['slug'] = $themeSlug; - $record['toVersion'] = (isset($valsArray['new_version']) ? $valsArray['new_version'] : 'Unknown'); - $record['fromVersion'] = $theme->version; - $record['vulnerable'] = false; - $vulnerabilities[] = $record; - } - - try { - $result = $this->api->call('theme_vulnerability_check', array(), array( - 'themes' => json_encode($vulnerabilities), - )); - - foreach ($vulnerabilities as &$v) { - $vulnerableList = $result['vulnerable']; - foreach ($vulnerableList as $r) { - if ($r['slug'] == $v['slug']) { - $v['vulnerable'] = !!$r['vulnerable']; - if (isset($r['link'])) { - $v['link'] = $r['link']; - } - if (isset($r['score'])) { - $v['score'] = $r['score']; - } - if (isset($r['vector'])) { - $v['vector'] = $r['vector']; - } - break; - } - } - } - } - catch (Exception $e) { - //Do nothing - } - - wfConfig::set_ser('vulnerabilities_theme', $vulnerabilities); - } - } - - public function isPluginVulnerable($slug, $version) { - return $this->_isSlugVulnerable('vulnerabilities_plugin', $slug, $version, function(){ $this->checkPluginVulnerabilities(true); }); - } - - public function isThemeVulnerable($slug, $version) { - return $this->_isSlugVulnerable('vulnerabilities_theme', $slug, $version, function(){ $this->checkThemeVulnerabilities(true); }); - } - - private function _isSlugVulnerable($vulnerabilitiesKey, $slug, $version, $populateVulnerabilities=null) { - $vulnerabilities = wfConfig::get_ser($vulnerabilitiesKey, null); - if($vulnerabilities===null){ - if(is_callable($populateVulnerabilities)){ - $populateVulnerabilities(); - return $this->_isSlugVulnerable($vulnerabilitiesKey, $slug, $version); - } - return false; - } - foreach ($vulnerabilities as $v) { - if ($v['slug'] == $slug) { - if ( - ($v['fromVersion'] == 'Unknown' && $v['toVersion'] == 'Unknown') || - ((!isset($v['toVersion']) || $v['toVersion'] == 'Unknown') && version_compare($version, $v['fromVersion']) >= 0) || - ($v['fromVersion'] == 'Unknown' && isset($v['toVersion']) && version_compare($version, $v['toVersion']) < 0) || - (version_compare($version, $v['fromVersion']) >= 0 && isset($v['toVersion']) && version_compare($version, $v['toVersion']) < 0) - ) { - if ($v['vulnerable']) { return $v; } - return false; - } - } - } - return false; - } - - /** - * @return boolean - */ - public function needsCoreUpdate() { - return $this->needs_core_update; - } - - /** - * @return int - */ - public function getCoreUpdateVersion() { - return $this->core_update_version; - } - - /** - * @return array - */ - public function getPluginUpdates() { - return $this->plugin_updates; - } - - /** - * @return array - */ - public function getAllPlugins() { - return $this->all_plugins; - } - - /** - * @return array - */ - public function getPluginSlugs() { - return $this->plugin_slugs; - } - - /** - * @return array - */ - public function getThemeUpdates() { - return $this->theme_updates; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfUtils.php b/wp/wp-content/plugins/wordfence/lib/wfUtils.php deleted file mode 100644 index aba62fb4..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfUtils.php +++ /dev/null @@ -1,3365 +0,0 @@ -<?php -require_once(dirname(__FILE__) . '/wfConfig.php'); -class wfUtils { - private static $isWindows = false; - public static $scanLockFH = false; - private static $lastErrorReporting = false; - private static $lastDisplayErrors = false; - public static function patternToRegex($pattern, $mod = 'i', $sep = '/') { - $pattern = preg_quote(trim($pattern), $sep); - $pattern = str_replace(' ', '\s', $pattern); - return $sep . '^' . str_replace('\*', '.*', $pattern) . '$' . $sep . $mod; - } - public static function versionedAsset($subpath) { - $version = WORDFENCE_BUILD_NUMBER; - if ($version != 'WORDFENCE_BUILD_NUMBER' && preg_match('/^(.+?)(\.[^\.]+)$/', $subpath, $matches)) { - $prefix = $matches[1]; - $suffix = $matches[2]; - return $prefix . '.' . $version . $suffix; - } - - return $subpath; - } - public static function makeTimeAgo($secs, $noSeconds = false) { - if($secs < 1){ - return __("a moment", 'wordfence'); - } - - if (function_exists('date_diff')) { - $now = new DateTime(); - $utc = new DateTimeZone('UTC'); - $dtStr = gmdate("c", (int) ($now->getTimestamp() + $secs)); //Have to do it this way because of PHP 5.2 - $then = new DateTime($dtStr, $utc); - - $diff = $then->diff($now); - $years = $diff->y; - $months = $diff->m; - $days = $diff->d; - $hours = $diff->h; - $minutes = $diff->i; - } - else { - $years = 0; - $months = floor($secs / (86400 * 30)); - $days = floor($secs / 86400); - $hours = floor($secs / 3600); - $minutes = floor($secs / 60); - - if ($months) { - $days -= $months * 30; - } - else if ($days) { - $hours -= $days * 24; - } - else if ($hours) { - $minutes -= $hours * 60; - } - } - - if ($years) { - return $years . ' ' . _n('year', 'years', $years, 'wordfence') . - (is_numeric($months) ? ' ' . $months . ' ' . _n('month', 'months', $months, 'wordfence') : ''); - } - else if ($months) { - return $months . ' ' . _n('month', 'months', $months, 'wordfence') . - (is_numeric($days) ? ' ' . $days . ' ' . _n('day', 'days', $days, 'wordfence') : ''); - } - else if ($days) { - return $days . ' ' . _n('day', 'days', $days, 'wordfence') . - (is_numeric($hours) ? ' ' . $hours . ' ' . _n('hour', 'hours', $hours, 'wordfence') : ''); - } - else if ($hours) { - return $hours . ' ' . _n('hour', 'hours', $hours, 'wordfence') . - (is_numeric($minutes) ? ' ' . $minutes . ' ' . _n('minute', 'minutes', $minutes, 'wordfence') : ''); - } - else if ($minutes) { - return $minutes . ' ' . _n('minute', 'minutes', $minutes, 'wordfence'); - } - else { - if($noSeconds){ - return __("less than a minute", 'wordfence'); - } else { - return sprintf(/* translators: Number of seconds. */ __("%d seconds", 'wordfence'), floor($secs)); - } - } - } - public static function makeDuration($secs, $createExact = false) { - $components = array(); - - $months = floor($secs / (86400 * 30)); $secs -= $months * 86400 * 30; - $days = floor($secs / 86400); $secs -= $days * 86400; - $hours = floor($secs / 3600); $secs -= $hours * 3600; - $minutes = floor($secs / 60); $secs -= $minutes * 60; - - if ($months) { - $components[] = $months . ' ' . _n('month', 'months', $months, 'wordfence'); - if (!$createExact) { - $hours = $minutes = $secs = 0; - } - } - if ($days) { - $components[] = $days . ' ' . _n('day', 'days', $days, 'wordfence'); - if (!$createExact) { - $minutes = $secs = 0; - } - } - if ($hours) { - $components[] = $hours . ' ' . _n('hour', 'hours', $hours, 'wordfence'); - if (!$createExact) { - $secs = 0; - } - } - if ($minutes) { - $components[] = $minutes . ' ' . _n('minute', 'minutes', $minutes, 'wordfence'); - } - if ($secs && $secs >= 1) { - $components[] = $secs . ' ' . _n('second', 'seconds', $secs, 'wordfence'); - } - - if (empty($components)) { - $components[] = __('less than 1 second', 'wordfence'); - } - - return implode(' ', $components); - } - public static function pluralize($m1, $m1Singular, $m1Plural, $m2 = false, $m2Singular = false, $m2Plural = false) { - $m1Text = _n($m1Singular, $m1Plural, $m1, 'wordfence'); - if (is_numeric($m2)) { - $m2Text = _n($m2Singular, $m2Plural, $m2, 'wordfence'); - return "$m1 $m1Text $m2 $m2Text"; - } else { - return "$m1 $m1Text"; - } - } - public static function formatBytes($bytes, $precision = 2) { - $units = array('B', 'KB', 'MB', 'GB', 'TB'); - - $bytes = max($bytes, 0); - $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); - $pow = min($pow, count($units) - 1); - - // Uncomment one of the following alternatives - $bytes /= pow(1024, $pow); - // $bytes /= (1 << (10 * $pow)); - - return round($bytes, $precision) . ' ' . $units[$pow]; - } - - /** - * Returns the PHP version formatted for display, stripping off the build information when present. - * - * @return string - */ - public static function cleanPHPVersion() { - $version = phpversion(); - if (preg_match('/^(\d+\.\d+\.\d+)/', $version, $matches)) { - return $matches[1]; - } - return $version; - } - - /** - * Check if an IP address is in a network block - * - * @param string $subnet Single IP or subnet in CIDR notation (e.g. '192.168.100.0' or '192.168.100.0/22') - * @param string $ip IPv4 or IPv6 address in dot or colon notation - * @return boolean - */ - public static function subnetContainsIP($subnet, $ip) { - static $_network_cache = array(); - static $_ip_cache = array(); - static $_masks = array( - 0 => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 1 => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 2 => "\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 3 => "\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 4 => "\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 5 => "\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 6 => "\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 7 => "\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 8 => "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 9 => "\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 10 => "\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 11 => "\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 12 => "\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 13 => "\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 14 => "\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 15 => "\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 16 => "\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 17 => "\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 18 => "\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 19 => "\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 20 => "\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 21 => "\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 22 => "\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 23 => "\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 24 => "\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 25 => "\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 26 => "\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 27 => "\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 28 => "\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 29 => "\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 30 => "\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 31 => "\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 32 => "\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 33 => "\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 34 => "\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 35 => "\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 36 => "\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 37 => "\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 38 => "\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 39 => "\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 40 => "\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 41 => "\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 42 => "\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 43 => "\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 44 => "\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 45 => "\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 46 => "\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 47 => "\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 48 => "\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 49 => "\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 50 => "\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 51 => "\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 52 => "\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 53 => "\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 54 => "\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 55 => "\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 56 => "\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 57 => "\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00", - 58 => "\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00", - 59 => "\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00", - 60 => "\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00", - 61 => "\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00", - 62 => "\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00", - 63 => "\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00", - 64 => "\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00", - 65 => "\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00", - 66 => "\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00", - 67 => "\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00", - 68 => "\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00", - 69 => "\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00", - 70 => "\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00", - 71 => "\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00", - 72 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00", - 73 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00", - 74 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00", - 75 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00", - 76 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00", - 77 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00", - 78 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00", - 79 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00", - 80 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00", - 81 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00", - 82 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00", - 83 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00", - 84 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00", - 85 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00", - 86 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00", - 87 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00", - 88 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00", - 89 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00", - 90 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00", - 91 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00", - 92 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00", - 93 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00", - 94 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00", - 95 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00", - 96 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00", - 97 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00", - 98 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00", - 99 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00", - 100 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00", - 101 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00", - 102 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00", - 103 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00", - 104 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00", - 105 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00", - 106 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00", - 107 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00", - 108 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00", - 109 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00", - 110 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00", - 111 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00", - 112 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00", - 113 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00", - 114 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00", - 115 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00", - 116 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00", - 117 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00", - 118 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00", - 119 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00", - 120 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00", - 121 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80", - 122 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0", - 123 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0", - 124 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0", - 125 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8", - 126 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc", - 127 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe", - 128 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", - ); - /* - * The above is generated by: - * - function gen_mask($prefix, $size = 128) { - //Workaround to avoid overflow, split into four pieces - $mask_1 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 1 * $size / 4 - $prefix))) - 1); - $mask_2 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 2 * $size / 4 - $prefix))) - 1); - $mask_3 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 3 * $size / 4 - $prefix))) - 1); - $mask_4 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 4 * $size / 4 - $prefix))) - 1); - return ($mask_1 ? pack('N', $mask_1) : "\0\0\0\0") . ($mask_2 ? pack('N', $mask_2) : "\0\0\0\0") . ($mask_3 ? pack('N', $mask_3) : "\0\0\0\0") . ($mask_4 ? pack('N', $mask_4) : "\0\0\0\0"); - } - - $masks = array(); - for ($i = 0; $i <= 128; $i++) { - $mask = gen_mask($i); - $chars = str_split($mask); - $masks[] = implode('', array_map(function($c) { return '\\x' . bin2hex($c); }, $chars)); - } - - echo 'array(' . "\n"; - foreach ($masks as $index => $m) { - echo "\t{$index} => \"{$m}\",\n"; - } - echo ')'; - * - */ - - if (isset($_network_cache[$subnet])) { - list($bin_network, $prefix, $masked_network) = $_network_cache[$subnet]; - $mask = $_masks[$prefix]; - } - else { - list($network, $prefix) = array_pad(explode('/', $subnet, 2), 2, null); - if (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - // If no prefix was supplied, 32 is implied for IPv4 - if ($prefix === null) { - $prefix = 32; - } - - // Validate the IPv4 network prefix - if ($prefix < 0 || $prefix > 32) { - return false; - } - - // Increase the IPv4 network prefix to work in the IPv6 address space - $prefix += 96; - } - else { - // If no prefix was supplied, 128 is implied for IPv6 - if ($prefix === null) { - $prefix = 128; - } - - // Validate the IPv6 network prefix - if ($prefix < 1 || $prefix > 128) { - return false; - } - } - $mask = $_masks[$prefix]; - $bin_network = self::inet_pton($network); - $masked_network = $bin_network & $mask; - $_network_cache[$subnet] = array($bin_network, $prefix, $masked_network); - } - - if (isset($_ip_cache[$ip]) && isset($_ip_cache[$ip][$prefix])) { - list($bin_ip, $masked_ip) = $_ip_cache[$ip][$prefix]; - } - else { - $bin_ip = self::inet_pton($ip); - $masked_ip = $bin_ip & $mask; - if (!isset($_ip_cache[$ip])) { - $_ip_cache[$ip] = array(); - } - $_ip_cache[$ip][$prefix] = array($bin_ip, $masked_ip); - } - - return ($masked_ip === $masked_network); - } - - /** - * Convert CIDR notation to a wfUserIPRange object - * - * @param string $cidr - * @return wfUserIPRange - */ - public static function CIDR2wfUserIPRange($cidr) { - list($network, $prefix) = array_pad(explode('/', $cidr, 2), 2, null); - $ip_range = new wfUserIPRange(); - - if (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - // If no prefix was supplied, 32 is implied for IPv4 - if ($prefix === null) { - $prefix = 32; - } - - // Validate the IPv4 network prefix - if ($prefix < 0 || $prefix > 32) { - return $ip_range; - } - - // Increase the IPv4 network prefix to work in the IPv6 address space - $prefix += 96; - } else { - // If no prefix was supplied, 128 is implied for IPv6 - if ($prefix === null) { - $prefix = 128; - } - - // Validate the IPv6 network prefix - if ($prefix < 1 || $prefix > 128) { - return $ip_range; - } - } - - // Convert human readable address to 128 bit (IPv6) binary string - // Note: self::inet_pton converts IPv4 addresses to IPv6 compatible versions - $binary_network = self::inet_pton($network); - $binary_mask = wfHelperBin::str2bin(str_pad(str_repeat('1', $prefix), 128, '0', STR_PAD_RIGHT)); - - // Calculate first and last address - $binary_first = $binary_network & $binary_mask; - $binary_last = $binary_network | ~ $binary_mask; - - // Convert binary addresses back to human readable strings - $first = self::inet_ntop($binary_first); - $last = self::inet_ntop($binary_last); - - if (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { - $first = self::expandIPv6Address($first); - $last = self::expandIPv6Address($last); - } - - // Split addresses into segments - $first_array = preg_split('/[\.\:]/', $first); - $last_array = preg_split('/[\.\:]/', $last); - - // Make sure arrays are the same size. IPv6 '::' could cause problems otherwise. - // The strlen filter should leave zeros in place - $first_array = array_pad(array_filter($first_array, 'strlen'), count($last_array), '0'); - - $range_segments = array(); - - foreach ($first_array as $index => $segment) { - if ($segment === $last_array[$index]) { - $range_segments[] = str_pad(ltrim($segment, '0'), 1, '0'); - } else if ($segment === '' || $last_array[$index] === '') { - $range_segments[] = ''; - } else { - $range_segments[] = "[". str_pad(ltrim($segment, '0'), 1, '0') . "-" . - str_pad(ltrim($last_array[$index], '0'), 1, '0') . "]"; - } - } - - $delimiter = filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? '.' : ':'; - - $ip_range->setIPString(implode($delimiter, $range_segments)); - - return $ip_range; - } - - /** - * Return dot notation of IPv4 address. - * - * @param int $ip - * @return string|bool - */ - public static function inet_ntoa($ip) { - $long = 4294967295 - ($ip - 1); - return long2ip(-$long); - } - - /** - * Return string representation of 32 bit int of the IP address. - * - * @param string $ip - * @return string - */ - public static function inet_aton($ip) { - $ip = preg_replace('/(?<=^|\.)0+([1-9])/', '$1', $ip); - return sprintf("%u", ip2long($ip)); - } - - /** - * Return dot or colon notation of IPv4 or IPv6 address. - * - * @param string $ip - * @return string|bool - */ - public static function inet_ntop($ip) { - // trim this to the IPv4 equiv if it's in the mapped range - if (strlen($ip) == 16 && substr($ip, 0, 12) == "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff") { - $ip = substr($ip, 12, 4); - } - return self::hasIPv6Support() ? @inet_ntop($ip) : self::_inet_ntop($ip); - } - - /** - * Return the packed binary string of an IPv4 or IPv6 address. - * - * @param string $ip - * @return string - */ - public static function inet_pton($ip) { - // convert the 4 char IPv4 to IPv6 mapped version. - $pton = str_pad(self::hasIPv6Support() ? @inet_pton($ip) : self::_inet_pton($ip), 16, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT); - return $pton; - } - - /** - * Added compatibility for hosts that do not have inet_pton. - * - * @param $ip - * @return bool|string - */ - public static function _inet_pton($ip) { - // IPv4 - if (preg_match('/^(?:\d{1,3}(?:\.|$)){4}/', $ip)) { - $octets = explode('.', $ip); - $bin = chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]); - return $bin; - } - - // IPv6 - if (preg_match('/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/i', $ip)) { - if ($ip === '::') { - return "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - } - $colon_count = substr_count($ip, ':'); - $dbl_colon_pos = strpos($ip, '::'); - if ($dbl_colon_pos !== false) { - $ip = str_replace('::', str_repeat(':0000', - (($dbl_colon_pos === 0 || $dbl_colon_pos === strlen($ip) - 2) ? 9 : 8) - $colon_count) . ':', $ip); - $ip = trim($ip, ':'); - } - - $ip_groups = explode(':', $ip); - $ipv6_bin = ''; - foreach ($ip_groups as $ip_group) { - $ipv6_bin .= pack('H*', str_pad($ip_group, 4, '0', STR_PAD_LEFT)); - } - - return strlen($ipv6_bin) === 16 ? $ipv6_bin : false; - } - - // IPv4 mapped IPv6 - if (preg_match('/^(?:\:(?:\:0{1,4}){0,4}\:|(?:0{1,4}\:){5})ffff\:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/i', $ip, $matches)) { - $octets = explode('.', $matches[1]); - return "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" . chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]); - } - - return false; - } - - /** - * Added compatibility for hosts that do not have inet_ntop. - * - * @param $ip - * @return bool|string - */ - public static function _inet_ntop($ip) { - // IPv4 - if (strlen($ip) === 4) { - return ord($ip[0]) . '.' . ord($ip[1]) . '.' . ord($ip[2]) . '.' . ord($ip[3]); - } - - // IPv6 - if (strlen($ip) === 16) { - - // IPv4 mapped IPv6 - if (substr($ip, 0, 12) == "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff") { - return "::ffff:" . ord($ip[12]) . '.' . ord($ip[13]) . '.' . ord($ip[14]) . '.' . ord($ip[15]); - } - - $hex = bin2hex($ip); - $groups = str_split($hex, 4); - $in_collapse = false; - $done_collapse = false; - foreach ($groups as $index => $group) { - if ($group == '0000' && !$done_collapse) { - if ($in_collapse) { - $groups[$index] = ''; - continue; - } - $groups[$index] = ':'; - $in_collapse = true; - continue; - } - if ($in_collapse) { - $done_collapse = true; - } - $groups[$index] = ltrim($groups[$index], '0'); - if (strlen($groups[$index]) === 0) { - $groups[$index] = '0'; - } - } - $ip = join(':', array_filter($groups, 'strlen')); - $ip = str_replace(':::', '::', $ip); - return $ip == ':' ? '::' : $ip; - } - - return false; - } - - /** - * Verify PHP was compiled with IPv6 support. - * - * Some hosts appear to not have inet_ntop, and others appear to have inet_ntop but are unable to process IPv6 addresses. - * - * @return bool - */ - public static function hasIPv6Support() { - return defined('AF_INET6'); - } - - public static function hasLoginCookie(){ - if(isset($_COOKIE)){ - if(is_array($_COOKIE)){ - foreach($_COOKIE as $key => $val){ - if(strpos($key, 'wordpress_logged_in') === 0){ - return true; - } - } - } - } - return false; - } - public static function getBaseURL(){ - return plugins_url('', WORDFENCE_FCPATH) . '/'; - } - public static function getPluginBaseDir(){ - if(function_exists('wp_normalize_path')){ //Older WP versions don't have this func and we had many complaints before this check. - if(defined('WP_PLUGIN_DIR')) { - return wp_normalize_path(WP_PLUGIN_DIR . '/'); - } - return wp_normalize_path(WP_CONTENT_DIR . '/plugins/'); - } else { - if(defined('WP_PLUGIN_DIR')) { - return WP_PLUGIN_DIR . '/'; - } - return WP_CONTENT_DIR . '/plugins/'; - } - } - public static function makeRandomIP(){ - return rand(11,230) . '.' . rand(0,255) . '.' . rand(0,255) . '.' . rand(0,255); - } - - /** - * Converts a truthy value to a boolean, checking in this order: - * - already a boolean - * - numeric (0 => false, otherwise true) - * - 'false', 'f', 'no', 'n', or 'off' => false - * - 'true', 't', 'yes', 'y', or 'on' => true - * - empty value => false, otherwise true - * - * @param $value - * @return bool - */ - public static function truthyToBoolean($value) { - if ($value === true || $value === false) { - return $value; - } - - if (is_numeric($value)) { - return !!$value; - } - - if (preg_match('/^(?:f(?:alse)?|no?|off)$/i', $value)) { - return false; - } - else if (preg_match('/^(?:t(?:rue)?|y(?:es)?|on)$/i', $value)) { - return true; - } - - return !empty($value); - } - - /** - * Converts a truthy value to 1 or 0. - * - * @see wfUtils::truthyToBoolean - * - * @param $value - * @return int - */ - public static function truthyToInt($value) { - return self::truthyToBoolean($value) ? 1 : 0; - } - - /** - * Returns the whitelist presets, which first grabs the bundled list and then merges the dynamic list into it. - * - * @return array - */ - public static function whitelistPresets() { - static $_cachedPresets = null; - if ($_cachedPresets === null) { - include(dirname(__FILE__) . '/wfIPWhitelist.php'); /** @var array $wfIPWhitelist */ - $currentPresets = wfConfig::getJSON('whitelistPresets', array()); - if (is_array($currentPresets)) { - $_cachedPresets = array_merge($wfIPWhitelist, $currentPresets); - } - else { - $_cachedPresets = $wfIPWhitelist; - } - } - return $_cachedPresets; - } - - /** - * Returns an array containing all whitelisted service IPs/ranges. The returned array is grouped by service - * tag: array('service1' => array('range1', 'range2', range3', ...), ...) - * - * @return array - */ - public static function whitelistedServiceIPs() { - $result = array(); - $whitelistPresets = self::whitelistPresets(); - $whitelistedServices = wfConfig::getJSON('whitelistedServices', array()); - foreach ($whitelistPresets as $tag => $preset) { - if (!isset($preset['n'])) { //Just an array of IPs/ranges - $result[$tag] = $preset; - continue; - } - - if ((isset($preset['h']) && $preset['h']) || (isset($preset['f']) && $preset['f'])) { //Forced - $result[$tag] = $preset['r']; - continue; - } - - if ((!isset($whitelistedServices[$tag]) && isset($preset['d']) && $preset['d']) || (isset($whitelistedServices[$tag]) && $whitelistedServices[$tag])) { - $result[$tag] = $preset['r']; - } - } - return $result; - } - - /** - * Get the list of whitelisted IPs and networks, which is a combination of preset IPs/ranges and user-entered - * IPs/ranges. - * - * @param string $filter Group name to filter whitelist by - * @return array - */ - public static function getIPWhitelist($filter = null) { - static $wfIPWhitelist; - - if (!isset($wfIPWhitelist)) { - $wfIPWhitelist = self::whitelistedServiceIPs(); - - //Append user ranges - $wfIPWhitelist['user'] = array(); - foreach (array_filter(explode(',', wfConfig::get('whitelisted'))) as $ip) { - $wfIPWhitelist['user'][] = new wfUserIPRange($ip); - } - } - - $whitelist = array(); - foreach ($wfIPWhitelist as $group => $values) { - if ($filter === null || $group === $filter) { - $whitelist = array_merge($whitelist, $values); - } - } - - return $whitelist; - } - - /** - * @param string $addr Should be in dot or colon notation (127.0.0.1 or ::1) - * @return bool - */ - public static function isPrivateAddress($addr) { - // Run this through the preset list for IPv4 addresses. - if (filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false) { - foreach (self::getIPWhitelist('private') as $a) { - if (self::subnetContainsIP($a, $addr)) { - return true; - } - } - } - - return filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6) !== false - && filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false; - } - - /** - * Expects an array of items. The items are either IP's or IP's separated by comma, space or tab. Or an array of IP's. - * We then examine all IP's looking for a public IP and storing private IP's in an array. If we find no public IPs we return the first private addr we found. - * - * @param array $arr - * @return bool|mixed - */ - private static function getCleanIP($arr){ - $privates = array(); //Store private addrs until end as last resort. - for($i = 0; $i < count($arr); $i++){ - $item = $arr[$i]; - if(is_array($item)){ - foreach($item as $j){ - // try verifying the IP is valid before stripping the port off - if (!self::isValidIP($j)) { - $j = preg_replace('/:\d+$/', '', $j); //Strip off port - } - if (self::isValidIP($j)) { - if (self::isPrivateAddress($j)) { - $privates[] = $j; - } else { - return $j; - } - } - } - continue; //This was an array so we can skip to the next item - } - $skipToNext = false; - foreach(array(',', ' ', "\t") as $char){ - if(strpos($item, $char) !== false){ - $sp = explode($char, $item); - $sp = array_reverse($sp); - foreach($sp as $j){ - $j = trim($j); - if (!self::isValidIP($j)) { - $j = preg_replace('/:\d+$/', '', $j); //Strip off port - } - if(self::isValidIP($j)){ - if(self::isPrivateAddress($j)){ - $privates[] = $j; - } else { - return $j; - } - } - } - $skipToNext = true; - break; - } - } - if($skipToNext){ continue; } //Skip to next item because this one had a comma, space or tab so was delimited and we didn't find anything. - - if (!self::isValidIP($item)) { - $item = preg_replace('/:\d+$/', '', $item); //Strip off port - } - if(self::isValidIP($item)){ - if(self::isPrivateAddress($item)){ - $privates[] = $item; - } else { - return $item; - } - } - } - if(sizeof($privates) > 0){ - return $privates[0]; //Return the first private we found so that we respect the order the IP's were passed to this function. - } else { - return false; - } - } - - /** - * Expects an array of items. The items are either IP's or IP's separated by comma, space or tab. Or an array of IP's. - * We then examine all IP's looking for a public IP and storing private IP's in an array. If we find no public IPs we return the first private addr we found. - * - * @param array $arr - * @return bool|mixed - */ - private static function getCleanIPAndServerVar($arr, $trustedProxies = null) { - $privates = array(); //Store private addrs until end as last resort. - for($i = 0; $i < count($arr); $i++){ - list($item, $var) = $arr[$i]; - if(is_array($item)){ - foreach($item as $j){ - // try verifying the IP is valid before stripping the port off - if (!self::isValidIP($j)) { - $j = preg_replace('/:\d+$/', '', $j); //Strip off port - } - if (self::isValidIP($j)) { - if (self::isIPv6MappedIPv4($j)) { - $j = self::inet_ntop(self::inet_pton($j)); - } - - if (self::isPrivateAddress($j)) { - $privates[] = array($j, $var); - } else { - return array($j, $var); - } - } - } - continue; //This was an array so we can skip to the next item - } - $skipToNext = false; - if ($trustedProxies === null) { - $trustedProxies = self::unifiedTrustedProxies(); - } - foreach(array(',', ' ', "\t") as $char){ - if(strpos($item, $char) !== false){ - $sp = explode($char, $item); - $sp = array_reverse($sp); - foreach($sp as $index => $j){ - $j = trim($j); - if (!self::isValidIP($j)) { - $j = preg_replace('/:\d+$/', '', $j); //Strip off port - } - if(self::isValidIP($j)){ - if (self::isIPv6MappedIPv4($j)) { - $j = self::inet_ntop(self::inet_pton($j)); - } - - foreach ($trustedProxies as $proxy) { - if (!empty($proxy)) { - if (self::subnetContainsIP($proxy, $j) && $index < count($sp) - 1) { - continue 2; - } - } - } - - if(self::isPrivateAddress($j)){ - $privates[] = array($j, $var); - } else { - return array($j, $var); - } - } - } - $skipToNext = true; - break; - } - } - if($skipToNext){ continue; } //Skip to next item because this one had a comma, space or tab so was delimited and we didn't find anything. - - if (!self::isValidIP($item)) { - $item = preg_replace('/:\d+$/', '', $item); //Strip off port - } - if(self::isValidIP($item)){ - if (self::isIPv6MappedIPv4($item)) { - $item = self::inet_ntop(self::inet_pton($item)); - } - - if(self::isPrivateAddress($item)){ - $privates[] = array($item, $var); - } else { - return array($item, $var); - } - } - } - if(sizeof($privates) > 0){ - return $privates[0]; //Return the first private we found so that we respect the order the IP's were passed to this function. - } else { - return false; - } - } - - /** - * Returns an array of all trusted proxies, combining both the user-entered ones and those from the selected preset. - * - * @return string[] - */ - public static function unifiedTrustedProxies() { - $trustedProxies = explode("\n", wfConfig::get('howGetIPs_trusted_proxies', '')); - - $preset = wfConfig::get('howGetIPs_trusted_proxy_preset'); - $presets = wfConfig::getJSON('ipResolutionList', array()); - if (is_array($presets) && isset($presets[$preset])) { - $testIPs = array_merge($presets[$preset]['ipv4'], $presets[$preset]['ipv6']); - foreach ($testIPs as $val) { - if (strlen($val) > 0) { - if (wfUtils::isValidIP($val) || wfUtils::isValidCIDRRange($val)) { - $trustedProxies[] = $val; - } - } - } - } - return $trustedProxies; - } - - /** - * @param string $ip - * @return bool - */ - public static function isIPv6MappedIPv4($ip) { - return preg_match('/^(?:\:(?:\:0{1,4}){0,4}\:|(?:0{1,4}\:){5})ffff\:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/i', $ip) > 0; - } - - public static function extractHostname($str){ - if(preg_match('/https?:\/\/([a-zA-Z0-9\.\-]+)(?:\/|$)/i', $str, $matches)){ - return strtolower($matches[1]); - } else { - return false; - } - } - - /** - * Returns the known server IPs, ordered by those as the best match for outgoing requests. - * - * @param bool $refreshCache - * @return string[] - */ - public static function serverIPs($refreshCache = false) { - static $cachedServerIPs = null; - if (isset($cachedServerIPs) && !$refreshCache) { - return $cachedServerIPs; - } - - $serverIPs = array(); - $storedIP = wfConfig::get('serverIP'); - if (preg_match('/^(\d+);(.+)$/', $storedIP, $matches)) { //Format is 'timestamp;ip' - $serverIPs[] = $matches[2]; - } - - if (function_exists('dns_get_record')) { - $storedDNS = wfConfig::get('serverDNS'); - $usingCache = false; - if (preg_match('/^(\d+);(\d+);(.+)$/', $storedDNS, $matches)) { //Format is 'timestamp;ttl;ip' - $timestamp = $matches[1]; - $ttl = $matches[2]; - if ($timestamp + max($ttl, 86400) > time()) { - $serverIPs[] = $matches[3]; - $usingCache = true; - } - } - - if (!$usingCache) { - $home = get_home_url(); - if (preg_match('/^https?:\/\/([^\/]+)/i', $home, $matches)) { - $host = strtolower($matches[1]); - $cnameRaw = @dns_get_record($host, DNS_CNAME); - $cnames = array(); - $cnamesTargets = array(); - if ($cnameRaw) { - foreach ($cnameRaw as $elem) { - if ($elem['host'] == $host) { - $cnames[] = $elem; - $cnamesTargets[] = $elem['target']; - } - } - } - - $aRaw = @dns_get_record($host, DNS_A); - $a = array(); - if ($aRaw) { - foreach ($aRaw as $elem) { - if ($elem['host'] == $host || in_array($elem['host'], $cnamesTargets)) { - $a[] = $elem; - } - } - } - - $firstA = wfUtils::array_first($a); - if ($firstA !== null) { - $serverIPs[] = $firstA['ip']; - wfConfig::set('serverDNS', time() . ';' . $firstA['ttl'] . ';' . $firstA['ip']); - } - } - } - } - - if (isset($_SERVER['SERVER_ADDR']) && wfUtils::isValidIP($_SERVER['SERVER_ADDR'])) { - $serverIPs[] = $_SERVER['SERVER_ADDR']; - } - - $serverIPs = array_unique($serverIPs); - $cachedServerIPs = $serverIPs; - return $serverIPs; - } - - public static function getIP($refreshCache = false) { - static $theIP = null; - if (isset($theIP) && !$refreshCache) { - return $theIP; - } - //For debugging. - //return '54.232.205.132'; - //return self::makeRandomIP(); - - // if no REMOTE_ADDR, it's probably running from the command line - $ip = self::getIPAndServerVariable(); - if (is_array($ip)) { - list($IP, $variable) = $ip; - $theIP = $IP; - return $IP; - } - return false; - } - - public static function getIPForField($field, $trustedProxies = null) { - $ip = self::getIPAndServerVariable($field, $trustedProxies); - if (is_array($ip)) { - list($IP, $variable) = $ip; - return $IP; - } - return false; - } - - public static function getAllServerVariableIPs() - { - $variables = array('REMOTE_ADDR', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR'); - $ips = array(); - - foreach ($variables as $variable) { - $ip = isset($_SERVER[$variable]) ? $_SERVER[$variable] : false; - - if ($ip && strpos($ip, ',') !== false) { - $ips[$variable] = preg_replace('/[\s,]/', '', explode(',', $ip)); - } else { - $ips[$variable] = $ip; - } - } - - return $ips; - } - - public static function getIPAndServerVariable($howGet = null, $trustedProxies = null) { - $connectionIP = array_key_exists('REMOTE_ADDR', $_SERVER) ? array($_SERVER['REMOTE_ADDR'], 'REMOTE_ADDR') : array('127.0.0.1', 'REMOTE_ADDR'); - - if ($howGet === null) { - $howGet = wfConfig::get('howGetIPs', false); - } - - if($howGet){ - if($howGet == 'REMOTE_ADDR'){ - return self::getCleanIPAndServerVar(array($connectionIP), $trustedProxies); - } else { - $ipsToCheck = array( - array((isset($_SERVER[$howGet]) ? $_SERVER[$howGet] : ''), $howGet), - $connectionIP, - ); - return self::getCleanIPAndServerVar($ipsToCheck, $trustedProxies); - } - } else { - $ipsToCheck = array(); - - $recommendedField = wfConfig::get('detectProxyRecommendation', ''); //Prioritize the result from our proxy check if done - if (!empty($recommendedField) && $recommendedField != 'UNKNOWN' && $recommendedField != 'DEFERRED') { - if (isset($_SERVER[$recommendedField])) { - $ipsToCheck[] = array($_SERVER[$recommendedField], $recommendedField); - } - } - $ipsToCheck[] = $connectionIP; - if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $ipsToCheck[] = array($_SERVER['HTTP_X_FORWARDED_FOR'], 'HTTP_X_FORWARDED_FOR'); - } - if (isset($_SERVER['HTTP_X_REAL_IP'])) { - $ipsToCheck[] = array($_SERVER['HTTP_X_REAL_IP'], 'HTTP_X_REAL_IP'); - } - return self::getCleanIPAndServerVar($ipsToCheck, $trustedProxies); - } - return false; //Returns an array with a valid IP and the server variable, or false. - } - public static function getIPPreview($howGet = null, $trustedProxies = null) { - $ip = self::getIPAndServerVariable($howGet, $trustedProxies); - if (is_array($ip)) { - list($IP, $variable) = $ip; - if (isset($_SERVER[$variable]) && strpos($_SERVER[$variable], ',') !== false) { - $items = preg_replace('/[\s,]/', '', explode(',', $_SERVER[$variable])); - $output = ''; - foreach ($items as $i) { - if ($IP == $i) { - $output .= ', <strong>' . esc_html($i) . '</strong>'; - } - else { - $output .= ', ' . esc_html($i); - } - } - - return substr($output, 2); - } - return '<strong>' . esc_html($IP) . '</strong>'; - } - return false; - } - public static function isValidIP($IP){ - return filter_var($IP, FILTER_VALIDATE_IP) !== false; - } - public static function isValidCIDRRange($range) { - $components = explode('/', $range); - if (count($components) != 2) { return false; } - - list($ip, $prefix) = $components; - if (!self::isValidIP($ip)) { return false; } - - if (!preg_match('/^\d+$/', $prefix)) { return false; } - - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - if ($prefix < 0 || $prefix > 32) { return false; } - } - else { - if ($prefix < 1 || $prefix > 128) { return false; } - } - - return true; - } - public static function isValidEmail($email, $strict = false) { - //We don't default to strict, full validation because poorly-configured servers can crash due to the regex PHP uses in filter_var($email, FILTER_VALIDATE_EMAIL) - if ($strict) { - return (filter_var($email, FILTER_VALIDATE_EMAIL) !== false); - } - - return preg_match('/^[^@\s]+@[^@\s]+\.[^@\s]+$/i', $email) === 1; - } - public static function getRequestedURL() { - if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST']) { - $host = $_SERVER['HTTP_HOST']; - } else if (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME']) { - $host = $_SERVER['SERVER_NAME']; - } - else { - return null; - } - $prefix = 'http'; - if (is_ssl()) { - $prefix = 'https'; - } - return $prefix . '://' . $host . $_SERVER['REQUEST_URI']; - } - - public static function editUserLink($userID){ - return get_admin_url() . 'user-edit.php?user_id=' . $userID; - } - public static function tmpl($file, $data){ - extract($data); - ob_start(); - include dirname(__FILE__) . DIRECTORY_SEPARATOR . $file; - return ob_get_contents() . (ob_end_clean() ? "" : ""); - } - public static function bigRandomHex(){ - return bin2hex(wfWAFUtils::random_bytes(16)); - } - public static function encrypt($str){ - $key = wfConfig::get('encKey'); - if(! $key){ - wordfence::status(1, 'error', __("Wordfence error: No encryption key found!", 'wordfence')); - return false; - } - $db = new wfDB(); - return $db->querySingle("select HEX(AES_ENCRYPT('%s', '%s')) as val", $str, $key); - } - public static function decrypt($str){ - $key = wfConfig::get('encKey'); - if(! $key){ - wordfence::status(1, 'error', __("Wordfence error: No encryption key found!", 'wordfence')); - return false; - } - $db = new wfDB(); - return $db->querySingle("select AES_DECRYPT(UNHEX('%s'), '%s') as val", $str, $key); - } - public static function lcmem(){ - $trace=debug_backtrace(); - $caller=array_shift($trace); - $mem = memory_get_usage(true); - error_log("$mem at " . $caller['file'] . " line " . $caller['line']); - } - public static function logCaller(){ - $trace=debug_backtrace(); - $caller=array_shift($trace); - $c2 = array_shift($trace); - error_log("Caller for " . $caller['file'] . " line " . $caller['line'] . " is " . $c2['file'] . ' line ' . $c2['line']); - } - public static function getWPVersion($forceRecheck = false){ - if ($forceRecheck) { - require(ABSPATH . 'wp-includes/version.php'); //defines $wp_version - return $wp_version; - } - - if(wordfence::$wordfence_wp_version){ - return wordfence::$wordfence_wp_version; - } else { - global $wp_version; - return $wp_version; - } - } - public static function isAdminPageMU(){ - if(preg_match('/^[\/a-zA-Z0-9\-\_\s\+\~\!\^\.]*\/wp-admin\/network\//', $_SERVER['REQUEST_URI'])){ - return true; - } - return false; - } - public static function getSiteBaseURL(){ - return rtrim(site_url(), '/') . '/'; - } - public static function longestLine($data){ - $lines = preg_split('/[\r\n]+/', $data); - $max = 0; - foreach($lines as $line){ - $len = strlen($line); - if($len > $max){ - $max = $len; - } - } - return $max; - } - public static function longestNospace($data){ - $lines = preg_split('/[\r\n\s\t]+/', $data); - $max = 0; - foreach($lines as $line){ - $len = strlen($line); - if($len > $max){ - $max = $len; - } - } - return $max; - } - public static function requestMaxMemory(){ - if(wfConfig::get('maxMem', false) && (int) wfConfig::get('maxMem') > 0){ - $maxMem = (int) wfConfig::get('maxMem'); - } else { - $maxMem = 256; - } - if( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < $maxMem ) ){ - self::iniSet('memory_limit', $maxMem . 'M'); - } - } - public static function isAdmin($user = false){ - if($user){ - if(is_multisite()){ - if(user_can($user, 'manage_network')){ - return true; - } - } else { - if(user_can($user, 'manage_options')){ - return true; - } - } - } else { - if(is_multisite()){ - if(current_user_can('manage_network')){ - return true; - } - } else { - if(current_user_can('manage_options')){ - return true; - } - } - } - return false; - } - public static function hasTwoFactorEnabled($user = false) { - if (!$user) { - $user = get_user_by('ID', get_current_user_id()); - } - - if (!$user) { - return false; - } - - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - $hasActivatedTwoFactorUser = false; - foreach ($twoFactorUsers as &$t) { - if ($t[3] == 'activated') { - $userID = $t[0]; - if ($userID == $user->ID && wfUtils::isAdmin($user)) { - $hasActivatedTwoFactorUser = true; - } - } - } - - return $hasActivatedTwoFactorUser; - } - public static function isWindows(){ - if(! self::$isWindows){ - if(preg_match('/^win/i', PHP_OS)){ - self::$isWindows = 'yes'; - } else { - self::$isWindows = 'no'; - } - } - return self::$isWindows == 'yes' ? true : false; - } - public static function cleanupOneEntryPerLine($string) { - $string = str_replace(",", "\n", $string); // fix old format - return implode("\n", array_unique(array_filter(array_map('trim', explode("\n", $string))))); - } - - public static function beginProcessingFile($file) { - //Do nothing - } - - public static function endProcessingFile() { - if (wfScanner::shared()->useLowResourceScanning()) { - usleep(10000); //10 ms - } - } - - public static function getScanLock(){ - //Windows does not support non-blocking flock, so we use time. - $scanRunning = wfConfig::get('wf_scanRunning'); - if($scanRunning && time() - $scanRunning < WORDFENCE_MAX_SCAN_LOCK_TIME){ - return false; - } - wfConfig::set('wf_scanRunning', time()); - return true; - } - public static function clearScanLock(){ - global $wpdb; - $wfdb = new wfDB(); - $wfdb->truncate(wfDB::networkTable('wfHoover')); - - wfConfig::set('wf_scanRunning', ''); - wfIssues::updateScanStillRunning(false); - if (wfCentral::isConnected()) { - wfCentral::updateScanStatus(); - } - } - public static function getIPGeo($IP){ //Works with int or dotted - - $locs = self::getIPsGeo(array($IP)); - if(isset($locs[$IP])){ - return $locs[$IP]; - } else { - return false; - } - } - public static function getIPsGeo($IPs){ //works with int or dotted. Outputs same format it receives. - $IPs = array_unique($IPs); - $toResolve = array(); - $db = new wfDB(); - $locsTable = wfDB::networkTable('wfLocs'); - $IPLocs = array(); - foreach($IPs as $IP){ - $isBinaryIP = !self::isValidIP($IP); - if ($isBinaryIP) { - $ip_printable = wfUtils::inet_ntop($IP); - $ip_bin = $IP; - } else { - $ip_printable = $IP; - $ip_bin = wfUtils::inet_pton($IP); - } - - $row = $db->querySingleRec("select IP, ctime, failed, city, region, countryName, countryCode, lat, lon, unix_timestamp() - ctime as age from " . $locsTable . " where IP=%s", $ip_bin); - if($row){ - if($row['age'] > WORDFENCE_MAX_IPLOC_AGE){ - $db->queryWrite("delete from " . $locsTable . " where IP=%s", $row['IP']); - } else { - if($row['failed'] == 1){ - $IPLocs[$ip_printable] = false; - } else { - $row['IP'] = self::inet_ntop($row['IP']); - $row['region'] = wfUtils::shouldDisplayRegion($row['countryName']) ? $row['region'] : ''; - $IPLocs[$ip_printable] = $row; - } - } - } - if(! isset($IPLocs[$ip_printable])){ - $toResolve[] = $ip_printable; - } - } - if(sizeof($toResolve) > 0){ - if (wfConfig::get('enableRemoteIpLookup', true)) { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $freshIPs = $api->call('resolve_ips', array(), array( - 'ips' => implode(',', $toResolve) - )); - } catch(Exception $e){ - wordfence::status(2, 'error', sprintf(/* translators: Error message. */ __("Call to Wordfence API to resolve IPs failed: %s", 'wordfence'), $e->getMessage())); - return array(); - } - } - else { - require_once(__DIR__ . '/wfIpLocator.php'); - $locator = wfIpLocator::getInstance(); - $freshIPs = array(); - $locale = get_locale(); - foreach ($toResolve as $ip) { - $record = $locator->locate($ip); - if ($record !== null) { - $countryCode = $record->getCountryCode(); - if ($countryCode !== null) { - $countryName = $record->getCountryName($locale); - if ($countryName === null) - $countryName = $countryCode; - $freshIPs[$ip] = array($countryCode, $countryName); - continue; - } - } - $freshIPs[$ip] = 'failed'; - } - } - if(is_array($freshIPs)){ - foreach($freshIPs as $IP => $value){ - $IP_bin = wfUtils::inet_pton($IP); - if($value == 'failed'){ - $db->queryWrite("insert IGNORE into " . $locsTable . " (IP, ctime, failed) values (%s, unix_timestamp(), 1)", $IP_bin); - $IPLocs[$IP] = false; - } else if(is_array($value)){ - for($i = 0; $i <= 5; $i++){ - //Prevent warnings in debug mode about uninitialized values - if(! isset($value[$i])){ $value[$i] = ''; } - } - $db->queryWrite("insert IGNORE into " . $locsTable . " (IP, ctime, failed, city, region, countryName, countryCode, lat, lon) values (%s, unix_timestamp(), 0, '%s', '%s', '%s', '%s', %s, %s)", - $IP_bin, - $value[3], //city - $value[2], //region - $value[1], //countryName - $value[0],//countryCode - $value[4],//lat - $value[5]//lon - ); - $IPLocs[$IP] = array( - 'IP' => $IP, - 'city' => $value[3], - 'region' => wfUtils::shouldDisplayRegion($value[1]) ? $value[2] : '', - 'countryName' => $value[1], - 'countryCode' => $value[0], - 'lat' => $value[4], - 'lon' => $value[5] - ); - } - } - } - } - return $IPLocs; - } - - public static function reverseLookup($IP) { - static $_memoryCache = array(); - if (isset($_memoryCache[$IP])) { - return $_memoryCache[$IP]; - } - - $db = new wfDB(); - $reverseTable = wfDB::networkTable('wfReverseCache'); - $IPn = wfUtils::inet_pton($IP); - $host = $db->querySingle("select host from " . $reverseTable . " where IP=%s and unix_timestamp() - lastUpdate < %d", $IPn, WORDFENCE_REVERSE_LOOKUP_CACHE_TIME); - if (!$host) { - // This function works for IPv4 or IPv6 - if (function_exists('gethostbyaddr')) { - $host = @gethostbyaddr($IP); - } - if (!$host) { - $ptr = false; - if (filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false) { - $ptr = implode(".", array_reverse(explode(".", $IP))) . ".in-addr.arpa"; - } else if (filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false) { - $ptr = implode(".", array_reverse(str_split(bin2hex($IPn)))) . ".ip6.arpa"; - } - - if ($ptr && function_exists('dns_get_record')) { - $host = @dns_get_record($ptr, DNS_PTR); - if ($host) { - $host = $host[0]['target']; - } - } - } - $_memoryCache[$IP] = $host; - if (!$host) { - $host = 'NONE'; - } - $db->queryWrite("insert into " . $reverseTable . " (IP, host, lastUpdate) values (%s, '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE host='%s', lastUpdate=unix_timestamp()", $IPn, $host, $host); - } - if ($host == 'NONE') { - $_memoryCache[$IP] = ''; - return ''; - } else { - $_memoryCache[$IP] = $host; - return $host; - } - } - public static function errorsOff(){ - self::$lastErrorReporting = @ini_get('error_reporting'); - @error_reporting(0); - self::$lastDisplayErrors = @ini_get('display_errors'); - self::iniSet('display_errors', 0); - if(class_exists('wfScan')){ wfScan::$errorHandlingOn = false; } - } - public static function errorsOn(){ - @error_reporting(self::$lastErrorReporting); - self::iniSet('display_errors', self::$lastDisplayErrors); - if(class_exists('wfScan')){ wfScan::$errorHandlingOn = true; } - } - //Note this function may report files that are too big which actually are not too big but are unseekable and throw an error on fseek(). But that's intentional - public static function fileTooBig($file){ //Deals with files > 2 gigs on 32 bit systems which are reported with the wrong size due to integer overflow - if (!@is_file($file) || !@is_readable($file)) { return false; } //Only apply to readable files - wfUtils::errorsOff(); - $fh = @fopen($file, 'r'); - wfUtils::errorsOn(); - if(! $fh){ return false; } - $offset = WORDFENCE_MAX_FILE_SIZE_TO_PROCESS + 1; - $tooBig = false; - try { - if(@fseek($fh, $offset, SEEK_SET) === 0){ - if(strlen(fread($fh, 1)) === 1){ - $tooBig = true; - } - } //Otherwise we couldn't seek there so it must be smaller - fclose($fh); - return $tooBig; - } catch(Exception $e){ return true; } //If we get an error don't scan this file, report it's too big. - } - public static function fileOver2Gigs($file){ //Surround calls to this func with try/catch because fseek may throw error. - $fh = @fopen($file, 'r'); - if(! $fh){ return false; } - $offset = 2147483647; - $tooBig = false; - //My throw an error so surround calls to this func with try/catch - if(@fseek($fh, $offset, SEEK_SET) === 0){ - if(strlen(fread($fh, 1)) === 1){ - $tooBig = true; - } - } //Otherwise we couldn't seek there so it must be smaller - @fclose($fh); - return $tooBig; - } - public static function countryCode2Name($code){ - require(dirname(__FILE__) . '/wfBulkCountries.php'); /** @var array $wfBulkCountries */ - if(isset($wfBulkCountries[$code])){ - return $wfBulkCountries[$code]; - } else { - return ''; - } - } - public static function shouldDisplayRegion($country) { - $countries_to_show_for = array('united states', 'canada', 'australia'); - return in_array(strtolower($country), $countries_to_show_for); - } - public static function extractBareURI($URL){ - $URL = preg_replace('/^https?:\/\/[^\/]+/i', '', $URL); //strip of method and host - $URL = preg_replace('/\#.*$/', '', $URL); //strip off fragment - $URL = preg_replace('/\?.*$/', '', $URL); //strip off query string - return $URL; - } - public static function requireIpLocator() { - /** - * This is also used in the WAF so in certain site setups (i.e. nested sites in subdirectories) - * it's possible for this to already have been loaded from a different installation of the - * plugin and hence require_once doesn't help as it's a different file path. There is no guarantee - * that the two plugin installations are the same version, so should the wfIpLocator class or any - * of its dependencies change in a manner that is not backwards compatible, this may need to be - * handled differently. - */ - if (!class_exists('wfIpLocator')) - require_once(__DIR__ . '/wfIpLocator.php'); - } - public static function IP2Country($ip){ - self::requireIpLocator(); - return wfIpLocator::getInstance()->getCountryCode($ip); - } - public static function geoIPVersion() { - self::requireIpLocator(); - $version = wfIpLocator::getInstance()->getDatabaseVersion(); - return $version === null ? 0 : $version; - } - public static function siteURLRelative(){ - if(is_multisite()){ - $URL = network_site_url(); - } else { - $URL = site_url(); - } - $URL = preg_replace('/^https?:\/\/[^\/]+/i', '', $URL); - $URL = rtrim($URL, '/') . '/'; - return $URL; - } - public static function localHumanDate(){ - return date('l jS \of F Y \a\t h:i:s A', time() + (3600 * get_option('gmt_offset'))); - } - public static function localHumanDateShort(){ - return date('D jS F \@ h:i:sA', time() + (3600 * get_option('gmt_offset'))); - } - public static function funcEnabled($func){ - if (!function_exists($func)){ return false; } - if (!is_callable($func)) { return false; } - $disabled = explode(',', ini_get('disable_functions')); - if (in_array($func, $disabled)) { - return false; - } - return true; - } - public static function iniSet($key, $val){ - if(self::funcEnabled('ini_set')){ - @ini_set($key, $val); - } - } - public static function doNotCache(){ - header("Pragma: no-cache"); - header("Cache-Control: no-cache, must-revalidate, private, max-age=0"); - header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); //In the past - if(! defined('DONOTCACHEPAGE')){ define('DONOTCACHEPAGE', true); } - if(! defined('DONOTCACHEDB')){ define('DONOTCACHEDB', true); } - if(! defined('DONOTCDN')){ define('DONOTCDN', true); } - if(! defined('DONOTCACHEOBJECT')){ define('DONOTCACHEOBJECT', true); } - wfCache::doNotCache(); - } - public static function isUABlocked($uaPattern){ // takes a pattern using asterisks as wildcards, turns it into regex and checks it against the visitor UA returning true if blocked - return fnmatch($uaPattern, !empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '', FNM_CASEFOLD); - } - public static function isRefererBlocked($refPattern){ - return fnmatch($refPattern, !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', FNM_CASEFOLD); - } - - public static function error_clear_last() { - if (function_exists('error_clear_last')) { - error_clear_last(); - } - else { - // set error_get_last() to defined state by forcing an undefined variable error - set_error_handler('wfUtils::_resetErrorsHandler', 0); - @$undefinedVariable; - restore_error_handler(); - } - } - - /** - * Logs the error given or the last PHP error to our log, rate limiting if needed. - * - * @param string $limiter_key - * @param string $label - * @param null|string $error The error to log. If null, it will be the result of error_get_last - * @param int $rate Logging will only occur once per $rate seconds. - */ - public static function check_and_log_last_error($limiter_key, $label, $error = null, $rate = 3600 /* 1 hour */) { - if ($error === null) { - $error = error_get_last(); - if ($error === null) { - return; - } - else if ($error['file'] === __FILE__) { - return; - } - $error = $error['message']; - } - - $rateKey = 'lastError_rate_' . $limiter_key; - $previousKey = 'lastError_prev_' . $limiter_key; - $previousError = wfConfig::getJSON($previousKey, array(0, false)); - if ($previousError[1] != $error) { - if (wfConfig::getInt($rateKey) < time() - $rate) { - wfConfig::set($rateKey, time()); - wfConfig::setJSON($previousKey, array(time(), $error)); - wordfence::status(2, 'error', $label . ' ' . $error); - } - } - } - - public static function last_error($limiter_key) { - $previousKey = 'lastError_prev_' . $limiter_key; - $previousError = wfConfig::getJSON($previousKey, array(0, false)); - if ($previousError[1]) { - return wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), $previousError[0]) . ': ' . $previousError[1]; - } - return false; - } - - public static function _resetErrorsHandler($errno, $errstr, $errfile, $errline) { - //Do nothing - } - - /** - * @param $startIP - * @param $endIP - * @return array - */ - public static function rangeToCIDRs($startIP, $endIP){ - $start_ip_printable = wfUtils::inet_ntop($startIP); - if (filter_var($start_ip_printable, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - return self::rangeToCIDRsIPv4(current(unpack('N', substr($startIP, 12, 4))), current(unpack('N', substr($endIP, 12, 4)))); - } - $startIPBin = str_pad(wfHelperBin::bin2str($startIP), 128, '0', STR_PAD_LEFT); - $endIPBin = str_pad(wfHelperBin::bin2str($endIP), 128, '0', STR_PAD_LEFT); - $IPIncBin = $startIPBin; - $CIDRs = array(); - while (strcmp($IPIncBin, $endIPBin) <= 0) { - $longNetwork = 128; - $IPNetBin = $IPIncBin; - while (($IPIncBin[$longNetwork - 1] == '0') && (strcmp(substr_replace($IPNetBin, '1', $longNetwork - 1, 1), $endIPBin) <= 0)) { - $IPNetBin[$longNetwork - 1] = '1'; - $longNetwork--; - } - $CIDRs[] = self::inet_ntop(str_pad(wfHelperBin::str2bin($IPIncBin), 16, "\x00", STR_PAD_LEFT)) . ($longNetwork < 128 ? '/' . $longNetwork : ''); - $IPIncBin = str_pad(wfHelperBin::bin2str(wfHelperBin::addbin2bin(chr(1), wfHelperBin::str2bin($IPNetBin))), 128, '0', STR_PAD_LEFT); - } - return $CIDRs; - } - - public static function rangeToCIDRsIPv4($startIP, $endIP){ - $startIPBin = sprintf('%032b', $startIP); - $endIPBin = sprintf('%032b', $endIP); - $IPIncBin = $startIPBin; - $CIDRs = array(); - while(strcmp($IPIncBin, $endIPBin) <= 0){ - $longNetwork = 32; - $IPNetBin = $IPIncBin; - while(($IPIncBin[$longNetwork - 1] == '0') && (strcmp(substr_replace($IPNetBin, '1', $longNetwork - 1, 1), $endIPBin) <= 0)){ - $IPNetBin[$longNetwork - 1] = '1'; - $longNetwork--; - } - $CIDRs[] = long2ip(bindec($IPIncBin)) . ($longNetwork < 32 ? '/' . $longNetwork : ''); - $IPIncBin = sprintf('%032b', bindec($IPNetBin) + 1); - } - return $CIDRs; - } - - /** - * This is a convenience function for sending a JSON response and ensuring that execution stops after sending - * since wp_die() can be interrupted. - * - * @param $response - * @param int|null $status_code - */ - public static function send_json($response, $status_code = null) { - wp_send_json($response, $status_code); - die(); - } - - public static function setcookie($name, $value, $expire, $path, $domain, $secure, $httpOnly){ - if(version_compare(PHP_VERSION, '5.2.0') >= 0){ - @setcookie($name, $value, $expire, $path, $domain, $secure, $httpOnly); - } else { - @setcookie($name, $value, $expire, $path); - } - } - public static function isNginx(){ - $sapi = php_sapi_name(); - $serverSoft = $_SERVER['SERVER_SOFTWARE']; - if($sapi == 'fpm-fcgi' && stripos($serverSoft, 'nginx') !== false){ - return true; - } - } - public static function getLastError(){ - $err = error_get_last(); - if(is_array($err)){ - return $err['message']; - } - return ''; - } - public static function hostNotExcludedFromProxy($url){ - if(! defined('WP_PROXY_BYPASS_HOSTS')){ - return true; //No hosts are excluded - } - $hosts = explode(',', WP_PROXY_BYPASS_HOSTS); - $url = preg_replace('/^https?:\/\//i', '', $url); - $url = preg_replace('/\/.*$/', '', $url); - $url = strtolower($url); - foreach($hosts as $h){ - if(strtolower(trim($h)) == $url){ - return false; - } - } - return true; - } - public static function hasXSS($URL){ - if(! preg_match('/^https?:\/\/[a-z0-9\.\-]+\/[^\':<>\"\\\]*$/i', $URL)){ - return true; - } else { - return false; - } - } - - /** - * @param string $host - * @return array - */ - public static function resolveDomainName($host, $ipVersion = null) { - if (!function_exists('dns_get_record')) { - if ($ipVersion === 4 || $ipVersion === null) { - $ips = gethostbynamel($host); - if ($ips !== false) - return $ips; - } - return array(); - } - $recordTypes = array(); - if ($ipVersion === 4 || $ipVersion === null) - $recordTypes[DNS_A] = 'ip'; - if ($ipVersion === 6 || $ipVersion === null) - $recordTypes[DNS_AAAA] = 'ipv6'; - $ips = array(); - foreach ($recordTypes as $type => $key) { - $records = @dns_get_record($host, $type); - if ($records !== false) { - foreach ($records as $record) { - $ips[] = $record[$key]; - } - } - } - return $ips; - } - - /** - * Expand a compressed printable representation of an IPv6 address. - * - * @param string $ip - * @return string - */ - public static function expandIPv6Address($ip) { - $hex = bin2hex(self::inet_pton($ip)); - $ip = substr(preg_replace("/([a-f0-9]{4})/i", "$1:", $hex), 0, -1); - return $ip; - } - - public static function set_html_content_type() { - return 'text/html'; - } - - public static function htmlEmail($to, $subject, $body) { - add_filter( 'wp_mail_content_type', 'wfUtils::set_html_content_type' ); - $result = wp_mail($to, $subject, $body); - remove_filter( 'wp_mail_content_type', 'wfUtils::set_html_content_type' ); - return $result; - } - - /** - * @param string $readmePath - * @return bool - */ - public static function hideReadme($readmePath = null) { - if ($readmePath === null) { - $readmePath = ABSPATH . 'readme.html'; - } - - if (file_exists($readmePath)) { - $readmePathInfo = pathinfo($readmePath); - require_once(ABSPATH . WPINC . '/pluggable.php'); - $hiddenReadmeFile = $readmePathInfo['filename'] . '.' . wp_hash('readme') . '.' . $readmePathInfo['extension']; - return @rename($readmePath, $readmePathInfo['dirname'] . '/' . $hiddenReadmeFile); - } - return false; - } - - /** - * @param string $readmePath - * @return bool - */ - public static function showReadme($readmePath = null) { - if ($readmePath === null) { - $readmePath = ABSPATH . 'readme.html'; - } - $readmePathInfo = pathinfo($readmePath); - require_once(ABSPATH . WPINC . '/pluggable.php'); - $hiddenReadmeFile = $readmePathInfo['dirname'] . '/' . $readmePathInfo['filename'] . '.' . wp_hash('readme') . '.' . $readmePathInfo['extension']; - if (file_exists($hiddenReadmeFile)) { - return @rename($hiddenReadmeFile, $readmePath); - } - return false; - } - - public static function htaccessAppend($code) - { - $htaccess = wfCache::getHtaccessPath(); - $content = self::htaccess(); - if (wfUtils::isNginx() || !is_writable($htaccess)) { - return false; - } - - if (strpos($content, $code) === false) { - // make sure we write this once - file_put_contents($htaccess, $content . "\n" . trim($code), LOCK_EX); - } - - return true; - } - - public static function htaccessPrepend($code) - { - $htaccess = wfCache::getHtaccessPath(); - $content = self::htaccess(); - if (wfUtils::isNginx() || !is_writable($htaccess)) { - return false; - } - - if (strpos($content, $code) === false) { - // make sure we write this once - file_put_contents($htaccess, trim($code) . "\n" . $content, LOCK_EX); - } - - return true; - } - - public static function htaccess() { - $htaccess = wfCache::getHtaccessPath(); - if (is_readable($htaccess) && !wfUtils::isNginx()) { - return file_get_contents($htaccess); - } - return ""; - } - - /** - * @param array $array - * @param mixed $oldKey - * @param mixed $newKey - * @return array - * @throws Exception - */ - public static function arrayReplaceKey($array, $oldKey, $newKey) { - $keys = array_keys($array); - if (($index = array_search($oldKey, $keys)) === false) { - throw new Exception(sprintf('Key "%s" does not exist', $oldKey)); - } - $keys[$index] = $newKey; - return array_combine($keys, array_values($array)); - } - - /** - * Takes a string that may have characters that will be interpreted as invalid UTF-8 byte sequences and translates them into a string of the equivalent hex sequence. - * - * @param $string - * @param bool $inline - * @return string - */ - public static function potentialBinaryStringToHTML($string, $inline = false, $allowmb4 = false) { - $output = ''; - - if (!defined('ENT_SUBSTITUTE')) { - define('ENT_SUBSTITUTE', 0); - } - - $span = '<span class="wf-hex-sequence">'; - if ($inline) { - $span = '<span style="color:#587ECB">'; - } - - for ($i = 0; $i < wfUtils::strlen($string); $i++) { - $c = $string[$i]; - $b = ord($c); - if ($b < 0x20) { - $output .= $span . '\x' . str_pad(dechex($b), 2, '0', STR_PAD_LEFT) . '</span>'; - } - else if ($b < 0x80) { - $output .= htmlspecialchars($c, ENT_QUOTES, 'ISO-8859-1'); - } - else { //Assume multi-byte UTF-8 - $bytes = 0; - $test = $b; - - while (($test & 0x80) > 0) { - $bytes++; - $test = (($test << 1) & 0xff); - } - - $brokenUTF8 = ($i + $bytes > wfUtils::strlen($string) || $bytes == 1); - if (!$brokenUTF8) { //Make sure we have all the bytes - for ($n = 1; $n < $bytes; $n++) { - $c2 = $string[$i + $n]; - $b2 = ord($c2); - if (($b2 & 0xc0) != 0x80) { - $brokenUTF8 = true; - $bytes = $n; - break; - } - } - } - - if (!$brokenUTF8) { //Ensure the byte sequences are within the accepted ranges: https://tools.ietf.org/html/rfc3629 - /* - * UTF8-octets = *( UTF8-char ) - * UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 - * UTF8-1 = %x00-7F - * UTF8-2 = %xC2-DF UTF8-tail - * UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / - * %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) - * UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / - * %xF4 %x80-8F 2( UTF8-tail ) - * UTF8-tail = %x80-BF - */ - - $testString = wfUtils::substr($string, $i, $bytes); - $regex = '/^(?:' . - '[\xc2-\xdf][\x80-\xbf]' . //UTF8-2 - '|' . '\xe0[\xa0-\xbf][\x80-\xbf]' . //UTF8-3 - '|' . '[\xe1-\xec][\x80-\xbf]{2}' . - '|' . '\xed[\x80-\x9f][\x80-\xbf]' . - '|' . '[\xee-\xef][\x80-\xbf]{2}'; - if ($allowmb4) { - $regex .= '|' . '\xf0[\x90-\xbf][\x80-\xbf]{2}' . //UTF8-4 - '|' . '[\xf1-\xf3][\x80-\xbf]{3}' . - '|' . '\xf4[\x80-\x8f][\x80-\xbf]{2}'; - } - $regex .= ')$/'; - if (!preg_match($regex, $testString)) { - $brokenUTF8 = true; - } - } - - if ($brokenUTF8) { - $bytes = min($bytes, strlen($string) - $i); - for ($n = 0; $n < $bytes; $n++) { - $c2 = $string[$i + $n]; - $b2 = ord($c2); - $output .= $span . '\x' . str_pad(dechex($b2), 2, '0', STR_PAD_LEFT) . '</span>'; - } - $i += ($bytes - 1); - } - else { - $output .= htmlspecialchars(wfUtils::substr($string, $i, $bytes), ENT_QUOTES | ENT_SUBSTITUTE, 'ISO-8859-1'); - $i += ($bytes - 1); - } - } - } - return $output; - } - - public static function requestDetectProxyCallback($timeout = 2, $blocking = true, $forceCheck = false) { - $currentRecommendation = wfConfig::get('detectProxyRecommendation', ''); - if (!$forceCheck) { - $detectProxyNextCheck = wfConfig::get('detectProxyNextCheck', false); - if ($detectProxyNextCheck !== false && time() < $detectProxyNextCheck) { - if (empty($currentRecommendation)) { - wfConfig::set('detectProxyRecommendation', 'DEFERRED', wfConfig::DONT_AUTOLOAD); - } - return; //Let it pull the currently-stored value - } - } - - try { - $waf = wfWAF::getInstance(); - if ($waf->getStorageEngine()->getConfig('attackDataKey', false) === false) { - $waf->getStorageEngine()->setConfig('attackDataKey', mt_rand(0, 0xfff)); - } - $response = wp_remote_get(sprintf(WFWAF_API_URL_SEC . "proxy-check/%d.txt", $waf->getStorageEngine()->getConfig('attackDataKey')), array('headers' => array('Referer' => false))); - - if (!is_wp_error($response)) { - $okToSendBody = wp_remote_retrieve_body($response); - if (preg_match('/^(ok|wait),\s*(\d+)$/i', $okToSendBody, $matches)) { - $command = $matches[1]; - $ttl = $matches[2]; - if ($command == 'wait') { - wfConfig::set('detectProxyNextCheck', time() + $ttl, wfConfig::DONT_AUTOLOAD); - if (empty($currentRecommendation) || $currentRecommendation == 'UNKNOWN') { - wfConfig::set('detectProxyRecommendation', 'DEFERRED', wfConfig::DONT_AUTOLOAD); - } - return; - } - - wfConfig::set('detectProxyNextCheck', time() + $ttl, wfConfig::DONT_AUTOLOAD); - } - else { //Unknown response - wfConfig::set('detectProxyNextCheck', false, wfConfig::DONT_AUTOLOAD); - if (empty($currentRecommendation) || $currentRecommendation == 'UNKNOWN') { - wfConfig::set('detectProxyRecommendation', 'DEFERRED', wfConfig::DONT_AUTOLOAD); - } - return; - } - } - } - catch (Exception $e) { - return; - } - - $nonce = bin2hex(wfWAFUtils::random_bytes(32)); - $callback = self::getSiteBaseURL() . '?_wfsf=detectProxy'; - - wfConfig::set('detectProxyNonce', $nonce, wfConfig::DONT_AUTOLOAD); - wfConfig::set('detectProxyRecommendation', '', wfConfig::DONT_AUTOLOAD); - - $payload = array( - 'nonce' => $nonce, - 'callback' => $callback, - ); - - $homeurl = wfUtils::wpHomeURL(); - $siteurl = wfUtils::wpSiteURL(); - - try { - $response = wp_remote_post(WFWAF_API_URL_SEC . "?" . http_build_query(array( - 'action' => 'detect_proxy', - 'k' => wfConfig::get('apiKey'), - 's' => $siteurl, - 'h' => $homeurl, - 't' => microtime(true), - 'lang' => get_site_option('WPLANG'), - ), '', '&'), - array( - 'body' => json_encode($payload), - 'headers' => array( - 'Content-Type' => 'application/json', - 'Referer' => false, - ), - 'timeout' => $timeout, - 'blocking' => $blocking, - )); - - if (!is_wp_error($response)) { - $jsonResponse = wp_remote_retrieve_body($response); - $decoded = @json_decode($jsonResponse, true); - if (is_array($decoded) && isset($decoded['data']) && is_array($decoded['data']) && isset($decoded['data']['ip']) && wfUtils::isValidIP($decoded['data']['ip'])) { - wfConfig::set('serverIP', time() . ';' . $decoded['data']['ip']); - } - } - } - catch (Exception $e) { - return; - } - } - - /** - * @return bool Returns false if the payload is invalid, true if it processed the callback (even if the IP wasn't found). - */ - public static function processDetectProxyCallback() { - $nonce = wfConfig::get('detectProxyNonce', ''); - $testNonce = (isset($_POST['nonce']) ? $_POST['nonce'] : ''); - if (empty($nonce) || empty($testNonce)) { - return false; - } - - if (!hash_equals($nonce, $testNonce)) { - return false; - } - - $ips = (isset($_POST['ips']) ? $_POST['ips'] : array()); - if (empty($ips)) { - return false; - } - - $expandedIPs = array(); - foreach ($ips as $ip) { - $expandedIPs[] = self::inet_pton($ip); - } - - $checks = array('HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'REMOTE_ADDR', 'HTTP_X_FORWARDED_FOR'); - foreach ($checks as $key) { - if (!isset($_SERVER[$key])) { - continue; - } - - $testIP = self::getCleanIPAndServerVar(array(array($_SERVER[$key], $key))); - if ($testIP === false) { - continue; - } - - $testIP = self::inet_pton($testIP[0]); - if (in_array($testIP, $expandedIPs)) { - wfConfig::set('detectProxyRecommendation', $key, wfConfig::DONT_AUTOLOAD); - wfConfig::set('detectProxyNonce', '', wfConfig::DONT_AUTOLOAD); - return true; - } - } - - wfConfig::set('detectProxyRecommendation', 'UNKNOWN', wfConfig::DONT_AUTOLOAD); - wfConfig::set('detectProxyNonce', '', wfConfig::DONT_AUTOLOAD); - return true; - } - - /** - * Returns a v4 UUID. - * - * @return string - */ - public static function uuid() { - return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', - // 32 bits for "time_low" - wfWAFUtils::random_int(0, 0xffff), wfWAFUtils::random_int(0, 0xffff), - - // 16 bits for "time_mid" - wfWAFUtils::random_int(0, 0xffff), - - // 16 bits for "time_hi_and_version", - // four most significant bits holds version number 4 - wfWAFUtils::random_int(0, 0x0fff) | 0x4000, - - // 16 bits, 8 bits for "clk_seq_hi_res", - // 8 bits for "clk_seq_low", - // two most significant bits holds zero and one for variant DCE1.1 - wfWAFUtils::random_int(0, 0x3fff) | 0x8000, - - // 48 bits for "node" - wfWAFUtils::random_int(0, 0xffff), wfWAFUtils::random_int(0, 0xffff), wfWAFUtils::random_int(0, 0xffff) - ); - } - - public static function base32_encode($rawString, $rightPadFinalBits = false, $padFinalGroup = false, $padCharacter = '=') //Adapted from https://github.com/ademarre/binary-to-text-php - { - // Unpack string into an array of bytes - $bytes = unpack('C*', $rawString); - $byteCount = count($bytes); - - $encodedString = ''; - $byte = array_shift($bytes); - $bitsRead = 0; - $oldBits = 0; - - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'; - $bitsPerCharacter = 5; - - $charsPerByte = 8 / $bitsPerCharacter; - $encodedLength = $byteCount * $charsPerByte; - - // Generate encoded output; each loop produces one encoded character - for ($c = 0; $c < $encodedLength; $c++) { - - // Get the bits needed for this encoded character - if ($bitsRead + $bitsPerCharacter > 8) { - // Not enough bits remain in this byte for the current character - // Save the remaining bits before getting the next byte - $oldBitCount = 8 - $bitsRead; - $oldBits = $byte ^ ($byte >> $oldBitCount << $oldBitCount); - $newBitCount = $bitsPerCharacter - $oldBitCount; - - if (!$bytes) { - // Last bits; match final character and exit loop - if ($rightPadFinalBits) $oldBits <<= $newBitCount; - $encodedString .= $chars[$oldBits]; - - if ($padFinalGroup) { - // Array of the lowest common multiples of $bitsPerCharacter and 8, divided by 8 - $lcmMap = array(1 => 1, 2 => 1, 3 => 3, 4 => 1, 5 => 5, 6 => 3, 7 => 7, 8 => 1); - $bytesPerGroup = $lcmMap[$bitsPerCharacter]; - $pads = $bytesPerGroup * $charsPerByte - ceil((strlen($rawString) % $bytesPerGroup) * $charsPerByte); - $encodedString .= str_repeat($padCharacter, $pads); - } - - break; - } - - // Get next byte - $byte = array_shift($bytes); - $bitsRead = 0; - - } else { - $oldBitCount = 0; - $newBitCount = $bitsPerCharacter; - } - - // Read only the needed bits from this byte - $bits = $byte >> 8 - ($bitsRead + ($newBitCount)); - $bits ^= $bits >> $newBitCount << $newBitCount; - $bitsRead += $newBitCount; - - if ($oldBitCount) { - // Bits come from seperate bytes, add $oldBits to $bits - $bits = ($oldBits << $newBitCount) | $bits; - } - - $encodedString .= $chars[$bits]; - } - - return $encodedString; - } - - private static function _home_url_nofilter($path = '', $scheme = null) { //A version of the native get_home_url and get_option without the filter calls - global $pagenow, $wpdb, $blog_id; - - static $cached_url = null; - if ($cached_url !== null) { - return $cached_url; - } - - if (defined('WP_HOME') && WORDFENCE_PREFER_WP_HOME_FOR_WPML) { - $cached_url = WP_HOME; - return $cached_url; - } - - if ( empty( $blog_id ) || !is_multisite() ) { - $url = $wpdb->get_var("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'home' LIMIT 1"); - if (empty($url)) { //get_option uses siteurl instead if home is empty - $url = $wpdb->get_var("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'siteurl' LIMIT 1"); - } - } - else if (is_multisite()) { - $current_network = get_network(); - if ( 'relative' == $scheme ) - $url = rtrim($current_network->path, '/'); - else - $url = 'http://' . rtrim($current_network->domain, '/') . '/' . trim($current_network->path, '/'); - } - - if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { - if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) - $scheme = 'https'; - else - $scheme = parse_url( $url, PHP_URL_SCHEME ); - } - - $url = set_url_scheme( $url, $scheme ); - - if ( $path && is_string( $path ) ) - $url .= '/' . ltrim( $path, '/' ); - - $cached_url = $url; - return $url; - } - - public static function refreshCachedHomeURL() { - $pullDirectly = class_exists('WPML_URL_Filters'); - $homeurl = ''; - if ($pullDirectly) { - //A version of the native get_home_url without the filter call - $homeurl = self::_home_url_nofilter(); - } - - if (function_exists('get_bloginfo') && empty($homeurl)) { - if (is_multisite()) { - $homeurl = network_home_url(); - } - else { - $homeurl = home_url(); - } - - $homeurl = rtrim($homeurl, '/'); //Because previously we used get_bloginfo and it returns http://example.com without a '/' char. - } - - if (wfConfig::get('wp_home_url') !== $homeurl) { - wfConfig::set('wp_home_url', $homeurl); - } - } - - public static function wpHomeURL($path = '', $scheme = null) { - $homeurl = wfConfig::get('wp_home_url', ''); - if (function_exists('get_bloginfo') && empty($homeurl)) { - if (is_multisite()) { - $homeurl = network_home_url($path, $scheme); - } - else { - $homeurl = home_url($path, $scheme); - } - - $homeurl = rtrim($homeurl, '/'); //Because previously we used get_bloginfo and it returns http://example.com without a '/' char. - } - else { - $homeurl = set_url_scheme($homeurl, $scheme); - if ($path && is_string($path)) { - $homeurl .= '/' . ltrim($path, '/'); - } - } - return $homeurl; - } - - private static function _site_url_nofilter($path = '', $scheme = null) { //A version of the native get_site_url and get_option without the filter calls - global $pagenow, $wpdb, $blog_id; - - static $cached_url = null; - if ($cached_url !== null) { - return $cached_url; - } - - if (defined('WP_SITEURL') && WORDFENCE_PREFER_WP_HOME_FOR_WPML) { - $cached_url = WP_SITEURL; - return $cached_url; - } - - if ( empty( $blog_id ) || !is_multisite() ) { - $url = $wpdb->get_var("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'siteurl' LIMIT 1"); - } - else if (is_multisite()) { - $current_network = get_network(); - if ( 'relative' == $scheme ) - $url = rtrim($current_network->path, '/'); - else - $url = 'http://' . rtrim($current_network->domain, '/') . '/' . trim($current_network->path, '/'); - } - - if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { - if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) - $scheme = 'https'; - else - $scheme = parse_url( $url, PHP_URL_SCHEME ); - } - - $url = set_url_scheme( $url, $scheme ); - - if ( $path && is_string( $path ) ) - $url .= '/' . ltrim( $path, '/' ); - - $cached_url = $url; - return $url; - } - - public static function refreshCachedSiteURL() { - $pullDirectly = class_exists('WPML_URL_Filters'); - $siteurl = ''; - if ($pullDirectly) { - //A version of the native get_home_url without the filter call - $siteurl = self::_site_url_nofilter(); - } - - if (function_exists('get_bloginfo') && empty($siteurl)) { - if (is_multisite()) { - $siteurl = network_site_url(); - } - else { - $siteurl = site_url(); - } - - $siteurl = rtrim($siteurl, '/'); //Because previously we used get_bloginfo and it returns http://example.com without a '/' char. - } - - if (wfConfig::get('wp_site_url') !== $siteurl) { - wfConfig::set('wp_site_url', $siteurl); - } - } - - /** - * Equivalent to network_site_url but uses the cached value for the URL if we have it - * to avoid breaking on sites that define it based on the requesting hostname. - * - * @param string $path - * @param null|string $scheme - * @return string - */ - public static function wpSiteURL($path = '', $scheme = null) { - $siteurl = wfConfig::get('wp_site_url', ''); - if (function_exists('get_bloginfo') && empty($siteurl)) { - if (is_multisite()) { - $siteurl = network_site_url($path, $scheme); - } - else { - $siteurl = site_url($path, $scheme); - } - - $siteurl = rtrim($siteurl, '/'); //Because previously we used get_bloginfo and it returns http://example.com without a '/' char. - } - else { - $siteurl = set_url_scheme($siteurl, $scheme); - if ($path && is_string($path)) { - $siteurl .= '/' . ltrim($path, '/'); - } - } - return $siteurl; - } - - /** - * Equivalent to network_admin_url but uses the cached value for the URL if we have it - * to avoid breaking on sites that define it based on the requesting hostname. - * - * @param string $path - * @param null|string $scheme - * @return string - */ - public static function wpAdminURL($path = '', $scheme = null) { - if (!is_multisite()) { - $adminURL = self::wpSiteURL('wp-admin/', $scheme); - } - else { - $adminURL = self::wpSiteURL('wp-admin/network/', $scheme); - } - - if ($path && is_string($path)) { - $adminURL .= ltrim($path, '/'); - } - - if (!is_multisite()) { - return apply_filters('admin_url', $adminURL, $path, null); - } - - return apply_filters('network_admin_url', $adminURL, $path); - } - - public static function wafInstallationType() { - $storage = 'file'; - if (defined('WFWAF_STORAGE_ENGINE')) { $storage = WFWAF_STORAGE_ENGINE; } - - try { - $status = (defined('WFWAF_ENABLED') && !WFWAF_ENABLED) ? 'disabled' : wfWaf::getInstance()->getStorageEngine()->getConfig('wafStatus'); - if (defined('WFWAF_ENABLED') && !WFWAF_ENABLED) { - return "{$status}|const|{$storage}"; - } - else if (defined('WFWAF_SUBDIRECTORY_INSTALL') && WFWAF_SUBDIRECTORY_INSTALL) { - return "{$status}|subdir|{$storage}"; - } - else if (defined('WFWAF_AUTO_PREPEND') && WFWAF_AUTO_PREPEND) { - return "{$status}|extended|{$storage}"; - } - - return "{$status}|basic|{$storage}"; - } - catch (Exception $e) { - //Do nothing - } - - return 'unknown'; - } - - public static function hex2bin($string) { //Polyfill for PHP < 5.4 - if (!is_string($string)) { return false; } - if (strlen($string) % 2 == 1) { return false; } - return pack('H*', $string); - } - - /** - * Returns whether or not the site should be treated as if it's full-time SSL. - * - * @return bool - */ - public static function isFullSSL() { - return is_ssl() && parse_url(self::wpHomeURL(), PHP_URL_SCHEME) === 'https'; //It's possible for only wp-admin to be SSL so we check the home URL too - } - - /** - * Identical to the same functions in wfWAFUtils. - * - * Set the mbstring internal encoding to a binary safe encoding when func_overload - * is enabled. - * - * When mbstring.func_overload is in use for multi-byte encodings, the results from - * strlen() and similar functions respect the utf8 characters, causing binary data - * to return incorrect lengths. - * - * This function overrides the mbstring encoding to a binary-safe encoding, and - * resets it to the users expected encoding afterwards through the - * `reset_mbstring_encoding` function. - * - * It is safe to recursively call this function, however each - * `mbstring_binary_safe_encoding()` call must be followed up with an equal number - * of `reset_mbstring_encoding()` calls. - * - * @see wfWAFUtils::reset_mbstring_encoding - * - * @staticvar array $encodings - * @staticvar bool $overloaded - * - * @param bool $reset Optional. Whether to reset the encoding back to a previously-set encoding. - * Default false. - */ - public static function mbstring_binary_safe_encoding($reset = false) { - static $encodings = array(); - static $overloaded = null; - - if (is_null($overloaded)) { - // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated - $overloaded = function_exists('mb_internal_encoding') && (ini_get('mbstring.func_overload') & 2); - } - - if (false === $overloaded) { return; } - - if (!$reset) { - $encoding = mb_internal_encoding(); - array_push($encodings, $encoding); - mb_internal_encoding('ISO-8859-1'); - } - - if ($reset && $encodings) { - $encoding = array_pop($encodings); - mb_internal_encoding($encoding); - } - } - - /** - * Reset the mbstring internal encoding to a users previously set encoding. - * - * @see wfWAFUtils::mbstring_binary_safe_encoding - */ - public static function reset_mbstring_encoding() { - self::mbstring_binary_safe_encoding(true); - } - - /** - * @param callable $function - * @param array $args - * @return mixed - */ - protected static function callMBSafeStrFunction($function, $args) { - self::mbstring_binary_safe_encoding(); - $return = call_user_func_array($function, $args); - self::reset_mbstring_encoding(); - return $return; - } - - /** - * Multibyte safe strlen. - * - * @param $binary - * @return int - */ - public static function strlen($binary) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strlen', $args); - } - - /** - * @param $haystack - * @param $needle - * @param int $offset - * @return int - */ - public static function stripos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::callMBSafeStrFunction('stripos', $args); - } - - /** - * @param $string - * @return mixed - */ - public static function strtolower($string) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strtolower', $args); - } - - /** - * @param $string - * @param $start - * @param $length - * @return mixed - */ - public static function substr($string, $start, $length = null) { - if ($length === null) { $length = self::strlen($string); } - return self::callMBSafeStrFunction('substr', array( - $string, $start, $length - )); - } - - /** - * @param $haystack - * @param $needle - * @param int $offset - * @return mixed - */ - public static function strpos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strpos', $args); - } - - /** - * @param string $haystack - * @param string $needle - * @param int $offset - * @param int $length - * @return mixed - */ - public static function substr_count($haystack, $needle, $offset = 0, $length = null) { - if ($length === null) { $length = self::strlen($haystack); } - return self::callMBSafeStrFunction('substr_count', array( - $haystack, $needle, $offset, $length - )); - } - - /** - * @param $string - * @return mixed - */ - public static function strtoupper($string) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strtoupper', $args); - } - - /** - * @param string $haystack - * @param string $needle - * @param int $offset - * @return mixed - */ - public static function strrpos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strrpos', $args); - } - - public static function sets_equal($a1, $a2) { - if (!is_array($a1) || !is_array($a2)) { - return false; - } - - if (count($a1) != count($a2)) { - return false; - } - - sort($a1, SORT_NUMERIC); - sort($a2, SORT_NUMERIC); - return $a1 == $a2; - } - - public static function array_first($array) { - if (empty($array)) { - return null; - } - - $values = array_values($array); - return $values[0]; - } - - public static function array_last($array) { - if (empty($array)) { - return null; - } - - $values = array_values($array); - return $values[count($values) - 1]; - } - - public static function array_strtolower($array) { - $result = array(); - foreach ($array as $a) { - $result[] = strtolower($a); - } - return $result; - } - - public static function array_column($input = null, $columnKey = null, $indexKey = null) { //Polyfill from https://github.com/ramsey/array_column/blob/master/src/array_column.php - $argc = func_num_args(); - $params = func_get_args(); - if ($argc < 2) { - trigger_error("array_column() expects at least 2 parameters, {$argc} given", E_USER_WARNING); - return null; - } - - if (!is_array($params[0])) { - trigger_error( - 'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given', - E_USER_WARNING - ); - return null; - } - - if (!is_int($params[1]) && !is_float($params[1]) && !is_string($params[1]) && $params[1] !== null && !(is_object($params[1]) && method_exists($params[1], '__toString'))) { - trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING); - return false; - } - - if (isset($params[2]) && !is_int($params[2]) && !is_float($params[2]) && !is_string($params[2]) && !(is_object($params[2]) && method_exists($params[2], '__toString'))) { - trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING); - return false; - } - - $paramsInput = $params[0]; - $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null; - $paramsIndexKey = null; - if (isset($params[2])) { - if (is_float($params[2]) || is_int($params[2])) { - $paramsIndexKey = (int) $params[2]; - } - else { - $paramsIndexKey = (string) $params[2]; - } - } - - $resultArray = array(); - foreach ($paramsInput as $row) { - $key = $value = null; - $keySet = $valueSet = false; - if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) { - $keySet = true; - $key = (string) $row[$paramsIndexKey]; - } - - if ($paramsColumnKey === null) { - $valueSet = true; - $value = $row; - } - elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) { - $valueSet = true; - $value = $row[$paramsColumnKey]; - } - - if ($valueSet) { - if ($keySet) { - $resultArray[$key] = $value; - } - else { - $resultArray[] = $value; - } - } - } - - return $resultArray; - } - - /** - * Returns the current timestamp, adjusted as needed to get close to what we consider a true timestamp. We use this - * because a significant number of servers are using a drastically incorrect time. - * - * @return int - */ - public static function normalizedTime($base = false) { - if ($base === false) { - $base = time(); - } - - $offset = (int) wfConfig::get('timeoffset_wf', 0); - return $base + $offset; - } - - /** - * Returns what we consider a true timestamp, adjusted as needed to match the local server's drift. We use this - * because a significant number of servers are using a drastically incorrect time. - * - * @return int - */ - public static function denormalizedTime($base) { - $offset = (int) wfConfig::get('timeoffset_wf', 0); - return $base - $offset; - } - - /** - * Returns the number of minutes for the time zone offset from UTC. If $timestamp and using a named time zone, - * it will be adjusted automatically to match whether or not the server's time zone is in Daylight Savings Time. - * - * @param bool|int $timestamp Assumed to be in UTC. If false, defaults to the current timestamp. - * @return int - */ - public static function timeZoneMinutes($timestamp = false) { - if ($timestamp === false) { - $timestamp = time(); - } - - $tz = get_option('timezone_string'); - if (!empty($tz)) { - $timezone = new DateTimeZone($tz); - $dtStr = gmdate("c", (int) $timestamp); //Have to do it this way because of PHP 5.2 - $dt = new DateTime($dtStr, $timezone); - return (int) ($timezone->getOffset($dt) / 60); - } - else { - $gmt = get_option('gmt_offset'); - if (!empty($gmt)) { - return (int) ($gmt * 60); - } - } - - return 0; - } - - /** - * Formats and returns the given timestamp using the time zone set for the WordPress installation. - * - * @param string $format See the PHP docs on DateTime for the format options. - * @param int|bool $timestamp Assumed to be in UTC. If false, defaults to the current timestamp. - * @return string - */ - public static function formatLocalTime($format, $timestamp = false) { - if ($timestamp === false) { - $timestamp = time(); - } - - $utc = new DateTimeZone('UTC'); - $dtStr = gmdate("c", (int) $timestamp); //Have to do it this way because of PHP 5.2 - $dt = new DateTime($dtStr, $utc); - $tz = get_option('timezone_string'); - if (!empty($tz)) { - $dt->setTimezone(new DateTimeZone($tz)); - } - else { - $gmt = get_option('gmt_offset'); - if (!empty($gmt)) { - if (PHP_VERSION_ID < 50510) { - $dtStr = gmdate("c", (int) ($timestamp + $gmt * 3600)); //Have to do it this way because of < PHP 5.5.10 - $dt = new DateTime($dtStr, $utc); - } - else { - $direction = ($gmt > 0 ? '+' : '-'); - $gmt = abs($gmt); - $h = (int) $gmt; - $m = ($gmt - $h) * 60; - $dt->setTimezone(new DateTimeZone($direction . str_pad($h, 2, '0', STR_PAD_LEFT) . str_pad($m, 2, '0', STR_PAD_LEFT))); - } - } - } - return $dt->format($format); - } - - /** - * Parses the given time string and returns its DateTime with the server's configured time zone. - * - * @param string $timestring - * @return DateTime - */ - public static function parseLocalTime($timestring) { - $utc = new DateTimeZone('UTC'); - $tz = get_option('timezone_string'); - if (!empty($tz)) { - $tz = new DateTimeZone($tz); - return new DateTime($timestring, $tz); - } - else { - $gmt = get_option('gmt_offset'); - if (!empty($gmt)) { - if (PHP_VERSION_ID < 50510) { - $timestamp = strtotime($timestring); - $dtStr = gmdate("c", (int) ($timestamp + $gmt * 3600)); //Have to do it this way because of < PHP 5.5.10 - return new DateTime($dtStr, $utc); - } - else { - $direction = ($gmt > 0 ? '+' : '-'); - $gmt = abs($gmt); - $h = (int) $gmt; - $m = ($gmt - $h) * 60; - $tz = new DateTimeZone($direction . str_pad($h, 2, '0', STR_PAD_LEFT) . str_pad($m, 2, '0', STR_PAD_LEFT)); - return new DateTime($timestring, $tz); - } - } - } - return new DateTime($timestring); - } - - /** - * Base64URL-encodes the given payload. This is identical to base64_encode except it substitutes characters - * not safe for use in URLs. - * - * @param string $payload - * @return string - */ - public static function base64url_encode($payload) { - $intermediate = base64_encode($payload); - $intermediate = rtrim($intermediate, '='); - $intermediate = str_replace('+', '-', $intermediate); - $intermediate = str_replace('/', '_', $intermediate); - return $intermediate; - } - - /** - * Base64URL-decodes the given payload. This is identical to base64_encode except it allows for the characters - * substituted by base64url_encode. - * - * @param string $payload - * @return string - */ - public static function base64url_decode($payload) { - $intermediate = str_replace('_', '/', $payload); - $intermediate = str_replace('-', '+', $intermediate); - $intermediate = base64_decode($intermediate); - return $intermediate; - } - - /** - * Returns a signed JWT for the given payload. Payload is expected to be an array suitable for JSON-encoding. - * - * @param array $payload - * @param int $maxAge How long the JWT will be considered valid. - * @return string - */ - public static function generateJWT($payload, $maxAge = 604800 /* 7 days */) { - $payload['_exp'] = time() + $maxAge; - $key = wfConfig::get('longEncKey'); - $header = '{"alg":"HS256","typ":"JWT"}'; - $body = self::base64url_encode($header) . '.' . self::base64url_encode(json_encode($payload)); - $signature = hash_hmac('sha256', $body, $key, true); - return $body . '.' . self::base64url_encode($signature); - } - - /** - * Decodes and returns the payload of a JWT. This also validates the signature. - * - * @param string $token - * @return array|bool The decoded payload or false if the token is invalid or fails validation. - */ - public static function decodeJWT($token) { - $components = explode('.', $token); - if (count($components) != 3) { - return false; - } - - $key = wfConfig::get('longEncKey'); - $body = $components[0] . '.' . $components[1]; - $signature = hash_hmac('sha256', $body, $key, true); - $testSignature = self::base64url_decode($components[2]); - if (!hash_equals($signature, $testSignature)) { - return false; - } - - $json = self::base64url_decode($components[1]); - $payload = @json_decode($json, true); - if (isset($payload['_exp']) && $payload['_exp'] < time()) { - return false; - } - return $payload; - } - - /** - * Split a path into its components - * @param string $path - */ - public static function splitPath($path) { - return preg_split('/[\\/\\\\]/', $path, -1, PREG_SPLIT_NO_EMPTY); - } - - /** - * Convert an absolute path to a path relative to $to - * @param string $absolute the absolute path to convert - * @param string $to the absolute path from which to derive the relative path - * @param bool $leadingSlash if true, prepend the resultant URL with a slash - */ - public static function relativePath($absolute, $to, $leadingSlash = false) { - $trailingSlash = in_array(substr($absolute, -1), array('/', '\\')); - $absoluteComponents = self::splitPath($absolute); - $toComponents = self::splitPath($to); - $relativeComponents = array(); - do { - $currentAbsolute = array_shift($absoluteComponents); - $currentTo = array_shift($toComponents); - } while($currentAbsolute === $currentTo && $currentAbsolute !== null); - while ($currentTo !== null) { - array_push($relativeComponents, '..'); - $currentTo = array_shift($toComponents); - } - while ($currentAbsolute !== null) { - array_push($relativeComponents, $currentAbsolute); - $currentAbsolute = array_shift($absoluteComponents); - } - return implode(array( - $leadingSlash ? '/' : '', - implode('/', $relativeComponents), - ($trailingSlash && (count($relativeComponents) > 0 || !$leadingSlash)) ? '/' : '' - )); - } - - public static function getHomePath() { - if (!function_exists('get_home_path')) { - include_once(ABSPATH . 'wp-admin/includes/file.php'); - } - if (WF_IS_FLYWHEEL) - return trailingslashit($_SERVER['DOCUMENT_ROOT']); - return get_home_path(); - } - - public static function includeOnceIfPresent($path) { - if (file_exists($path)) { - @include_once($path); - return @include_once($path); //Calling `include_once` for an already included file will return true - } - return false; - } - - public static function isCurlSupported() { - if (self::includeOnceIfPresent(ABSPATH . 'wp-includes/class-wp-http-curl.php')) - return WP_Http_Curl::test(); - return false; - } - - private static function isValidJsonValue($value) { - return json_encode($value) !== false; - } - - private static function filterInvalidJsonValues($data, &$modified, &$valid = null) { - if (is_array($data)) { - $modified = array(); - $filtered = array(); - $valid = true; - foreach ($data as $key => $value) { - $value = self::filterInvalidJsonValues($value, $itemModified, $itemValid); - if (($itemValid || $itemModified) && self::isValidJsonValue(array($key => $value))) { - $filtered[$key] = $value; - if ($itemModified) - $modified[$key] = $itemModified; - } - else { - $valid = false; - } - } - return $filtered; - } - else { - $modified = false; - $valid = self::isValidJsonValue($data); - if ($valid) { - return $data; - } - else if (is_string($data)) { - $modified = true; - return base64_encode($data); - } - else { - return null; - } - } - } - - public static function jsonEncodeSafely($data) { - $encoded = json_encode($data); - if ($encoded === false) { - $data = self::filterInvalidJsonValues($data, $modified); - if ($modified) - $data['__modified__'] = $modified; - $encoded = json_encode($data); - } - return $encoded; - } - - /** - * Convenience function to extract a matched pattern from a string. If $pattern has no matching groups, the entire - * matched portion is returned. If it has at least one matching group, the first one is returned (others are - * ignored). If there is no match, false is returned. - * - * @param string $pattern - * @param string $subject - * @param bool $expandToLine Whether or not to expand the captured value to include the entire line's contents - * @return false|string - */ - public static function pregExtract($pattern, $subject, $expandToLine = false) { - if (preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE)) { - if (count($matches) > 1) { - $start = $matches[1][1]; - $text = $matches[1][0]; - $end = $start + strlen($text); - } - else { - $start = $matches[0][1]; - $text = $matches[0][0]; - $end = $start + strlen($text); - } - - if ($expandToLine) { - if (preg_match_all('/[\r\n]/', substr($subject, 0, $start), $matches, PREG_OFFSET_CAPTURE)) { - $start = $matches[0][count($matches[0]) - 1][1] + 1; - } - else { - $start = 0; - } - - if (preg_match('/[\r\n]/', $subject, $matches, PREG_OFFSET_CAPTURE, $end)) { - $end = $matches[0][1]; - } - else { - $end = strlen($subject) - 0; - } - - $text = substr($subject, $start, $end - $start); - } - - return $text; - } - return false; - } - - /** - * Returns whether or not MySQLi should be used directly when needed. Returns true if there's a valid DB handle, - * our database test succeeded, our constant is not set to prevent it, and then either $wpdb indicates it's using - * mysqli (older WordPress versions) or we're on PHP 7+ (only mysqli is ever used). - * - * @return bool - */ - public static function useMySQLi() { - global $wpdb; - $dbh = $wpdb->dbh; - $useMySQLi = (is_object($dbh) && (PHP_MAJOR_VERSION >= 7 || $wpdb->use_mysqli) && wfConfig::get('allowMySQLi', true) && WORDFENCE_ALLOW_DIRECT_MYSQLI); - return $useMySQLi; - } -} - -// GeoIP lib uses these as well -if (!function_exists('inet_ntop')) { - function inet_ntop($ip) { - return wfUtils::_inet_ntop($ip); - } -} -if (!function_exists('inet_pton')) { - function inet_pton($ip) { - return wfUtils::_inet_pton($ip); - } -} - - -class wfWebServerInfo { - - const APACHE = 1; - const NGINX = 2; - const LITESPEED = 4; - const IIS = 8; - - private $handler; - private $software; - private $softwareName; - - /** - * - */ - public static function createFromEnvironment() { - $serverInfo = new self; - $sapi = php_sapi_name(); - if (WF_IS_FLYWHEEL) { - $serverInfo->setSoftware(self::NGINX); - $serverInfo->setSoftwareName('Flywheel'); - } - else if (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false) { - $serverInfo->setSoftware(self::IIS); - $serverInfo->setSoftwareName('iis'); - } - else if (strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) { - $serverInfo->setSoftware(self::NGINX); - $serverInfo->setSoftwareName('nginx'); - } - else if (stripos($_SERVER['SERVER_SOFTWARE'], 'litespeed') !== false || $sapi == 'litespeed') { - $serverInfo->setSoftware(self::LITESPEED); - $serverInfo->setSoftwareName('litespeed'); - } - else if (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) { - $serverInfo->setSoftware(self::APACHE); - $serverInfo->setSoftwareName('apache'); - } - - $serverInfo->setHandler($sapi); - - return $serverInfo; - } - - /** - * @return bool - */ - public function isApache() { - return $this->getSoftware() === self::APACHE; - } - - /** - * @return bool - */ - public function isNGINX() { - return $this->getSoftware() === self::NGINX; - } - - /** - * @return bool - */ - public function isLiteSpeed() { - return $this->getSoftware() === self::LITESPEED; - } - - /** - * @return bool - */ - public function isIIS() { - return $this->getSoftware() === self::IIS; - } - - /** - * @return bool - */ - public function isApacheModPHP() { - return $this->isApache() && function_exists('apache_get_modules'); - } - - /** - * Not sure if this can be implemented at the PHP level. - * @return bool - */ - public function isApacheSuPHP() { - return $this->isApache() && $this->isCGI() && - function_exists('posix_getuid') && - getmyuid() === posix_getuid(); - } - - /** - * @return bool - */ - public function isCGI() { - return !$this->isFastCGI() && stripos($this->getHandler(), 'cgi') !== false; - } - - /** - * @return bool - */ - public function isFastCGI() { - return stripos($this->getHandler(), 'fastcgi') !== false || stripos($this->getHandler(), 'fpm-fcgi') !== false; - } - - /** - * @return mixed - */ - public function getHandler() { - return $this->handler; - } - - /** - * @param mixed $handler - */ - public function setHandler($handler) { - $this->handler = $handler; - } - - /** - * @return mixed - */ - public function getSoftware() { - return $this->software; - } - - /** - * @param mixed $software - */ - public function setSoftware($software) { - $this->software = $software; - } - - /** - * @return mixed - */ - public function getSoftwareName() { - return $this->softwareName; - } - - /** - * @param mixed $softwareName - */ - public function setSoftwareName($softwareName) { - $this->softwareName = $softwareName; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfVersionCheckController.php b/wp/wp-content/plugins/wordfence/lib/wfVersionCheckController.php deleted file mode 100644 index 7ad6c038..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfVersionCheckController.php +++ /dev/null @@ -1,385 +0,0 @@ -<?php - -class wfVersionCheckController { - const VERSION_COMPATIBLE = 'compatible'; - const VERSION_DEPRECATED = 'deprecated'; - const VERSION_UNSUPPORTED = 'unsupported'; - - const OPENSSL_DEV = 0; - //Betas are 1-14 - const OPENSSL_RELEASE = 15; - - public static function shared() { - static $_shared = false; - if ($_shared === false) { - $_shared = new wfVersionCheckController(); - } - return $_shared; - } - - /** - * Returns whether or not all version checks are successful. If any check returns a value other than VERSION_COMPATIBLE, this returns false. - * - * @return bool - */ - public function checkVersions() { - return ($this->checkPHPVersion() == self::VERSION_COMPATIBLE) && ($this->checkOpenSSLVersion() == self::VERSION_COMPATIBLE) && ($this->checkWordPressVersion() == self::VERSION_COMPATIBLE); - } - - /** - * Does the same thing as checkVersions but also triggers display of the corresponding warnings. - * - * @return bool - */ - public function checkVersionsAndWarn() { - require(dirname(__FILE__) . '/wfVersionSupport.php'); - /** - * @var string $wfPHPDeprecatingVersion - * @var string $wfPHPMinimumVersion - * @var string $wfOpenSSLDeprecatingVersion - * @var string $wfOpenSSLMinimumVersion - * @var string $wfWordPressDeprecatingVersion - * @var string $wfWordPressMinimumVersion - */ - - //PHP - $php = $this->checkPHPVersion(); - if ($php == self::VERSION_DEPRECATED) { - $this->_alertEmail( - 'phpVersionCheckDeprecationEmail_' . $wfPHPDeprecatingVersion, - __('PHP version too old', 'wordfence'), - sprintf( - /* translators: 1. PHP version. 2. PHP version. */ - __('Your site is using a PHP version (%1$s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of PHP available but will currently support PHP versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), - phpversion(), - $wfPHPDeprecatingVersion - ) - . ' ' . - sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP)) - ); - - $this->_adminNotice( - 'phpVersionCheckDeprecationNotice_' . $wfPHPDeprecatingVersion, - 'phpVersionCheck', - wp_kses(sprintf( - /* translators: 1. PHP version. 2. PHP version. */ - __('<strong>WARNING: </strong> Your site is using a PHP version (%1$s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of PHP available but will currently support PHP versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), - phpversion(), - $wfPHPDeprecatingVersion - ), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP) . '" target="_blank" rel="noopener noreferrer">' . esc_html__('Learn More', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>' - ); - } - else if ($php == self::VERSION_UNSUPPORTED) { - $this->_alertEmail( - 'phpVersionCheckUnsupportedEmail_' . $wfPHPMinimumVersion, - __('PHP version too old', 'wordfence'), - sprintf( - /* translators: 1. PHP version. 2. PHP version. */ - __('Your site is using a PHP version (%1$s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of PHP available but will currently support PHP versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), - phpversion(), - $wfPHPDeprecatingVersion - ) . ' ' . sprintf(/* translators: Support URL. */ __('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP)) - ); - - $this->_adminNotice( - 'phpVersionCheckUnsupportedNotice_' . $wfPHPMinimumVersion, - 'phpVersionCheck', - wp_kses(sprintf( - /* translators: 1. PHP version. 2. PHP version. */ - __('<strong>WARNING: </strong> Your site is using a PHP version (%1$s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of PHP available but will currently support PHP versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), - phpversion(), - $wfPHPDeprecatingVersion - ), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP) . '" target="_blank" rel="noopener noreferrer">' . esc_html__('Learn More', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>' - ); - } - else { - wfAdminNoticeQueue::removeAdminNotice(false, 'phpVersionCheck'); - } - - if (wfAdminNoticeQueue::hasNotice('phpVersionCheck')) { - return false; - } - - //OpenSSL - wfAdminNoticeQueue::removeAdminNotice(false, 'opensslVersionCheck'); - /*$openssl = $this->checkOpenSSLVersion(); - if ($openssl == self::VERSION_DEPRECATED) { - $this->_alertEmail( - 'opensslVersionCheckDeprecationEmail_' . $wfOpenSSLDeprecatingVersion, - __('OpenSSL version too old', 'wordfence'), - sprintf(__('Your site is using an OpenSSL version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), $wfOpenSSLDeprecatingVersion) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL)) - ); - - $this->_adminNotice( - 'opensslVersionCheckDeprecationNotice_' . $wfOpenSSLDeprecatingVersion, - 'opensslVersionCheck', - sprintf(__('<strong>WARNING: </strong> Your site is using an OpenSSL version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), $wfOpenSSLDeprecatingVersion) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL) . '" target="_blank" rel="noopener noreferrer">' . __('Learn More', 'wordfence') . '<span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>' - ); - - return false; - } - else if ($openssl == self::VERSION_UNSUPPORTED) { - $this->_alertEmail( - 'opensslVersionCheckUnsupportedEmail_' . $wfOpenSSLMinimumVersion, - __('OpenSSL version too old', 'wordfence'), - sprintf(__('Your site is using an OpenSSL version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), $wfOpenSSLDeprecatingVersion) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL)) - ); - - $this->_adminNotice( - 'opensslVersionCheckUnsupportedNotice_' . $wfOpenSSLMinimumVersion, - 'opensslVersionCheck', - sprintf(__('<strong>WARNING: </strong> Your site is using an OpenSSL version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), $wfOpenSSLDeprecatingVersion) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL) . '" target="_blank" rel="noopener noreferrer">' . __('Learn More', 'wordfence') . '<span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>' - ); - - return false; - } - else { - wfAdminNoticeQueue::removeAdminNotice(false, 'opensslVersionCheck'); - } - - if (wfAdminNoticeQueue::hasNotice('opensslVersionCheck')) { - return false; - }*/ - - //WordPress - $wordpress = $this->checkWordPressVersion(); - if ($wordpress == self::VERSION_DEPRECATED) { - require(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */ - - $this->_alertEmail( - 'wordpressVersionCheckDeprecationEmail_' . $wfWordPressDeprecatingVersion, - __('WordPress version too old', 'wordfence'), - sprintf( - /* translators: 1. WordPress version. 2. WordPress version. */ - __('Your site is using a WordPress version (%1$s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), - $wp_version, - $wfWordPressDeprecatingVersion - ) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS)) - ); - - $this->_adminNotice( - 'wordpressVersionCheckDeprecationNotice_' . $wfWordPressDeprecatingVersion, - 'wordpressVersionCheck', - wp_kses(sprintf( - /* translators: 1. WordPress version. 2. WordPress version. */ - __('<strong>WARNING: </strong> Your site is using a WordPress version (%1$s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), - $wp_version, - $wfWordPressDeprecatingVersion - ), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS) . '" target="_blank" rel="noopener noreferrer">' . esc_html__('Learn More', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>' - ); - } - else if ($wordpress == self::VERSION_UNSUPPORTED) { - require(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */ - - $this->_alertEmail( - 'wordpressVersionCheckUnsupportedEmail_' . $wfWordPressMinimumVersion, - __('WordPress version too old', 'wordfence'), - sprintf( - /* translators: 1. WordPress version. 2. WordPress version. */ - __('Your site is using a WordPress version (%1$s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, $wfWordPressDeprecatingVersion) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS)) - ); - - $this->_adminNotice( - 'wordpressVersionCheckUnsupportedNotice_' . $wfWordPressMinimumVersion, - 'wordpressVersionCheck', - wp_kses(sprintf( - /* translators: 1. WordPress version. 2. WordPress version. */ - __('<strong>WARNING: </strong> Your site is using a WordPress version (%1$s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %2$s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, $wfWordPressDeprecatingVersion), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS) . '" target="_blank" rel="noopener noreferrer">' . esc_html__('Learn More', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>' - ); - } - else { - wfAdminNoticeQueue::removeAdminNotice(false, 'wordpressVersionCheck'); - } - - if (wfAdminNoticeQueue::hasNotice('wordpressVersionCheck')) { - return false; - } - - return true; - } - - private function _alertEmail($checkKey, $title, $body) { - if (!wfConfig::get($checkKey)) { - wordfence::alert($title, $body, wfUtils::getIP()); - wfConfig::set($checkKey, true); - } - } - - private function _adminNotice($checkKey, $noticeKey, $message) { - if (!wfConfig::get($checkKey)) { - wfAdminNoticeQueue::addAdminNotice(wfAdminNotice::SEVERITY_CRITICAL, $message, $noticeKey); - wfConfig::set($checkKey, true); - } - } - - /** - * Returns whether or not the PHP version meets our minimum requirement or is a version being deprecated. - * - * @return string One of the VERSION_ constants. - */ - public function checkPHPVersion() { - require(dirname(__FILE__) . '/wfVersionSupport.php'); - /** - * @var string $wfPHPDeprecatingVersion - * @var string $wfPHPMinimumVersion - */ - - if (version_compare(phpversion(), $wfPHPDeprecatingVersion, '>=')) { - return self::VERSION_COMPATIBLE; - } - - if ($wfPHPDeprecatingVersion != $wfPHPMinimumVersion && version_compare(phpversion(), $wfPHPMinimumVersion, '>=')) { - return self::VERSION_DEPRECATED; - } - - return self::VERSION_UNSUPPORTED; - } - - /** - * Returns whether or not the OpenSSL version meets our minimum requirement or is a version being deprecated. - * - * @return string One of the VERSION_ constants. - */ - public function checkOpenSSLVersion() { - require(dirname(__FILE__) . '/wfVersionSupport.php'); - /** - * @var string $wfOpenSSLDeprecatingVersion - * @var string $wfOpenSSLMinimumVersion - */ - - if (self::openssl_version_compare($wfOpenSSLDeprecatingVersion) <= 0) { - return self::VERSION_COMPATIBLE; - } - - if ($wfOpenSSLDeprecatingVersion != $wfOpenSSLMinimumVersion && self::openssl_version_compare($wfOpenSSLMinimumVersion) <= 0) { - return self::VERSION_DEPRECATED; - } - - return self::VERSION_UNSUPPORTED; - } - - /** - * Returns whether or not the WordPress version meets our minimum requirement or is a version being deprecated. - * - * @return string One of the VERSION_ constants. - */ - public function checkWordPressVersion() { - require(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */ - - require(dirname(__FILE__) . '/wfVersionSupport.php'); - /** - * @var string $wfWordPressDeprecatingVersion - * @var string $wfWordPressMinimumVersion - */ - - if (version_compare($wp_version, $wfWordPressDeprecatingVersion, '>=')) { - return self::VERSION_COMPATIBLE; - } - - if ($wfWordPressDeprecatingVersion != $wfWordPressMinimumVersion && version_compare($wp_version, $wfWordPressMinimumVersion, '>=')) { - return self::VERSION_DEPRECATED; - } - - return self::VERSION_UNSUPPORTED; - } - - /** - * Utility Functions - */ - - /** - * Returns whether or not the OpenSSL version is before, after, or equal to the equivalent text version string. - * - * @param string $compareVersion - * @param int $openSSLVersion A version number in the format OpenSSL uses. - * @param bool $allowDevBeta If true, dev and beta versions of $compareVersion are treated as equivalent to release versions despite having a lower version number. - * @return bool|int Returns -1 if $compareVersion is earlier, 0 if equal, 1 if later, and false if not a valid version string. - */ - public static function openssl_version_compare($compareVersion, $openSSLVersion = OPENSSL_VERSION_NUMBER, $allowDevBeta = true) { - if (preg_match('/^(\d+)\.(\d+)\.(\d+)([a-z]*)((?:-dev|-beta\d\d?)?)/i', $compareVersion, $matches)) { - $primary = 0; $major = 0; $minor = 0; $fixLetterIndexes = 0; $patch = self::OPENSSL_RELEASE; - if (isset($matches[1])) { $primary = (int) $matches[1]; } - if (isset($matches[2])) { $major = (int) $matches[2]; } - if (isset($matches[3])) { $minor = (int) $matches[3]; } - if (isset($matches[4]) && !empty($matches[4])) { - $letters = str_split($matches[4]); - foreach ($letters as $l) { - $fixLetterIndexes += strpos('abcdefghijklmnopqrstuvwxyz', strtolower($l)) + 1; - } - } - if (isset($matches[5]) && !empty($matches[5])) { - if (preg_match('/^-beta(\d+)$/i', $matches[5], $betaMatches)) { - $patch = (int) $betaMatches[1]; - } - else { - $patch = self::OPENSSL_DEV; - } - } - - $compareOpenSSLVersion = self::openssl_make_number_version($primary, $major, $minor, $fixLetterIndexes, $patch); - if ($allowDevBeta) { - $compareOpenSSLVersion = $compareOpenSSLVersion >> 4; - $openSSLVersion = $openSSLVersion >> 4; - } - - if ($compareOpenSSLVersion < $openSSLVersion) { return -1; } - else if ($compareOpenSSLVersion == $openSSLVersion) { return 0; } - return 1; - } - - return false; - } - - /** - * Builds a number that can be compared to OPENSSL_VERSION_NUMBER from the parameters given. This is a modified - * version of the macro in the OpenSSL source. - * - * @param int $primary The '1' in 1.0.2g. - * @param int $major The '0' in 1.0.2g. - * @param int $minor The '2' in 1.0.2g. - * @param int $fixLetterIndexes The 'g' in 1.0.2g. This can potentially be multiple letters, in which case, all of the indexes are added. - * @param int $patch - * @return int - */ - public static function openssl_make_number_version($primary, $major, $minor, $fixLetterIndexes = 0, $patch = 0) { - return ((($primary & 0xff) << 28) + (($major & 0xff) << 20) + (($minor & 0xff) << 12) + (($fixLetterIndexes & 0xff) << 4) + $patch); - } - - /** - * Builds a text version of the OpenSSL version from a number-formatted one. - * - * @param int $number - * @return string - */ - public static function openssl_make_text_version($number = OPENSSL_VERSION_NUMBER) { - $primary = (($number >> 28) & 0xff); - $major = (($number >> 20) & 0xff); - $minor = (($number >> 12) & 0xff); - $fix = (($number >> 4) & 0xff); - $patch = ($number & 0xf); //0 is dev, 1-14 are betas, 15 is release - - $alphabet = str_split('abcdefghijklmnopqrstuvwxyz'); - $fixLetters = ''; - while ($fix > 26) { - $fixLetters .= 'z'; - $fix -= 26; - } - if (array_key_exists($fix - 1, $alphabet)) { - $fixLetters .= $alphabet[$fix - 1]; - } - - $version = "{$primary}.{$major}.{$minor}{$fixLetters}"; - - if ($patch == self::OPENSSL_DEV) { - $version .= '-dev'; - } - else if ($patch == self::OPENSSL_RELEASE) { - //Do nothing - } - else { - $version .= '-beta' . $patch; - } - - return $version; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfVersionSupport.php b/wp/wp-content/plugins/wordfence/lib/wfVersionSupport.php deleted file mode 100644 index 16713dab..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfVersionSupport.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -$wfPHPDeprecatingVersion = '7.0.0'; //When greater than PHP_MINIMUM, will issue a discontinuing warning the first time we check it and find a version less than this (also applies to the other similar constant pairs) -$wfPHPMinimumVersion = '5.5.0'; //The currently supported minimum - -$wfOpenSSLDeprecatingVersion = '1.0.1'; -$wfOpenSSLMinimumVersion = '1.0.1'; - -$wfWordPressDeprecatingVersion = '4.7.0'; -$wfWordPressMinimumVersion = '3.9.0'; diff --git a/wp/wp-content/plugins/wordfence/lib/wfView.php b/wp/wp-content/plugins/wordfence/lib/wfView.php deleted file mode 100644 index 8cc15cb6..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfView.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php - -class wfView { - - /** - * @var string - */ - protected $view_path; - - /** - * @var string - */ - protected $view_file_extension = '.php'; - - /** - * @var string - */ - protected $view; - - /** - * @var array - */ - protected $data; - - /** - * @param string $view - * @param array $data - * @return wfView - */ - public static function create($view, $data = array()) { - return new self($view, $data); - } - - /** - * @param string $view - * @param array $data - */ - public function __construct($view, $data = array()) { - $this->view_path = WORDFENCE_PATH . 'views'; - $this->view = $view; - $this->data = $data; - } - - /** - * @return string - * @throws wfViewNotFoundException - */ - public function render() { - $view = preg_replace('/\.{2,}/', '.', $this->view); - $view_path = $this->view_path . '/' . $view . $this->view_file_extension; - if (!file_exists($view_path)) { - throw new wfViewNotFoundException(sprintf(/* translators: File path. */ __('The view %s does not exist or is not readable.', 'wordfence'), $view_path)); - } - - extract($this->data, EXTR_SKIP); - - ob_start(); - /** @noinspection PhpIncludeInspection */ - include $view_path; - return ob_get_clean(); - } - - /** - * @return string - */ - public function __toString() { - try { - return $this->render(); - } catch (wfViewNotFoundException $e) { - return defined('WP_DEBUG') && WP_DEBUG ? esc_html($e->getMessage()) : esc_html__('The view could not be loaded.', 'wordfence'); - } - } - - /** - * @param $data - * @return $this - */ - public function addData($data) { - $this->data = array_merge($data, $this->data); - return $this; - } - - /** - * @return array - */ - public function getData() { - return $this->data; - } - - /** - * @param array $data - * @return $this - */ - public function setData($data) { - $this->data = $data; - return $this; - } - - /** - * @return string - */ - public function getView() { - return $this->view; - } - - /** - * @param string $view - * @return $this - */ - public function setView($view) { - $this->view = $view; - return $this; - } - - /** - * Prevent POP - */ - public function __wakeup() { - $this->view_path = WORDFENCE_PATH . 'views'; - $this->view = null; - $this->data = array(); - $this->view_file_extension = '.php'; - } -} - -class wfViewNotFoundException extends Exception { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfViewResult.php b/wp/wp-content/plugins/wordfence/lib/wfViewResult.php deleted file mode 100644 index b3bdbd38..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfViewResult.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?> -<?php if(! wfUtils::isAdmin()){ exit(); } ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link rel='stylesheet' id='wordfence-main-style-css' href='<?php echo wfUtils::getBaseURL() . wfUtils::versionedAsset('css/diff.css'); ?>?ver=<?php echo WORDFENCE_VERSION; ?>' type='text/css' media='all' /> -<body> -<h1><?php esc_html_e('Wordfence: File Viewer', 'wordfence') ?></h1> -<table border="0" style="margin: 0 0 20px 0;" class="summary"> -<tr><td><?php esc_html_e('Filename:', 'wordfence') ?></td><td><?php echo wp_kses($localFile, array()); ?></td></tr> -<tr><td><?php esc_html_e('File Size:', 'wordfence') ?></td><td><?php echo $fileSize; ?></td></tr> -<tr><td><?php esc_html_e('File last modified:', 'wordfence') ?></td><td><?php echo $fileMTime; ?></td></tr> -</table> - -<?php - if($isEmpty){ - echo "File is empty."; - } else { - highlight_string($cont); - } -?> - - - -<div class="diffFooter"><?php echo wp_kses(sprintf(__('© %d to %d Wordfence — Visit <a href="http://wordfence.com/">Wordfence.com</a> for help, security updates and more.', 'wordfence'), date_i18n('Y', WORDFENCE_EPOCH), date_i18n('Y')), array('a'=>array('href'=>array()))); ?></div> -</body> -</html> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wfWebsite.php b/wp/wp-content/plugins/wordfence/lib/wfWebsite.php deleted file mode 100644 index 8a7dcf09..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wfWebsite.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -class wfWebsiteEphemeralPayloadRetrievalException extends RuntimeException { -} - -class wfWebsiteEphemeralPayloadExpiredException extends wfWebsiteEphemeralPayloadRetrievalException { - - const STATUS = 404; - - public function __construct() { - parent::__construct('Ephemeral payload expired', self::STATUS); - } - -} - -class wfWebsiteEphemeralPayloadRateLimitedException extends wfWebsiteEphemeralPayloadRetrievalException { - - const STATUS = 429; - - public function __construct() { - parent::__construct('Request limit reached', self::STATUS); - } - -} - -/** - * Utilities related to the Wordfence website (wordfence.com) - */ -class wfWebsite { - - private static $INSTANCE = null; - - private $url; - - private function __construct($url) { - $this->url = trailingslashit($url); - } - - public function getUrl($relative) { - return $this->url . $relative; - } - - public function retrievePayload($token, &$expired) { - $url = $this->getUrl("api/ephemeral-payload/$token"); - $response = wp_remote_get($url); - $status = wp_remote_retrieve_response_code($response); - if (!is_wp_error($response) && $status === 200) { - return wp_remote_retrieve_body($response); - } - switch ($status) { - case wfWebsiteEphemeralPayloadExpiredException::STATUS: - throw new wfWebsiteEphemeralPayloadExpiredException(); - case wfWebsiteEphemeralPayloadRateLimitedException::STATUS: - throw new wfWebsiteEphemeralPayloadRateLimitedException(); - default: - throw new wfWebsiteEphemeralPayloadRetrievalException('Failed to retrieve ephemeral payload', (int) $status); - } - } - - public static function getInstance() { - if (self::$INSTANCE === null) - self::$INSTANCE = new self(WORDFENCE_WWW_BASE_URL); - return self::$INSTANCE; - } - - public static function url($relative) { - return self::getInstance()->getUrl($relative); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wordfenceClass.php b/wp/wp-content/plugins/wordfence/lib/wordfenceClass.php deleted file mode 100644 index b61c266e..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wordfenceClass.php +++ /dev/null @@ -1,10378 +0,0 @@ -<?php -require_once(dirname(__FILE__) . '/wordfenceConstants.php'); -require_once(dirname(__FILE__) . '/wfScanEngine.php'); -require_once(dirname(__FILE__) . '/wfScan.php'); -require_once(dirname(__FILE__) . '/wfScanMonitor.php'); -require_once(dirname(__FILE__) . '/wfCrawl.php'); -require_once(dirname(__FILE__) . '/Diff.php'); -require_once(dirname(__FILE__) . '/Diff/Renderer/Html/SideBySide.php'); -require_once(dirname(__FILE__) . '/wfAPI.php'); -require_once(dirname(__FILE__) . '/wfIssues.php'); -require_once(dirname(__FILE__) . '/wfDB.php'); -require_once(dirname(__FILE__) . '/wfUtils.php'); -require_once(dirname(__FILE__) . '/wfLog.php'); -require_once(dirname(__FILE__) . '/wfConfig.php'); -require_once(dirname(__FILE__) . '/wfSchema.php'); -require_once(dirname(__FILE__) . '/wfCache.php'); -require_once(dirname(__FILE__) . '/wfCrypt.php'); -require_once(dirname(__FILE__) . '/wfMD5BloomFilter.php'); -require_once(dirname(__FILE__) . '/wfView.php'); -require_once(dirname(__FILE__) . '/wfHelperString.php'); -require_once(dirname(__FILE__) . '/wfDirectoryIterator.php'); -require_once(dirname(__FILE__) . '/wfUpdateCheck.php'); -require_once(dirname(__FILE__) . '/wfActivityReport.php'); -require_once(dirname(__FILE__) . '/wfHelperBin.php'); -require_once(dirname(__FILE__) . '/wfDiagnostic.php'); -require_once(dirname(__FILE__) . '/wfStyle.php'); -require_once(dirname(__FILE__) . '/wfDashboard.php'); -require_once(dirname(__FILE__) . '/wfNotification.php'); - -require_once(dirname(__FILE__) . '/../models/page/wfPage.php'); -require_once(dirname(__FILE__) . '/../models/common/wfTab.php'); -require_once(dirname(__FILE__) . '/../models/block/wfBlock.php'); -require_once(dirname(__FILE__) . '/../models/block/wfRateLimit.php'); -require_once(dirname(__FILE__) . '/../models/firewall/wfFirewall.php'); -require_once(dirname(__FILE__) . '/../models/scanner/wfScanner.php'); -require_once(dirname(__FILE__) . '/wfPersistenceController.php'); -require_once(dirname(__FILE__) . '/wfImportExportController.php'); -require_once(dirname(__FILE__) . '/wfOnboardingController.php'); -require_once(dirname(__FILE__) . '/wfSupportController.php'); -require_once(dirname(__FILE__) . '/wfCredentialsController.php'); -require_once(dirname(__FILE__) . '/wfVersionCheckController.php'); -require_once(dirname(__FILE__) . '/wfDateLocalization.php'); -require_once(dirname(__FILE__) . '/wfAdminNoticeQueue.php'); -require_once(dirname(__FILE__) . '/wfModuleController.php'); -require_once(dirname(__FILE__) . '/wfAlerts.php'); -require_once(dirname(__FILE__) . '/wfDeactivationOption.php'); - -if (version_compare(phpversion(), '5.3', '>=')) { - require_once(dirname(__FILE__) . '/WFLSPHP52Compatability.php'); - define('WORDFENCE_USE_LEGACY_2FA', wfCredentialsController::useLegacy2FA()); - $wfCoreLoading = true; - require(dirname(__FILE__) . '/../modules/login-security/wordfence-login-security.php'); -} - -require_once(dirname(__FILE__) . '/wfJWT.php'); -require_once(dirname(__FILE__) . '/wfCentralAPI.php'); - -if (class_exists('WP_REST_Users_Controller')) { //WP 4.7+ - require_once(dirname(__FILE__) . '/wfRESTAPI.php'); -} -if (wfCentral::isSupported()) { //WP 4.4.0+ - require_once(dirname(__FILE__) . '/rest-api/wfRESTAuthenticationController.php'); - require_once(dirname(__FILE__) . '/rest-api/wfRESTConfigController.php'); - require_once(dirname(__FILE__) . '/rest-api/wfRESTScanController.php'); -} - -class wordfence { - public static $printStatus = false; - public static $wordfence_wp_version = false; - /** - * @var WP_Error - */ - public static $authError; - private static $passwordCodePattern = '/\s+wf([a-z0-9 ]+)$/i'; - protected static $lastURLError = false; - protected static $curlContent = ""; - protected static $curlDataWritten = 0; - protected static $hasher = ''; - protected static $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - protected static $ignoreList = false; - private static $wfLog = false; - private static $hitID = 0; - private static $debugOn = null; - private static $runInstallCalled = false; - private static $userDat = false; - - const ATTACK_DATA_BODY_LIMIT=41943040; //40MB - - public static function installPlugin(){ - self::runInstall(); - - if (get_current_user_id() > 0) { - wfConfig::set('activatingIP', wfUtils::getIP()); - } - - //Used by MU code below - update_option('wordfenceActivated', 1); - - if (defined('WORDFENCE_LS_FROM_CORE') && WORDFENCE_LS_FROM_CORE) { - WFLSPHP52Compatability::install_plugin(); - } - } - public static function uninstallPlugin(){ - //Send admin alert - $currentUser = wp_get_current_user(); - $username = $currentUser->user_login; - $alertCallback = array(new wfWordfenceDeactivatedAlert($username, wfUtils::getIP()), 'send'); - do_action('wordfence_security_event', 'wordfenceDeactivated', array( - 'username' => $username, - 'ip' => wfUtils::getIP(), - ), $alertCallback); - - //Check if caching is enabled and if it is, disable it and fix the .htaccess file. - wfCache::removeCaching(); - - //Used by MU code below - update_option('wordfenceActivated', 0); - wp_clear_scheduled_hook('wordfence_daily_cron'); - wp_clear_scheduled_hook('wordfence_hourly_cron'); - wp_clear_scheduled_hook('wordfence_daily_autoUpdate'); - - //Remove old legacy cron job if it exists - wp_clear_scheduled_hook('wordfence_scheduled_scan'); - - //Remove all scheduled scans. - wfScanner::shared()->unscheduleAllScans(); - wfScanMonitor::handleDeactivation(); - - // Remove cron for email summary - wfActivityReport::clearCronJobs(); - - // Remove the admin user list so it can be regenerated if Wordfence is reactivated. - wfConfig::set_ser('adminUserList', false); - - if (!WFWAF_SUBDIRECTORY_INSTALL) { - wfWAFConfig::set('wafDisabled', true); - } - - if(wfConfig::get('deleteTablesOnDeact')){ - if (wfCentral::isSupported() && wfCentral::isConnected()) { - self::ajax_wfcentral_disconnect_callback(); - } - - wfConfig::updateTableExists(false); - $schema = new wfSchema(); - $schema->dropAll(); - foreach(array('wordfence_version', 'wordfenceActivated', wfSchema::TABLE_CASE_OPTION) as $opt) { - if (is_multisite() && function_exists('delete_network_option')) { - delete_network_option(null, $opt); - } - delete_option($opt); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL) { - try { - if (WFWAF_AUTO_PREPEND) { - $helper = new wfWAFAutoPrependHelper(); - if ($helper->uninstall()) { - wfWAF::getInstance()->uninstall(); - } - } else { - wfWAF::getInstance()->uninstall(); - } - } catch (wfWAFStorageFileException $e) { - error_log($e->getMessage()); - } catch (wfWAFStorageEngineMySQLiException $e) { - error_log($e->getMessage()); - } - } - } - - if (defined('WORDFENCE_LS_FROM_CORE') && WORDFENCE_LS_FROM_CORE) { - WFLSPHP52Compatability::uninstall_plugin(); - } - } - public static function hourlyCron() { - wfLog::trimHumanCache(); - - wfRateLimit::trimData(); - - wfCentral::checkForUnsentSecurityEvents(); - - wfVersionCheckController::shared()->checkVersionsAndWarn(); - } - private static function keyAlert($msg){ - self::alert($msg, $msg . " " . __("To ensure uninterrupted Premium Wordfence protection on your site,\nplease renew your license by visiting http://www.wordfence.com/ Sign in, go to your dashboard,\nselect the license about to expire and click the button to renew that license.", 'wordfence'), false); - } - private static function pingApiKey() { - $apiKey = wfConfig::get('apiKey'); - if (empty($apiKey)) - return; - $api = new wfAPI($apiKey, wfUtils::getWPVersion()); - try { - $keyType = wfLicense::KEY_TYPE_FREE; - $keyData = $api->call('ping_api_key', array(), array('supportHash' => wfConfig::get('supportHash', ''), 'whitelistHash' => wfConfig::get('whitelistHash', ''), 'tldlistHash' => wfConfig::get('tldlistHash', ''), 'ipResolutionListHash' => wfConfig::get('ipResolutionListHash', ''))); - if (isset($keyData['_isPaidKey'])) { - $keyType = wfConfig::get('keyType'); - } - - if (isset($keyData['_feedbackBasis'])) { - wfConfig::setBool('satisfactionPromptOverride', $keyData['_feedbackBasis'] > WORDFENCE_FEEDBACK_EPOCH); - } - - if(isset($keyData['_isPaidKey']) && $keyData['_isPaidKey']){ - $keyExpDays = $keyData['_keyExpDays']; - $keyIsExpired = $keyData['_expired']; - if (!empty($keyData['_autoRenew'])) { - if ($keyExpDays > 12) { - wfConfig::set('keyAutoRenew10Sent', ''); - } else if ($keyExpDays <= 12 && $keyExpDays > 0 && !wfConfig::get('keyAutoRenew10Sent')) { - wfConfig::set('keyAutoRenew10Sent', 1); - $email = __("Your Premium Wordfence License is set to auto-renew in 10 days.", 'wordfence'); - self::alert($email, $email . " " . __("To update your license settings please visit http://www.wordfence.com/zz9/dashboard", 'wordfence'), false); - } - } else { - if($keyExpDays > 15){ - wfConfig::set('keyExp15Sent', ''); - wfConfig::set('keyExp7Sent', ''); - wfConfig::set('keyExp2Sent', ''); - wfConfig::set('keyExp1Sent', ''); - wfConfig::set('keyExpFinalSent', ''); - } else if($keyExpDays <= 15 && $keyExpDays > 0){ - if($keyExpDays <= 15 && $keyExpDays >= 11 && (! wfConfig::get('keyExp15Sent'))){ - wfConfig::set('keyExp15Sent', 1); - self::keyAlert(__("Your Premium Wordfence License expires in less than 2 weeks.", 'wordfence')); - } else if($keyExpDays <= 7 && $keyExpDays >= 4 && (! wfConfig::get('keyExp7Sent'))){ - wfConfig::set('keyExp7Sent', 1); - self::keyAlert(__("Your Premium Wordfence License expires in less than a week.", 'wordfence')); - } else if($keyExpDays == 2 && (! wfConfig::get('keyExp2Sent'))){ - wfConfig::set('keyExp2Sent', 1); - self::keyAlert(__("Your Premium Wordfence License expires in 2 days.", 'wordfence')); - } else if($keyExpDays == 1 && (! wfConfig::get('keyExp1Sent'))){ - wfConfig::set('keyExp1Sent', 1); - self::keyAlert(__("Your Premium Wordfence License expires in 1 day.", 'wordfence')); - } - } else if($keyIsExpired && (! wfConfig::get('keyExpFinalSent')) ){ - wfConfig::set('keyExpFinalSent', 1); - self::keyAlert(__("Your Wordfence Premium License has Expired!", 'wordfence')); - } - } - } - if (isset($keyData['dashboard'])) { - wfConfig::set('lastDashboardCheck', time()); - wfDashboard::processDashboardResponse($keyData['dashboard']); - } - if (isset($keyData['support']) && isset($keyData['supportHash'])) { - wfConfig::set('supportContent', $keyData['support']); - wfConfig::set('supportHash', $keyData['supportHash']); - } - if (isset($keyData['_whitelist']) && isset($keyData['_whitelistHash'])) { - wfConfig::setJSON('whitelistPresets', $keyData['_whitelist']); - wfConfig::set('whitelistHash', $keyData['_whitelistHash']); - } - if (isset($keyData['_tldlist']) && isset($keyData['_tldlistHash'])) { - wfConfig::set('tldlist', $keyData['_tldlist']); - wfConfig::set('tldlistHash', $keyData['_tldlistHash']); - } - if (isset($keyData['_ipResolutionList']) && isset($keyData['_ipResolutionListHash'])) { - wfConfig::setJSON('ipResolutionList', $keyData['_ipResolutionList']); - wfConfig::set('ipResolutionListHash', $keyData['_ipResolutionListHash']); - } - if (isset($keyData['scanSchedule']) && is_array($keyData['scanSchedule'])) { - wfConfig::set_ser('noc1ScanSchedule', $keyData['scanSchedule']); - if (wfScanner::shared()->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_AUTOMATIC) { - wfScanner::shared()->scheduleScans(); - } - } - if (isset($keyData['showWfCentralUI'])) { - wfConfig::set('showWfCentralUI', (int) $keyData['showWfCentralUI']); - } - - if (isset($keyData['_keyNoLongerValid']) && $keyData['_keyNoLongerValid'] == 1) { - if (wfConfig::get('keyDeletedNotice') !== $apiKey) { - $keyDeletedNoticeSent = self::alert(__("The Wordfence Premium License in use on this site has been removed from your account.", 'wordfence'), __("The license you were using has been removed from your account. Please reach out to billing@wordfence.com or create a Premium support case at https://support.wordfence.com/support/tickets for more information. Our staff is happy to help.", 'wordfence'), false); - if ($keyDeletedNoticeSent) { - wfConfig::set('keyDeletedNotice', $apiKey); - } - } - } - - wfConfig::set('keyType', $keyType); - } - catch(Exception $e){ - wordfence::status(4, 'error', sprintf(/* translators: Wordfence license key. */ __("Could not verify Wordfence License: %s", 'wordfence'), $e->getMessage())); - } - } - public static function dailyCron() { - $lastDailyCron = (int) wfConfig::get('lastDailyCron', 0); - if (($lastDailyCron + 43200) > time()) { //Run no more frequently than every 12 hours - return; - } - - wfConfig::set('lastDailyCron', time()); - - global $wpdb; - $version = $wpdb->get_var("SELECT VERSION()"); - wfConfig::set('dbVersion', $version); - - self::pingApiKey(); - - $allowMySQLi = wfConfig::testDB(); - wfConfig::set('allowMySQLi', $allowMySQLi); - - $wfdb = new wfDB(); - - $table_wfLocs = wfDB::networkTable('wfLocs'); - $wfdb->queryWrite("delete from {$table_wfLocs} where ctime < unix_timestamp() - %d", WORDFENCE_MAX_IPLOC_AGE); - - wfBlock::vacuum(); - - $table_wfCrawlers = wfDB::networkTable('wfCrawlers'); - $wfdb->queryWrite("delete from {$table_wfCrawlers} where lastUpdate < unix_timestamp() - (86400 * 7)"); - - self::trimWfHits(true); - - $maxRows = absint(wfConfig::get('liveTraf_maxRows', 2000));; //affects stuff further down too - - $table_wfLogins = wfDB::networkTable('wfLogins'); - $count2 = $wfdb->querySingle("select count(*) as cnt from {$table_wfLogins}"); - if($count2 > 20000){ - $wfdb->truncate($table_wfLogins); //in case of Dos - } else if($count2 > $maxRows){ - $wfdb->queryWrite("delete from {$table_wfLogins} order by ctime asc limit %d", ($count2 - $maxRows)); - } - - wfCentral::trimSecurityEvents(); - - $table_wfReverseCache = wfDB::networkTable('wfReverseCache'); - $wfdb->queryWrite("delete from {$table_wfReverseCache} where unix_timestamp() - lastUpdate > 86400"); - - $table_wfStatus = wfDB::networkTable('wfStatus'); - $count4 = $wfdb->querySingle("select count(*) as cnt from {$table_wfStatus}"); - if($count4 > 100000){ - $wfdb->truncate($table_wfStatus); - } else if($count4 > 1000){ //max status events we keep. This determines how much gets emailed to us when users sends us a debug report. - $wfdb->queryWrite("delete from {$table_wfStatus} where level != 10 order by ctime asc limit %d", ($count4 - 1000)); - $count5 = $wfdb->querySingle("select count(*) as cnt from {$table_wfStatus} where level=10"); - if($count5 > 100){ - $wfdb->queryWrite("delete from {$table_wfStatus} where level = 10 order by ctime asc limit %d", ($count5 - 100) ); - } - } - - self::_refreshVulnerabilityCache(); - - $report = new wfActivityReport(); - $report->rotateIPLog(); - self::_refreshUpdateNotification($report, true); - - $next = self::getNextScanStartTimestamp(); - if ($next - time() > 3600 && wfConfig::get('scheduledScansEnabled')) { - wfScanEngine::startScan(false, wfScanner::SCAN_TYPE_QUICK); - } - - wfUpdateCheck::syncAllVersionInfo(); - - self::purgeWafFailures(); - - wfConfig::remove('lastPermissionsTemplateCheck'); - } - public static function _scheduleRefreshUpdateNotification($upgrader = null, $options = null) { - $defer = false; - if (is_array($options) && isset($options['type']) && $options['type'] == 'core') { - $defer = true; - set_site_transient('wordfence_updating_notifications', true, 600); - } - - if ($defer) { - wp_schedule_single_event(time(), 'wordfence_refreshUpdateNotification'); - } - else { - self::_refreshUpdateNotification(); - } - } - public static function _refreshUpdateNotification($report = null, $useCachedValued = false) { - if ($report === null) { - $report = new wfActivityReport(); - } - - $updatesNeeded = $report->getUpdatesNeeded($useCachedValued); - if ($updatesNeeded) { - $items = array(); - $plural = false; - if ($updatesNeeded['core']) { - $items[] = sprintf(/* translators: WordPress version. */ __('WordPress (v%s)', 'wordfence'), esc_html($updatesNeeded['core'])); - } - - if ($updatesNeeded['plugins']) { - $entry = sprintf(/* translators: Number of plugins. */ _n('%d plugin', '%d plugins', count($updatesNeeded['plugins']), 'wordfence'), count($updatesNeeded['plugins'])); - $items[] = $entry; - } - - if ($updatesNeeded['themes']) { - $entry = sprintf(/* translators: Number of themes. */ _n('%d theme', '%d themes', count($updatesNeeded['themes']), 'wordfence'), count($updatesNeeded['themes'])); - $items[] = $entry; - } - - $message = _n('An update is available for ', 'Updates are available for ', count($items), 'wordfence'); - - for ($i = 0; $i < count($items); $i++) { - if ($i > 0 && count($items) > 2) { $message .= ', '; } - else if ($i > 0) { $message .= ' '; } - if ($i > 0 && $i == count($items) - 1) { $message .= __('and ', 'wordfence'); } - $message .= $items[$i]; - } - - new wfNotification(null, wfNotification::PRIORITY_HIGH_WARNING, '<a href="' . wfUtils::wpAdminURL('update-core.php') . '">' . $message . '</a>', 'wfplugin_updates'); - } - else { - $n = wfNotification::getNotificationForCategory('wfplugin_updates'); - if ($n !== null) { - $n->markAsRead(); - } - } - - $i = new wfIssues(); - $i->reconcileUpgradeIssues($report, true); - - wp_schedule_single_event(time(), 'wordfence_completeCoreUpdateNotification'); - } - public static function _completeCoreUpdateNotification() { - //This approach is here because WP Core updates run in a different sequence than plugin/theme updates, so we have to defer the running of the notification update sequence by an extra page load - delete_site_transient('wordfence_updating_notifications'); - - wfVersionCheckController::shared()->checkVersionsAndWarn(); - } - private static function scheduleCrons($delay = 0) { - wp_clear_scheduled_hook('wordfence_daily_cron'); - wp_clear_scheduled_hook('wordfence_hourly_cron'); - if (is_main_site()) { - wfConfig::remove('lastDailyCron'); - wp_schedule_event(time() + $delay, 'daily', 'wordfence_daily_cron'); //'daily' - wp_schedule_event(time() + $delay, 'hourly', 'wordfence_hourly_cron'); - } - } - public static function runInstall(){ - if(self::$runInstallCalled){ return; } - self::$runInstallCalled = true; - if (function_exists('ignore_user_abort')) { - @ignore_user_abort(true); - } - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $previous_version = ((is_multisite() && function_exists('get_network_option')) ? get_network_option(null, 'wordfence_version', '0.0.0') : get_option('wordfence_version', '0.0.0')); - if (is_multisite() && function_exists('update_network_option')) { - update_network_option(null, 'wordfence_version', WORDFENCE_VERSION); //In case we have a fatal error we don't want to keep running install. - } - else { - update_option('wordfence_version', WORDFENCE_VERSION); //In case we have a fatal error we don't want to keep running install. - } - - wordfence::status(4, 'info', sprintf(/* translators: Wordfence version. */ __('`runInstall` called with previous version = %s', 'wordfence'), $previous_version)); - - //EVERYTHING HERE MUST BE IDEMPOTENT - - //Remove old legacy cron job if exists - wp_clear_scheduled_hook('wordfence_scheduled_scan'); - - wfSchema::updateTableCase(); - $schema = new wfSchema(); - $schema->createAll(); //if not exists - wfConfig::updateTableExists(true); - - /** @var wpdb $wpdb */ - global $wpdb; - - //6.1.15 - $configTable = wfDB::networkTable('wfConfig'); - $hasAutoload = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='autoload' -AND TABLE_NAME=%s -SQL - , $configTable)); - if (!$hasAutoload) { - $wpdb->query("ALTER TABLE {$configTable} ADD COLUMN autoload ENUM('no', 'yes') NOT NULL DEFAULT 'yes'"); - $wpdb->query("UPDATE {$configTable} SET autoload = 'no' WHERE name = 'wfsd_engine' OR name LIKE 'wordfence_chunked_%'"); - } - - $wpdb->query("DELETE FROM $configTable WHERE `name` = 'emailedIssuesList' AND LENGTH(`val`) > 2 * 1024 * 1024"); - wfConfig::setDefaults(); //If not set - - $restOfSite = wfConfig::get('cbl_restOfSiteBlocked', 'notset'); - if($restOfSite == 'notset'){ - wfConfig::set('cbl_restOfSiteBlocked', '1'); - } - - if(wfConfig::get('autoUpdate') == '1'){ - wfConfig::enableAutoUpdate(); //Sets up the cron - } - - $freshAPIKey = !wfConfig::get('apiKey'); - if ($freshAPIKey) { - wfConfig::set('touppPromptNeeded', true); - } - - self::scheduleCrons(15); - - $db = new wfDB(); - - // IPv6 schema changes for 6.0.1 - $tables_with_ips = array( - 'wfCrawlers', - 'wfBadLeechers', - 'wfBlockedIPLog', - 'wfBlocks', //Removed in 7.0.1 but left in in case migrating from really old - 'wfHits', - 'wfLocs', - 'wfLogins', - 'wfReverseCache', - ); - - foreach ($tables_with_ips as $ip_table) { - $ptable = wfDB::networkTable($ip_table); - $tableExists = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT TABLE_NAME FROM information_schema.TABLES -WHERE TABLE_SCHEMA=DATABASE() -AND TABLE_NAME=%s -SQL - , $ptable)); - if (!$tableExists) { - continue; - } - - $result = $wpdb->get_row("SHOW FIELDS FROM {$ptable} where field = 'IP'"); - if (!$result || strtolower($result->Type) == 'binary(16)') { - continue; - } - - $db->queryWriteIgnoreError("ALTER TABLE {$ptable} MODIFY IP BINARY(16)"); - - // Just to be sure we don't corrupt the data if the alter fails. - $result = $wpdb->get_row("SHOW FIELDS FROM {$ptable} where field = 'IP'"); - if (!$result || strtolower($result->Type) != 'binary(16)') { - continue; - } - $db->queryWriteIgnoreError("UPDATE {$ptable} SET IP = CONCAT(LPAD(CHAR(0xff, 0xff), 12, CHAR(0)), LPAD( - CHAR( - CAST(IP as UNSIGNED) >> 24 & 0xFF, - CAST(IP as UNSIGNED) >> 16 & 0xFF, - CAST(IP as UNSIGNED) >> 8 & 0xFF, - CAST(IP as UNSIGNED) & 0xFF - ), - 4, - CHAR(0) -))"); - } - - //Country reassignment moved to the GeoIP file sync segment - - if (wfConfig::get('other_hideWPVersion')) { - wfUtils::hideReadme(); - } - - $colsFor610 = array( - 'attackLogTime' => '`attackLogTime` double(17,6) unsigned NOT NULL AFTER `id`', - 'statusCode' => '`statusCode` int(11) NOT NULL DEFAULT 0 AFTER `jsRun`', - 'action' => "`action` varchar(64) NOT NULL DEFAULT '' AFTER `UA`", - 'actionDescription' => '`actionDescription` text AFTER `action`', - 'actionData' => '`actionData` text AFTER `actionDescription`', - ); - - $hitTable = wfDB::networkTable('wfHits'); - foreach ($colsFor610 as $col => $colDefintion) { - $count = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME=%s -AND TABLE_NAME=%s -SQL - , $col, $hitTable)); - if (!$count) { - $wpdb->query("ALTER TABLE $hitTable ADD COLUMN $colDefintion"); - } - } - - $has404 = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='is404' -AND TABLE_NAME=%s -SQL - , $hitTable)); - if ($has404) { - $wpdb->query(<<<SQL -UPDATE $hitTable -SET statusCode= CASE -WHEN is404=1 THEN 404 -ELSE 200 -END -SQL - ); - - $wpdb->query("ALTER TABLE $hitTable DROP COLUMN `is404`"); - } - - $loginsTable = wfDB::networkTable('wfLogins'); - $hasHitID = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='hitID' -AND TABLE_NAME=%s -SQL - , $loginsTable)); - if (!$hasHitID) { - $wpdb->query("ALTER TABLE $loginsTable ADD COLUMN hitID int(11) DEFAULT NULL AFTER `id`, ADD INDEX(hitID)"); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL) { - wfWAFConfig::set('wafDisabled', false); - } - - // Call this before creating the index in cases where the wp-cron isn't running. - self::trimWfHits(true); - $hitsTable = wfDB::networkTable('wfHits'); - $hasAttackLogTimeIndex = $wpdb->get_var($wpdb->prepare(<<<SQL -SELECT COLUMN_KEY FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA = DATABASE() -AND TABLE_NAME = %s -AND COLUMN_NAME = 'attackLogTime' -SQL - , $hitsTable)); - - if (!$hasAttackLogTimeIndex) { - $wpdb->query("ALTER TABLE $hitsTable ADD INDEX `attackLogTime` (`attackLogTime`)"); - } - - //6.1.16 - $allowed404s = wfConfig::get('allowed404s', ''); - if (!wfConfig::get('allowed404s6116Migration', false)) { - if (!preg_match('/(?:^|\b)browserconfig\.xml(?:\b|$)/i', $allowed404s)) { - if (strlen($allowed404s) > 0) { - $allowed404s .= "\n"; - } - $allowed404s .= "/browserconfig.xml"; - wfConfig::set('allowed404s', $allowed404s); - } - - wfConfig::set('allowed404s6116Migration', 1); - } - if (wfConfig::get('email_summary_interval') == 'biweekly') { - wfConfig::set('email_summary_interval', 'weekly'); - } - - //6.2.0 - wfConfig::migrateCodeExecutionForUploadsPHP7(); - - //6.2.3 - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); //changed slightly for 7.0.1 - } - - //6.2.8 - wfCache::removeCaching(); - - //6.2.10 - $snipCacheTable = wfDB::networkTable('wfSNIPCache'); - $hasType = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='type' -AND TABLE_NAME=%s -SQL - , $snipCacheTable)); - if (!$hasType) { - $wpdb->query("ALTER TABLE `{$snipCacheTable}` ADD `type` INT UNSIGNED NOT NULL DEFAULT '0'"); - $wpdb->query("ALTER TABLE `{$snipCacheTable}` ADD INDEX (`type`)"); - } - - //6.3.5 - $fileModsTable = wfDB::networkTable('wfFileMods'); - $hasStoppedOn = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='stoppedOnSignature' -AND TABLE_NAME=%s -SQL - , $fileModsTable)); - if (!$hasStoppedOn) { - $wpdb->query("ALTER TABLE {$fileModsTable} ADD COLUMN stoppedOnSignature VARCHAR(255) NOT NULL DEFAULT ''"); - $wpdb->query("ALTER TABLE {$fileModsTable} ADD COLUMN stoppedOnPosition INT UNSIGNED NOT NULL DEFAULT '0'"); - } - - $blockedIPLogTable = wfDB::networkTable('wfBlockedIPLog'); - $hasType = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='blockType' -AND TABLE_NAME=%s -SQL - , $blockedIPLogTable)); - if (!$hasType) { - $wpdb->query("ALTER TABLE {$blockedIPLogTable} ADD blockType VARCHAR(50) NOT NULL DEFAULT 'generic'"); - $wpdb->query("ALTER TABLE {$blockedIPLogTable} DROP PRIMARY KEY"); - $wpdb->query("ALTER TABLE {$blockedIPLogTable} ADD PRIMARY KEY (IP, unixday, blockType)"); - } - - //6.3.6 - if (!wfConfig::get('migration636_email_summary_excluded_directories')) { - $excluded_directories = explode(',', (string) wfConfig::get('email_summary_excluded_directories')); - $key = array_search('wp-content/plugins/wordfence/tmp', $excluded_directories); if ($key !== false) { unset($excluded_directories[$key]); } - $key = array_search('wp-content/wflogs', $excluded_directories); if ($key === false) { $excluded_directories[] = 'wp-content/wflogs'; } - wfConfig::set('email_summary_excluded_directories', implode(',', $excluded_directories)); - wfConfig::set('migration636_email_summary_excluded_directories', 1, wfConfig::DONT_AUTOLOAD); - } - - $fileModsTable = wfDB::networkTable('wfFileMods'); - $hasSHAC = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='SHAC' -AND TABLE_NAME=%s -SQL - , $fileModsTable)); - if (!$hasSHAC) { - $wpdb->query("ALTER TABLE {$fileModsTable} ADD COLUMN `SHAC` BINARY(32) NOT NULL DEFAULT '' AFTER `newMD5`"); - $wpdb->query("ALTER TABLE {$fileModsTable} ADD COLUMN `isSafeFile` VARCHAR(1) NOT NULL DEFAULT '?' AFTER `stoppedOnPosition`"); - } - - //6.3.7 - $hooverTable = wfDB::networkTable('wfHoover'); - $hostKeySize = $wpdb->get_var($wpdb->prepare(<<<SQL -SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='hostKey' -AND TABLE_NAME=%s -SQL - , $hooverTable)); - if ($hostKeySize < 124) { - $wpdb->query("ALTER TABLE {$hooverTable} CHANGE `hostKey` `hostKey` VARBINARY(124) NULL DEFAULT NULL"); - } - - //6.3.15 - $scanFileContents = wfConfig::get('scansEnabled_fileContents', false); - if (!wfConfig::get('fileContentsGSB6315Migration', false)) { - if (!$scanFileContents) { - wfConfig::set('scansEnabled_fileContentsGSB', false); - } - wfConfig::set('fileContentsGSB6315Migration', 1); - } - - //6.3.20 - $lastBlockAggregation = wfConfig::get('lastBlockAggregation', 0); - if ($lastBlockAggregation == 0) { - wfConfig::set('lastBlockAggregation', time()); - } - - //7.0.1 - //---- Config Migration - if (!wfConfig::get('config701Migration', false)) { - //loginSec_strongPasswds gains a toggle - if (wfConfig::get('loginSec_strongPasswds') == '') { - wfConfig::set('loginSec_strongPasswds', 'pubs'); - wfConfig::set('loginSec_strongPasswds_enabled', false); - } - - $limitedOptions = wfScanner::limitedScanTypeOptions(); - $standardOptions = wfScanner::standardScanTypeOptions(); - $highSensitivityOptions = wfScanner::highSensitivityScanTypeOptions(); - $settings = wfScanner::customScanTypeOptions(); - if ($settings == $limitedOptions) { wfConfig::set('scanType', wfScanner::SCAN_TYPE_LIMITED); } - else if ($settings == $standardOptions) { wfConfig::set('scanType', wfScanner::SCAN_TYPE_STANDARD); } - else if ($settings == $highSensitivityOptions) { wfConfig::set('scanType', wfScanner::SCAN_TYPE_HIGH_SENSITIVITY); } - else { wfConfig::set('scanType', wfScanner::SCAN_TYPE_CUSTOM); } - - if (wfConfig::get('isPaid')) { - wfConfig::set('keyType', wfLicense::KEY_TYPE_PAID_CURRENT); - } - - wfConfig::remove('premiumAutoRenew'); - wfConfig::remove('premiumNextRenew'); - wfConfig::remove('premiumPaymentExpiring'); - wfConfig::remove('premiumPaymentExpired'); - wfConfig::remove('premiumPaymentMissing'); - wfConfig::remove('premiumPaymentHold'); - - wfConfig::set('config701Migration', 1); - } - - //---- wfBlocks migration - $oldBlocksTable = wfDB::networkTable('wfBlocks'); - $blocksTable = wfBlock::blocksTable(); - $oldBlocksExist = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT TABLE_NAME FROM information_schema.TABLES -WHERE TABLE_SCHEMA=DATABASE() -AND TABLE_NAME=%s -SQL - , $oldBlocksTable)); - if ($oldBlocksExist && !wfConfig::get('blocks701Migration', false)) { - //wfBlocks migration - $query = $wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`) SELECT CASE -WHEN wfsn = 1 AND permanent = 0 THEN %d -WHEN wfsn = 0 AND permanent = 0 THEN %d -WHEN wfsn = 0 AND permanent = 1 THEN %d -END AS `type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, CASE -WHEN wfsn = 1 AND permanent = 0 THEN (`blockedTime` + 600) -WHEN wfsn = 0 AND permanent = 0 THEN (`blockedTime` + %d) -WHEN wfsn = 0 AND permanent = 1 THEN 0 -END AS `expiration` FROM `{$oldBlocksTable}`", wfBlock::TYPE_WFSN_TEMPORARY, wfBlock::TYPE_RATE_BLOCK, wfBlock::TYPE_IP_AUTOMATIC_PERMANENT, wfConfig::get('blockedTime')); - $wpdb->query($query); - - //wfBlocksAdv migration - $advancedBlocksTable = wfDB::networkTable('wfBlocksAdv'); - $advancedBlocks = $wpdb->get_results("SELECT * FROM {$advancedBlocksTable}", ARRAY_A); - foreach ($advancedBlocks as $b) { - $blockType = $b['blockType']; //unused - $blockString = $b['blockString']; - $ctime = (int) $b['ctime']; - $reason = $b['reason']; - $totalBlocked = (int) $b['totalBlocked']; - $lastBlocked = (int) $b['lastBlocked']; - - list($ipRange, $uaRange, $referrer, $hostname) = explode('|', $blockString); - - wfBlock::createPattern($reason, $ipRange, $hostname, $uaRange, $referrer, wfBlock::DURATION_FOREVER, $ctime, $lastBlocked, $totalBlocked); - } - - //throttle migration - $throttleTable = wfDB::networkTable('wfThrottleLog'); - $throttles = $wpdb->get_results("SELECT * FROM {$throttleTable}", ARRAY_A); - foreach ($throttles as $t) { - $ip = wfUtils::inet_ntop($t['IP']); - $startTime = (int) $t['startTime']; - $endTime = (int) $t['endTime']; - $timesThrottled = (int) $t['timesThrottled']; - $reason = $t['lastReason']; - - wfBlock::createRateThrottle($reason, $ip, wfBlock::rateLimitThrottleDuration(), $startTime, $endTime, $timesThrottled); - } - - //lockout migration - $lockoutTable = wfDB::networkTable('wfLockedOut'); - $lockouts = $wpdb->get_results("SELECT * FROM {$lockoutTable}", ARRAY_A); - foreach ($lockouts as $l) { - $ip = wfUtils::inet_ntop($l['IP']); - $blockedTime = (int) $l['blockedTime']; - $reason = $l['reason']; - $lastAttempt = (int) $l['lastAttempt']; - $blockedHits = (int) $l['blockedHits']; - - wfBlock::createLockout($reason, $ip, wfBlock::lockoutDuration(), $blockedTime, $lastAttempt, $blockedHits); - } - - //country blocking migration - $countries = wfConfig::get('cbl_countries', false); - if ($countries) { - $countries = explode(',', $countries); - wfBlock::createCountry(__('Automatically generated from previous country blocking settings', 'wordfence'), wfConfig::get('cbl_loginFormBlocked', false), wfConfig::get('cbl_restOfSiteBlocked', false), $countries); - } - - wfConfig::set('blocks701Migration', 1); - } - - //---- wfIssues/wfPendingIssues Schema Change - $issuesTable = wfDB::networkTable('wfIssues'); - $pendingIssuesTable = wfDB::networkTable('wfPendingIssues'); - $hasLastUpdated = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT * FROM information_schema.COLUMNS -WHERE TABLE_SCHEMA=DATABASE() -AND COLUMN_NAME='lastUpdated' -AND TABLE_NAME=%s -SQL - , $issuesTable)); - if (!$hasLastUpdated) { - $wpdb->query("ALTER TABLE `{$issuesTable}` ADD `lastUpdated` INT UNSIGNED NOT NULL AFTER `time`"); - $wpdb->query("ALTER TABLE `{$issuesTable}` ADD INDEX (`lastUpdated`)"); - $wpdb->query("ALTER TABLE `{$issuesTable}` ADD INDEX (`status`)"); - $wpdb->query("ALTER TABLE `{$issuesTable}` ADD INDEX (`ignoreP`)"); - $wpdb->query("ALTER TABLE `{$issuesTable}` ADD INDEX (`ignoreC`)"); - $wpdb->query("UPDATE `{$issuesTable}` SET `lastUpdated` = `time` WHERE `lastUpdated` = 0"); - - $wpdb->query("ALTER TABLE `{$pendingIssuesTable}` ADD `lastUpdated` INT UNSIGNED NOT NULL AFTER `time`"); - $wpdb->query("ALTER TABLE `{$pendingIssuesTable}` ADD INDEX (`lastUpdated`)"); - $wpdb->query("ALTER TABLE `{$pendingIssuesTable}` ADD INDEX (`status`)"); - $wpdb->query("ALTER TABLE `{$pendingIssuesTable}` ADD INDEX (`ignoreP`)"); - $wpdb->query("ALTER TABLE `{$pendingIssuesTable}` ADD INDEX (`ignoreC`)"); - } - - //---- Scheduled scan start hour and manual type - if (wfConfig::get('schedStartHour') < 0) { - wfConfig::set('schedStartHour', wfWAFUtils::random_int(0, 23)); - - if (wfConfig::get('schedMode') == 'manual') { - $sched = wfConfig::get_ser('scanSched', array()); - if (is_array($sched) && is_array($sched[0])) { //Try to determine the closest matching value for manualScanType - $hours = array_fill(0, 24, 0); - $distinctHours = array(); - $days = array_fill(0, 7, 0); - $distinctDays = array(); - foreach ($sched as $dayIndex => $day) { - foreach ($day as $h => $enabled) { - if ($enabled) { - if (in_array($h, $distinctHours)) { - $distinctHours[] = $h; - } - $hours[$h]++; - if (in_array($dayIndex, $distinctDays)) { - $distinctDays[] = $dayIndex; - } - $days[$dayIndex]++; - } - } - } - - sort($distinctHours, SORT_NUMERIC); - sort($distinctDays, SORT_NUMERIC); - if (count($distinctDays) == 7) { - if (count($distinctHours) == 1) { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_ONCE_DAILY); - wfConfig::set('schedStartHour', $distinctHours[0]); - } - else if (count($distinctHours) == 2) { - $matchesTwiceDaily = false; - if ($distinctHours[0] + 12 == $distinctHours[1]) { - $matchesTwiceDaily = true; - foreach ($sched as $dayIndex => $day) { - if (!$day[$distinctHours[0]] || !$day[$distinctHours[1]]) { - $matchesTwiceDaily = false; - } - } - } - - if ($matchesTwiceDaily) { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_TWICE_DAILY); - wfConfig::set('schedStartHour', $distinctHours[0]); - } - else { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_CUSTOM); - } - } - else { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_CUSTOM); - } - } - else if (count($distinctDays) == 5 && count($distinctHours) == 1) { - if ($days[2] == 0 && $days[4] == 0 && $hours[$distinctHours[0]] == 5) { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS); - wfConfig::set('schedStartHour', $distinctHours[0]); - } - else if ($days[0] == 0 && $days[6] == 0 && $hours[$distinctHours[0]] == 5) { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_WEEKDAYS); - wfConfig::set('schedStartHour', $distinctHours[0]); - } - else { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_CUSTOM); - } - } - else if (count($distinctDays) == 2 && count($distinctHours) == 1) { - if ($distinctDays[0] == 0 && $distinctDays[1] == 6 && $hours[$distinctHours[0]] == 2) { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_WEEKENDS); - wfConfig::set('schedStartHour', $distinctHours[0]); - } - else { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_CUSTOM); - } - } - else { - wfConfig::set('manualScanType', wfScanner::MANUAL_SCHEDULING_CUSTOM); - } - } - //manualScanType - } - } - - //---- Onboarding - if (!$freshAPIKey) { - wfOnboardingController::migrateOnboarding(); - } - - //7.0.2 - if (!wfConfig::get('blocks702Migration')) { - $blocksTable = wfBlock::blocksTable(); - - $query = "UPDATE `{$blocksTable}` SET `type` = %d WHERE `type` = %d AND `parameters` IS NOT NULL AND `parameters` LIKE '%\"ipRange\"%'"; - $wpdb->query($wpdb->prepare($query, wfBlock::TYPE_PATTERN, wfBlock::TYPE_IP_AUTOMATIC_PERMANENT)); - - $countryBlock = wfBlock::countryBlocks(); - if (!count($countryBlock)) { - $query = "UPDATE `{$blocksTable}` SET `type` = %d WHERE `type` = %d AND `parameters` IS NOT NULL AND `parameters` LIKE '%\"blockLogin\"%' LIMIT 1"; - $wpdb->query($wpdb->prepare($query, wfBlock::TYPE_COUNTRY, wfBlock::TYPE_IP_AUTOMATIC_PERMANENT)); - } - - $query = "DELETE FROM `{$blocksTable}` WHERE `type` = %d AND `parameters` IS NOT NULL AND `parameters` LIKE '%\"blockLogin\"%'"; - $wpdb->query($wpdb->prepare($query, wfBlock::TYPE_IP_AUTOMATIC_PERMANENT)); - - wfConfig::set('blocks702Migration', 1); - } - - //7.0.3 - /*if (!wfConfig::get('generateAllOptionsNotification')) { - new wfNotification(null, wfNotification::PRIORITY_HIGH_WARNING, '<p>Developers: If you prefer to edit all Wordfence options on one page, you can enable the "All Options" page here:</p> -<p><a href="javascript:WFAD.enableAllOptionsPage();" class="wf-btn wf-btn-primary wf-btn-callout-subtle">Enable "All Options" Page</a></p>', 'wfplugin_devalloptions'); - wfConfig::set('generateAllOptionsNotification', 1); - }*/ - - //7.1.9 - if (wfConfig::get('loginSec_maxFailures') == 1) { - wfConfig::set('loginSec_maxFailures', 2); - } - - $blocksTable = wfBlock::blocksTable(); - $patternBlocks = wfBlock::patternBlocks(); - foreach ($patternBlocks as $b) { - if (!empty($b->ipRange) && preg_match('/^\d+\-\d+$/', $b->ipRange)) { //Old-style range block using long2ip - $ipRange = new wfUserIPRange($b->ipRange); - $ipRange = $ipRange->getIPString(); - - $parameters = $b->parameters; - $parameters['ipRange'] = $ipRange; - $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `parameters` = %s WHERE `id` = %d", json_encode($parameters), $b->id)); - } - } - - wfConfig::set('needsGeoIPSync', true, wfConfig::DONT_AUTOLOAD); - - // Set the default scan options based on scan type. - if (!wfConfig::get('config720Migration', false)) { - // Replace critical/warning checkboxes with setting based on numeric severity value. - if (wfConfig::hasCachedOption('alertOn_critical') && wfConfig::hasCachedOption('alertOn_warnings')) { - $alertOnCritical = wfConfig::get('alertOn_critical'); - $alertOnWarnings = wfConfig::get('alertOn_warnings'); - wfConfig::set('alertOn_scanIssues', $alertOnCritical || $alertOnWarnings); - if ($alertOnCritical && ! $alertOnWarnings) { - wfConfig::set('alertOn_severityLevel', wfIssues::SEVERITY_HIGH); - } else { - wfConfig::set('alertOn_severityLevel', wfIssues::SEVERITY_LOW); - } - } - - // Update severity for existing issues where they are still using the old severity values. - foreach (wfIssues::$issueSeverities as $issueType => $severity) { - $wpdb->query($wpdb->prepare("UPDATE $issuesTable SET severity = %d - WHERE `type` = %s - AND severity in (0,1,2) - ", $severity, $issueType)); - } - - $syncedOptions = array(); - switch (wfConfig::get('scanType')) { - case wfScanner::SCAN_TYPE_LIMITED: - $syncedOptions = wfScanner::limitedScanTypeOptions(); - break; - case wfScanner::SCAN_TYPE_STANDARD: - $syncedOptions = wfScanner::standardScanTypeOptions(); - break; - case wfScanner::SCAN_TYPE_HIGH_SENSITIVITY: - $syncedOptions = wfScanner::highSensitivityScanTypeOptions(); - break; - } - if ($syncedOptions) { - foreach ($syncedOptions as $key => $value) { - if (is_bool($value)) { - wfConfig::set($key, $value ? 1 : 0); - } - } - } - - wfConfig::set('config720Migration', true); - } - - //7.2.3 - if (wfConfig::get('waf_status') === false) { - $firewall = new wfFirewall(); - $firewall->syncStatus(true); - } - - //7.3.1 - //---- drop long deprecated tables - $tables = array('wfBadLeechers', 'wfBlockedCommentLog', 'wfBlocks', 'wfBlocksAdv', 'wfLeechers', 'wfLockedOut', 'wfNet404s', 'wfScanners', 'wfThrottleLog', 'wfVulnScanners'); - foreach ($tables as $t) { - $schema->drop($t); - } - - //7.5.10 - $knownFilesTable = wfDB::networkTable('wfKnownFileList'); - $wordpressPathColumn = $wpdb->get_row($wpdb->prepare("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = %s AND COLUMN_NAME = 'wordpress_path'", $knownFilesTable)); - if ($wordpressPathColumn === null) { - $wpdb->query("DELETE FROM `{$knownFilesTable}`"); - $wpdb->query("ALTER TABLE `{$knownFilesTable}` ADD COLUMN wordpress_path TEXT NOT NULL"); - } - - $realPathColumn = $wpdb->get_row($wpdb->prepare("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = %s AND COLUMN_NAME = 'real_path'", $fileModsTable)); - if ($realPathColumn === null) { - $wpdb->query("DELETE FROM `{$fileModsTable}`"); - $wpdb->query("ALTER TABLE `{$fileModsTable}` ADD COLUMN real_path TEXT NOT NULL AFTER filename"); - } - - //---- enable legacy 2fa if applicable - if (wfConfig::get('isPaid') && (wfCredentialsController::hasOld2FARecords() || version_compare(phpversion(), '5.3', '<'))) { - wfConfig::set(wfCredentialsController::ALLOW_LEGACY_2FA_OPTION, true); - } - - //Record the installation timestamp if activating the plugin for the first time - if (get_option('wordfenceActivated') != 1 && wfConfig::get('satisfactionPromptInstallDate') == 0 && empty(wfConfig::get('apiKey'))) { - wfConfig::set('satisfactionPromptInstallDate', time()); - } - - //Check the How does Wordfence get IPs setting - wfUtils::requestDetectProxyCallback(); - - //Install new schedule. If schedule config is blank it will install the default 'auto' schedule. - wfScanner::shared()->scheduleScans(); - - //Check our minimum versions and generate the necessary warnings - if (!wp_next_scheduled('wordfence_version_check')) { - wp_schedule_single_event(time(), 'wordfence_version_check'); - } - - //Must be the final line - } - public static function _refreshVulnerabilityCache($upgrader = null, $hook_extra = null) { - if($hook_extra ===null || in_array($hook_extra['type'], array('plugin', 'theme'))){ - $update_check = new wfUpdateCheck(); - $update_check->checkAllVulnerabilities(); - } - } - private static function doEarlyAccessLogging(){ - $wfLog = self::getLog(); - if($wfLog->logHitOK()){ - $request = $wfLog->getCurrentRequest(); - - if(is_404()){ - if ($request) { - $request->statusCode = 404; - } - $wfLog->logLeechAndBlock('404'); - } else { - $wfLog->logLeechAndBlock('hit'); - } - } - } - public static function initProtection(){ //Basic protection during WAF learning period - // Infinite WP Client - Authentication Bypass < 1.9.4.5 - // https://wpvulndb.com/vulnerabilities/10011 - $iwpRule = new wfWAFRule(wfWAF::getInstance(), 0x80000000, null, 'auth-bypass', 100, 'Infinite WP Client - Authentication Bypass < 1.9.4.5', 0, 'block', null); - wfWAF::getInstance()->setRules(wfWAF::getInstance()->getRules() + array(0x80000000 => $iwpRule)); - - if (strrpos(wfWAF::getInstance()->getRequest()->getRawBody(), '_IWP_JSON_PREFIX_') !== false) { - $iwpRequestDataArray = explode('_IWP_JSON_PREFIX_', wfWAF::getInstance()->getRequest()->getRawBody()); - $iwpRequest = json_decode(trim(base64_decode($iwpRequestDataArray[1])), true); - if (is_array($iwpRequest)) { - if (array_key_exists('iwp_action', $iwpRequest) && - ($iwpRequest['iwp_action'] === 'add_site' || $iwpRequest['iwp_action'] === 'readd_site') - ) { - require_once ABSPATH . '/wp-admin/includes/plugin.php'; - if (is_plugin_active('iwp-client/init.php')) { - $iwpPluginData = get_plugin_data(WP_PLUGIN_DIR . '/iwp-client/init.php'); - if (version_compare('1.9.4.5', $iwpPluginData['Version'], '>')) { - remove_action('setup_theme', 'iwp_mmb_set_request'); - } - } - - if ((is_multisite() ? get_site_option('iwp_client_action_message_id') : get_option('iwp_client_action_message_id')) && - (is_multisite() ? get_site_option('iwp_client_public_key') : get_option('iwp_client_public_key')) - ) { - wfWAF::getInstance()->getStorageEngine()->logAttack(array($iwpRule), 'request.rawBody', - wfWAF::getInstance()->getRequest()->getRawBody(), - wfWAF::getInstance()->getRequest(), - wfWAF::getInstance()->getRequest()->getMetadata() - ); - } - } - } - } - } - public static function install_actions(){ - register_activation_hook(WORDFENCE_FCPATH, 'wordfence::installPlugin'); - register_deactivation_hook(WORDFENCE_FCPATH, 'wordfence::uninstallPlugin'); - - $versionInOptions = ((is_multisite() && function_exists('get_network_option')) ? get_network_option(null, 'wordfence_version', false) : get_option('wordfence_version', false)); - if( (! $versionInOptions) || version_compare(WORDFENCE_VERSION, $versionInOptions, '>')){ - //Either there is no version in options or the version in options is greater and we need to run the upgrade - self::runInstall(); - } - - self::getLog()->initLogRequest(); - - //Fix wp_mail bug when $_SERVER['SERVER_NAME'] is undefined - add_filter('wp_mail_from', 'wordfence::fixWPMailFromAddress'); - - //These access wfConfig::get('apiKey') and will fail if runInstall hasn't executed. - if(defined('MULTISITE') && MULTISITE === true){ - global $blog_id; - if($blog_id == 1 && get_option('wordfenceActivated') != 1){ return; } //Because the plugin is active once installed, even before it's network activated, for site 1 (WordPress team, why?!) - } - //User may be logged in or not, so register both handlers - add_action('wp_ajax_nopriv_wordfence_lh', 'wordfence::ajax_lh_callback'); - add_action('wp_ajax_nopriv_wordfence_doScan', 'wordfence::ajax_doScan_callback'); - add_action('wp_ajax_nopriv_wordfence_testAjax', 'wordfence::ajax_testAjax_callback'); - if(wfUtils::hasLoginCookie()){ //may be logged in. Fast way to check. These aren't secure functions, this is just a perf optimization, along with every other use of hasLoginCookie() - add_action('wp_ajax_wordfence_lh', 'wordfence::ajax_lh_callback'); - add_action('wp_ajax_wordfence_doScan', 'wordfence::ajax_doScan_callback'); - add_action('wp_ajax_wordfence_testAjax', 'wordfence::ajax_testAjax_callback'); - - if (is_multisite()) { - add_action('wp_network_dashboard_setup', 'wordfence::addDashboardWidget'); - } else { - add_action('wp_dashboard_setup', 'wordfence::addDashboardWidget'); - } - } - - add_action('wp_ajax_wordfence_wafStatus', 'wordfence::ajax_wafStatus_callback'); - add_action('wp_ajax_nopriv_wordfence_wafStatus', 'wordfence::ajax_wafStatus_callback'); - - add_action('wp_ajax_nopriv_wordfence_remoteVerifySwitchTo2FANew', 'wordfence::ajax_remoteVerifySwitchTo2FANew_callback'); - - add_action('wordfence_start_scheduled_scan', 'wordfence::wordfenceStartScheduledScan'); - add_action('wordfence_daily_cron', 'wordfence::dailyCron'); - add_action('wordfence_daily_autoUpdate', 'wfConfig::autoUpdate'); - add_action('wordfence_hourly_cron', 'wordfence::hourlyCron'); - add_action('wordfence_version_check', array(wfVersionCheckController::shared(), 'checkVersionsAndWarn')); - add_action('plugins_loaded', 'wordfence::veryFirstAction'); - add_action('init', 'wordfence::initAction'); - //add_action('admin_bar_menu', 'wordfence::admin_bar_menu', 99); - add_action('template_redirect', 'wordfence::templateRedir', 1001); - add_action('shutdown', 'wordfence::shutdownAction'); - - if (!wfConfig::get('ajaxWatcherDisabled_front')) { - add_action('wp_enqueue_scripts', 'wordfence::enqueueAJAXWatcher'); - } - if (!wfConfig::get('ajaxWatcherDisabled_admin')) { - add_action('admin_enqueue_scripts', 'wordfence::enqueueAJAXWatcher'); - } - - //add_action('wp_enqueue_scripts', 'wordfence::enqueueDashboard'); - add_action('admin_enqueue_scripts', 'wordfence::enqueueDashboard'); - - if(version_compare(PHP_VERSION, '5.4.0') >= 0){ - add_action('wp_authenticate','wordfence::authActionNew', 1, 2); - } else { - add_action('wp_authenticate','wordfence::authActionOld', 1, 2); - } - add_filter('authenticate', 'wordfence::authenticateFilter', 99, 3); - - $lockout = wfBlock::lockoutForIP(wfUtils::getIP()); - if ($lockout !== false) { - add_filter('xmlrpc_enabled', '__return_false'); - } - - add_action('login_init','wordfence::loginInitAction'); - add_action('wp_login','wordfence::loginAction'); - add_action('wp_logout','wordfence::logoutAction'); - add_action('lostpassword_post', 'wordfence::lostPasswordPost', 1, 2); - - $allowSeparatePrompt = ini_get('output_buffering') > 0; - if (wfConfig::get('loginSec_enableSeparateTwoFactor') && $allowSeparatePrompt) { - add_action('login_form', 'wordfence::showTwoFactorField'); - } - - if(wfUtils::hasLoginCookie()){ - add_action('user_profile_update_errors', 'wordfence::validateProfileUpdate', 0, 3 ); - add_action('profile_update', 'wordfence::profileUpdateAction', 99, 2); - } - - add_action('validate_password_reset', 'wordfence::validatePassword', 10, 2); - - // Add actions for the email summary - add_action('wordfence_email_activity_report', array('wfActivityReport', 'executeCronJob')); - - //For debugging - //add_filter( 'cron_schedules', 'wordfence::cronAddSchedules' ); - - add_filter('wp_redirect', 'wordfence::wpRedirectFilter', 99, 2); - add_filter('wp_redirect_status', 'wordfence::wpRedirectStatusFilter', 99, 2); - //html|xhtml|atom|rss2|rdf|comment|export - if(wfConfig::get('other_hideWPVersion')){ - add_filter('style_loader_src', 'wordfence::replaceVersion'); - add_filter('script_loader_src', 'wordfence::replaceVersion'); - - add_action('upgrader_process_complete', 'wordfence::hideReadme'); - } - add_filter('get_the_generator_html', 'wordfence::genFilter', 99, 2); - add_filter('get_the_generator_xhtml', 'wordfence::genFilter', 99, 2); - add_filter('get_the_generator_atom', 'wordfence::genFilter', 99, 2); - add_filter('get_the_generator_rss2', 'wordfence::genFilter', 99, 2); - add_filter('get_the_generator_rdf', 'wordfence::genFilter', 99, 2); - add_filter('get_the_generator_comment', 'wordfence::genFilter', 99, 2); - add_filter('get_the_generator_export', 'wordfence::genFilter', 99, 2); - add_filter('registration_errors', 'wordfence::registrationFilter', 99, 3); - add_filter('woocommerce_new_customer_data', 'wordfence::wooRegistrationFilter', 99, 1); - - if (wfConfig::get('loginSec_disableAuthorScan')) { - add_filter('oembed_response_data', 'wordfence::oembedAuthorFilter', 99, 4); - add_filter('rest_request_before_callbacks', 'wordfence::jsonAPIAuthorFilter', 99, 3); - add_filter('rest_post_dispatch', 'wordfence::jsonAPIAdjustHeaders', 99, 3); - add_filter('wp_sitemaps_users_pre_url_list', '__return_false', 99, 0); - add_filter('wp_sitemaps_add_provider', 'wordfence::wpSitemapUserProviderFilter', 99, 2); - } - - if (wfConfig::get('loginSec_disableApplicationPasswords')) { - add_filter('wp_is_application_passwords_available', '__return_false'); - add_action('edit_user_profile', 'wordfence::showDisabledApplicationPasswordsMessage', -1); - add_action('show_user_profile', 'wordfence::showDisabledApplicationPasswordsMessage', -1); - - // Override the wp_die handler to let the user know app passwords were disabled by the Wordfence option. - if (!empty($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] === ABSPATH . 'wp-admin/authorize-application.php') { - add_filter('wp_die_handler', function ($handler = null) { - return function ($message, $title, $args) { - if ($message === 'Application passwords are not available.') { - $message = __('Application passwords have been disabled by Wordfence.', 'wordfence'); - } - _default_wp_die_handler($message, $title, $args); - }; - }, 10, 1); - } - } - - add_filter('rest_dispatch_request', 'wordfence::_filterCentralFromLiveTraffic', 99, 4); - - // Change GoDaddy's limit login mu-plugin since it can interfere with the two factor auth message. - if (self::hasGDLimitLoginsMUPlugin()) { - add_action('login_errors', array('wordfence', 'fixGDLimitLoginsErrors'), 11); - } - - add_action('upgrader_process_complete', 'wordfence::_refreshVulnerabilityCache', 10, 2); - add_action('upgrader_process_complete', 'wfUpdateCheck::syncAllVersionInfo'); - add_action('upgrader_process_complete', 'wordfence::_scheduleRefreshUpdateNotification', 99, 2); - add_action('automatic_updates_complete', 'wordfence::_scheduleRefreshUpdateNotification', 99, 0); - add_action('wordfence_refreshUpdateNotification', 'wordfence::_refreshUpdateNotification', 99, 0); - add_action('wordfence_completeCoreUpdateNotification', 'wordfence::_completeCoreUpdateNotification', 99, 0); - - add_action('wfls_xml_rpc_blocked', 'wordfence::checkSecurityNetwork'); - add_action('wfls_registration_blocked', 'wordfence::checkSecurityNetwork'); - add_action('wfls_activation_page_footer', 'wordfence::_outputLoginSecurityTour'); - add_action('wfls_settings_set', 'wordfence::queueCentralConfigurationSync'); - - if(is_admin()){ - add_action('admin_init', 'wordfence::admin_init'); - add_action('admin_head', 'wordfence::_retargetWordfenceSubmenuCallout'); - if(is_multisite()){ - if(wfUtils::isAdminPageMU()){ - add_action('network_admin_menu', 'wordfence::admin_menus', 10); - add_action('network_admin_menu', 'wordfence::admin_menus_20', 20); - add_action('network_admin_menu', 'wordfence::admin_menus_30', 30); - add_action('network_admin_menu', 'wordfence::admin_menus_40', 40); - add_action('network_admin_menu', 'wordfence::admin_menus_50', 50); - add_action('network_admin_menu', 'wordfence::admin_menus_60', 60); - add_action('network_admin_menu', 'wordfence::admin_menus_70', 70); - add_action('network_admin_menu', 'wordfence::admin_menus_80', 80); - add_action('network_admin_menu', 'wordfence::admin_menus_85', 85); - add_action('network_admin_menu', 'wordfence::admin_menus_90', 90); - } //else don't show menu - } else { - add_action('admin_menu', 'wordfence::admin_menus', 10); - add_action('admin_menu', 'wordfence::admin_menus_20', 20); - add_action('admin_menu', 'wordfence::admin_menus_30', 30); - add_action('admin_menu', 'wordfence::admin_menus_40', 40); - add_action('admin_menu', 'wordfence::admin_menus_50', 50); - add_action('admin_menu', 'wordfence::admin_menus_60', 60); - add_action('admin_menu', 'wordfence::admin_menus_70', 70); - add_action('admin_menu', 'wordfence::admin_menus_80', 80); - add_action('admin_menu', 'wordfence::admin_menus_85', 85); - add_action('admin_menu', 'wordfence::admin_menus_90', 90); - } - add_filter('plugin_action_links_' . plugin_basename(realpath(dirname(__FILE__) . '/../wordfence.php')), 'wordfence::_pluginPageActionLinks'); - add_filter('pre_current_active_plugins', 'wordfence::registerDeactivationPrompt'); - } - - add_action('request', 'wordfence::preventAuthorNScans'); - add_action('password_reset', 'wordfence::actionPasswordReset'); - - $adminUsers = new wfAdminUserMonitor(); - if ($adminUsers->isEnabled()) { - add_action('set_user_role', array($adminUsers, 'updateToUserRole'), 10, 3); - add_action('grant_super_admin', array($adminUsers, 'grantSuperAdmin'), 10, 1); - add_action('revoke_super_admin', array($adminUsers, 'revokeSuperAdmin'), 10, 1); - } else if (wfConfig::get_ser('adminUserList', false)) { - // reset this in the event it's disabled or the network is too large - wfConfig::set_ser('adminUserList', false); - } - - if (wfConfig::liveTrafficEnabled()) { - add_action('wp_head', 'wordfence::wfLogHumanHeader'); - add_action('login_head', 'wordfence::wfLogHumanHeader'); - } - - add_action('wordfence_processAttackData', 'wordfence::processAttackData'); - if (!empty($_GET['wordfence_syncAttackData']) && get_site_option('wordfence_syncingAttackData') <= time() - 60 && get_site_option('wordfence_lastSyncAttackData', 0) < time() - 8) { - @ignore_user_abort(true); - update_site_option('wordfence_syncingAttackData', time()); - header('Content-Type: text/javascript'); - define('WORDFENCE_SYNCING_ATTACK_DATA', true); - add_action('init', 'wordfence::syncAttackData', 10, 0); - add_filter('woocommerce_unforce_ssl_checkout', '__return_false'); - } - - add_action('wordfence_batchReportBlockedAttempts', 'wordfence::wfsnBatchReportBlockedAttempts'); - add_action('wordfence_batchReportFailedAttempts', 'wordfence::wfsnBatchReportFailedAttempts'); - - add_action('wordfence_batchSendSecurityEvents', 'wfCentral::sendPendingSecurityEvents'); - - if (wfConfig::get('other_hideWPVersion')) { - add_filter('update_feedback', 'wordfence::restoreReadmeForUpgrade'); - } - - add_action('rest_api_init', 'wordfence::initRestAPI'); - - if (wfCentral::isConnected()) { - add_action('wordfence_security_event', 'wfCentral::sendSecurityEvent', 10, 3); - } else { - add_action('wordfence_security_event', 'wfCentral::sendAlertCallback', 10, 3); - } - - if (!wfConfig::get('wordfenceI18n', true)) { - add_filter('gettext', function ($translation, $text, $domain) { - if ($domain === 'wordfence') { - return $text; - } - return $translation; - }, 10, 3); - } - - wfScanMonitor::registerActions(); - wfUpdateCheck::installPluginAPIFixer(); - } - - public static function registerDeactivationPrompt() { - $deleteMain = (bool) wfConfig::get('deleteTablesOnDeact'); - $deleteLoginSecurity = (bool) \WordfenceLS\Controller_Settings::shared()->get('delete-deactivation'); - echo wfView::create( - 'offboarding/deactivation-prompt', - array( - 'deactivationOption' => wfDeactivationOption::forState($deleteMain, $deleteLoginSecurity), - 'wafOptimized' => defined('WFWAF_AUTO_PREPEND') && WFWAF_AUTO_PREPEND && (!defined('WFWAF_SUBDIRECTORY_INSTALL') || !WFWAF_SUBDIRECTORY_INSTALL), - 'deactivate' => array_key_exists('wf_deactivate', $_GET) - ) - )->render(); - } - - public static function showDisabledApplicationPasswordsMessage() { - echo wfView::create('user/disabled-application-passwords', array('isAdmin' => self::isCurrentUserAdmin()))->render(); - } - - public static function _pluginPageActionLinks($links) { - if (!wfConfig::get('isPaid')) { - $links = array_merge(array('aWordfencePluginCallout' => '<a href="https://www.wordfence.com/zz12/wordfence-signup/" target="_blank" rel="noopener noreferrer"><strong style="color: #11967A; display: inline;">' . esc_html__('Upgrade To Premium', 'wordfence') . '</strong><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'), $links); - } - return $links; - } - - public static function _outputLoginSecurityTour() { - if (WORDFENCE_LS_FROM_CORE) { - echo wfView::create('tours/login-security', array())->render(); - } - } - - public static function fixWPMailFromAddress($from_email) { - if ($from_email == 'wordpress@') { //$_SERVER['SERVER_NAME'] is undefined so we get an incomplete email address - wordfence::status(4, 'info', __("wp_mail from address is incomplete, attempting to fix", 'wordfence')); - $urls = array(get_site_url(), get_home_url()); - foreach ($urls as $u) { - if (!empty($u)) { - $u = preg_replace('#^[^/]*//+([^/]+).*$#', '\1', $u); - if (substr($u, 0, 4) == 'www.') { - $u = substr($u, 4); - } - - if (!empty($u)) { - wordfence::status(4, 'info', sprintf(/* translators: Email address. */ __("Fixing wp_mail from address: %s", 'wordfence'), $from_email . $u)); - return $from_email . $u; - } - } - } - - //Can't fix it, return it as it was - } - return $from_email; - } - public static function wpRedirectFilter($location, $status) { - self::getLog()->initLogRequest(); - self::getLog()->getCurrentRequest()->statusCode = $status; - return $location; - } - public static function wpRedirectStatusFilter($status, $location) { - self::getLog()->initLogRequest(); - self::getLog()->getCurrentRequest()->statusCode = $status; - self::getLog()->logHit(); - return $status; - } - public static function enqueueAJAXWatcher() { - $wafDisabled = !WFWAF_ENABLED || (class_exists('wfWAFConfig') && wfWAFConfig::isDisabled()); - if (wfUtils::isAdmin() && !$wafDisabled) { - wp_enqueue_style('wordfenceAJAXcss', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wordfenceBox.css'), '', WORDFENCE_VERSION); - wp_enqueue_script('wfi18njs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfi18n.js'), array(), WORDFENCE_VERSION); - wp_enqueue_script('wordfenceAJAXjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/admin.ajaxWatcher.js'), array('jquery'), WORDFENCE_VERSION); - wp_localize_script('wordfenceAJAXjs', 'WFAJAXWatcherVars', array( - 'nonce' => wp_create_nonce('wf-waf-error-page'), - )); - self::setupI18nJSStrings(); - } - } - - private static function isWordfencePage($includeWfls = true) { - return (isset($_GET['page']) && (preg_match('/^Wordfence/', @$_GET['page']) || ($includeWfls && $_GET['page'] == 'WFLS' && wfOnboardingController::shouldShowNewTour(wfOnboardingController::TOUR_LOGIN_SECURITY)))); - } - - private static function isWordfenceSubpage($page, $subpage) { - return array_key_exists('page', $_GET) && $_GET['page'] == ('Wordfence' . ucfirst($page)) && array_key_exists('subpage', $_GET) && $_GET['subpage'] == $subpage; - } - - public static function enqueueDashboard() { - if (wfUtils::isAdmin()) { - wp_enqueue_style('wf-adminbar', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-adminbar.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-license-global-style', wfLicense::current()->getGlobalStylesheet(), '', WORDFENCE_VERSION); - wp_enqueue_script('wordfenceDashboardjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfdashboard.js'), array('jquery'), WORDFENCE_VERSION); - if (wfConfig::get('showAdminBarMenu')) { - wp_enqueue_script('wordfencePopoverjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfpopover.js'), array('jquery'), WORDFENCE_VERSION); - wp_localize_script('wordfenceDashboardjs', 'WFDashVars', array( - 'ajaxURL' => admin_url('admin-ajax.php'), - 'nonce' => wp_create_nonce('wp-ajax'), - )); - } - } - } - public static function ajax_testAjax_callback(){ - die("WFSCANTESTOK"); - } - public static function ajax_doScan_callback(){ - @ignore_user_abort(true); - self::$wordfence_wp_version = false; - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - //This is messy, but not sure of a better way to do this without guaranteeing we get $wp_version - require(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */ - self::$wordfence_wp_version = $wp_version; - require_once(dirname(__FILE__) . '/wfScan.php'); - wfScan::wfScanMain(); - - } //END doScan - public static function ajax_lh_callback(){ - self::getLog()->canLogHit = false; - $UA = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; - $isCrawler = empty($UA); - if ($UA) { - if (wfCrawl::isCrawler($UA) || wfCrawl::isGoogleCrawler()) { - $isCrawler = true; - } - } - - @ob_end_clean(); - if(! headers_sent()){ - header('Content-type: text/javascript'); - header("Connection: close"); - header("Content-Length: 0"); - header("X-Robots-Tag: noindex"); - if (!$isCrawler) { - wfLog::cacheHumanRequester(wfUtils::getIP(), $UA); - } - } - flush(); - if(!$isCrawler && array_key_exists('hid', $_GET)){ - $hid = $_GET['hid']; - $hid = wfUtils::decrypt($hid); - if(! preg_match('/^\d+$/', $hid)){ exit(); } - $db = new wfDB(); - $table_wfHits = wfDB::networkTable('wfHits'); - $db->queryWrite("update {$table_wfHits} set jsRun=1 where id=%d", $hid); - } - die(""); - } - public static function ajaxReceiver(){ - if(! wfUtils::isAdmin()){ - wfUtils::send_json(array('errorMsg' => __("You appear to have logged out or you are not an admin. Please sign-out and sign-in again.", 'wordfence'))); - } - $func = (isset($_POST['action']) && $_POST['action']) ? $_POST['action'] : $_GET['action']; - $nonce = (isset($_POST['nonce']) && $_POST['nonce']) ? $_POST['nonce'] : $_GET['nonce']; - if(! wp_verify_nonce($nonce, 'wp-ajax')){ - wfUtils::send_json(array('errorMsg' => __("Your browser sent an invalid security token to Wordfence. Please try reloading this page or signing out and in again.", 'wordfence'), 'tokenInvalid' => 1)); - } - //func is e.g. wordfence_ticker so need to munge it - $func = str_replace('wordfence_', '', $func); - $returnArr = call_user_func('wordfence::ajax_' . $func . '_callback'); - if($returnArr === false){ - $returnArr = array('errorMsg' => __("Wordfence encountered an internal error executing that request.", 'wordfence')); - } - - if(! is_array($returnArr)){ - error_log("Function " . wp_kses($func, array()) . " did not return an array and did not generate an error."); - $returnArr = array(); - } - if(isset($returnArr['nonce'])){ - error_log("Wordfence ajax function return an array with 'nonce' already set. This could be a bug."); - } - $returnArr['nonce'] = wp_create_nonce('wp-ajax'); - wfUtils::send_json($returnArr); - } - public static function ajax_remoteVerifySwitchTo2FANew_callback() { - $payload = wfUtils::decodeJWT(wfConfig::get('new2FAMigrationNonce')); - if (empty($payload)) { - wfUtils::send_json(new stdClass()); //Ensures an object response - } - - $package = wfCrypt::noc1_encrypt($payload); - wfUtils::send_json($package); - } - public static function ajax_switchTo2FANew_callback() { - $migrate = (isset($_POST['migrate']) && wfUtils::truthyToBoolean($_POST['migrate'])); - - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if ($migrate && is_array($twoFactorUsers) && !empty($twoFactorUsers)) { - $smsActive = array(); - $authenticatorActive = array(); - foreach ($twoFactorUsers as &$t) { - if ($t[3] == 'activated') { - $user = new WP_User($t[0]); - if ($user instanceof WP_User && $user->exists()) { - if ((!isset($t[5]) || $t[5] != 'authenticator')) { - $smsActive[] = $user->user_login; - } - else { - $authenticatorActive[] = $t[6]; - } - } - } - } - - if (!empty($smsActive)) { - return array('ok' => 0, 'smsActive' => $smsActive); - } - - $total = 0; - $imported = 0; - $nonce = bin2hex(wfWAFUtils::random_bytes(32)); - wfConfig::set('new2FAMigrationNonce', wfUtils::generateJWT(array('nonce' => $nonce), 90)); - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $response = $api->call('twoFactorTOTP_migrate', array(), array('migrateids' => json_encode($authenticatorActive), 'nonce' => $nonce, 'verifyurl' => add_query_arg(array('action' => 'wordfence_remoteVerifySwitchTo2FANew'), admin_url('admin-ajax.php')))); - /* - * A successful response will be in the format - * { - * "ok": 1, - * "records": { - * "skipped": { - * <id>: true, ... if applicable - * }, - * "totp": { - * <id>: { - * "secret": <secret>, - * "recovery": <recovery keys>, - * "ctime": <timestamp created>, - * "vtime": <timestamp of last verified TOTP code> - * }, - * ... - * } - * } - * } - */ - - if (!is_array($response) || !isset($response['records']) || !is_array($response['records'])) { - return array('ok' => 0, 'fail' => 1); - } - - $secrets = $response['records']; - if (!isset($secrets['totp']) || !is_array($secrets['totp'])) { - return array('ok' => 0, 'fail' => 2); - } - - $import = array(); - foreach ($twoFactorUsers as &$t) { - if ($t[3] == 'activated') { - $user = new WP_User($t[0]); - if ($user instanceof WP_User && $user->exists()) { - if ((!isset($t[5]) || $t[5] != 'authenticator')) { - //Do nothing - } - else { - if (isset($secrets['totp'][$t[6]])) { - $import[$user->ID] = $secrets['totp'][$t[6]]; - $import[$user->ID]['type'] = 'authenticator'; - $total++; - } - } - } - } - } - - $imported = WFLSPHP52Compatability::import_2fa($import); - } - catch (Exception $e) { - wordfence::status(4, 'error', sprintf(/* translators: Error message. */ __('2FA Migration Error: %s', 'wordfence'), $e->getMessage())); - return array('ok' => 0, 'fail' => 1); - } - - wfConfig::remove('new2FAMigrationNonce'); - wfConfig::set(wfCredentialsController::DISABLE_LEGACY_2FA_OPTION, true); - return array('ok' => 1, 'total' => $total, 'imported' => $imported); - } - - //No legacy 2FA active, just set the option. - wfConfig::set(wfCredentialsController::DISABLE_LEGACY_2FA_OPTION, true); - return array('ok' => 1); - } - public static function ajax_switchTo2FAOld_callback() { - wfConfig::set(wfCredentialsController::DISABLE_LEGACY_2FA_OPTION, false); - return array('ok' => 1); - } - public static function validateProfileUpdate($errors, $update, $userData){ - wordfence::validatePassword($errors, $userData); - } - public static function validatePassword($errors, $userData) { - $password = (isset($_POST['pass1']) && trim($_POST['pass1'])) ? $_POST['pass1'] : false; - $user_id = isset($userData->ID) ? $userData->ID : false; - $username = isset($_POST["user_login"]) ? $_POST["user_login"] : $userData->user_login; - if ($password == false) { return $errors; } - if ($errors->get_error_data("pass")) { return $errors; } - - $enforceStrongPasswds = false; - if (wfConfig::get('loginSec_strongPasswds_enabled')) { - if (wfConfig::get('loginSec_strongPasswds') == 'pubs') { - if (user_can($user_id, 'publish_posts')) { - $enforceStrongPasswds = true; - } - } - else if (wfConfig::get('loginSec_strongPasswds') == 'all') { - $enforceStrongPasswds = true; - } - } - - if ($enforceStrongPasswds && !wordfence::isStrongPasswd($password, $username)) { - $errors->add('pass', __('Please choose a stronger password. Use at least 12 characters, and include numbers, symbols, and a mix of upper and lowercase letters. Do not use common words or sequences of letters or numbers.', 'wordfence')); - return $errors; - } - - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if (preg_match(self::$passwordCodePattern, $password) && is_array($twoFactorUsers) && count($twoFactorUsers) > 0) { - $errors->add('pass', __('Passwords containing a space followed by "wf" without quotes are not allowed.', 'wordfence')); - return $errors; - } - - $enforceBreachedPasswds = false; - if (wfConfig::get('loginSec_breachPasswds_enabled')) { - if ($user_id !== false && wfConfig::get('loginSec_breachPasswds') == 'admins' && wfUtils::isAdmin($user_id)) { - $enforceBreachedPasswds = true; - } - else if ($user_id !== false && wfConfig::get('loginSec_breachPasswds') == 'pubs' && user_can($user_id, 'publish_posts')) { - $enforceBreachedPasswds = true; - } - } - - if ($enforceBreachedPasswds && wfCredentialsController::isLeakedPassword($username, $password)) { - $errors->add('pass', sprintf(/* translators: Support URL. */ __('Please choose a different password. The password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. <a href="%s">Learn More</a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD))); - return $errors; - } - else if ($user_id !== false) { - wfAdminNoticeQueue::removeAdminNotice(false, '2faBreachPassword', array($user_id)); - wfAdminNoticeQueue::removeAdminNotice(false, 'previousIPBreachPassword', array($user_id)); - wfCredentialsController::clearCachedCredentialStatus($userData); - } - - return $errors; - } - public static function isStrongPasswd($passwd, $username ) { - $passwd = trim($passwd); - $lowerPasswd = strtolower($passwd); - $passwdLength = strlen($lowerPasswd); - if ($passwdLength < 12) - return false; - if ($lowerPasswd == strtolower( $username ) ) - return false; - if (preg_match('/(?:password|passwd|mypass|wordpress)/i', $passwd)) - return false; - if (preg_match('/(.)\1{2,}/', $lowerPasswd)) //Disallow any character repeated 3 or more times - return false; - /* - * Check for ordered sequences of at least 4 characters for alphabetic sequences and 3 characters for other sequences, ignoring case - * Examples: - * - 321 - * - abcd - * - abab - */ - $last = null; - $sequenceLength = 1; - $alphabetic = true; - for ($i = 0; $i < $passwdLength; $i++) { - $current = ord($lowerPasswd[$i]); - if ($last !== null) { - if (abs($current - $last) === 1) { - $alphabetic &= ctype_alpha($lowerPasswd[$i]); - if (++$sequenceLength > ($alphabetic ? 3 : 2)) - return false; - } - else { - $sequenceLength = 1; - $alphabetic = true; - } - } - $last = $current; - } - $characterTypes = array( - '/[a-z]/', - '/[A-Z]/', - '/[0-9]/', - '/[^a-zA-Z0-9]/' - ); - foreach ($characterTypes as $type) { - if (!preg_match($type, $passwd)) - return false; - } - return true; - } - public static function lostPasswordPost($errors = null, $user = null) { - $IP = wfUtils::getIP(); - if ($request = self::getLog()->getCurrentRequest()) { - $request->action = 'lostPassword'; - $request->save(); - } - if (wfBlock::isWhitelisted($IP)) { - return; - } - - $lockout = wfBlock::lockoutForIP(wfUtils::getIP()); - if ($lockout !== false) { - $lockout->recordBlock(); - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - - if ($user === null) { - if (empty($_POST['user_login'])) { return; } - $user_login = $_POST['user_login']; - if (is_array($user_login)) { $user_login = wfUtils::array_first($user_login); } - $user_login = trim($user_login); - $user = get_user_by('login', $user_login); - if (!$user) { - $user = get_user_by('email', $user_login); - } - } - - if ($user === false && wfConfig::get('loginSec_maskLoginErrors')) { - if (self::hasWoocommerce() && isset($_POST['wc_reset_password'], $_POST['user_login'])) { - $redirectUrl = add_query_arg('reset-link-sent', 'true', wc_get_account_endpoint_url('lost-password')); - } - else { - $redirectUrl = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm'; - } - wp_safe_redirect($redirectUrl); - exit; - } - - if($user){ - $alertCallback = array(new wfLostPasswdFormAlert($user, wfUtils::getIP()), 'send'); - do_action('wordfence_security_event', 'lostPasswdForm', array( - 'email' => $user->user_email, - 'ip' => wfUtils::getIP(), - ), $alertCallback); - - } - - // do not count password reset attempts if there is a user logged in with the edit_users capability - // because they're probably using the "send password reset" feature in the WP admin and therefore we shouldn't - // be locking them out! - if(wfConfig::get('loginSecurityEnabled') && !current_user_can( 'edit_users' ) ){ - $tKey = self::getForgotPasswordFailureCountTransient($IP); - $forgotAttempts = get_transient($tKey); - if($forgotAttempts){ - $forgotAttempts++; - } else { - $forgotAttempts = 1; - } - if($forgotAttempts >= wfConfig::get('loginSec_maxForgotPasswd')){ - self::lockOutIP($IP, sprintf( - /* translators: 1. Password reset limit (number). 2. WordPress username. */ - __('Exceeded the maximum number of tries to recover their password which is set at: %1$s. The last username or email they entered before getting locked out was: \'%2$s\'', 'wordfence'), - wfConfig::get('loginSec_maxForgotPasswd'), - $_POST['user_login'] - )); - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - set_transient($tKey, $forgotAttempts, wfConfig::get('loginSec_countFailMins') * 60); - } - } - public static function lockOutIP($IP, $reason) { - wfBlock::createLockout($reason, $IP, wfBlock::lockoutDuration(), time(), time(), 1); - self::getLog()->tagRequestForLockout($reason); - $alertCallback = array(new wfLoginLockoutAlert($IP, $reason), 'send'); - do_action('wordfence_security_event', 'loginLockout', array( - 'ip' => $IP, - 'reason' => $reason, - 'duration' => wfBlock::lockoutDuration(), - ), $alertCallback); - - } - - public static function getLoginFailureCountTransient($IP) { - return 'wflginfl_' . bin2hex(wfUtils::inet_pton($IP)); - } - - public static function getForgotPasswordFailureCountTransient($IP) { - return 'wffgt_' . bin2hex(wfUtils::inet_pton($IP)); - } - - public static function clearLockoutCounters($IP) { - delete_transient(self::getLoginFailureCountTransient($IP)); - delete_transient(self::getForgotPasswordFailureCountTransient($IP)); - } - - public static function veryFirstAction() { - /** @var wpdb $wpdb ; */ - global $wpdb; - - self::initProtection(); - - $wfFunc = isset($_GET['_wfsf']) ? @$_GET['_wfsf'] : false; - if($wfFunc == 'unlockEmail'){ - $nonceValid = wp_verify_nonce(@$_POST['nonce'], 'wf-form'); - if (!$nonceValid && method_exists(wfWAF::getInstance(), 'createNonce')) { - $nonceValid = wfWAF::getInstance()->verifyNonce(@$_POST['nonce'], 'wf-form'); - } - if(!$nonceValid){ - die(__("Sorry but your browser sent an invalid security token when trying to use this form.", 'wordfence')); - } - $numTries = get_transient('wordfenceUnlockTries'); - if($numTries > 10){ - printf("<html><body><h1>%s</h1><p>%s</p></body></html>", - esc_html__('Please wait 3 minutes and try again', 'wordfence'), - esc_html__('You have used this form too much. Please wait 3 minutes and try again.', 'wordfence') - ); - exit(); - } - if(! $numTries){ $numTries = 1; } else { $numTries = $numTries + 1; } - set_transient('wordfenceUnlockTries', $numTries, 180); - - $email = trim(@$_POST['email']); - global $wpdb; - $ws = $wpdb->get_results($wpdb->prepare("SELECT ID, user_login FROM $wpdb->users WHERE user_email = %s", $email)); - $found = false; - foreach($ws as $user){ - $userDat = get_userdata($user->ID); - if(wfUtils::isAdmin($userDat)){ - if($email == $userDat->user_email){ - $found = true; - break; - } - } - } - if(! $found){ - foreach(wfConfig::getAlertEmails() as $alertEmail){ - if($alertEmail == $email){ - $found = true; - break; - } - } - } - if($found){ - $key = wfUtils::bigRandomHex(); - $IP = wfUtils::getIP(); - set_transient('wfunlock_' . $key, $IP, 1800); - $content = wfUtils::tmpl('email_unlockRequest.php', array( - 'siteName' => get_bloginfo('name', 'raw'), - 'siteURL' => wfUtils::getSiteBaseURL(), - 'unlockHref' => wfUtils::getSiteBaseURL() . '?_wfsf=unlockAccess&key=' . $key, - 'key' => $key, - 'IP' => $IP - )); - wp_mail($email, __("Unlock email requested", 'wordfence'), $content, "Content-Type: text/html"); - } - echo "<html><body><h1>" . esc_html__('Your request was received', 'wordfence') . "</h1><p>" . - esc_html(sprintf(/* translators: Email address. */ __("We received a request to email \"%s\" instructions to unlock their access. If that is the email address of a site administrator or someone on the Wordfence alert list, they have been emailed instructions on how to regain access to this system. The instructions we sent will expire 30 minutes from now.", 'wordfence'), wp_kses($email, array()))) - . "</p></body></html>"; - - exit(); - } else if($wfFunc == 'unlockAccess'){ - if (!preg_match('/^(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9](?::|$)){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))$/i', get_transient('wfunlock_' . $_GET['key']))) { - _e("Invalid key provided for authentication.", 'wordfence'); - exit(); - } - - if($_GET['func'] == 'unlockMyIP'){ - wfBlock::unblockIP(wfUtils::getIP()); - if (class_exists('wfWAFIPBlocksController')) { wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); } - self::clearLockoutCounters(wfUtils::getIP()); - header('Location: ' . wp_login_url()); - exit(); - } else if($_GET['func'] == 'unlockAllIPs'){ - wordfence::status(1, 'info', __("Request received via unlock email link to unblock all IPs.", 'wordfence')); - wfBlock::removeAllIPBlocks(); - if (class_exists('wfWAFIPBlocksController')) { wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); } - self::clearLockoutCounters(wfUtils::getIP()); - header('Location: ' . wp_login_url()); - exit(); - } else if($_GET['func'] == 'disableRules'){ - wfConfig::set('firewallEnabled', 0); - wfConfig::set('loginSecurityEnabled', 0); - wordfence::status(1, 'info', __("Request received via unlock email link to unblock all IPs via disabling firewall rules.", 'wordfence')); - wfBlock::removeAllIPBlocks(); - wfBlock::removeAllCountryBlocks(); - if (class_exists('wfWAFIPBlocksController')) { wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); } - self::clearLockoutCounters(wfUtils::getIP()); - header('Location: ' . wp_login_url()); - exit(); - } else { - _e("Invalid function specified. Please check the link we emailed you and make sure it was not cut-off by your email reader.", 'wordfence'); - exit(); - } - } - else if ($wfFunc == 'detectProxy') { - wfUtils::doNotCache(); - if (wfUtils::processDetectProxyCallback()) { - self::getLog()->getCurrentRequest()->action = 'scan:detectproxy'; //Exempt a valid callback from live traffic - echo wfConfig::get('detectProxyRecommendation', '-'); - } - else { - echo '0'; - } - exit(); - } - else if ($wfFunc == 'removeAlertEmail') { - wfUtils::doNotCache(); - - $payloadStatus = false; - $jwt = (isset($_GET['jwt']) && is_string($_GET['jwt'])) ? $_GET['jwt'] : ''; - if (!empty($jwt)) { - $payload = wfUtils::decodeJWT($jwt); - if ($payload && isset($payload['email'])) { - $payloadStatus = true; - } - } - - if (isset($_POST['resend'])) { - $email = trim(@$_POST['email']); - $found = false; - $alertEmails = wfConfig::getAlertEmails(); - foreach ($alertEmails as $e) { - if ($e == $email) { - $found = true; - break; - } - } - - if ($found) { - $content = wfUtils::tmpl('email_unsubscribeRequest.php', array( - 'siteName' => get_bloginfo('name', 'raw'), - 'siteURL' => wfUtils::getSiteBaseURL(), - 'IP' => wfUtils::getIP(), - 'jwt' => wfUtils::generateJWT(array('email' => $email)), - )); - wp_mail($email, __("Unsubscribe Requested", 'wordfence'), $content, "Content-Type: text/html"); - } - - echo wfView::create('common/unsubscribe', array( - 'state' => 'resent', - ))->render(); - exit(); - } - else if (!$payloadStatus) { - echo wfView::create('common/unsubscribe', array( - 'state' => 'bad', - ))->render(); - exit(); - } - else if (isset($_POST['confirm'])) { - $confirm = wfUtils::truthyToBoolean($_POST['confirm']); - if ($confirm) { - $found = false; - $alertEmails = wfConfig::getAlertEmails(); - $updatedAlertEmails = array(); - foreach ($alertEmails as $alertEmail) { - if ($alertEmail == $payload['email']) { - $found = true; - } - else { - $updatedAlertEmails[] = $alertEmail; - } - } - - if ($found) { - wfConfig::set('alertEmails', implode(',', $updatedAlertEmails)); - } - - echo wfView::create('common/unsubscribe', array( - 'jwt' => $_GET['jwt'], - 'email' => $payload['email'], - 'state' => 'unsubscribed', - ))->render(); - exit(); - } - } - - echo wfView::create('common/unsubscribe', array( - 'jwt' => $_GET['jwt'], - 'email' => $payload['email'], - 'state' => 'prompt', - ))->render(); - exit(); - } - else if ($wfFunc == 'installLicense') { - if (wfUtils::isAdmin()) { - wfUtils::doNotCache(); - - if (isset($_POST['license'])) { - $nonceValid = wp_verify_nonce(@$_POST['nonce'], 'wf-form'); - if (!$nonceValid) { - die(__('Sorry but your browser sent an invalid security token when trying to use this form.', 'wordfence')); - } - - $changes = array('apiKey' => $_POST['license']); - $errors = wfConfig::validate($changes); - if ($errors !== true) { - $error = __('An error occurred while saving the license.', 'wordfence'); - if (count($errors) == 1) { - $error = sprintf(/* translators: Error message. */ __('An error occurred while saving the license: %s', 'wordfence'), $errors[0]['error']); - } - - echo wfView::create('common/license', array( - 'state' => 'bad', - 'error' => $error, - ))->render(); - exit(); - } - - try { - wfConfig::save(wfConfig::clean($changes)); - echo wfView::create('common/license', array( - 'state' => 'installed', - ))->render(); - exit(); - } - catch (Exception $e) { - echo wfView::create('common/license', array( - 'state' => 'bad', - 'error' => sprintf(/* translators: Error message. */ __('An error occurred while saving the license: %s', 'wordfence'), $e->getMessage()), - ))->render(); - exit(); - } - } - - echo wfView::create('common/license', array( - 'state' => 'prompt', - ))->render(); - exit(); - } - } - - if (is_main_site() && wfUtils::isAdmin()) { - if (wp_next_scheduled('wordfence_daily_cron') === false) { - wp_schedule_event(time() + 600, 'daily', 'wordfence_daily_cron'); - wordfence::status(2, 'info', __("Rescheduled missing daily cron", 'wordfence')); - } - - if (wp_next_scheduled('wordfence_hourly_cron') === false) { - wp_schedule_event(time() + 600, 'hourly', 'wordfence_hourly_cron'); - wordfence::status(2, 'info', __("Rescheduled missing hourly cron", 'wordfence')); - } - } - - // Sync the WAF data with the database. - if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) { - $homeurl = wfUtils::wpHomeURL(); - $siteurl = wfUtils::wpSiteURL(); - - //Sync the GeoIP database if needed - $destination = WFWAF_LOG_PATH . '/GeoLite2-Country.mmdb'; - if (!file_exists($destination) || wfConfig::get('needsGeoIPSync')) { - $allowSync = false; - if (wfConfig::createLock('wfSyncGeoIP')) { - $status = get_transient('wfSyncGeoIPActive'); - if (!$status) { - $allowSync = true; - set_transient('wfSyncGeoIPActive', true, 3600); - } - wfConfig::releaseLock('wfSyncGeoIP'); - } - - if ($allowSync) { - wfUtils::requireIpLocator(); - try { - $wflogsLocator = wfIpLocator::getInstance(wfIpLocator::SOURCE_WFLOGS); - $bundledLocator = wfIpLocator::getInstance(wfIpLocator::SOURCE_BUNDLED); - if (!$wflogsLocator->isPreferred() || $wflogsLocator->getDatabaseVersion() !== $bundledLocator->getDatabaseVersion()) { - $source = dirname(__FILE__) . '/GeoLite2-Country.mmdb'; - if (copy($source, $destination)) { - $shash = ''; - $dhash = ''; - $sp = @fopen($source, "rb"); - if ($sp) { - $scontext = hash_init('sha256'); - while (!feof($sp)) { - $data = fread($sp, 65536); - if ($data === false) { - $scontext = false; - break; - } - hash_update($scontext, $data); - } - - fclose($sp); - if ($scontext !== false) { - $shash = hash_final($scontext, false); - } - } - $dp = @fopen($destination, "rb"); - if ($dp) { - $dcontext = hash_init('sha256'); - while (!feof($dp)) { - $data = fread($dp, 65536); - if ($data === false) { - $dcontext = false; - break; - } - hash_update($dcontext, $data); - } - - fclose($dp); - if ($scontext !== false) { - $dhash = hash_final($dcontext, false); - } - } - if (hash_equals($shash, $dhash)) { - wfConfig::remove('needsGeoIPSync'); - delete_transient('wfSyncGeoIPActive'); - } - } - } - else { - wfConfig::remove('needsGeoIPSync'); - delete_transient('wfSyncGeoIPActive'); - } - } - catch (Exception $e) { - //Ignore - } - } - } - - try { - $sapi = @php_sapi_name(); - if ($sapi != "cli") { - $lastPermissionsTemplateCheck = wfConfig::getInt('lastPermissionsTemplateCheck', 0); - if (defined('WFWAF_LOG_PATH') && ($lastPermissionsTemplateCheck + 43200) < time()) { //Run no more frequently than every 12 hours - $timestamp = preg_replace('/[^0-9]/', '', microtime(false)); //We avoid using tmpfile since it can potentially create one with different permissions than the defaults - $tmpTemplate = rtrim(WFWAF_LOG_PATH, '/') . "/template.{$timestamp}.tmp"; - $template = rtrim(WFWAF_LOG_PATH, '/') . '/template.php'; - @unlink($tmpTemplate); - @file_put_contents($tmpTemplate, "<?php exit('Access denied'); __halt_compiler(); ?>\n"); - $tmpStat = @stat($tmpTemplate); - if ($tmpStat !== false) { - $mode = $tmpStat[2] & 0777; - $updatedMode = 0600; - if (($mode & 0020) == 0020) { //Group writable - $updatedMode = $updatedMode | 0060; - } - - if (defined('WFWAF_LOG_FILE_MODE')) { - $updatedMode = WFWAF_LOG_FILE_MODE; - } - - $stat = @stat($template); - if ($stat === false || ($stat[2] & 0777) != $updatedMode) { - @chmod($tmpTemplate, $updatedMode); - - @unlink($template); - @rename($tmpTemplate, $template); - } - @unlink($tmpTemplate); - } - else { - @unlink($tmpTemplate); - } - - wfConfig::set('lastPermissionsTemplateCheck', time()); - - @chmod(WFWAF_LOG_PATH, (wfWAFWordPress::permissions() | 0755)); - wfWAFWordPress::writeHtaccess(); - - $contents = self::_wflogsContents(); - if ($contents) { - $validFiles = wfWAF::getInstance()->fileList(); - foreach ($validFiles as &$vf) { - $vf = basename($vf); - } - $validFiles = array_filter($validFiles); - - $previousWflogsFileList = wfConfig::getJSON('previousWflogsFileList', array()); - - $wflogs = realpath(WFWAF_LOG_PATH); - $filesRemoved = array(); - foreach ($contents as $f) { - if (!in_array($f, $validFiles) && in_array($f, $previousWflogsFileList)) { - $fullPath = $f; - $removed = self::_recursivelyRemoveWflogs($f); - $filesRemoved = array_merge($filesRemoved, $removed); - } - } - - $contents = self::_wflogsContents(); - wfConfig::setJSON('previousWflogsFileList', $contents); - - if (!empty($filesRemoved)) { - $removalHistory = wfConfig::getJSON('diagnosticsWflogsRemovalHistory', array()); - $removalHistory = array_slice($removalHistory, 0, 4); - array_unshift($removalHistory, array(time(), $filesRemoved)); - wfConfig::setJSON('diagnosticsWflogsRemovalHistory', $removalHistory); - } - } - } - } - } - catch (Exception $e) { - //Ignore - } - - try { - $configDefaults = array( - 'apiKey' => wfConfig::get('apiKey'), - 'isPaid' => !!wfConfig::get('isPaid'), - 'siteURL' => $siteurl, - 'homeURL' => $homeurl, - 'whitelistedIPs' => (string) wfConfig::get('whitelisted'), - 'whitelistedServiceIPs' => @json_encode(wfUtils::whitelistedServiceIPs()), - 'howGetIPs' => (string) wfConfig::get('howGetIPs'), - 'howGetIPs_trusted_proxies_unified' => implode("\n", wfUtils::unifiedTrustedProxies()), - 'detectProxyRecommendation' => (string) wfConfig::get('detectProxyRecommendation'), - 'other_WFNet' => !!wfConfig::get('other_WFNet', true), - 'pluginABSPATH' => ABSPATH, - 'serverIPs' => json_encode(wfUtils::serverIPs()), - 'blockCustomText' => wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))), - 'disableWAFIPBlocking' => wfConfig::get('disableWAFIPBlocking'), - 'wordpressVersion' => wfConfig::get('wordpressVersion'), - 'wordpressPluginVersions' => wfConfig::get_ser('wordpressPluginVersions'), - 'wordpressThemeVersions' => wfConfig::get_ser('wordpressThemeVersions'), - 'WPLANG' => get_site_option('WPLANG'), - ); - if (wfUtils::isAdmin()) { - $errorNonceKey = 'errorNonce_' . get_current_user_id(); - $configDefaults[$errorNonceKey] = wp_create_nonce('wf-waf-error-page'); //Used by the AJAX watcher script - } - foreach ($configDefaults as $key => $value) { - $waf->getStorageEngine()->setConfig($key, $value, 'synced'); - } - - if (wfConfig::get('timeoffset_wf') !== false) { - $waf->getStorageEngine()->setConfig('timeoffset_wf', wfConfig::get('timeoffset_wf'), 'synced'); - } - else { - $waf->getStorageEngine()->unsetConfig('timeoffset_wf', 'synced'); - } - - if (class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - - if (wfUtils::isAdmin()) { - if ($waf->getStorageEngine()->getConfig('wafStatus', '') == 'learning-mode') { - if ($waf->getStorageEngine()->getConfig('learningModeGracePeriodEnabled', false)) { - if ($waf->getStorageEngine()->getConfig('learningModeGracePeriod', 0) <= time()) { - // Reached the end of the grace period, activate the WAF. - $waf->getStorageEngine()->setConfig('wafStatus', 'enabled'); - $waf->getStorageEngine()->setConfig('learningModeGracePeriodEnabled', 0); - $waf->getStorageEngine()->unsetConfig('learningModeGracePeriod'); - - $firewall = new wfFirewall(); - $firewall->syncStatus(true); - } - } - } - } - - if (empty($_GET['wordfence_syncAttackData'])) { - $table_wfHits = wfDB::networkTable('wfHits'); - if ($waf->getStorageEngine() instanceof wfWAFStorageMySQL) { - $lastAttackMicroseconds = floatval($waf->getStorageEngine()->getConfig('lastAttackDataTruncateTime')); - } else { - $lastAttackMicroseconds = $wpdb->get_var("SELECT MAX(attackLogTime) FROM {$table_wfHits}"); - } - if (get_site_option('wordfence_lastSyncAttackData', 0) < time() - 8) { - if ($waf->getStorageEngine()->hasNewerAttackData($lastAttackMicroseconds)) { - if (get_site_option('wordfence_syncingAttackData') <= time() - 60) { - // Could be the request to itself is not completing, add ajax to the head as a workaround - $attempts = get_site_option('wordfence_syncAttackDataAttempts', 0); - if ($attempts > 10) { - add_action('wp_head', 'wordfence::addSyncAttackDataAjax'); - add_action('login_head', 'wordfence::addSyncAttackDataAjax'); - add_action('admin_head', 'wordfence::addSyncAttackDataAjax'); - } else { - update_site_option('wordfence_syncAttackDataAttempts', ++$attempts); - wp_remote_post(add_query_arg('wordfence_syncAttackData', microtime(true), home_url('/')), array( - 'timeout' => 0.01, - 'blocking' => false, - 'sslverify' => apply_filters('https_local_ssl_verify', false) - )); - } - } - } - } - } - - if ($waf instanceof wfWAFWordPress && ($learningModeAttackException = $waf->getLearningModeAttackException())) { - $log = self::getLog(); - $log->initLogRequest(); - $request = $log->getCurrentRequest(); - $request->action = 'learned:waf'; - $request->attackLogTime = microtime(true); - - $ruleIDs = array(); - /** @var wfWAFRule $failedRule */ - foreach ($learningModeAttackException->getFailedRules() as $failedRule) { - $ruleIDs[] = $failedRule->getRuleID(); - } - - $actionData = array( - 'learningMode' => 1, - 'failedRules' => $ruleIDs, - 'paramKey' => $learningModeAttackException->getParamKey(), - 'paramValue' => $learningModeAttackException->getParamValue(), - ); - if ($ruleIDs && $ruleIDs[0]) { - $rule = $waf->getRule($ruleIDs[0]); - if ($rule) { - $request->actionDescription = $rule->getDescription(); - $actionData['category'] = $rule->getCategory(); - $actionData['ssl'] = $waf->getRequest()->getProtocol() === 'https'; - $actionData['fullRequest'] = base64_encode($waf->getRequest()); - } - } - $request->actionData = wfRequestModel::serializeActionData($actionData); - register_shutdown_function(array($request, 'save')); - - self::scheduleSendAttackData(); - } - } catch (wfWAFStorageFileException $e) { - // We don't have anywhere to write files in this scenario. - } catch (wfWAFStorageEngineMySQLiException $e) { - // Ignore and continue - } - } - - if(wfConfig::get('firewallEnabled')){ - $wfLog = self::getLog(); - $wfLog->firewallBadIPs(); - - $IP = wfUtils::getIP(); - if (wfBlock::isWhitelisted($IP)) { - return; - } - if (wfConfig::get('neverBlockBG') == 'neverBlockUA' && wfCrawl::isGoogleCrawler()) { - return; - } - if (wfConfig::get('neverBlockBG') == 'neverBlockVerified' && wfCrawl::isVerifiedGoogleCrawler()) { - return; - } - - if (wfConfig::get('bannedURLs', false)) { - $URLs = explode("\n", wfUtils::cleanupOneEntryPerLine(wfConfig::get('bannedURLs'))); - foreach ($URLs as $URL) { - if (preg_match(wfUtils::patternToRegex($URL, ''), $_SERVER['REQUEST_URI'])) { - $reason = __('Accessed a banned URL', 'wordfence'); - wfBlock::createIP($reason, $IP, wfBlock::blockDuration(), time(), time(), 1, wfBlock::TYPE_IP_AUTOMATIC_TEMPORARY); - wfActivityReport::logBlockedIP($IP, null, 'bannedurl'); - $wfLog->tagRequestForBlock($reason); - $wfLog->do503(3600, __("Accessed a banned URL", 'wordfence')); - //exits - } - } - } - - if (wfConfig::get('other_blockBadPOST') == '1' && $_SERVER['REQUEST_METHOD'] == 'POST' && empty($_SERVER['HTTP_USER_AGENT']) && empty($_SERVER['HTTP_REFERER'])) { - $reason = __('POST received with blank user-agent and referer', 'wordfence'); - wfBlock::createIP($reason, $IP, wfBlock::blockDuration(), time(), time(), 1, wfBlock::TYPE_IP_AUTOMATIC_TEMPORARY); - wfActivityReport::logBlockedIP($IP, null, 'badpost'); - $wfLog->tagRequestForBlock($reason); - $wfLog->do503(3600, __("POST received with blank user-agent and referer", 'wordfence')); - //exits - } - } - } - - private static function _wflogsContents() { - $dir = opendir(WFWAF_LOG_PATH); - if ($dir) { - $contents = array(); - while ($path = readdir($dir)) { - if ($path == '.' || $path == '..') { continue; } - $contents[] = $path; - } - closedir($dir); - return $contents; - } - return false; - } - - /** - * Removes a path within wflogs, recursing as necessary. - * - * @param string $file - * @param array $processedDirs - * @return array The list of removed files/folders. - */ - private static function _recursivelyRemoveWflogs($file, $processedDirs = array()) { - if (preg_match('~(?:^|/|\\\\)\.\.(?:/|\\\\|$)~', $file)) { - return array(); - } - - if (stripos(WFWAF_LOG_PATH, 'wflogs') === false) { //Sanity check -- if not in a wflogs folder, user will have to do removal manually - return array(); - } - - $path = rtrim(WFWAF_LOG_PATH, '/') . '/' . $file; - if (is_link($path)) { - if (@unlink($path)) { - return array($file); - } - return array(); - } - - if (is_dir($path)) { - $real = realpath($file); - if (in_array($real, $processedDirs)) { - return array(); - } - $processedDirs[] = $real; - - $count = 0; - $dir = opendir($path); - if ($dir) { - $contents = array(); - while ($sub = readdir($dir)) { - if ($sub == '.' || $sub == '..') { continue; } - $contents[] = $sub; - } - closedir($dir); - - $filesRemoved = array(); - foreach ($contents as $f) { - $removed = self::_recursivelyRemoveWflogs($file . '/' . $f, $processedDirs); - $filesRemoved = array($filesRemoved, $removed); - } - } - - if (@rmdir($path)) { - $filesRemoved[] = $file; - } - return $filesRemoved; - } - - if (@unlink($path)) { - return array($file); - } - return array(); - } - - public static function loginAction($username){ - if(sizeof($_POST) < 1){ return; } //only execute if login form is posted - if(! $username){ return; } - wfConfig::inc('totalLogins'); - $user = get_user_by('login', $username); - $userID = $user ? $user->ID : 0; - self::getLog()->logLogin('loginOK', 0, $username); - if(wfUtils::isAdmin($user)){ - wfConfig::set_ser('lastAdminLogin', array( - 'userID' => $userID, - 'username' => $username, - 'firstName' => $user->first_name, - 'lastName' => $user->last_name, - 'time' => wfUtils::localHumanDateShort(), - 'IP' => wfUtils::getIP() - )); - } - - $salt = wp_salt('logged_in'); - //TODO: Drop support for legacy cookie after 1 year - $legacyCookieName = 'wf_loginalerted_' . hash_hmac('sha256', wfUtils::getIP() . '|' . $user->ID, $salt); - $cookieName = 'wf_loginalerted_' . hash_hmac('sha256', $user->ID, $salt); - $cookieValue = hash_hmac('sha256', $user->user_login, $salt); - $newDevice = !(isset($_COOKIE[$legacyCookieName]) && hash_equals($cookieValue, $_COOKIE[$legacyCookieName])); //Check legacy cookie - if($newDevice){ - $newDevice = !(isset($_COOKIE[$cookieName]) && hash_equals($cookieValue, $_COOKIE[$cookieName])); - } - else{ - $_COOKIE[$cookieName]=$cookieValue; - } - if(wfUtils::isAdmin($userID)){ - $securityEvent = 'adminLogin'; - $alertCallback = array(new wfAdminLoginAlert($cookieName, $cookieValue, $username, wfUtils::getIP()), 'send'); - - } else { - $securityEvent = 'nonAdminLogin'; - $alertCallback = array(new wfNonAdminLoginAlert($cookieName, $cookieValue, $username, wfUtils::getIP()), 'send'); - } - if($newDevice) - $securityEvent.='NewLocation'; - do_action('wordfence_security_event', $securityEvent, array( - 'username' => $username, - 'ip' => wfUtils::getIP(), - ), $alertCallback); - - if (wfConfig::get(wfUtils::isAdmin($userID)?'alertOn_firstAdminLoginOnly':'alertOn_firstNonAdminLoginOnly')) { - //Purge legacy cookie if still present - if(array_key_exists($legacyCookieName, $_COOKIE)) - wfUtils::setcookie($legacyCookieName, '', 1, '/', null, wfUtils::isFullSSL(), true); - wfUtils::setcookie($cookieName, $cookieValue, time() + (86400 * 365), '/', null, wfUtils::isFullSSL(), true); - } - } - public static function registrationFilter($errors, $sanitizedLogin, $userEmail) { - if (wfConfig::get('loginSec_blockAdminReg') && $sanitizedLogin == 'admin') { - $errors->add('user_login_error', __('<strong>ERROR</strong>: You can\'t register using that username', 'wordfence')); - } - return $errors; - } - public static function wooRegistrationFilter($wooCustomerData) { - /* - $wooCustomerData matches: - array( - 'user_login' => $username, - 'user_pass' => $password, - 'user_email' => $email, - 'role' => 'customer', - ) - */ - if (wfConfig::get('loginSec_blockAdminReg') && is_array($wooCustomerData) && isset($wooCustomerData['user_login']) && isset($wooCustomerData['user_email']) && preg_match('/^admin\d*$/i', $wooCustomerData['user_login'])) { - //Converts a username of `admin` generated from something like `admin@example.com` to `adminexample` - $emailComponents = explode('@', $wooCustomerData['user_email']); - if (strpos(wfUtils::array_last($emailComponents), '.') === false) { //e.g., admin@localhost - $wooCustomerData['user_login'] .= wfUtils::array_last($emailComponents); - } - else { //e.g., admin@example.com - $hostComponents = explode('.', wfUtils::array_last($emailComponents)); - array_pop($hostComponents); - $wooCustomerData['user_login'] .= wfUtils::array_last($hostComponents); - } - - //If it's still `admin` at this point, it will fall through and get blocked by wordfence::blacklistedUsernames - } - return $wooCustomerData; - } - public static function oembedAuthorFilter($data, $post, $width, $height) { - unset($data['author_name']); - unset($data['author_url']); - return $data; - } - public static function jsonAPIAuthorFilter($response, $handler, $request) { - $route = $request->get_route(); - if (!current_user_can('edit_others_posts')) { - $urlBase = wfWP_REST_Users_Controller::wfGetURLBase(); - if (preg_match('~' . preg_quote($urlBase, '~') . '/*$~i', $route)) { - $error = new WP_Error('rest_user_cannot_view', __('Sorry, you are not allowed to list users.', 'wordfence'), array('status' => rest_authorization_required_code())); - $response = rest_ensure_response($error); - if (!defined('WORDFENCE_REST_API_SUPPRESSED')) { define('WORDFENCE_REST_API_SUPPRESSED', true); } - } - else if (preg_match('~' . preg_quote($urlBase, '~') . '/+(\d+)/*$~i', $route, $matches)) { - $id = (int) $matches[1]; - if (get_current_user_id() !== $id) { - $error = new WP_Error('rest_user_invalid_id', __('Invalid user ID.', 'wordfence'), array('status' => 404)); - $response = rest_ensure_response($error); - if (!defined('WORDFENCE_REST_API_SUPPRESSED')) { define('WORDFENCE_REST_API_SUPPRESSED', true); } - } - } - } - return $response; - } - public static function jsonAPIAdjustHeaders($response, $server, $request) { - if (defined('WORDFENCE_REST_API_SUPPRESSED')) { - $response->header('Allow', 'GET'); - } - - return $response; - } - public static function wpSitemapUserProviderFilter($provider, $name) { - if ($name === 'users') { - return false; - } - return $provider; - } - public static function _filterCentralFromLiveTraffic($dispatch_result, $request, $route, $handler) { - if (preg_match('~^/wordfence/v\d+/~i', $route)) { - self::getLog()->canLogHit = false; - } - return $dispatch_result; - } - public static function showTwoFactorField() { - $existingContents = ob_get_contents(); - if (!preg_match('/wftwofactornonce:([0-9]+)\/(.+?)\s/', $existingContents, $matches)) { - return; - } - - $userID = intval($matches[1]); - $twoFactorNonce = preg_replace('/[^a-f0-9]/i', '', $matches[2]); - if (!self::verifyTwoFactorIntermediateValues($userID, $twoFactorNonce)) { - return; - } - - //Strip out the username and password fields - $formPosition = strrpos($existingContents, '<form'); - $formTagEnd = strpos($existingContents, '>', $formPosition); - if ($formPosition === false || $formTagEnd === false) { - return; - } - - ob_end_clean(); - ob_start(); - echo substr($existingContents, 0, $formTagEnd + 1); - - //Add the 2FA field - echo "<p> - <label for=\"wfAuthenticationCode\">Authentication Code<br> - <input type=\"text\" size=\"6\" class=\"input\" id=\"wordfence_authFactor\" name=\"wordfence_authFactor\" autofocus></label> - <input type=\"hidden\" id=\"wordfence_twoFactorUser\" name=\"wordfence_twoFactorUser\" value=\"" . $userID . "\"> - <input type=\"hidden\" id=\"wordfence_twoFactorNonce\" name=\"wordfence_twoFactorNonce\" value=\"" . $twoFactorNonce . "\"> - </p>"; - } - private static function verifyTwoFactorIntermediateValues($userID, $twoFactorNonce) { - $user = get_user_by('ID', $userID); - if (!$user || get_class($user) != 'WP_User') { return false; } //Check that the user exists - - $expectedNonce = get_user_meta($user->ID, '_wf_twoFactorNonce', true); - $twoFactorNonceTime = get_user_meta($user->ID, '_wf_twoFactorNonceTime', true); - if (empty($twoFactorNonce) || empty($twoFactorNonceTime)) { return false; } //Ensure the two factor nonce and time have been set - if ($twoFactorNonce != $expectedNonce) { return false; } //Verify the nonce matches the expected - - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if (!$twoFactorUsers || !is_array($twoFactorUsers)) { return false; } //Make sure there are two factor users configured - foreach ($twoFactorUsers as &$t) { //Ensure the two factor nonce hasn't expired - if ($t[0] == $user->ID && $t[3] == 'activated') { - if (isset($t[5]) && $t[5] == 'authenticator') { $graceTime = WORDFENCE_TWO_FACTOR_GRACE_TIME_AUTHENTICATOR; } - else { $graceTime = WORDFENCE_TWO_FACTOR_GRACE_TIME_PHONE; } - return ((time() - $twoFactorNonceTime) < $graceTime); - } - } - return false; - } - public static function authenticateFilter($authUser, $username, $passwd) { - wfConfig::inc('totalLoginHits'); //The total hits to wp-login.php including logins, logouts and just hits. - $IP = wfUtils::getIP(); - $secEnabled = wfConfig::get('loginSecurityEnabled'); - - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - $userDat = self::$userDat; - - $checkBreachList = $secEnabled && - !wfBlock::isWhitelisted($IP) && - wfConfig::get('loginSec_breachPasswds_enabled') && - is_object($authUser) && - get_class($authUser) == 'WP_User' && - ((wfConfig::get('loginSec_breachPasswds') == 'admins' && wfUtils::isAdmin($authUser)) || (wfConfig::get('loginSec_breachPasswds') == 'pubs' && user_can($authUser, 'publish_posts'))); - - $usingBreachedPassword = false; - if ($checkBreachList) { - $cacheStatus = wfCredentialsController::cachedCredentialStatus($authUser); - if ($cacheStatus != wfCredentialsController::UNCACHED) { - $usingBreachedPassword = ($cacheStatus == wfCredentialsController::LEAKED); - } - else { - if (wfCredentialsController::isLeakedPassword($authUser->username, $passwd)) { - $usingBreachedPassword = true; - } - wfCredentialsController::setCachedCredentialStatus($authUser, $usingBreachedPassword); - } - } - - $checkTwoFactor = $secEnabled && - !wfBlock::isWhitelisted($IP) && - wfConfig::get('isPaid') && - isset($twoFactorUsers) && - is_array($twoFactorUsers) && - sizeof($twoFactorUsers) > 0 && - is_object($userDat) && - get_class($userDat) == 'WP_User' && - wfCredentialsController::useLegacy2FA(); - - if ($checkTwoFactor) { - $twoFactorRecord = false; - $hasActivatedTwoFactorUser = false; - foreach ($twoFactorUsers as &$t) { - if ($t[3] == 'activated') { - $userID = $t[0]; - $testUser = get_user_by('ID', $userID); - if (is_object($testUser) && wfUtils::isAdmin($testUser)) { - $hasActivatedTwoFactorUser = true; - } - - if ($userID == $userDat->ID) { - $twoFactorRecord = &$t; - } - } - } - - if (isset($_POST['wordfence_authFactor']) && $_POST['wordfence_authFactor'] && $twoFactorRecord) { //User authenticated with name and password, 2FA code ready to check - $userID = $userDat->ID; - - if (is_object($authUser) && get_class($authUser) == 'WP_User' && $authUser->ID == $userID) { - //Do nothing. This is the code path the old method of including the code in the password field will take -- since we already have a valid $authUser, skip the nonce verification portion - } - else if (isset($_POST['wordfence_twoFactorNonce'])) { - $twoFactorNonce = preg_replace('/[^a-f0-9]/i', '', $_POST['wordfence_twoFactorNonce']); - if (!self::verifyTwoFactorIntermediateValues($userID, $twoFactorNonce)) { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>VERIFICATION FAILED</strong>: Two-factor authentication verification failed. Please try again.', 'wordfence'), array('strong'=>array()))); - return self::processBruteForceAttempt(self::$authError, $username, $passwd); - } - } - else { //Code path for old method, invalid password the second time - self::$authError = $authUser; - if (is_wp_error(self::$authError) && (self::$authError->get_error_code() == 'invalid_username' || $authUser->get_error_code() == 'invalid_email' || self::$authError->get_error_code() == 'incorrect_password' || $authUser->get_error_code() == 'authentication_failed') && wfConfig::get('loginSec_maskLoginErrors')) { - self::$authError = new WP_Error('incorrect_password', sprintf(/* translators: 1. WordPress username. 2. Password reset URL. */ wp_kses(__('<strong>ERROR</strong>: The username or password you entered is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?', 'wordfence'), array('strong'=>array(), 'a'=>array('href'=>array(), 'title'=>array()))), $username, wp_lostpassword_url())); - } - - return self::processBruteForceAttempt(self::$authError, $username, $passwd); - } - - if ($usingBreachedPassword) { - wfAdminNoticeQueue::removeAdminNotice(false, 'previousIPBreachPassword', array($userID)); - wfAdminNoticeQueue::addAdminNotice(wfAdminNotice::SEVERITY_CRITICAL, sprintf( - /* translators: 1. WordPress admin panel URL. 2. Support URL. */ - __('<strong>WARNING: </strong>The password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%1$s">change your password</a>. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - self_admin_url('profile.php'), - wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD) - ), '2faBreachPassword', array($authUser->ID)); - } - - if (isset($twoFactorRecord[5])) { //New method TOTP - $mode = $twoFactorRecord[5]; - $code = preg_replace('/[^a-f0-9]/i', '', $_POST['wordfence_authFactor']); - - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactorTOTP_verify', array(), array('totpid' => $twoFactorRecord[6], 'code' => $code, 'mode' => $mode)); - - if (isset($codeResult['notPaid']) && $codeResult['notPaid']) { - //No longer a paid key, let them sign in without two factor - } - else if (isset($codeResult['ok']) && $codeResult['ok']) { - //Everything's good, let the sign in continue - } - else { - if (is_object($authUser) && get_class($authUser) == 'WP_User' && $authUser->ID == $userID) { //Using the old method of appending the code to the password - if ($mode == 'authenticator') { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_invalid', wp_kses(__('<strong>INVALID CODE</strong>: Please sign in again and add a space, the letters <code>wf</code>, and the code from your authenticator app to the end of your password (e.g., <code>wf123456</code>).', 'wordfence'), array('strong'=>array(), 'code'=>array()))); - } - else { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_invalid', wp_kses(__('<strong>INVALID CODE</strong>: Please sign in again and add a space, the letters <code>wf</code>, and the code sent to your phone to the end of your password (e.g., <code>wf123456</code>).', 'wordfence'), array('strong'=>array(), 'code'=>array()))); - } - } - else { - $loginNonce = wfWAFUtils::random_bytes(20); - if ($loginNonce === false) { //Should never happen but is technically possible - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>AUTHENTICATION FAILURE</strong>: A temporary failure was encountered while trying to log in. Please try again.', 'wordfence'), array('strong'=>array()))); - return self::$authError; - } - - $loginNonce = bin2hex($loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonce', $loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonceTime', time()); - - if ($mode == 'authenticator') { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_invalid', wp_kses(__('<strong>INVALID CODE</strong>: You need to enter the code generated by your authenticator app. The code should be a six digit number (e.g., 123456).', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - } - else { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_invalid', wp_kses(__('<strong>INVALID CODE</strong>: You need to enter the code generated sent to your phone. The code should be a six digit number (e.g., 123456).', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - } - } - return self::processBruteForceAttempt(self::$authError, $username, $passwd); - } - } - catch (Exception $e) { - if (self::isDebugOn()) { - error_log('TOTP validation error: ' . $e->getMessage()); - } - } // Couldn't connect to noc1, let them sign in since the password was correct. - } - else { //Old method phone authentication - $authFactor = $_POST['wordfence_authFactor']; - if (strlen($authFactor) == 4) { - $authFactor = 'wf' . $authFactor; - } - if ($authFactor == $twoFactorRecord[2] && $twoFactorRecord[4] > time()) { // Set this 2FA code to expire in 30 seconds (for other plugins hooking into the auth process) - $twoFactorRecord[4] = time() + 30; - wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); - } - else if ($authFactor == $twoFactorRecord[2]) { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $twoFactorRecord[1])); - - if (isset($codeResult['notPaid']) && $codeResult['notPaid']) { - //No longer a paid key, let them sign in without two factor - } - else if (isset($codeResult['ok']) && $codeResult['ok']) { - $twoFactorRecord[2] = $codeResult['code']; - $twoFactorRecord[4] = time() + 1800; //30 minutes until code expires - wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. - - $loginNonce = wfWAFUtils::random_bytes(20); - if ($loginNonce === false) { //Should never happen but is technically possible - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>AUTHENTICATION FAILURE</strong>: A temporary failure was encountered while trying to log in. Please try again.', 'wordfence'), array('strong'=>array()))); - return self::$authError; - } - - $loginNonce = bin2hex($loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonce', $loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonceTime', time()); - - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CODE EXPIRED. CHECK YOUR PHONE:</strong> The code you entered has expired. Codes are only valid for 30 minutes for security reasons. We have sent you a new code. Please sign in using your username, password, and the new code we sent you.', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - return self::$authError; - } - - //else: No new code was received. Let them sign in with the expired code. - } - catch (Exception $e) { - // Couldn't connect to noc1, let them sign in since the password was correct. - } - } - else { //Bad code, so cancel the login and return an error to user. - $loginNonce = wfWAFUtils::random_bytes(20); - if ($loginNonce === false) { //Should never happen but is technically possible - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>AUTHENTICATION FAILURE</strong>: A temporary failure was encountered while trying to log in. Please try again.', 'wordfence'), array('strong'=>array()))); - return self::$authError; - } - - $loginNonce = bin2hex($loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonce', $loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonceTime', time()); - - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_invalid', wp_kses(__('<strong>INVALID CODE</strong>: You need to enter your password and the code we sent to your phone. The code should start with \'wf\' and should be four characters (e.g., wfAB12).', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - return self::processBruteForceAttempt(self::$authError, $username, $passwd); - } - } - delete_user_meta($userDat->ID, '_wf_twoFactorNonce'); - delete_user_meta($userDat->ID, '_wf_twoFactorNonceTime'); - $authUser = $userDat; //Log in as the user we saved in the wp_authenticate action - } - else if (is_object($authUser) && get_class($authUser) == 'WP_User') { //User authenticated with name and password, prompt for the 2FA code - //Verify at least one administrator has 2FA enabled - $requireAdminTwoFactor = $hasActivatedTwoFactorUser && wfConfig::get('loginSec_requireAdminTwoFactor'); - - if ($twoFactorRecord) { - if ($twoFactorRecord[0] == $userDat->ID && $twoFactorRecord[3] == 'activated') { //Yup, enabled, so require the code - if ($usingBreachedPassword) { - wfAdminNoticeQueue::removeAdminNotice(false, 'previousIPBreachPassword', array($authUser->ID)); - wfAdminNoticeQueue::addAdminNotice(wfAdminNotice::SEVERITY_CRITICAL, sprintf( - /* translators: 1. WordPress admin panel URL. 2. Support URL. */ - __('<strong>WARNING: </strong>The password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%1$s">change your password</a>. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), self_admin_url('profile.php'), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), '2faBreachPassword', array($authUser->ID)); - } - - $loginNonce = wfWAFUtils::random_bytes(20); - if ($loginNonce === false) { //Should never happen but is technically possible, allow login - $requireAdminTwoFactor = false; - } - else { - $loginNonce = bin2hex($loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonce', $loginNonce); - update_user_meta($userDat->ID, '_wf_twoFactorNonceTime', time()); - - if (isset($twoFactorRecord[5])) { //New method TOTP authentication - if ($twoFactorRecord[5] == 'authenticator') { - if (self::hasGDLimitLoginsMUPlugin() && function_exists('limit_login_get_address')) { - $retries = get_option('limit_login_retries', array()); - $ip = limit_login_get_address(); - - if (!is_array($retries)) { - $retries = array(); - } - if (isset($retries[$ip]) && is_int($retries[$ip])) { - $retries[$ip]--; - } - else { - $retries[$ip] = 0; - } - update_option('limit_login_retries', $retries); - } - - $allowSeparatePrompt = ini_get('output_buffering') > 0; - if (wfConfig::get('loginSec_enableSeparateTwoFactor') && $allowSeparatePrompt) { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CODE REQUIRED</strong>: Please check your authenticator app for the current code. Enter it below to sign in.', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - return self::$authError; - } - else { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CODE REQUIRED</strong>: Please check your authenticator app for the current code. Please sign in again and add a space, the letters <code>wf</code>, and the code to the end of your password (e.g., <code>wf123456</code>).', 'wordfence'), array('strong'=>array(), 'code'=>array()))); - return self::$authError; - } - } - else { - //Phone TOTP - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactorTOTP_sms', array(), array('totpid' => $twoFactorRecord[6])); - if (isset($codeResult['notPaid']) && $codeResult['notPaid']) { - $requireAdminTwoFactor = false; - //Let them sign in without two factor if their API key has expired or they're not paid and for some reason they have this set up. - } - else { - if (isset($codeResult['ok']) && $codeResult['ok']) { - if (self::hasGDLimitLoginsMUPlugin() && function_exists('limit_login_get_address')) { - $retries = get_option('limit_login_retries', array()); - $ip = limit_login_get_address(); - - if (!is_array($retries)) { - $retries = array(); - } - if (isset($retries[$ip]) && is_int($retries[$ip])) { - $retries[$ip]--; - } - else { - $retries[$ip] = 0; - } - update_option('limit_login_retries', $retries); - } - - $allowSeparatePrompt = ini_get('output_buffering') > 0; - if (wfConfig::get('loginSec_enableSeparateTwoFactor') && $allowSeparatePrompt) { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CHECK YOUR PHONE</strong>: A code has been sent to your phone and will arrive within 30 seconds. Enter it below to sign in.', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - return self::$authError; - } - else { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CHECK YOUR PHONE</strong>: A code has been sent to your phone and will arrive within 30 seconds. Please sign in again and add a space, the letters <code>wf</code>, and the code to the end of your password (e.g., <code>wf123456</code>).', 'wordfence'), array('strong'=>array(), 'code'=>array()))); - return self::$authError; - } - } - else { //oops, our API returned an error. - $requireAdminTwoFactor = false; - //Let them sign in without two factor because the API is broken and we don't want to lock users out of their own systems. - } - } - } - catch (Exception $e) { - if (self::isDebugOn()) { - error_log('TOTP SMS error: ' . $e->getMessage()); - } - $requireAdminTwoFactor = false; - // Couldn't connect to noc1, let them sign in since the password was correct. - } - } - } - else { //Old method phone authentication - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactor_verification', array(), array('phone' => $twoFactorRecord[1])); - if (isset($codeResult['notPaid']) && $codeResult['notPaid']) { - $requireAdminTwoFactor = false; - //Let them sign in without two factor if their API key has expired or they're not paid and for some reason they have this set up. - } - else { - if (isset($codeResult['ok']) && $codeResult['ok']) { - $twoFactorRecord[2] = $codeResult['code']; - $twoFactorRecord[4] = time() + 1800; //30 minutes until code expires - wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); //save the code the user needs to enter and return an error. - - if (self::hasGDLimitLoginsMUPlugin() && function_exists('limit_login_get_address')) { - $retries = get_option('limit_login_retries', array()); - $ip = limit_login_get_address(); - - if (!is_array($retries)) { - $retries = array(); - } - if (isset($retries[$ip]) && is_int($retries[$ip])) { - $retries[$ip]--; - } - else { - $retries[$ip] = 0; - } - update_option('limit_login_retries', $retries); - } - - $allowSeparatePrompt = ini_get('output_buffering') > 0; - if (wfConfig::get('loginSec_enableSeparateTwoFactor') && $allowSeparatePrompt) { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CHECK YOUR PHONE</strong>: A code has been sent to your phone and will arrive within 30 seconds. Enter it below to sign in.', 'wordfence'), array('strong'=>array())) . '<!-- wftwofactornonce:' . $userDat->ID . '/' . $loginNonce . ' -->'); - return self::$authError; - } - else { - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('twofactor_required', wp_kses(__('<strong>CHECK YOUR PHONE</strong>: A code has been sent to your phone and will arrive within 30 seconds. Please sign in again and add a space and the code to the end of your password (e.g., <code>wfABCD</code>).', 'wordfence'), array('strong'=>array(), 'code'=>array()))); - return self::$authError; - } - } - else { //oops, our API returned an error. - $requireAdminTwoFactor = false; - //Let them sign in without two factor because the API is broken and we don't want to lock users out of their own systems. - } - } - } - catch (Exception $e) { - $requireAdminTwoFactor = false; - // Couldn't connect to noc1, let them sign in since the password was correct. - } - } //end: Old method phone authentication - } - } - } - else if ($usingBreachedPassword) { - if (wfCredentialsController::hasPreviousLoginFromIP($authUser, wfUtils::getIP())) { - wfAdminNoticeQueue::removeAdminNotice(false, '2faBreachPassword', array($authUser->ID)); - wfAdminNoticeQueue::addAdminNotice(wfAdminNotice::SEVERITY_CRITICAL, sprintf(__('<strong>WARNING: </strong>Your login has been allowed because you have previously logged in from the same IP, but you will be blocked if your IP changes. The password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%1$s">change your password</a>. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), self_admin_url('profile.php'), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), 'previousIPBreachPassword', array($authUser->ID)); - } - else { - $username = $authUser->user_login; - self::getLog()->logLogin('loginFailValidUsername', 1, $username); - $alertCallback = array(new wfBreachLoginAlert($username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), wfUtils::getIP()), 'send'); - - do_action('wordfence_security_event', 'breachLogin', array( - 'username' => $username, - 'resetPasswordURL' => wp_lostpassword_url(), - 'supportURL' => wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), - 'ip' => wfUtils::getIP(), - ), $alertCallback); - - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('breached_password', sprintf( - /* translators: 1. Reset password URL. 2. Support URL. */ - wp_kses(__('<strong>INSECURE PASSWORD:</strong> Your login attempt has been blocked because the password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%1$s">reset your password</a> to reactivate your account. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span style="font-size:0;"> (opens in new tab)</span></a>', 'wordfence'), array('strong'=>array(), 'a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('style'=>array()))), wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD))); - return self::$authError; - } - } - - if ($requireAdminTwoFactor && wfUtils::isAdmin($authUser)) { - $username = $authUser->user_login; - self::getLog()->logLogin('loginFailValidUsername', 1, $username); - wordfence::alert(__("Admin Login Blocked", 'wordfence'), sprintf(/* translators: WordPress username. */__("A user with username \"%s\" who has administrator access tried to sign in to your WordPress site. Access was denied because all administrator accounts are required to have Cellphone Sign-in enabled but this account does not.", 'wordfence'), $username), wfUtils::getIP()); - self::$authError = new WP_Error('twofactor_disabled_required', wp_kses(__('<strong>Cellphone Sign-in Required</strong>: Cellphone Sign-in is required for all administrator accounts. Please contact the site administrator to enable it for your account.', 'wordfence'), array('strong'=>array()))); - return self::$authError; - } - - //User is not configured for two factor. Sign in without two factor. - } - } //End: if ($checkTwoFactor) - else if ($usingBreachedPassword) { - if (wfCredentialsController::hasPreviousLoginFromIP($authUser, wfUtils::getIP())) { - wfAdminNoticeQueue::removeAdminNotice(false, '2faBreachPassword', array($authUser->ID)); - wfAdminNoticeQueue::addAdminNotice(wfAdminNotice::SEVERITY_CRITICAL, sprintf(/* translators: 1. Reset password URL. 2. Support URL. */ __('<strong>WARNING: </strong>Your login has been allowed because you have previously logged in from the same IP, but you will be blocked if your IP changes. The password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%1$s">change your password</a>. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), self_admin_url('profile.php'), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD)), 'previousIPBreachPassword', array($authUser->ID)); - } - else { - $username = $authUser->user_login; - self::getLog()->logLogin('loginFailValidUsername', 1, $username); - $alertCallback = array(new wfBreachLoginAlert($username, wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), wfUtils::getIP()), 'send'); - - do_action('wordfence_security_event', 'breachLogin', array( - 'username' => $username, - 'resetPasswordURL' => wp_lostpassword_url(), - 'supportURL' => wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD), - 'ip' => wfUtils::getIP(), - ), $alertCallback); - - remove_action('login_errors', 'limit_login_fixup_error_messages'); //We're forced to do this because limit-login-attempts does not have any allowances for legitimate error messages - self::$authError = new WP_Error('breached_password', sprintf( - /* translators: 1. Reset password URL. 2. Support URL. */ - wp_kses(__('<strong>INSECURE PASSWORD:</strong> Your login attempt has been blocked because the password you are using exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please <a href="%1$s">reset your password</a> to reactivate your account. <a href="%2$s" target="_blank" rel="noopener noreferrer">Learn More<span style="font-size:0;"> (opens in new tab)</span></a>', 'wordfence'), array('strong'=>array(), 'a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('style'=>array()))), wp_lostpassword_url(), wfSupportController::esc_supportURL(wfSupportController::ITEM_USING_BREACH_PASSWORD))); - return self::$authError; - } - } - - return self::processBruteForceAttempt($authUser, $username, $passwd); - } - - public static function checkSecurityNetwork($endpointType = null) { - if (wfConfig::get('other_WFNet')) { - $IP = wfUtils::getIP(); - if ($maxBlockTime = self::wfsnIsBlocked($IP, 'brute', $endpointType)) { - $secsToGo = ($maxBlockTime ? $maxBlockTime : wfBlock::blockDuration()); - $reason = __('Blocked by Wordfence Security Network', 'wordfence'); - wfBlock::createWFSN($reason, $IP, $secsToGo, time(), time(), 1); - wfActivityReport::logBlockedIP($IP, null, 'brute'); - self::getLog()->tagRequestForBlock($reason, true); - self::getLog()->getCurrentRequest()->action = 'blocked:wfsn'; - self::getLog()->do503($secsToGo, $reason); //exits - } - } - } - - public static function processBruteForceAttempt($authUser, $username, $passwd) { - $IP = wfUtils::getIP(); - $secEnabled = wfConfig::get('loginSecurityEnabled'); - - if (wfBlock::isWhitelisted($IP)) { - return $authUser; - } - - $failureErrorCodes = array('invalid_username', 'invalid_email', 'incorrect_password', 'twofactor_invalid', 'authentication_failed', 'wfls_twofactor_invalid', 'wfls_twofactor_failed', 'wfls_twofactor_blocked'); - if (is_wp_error($authUser) && in_array($authUser->get_error_code(), $failureErrorCodes)) { - self::checkSecurityNetwork(); //May exit - } - - if($secEnabled){ - if(is_wp_error($authUser) && ($authUser->get_error_code() == 'invalid_username' || $authUser->get_error_code() == 'invalid_email')){ - if($blacklist = wfConfig::get('loginSec_userBlacklist')){ - $users = explode("\n", wfUtils::cleanupOneEntryPerLine($blacklist)); - foreach($users as $user){ - if(strtolower($username) == strtolower($user)){ - $secsToGo = wfBlock::blockDuration(); - $reason = __('Blocked by login security setting', 'wordfence'); - wfBlock::createIP($reason, $IP, $secsToGo, time(), time(), 1, wfBlock::TYPE_IP_AUTOMATIC_TEMPORARY); - wfActivityReport::logBlockedIP($IP, null, 'brute'); - self::getLog()->tagRequestForBlock($reason); - self::getLog()->do503($secsToGo, $reason); //exits - } - } - } - if(wfConfig::get('loginSec_lockInvalidUsers')){ - if(strlen($username) > 0 && preg_match('/[^\r\s\n\t]+/', $username)){ - self::lockOutIP($IP, sprintf(/* translators: WordPress username. */ __("Used an invalid username '%s' to try to sign in", 'wordfence'), $username)); - self::getLog()->logLogin('loginFailInvalidUsername', true, $username); - } - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - } - $tKey = self::getLoginFailureCountTransient($IP); - if(is_wp_error($authUser) && in_array($authUser->get_error_code(), $failureErrorCodes)) { - $tries = get_transient($tKey); - if($tries){ - $tries++; - } else { - $tries = 1; - } - if($tries >= wfConfig::get('loginSec_maxFailures')){ - self::lockOutIP($IP, - sprintf( - /* translators: 1. Login attempt limit. 2. WordPress username. */ - __('Exceeded the maximum number of login failures which is: %1$s. The last username they tried to sign in with was: \'%2$s\'', 'wordfence'), - wfConfig::get('loginSec_maxFailures'), - $username - ) - ); - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - set_transient($tKey, $tries, wfConfig::get('loginSec_countFailMins') * 60); - } - } - if(is_wp_error($authUser)){ - if($authUser->get_error_code() == 'invalid_username' || $authUser->get_error_code() == 'invalid_email'){ - self::getLog()->logLogin('loginFailInvalidUsername', 1, $username); - } else { - self::getLog()->logLogin('loginFailValidUsername', 1, $username); - } - } - - if(is_wp_error($authUser) && ($authUser->get_error_code() == 'invalid_username' || $authUser->get_error_code() == 'invalid_email' || $authUser->get_error_code() == 'incorrect_password') && wfConfig::get('loginSec_maskLoginErrors')){ - return new WP_Error( 'incorrect_password', sprintf( - /* translators: 1. WordPress username. 2. Reset password URL. */ - wp_kses(__( '<strong>ERROR</strong>: The username or password you entered is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?', 'wordfence' ), array('strong'=>array(), 'a'=>array('href'=>array(), 'title'=>array()))), $username, wp_lostpassword_url() ) ); - } - - return $authUser; - } - public static function wfsnBatchReportBlockedAttempts() { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $threshold = wfConfig::get('lastBruteForceDataSendTime', 0);; - - $wfdb = new wfDB(); - $table_wfHits = wfDB::networkTable('wfHits'); - $rawBlocks = $wfdb->querySelect("SELECT IP, ctime, actionData FROM {$table_wfHits} WHERE ctime > %f AND action = 'blocked:wfsnrepeat' ORDER BY ctime ASC LIMIT 100", sprintf('%.6f', $threshold)); - $totalRows = $wfdb->querySingle("SELECT COUNT(*) FROM {$table_wfHits} WHERE ctime > %f AND action = 'blocked:wfsnrepeat'", sprintf('%.6f', $threshold)); - $ipCounts = array(); - $maxctime = 0; - foreach ($rawBlocks as $record) { - $maxctime = max($maxctime, $record['ctime']); - $endpointType = 0; - if (!empty($record['actionData'])) { - $actionData = wfRequestModel::unserializeActionData($record['actionData']); - if (isset($actionData['type'])) { - $endpointType = $actionData['type']; - } - } - if (isset($ipCounts[$record['IP']])) { - $ipCounts[$record['IP']] = array(); - } - - if (isset($ipCounts[$record['IP']][$endpointType])) { - $ipCounts[$record['IP']][$endpointType]++; - } - else { - $ipCounts[$record['IP']][$endpointType] = 1; - } - } - - $toSend = array(); - foreach ($ipCounts as $IP => $endpoints) { - foreach ($endpoints as $endpointType => $count) { - $toSend[] = array('IP' => base64_encode($IP), 'count' => $count, 'blocked' => 1, 'type' => $endpointType); - } - } - - try { - $response = wp_remote_post(WORDFENCE_HACKATTEMPT_URL_SEC . 'multipleHackAttempts/?k=' . rawurlencode(wfConfig::get('apiKey')) . '&t=brute', array( - 'timeout' => 2, - 'user-agent' => "Wordfence.com UA " . (defined('WORDFENCE_VERSION') ? WORDFENCE_VERSION : '[Unknown version]'), - 'body' => 'IPs=' . rawurlencode(json_encode($toSend)), - 'headers' => array('Referer' => false), - )); - - if (!is_wp_error($response)) { - if ($totalRows > 100) { - self::wfsnScheduleBatchReportBlockedAttempts(); - } - - wfConfig::set('lastBruteForceDataSendTime', $maxctime); - } - else { - self::wfsnScheduleBatchReportBlockedAttempts(); - } - } - catch (Exception $err) { - //Do nothing - } - } - private static function wfsnScheduleBatchReportBlockedAttempts($timeToSend = null) { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - if ($timeToSend === null) { - $timeToSend = time() + 30; - } - $notMainSite = is_multisite() && !is_main_site(); - if ($notMainSite) { - global $current_site; - switch_to_blog($current_site->blog_id); - } - if (!wp_next_scheduled('wordfence_batchReportBlockedAttempts')) { - wp_schedule_single_event($timeToSend, 'wordfence_batchReportBlockedAttempts'); - } - if ($notMainSite) { - restore_current_blog(); - } - } - public static function wfsnReportBlockedAttempt($IP, $type){ - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - self::wfsnScheduleBatchReportBlockedAttempts(); - $endpointType = self::wfsnEndpointType(); - self::getLog()->getCurrentRequest()->actionData = wfRequestModel::serializeActionData(array('type' => $endpointType)); - } - public static function wfsnBatchReportFailedAttempts() { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $threshold = time(); - - $wfdb = new wfDB(); - $table_wfSNIPCache = wfDB::networkTable('wfSNIPCache'); - $rawRecords = $wfdb->querySelect("SELECT id, IP, type, count, 1 AS failed FROM {$table_wfSNIPCache} WHERE count > 0 AND expiration < FROM_UNIXTIME(%d) LIMIT 100", $threshold); - $toSend = array(); - $toDelete = array(); - if (count($rawRecords)) { - foreach ($rawRecords as $record) { - $toDelete[] = $record['id']; - unset($record['id']); - $record['IP'] = base64_encode(filter_var($record['IP'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? wfUtils::inet_aton($record['IP']) : wfUtils::inet_pton($record['IP'])); - - $key = $record['IP'] . $record['type']; //Aggregate multiple records if for some reason there are multiple for an IP/type combination - if (!isset($toSend[$key])) { - $toSend[$key] = $record; - } - else { - $toSend[$key]['count'] += $record['count']; - } - } - - $toSend = array_values($toSend); - - try { - $response = wp_remote_post(WORDFENCE_HACKATTEMPT_URL_SEC . 'multipleHackAttempts/?k=' . rawurlencode(wfConfig::get('apiKey')) . '&t=brute', array( - 'timeout' => 2, - 'user-agent' => "Wordfence.com UA " . (defined('WORDFENCE_VERSION') ? WORDFENCE_VERSION : '[Unknown version]'), - 'body' => 'IPs=' . rawurlencode(json_encode($toSend)), - 'headers' => array('Referer' => false), - )); - - if (is_wp_error($response)) { - self::wfsnScheduleBatchReportFailedAttempts(); - return; - } - } - catch (Exception $err) { - //Do nothing - } - } - array_unshift($toDelete, $threshold); - $wfdb->queryWriteIgnoreError("DELETE FROM {$table_wfSNIPCache} WHERE (expiration < FROM_UNIXTIME(%d) AND count = 0)" . (count($toDelete) > 1 ? " OR id IN (" . rtrim(str_repeat('%d, ', count($toDelete) - 1), ', ') . ")" : ""), $toDelete); - - $remainingRows = $wfdb->querySingle("SELECT COUNT(*) FROM {$table_wfSNIPCache}"); - if ($remainingRows > 0) { - self::wfsnScheduleBatchReportFailedAttempts(); - } - } - private static function wfsnScheduleBatchReportFailedAttempts($timeToSend = null) { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - if ($timeToSend === null) { - $timeToSend = time() + 30; - } - $notMainSite = is_multisite() && !is_main_site(); - if ($notMainSite) { - global $current_site; - switch_to_blog($current_site->blog_id); - } - if (!wp_next_scheduled('wordfence_batchReportFailedAttempts')) { - wp_schedule_single_event($timeToSend, 'wordfence_batchReportFailedAttempts'); - } - if ($notMainSite) { - restore_current_blog(); - } - } - public static function wfsnIsBlocked($IP, $hitType, $endpointType = null) { - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $wfdb = new wfDB(); - if ($endpointType === null) { $endpointType = self::wfsnEndpointType(); } - $table_wfSNIPCache = wfDB::networkTable('wfSNIPCache'); - $cachedRecord = $wfdb->querySingleRec("SELECT id, body FROM {$table_wfSNIPCache} WHERE IP = '%s' AND type = %d AND expiration > NOW()", $IP, $endpointType); - if (isset($cachedRecord)) { - $wfdb->queryWriteIgnoreError("UPDATE {$table_wfSNIPCache} SET count = count + 1 WHERE id = %d", $cachedRecord['id']); - if (preg_match('/BLOCKED:(\d+)/', $cachedRecord['body'], $matches) && (!wfBlock::isWhitelisted($IP))) { - return $matches[1]; - } - return false; - } - - $backoff = get_transient('wfsn_backoff'); - if ($backoff) { - return false; - } - - try { - $result = wp_remote_get(WORDFENCE_HACKATTEMPT_URL_SEC . 'hackAttempt/?k=' . rawurlencode(wfConfig::get('apiKey')) . - '&IP=' . rawurlencode(filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? wfUtils::inet_aton($IP) : wfUtils::inet_pton($IP)) . - '&t=' . rawurlencode($hitType) . - '&type=' . $endpointType, - array( - 'timeout' => 3, - 'user-agent' => "Wordfence.com UA " . (defined('WORDFENCE_VERSION') ? WORDFENCE_VERSION : '[Unknown version]'), - 'headers' => array('Referer' => false), - )); - if (is_wp_error($result)) { - set_transient('wfsn_backoff', 1, WORDFENCE_NOC3_FAILED_BACKOFF_TIME); - return false; - } - $wfdb->queryWriteIgnoreError("INSERT INTO {$table_wfSNIPCache} (IP, type, expiration, body) VALUES ('%s', %d, DATE_ADD(NOW(), INTERVAL %d SECOND), '%s')", $IP, $endpointType, 30, $result['body']); - self::wfsnScheduleBatchReportFailedAttempts(); - if (preg_match('/BLOCKED:(\d+)/', $result['body'], $matches) && (!wfBlock::isWhitelisted($IP))) { - return $matches[1]; - } - return false; - } catch (Exception $err) { - set_transient('wfsn_backoff', 1, WORDFENCE_NOC3_FAILED_BACKOFF_TIME); - return false; - } - } - public static function wfsnEndpointType() { - $type = 0; //Unknown - if (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST) { - $type = 2; - } - else if (defined('DOING_AJAX') && DOING_AJAX) { - $type = 3; - if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'wordfence_ls_authenticate' || $_REQUEST['action'] == 'nopriv_wordfence_ls_authenticate')) { - $type = 301; - } - } - else if (strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false) { - $type = 1; - } - return $type; - } - public static function logoutAction(){ - $userID = self::getLog()->getCurrentRequest()->userID; - $userDat = get_user_by('id', $userID); - if(is_object($userDat)){ - self::getLog()->logLogin('logout', 0, $userDat->user_login); - } - // Unset the roadblock cookie - if (!WFWAF_SUBDIRECTORY_INSTALL) { - wfUtils::setcookie(wfWAF::getInstance()->getAuthCookieName(), ' ', time() - (86400 * 365), '/', null, wfUtils::isFullSSL(), true); - } - } - public static function loginInitAction() { - $lockout = wfBlock::lockoutForIP(wfUtils::getIP()); - if ($lockout !== false) { - $lockout->recordBlock(); - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - - self::doEarlyAccessLogging(); //Rate limiting - } - public static function authActionNew(&$username, &$passwd){ //As of php 5.4 we must denote passing by ref in the function definition, not the function call (as WordPress core does, which is a bug in WordPress). - $lockout = wfBlock::lockoutForIP(wfUtils::getIP()); - if ($lockout !== false) { - $lockout->recordBlock(); - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - - if (isset($_POST['wordfence_twoFactorUser'])) { //Final stage of login -- get and verify 2fa code, make sure we load the appropriate user - $userID = intval($_POST['wordfence_twoFactorUser']); - $twoFactorNonce = preg_replace('/[^a-f0-9]/i', '', $_POST['wordfence_twoFactorNonce']); - if (self::verifyTwoFactorIntermediateValues($userID, $twoFactorNonce)) { - $user = get_user_by('ID', $userID); - $username = $user->user_login; - $passwd = $twoFactorNonce; - self::$userDat = $user; - return; - } - } - - if (is_array($username) || is_array($passwd)) { return; } - - //Intermediate stage of login - if(! $username){ return; } - $userDat = get_user_by('login', $username); - if (!$userDat) { - $userDat = get_user_by('email', $username); - } - - self::$userDat = $userDat; - if(preg_match(self::$passwordCodePattern, $passwd, $matches)){ - $_POST['wordfence_authFactor'] = $matches[1]; - $passwd = preg_replace('/^(.+)\s+wf([a-z0-9 ]+)$/i', '$1', $passwd); - $_POST['pwd'] = $passwd; - } - } - public static function authActionOld($username, $passwd){ //Code is identical to Newer function above except passing by ref ampersand. Some versions of PHP are throwing an error if we include the ampersand in PHP prior to 5.4. - $lockout = wfBlock::lockoutForIP(wfUtils::getIP()); - if ($lockout !== false) { - $lockout->recordBlock(); - $customText = wpautop(wp_strip_all_tags(wfConfig::get('blockCustomText', ''))); - require(dirname(__FILE__) . '/wfLockedOut.php'); - } - - if (isset($_POST['wordfence_twoFactorUser'])) { //Final stage of login -- get and verify 2fa code, make sure we load the appropriate user - $userID = intval($_POST['wordfence_twoFactorUser']); - $twoFactorNonce = preg_replace('/[^a-f0-9]/i', '', $_POST['wordfence_twoFactorNonce']); - if (self::verifyTwoFactorIntermediateValues($userID, $twoFactorNonce)) { - $user = get_user_by('ID', $userID); - $username = $user->user_login; - $passwd = $twoFactorNonce; - self::$userDat = $user; - return; - } - } - - if (is_array($username) || is_array($passwd)) { return; } - - //Intermediate stage of login - if(! $username){ return; } - $userDat = get_user_by('login', $username); - if (!$userDat) { - $userDat = get_user_by('email', $username); - } - - self::$userDat = $userDat; - if(preg_match(self::$passwordCodePattern, $passwd, $matches)){ - $_POST['wordfence_authFactor'] = $matches[1]; - $passwd = preg_replace('/^(.+)\s+wf([a-z0-9 ]+)$/i', '$1', $passwd); - $_POST['pwd'] = $passwd; - } - } - public static function getWPFileContent($file, $cType, $cName, $cVersion){ - if ($cType == 'plugin') { - if (preg_match('#^/?wp-content/plugins/[^/]+/#', $file)) { - $file = preg_replace('#^/?wp-content/plugins/[^/]+/#', '', $file); - } - else { - //If user is using non-standard wp-content dir, then use /plugins/ in pattern to figure out what to strip off - $file = preg_replace('#^.*[^/]+/plugins/[^/]+/#', '', $file); - } - } - else if ($cType == 'theme') { - if (preg_match('#/?wp-content/themes/[^/]+/#', $file)) { - $file = preg_replace('#/?wp-content/themes/[^/]+/#', '', $file); - } - else { - $file = preg_replace('#^.*[^/]+/themes/[^/]+/#', '', $file); - } - } - else if ($cType == 'core') { - //No special processing - } - else { - return array('errorMsg' => __('An invalid type was specified to get file.', 'wordfence')); - } - - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $contResult = $api->binCall('get_wp_file_content', array( - 'v' => wfUtils::getWPVersion(), - 'file' => $file, - 'cType' => $cType, - 'cName' => $cName, - 'cVersion' => $cVersion - )); - if ($contResult['data']) { - return array('fileContent' => $contResult['data']); - } - - throw new Exception(__('We could not fetch a core WordPress file from the Wordfence API.', 'wordfence')); - } - catch (Exception $e) { - return array('errorMsg' => wp_kses($e->getMessage(), array())); - } - } - public static function ajax_sendDiagnostic_callback(){ - add_filter('gettext', 'wordfence::_diagnosticsTranslationDisabler', 0, 3); - $inEmail = true; - $body = "<style>.screen-reader-text{ display: none !important; }</style>This email is the diagnostic from " . site_url() . ".\nThe IP address that requested this was: " . wfUtils::getIP() . "\nTicket Number/Forum Username: " . $_POST['ticket']; - $sendingDiagnosticEmail = true; - ob_start(); - require(dirname(__FILE__) . '/menu_tools_diagnostic.php'); - $body = nl2br($body) . ob_get_clean(); - $findReplace = array( - '<div class="wf-block-header">' => '<div style="margin:20px 0px 0px;padding:6px 4px;background-color:#222;color:#fff;width:926px;">', - '<th ' => '<th style="text-align:left;background-color:#222;color:#fff;"', - '<th>' => '<th style="text-align:left;background-color:#222;color:#fff;">', - ' class="wf-result-success"' => ' style="font-weight:bold;color:#008c10;" class="wf-result-success"', - ' class="wf-result-error"' => ' style="font-weight:bold;color:#d0514c;" class="wf-result-error"', - ' class="wf-result-inactive"' => ' style="font-weight:bold;color:#666666;" class="wf-result-inactive"', - ); - $body = str_replace(array_keys($findReplace), array_values($findReplace), $body); - $result = wfUtils::htmlEmail($_POST['email'], '[Wordfence] Diagnostic results (' . $_POST['ticket'] . ')', $body); - if (function_exists('remove_filter')) { remove_filter('gettext', 'wordfence::_diagnosticsTranslationDisabler', 0); } //Remove for consistency. It's okay if it doesn't pre-4.7.0 since the call exits anyway. - return compact('result'); - } - public static function ajax_exportDiagnostics_callback(){ - add_filter('gettext', 'wordfence::_diagnosticsTranslationDisabler', 0, 3); - - $url = site_url(); - $url = preg_replace('/^https?:\/\//i', '', $url); - $url = preg_replace('/[^a-zA-Z0-9\.]+/', '_', $url); - $url = preg_replace('/^_+/', '', $url); - $url = preg_replace('/_+$/', '', $url); - - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="diagnostics_for_' . $url . '.txt"'); - - echo wfView::create('diagnostics/text', array( - 'diagnostic' => new wfDiagnostic, - 'plugins' => get_plugins(), - )); - exit; - } - public static function _diagnosticsTranslationDisabler($translation, $text, $domain) { - return $text; - } - public static function ajax_sendTestEmail_callback(){ - $rawEmails = explode(",", $_POST['email']); - $emails = array(); - foreach ($rawEmails as $e) { - $e = trim($e); - if (wfUtils::isValidEmail($e)) { - $emails[] = $e; - } - } - $result = false; - if (count($emails)) { - $result = wp_mail(implode(', ', $emails), __('Wordfence Test Email', 'wordfence'), sprintf(/* translators: 1. Site URL. 2. IP address. */ __("This is a test email from %1\$s.\nThe IP address that requested this was: %2\$s", 'wordfence'), site_url(), wfUtils::getIP())); - } - $result = $result ? 'True' : 'False'; - return array('result' => $result); - } - public static function ajax_addTwoFactor_callback(){ - if(! wfConfig::get('isPaid')){ - return array('errorMsg' => __('Cellphone Sign-in is only available to paid members. <a href="https://www.wordfence.com/gnl1twoFac3/wordfence-signup/" target="_blank" rel="noopener noreferrer">Click here to upgrade now.<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence')); - } - $username = sanitize_text_field($_POST['username']); - $phone = sanitize_text_field($_POST['phone']); - $mode = sanitize_text_field($_POST['mode']); - $user = get_user_by('login', $username); - if(! $user){ - return array('errorMsg' => __("The username you specified does not exist.", 'wordfence')); - } - - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if (!is_array($twoFactorUsers)) { - $twoFactorUsers = array(); - } - for ($i = 0; $i < sizeof($twoFactorUsers); $i++) { - if ($twoFactorUsers[$i][0] == $user->ID) { - return array('errorMsg' => __("The username you specified is already enabled.", 'wordfence')); - } - } - - if ($mode != 'phone' && $mode != 'authenticator') { - return array('errorMsg' => __("Unknown authentication mode.", 'wordfence')); - } - - if ($mode == 'phone') { - if (!preg_match('/^\+\d[\d\-\(\)\s]+$/', $phone)) { - return array('errorMsg' => __("The phone number you entered must start with a '+', then country code and then area code and number. For example, a number in the United States with country code '1' would look like this: +1-123-555-1234", 'wordfence')); - } - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactorTOTP_register', array(), array('phone' => $phone, 'mode' => $mode)); - } - catch (Exception $e) { - return array('errorMsg' => sprintf(__("Could not contact Wordfence servers to generate a verification code: %s", 'wordfence'), wp_kses($e->getMessage(), array()))); - } - - $recoveryCodes = preg_replace('/[^a-f0-9]/i', '', $codeResult['recoveryCodes']); - - if (isset($codeResult['ok']) && $codeResult['ok']) { - $secretID = $codeResult['id']; - } - else if (isset($codeResult['errorMsg']) && $codeResult['errorMsg']) { - return array('errorMsg' => wp_kses($codeResult['errorMsg'], array())); - } - else { - wordfence::status(4, 'info', sprintf(__("Could not generate verification code: %s", 'wordfence'), var_export($codeResult, true))); - return array('errorMsg' => __("We could not generate a verification code.", 'wordfence')); - } - self::twoFactorAdd($user->ID, $phone, '', 'phone', $secretID); - return array( - 'ok' => 1, - 'userID' => $user->ID, - 'username' => $username, - 'homeurl' => preg_replace('#.*?//#', '', get_home_url()), - 'mode' => $mode, - 'phone' => $phone, - 'recoveryCodes' => $recoveryCodes, - ); - } - else if ($mode == 'authenticator') { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactorTOTP_register', array(), array('mode' => $mode)); - } - catch (Exception $e) { - return array('errorMsg' => sprintf(/* translators: Error message. */ __("Could not contact Wordfence servers to generate a verification code: %s", 'wordfence'), wp_kses($e->getMessage(), array()))); - } - - /* Expected Fields: - 'ok' => 1, - 'secret' => $secret, - 'base32Secret' => $base32Secret, - 'recoveryCodes' => $codes, - 'uriQueryString' => $uriQueryString, - 'id' => $recordID, - */ - - $secret = preg_replace('/[^a-f0-9]/i', '', $codeResult['secret']); - $base32Secret = preg_replace('/[^a-z2-7]/i', '', $codeResult['base32Secret']); //Encoded in base32 - $recoveryCodes = preg_replace('/[^a-f0-9]/i', '', $codeResult['recoveryCodes']); - $uriQueryString = preg_replace('/[^a-z0-9=&]/i', '', $codeResult['uriQueryString']); - - if (isset($codeResult['ok']) && $codeResult['ok']) { - $secretID = $codeResult['id']; - } - else if (isset($codeResult['errorMsg']) && $codeResult['errorMsg']) { - return array('errorMsg' => wp_kses($codeResult['errorMsg'], array())); - } - else { - wordfence::status(4, 'info', sprintf(/* translators: Error message. */ __("Could not generate verification code: %s", 'wordfence'), var_export($codeResult, true))); - return array('errorMsg' => __("We could not generate a verification code.", 'wordfence')); - } - self::twoFactorAdd($user->ID, '', '', 'authenticator', $secretID); - return array( - 'ok' => 1, - 'userID' => $user->ID, - 'username' => $username, - 'homeurl' => preg_replace('#.*?//#', '', get_home_url()), - 'mode' => $mode, - 'secret' => $secret, - 'base32Secret' => $base32Secret, - 'recoveryCodes' => $recoveryCodes, - 'uriQueryString' => $uriQueryString, - ); - } - - return array('errorMsg' => __("Unknown two-factor authentication mode.", 'wordfence')); - } - public static function ajax_twoFacActivate_callback() { - $userID = sanitize_text_field($_POST['userID']); - $code = sanitize_text_field($_POST['code']); - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if (!is_array($twoFactorUsers)) { - $twoFactorUsers = array(); - } - $found = false; - $user = false; - for ($i = 0; $i < sizeof($twoFactorUsers); $i++) { - if ($twoFactorUsers[$i][0] == $userID) { - $mode = 'phone'; - if (isset($twoFactorUsers[$i][5]) && $twoFactorUsers[$i][5] == 'authenticator') { - $mode = 'authenticator'; - } - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $codeResult = $api->call('twoFactorTOTP_verify', array(), array('totpid' => $twoFactorUsers[$i][6], 'code' => $code, 'mode' => $mode)); - } - catch (Exception $e) { - return array('errorMsg' => sprintf(/* translators: Error message. */ __("Could not contact Wordfence servers to generate a verification code: %s", 'wordfence'), wp_kses($e->getMessage(), array()))); - } - - if (isset($codeResult['ok']) && $codeResult['ok']) { - $twoFactorUsers[$i][3] = 'activated'; - $twoFactorUsers[$i][4] = 0; - $found = true; - $user = $twoFactorUsers[$i]; - break; - } - else { - return array('errorMsg' => __("The code you entered is invalid. Cellphone sign-in will not be enabled for this user until you enter a valid code.", 'wordfence')); - } - } - } - if(! $found){ - return array('errorMsg' => __("We could not find the user you are trying to activate. They may have been removed from the list of Cellphone Sign-in users. Please reload this page.", 'wordfence')); - } - wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); - $WPuser = get_userdata($userID); - if ($mode == 'authenticator') { - return array( - 'ok' => 1, - 'userID' => $userID, - 'username' => $WPuser->user_login, - 'status' => 'activated', - 'mode' => 'authenticator' - ); - } - - return array( - 'ok' => 1, - 'userID' => $userID, - 'username' => $WPuser->user_login, - 'phone' => $user[1], - 'status' => 'activated', - 'mode' => 'phone' - ); - } - private static function twoFactorAdd($ID, $phone, $code, $mode, $totpID){ - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if(! is_array($twoFactorUsers)){ - $twoFactorUsers = array(); - } - for($i = 0; $i < sizeof($twoFactorUsers); $i++){ - if($twoFactorUsers[$i][0] == $ID || (! $twoFactorUsers[$i][0]) ){ - array_splice($twoFactorUsers, $i, 1); - $i--; - } - } - $twoFactorUsers[] = array($ID, $phone, $code /* deprecated parameter */, 'notActivated', time() + (86400 * 30) /* deprecated parameter */, $mode, $totpID); //expiry of code is 30 days in future - wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); - } - public static function ajax_loadTwoFactor_callback() { - $users = wfConfig::get_ser('twoFactorUsers', array()); - $ret = array(); - foreach ($users as $user) { - $WPuser = get_userdata($user[0]); - if ($user) { - if (isset($user[5]) && $user[5] == 'authenticator') { - $ret[] = array( - 'userID' => $user[0], - 'username' => $WPuser->user_login, - 'status' => $user[3], - 'mode' => 'authenticator' - ); - } - else { - $ret[] = array( - 'userID' => $user[0], - 'username' => $WPuser->user_login, - 'phone' => $user[1], - 'status' => $user[3], - 'mode' => 'phone' - ); - } - } - } - return array('ok' => 1, 'users' => $ret); - } - public static function ajax_twoFacDel_callback(){ - $ID = $_POST['userID']; - $twoFactorUsers = wfConfig::get_ser('twoFactorUsers', array()); - if(! is_array($twoFactorUsers)){ - $twoFactorUsers = array(); - } - $deleted = false; - for($i = 0; $i < sizeof($twoFactorUsers); $i++){ - if($twoFactorUsers[$i][0] == $ID){ - array_splice($twoFactorUsers, $i, 1); - $deleted = true; - $i--; - } - } - wfConfig::set_ser('twoFactorUsers', $twoFactorUsers); - if($deleted){ - return array('ok' => 1, 'userID' => $ID); - } else { - return array('errorMsg' => __("That user has already been removed from the list.", 'wordfence')); - } - } - public static function getNextScanStartTimestamp() { - $nextTime = false; - $cron = _get_cron_array(); - foreach($cron as $key => $val){ - if(isset($val['wordfence_start_scheduled_scan'])){ - $nextTime = $key; - break; - } - } - return $nextTime; - } - public static function getNextScanStartTime($nextTime = null) { - if ($nextTime === null) { - $nextTime = self::getNextScanStartTimestamp(); - } - - if (!$nextTime) { - return __('No scan is scheduled', 'wordfence'); - } - - $difference = $nextTime - time(); - if ($difference < 1) { - return __("Next scan is starting now", 'wordfence'); - } - - return sprintf(/* translators: 1. Time until. 2. Localized date. */ __('Next scan in %1$s (%2$s)', 'wordfence'), wfUtils::makeDuration($difference), date_i18n('M j, Y g:i:s A', $nextTime + (3600 * get_option('gmt_offset')))); - } - public static function wordfenceStartScheduledScan($scheduledStartTime) { - - //If scheduled scans are not enabled in the global config option, then don't run a scheduled scan. - if(wfConfig::get('scheduledScansEnabled') != '1'){ - return; - } - - $minimumFrequency = (wfScanner::shared()->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_MANUAL ? 1800 : 43200); - $lastScanStart = wfConfig::get('lastScheduledScanStart', 0); - if($lastScanStart && (time() - $lastScanStart) < $minimumFrequency){ - //A scheduled scan was started in the last 30 mins (manual schedule) or 12 hours (automatic schedule), so skip this one. - return; - } - wfConfig::set('originalScheduledScanStart', $scheduledStartTime); - wfConfig::set('lastScheduledScanStart', time()); - wordfence::status(1, 'info', sprintf(/* translators: Localized date. */ __("Scheduled Wordfence scan starting at %s", 'wordfence'), date('l jS \of F Y h:i:s A', current_time('timestamp'))) ); - - //We call this before the scan actually starts to advance the schedule for the next week. - //This ensures that if the scan crashes for some reason, the schedule will hold. - wfScanner::shared()->scheduleScans(); - - try { - wfScanEngine::startScan(); - } - catch (wfScanEngineTestCallbackFailedException $e) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED); - wfUtils::clearScanLock(); - } - catch (Exception $e) { - if ($e->getCode() != wfScanEngine::SCAN_MANUALLY_KILLED) { - wfConfig::set('lastScanCompleted', $e->getMessage()); - wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_GENERAL); - } - } - } - public static function ajax_saveCountryBlocking_callback(){ - if(! wfConfig::get('isPaid')){ - return array('errorMsg' => __("Sorry but this feature is only available for paid customers.", 'wordfence')); - } - wfConfig::set('cbl_action', $_POST['blockAction']); - wfConfig::set('cbl_countries', $_POST['codes']); - wfConfig::set('cbl_redirURL', $_POST['redirURL']); - wfConfig::set('cbl_loggedInBlocked', $_POST['loggedInBlocked']); - wfConfig::set('cbl_loginFormBlocked', $_POST['loginFormBlocked']); - wfConfig::set('cbl_restOfSiteBlocked', $_POST['restOfSiteBlocked']); - wfConfig::set('cbl_bypassRedirURL', $_POST['bypassRedirURL']); - wfConfig::set('cbl_bypassRedirDest', $_POST['bypassRedirDest']); - wfConfig::set('cbl_bypassViewURL', $_POST['bypassViewURL']); - return array('ok' => 1); - } - public static function ajax_sendActivityLog_callback(){ - $content = sprintf(/* translators: Site URL. */ __('SITE: %s', 'wordfence'), site_url()) . "\n"; - $content .= sprintf(/* translators: Plugin version. */ __('PLUGIN VERSION: %s', 'wordfence'), WORDFENCE_VERSION) . "\n"; - $content .= sprintf(/* translators: WordPress version. */ __('WORDPRESS VERSION: %s', 'wordfence'), wfUtils::getWPVersion()) . "\n"; - $content .= sprintf(/* translators: Wordfence license key. */ __('LICENSE KEY: %s', 'wordfence'), wfConfig::get('apiKey')) . "\n"; - $content .= sprintf(/* translators: Email address. */ __('ADMIN EMAIL: %s', 'wordfence'), get_option('admin_email')) . "\n"; - $content .= __('LOG:', 'wordfence') . "\n\n"; - - $wfdb = new wfDB(); - $table_wfStatus = wfDB::networkTable('wfStatus'); - $q = $wfdb->querySelect("select ctime, level, type, msg from {$table_wfStatus} order by ctime desc limit 10000"); - $timeOffset = 3600 * get_option('gmt_offset'); - foreach($q as $r){ - if($r['type'] == 'error'){ - $content .= "\n"; - } - $content .= date(DATE_RFC822, intval($r['ctime']) + $timeOffset) . '::' . sprintf('%.4f', $r['ctime']) . ':' . $r['level'] . ':' . $r['type'] . '::' . wp_kses_data( (string) $r['msg']) . "\n"; - } - $content .= "\n\n"; - $content .= str_repeat('-', 80); - $content .= "\n\n"; - - $content .= __('# Scan Issues', 'wordfence') . "\n\n"; - $issues = wfIssues::shared()->getIssues(0, 50, 0, 50); - $issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts()); - $issueTypes = wfIssues::validIssueTypes(); - - $content .= sprintf(/* translators: Number of scan results. */ __('## New Issues (%d total)', 'wordfence'), $issueCounts['new']) . "\n\n"; - if (isset($issues['new']) && count($issues['new'])) { - foreach ($issues['new'] as $i) { - if (!in_array($i['type'], $issueTypes)) { - continue; - } - - $viewContent = ''; - try { - $viewContent = wfView::create('scanner/issue-' . $i['type'], array('textOutput' => $i))->render(); - } - catch (wfViewNotFoundException $e) { - //Ignore -- should never happen since we validate the type - } - - if (!empty($viewContent)) { - $content .= $viewContent . "\n\n"; - } - } - } - else { - $content .= __('No New Issues', 'wordfence') . "\n\n"; - } - - $content .= str_repeat('-', 10); - $content .= "\n\n"; - - $content .= sprintf(/* translators: Number of scan results. */ __('## Ignored Issues (%d total)', 'wordfence'), $issueCounts['ignoreP'] + $issueCounts['ignoreC']) . "\n\n"; - if (isset($issues['new']) && count($issues['new'])) { - foreach ($issues['ignored'] as $i) { - if (!in_array($i['type'], $issueTypes)) { - continue; - } - - $viewContent = ''; - try { - $viewContent = wfView::create('scanner/issue-' . $i['type'], array('textOutput' => $i))->render(); - } - catch (wfViewNotFoundException $e) { - //Ignore -- should never happen since we validate the type - } - - if (!empty($viewContent)) { - $content .= $viewContent . "\n\n"; - } - } - } - else { - $content .= __('No Ignored Issues', 'wordfence') . "\n\n"; - } - - $content .= str_repeat('-', 80); - $content .= "\n\n"; - - ob_start(); - if (wfUtils::funcEnabled('phpinfo')) { phpinfo(); } else { echo "\n\n" . __('Unable to output phpinfo content because it is disabled', 'wordfence') . "\n\n"; } - $phpinfo = ob_get_contents(); - ob_get_clean(); - - $content .= $phpinfo; - - $rawEmails = explode(",", $_POST['email']); - $emails = array(); - foreach ($rawEmails as $e) { - $e = trim($e); - if (wfUtils::isValidEmail($e)) { - $emails[] = $e; - } - } - if (count($emails)) { - wp_mail(implode(', ', $emails), __('Wordfence Activity Log', 'wordfence'), $content); - } - return array('ok' => 1); - } - public static function ajax_downgradeLicense_callback(){ - $api = new wfAPI('', wfUtils::getWPVersion()); - try { - $keyData = $api->call('get_anon_api_key', array(), array('previousLicense' => wfConfig::get('apiKey'))); - if($keyData['ok'] && $keyData['apiKey']){ - wfLicense::current()->downgradeToFree($keyData['apiKey'])->save(); - //When downgrading we must disable all two factor authentication because it can lock an admin out if we don't. - wfConfig::set_ser('twoFactorUsers', array()); - wfConfig::remove('premiumAutoRenew'); - wfConfig::remove('premiumNextRenew'); - wfConfig::remove('premiumPaymentExpiring'); - wfConfig::remove('premiumPaymentExpired'); - wfConfig::remove('premiumPaymentMissing'); - wfConfig::remove('premiumPaymentHold'); - self::licenseStatusChanged(); - if (method_exists(wfWAF::getInstance()->getStorageEngine(), 'purgeIPBlocks')) { - wfWAF::getInstance()->getStorageEngine()->purgeIPBlocks(wfWAFStorageInterface::IP_BLOCKS_BLACKLIST); - } - } else { - throw new Exception(__("Could not understand the response we received from the Wordfence servers when applying for a free license key.", 'wordfence')); - } - } catch(Exception $e){ - return array('errorMsg' => sprintf(/* translators: Error message. */ __("Could not fetch free license key from Wordfence: %s", 'wordfence'), wp_kses($e->getMessage(), array()))); - } - return array('ok' => 1); - } - public static function ajax_tourClosed_callback() { - $page = ''; - if (isset($_POST['page'])) { - $page = $_POST['page']; - } - - - $keys = array(wfOnboardingController::TOUR_DASHBOARD, wfOnboardingController::TOUR_FIREWALL, wfOnboardingController::TOUR_SCAN, wfOnboardingController::TOUR_BLOCKING, wfOnboardingController::TOUR_LIVE_TRAFFIC, wfOnboardingController::TOUR_LOGIN_SECURITY); - if (in_array($page, $keys)) { - if (wfOnboardingController::shouldShowNewTour($page)) { - wfConfig::set('needsNewTour_' . $page, 0); - } - else if (wfOnboardingController::shouldShowUpgradeTour($page)) { - wfConfig::set('needsUpgradeTour_' . $page, 0); - } - } - - return array('ok' => 1); - } - public static function ajax_autoUpdateChoice_callback(){ - $choice = $_POST['choice']; - wfConfig::set('autoUpdateChoice', '1'); - if($choice == 'yes'){ - wfConfig::set('autoUpdate', '1'); - } else { - wfConfig::set('autoUpdate', '0'); - } - return array('ok' => 1); - } - public static function ajax_misconfiguredHowGetIPsChoice_callback() { - $choice = $_POST['choice']; - if ($choice == 'yes') { - wfConfig::set('howGetIPs', wfConfig::get('detectProxyRecommendation', '')); - - if (isset($_POST['issueID'])) { - $issueID = intval($_POST['issueID']); - $wfIssues = new wfIssues(); - $wfIssues->updateIssue($issueID, 'delete'); - wfScanEngine::refreshScanNotification($wfIssues); - } - } - else { - wfConfig::set('misconfiguredHowGetIPsChoice' . WORDFENCE_VERSION, '1'); - } - return array('ok' => 1); - } - public static function ajax_switchLiveTrafficSecurityOnlyChoice_callback() { - $choice = $_POST['choice']; - if ($choice == 'yes') { - wfConfig::set('liveTrafficEnabled', false); - } - else { - wfConfig::set('switchLiveTrafficSecurityOnlyChoice', '1'); - } - return array('ok' => 1); - } - public static function ajax_wordfenceSatisfactionChoice_callback() { - wfConfig::set('satisfactionPromptDismissed', time()); - $choice = $_POST['choice']; - if ($choice == 'feedback' && isset($_POST['feedback']) && !empty($_POST['feedback'])) { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $result = $api->call('plugin_feedback', array(), array('feedback' => $_POST['feedback'])); - } - //else -- no additional action for yes/no - return array('ok' => 1); - } - public static function ajax_dismissAdminNotice_callback() { - if (isset($_POST['id'])) { - wfAdminNoticeQueue::removeAdminNotice($_POST['id']); - } - return array('ok' => 1); - } - public static function ajax_hideNoticeForUser_callback() { - if (isset($_POST['id'])) { - self::hideNoticeForUser($_POST['id']); - } - return array('ok' => 1); - } - public static function ajax_updateConfig_callback(){ - $key = $_POST['key']; - $val = $_POST['val']; - wfConfig::set($key, $val); - - if ($key == 'howGetIPs') { - wfConfig::set('detectProxyNextCheck', false, wfConfig::DONT_AUTOLOAD); - $ipAll = wfUtils::getIPPreview(); - $ip = wfUtils::getIP(true); - return array('ok' => 1, 'ip' => $ip, 'ipAll' => $ipAll); - } - - return array('ok' => 1); - } - public static function ajax_checkHtaccess_callback(){ - if(wfUtils::isNginx()){ - return array('nginx' => 1); - } - $file = wfCache::getHtaccessPath(); - if(! $file){ - return array('err' => __("We could not find your .htaccess file to modify it.", 'wordfence')); - } - $fh = @fopen($file, 'r+'); - if(! $fh){ - $err = error_get_last(); - return array('err' => sprintf(/* translators: Error message. */ __("We found your .htaccess file but could not open it for writing: %s", 'wordfence'), $err['message'])); - } - return array('ok' => 1); - } - public static function ajax_downloadHtaccess_callback(){ - $url = site_url(); - $url = preg_replace('/^https?:\/\//i', '', $url); - $url = preg_replace('/[^a-zA-Z0-9\.]+/', '_', $url); - $url = preg_replace('/^_+/', '', $url); - $url = preg_replace('/_+$/', '', $url); - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="htaccess_Backup_for_' . $url . '.txt"'); - $file = wfCache::getHtaccessPath(); - readfile($file); - die(); - } - public static function ajax_downloadLogFile_callback() { - if (!isset($_GET['logfile'])) { - status_header(400); - nocache_headers(); - exit; - } - - wfErrorLogHandler::outputErrorLog(stripslashes($_GET['logfile'])); //exits - } - public static function _blocksAJAXReponse(&$hasCountryBlock = false, $offset = 0, $sortColumn = 'type', $sortDirection = 'ascending', $filter = '') { - $includeAutomatic = wfConfig::get('displayAutomaticBlocks'); - $types = array(); //Empty array is all - if (!$includeAutomatic) { - $types = array(wfBlock::TYPE_IP_MANUAL, wfBlock::TYPE_IP_AUTOMATIC_PERMANENT, wfBlock::TYPE_COUNTRY, wfBlock::TYPE_PATTERN); - } - - if (empty($filter)) { - $blocks = wfBlock::allBlocks(true, $types, $offset, WORDFENCE_BLOCKED_IPS_PER_PAGE, $sortColumn, $sortDirection); - } - else { - $blocks = wfBlock::filteredBlocks(true, $types, $offset, WORDFENCE_BLOCKED_IPS_PER_PAGE, $sortColumn, $sortDirection, $filter); - } - $dateFormat = get_option('date_format') . ' ' . get_option('time_format'); - $hasCountryBlock = wfUtils::array_first(wfBlock::countryBlocks(true)); - if ($hasCountryBlock !== null) { - $hasCountryBlock = json_encode($hasCountryBlock->editValues()); - } - else { - $hasCountryBlock = ''; - } - - $response = array(); - foreach ($blocks as $b) { - $skip = false; - - $entry = array(); - $entry['id'] = $b->id; - $entry['typeSort'] = $b->type; - $entry['typeDisplay'] = esc_html(wfBlock::nameForType($b->type)); - - switch ($b->type) { - case wfBlock::TYPE_IP_MANUAL: - $entry['editType'] = 'ip-address'; - case wfBlock::TYPE_IP_AUTOMATIC_PERMANENT: - $entry['detailSort'] = base64_encode(wfUtils::inet_pton($b->ip)); - $entry['detailDisplay'] = esc_html($b->ip); - break; - case wfBlock::TYPE_IP_AUTOMATIC_TEMPORARY: - case wfBlock::TYPE_WFSN_TEMPORARY: - case wfBlock::TYPE_RATE_BLOCK: - case wfBlock::TYPE_RATE_THROTTLE: - case wfBlock::TYPE_LOCKOUT: - if (!$includeAutomatic) { $skip = true; } - $entry['detailSort'] = base64_encode(wfUtils::inet_pton($b->ip)); - $entry['detailDisplay'] = esc_html($b->ip); - break; - case wfBlock::TYPE_COUNTRY: - require(WORDFENCE_PATH . 'lib/wfBulkCountries.php'); /** @var array $wfBulkCountries */ - ksort($wfBulkCountries); - $countries = $b->countries; - sort($countries); - $entry['editable'] = 1; - $entry['editType'] = 'country'; - $entry['editValues'] = json_encode($b->editValues()); - $entry['detailSort'] = $b->blockLogin . '|' . $b->blockSite . '|' . implode('|', $countries); - $entry['detailDisplay'] = ''; - if ($countries == array_keys($wfBulkCountries)) { - $entry['detailDisplay'] = __('All Countries', 'wordfence'); - } - else if (count($countries) == 1) { - $entry['detailDisplay'] = __('1 Country', 'wordfence'); - } - else { - $entry['detailDisplay'] = sprintf(/* translators: Number of countries. */ __('%d Countries', 'wordfence'), count($countries)); - } - - if ($b->blockLogin && $b->blockSite) { - $entry['detailDisplay'] .= ' (' . __('Entire Site', 'wordfence') . ')'; - } - else if ($b->blockLogin) { - $entry['detailDisplay'] .= ' (' . __('Login Only', 'wordfence') . ')'; - } - else if ($b->blockSite) { - $entry['detailDisplay'] .= ' (' . __('Site Except Login', 'wordfence') . ')'; - } - - break; - case wfBlock::TYPE_PATTERN: - $entry['editType'] = 'custom-pattern'; - $entry['detailSort'] = base64_encode($b->ipRange . '|' . $b->userAgent . '|' . $b->referrer . '|' . $b->hostname); - $components = array(); - if (!empty($b->ipRange)) { $components[] = __('IP Range', 'wordfence') . ' - ' . $b->ipRange; } - if (!empty($b->userAgent)) { $components[] = __('User Agent', 'wordfence') . ' - ' . $b->userAgent; } - if (!empty($b->referrer)) { $components[] = __('Referrer', 'wordfence') . ' - ' . $b->referrer; } - if (!empty($b->hostname)) { $components[] = __('Hostname', 'wordfence') . ' - ' . $b->hostname; } - $entry['detailDisplay'] = esc_html(implode(', ', $components)); - break; - } - - if ($skip) { continue; } - - $entry['ruleAdded'] = $b->blockedTime; - $entry['ruleAddedSort'] = $b->blockedTime; - $entry['ruleAddedDisplay'] = esc_html(wfUtils::formatLocalTime($dateFormat, $b->blockedTime)); - $entry['reasonSort'] = esc_attr($b->reason); - $entry['reasonDisplay'] = esc_html($b->reason); - $entry['expiration'] = $b->expiration; - $entry['expirationSort'] = $b->expiration; - $entry['expirationDisplay'] = ($b->expiration == wfBlock::DURATION_FOREVER ? __('Permanent', 'wordfence') : esc_html(wfUtils::formatLocalTime($dateFormat, $b->expiration))); - $entry['blockCountSort'] = $b->blockedHits; - $entry['blockCountDisplay'] = $b->blockedHits; - $entry['lastAttemptSort'] = $b->lastAttempt; - $entry['lastAttemptDisplay'] = ($b->lastAttempt == 0 ? __('Never', 'wordfence') : esc_html(wfUtils::formatLocalTime($dateFormat, $b->lastAttempt))); - - $response[] = $entry; - } - return $response; - } - public static function ajax_getBlocks_callback() { - $offset = 0; - if (isset($_POST['offset'])) { - $offset = (int) $_POST['offset']; - } - - $sortColumn = 'type'; - if (isset($_POST['sortColumn']) && in_array($_POST['sortColumn'], array('type', 'detail', 'ruleAdded', 'reason', 'expiration', 'blockCount', 'lastAttempt'))) { - $sortColumn = $_POST['sortColumn']; - } - - $sortDirection = 'ascending'; - if (isset($_POST['sortDirection']) && in_array($_POST['sortDirection'], array('ascending', 'descending'))) { - $sortDirection = $_POST['sortDirection']; - } - - $filter = ''; - if (isset($_POST['blocksFilter'])) { - $filter = $_POST['blocksFilter']; - } - - $hasCountryBlock = false; - $blocks = self::_blocksAJAXReponse($hasCountryBlock, $offset, $sortColumn, $sortDirection, $filter); - return array('blocks' => $blocks, 'hasCountryBlock' => $hasCountryBlock); - } - public static function ajax_createBlock_callback() { - $offset = 0; - if (isset($_POST['offset'])) { - $offset = (int) $_POST['offset']; - } - - $sortColumn = 'type'; - if (isset($_POST['sortColumn']) && in_array($_POST['sortColumn'], array('type', 'detail', 'ruleAdded', 'reason', 'expiration', 'blockCount', 'lastAttempt'))) { - $sortColumn = $_POST['sortColumn']; - } - - $sortDirection = 'ascending'; - if (isset($_POST['sortDirection']) && in_array($_POST['sortDirection'], array('ascending', 'descending'))) { - $sortDirection = $_POST['sortDirection']; - } - - $filter = ''; - if (isset($_POST['blocksFilter'])) { - $filter = $_POST['blocksFilter']; - } - - if (!empty($_POST['payload']) && ($payload = json_decode(stripslashes($_POST['payload']), true)) !== false) { - try { - $error = wfBlock::validate($payload); - if ($error !== true) { - return array( - 'error' => $error, - ); - } - - wfBlock::create($payload); - $hasCountryBlock = false; - $blocks = self::_blocksAJAXReponse($hasCountryBlock, $offset, $sortColumn, $sortDirection, $filter); - return array('success' => true, 'blocks' => $blocks, 'hasCountryBlock' => $hasCountryBlock); - } - catch (Exception $e) { - return array( - 'error' => __('An error occurred while creating the block.', 'wordfence'), - ); - } - } - - return array( - 'error' => __('No block parameters were provided.', 'wordfence'), - ); - } - public static function ajax_deleteBlocks_callback() { - $offset = 0; - if (isset($_POST['offset'])) { - $offset = (int) $_POST['offset']; - } - - $sortColumn = 'type'; - if (isset($_POST['sortColumn']) && in_array($_POST['sortColumn'], array('type', 'detail', 'ruleAdded', 'reason', 'expiration', 'blockCount', 'lastAttempt'))) { - $sortColumn = $_POST['sortColumn']; - } - - $sortDirection = 'ascending'; - if (isset($_POST['sortDirection']) && in_array($_POST['sortDirection'], array('ascending', 'descending'))) { - $sortDirection = $_POST['sortDirection']; - } - - $filter = ''; - if (isset($_POST['blocksFilter'])) { - $filter = $_POST['blocksFilter']; - } - - if (!empty($_POST['blocks']) && ($blocks = json_decode(stripslashes($_POST['blocks']), true)) !== false && is_array($blocks)) { - $removed = wfBlock::removeBlockIDs($blocks, true); //wfBlock::removeBlockIDs sanitizes the array - if($removed!==false) { - foreach($removed as $block) { - self::clearLockoutCounters(wfUtils::inet_ntop($block->IP)); - } - } - $hasCountryBlock = false; - $blocks = self::_blocksAJAXReponse($hasCountryBlock, $offset, $sortColumn, $sortDirection, $filter); - return array('success' => true, 'blocks' => $blocks, 'hasCountryBlock' => $hasCountryBlock); - } - - return array( - 'error' => __('No blocks were provided.', 'wordfence'), - ); - } - public static function ajax_makePermanentBlocks_callback() { - $offset = 0; - if (isset($_POST['offset'])) { - $offset = (int) $_POST['offset']; - } - - $sortColumn = 'type'; - if (isset($_POST['sortColumn']) && in_array($_POST['sortColumn'], array('type', 'detail', 'ruleAdded', 'reason', 'expiration', 'blockCount', 'lastAttempt'))) { - $sortColumn = $_POST['sortColumn']; - } - - $sortDirection = 'ascending'; - if (isset($_POST['sortDirection']) && in_array($_POST['sortDirection'], array('ascending', 'descending'))) { - $sortDirection = $_POST['sortDirection']; - } - - $filter = ''; - if (isset($_POST['blocksFilter'])) { - $filter = $_POST['blocksFilter']; - } - - if (!empty($_POST['updates']) && ($updates = json_decode(stripslashes($_POST['updates']), true)) !== false && is_array($updates)) { - wfBlock::makePermanentBlockIDs($updates); //wfBlock::makePermanentBlockIDs sanitizes the array - $hasCountryBlock = false; - $blocks = self::_blocksAJAXReponse($hasCountryBlock, $offset, $sortColumn, $sortDirection, $filter); - return array('success' => true, 'blocks' => $blocks, 'hasCountryBlock' => $hasCountryBlock); - } - - return array( - 'error' => __('No blocks were provided.', 'wordfence'), - ); - } - public static function ajax_installLicense_callback() { - if (!empty($_POST['license'])) { - $statusChange = array_key_exists('status_change', $_POST) ? filter_var($_POST['status_change'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) : null; - $license = strtolower(trim($_POST['license'])); - if (!preg_match('/^[a-fA-F0-9]+$/', $license)) { - return array( - 'error' => __('The license key entered is not in a valid format. It must contain only numbers and the letters A-F.', 'wordfence'), - ); - } - - $existingLicense = strtolower(wfConfig::get('apiKey', '')); - if ($existingLicense != $license) { //Key changed, try activating - $api = new wfAPI($license, wfUtils::getWPVersion()); - try { - $parameters = array(); - if (!empty($existingLicense)) - $parameters['previousLicense'] = $existingLicense; - $res = $api->call('check_api_key', array(), $parameters); - if ($res['ok'] && isset($res['isPaid'])) { - $isPaid = wfUtils::truthyToBoolean($res['isPaid']); - wfConfig::set('apiKey', $license); - wfConfig::set('isPaid', $isPaid); //res['isPaid'] is boolean coming back as JSON and turned back into PHP struct. Assuming JSON to PHP handles bools. - if ($statusChange !== false) { - self::licenseStatusChanged(); - } - if (!$isPaid) { - wfConfig::set('keyType', wfLicense::KEY_TYPE_FREE); - } - self::scheduleCrons(); - return array( - 'success' => 1, - 'isPaid' => wfConfig::get('isPaid') ? 1 : 0, - 'type' => wfLicense::current()->getType() - ); - } - else if (isset($res['_hasKeyConflict']) && $res['_hasKeyConflict']) { - return array( - 'error' => __('The license provided is already in use on another site.', 'wordfence'), - ); - } - else { - return array( - 'error' => __('The Wordfence activation server returned an unexpected response. Please try again.', 'wordfence'), - ); - } - } - catch (Exception $e) { - return array( - 'error' => __('We received an error while trying to activate the license with the Wordfence servers: ', 'wordfence') . wp_kses($e->getMessage(), array()) - ); - } - } - else { - if ($statusChange === true) { - self::licenseStatusChanged(); - } - return array( - 'success' => 1, - 'isPaid' => wfConfig::get('isPaid') ? 1 : 0, - 'type' => wfLicense::current()->getType() - ); - } - } - - return array( - 'error' => __('No license was provided to install.', 'wordfence'), - ); - } - public static function ajax_recordTOUPP_callback() { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $result = $api->call('record_toupp', array(), array()); - wfConfig::set('touppBypassNextCheck', 1); //In case this call kicks off the cron that checks, this avoids the race condition of that setting the prompt as being needed at the same time we've just recorded it as accepted - wfConfig::set('touppPromptNeeded', 0); - return array( - 'success' => 1, - ); - } - public static function ajax_mailingSignup_callback() { - if (isset($_POST['emails'])) { - $emails = @json_decode(stripslashes($_POST['emails']), true); - if (is_array($emails) && count($emails)) { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $result = $api->call('mailing_signup', array(), array('signup' => json_encode(array('emails' => $emails)), 'ip' => wfUtils::getIP())); - } - } - - return array( - 'success' => 1, - ); - } - public static function ajax_enableAllOptionsPage_callback() { - wfConfig::set('displayTopLevelOptions', 1); - $n = wfNotification::getNotificationForCategory('wfplugin_devalloptions'); - if ($n !== null) { - $n->markAsRead(); - } - - $response = array('success' => true); - if (function_exists('network_admin_url') && is_multisite()) { - $response['redirect'] = network_admin_url('admin.php?page=WordfenceOptions'); - } - else { - $response['redirect'] = admin_url('admin.php?page=WordfenceOptions'); - } - - return $response; - } - public static function ajax_restoreDefaults_callback() { - if (!empty($_POST['section'])) { - if (wfConfig::restoreDefaults($_POST['section'])) { - return array( - 'success' => true, - ); - } - else { - return array( - 'error' => __('An unknown configuration section was provided.', 'wordfence'), - ); - } - } - - return array( - 'error' => __('No configuration section was provided.', 'wordfence'), - ); - } - public static function ajax_saveOptions_callback() { - if (!empty($_POST['changes']) && ($changes = json_decode(stripslashes($_POST['changes']), true)) !== false) { - try { - $errors = wfConfig::validate($changes); - if ($errors !== true) { - if (count($errors) == 1) { - return array( - 'error' => sprintf(/* translators: Error message. */ __('An error occurred while saving the configuration: %s', 'wordfence'), $errors[0]['error']), - ); - } - else if (count($errors) > 1) { - $compoundMessage = array(); - foreach ($errors as $e) { - $compoundMessage[] = $e['error']; - } - return array( - 'error' => sprintf(/* translators: Error message. */ __('Errors occurred while saving the configuration: %s', 'wordfence'), implode(', ', $compoundMessage)), - ); - } - - return array( - 'error' => __('Errors occurred while saving the configuration.', 'wordfence'), - ); - } - - wfConfig::save(wfConfig::clean($changes)); - - $response = array('success' => true); - if (!empty($_POST['page']) && preg_match('/^Wordfence/i', $_POST['page'])) { - if ($_POST['page'] == 'WordfenceOptions' && isset($changes['displayTopLevelOptions']) && !wfUtils::truthyToBoolean($changes['displayTopLevelOptions'])) { - if (function_exists('network_admin_url') && is_multisite()) { - $response['redirect'] = network_admin_url('admin.php?page=Wordfence'); - } - else { - $response['redirect'] = admin_url('admin.php?page=Wordfence'); - } - } - } - - return $response; - } - catch (wfWAFStorageFileException $e) { - return array( - 'error' => __('An error occurred while saving the configuration.', 'wordfence'), - ); - } - catch (wfWAFStorageEngineMySQLiException $e) { - return array( - 'error' => __('An error occurred while saving the configuration.', 'wordfence'), - ); - } - catch (Exception $e) { - return array( - 'error' => $e->getMessage(), - ); - } - } - - return array( - 'error' => __('No configuration changes were provided to save.', 'wordfence'), - ); - } - - public static function ajax_setDeactivationOption_callback() { - $key = array_key_exists('option', $_POST) ? $_POST['option'] : null; - $option = wfDeactivationOption::forKey($key); - if ($option === null) { - return array( - 'error' => __('Invalid option specified', 'wordfence') - ); - } - wfConfig::set('deleteTablesOnDeact', $option->deletesMain()); - \WordfenceLS\Controller_Settings::shared()->set('delete-deactivation', $option->deletesLoginSecurity()); - return array( - 'success' => true - ); - } - - public static function ajax_updateIPPreview_callback() { - $howGet = $_POST['howGetIPs']; - - $validIPs = array(); - $invalidIPs = array(); - $testIPs = preg_split('/[\r\n,]+/', $_POST['howGetIPs_trusted_proxies']); - foreach ($testIPs as $val) { - if (strlen($val) > 0) { - if (wfUtils::isValidIP($val) || wfUtils::isValidCIDRRange($val)) { - $validIPs[] = $val; - } - else { - $invalidIPs[] = $val; - } - } - } - $trustedProxies = $validIPs; - - $preset = $_POST['howGetIPs_trusted_proxy_preset']; - $presets = wfConfig::getJSON('ipResolutionList', array()); - if (is_array($presets) && isset($presets[$preset])) { - $testIPs = array_merge($presets[$preset]['ipv4'], $presets[$preset]['ipv6']); - foreach ($testIPs as $val) { - if (strlen($val) > 0) { - if (wfUtils::isValidIP($val) || wfUtils::isValidCIDRRange($val)) { - $trustedProxies[] = $val; - } - } - } - } - - $ipAll = wfUtils::getIPPreview($howGet, $trustedProxies); - $ip = wfUtils::getIPForField($howGet, $trustedProxies); - return array('ok' => 1, 'ip' => $ip, 'ipAll' => $ipAll, 'resolvedProxies' => $trustedProxies); - } - - public static function ajax_hideFileHtaccess_callback(){ - $issues = new wfIssues(); - $issue = $issues->getIssueByID((int) $_POST['issueID']); - if (!$issue) { - return array('errorMsg' => __("We could not find that issue in our database.", 'wordfence')); - } - - if (!function_exists('get_home_path')) { - include_once(ABSPATH . 'wp-admin/includes/file.php'); - } - - $homeURL = get_home_url(); - $components = parse_url($homeURL); - if ($components === false) { - return array('errorMsg' => __("An error occurred while trying to hide the file.", 'wordfence')); - } - - $sitePath = ''; - if (isset($components['path'])) { - $sitePath = trim($components['path'], '/'); - } - - $homePath = wfUtils::getHomePath(); - $file = $issue['data']['file']; - $localFile = ABSPATH . '/' . $file; //The scanner uses ABSPATH as its base rather than get_home_path() - $localFile = realpath($localFile); - if (strpos($localFile, $homePath) !== 0) { - return array('errorMsg' => __("An invalid file was requested for hiding.", 'wordfence')); - } - $localFile = substr($localFile, strlen($homePath)); - $absoluteURIPath = trim($sitePath . '/' . $localFile, '/'); - $regexLocalFile = preg_replace('#/#', '/+', preg_quote($absoluteURIPath)); - $filename = basename($localFile); - - $htaccessContent = <<<HTACCESS -<IfModule mod_rewrite.c> - RewriteEngine On - RewriteCond %{REQUEST_URI} ^/?{$regexLocalFile}$ - RewriteRule .* - [F,L,NC] -</IfModule> -<IfModule !mod_rewrite.c> - <Files "{$filename}"> - <IfModule mod_authz_core.c> - Require all denied - </IfModule> - <IfModule !mod_authz_core.c> - Order deny,allow - Deny from all - </IfModule> - </Files> -</IfModule> -HTACCESS; - - if (!wfUtils::htaccessPrepend($htaccessContent)) { - return array('errorMsg' => __("You don't have permission to repair .htaccess. You need to either fix the file manually using FTP or change the file permissions and ownership so that your web server has write access to repair the file.", 'wordfence')); - } - $issues->updateIssue((int) $_POST['issueID'], 'delete'); - wfScanEngine::refreshScanNotification($issues); - $counts = $issues->getIssueCounts(); - return array( - 'ok' => 1, - 'issueCounts' => $counts, - ); - } - public static function ajax_unlockOutIP_callback(){ - $IP = $_POST['IP']; - wfBlock::unlockOutIP($IP); - self::clearLockoutCounters($IP); - return array('ok' => 1); - } - public static function ajax_unblockIP_callback(){ - $IP = $_POST['IP']; - wfBlock::unblockIP($IP); - self::clearLockoutCounters($IP); - return array('ok' => 1); - } - public static function ajax_permBlockIP_callback(){ - $IP = $_POST['IP']; - wfBlock::createIP(__('Manual permanent block by admin', 'wordfence'), $IP, wfBlock::DURATION_FOREVER, time(), false, 0, wfBlock::TYPE_IP_MANUAL); - return array('ok' => 1); - } - public static function ajax_unblockRange_callback(){ - $id = trim($_POST['id']); - wfBlock::removeBlockIDs(array($id)); - return array('ok' => 1); - } - - public static function ajax_whois_callback(){ - $val = trim($_POST['val']); - $val = preg_replace('/[^a-zA-Z0-9\.\-:]+/', '', $val); - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - try { - $result = $api->call('whois', array(), array( - 'val' => $val, - )); - return array('ok' => 1, 'result' => $result['result']); - } - catch (wfAPICallErrorResponseException $e) { - return array('ok' => 0); - } - } - public static function ajax_recentTraffic_callback(){ - $ip = trim($_POST['ip']); - try { - $response = self::IPTraf($ip); - $reverseLookup = $response['reverseLookup']; - $results = $response['results']; - ob_start(); - require(dirname(__FILE__) . '/IPTrafList.php'); - $content = ob_get_clean(); - return array('ok' => 1, 'result' => $content); - } catch (InvalidArgumentException $e) { - return array('errorMsg' => $e->getMessage()); - } - } - public static function ajax_blockIP_callback() { - $IP = trim($_POST['IP']); - $perm = (isset($_POST['perm']) && $_POST['perm'] == '1') ? wfBlock::DURATION_FOREVER : wfConfig::getInt('blockedTime'); - if (!wfUtils::isValidIP($IP)) { - return array('err' => 1, 'errorMsg' => __("Please enter a valid IP address to block.", 'wordfence')); - } - if ($IP == wfUtils::getIP()) { - return array('err' => 1, 'errorMsg' => __("You can't block your own IP address.", 'wordfence')); - } - $forcedWhitelistEntry = false; - if (wfBlock::isWhitelisted($IP, $forcedWhitelistEntry)) { - $message = sprintf(/* translators: IP address. */ __("The IP address %s is allowlisted and can't be blocked. You can remove this IP from the allowlist on the Wordfence options page.", 'wordfence'), wp_kses($IP, array())); - if ($forcedWhitelistEntry) { - $message = sprintf(/* translators: IP address. */ __("The IP address %s is in a range of IP addresses that Wordfence does not block. The IP range may be internal or belong to a service safe to allow access for.", 'wordfence'), wp_kses($IP, array())); - } - return array('err' => 1, 'errorMsg' => $message); - } - if (wfConfig::get('neverBlockBG') != 'treatAsOtherCrawlers') { //Either neverBlockVerified or neverBlockUA is selected which means the user doesn't want to block google - if (wfCrawl::isVerifiedGoogleCrawler($IP)) { - return array('err' => 1, 'errorMsg' => __("The IP address you're trying to block belongs to Google. Your options are currently set to not block these crawlers. Change this in Wordfence options if you want to manually block Google.", 'wordfence')); - } - } - wfBlock::createIP($_POST['reason'], $IP, $perm); - wfActivityReport::logBlockedIP($IP, null, 'manual'); - return array('ok' => 1); - } - public static function ajax_avatarLookup_callback() { - $ids = explode(',', $_POST['ids']); - $res = array(); - foreach ($ids as $id) { - $avatar = get_avatar($id, 16); - if ($avatar) { - $res[$id] = $avatar; - } - } - return array('ok' => 1, 'avatars' => $res); - } - public static function ajax_reverseLookup_callback(){ - $ips = explode(',', $_POST['ips']); - $res = array(); - foreach($ips as $ip){ - $res[$ip] = wfUtils::reverseLookup($ip); - } - return array('ok' => 1, 'ips' => $res); - } - public static function ajax_deleteIssue_callback(){ - $wfIssues = new wfIssues(); - $issueID = $_POST['id']; - $wfIssues->deleteIssue($issueID); - wfScanEngine::refreshScanNotification($wfIssues); - return array('ok' => 1); - } - public static function ajax_updateAllIssues_callback(){ - $op = $_POST['op']; - $i = new wfIssues(); - if($op == 'deleteIgnored'){ - $i->deleteIgnored(); - } else if($op == 'deleteNew'){ - $i->deleteNew(); - } else if($op == 'ignoreAllNew'){ - $i->ignoreAllNew(); - } else { - return array('errorMsg' => __("An invalid operation was called.", 'wordfence')); - } - wfScanEngine::refreshScanNotification($i); - return array('ok' => 1); - } - public static function ajax_updateIssueStatus_callback(){ - $wfIssues = new wfIssues(); - $status = $_POST['status']; - $issueID = $_POST['id']; - if(! preg_match('/^(?:new|delete|ignoreP|ignoreC)$/', $status)){ - return array('errorMsg' => __("An invalid status was specified when trying to update that issue.", 'wordfence')); - } - $wfIssues->updateIssue($issueID, $status); - wfScanEngine::refreshScanNotification($wfIssues); - - $counts = $wfIssues->getIssueCounts(); - return array( - 'ok' => 1, - 'issueCounts' => $counts, - ); - } - public static function ajax_killScan_callback(){ - wordfence::status(1, 'info', __("Scan stop request received.", 'wordfence')); - wordfence::status(10, 'info', 'SUM_KILLED:' . __("A request was received to stop the previous scan.", 'wordfence')); - wfUtils::clearScanLock(); //Clear the lock now because there may not be a scan running to pick up the kill request and clear the lock - wfScanEngine::requestKill(); - wfConfig::remove('scanStartAttempt'); - wfConfig::set('lastScanFailureType', false); - return array( - 'ok' => 1, - ); - } - public static function ajax_loadIssues_callback(){ - $offset = isset($_POST['offset']) ? intval($_POST['offset']) : 0; - $limit = isset($_POST['limit']) ? intval($_POST['limit']) : WORDFENCE_SCAN_ISSUES_PER_PAGE; - $ignoredOffset = isset($_POST['ignoredOffset']) ? intval($_POST['ignoredOffset']) : 0; - $ignoredLimit = isset($_POST['ignoredLimit']) ? intval($_POST['ignoredLimit']) : WORDFENCE_SCAN_ISSUES_PER_PAGE; - - $issues = wfIssues::shared()->getIssues($offset, $limit, $ignoredOffset, $ignoredLimit); - $issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts()); - - return array( - 'issues' => $issues, - 'issueCounts' => $issueCounts, - ); - } - public static function ajax_ticker_callback() { - $wfdb = new wfDB(); - $table_wfStatus = wfDB::networkTable('wfStatus'); - $serverTime = $wfdb->querySingle("select unix_timestamp()"); - $jsonData = array( - 'serverTime' => $serverTime, - 'serverMicrotime' => microtime(true), - 'msg' => wp_kses_data((string) $wfdb->querySingle("SELECT msg FROM {$table_wfStatus} WHERE level < 3 AND ctime > (UNIX_TIMESTAMP() - 3600) ORDER BY ctime DESC LIMIT 1")), - ); - $events = array(); - if (get_site_option('wordfence_syncAttackDataAttempts') > 10) { - self::syncAttackData(false); - } - $results = self::ajax_loadLiveTraffic_callback(); - $events = $results['data']; - if (isset($results['sql'])) { - $jsonData['sql'] = $results['sql']; - } - - $jsonData['events'] = $events; - return $jsonData; - } - public static function ajax_activityLogUpdate_callback() { - global $wpdb; - $statusTable = wfDB::networkTable('wfStatus'); - $row = $wpdb->get_row("SELECT ctime, msg FROM {$statusTable} WHERE level < 3 AND ctime > (UNIX_TIMESTAMP() - 3600) ORDER BY ctime DESC LIMIT 1", ARRAY_A); - $lastMessage = __('Idle', 'wordfence'); - - $lastScanCompleted = wfConfig::get('lastScanCompleted'); - if ($row) { - $lastMessage = '[' . strtoupper(wfUtils::formatLocalTime('M d H:i:s', $row['ctime'])) . '] ' . wp_kses_data($row['msg']); - } - else if ($lastScanCompleted == 'ok') { - $scanLastCompletion = (int) wfScanner::shared()->lastScanTime(); - if ($scanLastCompletion) { - $lastMessage = sprintf(/* translators: Localized date. */ __('Scan completed on %s', 'wordfence'), wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), $scanLastCompletion)); - } - } - else if ($lastScanCompleted === false || empty($lastScanCompleted)) { - //Do nothing - } - else { - $lastMessage = __('Last scan failed', 'wordfence'); - } - - $issues = wfIssues::shared(); - $scanFailed = $issues->hasScanFailed(); - - $scanner = wfScanner::shared(); - $stages = $scanner->stageStatus(); - foreach ($stages as $key => &$value) { - switch ($value) { - case wfScanner::STATUS_PENDING: - $value = 'wf-scan-step'; - break; - case wfScanner::STATUS_RUNNING: - case wfScanner::STATUS_RUNNING_WARNING: - if ($scanFailed) { - $value = 'wf-scan-step'; - break; - } - $value = 'wf-scan-step wf-scan-step-running'; - break; - case wfScanner::STATUS_COMPLETE_SUCCESS: - $value = 'wf-scan-step wf-scan-step-complete-success'; - break; - case wfScanner::STATUS_COMPLETE_WARNING: - $value = 'wf-scan-step wf-scan-step-complete-warning'; - break; - case wfScanner::STATUS_PREMIUM: - $value = 'wf-scan-step wf-scan-step-premium'; - break; - case wfScanner::STATUS_DISABLED: - $value = 'wf-scan-step wf-scan-step-disabled'; - break; - } - } - - $stats = array( - 'wf-scan-results-stats-postscommentsfiles' => $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0), - 'wf-scan-results-stats-themesplugins' => $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0) + $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0), - 'wf-scan-results-stats-users' => $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_USERS, 0), - 'wf-scan-results-stats-urls' => $scanner->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0), - 'wf-scan-results-stats-issues' => $issues->getIssueCount(), - ); - - $lastIssueUpdateTimestamp = wfIssues::shared()->getLastIssueUpdateTimestamp(); - $issues = 0; - $issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts()); - if ($lastIssueUpdateTimestamp > $_POST['lastissuetime']) { - $issues = wfIssues::shared()->getIssues(0, WORDFENCE_SCAN_ISSUES_PER_PAGE, 0, WORDFENCE_SCAN_ISSUES_PER_PAGE); - } - - $timeLimit = intval(wfConfig::get('scan_maxDuration')); - if ($timeLimit < 1) { - $timeLimit = WORDFENCE_DEFAULT_MAX_SCAN_TIME; - } - - $scanFailedHTML = ''; - switch ($scanFailed) { - case wfIssues::SCAN_FAILED_TIMEOUT: - $scanFailedSeconds = time() - wfIssues::lastScanStatusUpdate(); - $scanFailedTiming = wfUtils::makeTimeAgo($scanFailedSeconds); - - if ($scanFailedSeconds > $timeLimit) { - $scanFailedTiming = sprintf(/* translators: Time until. */ __('more than %s', 'wordfence'), wfUtils::makeTimeAgo($timeLimit)); - } - - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => sprintf(/* translators: Localized date. */ __('The current scan looks like it has failed. Its last status update was <span id="wf-scan-failed-time-ago">%s</span> ago. You may continue to wait in case it resumes or stop and restart the scan. Some sites may need adjustments to run scans reliably.', 'wordfence'), $scanFailedTiming) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_FAILS) . '" target="_blank" rel="noopener noreferrer">' . __('Click here for steps you can try.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', - 'buttonTitle' => __('Cancel Scan', 'wordfence'), - ))->render(); - - break; - case wfIssues::SCAN_FAILED_FORK_FAILED: - case wfIssues::SCAN_FAILED_GENERAL: - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => __('The previous scan has failed. Some sites may need adjustments to run scans reliably.', 'wordfence') . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_FAILS) . '" target="_blank" rel="noopener noreferrer">' . __('Click here for steps you can try.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - case wfIssues::SCAN_FAILED_DURATION_REACHED: - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => sprintf(/* translators: Time limit (number). */ __('The previous scan has terminated because the time limit of %s was reached. This limit can be customized on the options page.', 'wordfence'), wfUtils::makeDuration($timeLimit)) . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_OPTION_OVERALL_TIME_LIMIT) . '" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - case wfIssues::SCAN_FAILED_VERSION_CHANGE: - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => esc_html__('The previous scan has terminated because we detected an update occurring during the scan.', 'wordfence'), - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - case wfIssues::SCAN_FAILED_START_TIMEOUT: - case wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED: - $resumeAttempts = wfScanMonitor::getConfiguredResumeAttempts(); - if ($resumeAttempts > 0) { - if ($resumeAttempts === 1) - $resumeMessage = __('Wordfence will make one attempt to resume each failed scan stage. This scan may recover if this attempt is successful.', 'wordfence'); - else - $resumeMessage = sprintf(__('Wordfence will make up to %d attempts to resume each failed scan stage. This scan may recover if one of these attempts is successful.', 'wordfence'), $resumeAttempts); - $resumeMessage = " {$resumeMessage} "; - } - else { - $resumeMessage = ''; - } - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageTitle' => __('Scan Stage Failed', 'wordfence'), - 'messageHTML' => __('A scan stage has failed to start. This is often because the site either cannot make outbound requests or is blocked from connecting to itself.', 'wordfence') . $resumeMessage . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_FAILED_START) . '" target="_blank" rel="noopener noreferrer">' . __('Click here for steps you can try.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - case wfIssues::SCAN_FAILED_API_SSL_UNAVAILABLE: - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => esc_html__('Scans are not functional because SSL is unavailable.', 'wordfence'), - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - case wfIssues::SCAN_FAILED_API_CALL_FAILED: - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => __('The scan has failed because we were unable to contact the Wordfence servers. Some sites may need adjustments to run scans reliably.', 'wordfence') . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_FAILS) . '" target="_blank" rel="noopener noreferrer">' . __('Click here for steps you can try.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', - 'rawErrorHTML' => esc_html(wfConfig::get('lastScanCompleted', '')), - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - case wfIssues::SCAN_FAILED_API_INVALID_RESPONSE: - case wfIssues::SCAN_FAILED_API_ERROR_RESPONSE: - $scanFailedHTML = wfView::create('scanner/scan-failed', array( - 'messageHTML' => __('The scan has failed because we received an unexpected response from the Wordfence servers. This may be a temporary error, though some sites may need adjustments to run scans reliably.', 'wordfence') . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_FAILS) . '" target="_blank" rel="noopener noreferrer">' . __('Click here for steps you can try.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', - 'rawErrorHTML' => esc_html(wfConfig::get('lastScanCompleted'), ''), - 'buttonTitle' => __('Close', 'wordfence'), - ))->render(); - break; - } - - wfUtils::doNotCache(); - return array( - 'ok' => 1, - 'lastMessage' => $lastMessage, - 'items' => self::getLog()->getStatusEvents($_POST['lastctime']), - 'currentScanID' => wfScanner::shared()->lastScanTime(), - 'signatureUpdateTime' => wfConfig::get('signatureUpdateTime'), - 'scanFailedHTML' => $scanFailedHTML, - 'scanStalled' => ($scanFailed == wfIssues::SCAN_FAILED_TIMEOUT || $scanFailed == wfIssues::SCAN_FAILED_START_TIMEOUT ? 1 : 0), - 'scanRunning' => wfScanner::shared()->isRunning() ? 1 : 0, - 'scanStages' => $stages, - 'scanStats' => $stats, - 'issues' => $issues, - 'issueCounts' => $issueCounts, - 'issueUpdateTimestamp'=> $lastIssueUpdateTimestamp, - ); - } - public static function ajax_updateAlertEmail_callback(){ - $email = trim($_POST['email']); - if(! preg_match('/[^\@]+\@[^\.]+\.[^\.]+/', $email) || in_array(hash('sha256', $email), wfConfig::alertEmailBlacklist())){ - return array( 'err' => __("Invalid email address given.", 'wordfence')); - } - wfConfig::set('alertEmails', $email); - return array('ok' => 1, 'email' => $email); - } - private static function resolveLocalFile($issue) { - $data = $issue['data']; - if (array_key_exists('realFile', $data)) { - return $data['realFile']; - } - else { - $file = $issue['data']['file']; - $localFile = ABSPATH . '/' . $file; - $localFile = realpath($localFile); - if (strpos($localFile, ABSPATH) !== 0) { - return null; - } - return $localFile; - } - } - public static function ajax_bulkOperation_callback() { - $op = sanitize_text_field($_POST['op']); - if ($op == 'del' || $op == 'repair') { - $idsRemoved = array(); - $filesWorkedOn = 0; - $errors = array(); - $wfIssues = new wfIssues(); - $issueCount = $wfIssues->getIssueCount(); - for ($offset = floor($issueCount / 100) * 100; $offset >= 0; $offset -= 100) { - $issues = $wfIssues->getIssues($offset, 100, 0, 0); - foreach ($issues['new'] as $i) { - if ($op == 'del' && @$i['data']['canDelete']) { - $file = $i['data']['file']; - $localFile = self::resolveLocalFile($i); - if ($localFile === null) - continue; - if ($localFile === ABSPATH . 'wp-config.php') { - $errors[] = esc_html__('Deleting an infected wp-config.php file must be done outside of Wordfence. The wp-config.php file contains your database credentials, which you will need to restore normal site operations. Your site will NOT function once the wp-config.php file has been deleted.', 'wordfence'); - } - else if (@unlink($localFile)) { - $wfIssues->updateIssue($i['id'], 'delete'); - $idsRemoved[] = $i['id']; - $filesWorkedOn++; - } - else { - $err = error_get_last(); - $errors[] = esc_html(sprintf(/* translators: 1. File path. 2. Error message. */ __('Could not delete file %1$s. Error was: %2$s', 'wordfence'), wp_kses($file, array()), wp_kses(str_replace(ABSPATH, '{WordPress Root}/', $err['message']), array()))); - } - } - else if ($op == 'repair' && @$i['data']['canFix']) { - $file = $i['data']['file']; - $localFile = self::resolveLocalFile($i); - if ($localFile === null) - continue; - $result = array(); - if (isset($i['data']) && is_array($i['data']) && isset($i['data']['file']) && isset($i['data']['cType']) && ( //Basics - $i['data']['cType'] == 'core' || //Core file - ($i['data']['cType'] == 'plugin' || $i['data']['cType'] == 'theme') && isset($i['data']['cName']) && isset($i['data']['cVersion']) //Plugin or Theme file - )) { - $result = self::getWPFileContent($i['data']['file'], $i['data']['cType'], isset($i['data']['cName']) ? $i['data']['cName'] : null, isset($i['data']['cVersion']) ? $i['data']['cVersion'] : null); - } - - if (is_array($result) && isset($result['errorMsg'])) { - $errors[] = esc_html($result['errorMsg']); - continue; - } - else if (!is_array($result) || !isset($result['fileContent'])) { - $errors[] = esc_html(sprintf(/* translators: File path. */ __('We could not retrieve the original file of %s to do a repair.', 'wordfence'), wp_kses($file, array()))); - continue; - } - - if (preg_match('/\.\./', $file)) { - $errors[] = sprintf(/* translators: File path. */ __('An invalid file %s was specified for repair.', 'wordfence'), wp_kses($file, array())); - continue; - } - - $fh = fopen($localFile, 'w'); - if (!$fh) { - $err = error_get_last(); - if (preg_match('/Permission denied/i', $err['message'])) { - $errMsg = esc_html(sprintf(/* translators: File path. */ __('You don\'t have permission to repair %s. You need to either fix the file manually using FTP or change the file permissions and ownership so that your web server has write access to repair the file.', 'wordfence'), wp_kses($file, array()))); - } - else { - $errMsg = esc_html(sprintf(/* translators: 1. File path. 2. Error message. */ __('We could not write to %1$s. The error was: %2$s', 'wordfence'), wp_kses($file, array()), $err['message'])); - } - $errors[] = $errMsg; - continue; - } - - flock($fh, LOCK_EX); - $bytes = fwrite($fh, $result['fileContent']); - flock($fh, LOCK_UN); - fclose($fh); - if ($bytes < 1) { - $errors[] = esc_html(sprintf(/* translators: 1. File path. 2. Number of bytes. */ __('We could not write to %1$s. (%2$d bytes written) You may not have permission to modify files on your WordPress server.', 'wordfence'), wp_kses($file, array()), $bytes)); - continue; - } - - $filesWorkedOn++; - $wfIssues->updateIssue($i['id'], 'delete'); - $idsRemoved[] = $i['id']; - } - } - } - - if ($filesWorkedOn > 0 && count($errors) > 0) { - $headMsg = esc_html($op == 'del' ? __('Deleted some files with errors', 'wordfence') : __('Repaired some files with errors', 'wordfence')); - $bodyMsg = sprintf(esc_html($op == 'del' ? - /* translators: 1. Number of files. 2. Error message. */ - __('Deleted %1$d files but we encountered the following errors with other files: %2$s', 'wordfence') : - /* translators: 1. Number of files. 2. Error message. */ - __('Repaired %1$d files but we encountered the following errors with other files: %2$s', 'wordfence')), - $filesWorkedOn, implode('<br>', $errors)); - } - else if ($filesWorkedOn > 0) { - $headMsg = sprintf(esc_html($op == 'del' ? /* translators: Number of files. */ __('Deleted %d files successfully', 'wordfence') : /* translators: Number of files. */ __('Repaired %d files successfully', 'wordfence')), $filesWorkedOn); - $bodyMsg = sprintf(esc_html($op == 'del' ? /* translators: Number of files. */ __('Deleted %d files successfully. No errors were encountered.', 'wordfence') : /* translators: Number of files. */ __('Repaired %d files successfully. No errors were encountered.', 'wordfence')), $filesWorkedOn); - } - else if (count($errors) > 0) { - $headMsg = esc_html($op == 'del' ? __('Could not delete files', 'wordfence') : __('Could not repair files', 'wordfence')); - $bodyMsg = sprintf(esc_html($op == 'del' ? - /* translators: Error message. */ - __('We could not delete any of the files you selected. We encountered the following errors: %s', 'wordfence') : - /* translators: Error message. */ - __('We could not repair any of the files you selected. We encountered the following errors: %s', 'wordfence')), implode('<br>', $errors)); - } - else { - $headMsg = esc_html__('Nothing done', 'wordfence'); - $bodyMsg = esc_html($op == 'del' ? __('We didn\'t delete anything and no errors were found.', 'wordfence') : __('We didn\'t repair anything and no errors were found.', 'wordfence')); - } - - wfScanEngine::refreshScanNotification($wfIssues); - $counts = $wfIssues->getIssueCounts(); - return array('ok' => 1, 'bulkHeading' => $headMsg, 'bulkBody' => $bodyMsg, 'idsRemoved' => $idsRemoved, 'issueCounts' => $counts); - } - else { - return array('errorMsg' => esc_html__('Invalid bulk operation selected', 'wordfence')); - } - } - public static function ajax_deleteFile_callback($issueID = null){ - if ($issueID === null) { - $issueID = intval($_POST['issueID']); - } - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if(! $issue){ - return array('errorMsg' => __('Could not delete file because we could not find that issue.', 'wordfence')); - } - if(! $issue['data']['file']){ - return array('errorMsg' => __('Could not delete file because that issue does not appear to be a file related issue.', 'wordfence')); - } - $file = $issue['data']['file']; - $localFile = self::resolveLocalFile($issue); - if($localFile === null){ - return array('errorMsg' => __('An invalid file was requested for deletion.', 'wordfence')); - } - if ($file === 'wp-config.php') { - return array( - 'errorMsg' => __('Deleting an infected wp-config.php file must be done outside of Wordfence. The wp-config.php file contains your database credentials, which you will need to restore normal site operations. Your site will NOT function once the wp-config.php file has been deleted.', 'wordfence') - ); - } - - /** @var WP_Filesystem_Base $wp_filesystem */ - global $wp_filesystem; - - $adminURL = network_admin_url('admin.php?' . http_build_query(array( - 'page' => 'WordfenceScan', - 'subpage' => 'scan_credentials', - 'action' => 'deleteFile', - 'issueID' => $issueID, - 'nonce' => wp_create_nonce('wp-ajax'), - ))); - - if (!self::requestFilesystemCredentials($adminURL, null, true, false)) { - return array( - 'ok' => 1, - 'needsCredentials' => 1, - 'redirect' => $adminURL, - ); - } - - if ($wp_filesystem->delete($localFile)) { - $wfIssues->updateIssue($issueID, 'delete'); - $counts = $wfIssues->getIssueCounts(); - wfScanEngine::refreshScanNotification($wfIssues); - return array( - 'ok' => 1, - 'localFile' => $localFile, - 'file' => $file, - 'issueCounts' => $counts, - ); - } - - $err = error_get_last(); - return array( - 'errorMsg' => sprintf( - /* translators: 1. File path. 2. Error message. */ - __('Could not delete file %1$s. The error was: %2$s', 'wordfence'), - wp_kses($file, array()), - wp_kses(str_replace(ABSPATH, '{WordPress Root}/', $err['message']), array()) - ) - ); - } - public static function ajax_deleteDatabaseOption_callback(){ - /** @var wpdb $wpdb */ - global $wpdb; - $issueID = intval($_POST['issueID']); - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if (!$issue) { - return array('errorMsg' => __("Could not remove the option because we could not find that issue.", 'wordfence')); - } - if (empty($issue['data']['option_name'])) { - return array('errorMsg' => __("Could not remove the option because that issue does not appear to be a database related issue.", 'wordfence')); - } - $table_options = wfDB::blogTable('options', $issue['data']['site_id']); - if ($wpdb->query($wpdb->prepare("DELETE FROM {$table_options} WHERE option_name = %s", $issue['data']['option_name']))) { - $wfIssues->updateIssue($issueID, 'delete'); - wfScanEngine::refreshScanNotification($wfIssues); - return array( - 'ok' => 1, - 'option_name' => $issue['data']['option_name'], - ); - } else { - return array('errorMsg' => sprintf( - /* translators: 1. WordPress option. 2. Error message. */ - __('Could not remove the option %1$s. The error was: %2$s', 'wordfence'), - esc_html($issue['data']['option_name']), - esc_html($wpdb->last_error) - )); - } - } - public static function ajax_fixFPD_callback(){ - $issues = new wfIssues(); - $issue = $issues->getIssueByID($_POST['issueID']); - if (!$issue) { - return array('cerrorMsg' => __("We could not find that issue in our database.", 'wordfence')); - } - - $htaccess = ABSPATH . '/.htaccess'; - $change = "<IfModule mod_php5.c>\n\tphp_value display_errors 0\n</IfModule>\n<IfModule mod_php7.c>\n\tphp_value display_errors 0\n</IfModule>\n<IfModule mod_php.c>\n\tphp_value display_errors 0\n</IfModule>"; - $content = ""; - if (file_exists($htaccess)) { - $content = file_get_contents($htaccess); - } - - if (@file_put_contents($htaccess, trim($content . "\n" . $change), LOCK_EX) === false) { - return array('cerrorMsg' => __("You don't have permission to repair .htaccess. You need to either fix the file manually using FTP or change the file permissions and ownership so that your web server has write access to repair the file.", 'wordfence')); - } - if (wfScanEngine::testForFullPathDisclosure()) { - // Didn't fix it, so revert the changes and return an error - file_put_contents($htaccess, $content, LOCK_EX); - return array( - 'cerrorMsg' => __("Modifying the .htaccess file did not resolve the issue, so the original .htaccess file was restored. You can fix this manually by setting <code>display_errors</code> to <code>Off</code> in your php.ini if your site is on a VPS or dedicated server that you control.", 'wordfence'), - ); - } - $issues->updateIssue($_POST['issueID'], 'delete'); - wfScanEngine::refreshScanNotification($issues); - return array('ok' => 1); - } - public static function ajax_restoreFile_callback($issueID = null){ - if ($issueID === null) { - $issueID = intval($_POST['issueID']); - } - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if(! $issue){ - return array('cerrorMsg' => __("We could not find that issue in our database.", 'wordfence')); - } - - /** @var WP_Filesystem_Base $wp_filesystem */ - global $wp_filesystem; - - $adminURL = network_admin_url('admin.php?' . http_build_query(array( - 'page' => 'WordfenceScan', - 'subpage' => 'scan_credentials', - 'action' => 'restoreFile', - 'issueID' => $issueID, - 'nonce' => wp_create_nonce('wp-ajax'), - ))); - - if (!self::requestFilesystemCredentials($adminURL, null, true, false)) { - return array( - 'ok' => 1, - 'needsCredentials' => true, - 'redirect' => $adminURL, - ); - } - - $dat = $issue['data']; - $result = self::getWPFileContent($dat['file'], $dat['cType'], (isset($dat['cName']) ? $dat['cName'] : ''), (isset($dat['cVersion']) ? $dat['cVersion'] : '')); - $file = $dat['file']; - if(isset($result['errorMsg']) && $result['errorMsg']){ - return $result; - } else if(! $result['fileContent']){ - return array('errorMsg' => __("We could not get the original file to do a repair.", 'wordfence')); - } - - if(preg_match('/\.\./', $file)){ - return array('errorMsg' => __("An invalid file was specified for repair.", 'wordfence')); - } - if (array_key_exists('realFile', $dat)) { - $localFile = $dat['realFile']; - } - else { - $localFile = rtrim(ABSPATH, '/') . '/' . preg_replace('/^[\.\/]+/', '', $file); - } - if ($wp_filesystem->put_contents($localFile, $result['fileContent'])) { - $wfIssues->updateIssue($issueID, 'delete'); - $counts = $wfIssues->getIssueCounts(); - wfScanEngine::refreshScanNotification($wfIssues); - return array( - 'ok' => 1, - 'localFile' => $localFile, - 'file' => $file, - 'issueCounts' => $counts, - ); - } - return array( - 'errorMsg' => __("We could not write to that file. You may not have permission to modify files on your WordPress server.", 'wordfence'), - ); - } - public static function ajax_scan_callback(){ - self::status(4, 'info', __("Ajax request received to start scan.", 'wordfence')); - $err = wfScanEngine::startScan(); - if ($err) { - return array('errorMsg' => wp_kses($err, array())); - } - else { - $issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts()); - return array("ok" => 1, 'issueCounts' => $issueCounts); - } - } - public static function ajax_exportSettings_callback() { - $result = wfImportExportController::shared()->export(); - return $result; - } - public static function ajax_importSettings_callback(){ - $token = $_POST['token']; - return self::importSettings($token); - } - public static function importSettings($token) { //Documented call for external interfacing. - return wfImportExportController::shared()->import($token); - } - public static function ajax_dismissNotification_callback() { - $id = $_POST['id']; - $n = wfNotification::getNotificationForID($id); - if ($n !== null) { - $n->markAsRead(); - } - return array( - 'ok' => 1, - ); - } - public static function ajax_utilityScanForBlacklisted_callback() { - if (wfScanner::shared()->isRunning()) { - return array('wait' => 2); //Can't run while a scan is running since the URL hoover is currently implemented like a singleton - } - - $pageURL = stripslashes($_POST['url']); - $source = stripslashes($_POST['source']); - $apiKey = wfConfig::get('apiKey'); - $wp_version = wfUtils::getWPVersion(); - $h = new wordfenceURLHoover($apiKey, $wp_version); - $h->hoover(1, $source); - $hooverResults = $h->getBaddies(); - if ($h->errorMsg) { - $h->cleanup(); - return array('wait' => 3, 'errorMsg' => $h->errorMsg); //Unable to contact noc1 to verify - } - $h->cleanup(); - if (sizeof($hooverResults) > 0 && isset($hooverResults[1])) { - $hresults = $hooverResults[1]; - $count = count($hresults); - if ($count > 0) { - new wfNotification( - null, - wfNotification::PRIORITY_HIGH_WARNING, - sprintf(/* translators: Number of URLs. */ _n("Page contains %d malware URL: ", "Page contains %d malware URLs: ", $count, 'wordfence') . esc_html($pageURL)), - 'wfplugin_malwareurl_' . md5($pageURL), - null, - array(array('link' => wfUtils::wpAdminURL('admin.php?page=WordfenceScan'), 'label' => __('Run a Scan', 'wordfence')))); - return array('bad' => $count); - } - } - return array('ok' => 1); - } - public static function ajax_dashboardShowMore_callback() { - $grouping = $_POST['grouping']; - $period = $_POST['period']; - - $dashboard = new wfDashboard(); - if ($grouping == 'ips') { - $data = null; - if ($period == '24h') { $data = $dashboard->ips24h; } - else if ($period == '7d') { $data = $dashboard->ips7d; } - else if ($period == '30d') { $data = $dashboard->ips30d; } - - if ($data !== null) { - foreach ($data as &$d) { - $d['IP'] = esc_html(wfUtils::inet_ntop($d['IP'])); - $d['blockCount'] = esc_html(number_format_i18n($d['blockCount'])); - $d['countryFlag'] = esc_attr('wf-flag-' . strtolower($d['countryCode'])); - $d['countryName'] = esc_html($d['countryName']); - } - return array('ok' => 1, 'data' => $data); - } - } - else if ($grouping == 'logins') { - $data = null; - if ($period == 'success') { $data = $dashboard->loginsSuccess; } - else if ($period == 'fail') { $data = $dashboard->loginsFail; } - - if ($data !== null) { - $data = array_slice($data, 0, 100); - foreach ($data as &$d) { - $d['ip'] = esc_html($d['ip']); - $d['name'] = esc_html($d['name']); - if (time() - $d['t'] < 86400) { - $d['t'] = esc_html(wfUtils::makeTimeAgo(time() - $d['t']) . ' ago'); - } - else { - $d['t'] = esc_html(wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), (int) $d['t'])); - } - } - return array('ok' => 1, 'data' => $data); - } - } - - return array('error' => __('Unknown dashboard data set.', 'wordfence')); - } - public static function startScan(){ - wfScanEngine::startScan(); - } - public static function templateRedir(){ - if (!empty($_GET['wordfence_lh'])) { - self::ajax_lh_callback(); - exit; - } - if (!empty($_GET['wfcentral_admin_redirect'])) { - wp_safe_redirect(remove_query_arg('wfcentral_admin_redirect', network_admin_url('admin.php?page=Wordfence' . rawurlencode(ucwords(preg_replace('/\W/', '', $_GET['wfcentral_admin_redirect']))) . '&' . $_SERVER['QUERY_STRING']))); - exit; - } - - $wfFunc = !empty($_GET['_wfsf']) && is_string($_GET['_wfsf']) ? $_GET['_wfsf'] : ''; - - //Logging - self::doEarlyAccessLogging(); - //End logging - - - if(! ($wfFunc == 'diff' || $wfFunc == 'view' || $wfFunc == 'viewOption' || $wfFunc == 'sysinfo' || $wfFunc == 'IPTraf' || $wfFunc == 'viewActivityLog' || $wfFunc == 'testmem' || $wfFunc == 'testtime' || $wfFunc == 'download' || $wfFunc == 'blockedIPs' || ($wfFunc == 'debugWAF' && WFWAF_DEBUG))){ - return; - } - if(! wfUtils::isAdmin()){ - return; - } - - $nonce = $_GET['nonce']; - if(! wp_verify_nonce($nonce, 'wp-ajax')){ - _e("Bad security token. It may have been more than 12 hours since you reloaded the page you came from. Try reloading the page you came from. If that doesn't work, please sign out and sign-in again.", 'wordfence'); - exit(0); - } - if($wfFunc == 'diff'){ - self::wfFunc_diff(); - } else if($wfFunc == 'view'){ - self::wfFunc_view(); - } else if($wfFunc == 'viewOption'){ - self::wfFunc_viewOption(); - } else if($wfFunc == 'sysinfo') { - require(dirname(__FILE__) . '/sysinfo.php' ); - } else if($wfFunc == 'IPTraf'){ - self::wfFunc_IPTraf(); - } else if($wfFunc == 'viewActivityLog'){ - self::wfFunc_viewActivityLog(); - } else if($wfFunc == 'testmem'){ - self::wfFunc_testmem(); - } else if($wfFunc == 'testtime'){ - self::wfFunc_testtime(); - } else if($wfFunc == 'download'){ - self::wfFunc_download(); - } else if($wfFunc == 'blockedIPs'){ - self::wfFunc_blockedIPs(); - } else if($wfFunc == 'debugWAF' && WFWAF_DEBUG){ - self::wfFunc_debugWAF(); - } - exit(0); - } - public static function memtest_error_handler($errno, $errstr, $errfile, $errline){ - echo "Error received: $errstr\n"; - } - private static function wfFunc_testtime(){ - header('Content-Type: text/plain'); - @error_reporting(E_ALL); - wfUtils::iniSet('display_errors','On'); - set_error_handler('wordfence::memtest_error_handler', E_ALL); - - echo "Wordfence process duration benchmarking utility version " . WORDFENCE_VERSION . ".\n"; - echo "This utility tests how long your WordPress host allows a process to run.\n\n--Starting test--\n"; - echo "Starting timed test. This will take at least three minutes. Seconds elapsed are printed below.\nAn error after this line is not unusual. Read it and the elapsed seconds to determine max process running time on your host.\n"; - for($i = 1; $i <= 180; $i++){ - echo "\n$i:"; - for($j = 0; $j < 1000; $j++){ - echo '.'; - } - flush(); - sleep(1); - } - echo "\n--Test complete.--\n\nCongratulations, your web host allows your PHP processes to run at least 3 minutes.\n"; - exit(); - } - private static function wfFunc_testmem(){ - header('Content-Type: text/plain'); - @error_reporting(E_ALL); - wfUtils::iniSet('display_errors','On'); - set_error_handler('wordfence::memtest_error_handler', E_ALL); - - $maxMemory = ini_get('memory_limit'); - $last = strtolower(substr($maxMemory, -1)); - $maxMemory = (int) $maxMemory; - - $configuredMax = wfConfig::get('maxMem', 0); - if ($configuredMax <= 0) { - if ($last == 'g') { $configuredMax = $maxMemory * 1024; } - else if ($last == 'm') { $configuredMax = $maxMemory; } - else if ($last == 'k') { $configuredMax = $maxMemory / 1024; } - $configuredMax = floor($configuredMax); - } - - $stepSize = 5242880; //5 MB - - echo "Wordfence Memory benchmarking utility version " . WORDFENCE_VERSION . ".\n"; - echo "This utility tests if your WordPress host respects the maximum memory configured\nin their php.ini file, or if they are using other methods to limit your access to memory.\n\n--Starting test--\n"; - echo "Current maximum memory configured in php.ini: " . ini_get('memory_limit') . "\n"; - echo "Current memory usage: " . sprintf('%.2f', memory_get_usage(true) / (1024 * 1024)) . "M\n"; - echo "Attempting to set max memory to {$configuredMax}M.\n"; - wfUtils::iniSet('memory_limit', ($configuredMax + 5) . 'M'); //Allow a little extra for testing overhead - echo "Starting memory benchmark. Seeing an error after this line is not unusual. Read the error carefully\nto determine how much memory your host allows. We have requested {$configuredMax} megabytes.\n"; - - if (memory_get_usage(true) < 1) { - echo "Exiting test because memory_get_usage() returned a negative number\n"; - exit(); - } - if (memory_get_usage(true) > (1024 * 1024 * 1024)) { - echo "Exiting because current memory usage is greater than a gigabyte.\n"; - exit(); - } - - if (!defined('WP_SANDBOX_SCRAPING')) { define('WP_SANDBOX_SCRAPING', true); } //Disables the WP error handler in somewhat of a hacky way - - $accumulatedMemory = array_fill(0, ceil($configuredMax / $stepSize), ''); - $currentUsage = memory_get_usage(true); - $tenMB = 10 * 1024 * 1024; - $start = ceil($currentUsage / $tenMB) * $tenMB - $currentUsage; //Start at the closest 10 MB increment to the current usage - $configuredMax = $configuredMax * 1048576; //Bytes - $testLimit = $configuredMax - memory_get_usage(true); - $finalUsage = '0'; - $previous = 0; - $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678900000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111222222222222222222233333333333333334444444444444444444444444555555555555666666666666666666"; - $index = 0; - while ($start <= $testLimit) { - $accumulatedMemory[$index] = str_repeat($chars, ($start - $previous) / 256); - - $finalUsage = sprintf('%.2f', (memory_get_usage(true) / 1024 / 1024)); - echo "Tested up to " . $finalUsage . " megabytes.\n"; - if ($start == $testLimit) { break; } - $previous = $start; - $start = min($start + $stepSize, $testLimit); - - if (memory_get_usage(true) > $configuredMax) { break; } - $index++; - } - echo "--Test complete.--\n\nYour web host allows you to use at least {$finalUsage} megabytes of memory for each PHP process hosting your WordPress site.\n"; - exit(); - } - public static function wfLogHumanHeader(){ - //Final check in case this was added as an action before the request was fully initialized - if (self::getLog()->getCurrentRequest()->jsRun || !wfConfig::liveTrafficEnabled()) { - return; - } - - self::$hitID = self::getLog()->logHit(); - if (self::$hitID) { - $URL = home_url('/?wordfence_lh=1&hid=' . wfUtils::encrypt(self::$hitID)); - $URL = addslashes(preg_replace('/^https?:/i', '', $URL)); - #Load as external script async so we don't slow page down. - echo <<<HTML -<script type="text/javascript"> -(function(url){ - if(/(?:Chrome\/26\.0\.1410\.63 Safari\/537\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){ return; } - var addEvent = function(evt, handler) { - if (window.addEventListener) { - document.addEventListener(evt, handler, false); - } else if (window.attachEvent) { - document.attachEvent('on' + evt, handler); - } - }; - var removeEvent = function(evt, handler) { - if (window.removeEventListener) { - document.removeEventListener(evt, handler, false); - } else if (window.detachEvent) { - document.detachEvent('on' + evt, handler); - } - }; - var evts = 'contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop keydown keypress keyup mousedown mousemove mouseout mouseover mouseup mousewheel scroll'.split(' '); - var logHuman = function() { - if (window.wfLogHumanRan) { return; } - window.wfLogHumanRan = true; - var wfscr = document.createElement('script'); - wfscr.type = 'text/javascript'; - wfscr.async = true; - wfscr.src = url + '&r=' + Math.random(); - (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr); - for (var i = 0; i < evts.length; i++) { - removeEvent(evts[i], logHuman); - } - }; - for (var i = 0; i < evts.length; i++) { - addEvent(evts[i], logHuman); - } -})('$URL'); -</script> -HTML; - } - } - public static function shutdownAction(){ - } - public static function wfFunc_viewActivityLog(){ - require(dirname(__FILE__) . '/viewFullActivityLog.php'); - exit(0); - } - public static function wfFunc_IPTraf(){ - $IP = $_GET['IP']; - try { - $response = self::IPTraf($IP); - $reverseLookup = $response['reverseLookup']; - $results = $response['results']; - require(dirname(__FILE__) . '/IPTraf.php'); - exit(0); - } catch (InvalidArgumentException $e) { - echo $e->getMessage(); - exit; - } - } - - private static function IPTraf($ip) { - if(!wfUtils::isValidIP($ip)){ - throw new InvalidArgumentException(__("An invalid IP address was specified.", 'wordfence')); - } - $reverseLookup = wfUtils::reverseLookup($ip); - $wfLog = wfLog::shared(); - $results = array_merge( - $wfLog->getHits('hits', '404', 0, 10000, $ip), - $wfLog->getHits('hits', 'hit', 0, 10000, $ip) - ); - usort($results, 'wordfence::iptrafsort'); - - $ids = array(); - foreach ($results as $k => $r) { - if (isset($ids[$r['id']])) { - unset($results[$k]); - } - else { - $ids[$r['id']] = 1; - } - } - - $results = array_values($results); - - for ($i = 0; $i < count($results); $i++){ - if(array_key_exists($i + 1, $results)){ - $results[$i]['timeSinceLastHit'] = sprintf('%.4f', $results[$i]['ctime'] - $results[$i + 1]['ctime']); - } else { - $results[$i]['timeSinceLastHit'] = ''; - } - } - return compact('reverseLookup', 'results'); - } - - public static function iptrafsort($b, $a){ - if($a['ctime'] == $b['ctime']){ return 0; } - return ($a['ctime'] < $b['ctime']) ? -1 : 1; - } - - private static function checkRealFileParameters() { - if (array_key_exists('realFile', $_GET)) { - $realFile = stripslashes($_GET['realFile']); - $token = array_key_exists('realFileToken', $_GET) ? $_GET['realFileToken'] : ''; - if (!wfIssues::verifyRealFileToken($token, $realFile)) { - esc_html_e('This link has expired. Refresh the scan results page and try again.', 'wordfence'); - exit(0); - } - return $realFile; - } - return null; - } - - public static function wfFunc_viewOption() { - /** @var wpdb $wpdb */ - global $wpdb; - $site_id = !empty($_GET['site_id']) ? absint($_GET['site_id']) : get_current_blog_id(); - $option_name = !empty($_GET['option']) ? $_GET['option'] : false; - - $table_options = wfDB::blogTable('options', $site_id); - $option_value = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM {$table_options} WHERE option_name = %s", $option_name)); - - header('Content-type: text/plain'); - exit($option_value); - } - - public static function wfFunc_view(){ - wfUtils::doNotCache(); - if (WORDFENCE_DISABLE_FILE_VIEWER) { - _e("File access blocked. (WORDFENCE_DISABLE_FILE_VIEWER is true)", 'wordfence'); - exit(); - } - $localFile = self::checkRealFileParameters(); - if ($localFile === null) - $localFile = ABSPATH . preg_replace('/^(?:\.\.|[\/]+)/', '', sanitize_text_field($_GET['file'])); - if(strpos($localFile, '..') !== false){ - _e("Invalid file requested. (Relative paths not allowed)", 'wordfence'); - exit(); - } - if(preg_match('/[\'\"<>\!\{\}\(\)\&\@\%\$\*\+\[\]\?]+/', $localFile)){ - _e("File contains illegal characters.", 'wordfence'); - exit(); - } - $cont = @file_get_contents($localFile); - $isEmpty = false; - if(! $cont){ - if(file_exists($localFile) && filesize($localFile) === 0){ //There's a remote possibility that very large files on 32 bit systems will return 0 here, but it's about 1 in 2 billion - $isEmpty = true; - } else { - $err = error_get_last(); - printf(/* translators: Error message. */ __("We could not open the requested file for reading. The error was: %s", 'wordfence'), $err['message']); - exit(0); - } - } - $fileMTime = @filemtime($localFile); - $fileMTime = date('l jS \of F Y h:i:s A', $fileMTime); - try { - if(wfUtils::fileOver2Gigs($localFile)){ - $fileSize = __("Greater than 2 Gigs", 'wordfence'); - } else { - $fileSize = @filesize($localFile); //Checked if over 2 gigs above - $fileSize = number_format($fileSize, 0, '', ',') . ' bytes'; - } - } catch(Exception $e){ $fileSize = __('Unknown file size.', 'wordfence'); } - - require(dirname(__FILE__) . '/wfViewResult.php'); - exit(0); - } - - public static function wfFunc_diff(){ - wfUtils::doNotCache(); - if (WORDFENCE_DISABLE_FILE_VIEWER) { - esc_html_e("File access blocked. (WORDFENCE_DISABLE_FILE_VIEWER is true)", 'wordfence'); - exit(); - } - if(preg_match('/[\'\"<>\!\{\}\(\)\&\@\%\$\*\+\[\]\?]+/', $_GET['file'])){ - esc_html_e("File contains illegal characters.", 'wordfence'); - exit(); - } - - $result = self::getWPFileContent($_GET['file'], $_GET['cType'], wp_unslash($_GET['cName']), $_GET['cVersion']); - if( isset( $result['errorMsg'] ) && $result['errorMsg']){ - echo wp_kses($result['errorMsg'], array()); - exit(0); - } else if(! $result['fileContent']){ - esc_html_e("We could not get the contents of the original file to do a comparison.", 'wordfence'); - exit(0); - } - - $localFile = self::checkRealFileParameters(); - if ($localFile === null) { - $localFile = realpath(ABSPATH . '/' . preg_replace('/^[\.\/]+/', '', $_GET['file'])); - } - if (empty($localFile)) { - esc_html_e('Empty file path provided', 'wordfence'); - exit(0); - } - $localContents = file_get_contents($localFile); - if ($localContents === false) { - esc_html_e('Unable to read file contents', 'wordfence'); - exit(0); - } - if($localContents == $result['fileContent']){ - $diffResult = ''; - } else { - $diff = new Diff( - //Treat DOS and Unix files the same - preg_split("/(?:\r\n|\n)/", $result['fileContent']), - preg_split("/(?:\r\n|\n)/", $localContents), - array() - ); - $renderer = new Diff_Renderer_Html_SideBySide; - $diffResult = $diff->Render($renderer); - } - require(dirname(__FILE__) . '/diffResult.php'); - exit(0); - } - - public static function wfFunc_download() { - wfUtils::doNotCache(); - if (WORDFENCE_DISABLE_FILE_VIEWER) { - esc_html_e("File access blocked. (WORDFENCE_DISABLE_FILE_VIEWER is true)", 'wordfence'); - exit(); - } - $localFile = self::checkRealFileParameters(); - if ($localFile === null) - $localFile = ABSPATH . preg_replace('/^(?:\.\.|[\/]+)/', '', sanitize_text_field($_GET['file'])); - if (strpos($localFile, '..') !== false) { - esc_html_e("Invalid file requested. (Relative paths not allowed)", 'wordfence'); - exit(); - } - if (preg_match('/[\'\"<>\!\{\}\(\)\&\@\%\$\*\+\[\]\?]+/', $localFile)) { - esc_html_e("File contains illegal characters.", 'wordfence'); - exit(); - } - if (!file_exists($localFile)) { - _e('File does not exist.', 'wordfence'); - exit(); - } - - $filename = basename($localFile); - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="' . $filename . '"'); - header('Content-Length: ' . filesize($localFile)); - readfile($localFile); - exit; - } - - public static function wfFunc_blockedIPs() { - $blocks = wfBlock::ipBlocks(true); - - $output = ''; - if (is_array($blocks)) { - foreach ($blocks as $entry) { - $output .= $entry->ip . "\n"; - } - } - - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="' . get_bloginfo('name', 'raw') . ' - Blocked IPs.txt"'); - header('Content-Length: ' . strlen($output)); - - echo $output; - exit; - } - - /** - * - */ - public static function wfFunc_debugWAF() { - $data = array(); - if (!empty($_GET['hitid'])) { - $data['hit'] = new wfRequestModel($_GET['hitid']); - if ($data['hit']->actionData) { - $data['hitData'] = (object) wfRequestModel::unserializeActionData($data['hit']->actionData); - } - echo wfView::create('waf/debug', $data); - } - } - - public static function isWafFailureLoggingEnabled() { - return wfConfig::get('other_WFNet', true); - } - - private static function purgeWafFailures() { - global $wpdb; - $table = wfDB::networkTable('wfWafFailures'); - $wpdb->query("DELETE FROM {$table} WHERE `timestamp` < DATE_SUB(NOW(), INTERVAL 1 DAY)"); - } - - private static function capWafFailures() { - global $wpdb; - $table = wfDB::networkTable('wfWafFailures'); - $highestDeletableId = $wpdb->get_var("SELECT id FROM {$table} ORDER BY id DESC LIMIT 1 OFFSET 25"); - if ($highestDeletableId === null) - return; - $wpdb->query( - $wpdb->prepare( - "DELETE FROM {$table} WHERE id <= %d", - $highestDeletableId - ) - ); - } - - public static function logWafFailure() { - global $wf_waf_failure, $wpdb; - if (!self::isWafFailureLoggingEnabled()) - return; - if (is_array($wf_waf_failure) && array_key_exists('throwable', $wf_waf_failure)) { - $throwable = $wf_waf_failure['throwable']; - if (!($throwable instanceof Throwable || $throwable instanceof Exception)) - return; - $table = wfDB::networkTable('wfWafFailures'); - $data = [ - 'throwable' => (string) $throwable - ]; - if (array_key_exists('rule_id', $wf_waf_failure)) { - $ruleId = $wf_waf_failure['rule_id']; - if (is_int($ruleId) || $ruleId >= 0) - $data['rule_id'] = (int) $ruleId; - } - $wpdb->insert($table, $data); - self::capWafFailures(); - self::scheduleSendAttackData(); - } - } - - public static function initAction(){ - self::logWafFailure(); - load_plugin_textdomain('wordfence', false, basename(WORDFENCE_PATH) . '/languages'); - - $firewall = new wfFirewall(); - define('WFWAF_OPERATIONAL', $firewall->testConfig()); - - $currentUserID = get_current_user_id(); - $role = wordfence::getCurrentUserRole(); - if (!WFWAF_SUBDIRECTORY_INSTALL) { - try { - $authCookie = wfWAF::getInstance()->parseAuthCookie(); - $capabilities = wordfence::getCurrentUserCapabilities(); - if (is_user_logged_in() && - ( - !$authCookie || - (int) $currentUserID !== (int) $authCookie['userID'] || - $role !== $authCookie['role'] || - $authCookie['capabilities'] !== $capabilities //Capability ordering is fixed so a direct equality check is valid - ) - ) { - wfUtils::setcookie(wfWAF::getInstance()->getAuthCookieName(), - $currentUserID . '|' . $role . '|' . implode(',', $capabilities) . '|' . - wfWAF::getInstance()->getAuthCookieValue($currentUserID, $role, $capabilities), - time() + 43200, COOKIEPATH, COOKIE_DOMAIN, wfUtils::isFullSSL(), true); - } - } catch (wfWAFStorageFileException $e) { - error_log($e->getMessage()); - } catch (wfWAFStorageEngineMySQLiException $e) { - error_log($e->getMessage()); - } - } - - if (wfConfig::get('other_hideWPVersion')) { - - global $wp_version; - global $wp_styles; - - if (!($wp_styles instanceof WP_Styles)) { - $wp_styles = new WP_Styles(); - } - if ($wp_styles->default_version === $wp_version) { - $wp_styles->default_version = wp_hash($wp_styles->default_version); - } - - foreach ($wp_styles->registered as $key => $val) { - if ($wp_styles->registered[$key]->ver === $wp_version) { - $wp_styles->registered[$key]->ver = wp_hash($wp_styles->registered[$key]->ver); - } - } - - global $wp_scripts; - if (!($wp_scripts instanceof WP_Scripts)) { - $wp_scripts = new WP_Scripts(); - } - if ($wp_scripts->default_version === $wp_version) { - $wp_scripts->default_version = wp_hash($wp_scripts->default_version); - } - - foreach ($wp_scripts->registered as $key => $val) { - if ($wp_scripts->registered[$key]->ver === $wp_version) { - $wp_scripts->registered[$key]->ver = wp_hash($wp_scripts->registered[$key]->ver); - } - } - } - } - public static function admin_init(){ - if(! wfUtils::isAdmin()){ return; } - - wfOnboardingController::initialize(); - - if (is_admin() && isset($_GET['page'])) { - switch ($_GET['page']) { - case 'WordfenceBlocking': - wp_redirect(network_admin_url('admin.php?page=WordfenceWAF#top#blocking')); - die; - - case 'WordfenceLiveTraffic': - wp_redirect(network_admin_url('admin.php?page=WordfenceTools&subpage=livetraffic')); - die; - - case 'WordfenceTools': - if (wfOnboardingController::shouldShowAttempt3() && !array_key_exists('subpage', $_GET)) { - wp_redirect(add_query_arg('subpage', 'diagnostics')); - die; - } - } - } - - - - if (wfConfig::get('touppBypassNextCheck')) { - wfConfig::set('touppBypassNextCheck', 0); - wfConfig::set('touppPromptNeeded', 0); - } - - foreach(array( - 'activate', 'scan', 'updateAlertEmail', 'sendActivityLog', 'restoreFile', - 'exportSettings', 'importSettings', 'bulkOperation', 'deleteFile', 'deleteDatabaseOption', 'removeExclusion', - 'activityLogUpdate', 'ticker', 'loadIssues', 'updateIssueStatus', 'deleteIssue', 'updateAllIssues', - 'avatarLookup', 'reverseLookup', 'unlockOutIP', 'unblockRange', 'whois', 'recentTraffic', 'unblockIP', - 'blockIP', 'permBlockIP', 'loadStaticPanel', 'updateIPPreview', 'downloadHtaccess', 'downloadLogFile', 'checkHtaccess', - 'updateConfig', 'autoUpdateChoice', 'misconfiguredHowGetIPsChoice', 'switchLiveTrafficSecurityOnlyChoice', 'dismissAdminNotice', 'wordfenceSatisfactionChoice', - 'killScan', 'saveCountryBlocking', 'tourClosed', - 'downgradeLicense', 'addTwoFactor', 'twoFacActivate', 'twoFacDel', - 'loadTwoFactor', 'sendTestEmail', - 'email_summary_email_address_debug', 'unblockNetwork', - 'sendDiagnostic', 'saveDisclosureState', 'saveWAFConfig', 'updateWAFRules', 'loadLiveTraffic', 'whitelistWAFParamKey', - 'disableDirectoryListing', 'fixFPD', 'deleteAdminUser', 'revokeAdminUser', 'acknowledgeAdminUser', - 'hideFileHtaccess', 'saveDebuggingConfig', - 'whitelistBulkDelete', 'whitelistBulkEnable', 'whitelistBulkDisable', - 'dismissNotification', 'utilityScanForBlacklisted', 'dashboardShowMore', - 'saveOptions', 'restoreDefaults', 'enableAllOptionsPage', 'createBlock', 'deleteBlocks', 'makePermanentBlocks', 'getBlocks', - 'installAutoPrepend', 'uninstallAutoPrepend', - 'installLicense', 'recordTOUPP', 'mailingSignup', - 'switchTo2FANew', 'switchTo2FAOld', - 'wfcentral_step1', 'wfcentral_step2', 'wfcentral_step3', 'wfcentral_step4', 'wfcentral_step5', 'wfcentral_step6', 'wfcentral_disconnect', - 'exportDiagnostics', - 'hideNoticeForUser', - 'setDeactivationOption' - ) as $func){ - add_action('wp_ajax_wordfence_' . $func, 'wordfence::ajaxReceiver'); - } - - wp_register_script('chart-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/chart.umd.js'), array('jquery'), '4.2.1'); - wp_register_script('wordfence-select2-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfselect2.min.js'), array('jquery', 'jquery-ui-tooltip'), WORDFENCE_VERSION); - wp_register_style('wordfence-select2-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wfselect2.min.css'), array(), WORDFENCE_VERSION); - wp_register_style('wordfence-font-awesome-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-font-awesome.css'), '', WORDFENCE_VERSION); - - if (self::isWordfencePage()) { - wp_enqueue_style('wp-pointer'); - wp_enqueue_script('wp-pointer'); - wp_enqueue_style('wordfence-font', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-roboto-font.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-font-awesome-style'); - wp_enqueue_style('wordfence-main-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/main.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-ionicons-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-ionicons.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-colorbox-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-colorbox.css'), '', WORDFENCE_VERSION); - wp_enqueue_style('wordfence-license-style', wfLicense::current()->getStylesheet()); - - wp_enqueue_script('json2'); - wp_enqueue_script('jquery-ui-core'); - wp_enqueue_script('jquery-ui-menu'); - wp_enqueue_script('jquery.wftmpl', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery.tmpl.min.js'), array('jquery'), WORDFENCE_VERSION); - wp_enqueue_script('jquery.wfcolorbox', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery.colorbox-min.js'), array('jquery'), WORDFENCE_VERSION); - wp_enqueue_script('jquery.qrcode', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery.qrcode.min.js'), array('jquery'), WORDFENCE_VERSION); - wp_enqueue_script('wfi18njs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfi18n.js'), array(), WORDFENCE_VERSION); - wp_enqueue_script('wordfenceAdminExtjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfglobal.js'), array('jquery'), WORDFENCE_VERSION); - wp_enqueue_script('wordfenceAdminjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/admin.js'), array('jquery', 'jquery-ui-core', 'jquery-ui-menu'), WORDFENCE_VERSION); - wp_enqueue_script('wordfenceDropdownjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfdropdown.js'), array('jquery'), WORDFENCE_VERSION); - self::setupAdminVars(); - - if (wfConfig::get('touppPromptNeeded')) { - add_filter('admin_body_class', 'wordfence::showTOUPPOverlay', 99, 1); - } - } else { - wp_enqueue_style('wp-pointer'); - wp_enqueue_script('wp-pointer'); - wp_enqueue_script('wfi18njs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfi18n.js'), array(), WORDFENCE_VERSION); - wp_enqueue_script('wordfenceAdminExtjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfglobal.js'), array('jquery'), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-font-awesome-style'); - wp_enqueue_style('wordfence-global-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-global.css'), '', WORDFENCE_VERSION); - self::setupAdminVars(); - } - - if (is_admin()) { //Back end only - if (wfOnboardingController::shouldShowAnyAttempt()) { - wp_enqueue_script('wordfenceOnboardingjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfonboarding.js'), array('jquery', 'wordfenceAdminExtjs'), WORDFENCE_VERSION); - } - if (preg_match('/\/wp-admin(\/network)?\/plugins.php$/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { - wp_enqueue_style('wordfence-colorbox-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-colorbox.css'), '', WORDFENCE_VERSION); - wp_enqueue_script('jquery.wfcolorbox', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery.colorbox-min.js'), array('jquery'), WORDFENCE_VERSION); - } - - wfUtils::refreshCachedHomeURL(); - wfUtils::refreshCachedSiteURL(); - } - - if (self::isWordfenceInstallPage()) - return; - - //Early WAF configuration actions - if (wfOnboardingController::shouldShowAttempt3(!self::isWordfencePage(false))) { - add_action(is_multisite() ? 'network_admin_notices' : 'admin_notices', 'wordfence::showOnboardingBanner'); - } - elseif ((!WFWAF_AUTO_PREPEND || WFWAF_SUBDIRECTORY_INSTALL) && empty($_GET['wafAction']) && !wfConfig::get('dismissAutoPrependNotice') && !wfConfig::get('touppPromptNeeded')) { - if (is_multisite()) { - add_action('network_admin_notices', 'wordfence::wafAutoPrependNotice'); - } else { - add_action('admin_notices', 'wordfence::wafAutoPrependNotice'); - } - } - - if (wfConfig::get('wordfenceCentralConfigurationIssue')) { - add_action(is_multisite() ? 'network_admin_notices' : 'admin_notices', 'wordfence::showCentralConfigurationIssueNotice'); - } - - if (isset($_GET['page']) && $_GET['page'] == 'WordfenceWAF' && isset($_GET['subpage']) && $_GET['subpage'] == 'waf_options') { - if (!WFWAF_AUTO_PREPEND || WFWAF_SUBDIRECTORY_INSTALL) { //Not yet installed - if (isset($_GET['action']) && $_GET['action'] == 'configureAutoPrepend') { - check_admin_referer('wfWAFAutoPrepend', 'wfnonce'); - if (isset($_GET['serverConfiguration']) && wfWAFAutoPrependHelper::isValidServerConfig($_GET['serverConfiguration'])) { - $helper = new wfWAFAutoPrependHelper($_GET['serverConfiguration']); - if (isset($_GET['downloadBackup'])) { - $helper->downloadBackups(isset($_GET['backupIndex']) ? absint($_GET['backupIndex']) : 0); - } - } - } - } - else { //Already installed - if (isset($_GET['action']) && $_GET['action'] == 'removeAutoPrepend') { - check_admin_referer('wfWAFRemoveAutoPrepend', 'wfnonce'); - if (isset($_GET['serverConfiguration']) && wfWAFAutoPrependHelper::isValidServerConfig($_GET['serverConfiguration'])) { - $helper = new wfWAFAutoPrependHelper($_GET['serverConfiguration']); - if (isset($_GET['downloadBackup'])) { - $helper->downloadBackups(isset($_GET['backupIndex']) ? absint($_GET['backupIndex']) : 0); - } - } - } - } - } - } - private static function setupAdminVars(){ - $updateInt = max(absint(wfConfig::getInt('actUpdateInterval', 2)), 2) * 1000; //ms - - wp_localize_script('wordfenceAdminExtjs', 'WordfenceAdminVars', array( - 'ajaxURL' => admin_url('admin-ajax.php'), - 'firstNonce' => wp_create_nonce('wp-ajax'), - 'siteBaseURL' => wfUtils::getSiteBaseURL(), - 'debugOn' => wfConfig::get('debugOn', 0), - 'actUpdateInterval' => $updateInt, - 'cacheType' => wfConfig::get('cacheType'), - 'liveTrafficEnabled' => wfConfig::liveTrafficEnabled(), - 'scanIssuesPerPage' => WORDFENCE_SCAN_ISSUES_PER_PAGE, - 'allowsPausing' => wfConfig::get('liveActivityPauseEnabled'), - 'scanRunning' => wfScanner::shared()->isRunning() ? '1' : '0', - 'modalTemplate' => wfView::create('common/modal-prompt', array('title' => '${title}', 'message' => '${message}', 'primaryButton' => array('id' => 'wf-generic-modal-close', 'label' => __('Close', 'wordfence'), 'link' => '#')))->render(), - 'tokenInvalidTemplate' => wfView::create('common/modal-prompt', array('title' => '${title}', 'message' => '${message}', 'primaryButton' => array('id' => 'wf-token-invalid-modal-reload', 'label' => __('Reload', 'wordfence'), 'link' => '#')))->render(), - 'modalHTMLTemplate' => wfView::create('common/modal-prompt', array('title' => '${title}', 'message' => '{{html message}}', 'primaryButton' => array('id' => 'wf-generic-modal-close', 'label' => __('Close', 'wordfence'), 'link' => '#')))->render(), - 'alertEmailBlacklist' => wfConfig::alertEmailBlacklist(), - 'supportURLs' => array( - 'scan-result-repair-modified-files' => esc_url_raw(wfSupportController::supportURL(wfSupportController::ITEM_SCAN_RESULT_REPAIR_MODIFIED_FILES)), - ), - )); - self::setupI18nJSStrings(); - } - - private static function setupI18nJSStrings() { - static $called; - if ($called) { - return; - } - $called = true; - wp_localize_script('wfi18njs', 'WordfenceI18nStrings', array( - '${totalIPs} addresses in this network' => __('${totalIPs} addresses in this network', 'wordfence'), - '%s in POST body: %s' => /* translators: 1. Description of firewall action. 2. Description of input parameters. */ __('%s in POST body: %s', 'wordfence'), - '%s in cookie: %s' => /* translators: 1. Description of firewall action. 2. Description of input parameters. */ __('%s in cookie: %s', 'wordfence'), - '%s in file: %s' => /* translators: 1. Description of firewall action. 2. Description of input parameters. */ __('%s in file: %s', 'wordfence'), - '%s in query string: %s' => /* translators: 1. Description of firewall action. 2. Description of input parameters. */ __('%s in query string: %s', 'wordfence'), - '%s is not valid hostname' => /* translators: Domain name. */ __('%s is not valid hostname', 'wordfence'), - '.htaccess Updated' => __('.htaccess Updated', 'wordfence'), - '.htaccess change' => __('.htaccess change', 'wordfence'), - '404 Not Found' => __('404 Not Found', 'wordfence'), - 'Activity Log Sent' => __('Activity Log Sent', 'wordfence'), - 'Add action to allowlist' => __('Add action to allowlist', 'wordfence'), - 'Add code to .htaccess' => __('Add code to .htaccess', 'wordfence'), - 'All Hits' => __('All Hits', 'wordfence'), - 'All capabilties of admin user %s were successfully revoked.' => /* translators: WordPress username. */ __('All capabilties of admin user %s were successfully revoked.', 'wordfence'), - 'An error occurred' => __('An error occurred', 'wordfence'), - 'An error occurred when adding the request to the allowlist.' => __('An error occurred when adding the request to the allowlist.', 'wordfence'), - 'Are you sure you want to allowlist this action?' => __('Are you sure you want to allowlist this action?', 'wordfence'), - 'Authentication Code' => __('Authentication Code', 'wordfence'), - 'Background Request Blocked' => __('Background Request Blocked', 'wordfence'), - 'Block This Network' => __('Block This Network', 'wordfence'), - 'Blocked' => __('Blocked', 'wordfence'), - 'Blocked By Firewall' => __('Blocked By Firewall', 'wordfence'), - 'Blocked WAF' => __('Blocked WAF', 'wordfence'), - 'Blocked by Wordfence' => __('Blocked by Wordfence', 'wordfence'), - 'Blocked by Wordfence plugin settings' => __('Blocked by Wordfence plugin settings', 'wordfence'), - 'Blocked by the Wordfence Application Firewall and plugin settings' => __('Blocked by the Wordfence Application Firewall and plugin settings', 'wordfence'), - 'Blocked by the Wordfence Security Network' => __('Blocked by the Wordfence Security Network', 'wordfence'), - 'Blocked by the Wordfence Web Application Firewall' => __('Blocked by the Wordfence Web Application Firewall', 'wordfence'), - 'Bot' => __('Bot', 'wordfence'), - 'Cancel Changes' => __('Cancel Changes', 'wordfence'), - 'Cellphone Sign-In Recovery Codes' => __('Cellphone Sign-In Recovery Codes', 'wordfence'), - 'Cellphone Sign-in activated for user.' => __('Cellphone Sign-in activated for user.', 'wordfence'), - 'Click here to download a backup copy of this file now' => __('Click here to download a backup copy of this file now', 'wordfence'), - 'Click here to download a backup copy of your .htaccess file now' => __('Click here to download a backup copy of your .htaccess file now', 'wordfence'), - 'Click to fix .htaccess' => __('Click to fix .htaccess', 'wordfence'), - 'Close' => __('Close', 'wordfence'), - 'Crawlers' => __('Crawlers', 'wordfence'), - 'Diagnostic report has been sent successfully.' => __('Diagnostic report has been sent successfully.', 'wordfence'), - 'Directory Listing Disabled' => __('Directory Listing Disabled', 'wordfence'), - 'Directory listing has been disabled on your server.' => __('Directory listing has been disabled on your server.', 'wordfence'), - 'Disabled' => __('Disabled', 'wordfence'), - 'Dismiss' => __('Dismiss', 'wordfence'), - 'Don\'t ask again' => __('Don\'t ask again', 'wordfence'), - 'Download' => __('Download', 'wordfence'), - 'Download Backup File' => __('Download Backup File', 'wordfence'), - 'Each line of 16 letters and numbers is a single recovery code, with optional spaces for readability. When typing your password, enter "wf" followed by the entire code like "mypassword wf1234 5678 90AB CDEF". If your site shows a separate prompt for entering a code after entering only your username and password, enter only the code like "1234 5678 90AB CDEF". Your recovery codes are:' => __('Each line of 16 letters and numbers is a single recovery code, with optional spaces for readability. When typing your password, enter "wf" followed by the entire code like "mypassword wf1234 5678 90AB CDEF". If your site shows a separate prompt for entering a code after entering only your username and password, enter only the code like "1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence'), - 'Email Diagnostic Report' => __('Email Diagnostic Report', 'wordfence'), - 'Email Wordfence Activity Log' => __('Email Wordfence Activity Log', 'wordfence'), - 'Enter a valid IP or domain' => __('Enter a valid IP or domain', 'wordfence'), - 'Enter the email address you would like to send the Wordfence activity log to. Note that the activity log may contain thousands of lines of data. This log is usually only sent to a member of the Wordfence support team. It also contains your PHP configuration from the phpinfo() function for diagnostic data.' => __('Enter the email address you would like to send the Wordfence activity log to. Note that the activity log may contain thousands of lines of data. This log is usually only sent to a member of the Wordfence support team. It also contains your PHP configuration from the phpinfo() function for diagnostic data.', 'wordfence'), - 'Error' => __('Error', 'wordfence'), - 'Error Enabling All Options Page' => __('Error Enabling All Options Page', 'wordfence'), - 'Error Restoring Defaults' => __('Error Restoring Defaults', 'wordfence'), - 'Error Saving Option' => __('Error Saving Option', 'wordfence'), - 'Error Saving Options' => __('Error Saving Options', 'wordfence'), - 'Failed Login' => __('Failed Login', 'wordfence'), - 'Failed Login: Invalid Username' => __('Failed Login: Invalid Username', 'wordfence'), - 'Failed Login: Valid Username' => __('Failed Login: Valid Username', 'wordfence'), - 'File hidden successfully' => __('File hidden successfully', 'wordfence'), - 'File restored OK' => __('File restored OK', 'wordfence'), - 'Filter Traffic' => __('Filter Traffic', 'wordfence'), - 'Firewall Response' => __('Firewall Response', 'wordfence'), - 'Full Path Disclosure' => __('Full Path Disclosure', 'wordfence'), - 'Google Bot' => __('Google Bot', 'wordfence'), - 'Google Crawlers' => __('Google Crawlers', 'wordfence'), - 'HTTP Response Code' => __('HTTP Response Code', 'wordfence'), - 'Human' => __('Human', 'wordfence'), - 'Humans' => __('Humans', 'wordfence'), - 'IP' => __('IP', 'wordfence'), - 'Key:' => __('Key:', 'wordfence'), - 'Last Updated: %s' => /* translators: Localized date. */ __('Last Updated: %s', 'wordfence'), - 'Learn more about repairing modified files.' => __('Learn more about repairing modified files.', 'wordfence'), - 'Loading...' => __('Loading...', 'wordfence'), - 'Locked Out' => __('Locked Out', 'wordfence'), - 'Locked out from logging in' => __('Locked out from logging in', 'wordfence'), - 'Logged In' => __('Logged In', 'wordfence'), - 'Logins' => __('Logins', 'wordfence'), - 'Logins and Logouts' => __('Logins and Logouts', 'wordfence'), - 'Look up IP or Domain' => __('Look up IP or Domain', 'wordfence'), - 'Manual block by administrator' => __('Manual block by administrator', 'wordfence'), - 'Next Update Check: %s' => /* translators: Localized date. */ __('Next Update Check: %s', 'wordfence'), - 'No activity to report yet. Please complete your first scan.' => __('No activity to report yet. Please complete your first scan.', 'wordfence'), - 'No issues have been ignored.' => __('No issues have been ignored.', 'wordfence'), - 'No new issues have been found.' => __('No new issues have been found.', 'wordfence'), - 'No rules were updated. Please verify you have permissions to write to the /wp-content/wflogs directory.' => __('No rules were updated. Please verify you have permissions to write to the /wp-content/wflogs directory.', 'wordfence'), - 'No rules were updated. Please verify your website can reach the Wordfence servers.' => __('No rules were updated. Please verify your website can reach the Wordfence servers.', 'wordfence'), - 'No rules were updated. Your website has reached the maximum number of rule update requests. Please try again later.' => __('No rules were updated. Your website has reached the maximum number of rule update requests. Please try again later.', 'wordfence'), - 'Note: Status will update when changes are saved' => __('Note: Status will update when changes are saved', 'wordfence'), - 'OK' => __('OK', 'wordfence'), - 'Pages Not Found' => __('Pages Not Found', 'wordfence'), - 'Paid Members Only' => __('Paid Members Only', 'wordfence'), - 'Please enter a valid IP address or domain name for your whois lookup.' => __('Please enter a valid IP address or domain name for your whois lookup.', 'wordfence'), - 'Please enter a valid email address.' => __('Please enter a valid email address.', 'wordfence'), - 'Please include your support ticket number or forum username.' => __('Please include your support ticket number or forum username.', 'wordfence'), - 'Please make a backup of this file before proceeding. If you need to restore this backup file, you can copy it to the following path from your site\'s root:' => __('Please make a backup of this file before proceeding. If you need to restore this backup file, you can copy it to the following path from your site\'s root:', 'wordfence'), - 'Please specify a reason' => __('Please specify a reason', 'wordfence'), - 'Please specify a valid IP address range in the form of "1.2.3.4 - 1.2.3.5" without quotes. Make sure the dash between the IP addresses in a normal dash (a minus sign on your keyboard) and not another character that looks like a dash.' => __('Please specify a valid IP address range in the form of "1.2.3.4 - 1.2.3.5" without quotes. Make sure the dash between the IP addresses in a normal dash (a minus sign on your keyboard) and not another character that looks like a dash.', 'wordfence'), - 'Please specify either an IP address range, Hostname or a web browser pattern to match.' => __('Please specify either an IP address range, Hostname or a web browser pattern to match.', 'wordfence'), - 'Recent Activity' => __('Recent Activity', 'wordfence'), - 'Recovery Codes' => __('Recovery Codes', 'wordfence'), - 'Redirected' => __('Redirected', 'wordfence'), - 'Redirected by Country Blocking bypass URL' => __('Redirected by Country Blocking bypass URL', 'wordfence'), - 'Referer' => __('Referer', 'wordfence'), - 'Registered Users' => __('Registered Users', 'wordfence'), - 'Restore Defaults' => __('Restore Defaults', 'wordfence'), - 'Rule Update Failed' => __('Rule Update Failed', 'wordfence'), - 'Rules Updated' => __('Rules Updated', 'wordfence'), - 'Save Changes' => __('Save Changes', 'wordfence'), - 'Scan Complete.' => __('Scan Complete.', 'wordfence'), - 'Scan the code below with your authenticator app to add this account. Some authenticator apps also allow you to type in the text version instead.' => __('Scan the code below with your authenticator app to add this account. Some authenticator apps also allow you to type in the text version instead.', 'wordfence'), - 'Security Event' => __('Security Event', 'wordfence'), - 'Send' => __('Send', 'wordfence'), - 'Sorry, but no data for that IP or domain was found.' => __('Sorry, but no data for that IP or domain was found.', 'wordfence'), - 'Specify a valid IP range' => __('Specify a valid IP range', 'wordfence'), - 'Specify a valid hostname' => __('Specify a valid hostname', 'wordfence'), - 'Specify an IP range, Hostname or Browser pattern' => __('Specify an IP range, Hostname or Browser pattern', 'wordfence'), - 'Success deleting file' => __('Success deleting file', 'wordfence'), - 'Success removing option' => __('Success removing option', 'wordfence'), - 'Success restoring file' => __('Success restoring file', 'wordfence'), - 'Success updating option' => __('Success updating option', 'wordfence'), - 'Successfully deleted admin' => __('Successfully deleted admin', 'wordfence'), - 'Successfully revoked admin' => __('Successfully revoked admin', 'wordfence'), - 'Test Email Sent' => __('Test Email Sent', 'wordfence'), - 'The \'How does Wordfence get IPs\' option was successfully updated to the recommended value.' => __('The \'How does Wordfence get IPs\' option was successfully updated to the recommended value.', 'wordfence'), - 'The Full Path disclosure issue has been fixed' => __('The Full Path disclosure issue has been fixed', 'wordfence'), - 'The admin user %s was successfully deleted.' => /* translators: WordPress username. */ __('The admin user %s was successfully deleted.', 'wordfence'), - 'The file %s was successfully deleted.' => /* translators: File path. */ __('The file %s was successfully deleted.', 'wordfence'), - 'The file %s was successfully hidden from public view.' => /* translators: File path. */ __('The file %s was successfully hidden from public view.', 'wordfence'), - 'The file %s was successfully restored.' => /* translators: File path. */ __('The file %s was successfully restored.', 'wordfence'), - 'The option %s was successfully removed.' => /* translators: WordPress option. */ __('The option %s was successfully removed.', 'wordfence'), - 'The request has been allowlisted. Please try it again.' => __('The request has been allowlisted. Please try it again.', 'wordfence'), - 'There was an error while sending the email.' => __('There was an error while sending the email.', 'wordfence'), - 'This will be shown only once. Keep these codes somewhere safe.' => __('This will be shown only once. Keep these codes somewhere safe.', 'wordfence'), - 'Throttled' => __('Throttled', 'wordfence'), - 'Two Factor Status' => __('Two Factor Status', 'wordfence'), - 'Type' => __('Type', 'wordfence'), - 'Type: %s' => /* translators: HTTP client type. */ __('Type: %s', 'wordfence'), - 'URL' => __('URL', 'wordfence'), - 'Unable to automatically hide file' => __('Unable to automatically hide file', 'wordfence'), - 'Use one of these %s codes to log in if you are unable to access your phone. Codes are 16 characters long, plus optional spaces. Each one may be used only once.' => /* translators: 2FA backup codes. */ __('Use one of these %s codes to log in if you are unable to access your phone. Codes are 16 characters long, plus optional spaces. Each one may be used only once.', 'wordfence'), - 'Use one of these %s codes to log in if you lose access to your authenticator device. Codes are 16 characters long, plus optional spaces. Each one may be used only once.' => /* translators: 2FA backup codes. */ __('Use one of these %s codes to log in if you lose access to your authenticator device. Codes are 16 characters long, plus optional spaces. Each one may be used only once.', 'wordfence'), - 'User Agent' => __('User Agent', 'wordfence'), - 'User ID' => __('User ID', 'wordfence'), - 'Username' => __('Username', 'wordfence'), - 'WHOIS LOOKUP' => __('WHOIS LOOKUP', 'wordfence'), - 'We are about to change your <em>.htaccess</em> file. Please make a backup of this file before proceeding.' => __('We are about to change your <em>.htaccess</em> file. Please make a backup of this file before proceeding.', 'wordfence'), - 'We can\'t modify your .htaccess file for you because: %s' => /* translators: Error message. */ __('We can\'t modify your .htaccess file for you because: %s', 'wordfence'), - 'We encountered a problem' => __('We encountered a problem', 'wordfence'), - 'Wordfence Firewall blocked a background request to WordPress for the URL %s. If this occurred as a result of an intentional action, you may consider allowlisting the request to allow it in the future.' => /* translators: URL. */ __('Wordfence Firewall blocked a background request to WordPress for the URL %s. If this occurred as a result of an intentional action, you may consider allowlisting the request to allow it in the future.', 'wordfence'), - 'Wordfence is working...' => __('Wordfence is working...', 'wordfence'), - 'You are using Nginx as your web server. You\'ll need to disable autoindexing in your nginx.conf. See the <a target=\'_blank\' rel=\'noopener noreferrer\' href=\'https://nginx.org/en/docs/http/ngx_http_autoindex_module.html\'>Nginx docs for more info</a> on how to do this.' => __('You are using Nginx as your web server. You\'ll need to disable autoindexing in your nginx.conf. See the <a target=\'_blank\' rel=\'noopener noreferrer\' href=\'https://nginx.org/en/docs/http/ngx_http_autoindex_module.html\'>Nginx docs for more info</a> on how to do this.', 'wordfence'), - 'You are using an Nginx web server and using a FastCGI processor like PHP5-FPM. You will need to manually delete or hide those files.' => __('You are using an Nginx web server and using a FastCGI processor like PHP5-FPM. You will need to manually delete or hide those files.', 'wordfence'), - 'You are using an Nginx web server and using a FastCGI processor like PHP5-FPM. You will need to manually modify your php.ini to disable <em>display_error</em>' => __('You are using an Nginx web server and using a FastCGI processor like PHP5-FPM. You will need to manually modify your php.ini to disable <em>display_error</em>', 'wordfence'), - 'You forgot to include a reason you\'re blocking this IP range. We ask you to include this for your own record keeping.' => __('You forgot to include a reason you\'re blocking this IP range. We ask you to include this for your own record keeping.', 'wordfence'), - 'You have unsaved changes to your options. If you leave this page, those changes will be lost.' => __('You have unsaved changes to your options. If you leave this page, those changes will be lost.', 'wordfence'), - 'Your .htaccess has been updated successfully. Please verify your site is functioning normally.' => __('Your .htaccess has been updated successfully. Please verify your site is functioning normally.', 'wordfence'), - 'Your Wordfence activity log was sent to %s' => /* translators: Email address. */ __('Your Wordfence activity log was sent to %s', 'wordfence'), - 'Your rules have been updated successfully.' => __('Your rules have been updated successfully.', 'wordfence'), - 'Your rules have been updated successfully. You are currently using the free version of Wordfence. Upgrade to Wordfence premium to have your rules updated automatically as new threats emerge. <a href="https://www.wordfence.com/wafUpdateRules1/wordfence-signup/">Click here to purchase a premium license</a>. <em>Note: Your rules will still update every 30 days as a free user.</em>' => __('Your rules have been updated successfully. You are currently using the free version of Wordfence. Upgrade to Wordfence premium to have your rules updated automatically as new threats emerge. <a href="https://www.wordfence.com/wafUpdateRules1/wordfence-signup/">Click here to purchase a premium license</a>. <em>Note: Your rules will still update every 30 days as a free user.</em>', 'wordfence'), - 'Your test email was sent to the requested email address. The result we received from the WordPress wp_mail() function was: %s<br /><br />A \'True\' result means WordPress thinks the mail was sent without errors. A \'False\' result means that WordPress encountered an error sending your mail. Note that it\'s possible to get a \'True\' response with an error elsewhere in your mail system that may cause emails to not be delivered.' => /* translators: wp_mail() return value. */ __('Your test email was sent to the requested email address. The result we received from the WordPress wp_mail() function was: %s<br /><br />A \'True\' result means WordPress thinks the mail was sent without errors. A \'False\' result means that WordPress encountered an error sending your mail. Note that it\'s possible to get a \'True\' response with an error elsewhere in your mail system that may cause emails to not be delivered.', 'wordfence'), - 'blocked by firewall' => __('blocked by firewall', 'wordfence'), - 'blocked by firewall for %s' => /* translators: Reason for firewall action. */ __('blocked by firewall for %s', 'wordfence'), - 'blocked by real-time IP blocklist' => __('blocked by real-time IP blocklist', 'wordfence'), - 'blocked by the Wordfence Security Network' => __('blocked by the Wordfence Security Network', 'wordfence'), - 'blocked for %s' => /* translators: Reason for firewall action. */ __('blocked for %s', 'wordfence'), - 'locked out from logging in' => __('locked out from logging in', 'wordfence'), - )); - } - public static function showTOUPPOverlay($classList) { - return trim($classList . ' wf-toupp-required'); - } - public static function activation_warning(){ - $activationError = get_option('wf_plugin_act_error', ''); - if(strlen($activationError) > 400){ - $activationError = substr($activationError, 0, 400) . '...[output truncated]'; - } - if($activationError){ - echo '<div id="wordfenceConfigWarning" class="updated fade"><p><strong>' . - __('Wordfence generated an error on activation. The output we received during activation was:', 'wordfence') - . '</strong> ' . wp_kses($activationError, array()) . '</p></div>'; - } - delete_option('wf_plugin_act_error'); - } - public static function noKeyError(){ - echo '<div id="wordfenceConfigWarning" class="fade error"><p>' . - sprintf('<strong>%s</strong> ', __("Wordfence's license key is missing.", 'wordfence')) . - wp_kses(sprintf(__("This could be caused by a database problem. You may need to repair your \"wfconfig\" database table or fix your database user's privileges if they have changed recently, or you may need to reinstall Wordfence. Please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">contact Wordfence support<span class=\"screen-reader-text\"> (" . esc_html__('opens in new tab', 'wordfence') . ")</span></a> if you need help.", 'wordfence'), wfSupportController::esc_supportURL()), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))) - . '</p></div>'; - } - public static function wafConfigInaccessibleNotice() { - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF&wafconfigrebuild=1'); - } - else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF&wafconfigrebuild=1'); - } - $wafMenuURL = add_query_arg(array( - 'waf-nonce' => wp_create_nonce('wafconfigrebuild'), - ), $wafMenuURL); - - echo '<div id="wafConfigInaccessibleNotice" class="fade error"><p><strong>' . __('The Wordfence Web Application Firewall cannot run.', 'wordfence') . '</strong> ' . - sprintf( - /* translators: 1. WordPress admin panel URL. 2. Support URL. */ - __('The configuration files are corrupt or inaccessible by the web server, which is preventing the WAF from functioning. Please verify the web server has permission to access the configuration files. You may also try to rebuild the configuration file by <a href="%1$s">clicking here</a>. It will automatically resume normal operation when it is fixed. <a class="wfhelp" target="_blank" rel="noopener noreferrer" href="%2$s"><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - $wafMenuURL, - wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_WAF_INACCESSIBLE_CONFIG) - ) . '</p></div>'; - } - public static function wafStorageEngineFallbackNotice() { - echo '<div class="notice notice-warning"><p>'.__('The WAF storage engine is currently set to mysqli, but Wordfence is unable to use the database. The WAF will fall back to using local file system storage instead.', 'wordfence').'</p></div>'; - } - public static function wafConfigNeedsUpdate_mod_php() { - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF&wafconfigfixmodphp=1'); - } - else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF&wafconfigfixmodphp=1'); - } - $wafMenuURL = add_query_arg(array( - 'waf-nonce' => wp_create_nonce('wafconfigfixmodphp'), - ), $wafMenuURL); - - echo '<div id="wafConfigNeedsUpdateNotice" class="fade error"><p><strong>' . __('The Wordfence Web Application Firewall needs a configuration update.', 'wordfence') . '</strong> ' . - sprintf( - /* translators: 1. WordPress admin panel URL. 2. Support URL. */ - __('It is currently configured to use an older version of PHP and may become deactivated if PHP is updated. You may perform the configuration update automatically by <a href="%1$s">clicking here</a>. <a class="wfhelp" target="_blank" rel="noopener noreferrer" href="%2$s"><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - $wafMenuURL, - wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_WAF_MOD_PHP_FIX) - ) . '</p></div>'; - } - public static function wafConfigNeedsFixed_mod_php() { - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF&wafconfigfixmodphp=1'); - } - else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF&wafconfigfixmodphp=1'); - } - $wafMenuURL = add_query_arg(array( - 'waf-nonce' => wp_create_nonce('wafconfigfixmodphp'), - ), $wafMenuURL); - - echo '<div id="wafConfigNeedsFixedNotice" class="fade error"><p><strong>' . __('The Wordfence Web Application Firewall needs a configuration update.', 'wordfence') . '</strong> ' . - sprintf( - /* translators: 1. WordPress admin panel URL. 2. Support URL. */ - __('It is not currently in extended protection mode but was configured to use an older version of PHP and may have become deactivated when PHP was updated. You may perform the configuration update automatically by <a href="%1$s">clicking here</a> or use the "Optimize the Wordfence Firewall" button on the Firewall Options page. <a class="wfhelp" target="_blank" rel="noopener noreferrer" href="%2$s"><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - $wafMenuURL, - wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_WAF_MOD_PHP_FIX) - ) . '</p></div>'; - } - public static function wafReadOnlyNotice() { - echo '<div id="wordfenceWAFReadOnlyNotice" class="fade error"><p><strong>' . __('The Wordfence Web Application Firewall is in read-only mode.', 'wordfence') . '</strong> ' . sprintf('PHP is currently running as a command line user and to avoid file permission issues, the WAF is running in read-only mode. It will automatically resume normal operation when run normally by a web server. <a class="wfhelp" target="_blank" rel="noopener noreferrer" href="%s"><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_WAF_READ_ONLY_WARNING)) . '</p></div>'; - } - public static function misconfiguredHowGetIPsNotice() { - $url = network_admin_url('admin.php?page=Wordfence&subpage=global_options'); - $existing = wfConfig::get('howGetIPs', ''); - $recommendation = wfConfig::get('detectProxyRecommendation', ''); - - $existingMsg = ''; - if ($existing == 'REMOTE_ADDR') { - $existingMsg = __('This site is currently using PHP\'s built in REMOTE_ADDR.', 'wordfence'); - } - else if ($existing == 'HTTP_X_FORWARDED_FOR') { - $existingMsg = __('This site is currently using the X-Forwarded-For HTTP header, which should only be used when the site is behind a front-end proxy that outputs this header.', 'wordfence'); - } - else if ($existing == 'HTTP_X_REAL_IP') { - $existingMsg = __('This site is currently using the X-Real-IP HTTP header, which should only be used when the site is behind a front-end proxy that outputs this header.', 'wordfence'); - } - else if ($existing == 'HTTP_CF_CONNECTING_IP') { - $existingMsg = __('This site is currently using the Cloudflare "CF-Connecting-IP" HTTP header, which should only be used when the site is behind Cloudflare.', 'wordfence'); - } - - $recommendationMsg = ''; - if ($recommendation == 'REMOTE_ADDR') { - $recommendationMsg = __('For maximum security use PHP\'s built in REMOTE_ADDR.', 'wordfence'); - } - else if ($recommendation == 'HTTP_X_FORWARDED_FOR') { - $recommendationMsg = __('This site appears to be behind a front-end proxy, so using the X-Forwarded-For HTTP header will resolve to the correct IPs.', 'wordfence'); - } - else if ($recommendation == 'HTTP_X_REAL_IP') { - $recommendationMsg = __('This site appears to be behind a front-end proxy, so using the X-Real-IP HTTP header will resolve to the correct IPs.', 'wordfence'); - } - else if ($recommendation == 'HTTP_CF_CONNECTING_IP') { - $recommendationMsg = __('This site appears to be behind Cloudflare, so using the Cloudflare "CF-Connecting-IP" HTTP header will resolve to the correct IPs.', 'wordfence'); - } - echo '<div id="wordfenceMisconfiguredHowGetIPsNotice" class="fade error"><p><strong>' . - __('Your \'How does Wordfence get IPs\' setting is misconfigured.', 'wordfence') - . '</strong> ' . $existingMsg . ' ' . $recommendationMsg . ' <a href="#" onclick="wordfenceExt.misconfiguredHowGetIPsChoice(\'yes\'); return false;" role="button">' . - __('Click here to use the recommended setting', 'wordfence') - . '</a> ' . - __('or', 'wordfence') - . ' <a href="' . $url . '">' . - __('visit the options page', 'wordfence') - . '</a> ' . - __('to manually update it.', 'wordfence') - . '</p><p> - <a class="wf-btn wf-btn-default wf-btn-sm wf-dismiss-link" href="#" onclick="wordfenceExt.misconfiguredHowGetIPsChoice(\'no\'); return false;" role="button">' . - __('Dismiss', 'wordfence') - . '</a> <a class="wfhelp" target="_blank" rel="noopener noreferrer" href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS) . '"><span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a></p></div>'; - } - public static function autoUpdateNotice(){ - echo '<div id="wordfenceAutoUpdateChoice" class="fade error"><p><strong>' . - __('Do you want Wordfence to stay up-to-date automatically?', 'wordfence') - . '</strong>   <a href="#" onclick="wordfenceExt.autoUpdateChoice(\'yes\'); return false;" role="button">'. - __('Yes, enable auto-update.', 'wordfence') - . '</a>  |  <a href="#" onclick="wordfenceExt.autoUpdateChoice(\'no\'); return false;" role="button">' . - __('No thanks.', 'wordfence') - . '</a></p></div>'; - } - private static function getNoticeHideKey($id) { - return "wordfence_dismiss_$id"; - } - private static function hideNoticeForUser($id) { - $user = get_current_user_id(); - if ($user !== 0) - update_user_meta($user, self::getNoticeHideKey($id), true); - } - private static function hasHiddenNotice($id) { - $user = get_current_user_id(); - if ($user !== 0) - return get_user_meta($user, self::getNoticeHideKey($id), true); - return false; - } - public static function showUnitedStatesBlockedNotice() { - $id = "wordfenceUnitedStatesBlocked"; - if (self::hasHiddenNotice($id)) - return; -?> - <div id="<?php echo esc_attr($id) ?>" class="notice notice-warning"> - <p> - <?php esc_html_e('Wordfence country blocking is currently set to block the United States. We recommend allowing access from the United States for Google and other benign crawlers, unless you choose to only block the login page.', 'wordfence') ?> - <a target="_blank" rel="noopener noreferrer" href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING_FULL_SITE) ?>"><?php esc_html_e('Learn More', 'wordfence') ?></a> - <a class="wf-btn wf-btn-default wf-btn-sm wf-dismiss-link" href="#" onclick="<?php echo esc_attr('wordfenceExt.hideNoticeForUser(' . json_encode($id) . '); return false;') ?>"><?php esc_html_e('Dismiss', 'wordfence') ?></a> - </p> - </div> -<?php - } - public static function isWordfenceAdminPage() { - if (isset($_GET['page']) && is_string($_GET['page'])) { - foreach (array('Wordfence', 'WFLS') as $prefix) { - if (strpos($_GET['page'], $prefix) === 0) - return true; - } - } - return false; - } - public static function getDashboardNotificationCountIcon() { - $notificationCount = count(wfNotification::notifications()); - $updatingNotifications = get_site_transient('wordfence_updating_notifications'); - $hidden = ($notificationCount == 0 || $updatingNotifications ? ' wf-hidden' : ''); - $formattedCount = number_format_i18n($notificationCount); - return " <span class=\"update-plugins wf-menu-badge wf-notification-count-container{$hidden}\" title=\"" . esc_attr($formattedCount) . '"><span class="update-count wf-notification-count-value">' . esc_html($formattedCount) . '</span></span>'; - } - - public static function isWordfenceInstallPage() { - return self::isPage('WordfenceInstall'); - } - - public static function isWordfenceSupportPage() { - return self::isPage('WordfenceSupport'); - } - - public static function admin_menus(){ - if(! wfUtils::isAdmin()){ return; } - $warningAdded = self::isWordfenceInstallPage(); - if(get_option('wf_plugin_act_error', false)){ - if(wfUtils::isAdminPageMU()){ - add_action('network_admin_notices', 'wordfence::activation_warning'); - } else { - add_action('admin_notices', 'wordfence::activation_warning'); - } - $warningAdded = true; - } - if(!wfConfig::get('apiKey') && !wfOnboardingController::shouldShowAnyAttempt()){ - if(wfUtils::isAdminPageMU()){ - add_action('network_admin_notices', 'wordfence::noKeyError'); - } else { - add_action('admin_notices', 'wordfence::noKeyError'); - } - $warningAdded = true; - } - - $firewall = new wfFirewall(); - if (!empty($_GET['page']) && preg_match('/^Wordfence/i', $_GET['page'])) { - if (!$firewall->testConfig()) { - $warningAdded = true; - if (wfUtils::isAdminPageMU()) { - add_action('network_admin_notices', 'wordfence::wafConfigInaccessibleNotice'); - } - else { - add_action('admin_notices', 'wordfence::wafConfigInaccessibleNotice'); - } - } - else if (!$warningAdded && method_exists('wfWAF', 'hasFallbackStorageEngine') && wfWAF::hasFallbackStorageEngine()) { - $warningAdded = true; - add_action(wfUtils::isAdminPageMU()?'network_admin_notices':'admin_notices', 'wordfence::wafStorageEngineFallbackNotice'); - } - } - - if (!$warningAdded && !WFWAF_SUBDIRECTORY_INSTALL && !wfWAFAutoPrependHelper::verifyHtaccessMod_php()) { - if (WFWAF_AUTO_PREPEND) { //Active, running PHP 5 only mod_php block - $warningAdded = true; - if (wfUtils::isAdminPageMU()) { - add_action('network_admin_notices', 'wordfence::wafConfigNeedsUpdate_mod_php'); - } - else { - add_action('admin_notices', 'wordfence::wafConfigNeedsUpdate_mod_php'); - } - } - else if (PHP_MAJOR_VERSION > 5) { //Inactive, probably deactivated by updating from PHP 5 -> 7 due to no PHP 7 mod_php block - $warningAdded = true; - if (wfUtils::isAdminPageMU()) { - add_action('network_admin_notices', 'wordfence::wafConfigNeedsFixed_mod_php'); - } - else { - add_action('admin_notices', 'wordfence::wafConfigNeedsFixed_mod_php'); - } - } - } - - if (wfOnboardingController::shouldShowAttempt3() || wfConfig::get('touppPromptNeeded')) { //Both top banners - $warningAdded = true; - } - - //Check WAF rules status - $firewall = new wfFirewall(); - if ($firewall->firewallMode() != wfFirewall::FIREWALL_MODE_DISABLED) { - try { - $lastChecked = (int) wfWAF::getInstance()->getStorageEngine()->getConfig('lastRuleUpdateCheck', null, 'transient'); - $lastUpdated = (int) wfWAF::getInstance()->getStorageEngine()->getConfig('rulesLastUpdated', null, 'transient'); - $threshold = time() - (86400 * (wfConfig::get('isPaid') ? 2.5 : 9)); //Refresh rate + 2 days - if ($lastChecked > 0 && $lastUpdated > 0 && $lastChecked < $threshold) { - $nextUpdate = PHP_INT_MAX; - $cron = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('cron', null, 'livewaf'); - if (is_array($cron)) { - /** @var wfWAFCronEvent $event */ - foreach ($cron as $index => $event) { - if ($event instanceof wfWAFCronFetchRulesEvent) { - $event->setWaf(wfWAF::getInstance()); - if (!$event->isInPast()) { - $nextUpdate = min($nextUpdate, $event->getFireTime()); - } - } - } - } - - $message = sprintf( - /* translators: Localized date. */ - __('The last rules update for the Wordfence Web Application Firewall was unsuccessful. The last successful update check was %s, so this site may be missing new rules added since then.', 'wordfence'), - wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), $lastChecked) - ); - - if (!$firewall->isSubDirectoryInstallation()) { - if ($nextUpdate < PHP_INT_MAX) { - $message .= ' ' . sprintf( - /* translators: 1. Localized date. 2. WordPress admin panel URL. */ - __('You may wait for the next automatic attempt at %1$s or try to <a href="%2$s">Manually Update</a> by clicking the "Manually Refresh Rules" button below the Rules list.', 'wordfence'), - wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), $nextUpdate), - esc_url(network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#wf-option-wafRules')) - ); - } - else { - $message .= ' ' . sprintf(/* translators: WordPress admin panel URL. */ __('You may wait for the next automatic attempt or try to <a href="%s">Manually Update</a> by clicking the "Manually Refresh Rules" button below the Rules list.', 'wordfence'), esc_url(network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#waf-rules-next-update'))); - } - } - else { - if ($nextUpdate < PHP_INT_MAX) { - $message .= ' ' . sprintf(/* translators: WordPress admin panel URL. */ __('You may wait for the next automatic attempt at %s or log into the parent site to manually update by clicking the "Manually Refresh Rules" button below the Rules list.', 'wordfence'), wfUtils::formatLocalTime(get_option('date_format') . ' ' . get_option('time_format'), $nextUpdate)); - } - else { - $message .= ' ' . __('You may wait for the next automatic attempt or log into the parent site to manually update by clicking the "Manually Refresh Rules" button below the Rules list.', 'wordfence'); - } - } - - wfAdminNoticeQueue::addAdminNotice(wfAdminNotice::SEVERITY_CRITICAL, $message, 'waf-rules-failed'); - } - else { - wfAdminNoticeQueue::removeAdminNotice(false, 'waf-rules-failed'); - } - } - catch (wfWAFStorageFileException $e) { - error_log($e->getMessage()); - } - } - else { - wfAdminNoticeQueue::removeAdminNotice(false, 'waf-rules-failed'); - } - - if (wfAdminNoticeQueue::enqueueAdminNotices()) { - $warningAdded = true; - } - - $existing = wfConfig::get('howGetIPs', ''); - $recommendation = wfConfig::get('detectProxyRecommendation', ''); - $canDisplayMisconfiguredHowGetIPs = true; - if (empty($existing) || empty($recommendation) || $recommendation == 'UNKNOWN' || $recommendation == 'DEFERRED' || $existing == $recommendation) { - $canDisplayMisconfiguredHowGetIPs = false; - } - if (!$warningAdded && $canDisplayMisconfiguredHowGetIPs && !wfUtils::truthyToBoolean(wfConfig::get('misconfiguredHowGetIPsChoice' . WORDFENCE_VERSION)) && !(defined('WORDFENCE_DISABLE_MISCONFIGURED_HOWGETIPS') && WORDFENCE_DISABLE_MISCONFIGURED_HOWGETIPS)) { - $warningAdded = true; - if (wfUtils::isAdminPageMU()) { - add_action('network_admin_notices', 'wordfence::misconfiguredHowGetIPsNotice'); - } - else { - add_action('admin_notices', 'wordfence::misconfiguredHowGetIPsNotice'); - } - } - if (!$warningAdded && method_exists(wfWAF::getInstance(), 'isReadOnly') && wfWAF::getInstance()->isReadOnly()) { - $warningAdded = true; - if (wfUtils::isAdminPageMU()) { - add_action('network_admin_notices', 'wordfence::wafReadOnlyNotice'); - } - else { - add_action('admin_notices', 'wordfence::wafReadOnlyNotice'); - } - } - if(! $warningAdded){ - if (!wfConfig::get('autoUpdate') && !wfConfig::get('autoUpdateChoice')) { - $warningAdded = true; - if (wfUtils::isAdminPageMU()) { - add_action('network_admin_notices', 'wordfence::autoUpdateNotice'); - } else { - add_action('admin_notices', 'wordfence::autoUpdateNotice'); - } - } - } - - if (!empty($_GET['page']) && $_GET['page'] === 'WordfenceWAF' && !empty($_GET['wafconfigrebuild']) && !WFWAF_SUBDIRECTORY_INSTALL) { - check_admin_referer('wafconfigrebuild', 'waf-nonce'); - - wfWAF::getInstance()->uninstall(); - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF'); - } else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF'); - } - wp_redirect($wafMenuURL); - exit; - } - - if (!empty($_GET['page']) && $_GET['page'] === 'WordfenceWAF' && !empty($_GET['wafconfigfixmodphp']) && !WFWAF_SUBDIRECTORY_INSTALL) { - check_admin_referer('wafconfigfixmodphp', 'waf-nonce'); - - wfWAFAutoPrependHelper::fixHtaccessMod_php(); - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF'); - } else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF'); - } - wp_redirect($wafMenuURL); - exit; - } - - if (!$warningAdded) { - foreach (wfBlock::countryBlocks() as $block) { - if ($block->parameters['blockSite']) { - foreach ($block->parameters['countries'] as $country) { - if (strtoupper($country) === 'US') { - add_action(wfUtils::isAdminPageMU() ? 'network_admin_notices' : 'admin_notices', 'wordfence::showUnitedStatesBlockedNotice'); - break 2; - } - } - } - } - } - - if (!$warningAdded && wfSupportController::shouldShowSatisfactionPrompt()) { - if (is_multisite()) { - add_action('network_admin_notices', 'wfSupportController::satisfactionPromptNotice'); - } - else { - add_action('admin_notices', 'wfSupportController::satisfactionPromptNotice'); - } - } - - if (self::isWordfenceAdminPage()) { - $dashboardExtra = ''; - } - else { - $dashboardExtra = self::getDashboardNotificationCountIcon(); - } - add_menu_page('Wordfence', "Wordfence{$dashboardExtra}", 'activate_plugins', 'Wordfence', 'wordfence::menu_dashboard', 'none'); - } - - //These are split to allow our module plugins to insert their menu item(s) at any point in the hierarchy - public static function admin_menus_20() { - $dashboardExtra = self::getDashboardNotificationCountIcon(); - add_submenu_page("Wordfence", __("Wordfence Dashboard", 'wordfence'), __("Dashboard", 'wordfence') . $dashboardExtra, "activate_plugins", "Wordfence", 'wordfence::menu_dashboard'); - } - - public static function admin_menus_30() { - add_submenu_page("Wordfence", __("Firewall", 'wordfence'), __("Firewall", 'wordfence'), "activate_plugins", "WordfenceWAF", 'wordfence::menu_firewall'); - if (wfConfig::get('displayTopLevelBlocking')) { - add_submenu_page("Wordfence", __("Blocking", 'wordfence'), __("Blocking", 'wordfence'), "activate_plugins", "WordfenceBlocking", 'wordfence::menu_blocking'); - } - } - - public static function admin_menus_40() { - add_submenu_page("Wordfence", __("Scan", 'wordfence'), __("Scan", 'wordfence'), "activate_plugins", "WordfenceScan", 'wordfence::menu_scan'); - } - - public static function admin_menus_50() { - add_submenu_page('Wordfence', __('Tools', 'wordfence'), __('Tools', 'wordfence'), 'activate_plugins', 'WordfenceTools', 'wordfence::menu_tools'); - if (wfConfig::get('displayTopLevelLiveTraffic')) { - add_submenu_page("Wordfence", __("Live Traffic", 'wordfence'), __("Live Traffic", 'wordfence'), "activate_plugins", "WordfenceLiveTraffic", 'wordfence::menu_tools'); - } - } - - public static function admin_menus_60() { - if (wfConfig::get('displayTopLevelOptions')) { - add_submenu_page("Wordfence", __("All Options", 'wordfence'), __("All Options", 'wordfence'), "activate_plugins", "WordfenceOptions", 'wordfence::menu_options'); - } - } - - public static function admin_menus_70() { - add_submenu_page('Wordfence', __('Help', 'wordfence'), __('Help', 'wordfence'), 'activate_plugins', 'WordfenceSupport', 'wordfence::menu_support'); - } - - public static function admin_menus_80() { - if (wfCentral::isSupported() && self::isPage('WordfenceCentral')) { - add_submenu_page('Wordfence', __('Wordfence Central', 'wordfence'), __('Wordfence Central', 'wordfence'), 'activate_plugins', 'WordfenceCentral', 'wordfence::menu_wordfence_central'); - } - } - - public static function admin_menus_85() { - if (wfOnboardingController::shouldShowAnyAttempt() || self::isWordfenceInstallPage()) { - add_submenu_page('Wordfence', __('Install Wordfence', 'wordfence'), __('Install', 'wordfence'), 'activate_plugins', 'WordfenceInstall', 'wordfence::menu_install'); - } - } - - public static function admin_menus_90() { - switch (wfLicense::current()->getType()) { - case wfLicense::TYPE_FREE: - $message = __('Upgrade to Premium', 'wordfence'); - $slug = 'WordfenceUpgradeToPremium'; - break; - case wfLicense::TYPE_PREMIUM: - $message = __('Upgrade to Care', 'wordfence'); - $slug = 'WordfenceUpgradeToCare'; - break; - case wfLicense::TYPE_CARE: - $message = __('Upgrade to Response', 'wordfence'); - $slug = 'WordfenceUpgradeToResponse'; - break; - default: - $message = __('Protect More Sites', 'wordfence'); - $slug = 'WordfenceProtectMoreSites'; - break; - } - add_submenu_page("Wordfence", $message, "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">" . $message . "</strong>", "activate_plugins", $slug, 'wordfence::_menu_noop'); - add_filter('clean_url', 'wordfence::_patchWordfenceSubmenuCallout', 10, 3); - } - - private static function isPage($page) { - return array_key_exists('page', $_GET) && $_GET['page'] === $page; - } - - public static function _patchWordfenceSubmenuCallout($url, $original_url, $_context){ - if (preg_match('/(?:WordfenceUpgradeTo(Premium|Care|Response))$/i', $url, $matches)) { - remove_filter('clean_url', 'wordfence::_patchWordfenceSubmenuCallout', 10); - return wfLicense::current()->getUpgradeUrl("menuUpgrade$matches[1]"); - } - else if (preg_match('/(?:WordfenceProtectMoreSites)$/i', $url)) { - remove_filter('clean_url', 'wordfence::_patchWordfenceSubmenuCallout', 10); - return 'https://www.wordfence.com/zz10/licenses?purchase'; - } - return $url; - } - public static function _menu_noop() { - //Do nothing - } - public static function _retargetWordfenceSubmenuCallout() { - echo <<<JQUERY -<script type="text/javascript"> -jQuery(document).ready(function($) { - $('#wfMenuCallout').closest('a').attr('target', '_blank').attr('rel', 'noopener noreferrer'); -}); -</script> -JQUERY; - - } - public static function admin_bar_menu() { - global $wp_admin_bar; - - if (wfUtils::isAdmin() && wfConfig::get('showAdminBarMenu')) { - $title = '<div id="wf-adminbar-icon" class="ab-item"></div>'; - $count = count(wfNotification::notifications()); - $sinceCount = count(wfNotification::notifications((int) get_user_meta(get_current_user_id(), 'wordfence-notifications', true))); - if ($sinceCount > 0) { - $counter = '<span id="wf-notification-popover" data-toggle="popover" data-trigger="focus" data-content="' . - esc_attr(/* translators: Number of notifications. */ _n('You have %d new Wordfence notification.', 'You have %d new Wordfence notifications.', $sinceCount, 'wordfence')) - . '" data-container="body" data-placement="wf-bottom"> </span>'; - update_user_meta(get_current_user_id(), 'wordfence-notifications', time()); - } - else { - $counter = ' '; - } - $badge = '<div class="wp-core-ui wp-ui-notification wf-notification-counter wf-notification-count-container' . ($count == 0 ? ' wf-hidden' : '') . '"><span class="wf-count wf-notification-count-value">' . $count . '</span></div>'; - $counter .= $badge; - - $wp_admin_bar->add_menu( array( - 'id' => 'wordfence-menu', - 'title' => $title . $counter, - 'href' => network_admin_url('admin.php?page=Wordfence'), - )); - $wp_admin_bar->add_menu( array( - 'parent' => 'wordfence-menu', - 'id' => 'wordfence-notifications', - 'title' => '<div id="wordfence-notifications-display" class="wf-adminbar-submenu-title">' . __('Notifications', 'wordfence') . '</div>' . $badge, - 'href' => network_admin_url('admin.php?page=Wordfence'), - )); - $wp_admin_bar->add_menu( array( - 'parent' => 'wordfence-menu', - 'id' => 'wordfence-javascripterror', - 'title' => '<div id="wordfence-javascripterror-display" class="wf-adminbar-submenu-title">' . __('JavaScript Errors', 'wordfence') . '</div><div class="wf-adminbar-status wf-adminbar-status-good">•</div>', - 'href' => 'javascript:void(0)', - )); - $wp_admin_bar->add_menu( array( - 'parent' => 'wordfence-menu', - 'id' => 'wordfence-malwareurl', - 'title' => '<div id="wordfence-malwareurl-display' . (is_admin() ? '-skip' : '') . '" class="wf-adminbar-submenu-title">' . __('Malware URLs', 'wordfence') . '</div><div class="wf-adminbar-status wf-adminbar-status-neutral">•</div>', - 'href' => network_admin_url('admin.php?page=WordfenceScan'), - )); - } - } - public static function menu_tools() { - wp_enqueue_style('wordfence-select2-css'); - wp_enqueue_script('wordfence-select2-js'); - - $subpage = filter_input(INPUT_GET, 'subpage'); - switch ($subpage) { - case 'livetraffic': - $content = self::_menu_tools_livetraffic(); - break; - - case 'whois': - $content = self::_menu_tools_whois(); - break; - - case 'diagnostics': - $content = self::_menu_tools_diagnostics(); - break; - - case 'importexport': - $content = self::_menu_tools_importexport(); - break; - - // case 'twofactor': - default: - if (wfCredentialsController::allowLegacy2FA()) { - $subpage = 'twofactor'; - $content = self::_menu_tools_twofactor(); - } - else { - $subpage = 'livetraffic'; - $content = self::_menu_tools_livetraffic(); - } - } - require(dirname(__FILE__) . '/menu_tools.php'); - } - - private static function _menu_tools_livetraffic() { - wp_enqueue_style('wordfence-jquery-ui-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-structure-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.structure.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-theme-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.theme.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-timepicker-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui-timepicker-addon.css'), array(), WORDFENCE_VERSION); - - wp_enqueue_script('wordfence-timepicker-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery-ui-timepicker-addon.js'), array('jquery', 'jquery-ui-datepicker', 'jquery-ui-slider'), WORDFENCE_VERSION); - wp_enqueue_script('wordfence-knockout-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/knockout-3.5.1.js'), array(), WORDFENCE_VERSION); - wp_enqueue_script('wordfence-live-traffic-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/admin.liveTraffic.js'), array('jquery', 'jquery-ui-tooltip'), WORDFENCE_VERSION); - - ob_start(); - require(dirname(__FILE__) . '/menu_tools_livetraffic.php'); - $content = ob_get_clean(); - return $content; - } - - private static function _menu_tools_whois() { - ob_start(); - require(dirname(__FILE__) . '/menu_tools_whois.php'); - $content = ob_get_clean(); - return $content; - } - - private static function _menu_tools_diagnostics() { - $emailForm = true; - $inEmail = false; - ob_start(); - require(dirname(__FILE__) . '/menu_tools_diagnostic.php'); - $content = ob_get_clean(); - return $content; - } - - private static function _menu_tools_importexport() { - ob_start(); - require(dirname(__FILE__) . '/menu_tools_importExport.php'); - $content = ob_get_clean(); - return $content; - } - - private static function _menu_tools_twofactor() { - ob_start(); - require(dirname(__FILE__) . '/menu_tools_twoFactor.php'); - $content = ob_get_clean(); - return $content; - } - - public static function menu_options() { - wp_enqueue_style('wordfence-jquery-ui-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-structure-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.structure.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-theme-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.theme.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-timepicker-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui-timepicker-addon.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-select2-css'); - - wp_enqueue_script('wordfence-timepicker-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery-ui-timepicker-addon.js'), array('jquery', 'jquery-ui-datepicker', 'jquery-ui-slider'), WORDFENCE_VERSION); - wp_enqueue_script('wordfence-select2-js'); - - try { - $wafData = self::_getWAFData(); - } - catch (wfWAFStorageFileConfigException $e) { - // We don't have anywhere to write files in this scenario. Let's notify the user to update the permissions. - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - $logPath = str_replace(ABSPATH, '~/', WFWAF_LOG_PATH); - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF&wafconfigrebuild=1'); - } else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF&wafconfigrebuild=1'); - } - $wafMenuURL = add_query_arg(array( - 'waf-nonce' => wp_create_nonce('wafconfigrebuild'), - ), $wafMenuURL); - $storageExceptionMessage = $e->getMessage() . ' ' . sprintf(__('<a href="%s">Click here</a> to rebuild the configuration file.', 'wordfence'), esc_url($wafMenuURL)); - } catch (wfWAFStorageFileException $e) { - // We don't have anywhere to write files in this scenario. Let's notify the user to update the permissions. - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - $logPath = str_replace(ABSPATH, '~/', WFWAF_LOG_PATH); - $storageExceptionMessage = sprintf(/* translators: File path. */ __('We were unable to write to %s which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.', 'wordfence'), $logPath); - } catch (wfWAFStorageEngineMySQLiException $e) { - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - $logPath = null; - $storageExceptionMessage = __('An error occured when fetching the WAF configuration from the database.', 'wordfence') . ' <pre>' . esc_html($e->getMessage()) . '</pre>'; - } - - require(dirname(__FILE__) . '/menu_options.php'); - } - - public static function menu_blocking() { - // Do nothing -- this action is forwarded in admin_init - } - - public static function menu_firewall() { - wp_enqueue_style('wordfence-jquery-ui-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-structure-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.structure.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-theme-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui.theme.min.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-jquery-ui-timepicker-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/jquery-ui-timepicker-addon.css'), array(), WORDFENCE_VERSION); - wp_enqueue_style('wordfence-select2-css'); - - wp_enqueue_script('wordfence-timepicker-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/jquery-ui-timepicker-addon.js'), array('jquery', 'jquery-ui-datepicker', 'jquery-ui-slider'), WORDFENCE_VERSION); - wp_enqueue_script('wordfence-select2-js'); - wp_enqueue_script('chart-js'); - - try { - $wafData = self::_getWAFData(); - } catch (wfWAFStorageFileConfigException $e) { - // We don't have anywhere to write files in this scenario. Let's notify the user to update the permissions. - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - - $logPath = str_replace(ABSPATH, '~/', WFWAF_LOG_PATH); - if (function_exists('network_admin_url') && is_multisite()) { - $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF&wafconfigrebuild=1'); - } else { - $wafMenuURL = admin_url('admin.php?page=WordfenceWAF&wafconfigrebuild=1'); - } - $wafMenuURL = add_query_arg(array( - 'waf-nonce' => wp_create_nonce('wafconfigrebuild'), - ), $wafMenuURL); - $storageExceptionMessage = $e->getMessage() . ' ' . sprintf(/* translators: WordPress admin panel URL. */ __('<a href="%s">Click here</a> to rebuild the configuration file.', 'wordfence'), esc_url($wafMenuURL)); - } catch (wfWAFStorageFileException $e) { - // We don't have anywhere to write files in this scenario. Let's notify the user to update the permissions. - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - $logPath = str_replace(ABSPATH, '~/', WFWAF_LOG_PATH); - $storageExceptionMessage = sprintf(/* translators: File path. */ __('We were unable to write to %s which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.', 'wordfence'), $logPath); - } catch (wfWAFStorageEngineMySQLiException $e) { - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - $logPath = null; - $storageExceptionMessage = __('An error occured when fetching the WAF configuration from the database.', 'wordfence') . ' <pre>' . esc_html($e->getMessage()) . '</pre>'; - } - - if (isset($_GET['subpage']) && $_GET['subpage'] == 'waf_options') { - require(dirname(__FILE__) . '/menu_firewall_waf_options.php'); - } - else if (isset($_GET['subpage']) && $_GET['subpage'] == 'blocking_options') { - require(dirname(__FILE__) . '/menu_firewall_blocking_options.php'); - } - else { - require(dirname(__FILE__) . '/menu_firewall.php'); - } - } - - public static function liveTrafficW3TCWarning() { - echo self::cachingWarning("W3 Total Cache"); - } - public static function liveTrafficSuperCacheWarning(){ - echo self::cachingWarning("WP Super Cache"); - } - public static function cachingWarning($plugin){ - return '<div id="wordfenceConfigWarning" class="error fade"><p><strong>' . - sprintf(/* translators: Plugin name. */ __('The Wordfence Live Traffic feature has been disabled because you have %s active which is not compatible with Wordfence Live Traffic.', 'wordfence'), $plugin) - . '</strong> ' . - sprintf(/* translators: 1. Plugin name. */ __('If you want to reenable Wordfence Live Traffic, you need to deactivate %1$s and then go to the Wordfence options page and reenable Live Traffic there. Wordfence does work with %1$s, however Live Traffic will be disabled and the Wordfence firewall will also count less hits per visitor because of the %1$s caching function. All other functions should work correctly.', 'wordfence'), $plugin) - . '</p></div>'; - } - public static function menu_dashboard() { - wp_enqueue_style('wordfence-select2-css'); - wp_enqueue_script('wordfence-select2-js'); - wp_enqueue_script('chart-js'); - - if (wfConfig::get('keyType') == wfLicense::KEY_TYPE_PAID_EXPIRED || (wfConfig::get('keyType') == wfLicense::KEY_TYPE_PAID_CURRENT && wfConfig::get('keyExpDays') < 30)) { - $api = new wfAPI(wfConfig::get('apiKey', ''), wfUtils::getWPVersion()); - try { - $api->call('check_api_key', array(), array(), false, 2); - } - catch (Exception $e) { - //Do nothing - } - } - - if (isset($_GET['subpage']) && $_GET['subpage'] == 'global_options') { - require(dirname(__FILE__) . '/menu_dashboard_options.php'); - return; - } - - require(dirname(__FILE__) . '/menu_dashboard.php'); - } - public static function menu_scan() { - wp_enqueue_style('wordfence-select2-css'); - wp_enqueue_script('wordfence-select2-js'); - - if (isset($_GET['subpage']) && $_GET['subpage'] == 'scan_options') { - require(dirname(__FILE__) . '/menu_scanner_options.php'); - return; - } - else if (isset($_GET['subpage']) && $_GET['subpage'] == 'scan_credentials') { - require(dirname(__FILE__) . '/menu_scanner_credentials.php'); - return; - } - - require(dirname(__FILE__) . '/menu_scanner.php'); - } - - public static function menu_support() { - wp_enqueue_style('wordfence-select2-css'); - wp_enqueue_script('wordfence-select2-js'); - - require(dirname(__FILE__) . '/menu_support.php'); - } - - public static function menu_wordfence_central() { - wfConfig::set('showWfCentralUI', 1); - - wp_enqueue_style('wordfence-select2-css'); - wp_enqueue_script('wordfence-select2-js'); - - require(dirname(__FILE__) . '/menu_wordfence_central.php'); - } - - public static function menu_install() { - $token = array_key_exists('token', $_GET) ? $_GET['token'] : null; - $payload = array_key_exists('payload', $_GET) ? $_GET['payload'] : null; - $invalidLink = false; - $payloadException = null; - $email = null; - $license = null; - if ($shouldShowOnboarding = wfOnboardingController::shouldShowAnyAttempt()) { - if (!empty($token) && !empty($payload)) { - if (wfLicense::validateRegistrationToken($token)) { - $wfWebsite = wfWebsite::getInstance(); - try { - $data = $wfWebsite->retrievePayload($payload, $expiredPayload); - $data = json_decode($data, true); - if (is_array($data) && array_key_exists('email', $data) && array_key_exists('license', $data)) { - $email = (string) $data['email']; - $license = (string) $data['license']; - } - } - catch (wfWebsiteEphemeralPayloadRetrievalException $e) { - $payloadException = $e; - $invalidLink = true; - } - } - else { - $invalidLink = true; - } - } - } - require(__DIR__ . '/menu_install.php'); - } - - public static function fsActionRestoreFileCallback() { - $issueID = filter_input(INPUT_GET, 'issueID', FILTER_SANITIZE_NUMBER_INT); - $response = self::ajax_restoreFile_callback($issueID); - if (!empty($response['ok'])) { - $result = sprintf('<p>' . /* translators: File path. */ __('The file <code>%s</code> was restored successfully.', 'wordfence') . '</p>', - esc_html(strpos($response['file'], ABSPATH) === 0 ? substr($response['file'], strlen(ABSPATH) + 1) : $response['file'])); - } else if (!empty($response['cerrorMessage'])) { - $result = sprintf('<div class="wfSummaryErr">%s</div>', esc_html($response['cerrorMessage'])); - } else { - $result = '<div class="wfSummaryErr">' . __('There was an error restoring the file.', 'wordfence') . '</div>'; - } - printf(<<<HTML -<br> -%s -<p><a href="%s">%s</a></p> -HTML - , - $result, - esc_url(network_admin_url('admin.php?page=WordfenceScan')), - __('Return to scan results', 'wordfence') - ); - wfScanEngine::refreshScanNotification(); - } - - public static function fsActionDeleteFileCallback() { - $issueID = filter_input(INPUT_GET, 'issueID', FILTER_SANITIZE_NUMBER_INT); - $response = self::ajax_deleteFile_callback($issueID); - if (!empty($response['ok'])) { - $result = sprintf('<p>' . /* translators: File path. */ __('The file <code>%s</code> was deleted successfully.', 'wordfence') . '</p>', esc_html($response['file'])); - } else if (!empty($response['errorMessage'])) { - $result = sprintf('<div class="wfSummaryErr">%s</div>', esc_html($response['errorMessage'])); - } else { - $result = '<div class="wfSummaryErr">' . __('There was an error deleting the file.', 'wordfence') . '</div>'; - } - printf(<<<HTML -<br> -%s -<p><a href="%s">%s</a></p> -HTML - , - $result, - esc_url(network_admin_url('admin.php?page=WordfenceScan')), - __('Return to scan results', 'wordfence') - ); - wfScanEngine::refreshScanNotification(); - } - - public static function status($level /* 1 has highest visibility */, $type /* info|error */, $msg){ - if($level > 3 && $level < 10 && (! self::isDebugOn())){ //level 10 and higher is for summary messages - return false; - } - if($type != 'info' && $type != 'error'){ error_log("Invalid status type: $type"); return; } - if(self::$printStatus){ - echo "STATUS: $level : $type : ".esc_html($msg)."\n"; - } else { - self::getLog()->addStatus($level, $type, $msg); - } - } - public static function profileUpdateAction($userID, $newDat = false){ - if(! $newDat){ return; } - if(wfConfig::get('other_pwStrengthOnUpdate')){ - $oldDat = get_userdata($userID); - if($newDat->user_pass != $oldDat->user_pass){ - $wf = new wfScanEngine(); - $wf->scanUserPassword($userID); - $wf->emailNewIssues(); - } - } - } - - public static function replaceVersion($url) { - if (is_string($url)) - return preg_replace_callback("/([&;\?]ver)=(.+?)(&|$)/", "wordfence::replaceVersionCallback", $url); - return $url; - } - - public static function replaceVersionCallback($matches) { - global $wp_version; - return $matches[1] . '=' . ($wp_version === $matches[2] ? wp_hash($matches[2]) : $matches[2]) . $matches[3]; - } - - public static function genFilter($gen, $type){ - if(wfConfig::get('other_hideWPVersion')){ - return ''; - } else { - return $gen; - } - } - public static function getMyHomeURL(){ - return wfUtils::wpAdminURL('admin.php?page=Wordfence'); - } - public static function getMyOptionsURL(){ - return wfUtils::wpAdminURL('admin.php?page=Wordfence&subpage=global_options'); - } - - public static function alert($subject, $alertMsg, $IP) { - wfConfig::inc('totalAlertsSent'); - $emails = wfConfig::getAlertEmails(); - if (sizeof($emails) < 1) { return false; } - - $IPMsg = ""; - if ($IP) { - $IPMsg = sprintf(/* translators: IP address. */ __("User IP: %s\n", 'wordfence'), $IP); - $reverse = wfUtils::reverseLookup($IP); - if ($reverse) { - $IPMsg .= sprintf(/* translators: Domain name. */ __("User hostname: %s\n", 'wordfence'), $reverse); - } - $userLoc = wfUtils::getIPGeo($IP); - if ($userLoc) { - $IPMsg .= __('User location: ', 'wordfence'); - if ($userLoc['city']) { - $IPMsg .= $userLoc['city'] . ', '; - } - if ($userLoc['region'] && wfUtils::shouldDisplayRegion($userLoc['countryName'])) { - $IPMsg .= $userLoc['region'] . ', '; - } - $IPMsg .= $userLoc['countryName'] . "\n"; - } - } - - $content = wfUtils::tmpl('email_genericAlert.php', array( - 'isPaid' => wfConfig::get('isPaid'), - 'subject' => $subject, - 'blogName' => get_bloginfo('name', 'raw'), - 'adminURL' => get_admin_url(), - 'alertMsg' => $alertMsg, - 'IPMsg' => $IPMsg, - 'date' => wfUtils::localHumanDate(), - 'myHomeURL' => self::getMyHomeURL(), - 'myOptionsURL' => self::getMyOptionsURL() - )); - $shortSiteURL = preg_replace('/^https?:\/\//i', '', site_url()); - $subject = "[Wordfence Alert] $shortSiteURL " . $subject; - - $sendMax = wfConfig::get('alert_maxHourly', 0); - if($sendMax > 0){ - $sendArr = wfConfig::get_ser('alertFreqTrack', array()); - if(! is_array($sendArr)){ - $sendArr = array(); - } - $minuteTime = floor(time() / 60); - $totalSent = 0; - for($i = $minuteTime; $i > $minuteTime - 60; $i--){ - $totalSent += isset($sendArr[$i]) ? $sendArr[$i] : 0; - } - if($totalSent >= $sendMax){ - return false; - } - $sendArr[$minuteTime] = isset($sendArr[$minuteTime]) ? $sendArr[$minuteTime] + 1 : 1; - wfConfig::set_ser('alertFreqTrack', $sendArr); - } - //Prevent duplicate emails within 1 hour: - $hash = md5(implode(',', $emails) . ':' . $subject . ':' . $alertMsg . ':' . $IP); //Hex - $lastHash = wfConfig::get('lastEmailHash', false); - if($lastHash){ - $lastHashDat = explode(':', $lastHash); //[time, hash] - if(time() - $lastHashDat[0] < 3600){ - if($lastHashDat[1] == $hash){ - return false; //Don't send because this email is identical to the previous email which was sent within the last hour. - } - } - } - wfConfig::set('lastEmailHash', time() . ':' . $hash); - foreach ($emails as $email) { - $uniqueContent = $content . "\n\n" . sprintf(/* translators: WordPress admin panel URL. */ __('No longer an administrator for this site? Click here to stop receiving security alerts: %s', 'wordfence'), wfUtils::getSiteBaseURL() . '?_wfsf=removeAlertEmail&jwt=' . wfUtils::generateJWT(array('email' => $email))); - wp_mail($email, $subject, $uniqueContent); - } - return true; - } - public static function getLog(){ - if(! self::$wfLog){ - $wfLog = wfLog::shared(); - self::$wfLog = $wfLog; - } - return self::$wfLog; - } - public static function wfSchemaExists(){ - global $wpdb; - $exists = $wpdb->get_col($wpdb->prepare(<<<SQL -SELECT TABLE_NAME FROM information_schema.TABLES -WHERE TABLE_SCHEMA=DATABASE() -AND TABLE_NAME=%s -SQL - , wfDB::networkTable('wfConfig'))); - return $exists ? true : false; - } - public static function isDebugOn(){ - if(is_null(self::$debugOn)){ - if(wfConfig::get('debugOn')){ - self::$debugOn = true; - } else { - self::$debugOn = false; - } - } - return self::$debugOn; - } - //PUBLIC API - public static function doNotCache(){ //Call this to prevent Wordfence from caching the current page. - wfCache::doNotCache(); - return true; - } - public static function whitelistIP($IP){ //IP as a string in dotted quad notation e.g. '10.11.12.13' - $IP = trim($IP); - $user_range = new wfUserIPRange($IP); - if (!$user_range->isValidRange()) { - throw new Exception(__("The IP you provided must be in dotted quad notation or use ranges with square brackets. e.g. 10.11.12.13 or 10.11.12.[1-50]", 'wordfence')); - } - $whites = wfConfig::get('whitelisted', ''); - $arr = explode(',', $whites); - $arr2 = array(); - foreach($arr as $e){ - if($e == $IP){ - return false; - } - $arr2[] = trim($e); - } - $arr2[] = $IP; - wfConfig::set('whitelisted', implode(',', $arr2)); - return true; - } - - public static function ajax_email_summary_email_address_debug_callback() { - $email = !empty($_REQUEST['email']) ? $_REQUEST['email'] : null; - if (!wfUtils::isValidEmail($email)) { - return array('result' => __('Invalid email address provided', 'wordfence')); - } - - $report = new wfActivityReport(); - return $report->sendReportViaEmail($email) ? - array('ok' => 1, 'result' => __('Test email sent successfully', 'wordfence')) : - array('result' => __("Test email failed to send", 'wordfence')); - } - - public static function addDashboardWidget() { - if (wfUtils::isAdmin() && (is_network_admin() || !is_multisite()) && wfConfig::get('email_summary_dashboard_widget_enabled')) { - wp_enqueue_style('wordfence-activity-report-widget', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/activity-report-widget.css'), '', WORDFENCE_VERSION); - $report_date_range = 'week'; - switch (wfConfig::get('email_summary_interval')) { - case 'daily': - $report_date_range = 'day'; - break; - - case 'monthly': - $report_date_range = 'month'; - break; - } - wp_add_dashboard_widget( - 'wordfence_activity_report_widget', - sprintf(/* translators: Localized date range. */ __('Wordfence activity in the past %s', 'wordfence'), $report_date_range), - array('wfActivityReport', 'outputDashboardWidget') - ); - } - } - - /** - * @return bool - */ - public static function hasGDLimitLoginsMUPlugin() { - return defined('GD_SYSTEM_PLUGIN_DIR') && file_exists(GD_SYSTEM_PLUGIN_DIR . 'limit-login-attempts/limit-login-attempts.php') - && defined('LIMIT_LOGIN_DIRECT_ADDR'); - } - - /** - * @param string $content - * @return string - */ - public static function fixGDLimitLoginsErrors($content) { - if (self::$authError) { - $content = str_replace(wp_kses(__('<strong>ERROR</strong>: Incorrect username or password.', 'limit-login-attempts'), array('strong'=>array())) . "<br />\n", '', $content); - $content .= '<br />' . self::$authError->get_error_message(); - } - return $content; - } - - /** - * @return array - */ - public static function ajax_deleteAdminUser_callback() { - /** @var wpdb $wpdb */ - global $wpdb; - $issueID = absint(!empty($_POST['issueID']) ? $_POST['issueID'] : 0); - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if (!$issue) { - return array('errorMsg' => __("We could not find that issue in our database.", 'wordfence')); - } - $data = $issue['data']; - if (empty($data['userID'])) { - return array('errorMsg' => __("We could not find that user in the database.", 'wordfence')); - } - $user = new WP_User($data['userID']); - if (!$user->exists()) { - return array('errorMsg' => __("We could not find that user in the database.", 'wordfence')); - } - $userLogin = $user->user_login; - if (is_multisite() && strcasecmp($user->user_email, get_site_option('admin_email')) === 0) { - return array('errorMsg' => __("This user's email is the network admin email. It will need to be changed before deleting this user.", 'wordfence')); - } - if (is_multisite()) { - revoke_super_admin($data['userID']); - } - wp_delete_user($data['userID']); - if (is_multisite()) { - $wpdb->delete($wpdb->users, array('ID' => $data['userID'])); - } - $wfIssues->deleteIssue($issueID); - wfScanEngine::refreshScanNotification($wfIssues); - - return array( - 'ok' => 1, - 'user_login' => $userLogin, - ); - } - - public static function ajax_revokeAdminUser_callback() { - $issueID = absint(!empty($_POST['issueID']) ? $_POST['issueID'] : 0); - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if (!$issue) { - return array('errorMsg' => __("We could not find that issue in our database.", 'wordfence')); - } - $data = $issue['data']; - if (empty($data['userID'])) { - return array('errorMsg' => __("We could not find that user in the database.", 'wordfence')); - } - $user = new WP_User($data['userID']); - $userLogin = $user->user_login; - wp_revoke_user($data['userID']); - if (is_multisite()) { - revoke_super_admin($data['userID']); - } - - $wfIssues->deleteIssue($issueID); - wfScanEngine::refreshScanNotification($wfIssues); - - return array( - 'ok' => 1, - 'user_login' => $userLogin, - ); - } - - public static function ajax_acknowledgeAdminUser_callback() { - $issueID = absint(!empty($_POST['issueID']) ? $_POST['issueID'] : 0); - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if (!$issue) { - return array('errorMsg' => __("We could not find that issue in the database.", 'wordfence')); - } - $data = $issue['data']; - if (empty($data['userID'])) { - return array('errorMsg' => __("We could not find that user in the database.", 'wordfence')); - } - $user = new WP_User($data['userID']); - if (!$user->exists()) { - return array('errorMsg' => __("We could not find that user in the database.", 'wordfence')); - } - $userLogin = $user->user_login; - - $adminUsers = new wfAdminUserMonitor(); - $adminUsers->addAdmin($data['userID']); - - $wfIssues->deleteIssue($issueID); - wfScanEngine::refreshScanNotification($wfIssues); - - return array( - 'ok' => 1, - 'user_login' => $userLogin, - ); - } - - /** - * - */ - public static function ajax_disableDirectoryListing_callback() { - $issueID = absint($_POST['issueID']); - $wfIssues = new wfIssues(); - $issue = $wfIssues->getIssueByID($issueID); - if (!$issue) { - return array( - 'err' => 1, - 'errorMsg' => __("We could not find that issue in our database.", 'wordfence'), - ); - } - $wfIssues->deleteIssue($issueID); - - $htaccessPath = wfCache::getHtaccessPath(); - if (!$htaccessPath) { - return array( - 'err' => 1, - 'errorMsg' => __("Wordfence could not find your .htaccess file.", 'wordfence'), - ); - } - - $fileContents = file_get_contents($htaccessPath); - if (file_put_contents($htaccessPath, "# Added by Wordfence " . date('r') . "\nOptions -Indexes\n\n" . $fileContents, LOCK_EX)) { - $uploadPaths = wp_upload_dir(); - if (!wfScanEngine::isDirectoryListingEnabled($uploadPaths['baseurl'])) { - return array( - 'ok' => 1, - ); - } else { - // Revert any changes done to .htaccess - file_put_contents($htaccessPath, $fileContents, LOCK_EX); - return array( - 'err' => 1, - 'errorMsg' => __("Updating the .htaccess did not fix the issue. You may need to add <code>Options -Indexes</code> to your httpd.conf if using Apache, or find documentation on how to disable directory listing for your web server.", 'wordfence'), - ); - } - } - return array( - 'err' => 1, - 'errorMsg' => __("There was an error writing to your .htaccess file.", 'wordfence'), - ); - } - - /** - * Modify the query to prevent username enumeration. - * - * @param array $query_vars - * @return array - */ - public static function preventAuthorNScans($query_vars) { - if (wfConfig::get('loginSec_disableAuthorScan') && !is_admin() && - !empty($query_vars['author']) && (is_array($query_vars['author']) || is_numeric(preg_replace('/[^0-9]/', '', $query_vars['author']))) && - ( - (isset($_GET['author']) && (is_array($_GET['author']) || is_numeric(preg_replace('/[^0-9]/', '', $_GET['author'])))) || - (isset($_POST['author']) && (is_array($_POST['author']) || is_numeric(preg_replace('/[^0-9]/', '', $_POST['author'])))) - ) - ) { - global $wp_query; - $wp_query->set_404(); - status_header(404); - nocache_headers(); - - $template = get_404_template(); - if ($template && file_exists($template)) { - include($template); - } - - exit; - } - return $query_vars; - } - - /** - * @param WP_Upgrader $updater - * @param array $hook_extra - */ - public static function hideReadme($updater, $hook_extra = null) { - if (wfConfig::get('other_hideWPVersion')) { - wfUtils::hideReadme(); - } - } - - public static function ajax_saveDisclosureState_callback() { - if (isset($_POST['name']) && isset($_POST['state'])) { - $name = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_POST['name']); - $state = wfUtils::truthyToBoolean($_POST['state']); - if (!empty($name)) { - $disclosureStates = wfConfig::get_ser('disclosureStates', array()); - $disclosureStates[$name] = $state; - wfConfig::set_ser('disclosureStates', $disclosureStates); - return array('ok' => 1); - } - } - else if (isset($_POST['names']) && isset($_POST['state'])) { - $rawNames = $_POST['names']; - if (is_array($rawNames)) { - $filteredNames = array(); - foreach ($rawNames as $name) { - $name = preg_replace('/[^a-zA-Z0-9_\-]/', '', $name); - if (!empty($name)) { - $filteredNames[] = $name; - } - } - - $state = wfUtils::truthyToBoolean($_POST['state']); - if (!empty($filteredNames)) { - $disclosureStates = wfConfig::get_ser('disclosureStates', array()); - foreach ($filteredNames as $name) { - $disclosureStates[$name] = $state; - } - wfConfig::set_ser('disclosureStates', $disclosureStates); - return array('ok' => 1); - } - } - } - - return array( - 'err' => 1, - 'errorMsg' => __("Required parameters not sent.", 'wordfence'), - ); - } - - public static function ajax_saveWAFConfig_callback() { - if (isset($_POST['wafConfigAction'])) { - $waf = wfWAF::getInstance(); - if (method_exists($waf, 'isReadOnly') && $waf->isReadOnly()) { - return array( - 'err' => 1, - 'errorMsg' => __("The WAF is currently in read-only mode and will not save any configuration changes.", 'wordfence'), - ); - } - - switch ($_POST['wafConfigAction']) { - case 'config': - if (!empty($_POST['wafStatus']) && in_array($_POST['wafStatus'], array(wfFirewall::FIREWALL_MODE_DISABLED, wfFirewall::FIREWALL_MODE_LEARNING, wfFirewall::FIREWALL_MODE_ENABLED))) { - if ($_POST['wafStatus'] == 'learning-mode' && !empty($_POST['learningModeGracePeriodEnabled'])) { - $gracePeriodEnd = strtotime(isset($_POST['learningModeGracePeriod']) ? $_POST['learningModeGracePeriod'] : ''); - if ($gracePeriodEnd > time()) { - wfWAF::getInstance()->getStorageEngine()->setConfig('learningModeGracePeriodEnabled', 1); - wfWAF::getInstance()->getStorageEngine()->setConfig('learningModeGracePeriod', $gracePeriodEnd); - } else { - return array( - 'err' => 1, - 'errorMsg' => __("The grace period end time must be in the future.", 'wordfence'), - ); - } - } else { - wfWAF::getInstance()->getStorageEngine()->setConfig('learningModeGracePeriodEnabled', 0); - wfWAF::getInstance()->getStorageEngine()->unsetConfig('learningModeGracePeriod'); - } - wfWAF::getInstance()->getStorageEngine()->setConfig('wafStatus', $_POST['wafStatus']); - $firewall = new wfFirewall(); - $firewall->syncStatus(true); - } - - break; - - case 'addWhitelist': - if (isset($_POST['whitelistedPath']) && isset($_POST['whitelistedParam'])) { - $path = stripslashes($_POST['whitelistedPath']); - $paramKey = stripslashes($_POST['whitelistedParam']); - if (!$path || !$paramKey) { - break; - } - $data = array( - 'timestamp' => time(), - 'description' => __('Allowlisted via Firewall Options page', 'wordfence'), - 'ip' => wfUtils::getIP(), - 'disabled' => empty($_POST['whitelistedEnabled']), - ); - if (function_exists('get_current_user_id')) { - $data['userID'] = get_current_user_id(); - } - wfWAF::getInstance()->whitelistRuleForParam($path, $paramKey, 'all', $data); - } - break; - - case 'replaceWhitelist': - if ( - !empty($_POST['oldWhitelistedPath']) && !empty($_POST['oldWhitelistedParam']) && - !empty($_POST['newWhitelistedPath']) && !empty($_POST['newWhitelistedParam']) - ) { - $oldWhitelistedPath = stripslashes($_POST['oldWhitelistedPath']); - $oldWhitelistedParam = stripslashes($_POST['oldWhitelistedParam']); - - $newWhitelistedPath = stripslashes($_POST['newWhitelistedPath']); - $newWhitelistedParam = stripslashes($_POST['newWhitelistedParam']); - - $savedWhitelistedURLParams = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('whitelistedURLParams', null, 'livewaf'); - // These are already base64'd - $oldKey = $oldWhitelistedPath . '|' . $oldWhitelistedParam; - $newKey = base64_encode($newWhitelistedPath) . '|' . base64_encode($newWhitelistedParam); - try { - $savedWhitelistedURLParams = wfUtils::arrayReplaceKey($savedWhitelistedURLParams, $oldKey, $newKey); - } catch (Exception $e) { - error_log("Caught exception from 'wfUtils::arrayReplaceKey' with message: " . $e->getMessage()); - } - wfWAF::getInstance()->getStorageEngine()->setConfig('whitelistedURLParams', $savedWhitelistedURLParams, 'livewaf'); - } - break; - - case 'deleteWhitelist': - if ( - isset($_POST['deletedWhitelistedPath']) && is_string($_POST['deletedWhitelistedPath']) && - isset($_POST['deletedWhitelistedParam']) && is_string($_POST['deletedWhitelistedParam']) - ) { - $deletedWhitelistedPath = stripslashes($_POST['deletedWhitelistedPath']); - $deletedWhitelistedParam = stripslashes($_POST['deletedWhitelistedParam']); - $savedWhitelistedURLParams = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('whitelistedURLParams', null, 'livewaf'); - $key = $deletedWhitelistedPath . '|' . $deletedWhitelistedParam; - unset($savedWhitelistedURLParams[$key]); - wfWAF::getInstance()->getStorageEngine()->setConfig('whitelistedURLParams', $savedWhitelistedURLParams, 'livewaf'); - } - break; - - case 'enableWhitelist': - if (isset($_POST['whitelistedPath']) && isset($_POST['whitelistedParam'])) { - $path = stripslashes($_POST['whitelistedPath']); - $paramKey = stripslashes($_POST['whitelistedParam']); - if (!$path || !$paramKey) { - break; - } - $enabled = !empty($_POST['whitelistedEnabled']); - - $savedWhitelistedURLParams = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('whitelistedURLParams', null, 'livewaf'); - $key = $path . '|' . $paramKey; - if (array_key_exists($key, $savedWhitelistedURLParams) && is_array($savedWhitelistedURLParams[$key])) { - foreach ($savedWhitelistedURLParams[$key] as $ruleID => $data) { - $savedWhitelistedURLParams[$key][$ruleID]['disabled'] = !$enabled; - } - } - wfWAF::getInstance()->getStorageEngine()->setConfig('whitelistedURLParams', $savedWhitelistedURLParams, 'livewaf'); - } - break; - - case 'enableRule': - $ruleEnabled = !empty($_POST['ruleEnabled']); - $ruleID = !empty($_POST['ruleID']) ? (int) $_POST['ruleID'] : false; - if ($ruleID) { - $disabledRules = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('disabledRules'); - if ($ruleEnabled) { - unset($disabledRules[$ruleID]); - } else { - $disabledRules[$ruleID] = true; - } - wfWAF::getInstance()->getStorageEngine()->setConfig('disabledRules', $disabledRules); - } - break; - case 'disableWAFBlacklistBlocking': - if (isset($_POST['disableWAFBlacklistBlocking'])) { - $disableWAFBlacklistBlocking = (int) $_POST['disableWAFBlacklistBlocking']; - wfWAF::getInstance()->getStorageEngine()->setConfig('disableWAFBlacklistBlocking', $disableWAFBlacklistBlocking); - if (method_exists(wfWAF::getInstance()->getStorageEngine(), 'purgeIPBlocks')) { - wfWAF::getInstance()->getStorageEngine()->purgeIPBlocks(wfWAFStorageInterface::IP_BLOCKS_BLACKLIST); - } - } - break; - } - } - - return array( - 'success' => true, - 'data' => self::_getWAFData(), - ); - } - - public static function ajax_updateWAFRules_callback() { - try { - $event = new wfWAFCronFetchRulesEvent(time() - 2, true); - $event->setWaf(wfWAF::getInstance()); - $success = $event->fire(); - $failureReason = false; - if (!$success && method_exists($event, 'getResponse')) { - $response = $event->getResponse(); - if ($response === false) { - $failureReason = wfFirewall::UPDATE_FAILURE_UNREACHABLE; - } - else { - $jsonData = @json_decode($response->getBody(), true); - if (isset($jsonData['errorMessage']) && strpos($jsonData['errorMessage'], 'rate limit') !== false) { - $failureReason = wfFirewall::UPDATE_FAILURE_RATELIMIT; - } - else if (isset($jsonData['data']['signature'])) { - $failureReason = wfFirewall::UPDATE_FAILURE_FILESYSTEM; - } - } - } - - return self::_getWAFData($success, $failureReason); - } - catch (Exception $e) { - $wafData = array( - 'learningMode' => false, - 'rules' => array(), - 'whitelistedURLParams' => array(), - 'disabledRules' => array(), - 'isPaid' => (bool) wfConfig::get('isPaid', 0), - ); - - return $wafData; - } - } - - public static function ajax_loadLiveTraffic_callback() { - $return = array(); - - $filters = new wfLiveTrafficQueryFilterCollection(); - $query = new wfLiveTrafficQuery(self::getLog()); - $query->setFilters($filters); - if (array_key_exists('groupby', $_REQUEST)) { - $param = $_REQUEST['groupby']; - if ($param === 'type') { - $param = 'jsRun'; - } - $query->setGroupBy(new wfLiveTrafficQueryGroupBy($query, $param)); - } - $query->setLimit(isset($_REQUEST['limit']) ? absint($_REQUEST['limit']) : 20); - $query->setOffset(isset($_REQUEST['offset']) ? absint($_REQUEST['offset']) : 0); - - if (!empty($_REQUEST['since'])) { - $query->setStartDate($_REQUEST['since']); - } else if (!empty($_REQUEST['startDate'])) { - $query->setStartDate(is_numeric($_REQUEST['startDate']) ? $_REQUEST['startDate'] : strtotime($_REQUEST['startDate'])); - } - - if (!empty($_REQUEST['endDate'])) { - $query->setEndDate(is_numeric($_REQUEST['endDate']) ? $_REQUEST['endDate'] : strtotime($_REQUEST['endDate'])); - } - - if ( - array_key_exists('param', $_REQUEST) && is_array($_REQUEST['param']) && - array_key_exists('operator', $_REQUEST) && is_array($_REQUEST['operator']) && - array_key_exists('value', $_REQUEST) && is_array($_REQUEST['value']) - ) { - for ($i = 0; $i < count($_REQUEST['param']); $i++) { - if ( - array_key_exists($i, $_REQUEST['param']) && - array_key_exists($i, $_REQUEST['operator']) && - array_key_exists($i, $_REQUEST['value']) - ) { - $param = $_REQUEST['param'][$i]; - $operator = $_REQUEST['operator'][$i]; - $value = $_REQUEST['value'][$i]; - - switch (strtolower($param)) { - case 'type': - $param = 'jsRun'; - $value = strtolower($value) === 'human' ? 1 : 0; - break; - case 'ip': - $ip = $value; - - if (strpos($ip, '*') !== false) { //If the IP contains a *, treat it as a wildcard for that segment and silently adjust the rule - if (preg_match('/^(?:(?:\d{1,3}|\*)(?:\.|$)){2,4}/', $ip)) { //IPv4 - $value = array('00', '00', '00', '00', '00', '00', '00', '00', '00', '00', 'FF', 'FF'); - $octets = explode('.', $ip); - foreach ($octets as $o) - { - if (strpos($o, '*') !== false) { - $value[] = '..'; - } - else { - $value[] = strtoupper(str_pad(dechex($o), 2, '0', STR_PAD_LEFT)); - } - } - $value = '^' . implode('', array_pad($value, 16, '..')) . '$'; - $operator = ($operator == '!=' ? 'hnotregexp' : 'hregexp'); - } - else if (!empty($ip) && preg_match('/^((?:[\da-f*]{1,4}(?::|)){0,8})(::)?((?:[\da-f*]{1,4}(?::|)){0,8})$/i', $ip)) { //IPv6 - if ($ip === '::') { - $value = '^' . str_repeat('00', 16) . '$'; - } - else { - $colon_count = substr_count($ip, ':'); - $dbl_colon_pos = strpos($ip, '::'); - if ($dbl_colon_pos !== false) { - $ip = str_replace('::', str_repeat(':0000', (($dbl_colon_pos === 0 || $dbl_colon_pos === strlen($ip) - 2) ? 9 : 8) - $colon_count) . ':', $ip); - $ip = trim($ip, ':'); - } - - $ip_groups = explode(':', $ip); - $value = array(); - foreach ($ip_groups as $ip_group) { - if (strpos($ip_group, '*') !== false) { - $value[] = '..'; - $value[] = '..'; - } - else { - $ip_group = strtoupper(str_pad($ip_group, 4, '0', STR_PAD_LEFT)); - $value[] = substr($ip_group, 0, 2); - $value[] = substr($ip_group, -2); - } - } - - $value = '^' . implode('', array_pad($value, 16, '..')) . '$'; - } - $operator = ($operator == '=' ? 'hregexp' : 'hnotregexp'); - } - else if (preg_match('/^((?:0{1,4}(?::|)){0,5})(::)?ffff:((?:\d{1,3}(?:\.|$)){4})$/i', $ip, $matches)) { //IPv4 mapped IPv6 - $value = array('00', '00', '00', '00', '00', '00', '00', '00', '00', '00', 'FF', 'FF'); - $octets = explode('.', $matches[3]); - foreach ($octets as $o) - { - if (strpos($o, '*') !== false) { - $value[] = '..'; - } - else { - $value[] = strtoupper(str_pad(dechex($o), 2, '0', STR_PAD_LEFT)); - } - } - $value = '^' . implode('', array_pad($value, 16, '.')) . '$'; - $operator = ($operator == '=' ? 'hregexp' : 'hnotregexp'); - } - else { - $value = false; - } - } - else { - $value = wfUtils::inet_pton($ip); - } - break; - case 'userid': - $value = absint($value); - break; - } - if ($operator === 'match' && $param !== 'ip') { - $value = str_replace('*', '%', $value); - } - $filters->addFilter(new wfLiveTrafficQueryFilter($query, $param, $operator, $value)); - } - } - } - - try { - $return['data'] = $query->execute(); - /*if (defined('WP_DEBUG') && WP_DEBUG) { - $return['sql'] = $query->buildQuery(); - }*/ - } catch (wfLiveTrafficQueryException $e) { - $return['data'] = array(); - $return['sql'] = $e->getMessage(); - } - - $return['success'] = true; - - return $return; - } - - public static function ajax_whitelistWAFParamKey_callback() { - if (class_exists('wfWAF') && $waf = wfWAF::getInstance()) { - if (isset($_POST['path']) && isset($_POST['paramKey']) && isset($_POST['failedRules'])) { - $data = array( - 'timestamp' => time(), - 'description' => __('Allowlisted via Live Traffic', 'wordfence'), - 'source' => 'live-traffic', - 'ip' => wfUtils::getIP(), - ); - if (function_exists('get_current_user_id')) { - $data['userID'] = get_current_user_id(); - } - $waf->whitelistRuleForParam(base64_decode($_POST['path']), base64_decode($_POST['paramKey']), - $_POST['failedRules'], $data); - - return array( - 'success' => true, - ); - } - } - return false; - } - - public static function ajax_whitelistBulkDelete_callback() { - if (class_exists('wfWAF') && $waf = wfWAF::getInstance()) { - if (!empty($_POST['items']) && ($items = json_decode(stripslashes($_POST['items']), true)) !== false) { - $whitelist = (array) $waf->getStorageEngine()->getConfig('whitelistedURLParams', null, 'livewaf'); - if (!is_array($whitelist)) { - $whitelist = array(); - } - foreach ($items as $key) { - list($path, $paramKey, ) = $key; - $whitelistKey = $path . '|' . $paramKey; - if (array_key_exists($whitelistKey, $whitelist)) { - unset($whitelist[$whitelistKey]); - } - } - $waf->getStorageEngine()->setConfig('whitelistedURLParams', $whitelist, 'livewaf'); - return array( - 'data' => self::_getWAFData(), - 'success' => true, - ); - } - } - return false; - } - - public static function ajax_whitelistBulkEnable_callback() { - if (class_exists('wfWAF') && $waf = wfWAF::getInstance()) { - if (!empty($_POST['items']) && ($items = json_decode(stripslashes($_POST['items']), true)) !== false) { - self::_whitelistBulkToggle($items, true); - return array( - 'data' => self::_getWAFData(), - 'success' => true, - ); - } - } - return false; - } - - public static function ajax_whitelistBulkDisable_callback() { - if (class_exists('wfWAF') && $waf = wfWAF::getInstance()) { - if (!empty($_POST['items']) && ($items = json_decode(stripslashes($_POST['items']), true)) !== false) { - self::_whitelistBulkToggle($items, false); - return array( - 'data' => self::_getWAFData(), - 'success' => true, - ); - } - } - return false; - } - - private static function _whitelistBulkToggle($items, $enabled) { - $waf = wfWAF::getInstance(); - $whitelist = (array) $waf->getStorageEngine()->getConfig('whitelistedURLParams', null, 'livewaf'); - if (!is_array($whitelist)) { - $whitelist = array(); - } - foreach ($items as $key) { - list($path, $paramKey, ) = $key; - $whitelistKey = $path . '|' . $paramKey; - if (array_key_exists($whitelistKey, $whitelist) && is_array($whitelist[$whitelistKey])) { - foreach ($whitelist[$whitelistKey] as $ruleID => $data) { - $whitelist[$whitelistKey][$ruleID]['disabled'] = !$enabled; - } - } - } - $waf->getStorageEngine()->setConfig('whitelistedURLParams', $whitelist, 'livewaf'); - } - - private static function _getWAFData($updated = null, $failureReason = false) { - $data['learningMode'] = wfWAF::getInstance()->isInLearningMode(); - $data['rules'] = wfWAF::getInstance()->getRules(); - /** @var wfWAFRule $rule */ - foreach ($data['rules'] as $ruleID => $rule) { - $data['rules'][$ruleID] = $rule->toArray(); - } - - $whitelistedURLParams = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('whitelistedURLParams', array(), 'livewaf'); - $data['whitelistedURLParams'] = array(); - if (is_array($whitelistedURLParams)) { - foreach ($whitelistedURLParams as $urlParamKey => $rules) { - list($path, $paramKey) = explode('|', $urlParamKey); - $whitelistData = null; - foreach ($rules as $ruleID => $whitelistedData) { - if ($whitelistData === null) { - $whitelistData = $whitelistedData; - continue; - } - if ($ruleID === 'all') { - $whitelistData = $whitelistedData; - break; - } - } - - if (is_array($whitelistData) && array_key_exists('userID', $whitelistData) && function_exists('get_user_by')) { - $user = get_user_by('id', $whitelistData['userID']); - if ($user) { - $whitelistData['username'] = $user->user_login; - } - } - - $data['whitelistedURLParams'][] = array( - 'path' => $path, - 'paramKey' => $paramKey, - 'ruleID' => array_keys($rules), - 'data' => $whitelistData, - ); - } - } - - $data['disabledRules'] = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('disabledRules'); - if ($lastUpdated = wfWAF::getInstance()->getStorageEngine()->getConfig('rulesLastUpdated', null, 'transient')) { - $data['rulesLastUpdated'] = $lastUpdated; - } - $data['isPaid'] = (bool) wfConfig::get('isPaid', 0); - if ($updated !== null) { - $data['updated'] = (bool) $updated; - if (!$updated) { - $data['failure'] = $failureReason; - } - } - return $data; - } - - public static function ajax_wafStatus_callback() { - if (!empty($_REQUEST['nonce']) && hash_equals($_REQUEST['nonce'], wfConfig::get('wafStatusCallbackNonce', ''))) { - wfConfig::set('wafStatusCallbackNonce', ''); - wfUtils::send_json(array('active' => WFWAF_AUTO_PREPEND, 'subdirectory' => WFWAF_SUBDIRECTORY_INSTALL)); - } - wfUtils::send_json(false); - } - - public static function ajax_installAutoPrepend_callback() { - global $wp_filesystem; - - $currentAutoPrependFile = ini_get('auto_prepend_file'); - $currentAutoPrepend = null; - if (isset($_POST['currentAutoPrepend']) && !WF_IS_WP_ENGINE && !WF_IS_PRESSABLE && !WF_IS_FLYWHEEL) { - $currentAutoPrepend = $_POST['currentAutoPrepend']; - } - - $serverConfiguration = null; - if (isset($_POST['serverConfiguration']) && wfWAFAutoPrependHelper::isValidServerConfig($_POST['serverConfiguration'])) { - $serverConfiguration = $_POST['serverConfiguration']; - } - - if ($serverConfiguration === null) { - return array('errorMsg' => __('A valid server configuration was not provided.', 'wordfence')); - } - - $helper = new wfWAFAutoPrependHelper($serverConfiguration, $currentAutoPrepend === 'override' ? null : $currentAutoPrependFile); - - ob_start(); - $ajaxURL = admin_url('admin-ajax.php'); - $allow_relaxed_file_ownership = true; - if (false === ($credentials = request_filesystem_credentials($ajaxURL, '', false, ABSPATH, array('version', 'locale', 'action', 'serverConfiguration', 'currentAutoPrepend'), $allow_relaxed_file_ownership))) { - $credentialsContent = ob_get_clean(); - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Filesystem Credentials Required', 'wordfence'), - 'html' => $credentialsContent, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the setup process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_INSTALL_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerHTML' => esc_html__('Once you have entered credentials, click Continue to complete the setup.', 'wordfence'), - ))->render(); - return array('needsCredentials' => 1, 'html' => $html); - } - ob_end_clean(); - - if (!WP_Filesystem($credentials, ABSPATH, $allow_relaxed_file_ownership) && $wp_filesystem->errors->get_error_code()) { - $credentialsError = ''; - foreach ($wp_filesystem->errors->get_error_messages() as $message) { - if (is_wp_error($message)) { - if ($message->get_error_data() && is_string($message->get_error_data())) { - $message = $message->get_error_message() . ': ' . $message->get_error_data(); - } - else { - $message = $message->get_error_message(); - } - } - $credentialsError .= "<p>$message</p>\n"; - } - - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Filesystem Permission Error', 'wordfence'), - 'html' => $credentialsError, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the setup process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_INSTALL_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerButtonTitle' => __('Cancel', 'wordfence'), - ))->render(); - return array('credentialsFailed' => 1, 'html' => $html); - } - - try { - $helper->performInstallation($wp_filesystem); - - $nonce = bin2hex(wfWAFUtils::random_bytes(32)); - wfConfig::set('wafStatusCallbackNonce', $nonce); - $verifyURL = add_query_arg(array('action' => 'wordfence_wafStatus', 'nonce' => $nonce), $ajaxURL); - $response = wp_remote_get($verifyURL, array('headers' => array('Referer' => false/*, 'Cookie' => 'XDEBUG_SESSION=1'*/))); - - $active = false; - if (!is_wp_error($response)) { - $wafStatus = @json_decode(wp_remote_retrieve_body($response), true); - if (isset($wafStatus['active']) && isset($wafStatus['subdirectory'])) { - $active = $wafStatus['active'] && !$wafStatus['subdirectory']; - } - } - - if ($serverConfiguration == 'manual') { - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Manual Installation Instructions', 'wordfence'), - 'html' => wfView::create('waf/waf-install-manual')->render(), - 'footerButtonTitle' => __('Close', 'wordfence'), - ))->render(); - } - else { - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Installation Successful', 'wordfence'), - 'html' => wfView::create('waf/waf-install-success', array('active' => $active))->render(), - 'footerButtonTitle' => __('Close', 'wordfence'), - ))->render(); - } - - return array('ok' => 1, 'html' => $html); - } - catch (wfWAFAutoPrependHelperException $e) { - $installError = "<p>" . $e->getMessage() . "</p>"; - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Installation Failed', 'wordfence'), - 'html' => $installError, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the setup process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_INSTALL_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerButtonTitle' => __('Cancel', 'wordfence'), - ))->render(); - return array('installationFailed' => 1, 'html' => $html); - } - } - - public static function ajax_uninstallAutoPrepend_callback() { - global $wp_filesystem; - - $serverConfiguration = null; - if (isset($_POST['serverConfiguration']) && wfWAFAutoPrependHelper::isValidServerConfig($_POST['serverConfiguration'])) { - $serverConfiguration = $_POST['serverConfiguration']; - } - - if ($serverConfiguration === null) { - return array('errorMsg' => __('A valid server configuration was not provided.', 'wordfence')); - } - - $helper = new wfWAFAutoPrependHelper($serverConfiguration, null); - - if (isset($_POST['credentials']) && isset($_POST['credentialsSignature'])) { - $salt = wp_salt('logged_in'); - $expectedSignature = hash_hmac('sha256', $_POST['credentials'], $salt); - if (hash_equals($expectedSignature, $_POST['credentialsSignature'])) { - $decrypted = wfUtils::decrypt($_POST['credentials']); - $credentials = @json_decode($decrypted, true); - } - } - - $ajaxURL = admin_url('admin-ajax.php'); - if (!isset($credentials)) { - $allow_relaxed_file_ownership = true; - ob_start(); - if (false === ($credentials = request_filesystem_credentials($ajaxURL, '', false, ABSPATH, array('version', 'locale', 'action', 'serverConfiguration', 'iniModified'), $allow_relaxed_file_ownership))) { - $credentialsContent = ob_get_clean(); - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Filesystem Credentials Required', 'wordfence'), - 'html' => $credentialsContent, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the uninstall process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_REMOVE_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerHTML' => esc_html__('Once you have entered credentials, click Continue to complete uninstallation.', 'wordfence'), - ))->render(); - return array('needsCredentials' => 1, 'html' => $html); - } - ob_end_clean(); - } - - if (!WP_Filesystem($credentials, ABSPATH, $allow_relaxed_file_ownership) && $wp_filesystem->errors->get_error_code()) { - $credentialsError = ''; - foreach ($wp_filesystem->errors->get_error_messages() as $message) { - if (is_wp_error($message)) { - if ($message->get_error_data() && is_string($message->get_error_data())) { - $message = $message->get_error_message() . ': ' . $message->get_error_data(); - } - else { - $message = $message->get_error_message(); - } - } - $credentialsError .= "<p>$message</p>\n"; - } - - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Filesystem Permission Error', 'wordfence'), - 'html' => $credentialsError, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the uninstall process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_REMOVE_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerButtonTitle' => __('Cancel', 'wordfence'), - ))->render(); - return array('credentialsFailed' => 1, 'html' => $html); - } - - try { - if ((!isset($_POST['iniModified']) || (isset($_POST['iniModified']) && !$_POST['iniModified'])) && !WF_IS_PRESSABLE) { //Uses .user.ini but not yet modified - $hasPreviousAutoPrepend = $helper->performIniRemoval($wp_filesystem); - - $iniTTL = intval(ini_get('user_ini.cache_ttl')); - if ($iniTTL == 0) { - $iniTTL = 300; //The PHP default - } - if (!$helper->usesUserIni()) { - $iniTTL = 0; //.htaccess - } - $timeout = max(30, $iniTTL); - $timeoutString = wfUtils::makeDuration($timeout); - - $waitingResponse = '<p>' . __('The <code>auto_prepend_file</code> setting has been successfully removed from <code>.htaccess</code> and <code>.user.ini</code>. Once this change takes effect, Extended Protection Mode will be disabled.', 'wordfence') . '</p>'; - if ($hasPreviousAutoPrepend) { - $waitingResponse .= '<p>' . __('Any previous value for <code>auto_prepend_file</code> will need to be re-enabled manually if still needed.', 'wordfence') . '</p>'; - } - - $spinner = wfView::create('common/indeterminate-progress', array('size' => 32))->render(); - $waitingResponse .= '<ul class="wf-flex-horizontal"><li>' . $spinner . '</li><li class="wf-padding-add-left">' . sprintf(/* translators: Time until. */ __('Waiting for it to take effect. This may take up to %s.', 'wordfence'), $timeoutString) . '</li></ul>'; - - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Waiting for Changes', 'wordfence'), - 'html' => $waitingResponse, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the uninstall process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_REMOVE_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerButtonTitle' => __('Close', 'wordfence'), - 'noX' => true, - ))->render(); - - $response = array('uninstallationWaiting' => 1, 'html' => $html, 'timeout' => $timeout, 'serverConfiguration' => $_POST['serverConfiguration']); - if (isset($credentials) && is_array($credentials)) { - $salt = wp_salt('logged_in'); - $json = json_encode($credentials); - $encrypted = wfUtils::encrypt($json); - $signature = hash_hmac('sha256', $encrypted, $salt); - $response['credentials'] = $encrypted; - $response['credentialsSignature'] = $signature; - } - return $response; - } - else { //.user.ini and .htaccess modified if applicable and waiting period elapsed or otherwise ready to advance to next step - if (WFWAF_AUTO_PREPEND && !WFWAF_SUBDIRECTORY_INSTALL && !WF_IS_WP_ENGINE && !WF_IS_PRESSABLE) { //.user.ini modified, but the WAF is still enabled - $retryAttempted = (isset($_POST['retryAttempted']) && $_POST['retryAttempted']); - $userIniError = '<p class="wf-error">'; - $userIniError .= __('Extended Protection Mode has not been disabled. This may be because <code>auto_prepend_file</code> is configured somewhere else or the value is still cached by PHP.', 'wordfence'); - if ($retryAttempted) { - $userIniError .= ' <strong>' . __('Retrying Failed.', 'wordfence') . '</strong>'; - } - $userIniError .= ' <a href="#" class="wf-waf-uninstall-try-again" role="button">' . __('Try Again', 'wordfence') . '</a>'; - $userIniError .= '</p>'; - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Unable to Uninstall', 'wordfence'), - 'html' => $userIniError, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the uninstall process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_REMOVE_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerButtonTitle' => __('Cancel', 'wordfence'), - ))->render(); - - $response = array('uninstallationFailed' => 1, 'html' => $html, 'serverConfiguration' => $_POST['serverConfiguration']); - if (isset($credentials) && is_array($credentials)) { - $salt = wp_salt('logged_in'); - $json = json_encode($credentials); - $encrypted = wfUtils::encrypt($json); - $signature = hash_hmac('sha256', $encrypted, $salt); - $response['credentials'] = $encrypted; - $response['credentialsSignature'] = $signature; - } - return $response; - } - - $helper->performAutoPrependFileRemoval($wp_filesystem); - - $nonce = bin2hex(wfWAFUtils::random_bytes(32)); - wfConfig::set('wafStatusCallbackNonce', $nonce); - $verifyURL = add_query_arg(array('action' => 'wordfence_wafStatus', 'nonce' => $nonce), $ajaxURL); - $response = wp_remote_get($verifyURL, array('headers' => array('Referer' => false/*, 'Cookie' => 'XDEBUG_SESSION=1'*/))); - - $active = true; - $subdirectory = WFWAF_SUBDIRECTORY_INSTALL; - if (!is_wp_error($response)) { - $wafStatus = @json_decode(wp_remote_retrieve_body($response), true); - if (isset($wafStatus['active']) && isset($wafStatus['subdirectory'])) { - $active = $wafStatus['active'] && !$wafStatus['subdirectory']; - $subdirectory = $wafStatus['subdirectory']; - } - } - - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Uninstallation Complete', 'wordfence'), - 'html' => wfView::create('waf/waf-uninstall-success', array('active' => $active, 'subdirectory' => $subdirectory))->render(), - 'footerButtonTitle' => __('Close', 'wordfence'), - ))->render(); - return array('ok' => 1, 'html' => $html); - } - } - catch (wfWAFAutoPrependHelperException $e) { - $installError = "<p>" . $e->getMessage() . "</p>"; - $html = wfView::create('waf/waf-modal-wrapper', array( - 'title' => __('Uninstallation Failed', 'wordfence'), - 'html' => $installError, - 'helpHTML' => wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the uninstall process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_REMOVE_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))), - 'footerButtonTitle' => __('Cancel', 'wordfence'), - ))->render(); - return array('uninstallationFailed' => 1, 'html' => $html); - } - } - - public static function actionUserRegistration($user_id) { - if (wfUtils::isAdmin($user_id) && ($request = self::getLog()->getCurrentRequest())) { - //self::getLog()->canLogHit = true; - $request->action = 'user:adminCreate'; - $request->save(); - } - } - - public static function actionPasswordReset($user = null, $new_pass = null) { - if ($request = self::getLog()->getCurrentRequest()) { - //self::getLog()->canLogHit = true; - $request->action = 'user:passwordReset'; - $request->save(); - } - } - - public static function trimWfHits($force = false) { - if(!$force && self::isApiDelayed()) - return; - $wfdb = new wfDB(); - $lastAggregation = wfConfig::get('lastBlockAggregation', 0); - $table_wfHits = wfDB::networkTable('wfHits'); - $count = $wfdb->querySingle("select count(*) as cnt from {$table_wfHits}"); - $liveTrafficMaxRows = absint(wfConfig::get('liveTraf_maxRows', 2000)); - if ($count > $liveTrafficMaxRows * 10) { - self::_aggregateBlockStats($lastAggregation); - $wfdb->truncate($table_wfHits); //So we don't slow down sites that have very large wfHits tables - } - else if ($count > $liveTrafficMaxRows) { - self::_aggregateBlockStats($lastAggregation); - $wfdb->queryWrite("delete from {$table_wfHits} order by id asc limit %d", ($count - $liveTrafficMaxRows) + ($liveTrafficMaxRows * .2)); - } - else if ($lastAggregation < (time() - 86400)) { - self::_aggregateBlockStats($lastAggregation); - } - - $maxAge = wfConfig::get('liveTraf_maxAge', 30); - if ($maxAge <= 0 || $maxAge > 30) { - $maxAge = 30; - } - $wfdb->queryWrite("DELETE FROM {$table_wfHits} WHERE ctime < %d", time() - ($maxAge * 86400)); - } - - private static function _aggregateBlockStats($since = false) { - global $wpdb; - - if (!wfConfig::get('other_WFNet', true)) { - return; - } - - if ($since === false) { - $since = wfConfig::get('lastBlockAggregation', 0); - } - - $hitsTable = wfDB::networkTable('wfHits'); - $query = $wpdb->prepare("SELECT COUNT(*) AS cnt, CASE WHEN (jsRun = 1 OR userID > 0) THEN 1 ELSE 0 END AS isHuman, statusCode FROM {$hitsTable} WHERE ctime > %d GROUP BY isHuman, statusCode", $since); - $rows = $wpdb->get_results($query, ARRAY_A); - if (count($rows)) { - try { - $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); - $api->call('aggregate_stats', array(), array('stats' => json_encode($rows))); - } - catch (Exception $e) { - // Do nothing - } - } - - wfConfig::set('lastBlockAggregation', time()); - } - - private static function isApiDelayed() { - return wfConfig::get('apiDelayedUntil', 0) > time(); - } - - private static function delaySendAttackData($until) { - wfConfig::set('apiDelayedUntil', $until); - self::scheduleSendAttackData($until); - } - - private static function scheduleSendAttackData($timeToSend = null) { - if ($timeToSend === null) { - $timeToSend = time() + (60 * 5); - } - $notMainSite = is_multisite() && !is_main_site(); - if ($notMainSite) { - global $current_site; - switch_to_blog($current_site->blog_id); - } - if (!wp_next_scheduled('wordfence_processAttackData')) { - wp_schedule_single_event($timeToSend, 'wordfence_processAttackData'); - } - if ($notMainSite) { - restore_current_blog(); - } - } - - private static function truncateWafFailures() { - wfDB::shared()->truncate(wfDB::networkTable('wfWafFailures')); - } - - private static function loadWafFailures(&$purgeCallable = null) { - global $wpdb; - $table = wfDB::networkTable('wfWafFailures'); - $query = <<<SQL - SELECT - id, - failures.rule_id, - throwable AS latest_throwable, - UNIX_TIMESTAMP(latest_occurrence) AS latest_occurrence, - occurrences - FROM - {$table} failures - JOIN ( - SELECT - rule_id, - MAX(id) AS max_id, - MAX(timestamp) AS latest_occurrence, - COUNT(*) AS occurrences - FROM - {$table} - GROUP BY - rule_id - ) aggregate ON failures.id = aggregate.max_id -SQL; - $results = $wpdb->get_results($query); - $maxId = null; - foreach ($results as $row) { - if ($maxId === null) { - $maxId = $row->id; - } - else { - $maxId = max($maxId, $row->id); - } - } - if ($maxId === null) { - $purgeCallable = function() { /* Nothing to delete */ }; - } - else { - $purgeCallable = function() use ($table, $maxId, $wpdb) { - $wpdb->query( - $wpdb->prepare( - "DELETE FROM {$table} WHERE id <= %d", - $maxId - ) - ); - }; - } - return $results; - } - - /** - * - */ - public static function processAttackData() { - global $wpdb; - $table_wfHits = wfDB::networkTable('wfHits'); - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - - $waf = wfWAF::getInstance(); - if ($waf->getStorageEngine()->getConfig('attackDataKey', false) === false) { - $waf->getStorageEngine()->setConfig('attackDataKey', mt_rand(0, 0xfff)); - } - - //Send alert email if needed - if (wfConfig::get('wafAlertOnAttacks')) { - $alertInterval = wfConfig::get('wafAlertInterval', 0); - $cutoffTime = max(time() - $alertInterval, wfConfig::get('wafAlertLastSendTime')); - $wafAlertWhitelist = wfConfig::get('wafAlertWhitelist', ''); - $wafAlertWhitelist = preg_split("/[,\r\n]+/", $wafAlertWhitelist); - foreach ($wafAlertWhitelist as $index => &$entry) { - $entry = trim($entry); - if (empty($entry) || (!preg_match('/^(?:\d{1,3}(?:\.|$)){4}/', $entry) && !preg_match('/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/i', $entry))) { - unset($wafAlertWhitelist[$index]); - continue; - } - - $packed = @wfUtils::inet_pton($entry); - if ($packed === false) { - unset($wafAlertWhitelist[$index]); - continue; - } - $entry = bin2hex($packed); - } - $wafAlertWhitelist = array_filter($wafAlertWhitelist); - $attackDataQuery = $wpdb->prepare( - "SELECT * FROM {$table_wfHits} - WHERE action = 'blocked:waf' " . - (count($wafAlertWhitelist) ? "AND HEX(IP) NOT IN (" . implode(", ", array_fill(0, count($wafAlertWhitelist), '%s')) . ")" : "") - . " AND attackLogTime > %f - ORDER BY attackLogTime DESC - LIMIT 10", - array_merge($wafAlertWhitelist, array(sprintf('%.6f', $cutoffTime)))); - $attackDataCountQuery = str_replace( - array( - "SELECT * FROM", - "ORDER BY attackLogTime DESC", - "LIMIT 10", - ), - array( "SELECT COUNT(*) FROM", "", "" ), $attackDataQuery - ); - $attackData = $wpdb->get_results($attackDataQuery); - $attackCount = $wpdb->get_var($attackDataCountQuery); - unset( $attackDataQuery, $attackDataCountQuery ); - $threshold = (int) wfConfig::get('wafAlertThreshold'); - if ($threshold < 1) { - $threshold = 100; - } - if ($attackCount >= $threshold) { - $durationMessage = wfUtils::makeDuration($alertInterval); - $message = sprintf( - /* translators: 1. Number of attacks/blocks. 2. Time since. */ - __('The Wordfence Web Application Firewall has blocked %1$d attacks over the last %2$s.', 'wordfence'), - $attackCount, - $durationMessage - ); - $message .= "\n\n"; - $message .= __('Wordfence is blocking these attacks, and we\'re sending this notice to make you aware that there is a higher volume of the attacks than usual. Additionally, the Wordfence Real-Time IP Blocklist can block known attackers\' IP addresses automatically for Premium users, including any probing requests that may not be malicious on their own. All Wordfence users can also opt to block the attacking IPs manually if desired. As always, be sure to watch your scan results and keep your plugins, themes and WordPress core version updated.', 'wordfence'); - $message .= "\n\n"; - $message .= __('Below is a sample of these recent attacks:', 'wordfence'); - $attackTable = array(); - $dateMax = $ipMax = $countryMax = 0; - foreach ($attackData as $row) { - $actionData = json_decode($row->actionData, true); - if (!is_array($actionData) || !isset($actionData['paramKey']) || !isset($actionData['paramValue'])) { - continue; - } - - if (isset($actionData['failedRules']) && $actionData['failedRules'] == 'blocked') { - $row->longDescription = __("Blocked because the IP is blocklisted", 'wordfence'); - } - else { - $row->longDescription = sprintf(/* translators: Reason for firewall action. */ __("Blocked for %s", 'wordfence'), $row->actionDescription); - } - - $paramKey = base64_decode($actionData['paramKey']); - $paramValue = base64_decode($actionData['paramValue']); - if (strlen($paramValue) > 100) { - $paramValue = substr($paramValue, 0, 100) . '...'; - } - - if (preg_match('/([a-z0-9_]+\.[a-z0-9_]+)(?:\[(.+?)\](.*))?/i', $paramKey, $matches)) { - switch ($matches[1]) { - case 'request.queryString': - $row->longDescription = sprintf( - /* translators: 1. Reason for firewall action. 2. Input parameter. 2. Input parameter value. */ - __('Blocked for %1$s in query string: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - case 'request.body': - $row->longDescription = sprintf( - /* translators: 1. Reason for firewall action. 2. Input parameter. 2. Input parameter value. */ - __('Blocked for %1$s in POST body: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - case 'request.cookie': - $row->longDescription = sprintf( - /* translators: 1. Reason for firewall action. 2. Input parameter. 2. Input parameter value. */ - __('Blocked for %1$s in cookie: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - case 'request.fileNames': - $row->longDescription = sprintf( - /* translators: 1. Reason for firewall action. 2. Input parameter. 2. Input parameter value. */ - __('Blocked for %1$s in file: %2$s = %3$s', 'wordfence'), $row->actionDescription, $matches[2], $paramValue); - break; - } - } - - $date = date_i18n('F j, Y g:ia', floor($row->attackLogTime)); $dateMax = max(strlen($date), $dateMax); - $ip = wfUtils::inet_ntop($row->IP); $ipMax = max(strlen($ip), $ipMax); - $country = wfUtils::countryCode2Name(wfUtils::IP2Country($ip)); $country = (empty($country) ? 'Unknown' : $country); $countryMax = max(strlen($country), $countryMax); - $attackTable[] = array('date' => $date, 'IP' => $ip, 'country' => $country, 'message' => $row->longDescription); - } - - foreach ($attackTable as $row) { - $date = str_pad($row['date'], $dateMax + 2); - $ip = str_pad($row['IP'] . " ({$row['country']})", $ipMax + $countryMax + 8); - $attackMessage = $row['message']; - $message .= "\n" . $date . $ip . $attackMessage; - } - - $alertCallback = array(new wfIncreasedAttackRateAlert($message), 'send'); - do_action('wordfence_security_event', 'increasedAttackRate', array( - 'attackCount' => $attackCount, - 'attackTable' => $attackTable, - 'duration' => $alertInterval, - 'ip' => wfUtils::getIP(), - ), $alertCallback); - - wfConfig::set('wafAlertLastSendTime', time()); - } - } - - if (wfConfig::get('other_WFNet', true)) { - $response = wp_remote_get(sprintf(WFWAF_API_URL_SEC . "waf-rules/%d.txt", $waf->getStorageEngine()->getConfig('attackDataKey')), array('headers' => array('Referer' => false))); - if (!is_wp_error($response)) { - $okToSendBody = wp_remote_retrieve_body($response); - if ($okToSendBody === 'ok') { - //Send attack data - $limit = 500; - $lastSendTime = wfConfig::get('lastAttackDataSendTime'); - $lastSendId = wfConfig::get('lastAttackDataSendId'); - if($lastSendId===false){ - $query=$wpdb->prepare("SELECT * FROM {$table_wfHits} - WHERE action in ('blocked:waf', 'learned:waf', 'logged:waf', 'blocked:waf-always') - AND attackLogTime > %f - LIMIT %d", sprintf('%.6f', $lastSendTime), $limit); - - $count_query = str_replace( - array( - "SELECT * FROM", - "LIMIT " . $limit, - ), - array( "SELECT COUNT(*) FROM", "" ), $query - ); - } - else{ - $query=$wpdb->prepare("SELECT * FROM {$table_wfHits} - WHERE action in ('blocked:waf', 'learned:waf', 'logged:waf', 'blocked:waf-always') - AND id > %d - ORDER BY id LIMIT %d", $lastSendId, $limit); - - $count_query = str_replace( - array( - "SELECT * FROM", - "ORDER BY id LIMIT " . $limit, - ), - array( "SELECT COUNT(*) FROM", "" ), $query - ); - } - - $params[]=$limit; - $attackData = $wpdb->get_results($query); - $totalRows = $wpdb->get_var($count_query); - - if ($attackData) { // Build JSON to send - $dataToSend = array(); - $attackDataToUpdate = array(); - foreach ($attackData as $attackDataRow) { - $actionData = (array) wfRequestModel::unserializeActionData($attackDataRow->actionData); - $dataToSend[] = array( - $attackDataRow->attackLogTime, - $attackDataRow->ctime, - wfUtils::inet_ntop($attackDataRow->IP), - (array_key_exists('learningMode', $actionData) ? $actionData['learningMode'] : 0), - (array_key_exists('paramKey', $actionData) ? base64_encode($actionData['paramKey']) : false), - (array_key_exists('paramValue', $actionData) ? base64_encode($actionData['paramValue']) : false), - (array_key_exists('failedRules', $actionData) ? $actionData['failedRules'] : ''), - strpos($attackDataRow->URL, 'https') === 0 ? 1 : 0, - (array_key_exists('fullRequest', $actionData) ? $actionData['fullRequest'] : ''), - ); - if (array_key_exists('fullRequest', $actionData)) { - unset($actionData['fullRequest']); - $attackDataToUpdate[$attackDataRow->id] = array( - 'actionData' => wfRequestModel::serializeActionData($actionData), - ); - } - if ($attackDataRow->attackLogTime > $lastSendTime) { - $lastSendTime = $attackDataRow->attackLogTime; - } - } - - $bodyLimit=self::ATTACK_DATA_BODY_LIMIT; - $response=null; - do { - $bodyData=null; - do { - if($bodyData!==null) - array_splice($dataToSend, floor(count($dataToSend)/2)); - $bodyData=json_encode($dataToSend); - } while(strlen($bodyData)>$bodyLimit&&count($dataToSend)>1); - - $homeurl = wfUtils::wpHomeURL(); - $siteurl = wfUtils::wpSiteURL(); - $installType = wfUtils::wafInstallationType(); - $response = wp_remote_post(WFWAF_API_URL_SEC . "?" . http_build_query(array( - 'action' => 'send_waf_attack_data', - 'k' => $waf->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $siteurl, - 'h' => $homeurl, - 't' => microtime(true), - 'c' => $installType, - 'lang' => get_site_option('WPLANG'), - ), '', '&'), - array( - 'body' => $bodyData, - 'headers' => array( - 'Content-Type' => 'application/json', - 'Referer' => false, - ), - 'timeout' => 30, - )); - $bodyLimit/=2; - } while(wp_remote_retrieve_response_code($response)===413&&count($dataToSend)>1); - - if (!is_wp_error($response) && ($body = wp_remote_retrieve_body($response))) { - $jsonData = json_decode($body, true); - if (is_array($jsonData) && array_key_exists('success', $jsonData)) { - wfConfig::set('lastAttackDataSendTime', $lastSendTime); - $lastSendIndex=count($dataToSend)-1; - if($lastSendIndex>=0){ - $lastSendId = $attackData[$lastSendIndex]->id; - wfConfig::set('lastAttackDataSendId', $lastSendId); - // Successfully sent data, remove the full request from the table to reduce storage size - foreach ($attackDataToUpdate as $hitID => $dataToUpdate) { - if ($hitID <= $lastSendId) { - $wpdb->update($table_wfHits, $dataToUpdate, array( - 'id' => $hitID, - )); - } - } - } - if (count($dataToSend) < $totalRows) { - self::scheduleSendAttackData(); - } - - if (array_key_exists('data', $jsonData) && array_key_exists('watchedIPList', $jsonData['data'])) { - $waf->getStorageEngine()->setConfig('watchedIPs', $jsonData['data']['watchedIPList'], 'transient'); - } - } - } - else{ - //Delay interactions for 30 minutes if an error occurs - self::delaySendAttackData(time() + 30*60); - } - } - - //Send false positives and WAF failures - $lastSendTime = wfConfig::get('lastFalsePositiveSendTime'); - $whitelistedURLParams = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('whitelistedURLParams', array(), 'livewaf'); - $wafFailures = self::loadWafFailures($purgeWafFailures); - if (count($whitelistedURLParams) || !empty($wafFailures)) { - $falsePositives = array(); - $mostRecentWhitelisting = $lastSendTime; - foreach ($whitelistedURLParams as $urlParamKey => $rules) { - list($path, $paramKey) = explode('|', $urlParamKey); - $ruleData = array(); - foreach ($rules as $ruleID => $whitelistedData) { - if ($whitelistedData['timestamp'] > $lastSendTime && (!isset($whitelistedData['disabled']) || !$whitelistedData['disabled'])) { - if (isset($whitelistedData['source'])) { - $source = $whitelistedData['source']; - } - else if ($whitelistedData['description'] == 'Allowlisted via false positive dialog') { - $source = 'false-positive'; - } - else if ($whitelistedData['description'] == 'Allowlisted via Live Traffic') { - $source = 'live-traffic'; - } - else if ($whitelistedData['description'] == 'Allowlisted while in Learning Mode.') { - $source = 'learning-mode'; - } - else { //A user-entered description or Whitelisted via Firewall Options page - $source = 'waf-options'; - } - - $ruleData[] = array( - $ruleID, - $whitelistedData['timestamp'], - $source, - $whitelistedData['description'], - $whitelistedData['ip'], - isset($whitelistedData['userID']) ? $whitelistedData['userID'] : 0, - ); - - if ($whitelistedData['timestamp'] > $mostRecentWhitelisting) { - $mostRecentWhitelisting = $whitelistedData['timestamp']; - } - } - } - - if (count($ruleData)) { - $falsePositives[] = array( - base64_decode($path), - base64_decode($paramKey), - $ruleData, - ); - } - } - - $data = []; - if (!empty($wafFailures)) - $data['waf_failures'] = $wafFailures; - if (!empty($falsePositives)) - $data['false_positives'] = $falsePositives; - - if (count($data)) { - $homeurl = wfUtils::wpHomeURL(); - $siteurl = wfUtils::wpSiteURL(); - $installType = wfUtils::wafInstallationType(); - $response = wp_remote_post(WFWAF_API_URL_SEC . "?" . http_build_query(array( - 'action' => 'send_waf_false_positives', - 'k' => $waf->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $siteurl, - 'h' => $homeurl, - 't' => microtime(true), - 'c' => $installType, - 'lang' => get_site_option('WPLANG'), - ), '', '&'), - array( - 'body' => json_encode($data), - 'headers' => array( - 'Content-Type' => 'application/json', - 'Referer' => false, - ), - 'timeout' => 30, - )); - - if (!is_wp_error($response) && ($body = wp_remote_retrieve_body($response))) { - $jsonData = json_decode($body, true); - if (is_array($jsonData) && array_key_exists('success', $jsonData)) { - $purgeWafFailures(); - wfConfig::set('lastFalsePositiveSendTime', $mostRecentWhitelisting); - } - } - } - } - } - else if (is_string($okToSendBody) && preg_match('/next check in: ([0-9]+)/', $okToSendBody, $matches)) { - self::delaySendAttackData(time() + $matches[1]); - } - } - else { // Could be that the server is down, so hold off on sending data for a little while - self::delaySendAttackData(time() + 7200); - } - } - else if (!wfConfig::get('other_WFNet', true)) { - wfConfig::set('lastAttackDataSendTime', time()); - wfConfig::set('lastFalsePositiveSendTime', time()); - self::truncateWafFailures(); - } - - self::trimWfHits(); - } - - public static function syncAttackData($exit = true) { - global $wpdb; - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - $log = self::getLog(); - $waf = wfWAF::getInstance(); - $table_wfHits = wfDB::networkTable('wfHits'); - if ($waf->getStorageEngine() instanceof wfWAFStorageMySQL) { - $lastAttackMicroseconds = floatval($waf->getStorageEngine()->getConfig('lastAttackDataTruncateTime')); - } else { - $lastAttackMicroseconds = $wpdb->get_var("SELECT MAX(attackLogTime) FROM {$table_wfHits}"); - } - - if ($waf->getStorageEngine()->hasNewerAttackData($lastAttackMicroseconds)) { - $attackData = $waf->getStorageEngine()->getNewestAttackDataArray($lastAttackMicroseconds); - if ($attackData) { - foreach ($attackData as $request) { - if (count($request) !== 9 && count($request) !== 10 /* with metadata */ && count($request) !== 11) { - continue; - } - - list($logTimeMicroseconds, $requestTime, $ip, $learningMode, $paramKey, $paramValue, $failedRules, $ssl, $requestString) = $request; - $metadata = null; - $recordID = null; - if (array_key_exists(9, $request)) { - $metadata = $request[9]; - } - if (array_key_exists(10, $request)) { - $recordID = $request[10]; - } - - // Skip old entries and hits in learning mode, since they'll get picked up anyways. - if ($logTimeMicroseconds <= $lastAttackMicroseconds || $learningMode) { - continue; - } - - $statusCode = 403; - - $hit = new wfRequestModel(); - if (is_numeric($recordID)) { - $hit->id = $recordID; - } - - $hit->attackLogTime = $logTimeMicroseconds; - $hit->ctime = $requestTime; - $hit->IP = wfUtils::inet_pton($ip); - - if (preg_match('/user\-agent:(.*?)\n/i', $requestString, $matches)) { - $hit->UA = trim($matches[1]); - $hit->isGoogle = wfCrawl::isGoogleCrawler($hit->UA); - } - - if (preg_match('/Referer:(.*?)\n/i', $requestString, $matches)) { - $hit->referer = trim($matches[1]); - } - - if (preg_match('/^[a-z]+\s+(.*?)\s+/i', $requestString, $uriMatches) && preg_match('/Host:(.*?)\n/i', $requestString, $hostMatches)) { - $hit->URL = 'http' . ($ssl ? 's' : '') . '://' . trim($hostMatches[1]) . trim($uriMatches[1]); - } - - $hit->jsRun = (int) wfLog::isHumanRequest($ip, $hit->UA); - $isHuman = !!$hit->jsRun; - - if (preg_match('/cookie:(.*?)\n/i', $requestString, $matches)) { - $authCookieName = $waf->getAuthCookieName(); - $hasLoginCookie = strpos($matches[1], $authCookieName) !== false; - if ($hasLoginCookie && preg_match('/' . preg_quote($authCookieName) . '=(.*?);/', $matches[1], $cookieMatches)) { - $authCookie = rawurldecode($cookieMatches[1]); - $decodedAuthCookie = $waf->parseAuthCookie($authCookie); - if ($decodedAuthCookie !== false) { - $hit->userID = $decodedAuthCookie['userID']; - $isHuman = true; - } - } - } - - $path = '/'; - if (preg_match('/^[A-Z]+ (.*?) HTTP\\/1\\.1/', $requestString, $matches)) { - if (($pos = strpos($matches[1], '?')) !== false) { - $path = substr($matches[1], 0, $pos); - } else { - $path = $matches[1]; - } - } - - $metadata = ($metadata != null ? (array) $metadata : array()); - if (isset($metadata['finalAction']) && $metadata['finalAction']) { // The request was blocked/redirected because of its IP based on the plugin's blocking settings. WAF blocks should be reported but not shown in live traffic with that as a reason. - $action = $metadata['finalAction']['action']; - $actionDescription = $action; - if (class_exists('wfWAFIPBlocksController')) { - if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_UAREFIPRANGE) { - wfActivityReport::logBlockedIP($ip, null, 'advanced'); - } - else if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_COUNTRY_BYPASS_REDIR) { - /* Handled below */ - } - else if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_COUNTRY_REDIR) { - $actionDescription .= ' (' . wfConfig::get('cbl_redirURL') . ')'; - wfConfig::inc('totalCountryBlocked'); - wfActivityReport::logBlockedIP($ip, null, 'country'); - } - else if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_COUNTRY) { - wfConfig::inc('totalCountryBlocked'); - wfActivityReport::logBlockedIP($ip, null, 'country'); - } - else if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_WFSN) { - wordfence::wfsnReportBlockedAttempt($ip, 'login'); - wfActivityReport::logBlockedIP($ip, null, 'brute'); - } - else if (defined('wfWAFIPBlocksController::WFWAF_BLOCK_BADPOST') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_BADPOST) { - wfActivityReport::logBlockedIP($ip, null, 'badpost'); - } - else if (defined('wfWAFIPBlocksController::WFWAF_BLOCK_BANNEDURL') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_BANNEDURL) { - wfActivityReport::logBlockedIP($ip, null, 'bannedurl'); - } - else if (defined('wfWAFIPBlocksController::WFWAF_BLOCK_FAKEGOOGLE') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_FAKEGOOGLE) { - wfActivityReport::logBlockedIP($ip, null, 'fakegoogle'); - } - else if ((defined('wfWAFIPBlocksController::WFWAF_BLOCK_LOGINSEC') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_LOGINSEC) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_LOGINSEC_FORGOTPASSWD') && strpos($action, wfWAFIPBlocksController::WFWAF_BLOCK_LOGINSEC_FORGOTPASSWD) === 0) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_LOGINSEC_FAILURES') && strpos($action, wfWAFIPBlocksController::WFWAF_BLOCK_LOGINSEC_FAILURES) === 0)) { - wfActivityReport::logBlockedIP($ip, null, 'brute'); - } - else if ((defined('wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLEGLOBAL') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLEGLOBAL) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLESCAN') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLESCAN) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLECRAWLER') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLECRAWLER) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLECRAWLERNOTFOUND') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLECRAWLERNOTFOUND) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLEHUMAN') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLEHUMAN) || - (defined('wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLEHUMANNOTFOUND') && $action == wfWAFIPBlocksController::WFWAF_BLOCK_THROTTLEHUMANNOTFOUND) - ) { - wfConfig::inc('totalIPsThrottled'); - wfActivityReport::logBlockedIP($ip, null, 'throttle'); - } - else { //Manual block - wfActivityReport::logBlockedIP($ip, null, 'manual'); - } - - if (isset($metadata['finalAction']['id']) && $action != wfWAFIPBlocksController::WFWAF_BLOCK_COUNTRY_BYPASS_REDIR) { - $id = $metadata['finalAction']['id']; - $block = new wfBlock($id); - $block->recordBlock(1, (int) $requestTime); - } - } - - if (strlen($actionDescription) == 0) { - $actionDescription = 'Blocked by Wordfence'; - } - - if (empty($failedRules)) { // Just a plugin block - $statusCode = 503; - $hit->action = 'blocked:wordfence'; - if (class_exists('wfWAFIPBlocksController')) { - if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_COUNTRY_BYPASS_REDIR) { - $statusCode = 302; - $hit->action = 'cbl:redirect'; - } - else if ($action == wfWAFIPBlocksController::WFWAF_BLOCK_WFSN) { - $hit->action = 'blocked:wfsnrepeat'; - wordfence::wfsnReportBlockedAttempt($ip, 'waf'); - } - else if (isset($metadata['finalAction']['lockout'])) { - $hit->action = 'lockedOut'; - } - else if (isset($metadata['finalAction']['block'])) { - //Do nothing - } - } - $hit->actionDescription = $actionDescription; - } - else if (preg_match('/\blogged\b/i', $failedRules)) { - $statusCode = 200; - $hit->action = 'logged:waf'; - } - else { // Blocked by the WAF but would've been blocked anyway by the plugin settings so that message takes priority - $hit->action = 'blocked:waf-always'; - $hit->actionDescription = $actionDescription; - } - } - else { - if (preg_match('/\blogged\b/i', $failedRules)) { - $statusCode = 200; - $hit->action = 'logged:waf'; - } - else { - $hit->action = 'blocked:waf'; - - $type = null; - if ($failedRules == 'blocked') { - $type = 'blacklist'; - } - else if (is_numeric($failedRules)) { - $type = 'waf'; - } - wfActivityReport::logBlockedIP($hit->IP, null, $type); - } - } - - /** @var wfWAFRule $rule */ - $ruleIDs = explode('|', $failedRules); - $actionData = array( - 'learningMode' => $learningMode, - 'failedRules' => $failedRules, - 'paramKey' => $paramKey, - 'paramValue' => $paramValue, - 'path' => $path, - ); - if ($ruleIDs && $ruleIDs[0]) { - $rule = $waf->getRule($ruleIDs[0]); - if ($rule) { - if ($hit->action == 'logged:waf' || $hit->action == 'blocked:waf') { $hit->actionDescription = $rule->getDescription(); } - $actionData['category'] = $rule->getCategory(); - $actionData['ssl'] = $ssl; - $actionData['fullRequest'] = base64_encode($requestString); - } - else if ($ruleIDs[0] == 'logged' && isset($ruleIDs[1]) && ($rule = $waf->getRule($ruleIDs[1]))) { - if ($hit->action == 'logged:waf' || $hit->action == 'blocked:waf') { $hit->actionDescription = $rule->getDescription(); } - $actionData['category'] = $rule->getCategory(); - $actionData['ssl'] = $ssl; - $actionData['fullRequest'] = base64_encode($requestString); - } - else if ($ruleIDs[0] == 'logged') { - if ($hit->action == 'logged:waf' || $hit->action == 'blocked:waf') { $hit->actionDescription = 'Watched IP Traffic: ' . $ip; } - $actionData['category'] = 'logged'; - $actionData['ssl'] = $ssl; - $actionData['fullRequest'] = base64_encode($requestString); - } - else if ($ruleIDs[0] == 'blocked') { - $actionData['category'] = 'blocked'; - $actionData['ssl'] = $ssl; - $actionData['fullRequest'] = base64_encode($requestString); - } - } - - $hit->actionData = wfRequestModel::serializeActionData($actionData, array('fullRequest', 'ssl', 'category', 'learningMode', 'paramValue')); - $hit->statusCode = $statusCode; - $hit->save(); - - self::scheduleSendAttackData(); - } - } - $waf->getStorageEngine()->truncateAttackData(); - } - update_site_option('wordfence_syncingAttackData', 0); - update_site_option('wordfence_syncAttackDataAttempts', 0); - update_site_option('wordfence_lastSyncAttackData', time()); - if ($exit) { - exit; - } - } - - public static function addSyncAttackDataAjax() { - $URL = home_url('/?wordfence_syncAttackData=' . microtime(true)); - $URL = esc_url(preg_replace('/^https?:/i', '', $URL)); - // Load as external script async so we don't slow page down. - echo "<script type=\"text/javascript\" src=\"$URL\" async></script>"; - } - - /** - * This is the only hook I see to tie into WP's core update process. - * Since we hide the readme.html to prevent the WordPress version from being discovered, it breaks the upgrade - * process because it cannot copy the previous readme.html. - * - * @param string $string - * @return string - */ - public static function restoreReadmeForUpgrade($string) { - static $didRun; - if (!isset($didRun)) { - $didRun = true; - wfUtils::showReadme(); - register_shutdown_function('wfUtils::hideReadme'); - } - - return $string; - } - - public static function showOnboardingBanner() { - wfOnboardingController::enqueue_assets(); - if (self::isWordfencePage(false) && !self::isWordfenceInstallPage() && !self::isWordfenceSupportPage() && !self::isWordfenceSubpage('tools', 'diagnostics')) { - echo wfView::create('onboarding/disabled-overlay')->render(); - } - echo wfView::create('onboarding/banner', array('dismissable' => !self::isWordfencePage(false)))->render(); - } - - public static function showCentralConfigurationIssueNotice() { -?> - <div class="fade error"> - <p><?php echo wp_kses(sprintf(__('An error was detected with this site\'s configuration that is preventing a successful connection to Wordfence Central. Disconnecting from Central <a href="%s">on the Wordfence Dashboard</a> and reconnecting may resolve it. If the issue persists, please contact Wordfence support.', 'wordfence'), network_admin_url('admin.php?page=Wordfence#wf-central-status')), array('a' => array('href' => array()))) ?></p> - </div> -<?php - } - - public static function wafAutoPrependNotice() { - $url = network_admin_url('admin.php?page=WordfenceWAF&subpage=waf_options#configureAutoPrepend'); - echo '<div class="update-nag" id="wf-extended-protection-notice">' . __('To make your site as secure as possible, take a moment to optimize the Wordfence Web Application Firewall:', 'wordfence') . '  <a class="wf-btn wf-btn-default wf-btn-sm" href="' . esc_url($url) . '">' . __('Click here to configure', 'wordfence') . '</a> - <a class="wf-btn wf-btn-default wf-btn-sm wf-dismiss-link" href="#" onclick="wordfenceExt.setOption(\'dismissAutoPrependNotice\', 1); jQuery(\'#wf-extended-protection-notice\').fadeOut(); return false;" role="button">' . __('Dismiss', 'wordfence') . '</a> - <br> - <em style="font-size: 85%;">' . wp_kses(sprintf(/* translators: Support URL. */ __('If you cannot complete the setup process, <a target="_blank" rel="noopener noreferrer" href="%s">click here for help<span class="screen-reader-text"> (opens in new tab)</span></a>.', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_INSTALL_MANUALLY)), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))) . '</em> - </div>'; - } - - public static function wafAutoPrependVerify() { - if (WFWAF_AUTO_PREPEND && !WFWAF_SUBDIRECTORY_INSTALL) { - echo '<div class="updated is-dismissible"><p>' . __('Nice work! The firewall is now optimized.', 'wordfence') . '</p></div>'; - } else { - echo '<div class="notice notice-error"><p>' . __('The changes have not yet taken effect. If you are using LiteSpeed or IIS as your web server or CGI/FastCGI interface, you may need to wait a few minutes for the changes to take effect since the configuration files are sometimes cached. You also may need to select a different server configuration in order to complete this step, but wait for a few minutes before trying. You can try refreshing this page.', 'wordfence') . '</p></div>'; - } - } - - public static function wafAutoPrependRemoved() { - if (!WFWAF_AUTO_PREPEND) { - echo '<div class="updated is-dismissible"><p>' . __('Uninstallation was successful!', 'wordfence') . '</p></div>'; - } - else if (WFWAF_SUBDIRECTORY_INSTALL) { - echo '<div class="notice notice-warning"><p>' . __('Uninstallation from this site was successful! The Wordfence Firewall is still active because it is installed in another WordPress installation.', 'wordfence') . '</p></div>'; - } - else { - echo '<div class="notice notice-error"><p>' . __('The changes have not yet taken effect. If you are using LiteSpeed or IIS as your web server or CGI/FastCGI interface, you may need to wait a few minutes for the changes to take effect since the configuration files are sometimes cached. You also may need to select a different server configuration in order to complete this step, but wait for a few minutes before trying. You can try refreshing this page.', 'wordfence') . '</p></div>'; - } - } - - public static function wafUpdateSuccessful() { - echo '<div class="updated is-dismissible"><p>' . __('The update was successful!', 'wordfence') . '</p></div>'; - } - - public static function getWAFBootstrapPath() { - if (WF_IS_PRESSABLE || WF_IS_FLYWHEEL) { - return WP_CONTENT_DIR . '/wordfence-waf.php'; - } - return ABSPATH . 'wordfence-waf.php'; - } - - public static function getWAFBootstrapContent($currentAutoPrependedFile = null) { - $bootstrapPath = dirname(self::getWAFBootstrapPath()); - $currentAutoPrepend = ''; - if ($currentAutoPrependedFile && is_file($currentAutoPrependedFile) && !WFWAF_SUBDIRECTORY_INSTALL) { - $currentAutoPrepend = sprintf(' -// This file was the current value of auto_prepend_file during the Wordfence WAF installation (%2$s) -if (file_exists(%1$s)) { - include_once %1$s; -}', var_export($currentAutoPrependedFile, true), date('r')); - } - return sprintf('<?php -// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this. -%3$s -if (file_exists(__DIR__.%1$s)) { - define("WFWAF_LOG_PATH", __DIR__.%2$s); - include_once __DIR__.%1$s; -}', - var_export(wfUtils::relativePath(WORDFENCE_PATH . 'waf/bootstrap.php', $bootstrapPath, true), true), - var_export(wfUtils::relativePath((WFWAF_SUBDIRECTORY_INSTALL ? WP_CONTENT_DIR . '/wflogs/' : WFWAF_LOG_PATH), $bootstrapPath, true), true), - $currentAutoPrepend); - } - - private static function isCurrentUserAdmin() { - return self::getCurrentUserRole() === 'administrator'; - } - - /** - * @return bool|string - */ - private static function getCurrentUserRole() { - if (current_user_can('administrator') || is_super_admin()) { - return 'administrator'; - } - $roles = array('editor', 'author', 'contributor', 'subscriber'); - foreach ($roles as $role) { - if (current_user_can($role)) { - return $role; - } - } - return 'other'; - } - - private static function getCurrentUserCapabilities() { - $capabilities = array( - 'manage_options', - 'unfiltered_html', - 'edit_others_posts', - 'upload_files', - 'publish_posts', - 'edit_posts', - 'read', - 'manage_network' - ); - foreach ($capabilities as $index=>$capability) { - if (!current_user_can($capability)) { - unset($capabilities[$index]); - } - } - return array_values($capabilities); - } - - public static function licenseStatusChanged() { - $event = new wfWAFCronFetchRulesEvent(time() - 2); - $event->setWaf(wfWAF::getInstance()); - $event->fire(); - - //Update the WAF cron - $cron = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('cron', null, 'livewaf'); - if (is_array($cron)) { - /** @var wfWAFCronEvent $event */ - foreach ($cron as $index => $event) { - $event->setWaf(wfWAF::getInstance()); - if (!$event->isInPast()) { - $newEvent = $event->reschedule(); - if ($newEvent instanceof wfWAFCronEvent && $newEvent !== $event) { - $cron[$index] = $newEvent; - } else { - unset($cron[$index]); - } - } - } - } - wfWAF::getInstance()->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - } - - /** - * @param string $adminURL - * @param string $homePath - * @param bool $relaxedFileOwnership - * @param bool $output Whether or not to output the credentials collection form. If false, this function only returns the status. - * @return bool Returns true if the path is writable, otherwise false. - */ - public static function requestFilesystemCredentials($adminURL, $homePath = null, $relaxedFileOwnership = true, $output = true) { - if ($homePath === null) { - $homePath = wfUtils::getHomePath(); - } - - if (!$output) { ob_start(); } - if (false === ($credentials = request_filesystem_credentials($adminURL, '', false, $homePath, array('version', 'locale'), $relaxedFileOwnership))) { - if (!$output) { ob_end_clean(); } - return false; - } - - if (!WP_Filesystem($credentials, $homePath, $relaxedFileOwnership)) { // Failed to connect, Error and request again - request_filesystem_credentials($adminURL, '', true, ABSPATH, array('version', 'locale'), $relaxedFileOwnership); - if (!$output) { ob_end_clean(); } - return false; - } - - global $wp_filesystem; - if ($wp_filesystem->errors->get_error_code()) { - if (!$output) { ob_end_clean(); } - return false; - } - - if (!$output) { ob_end_clean(); } - return true; - } - - public static function initRestAPI() { - if (wfCentral::isSupported()) { - $auth = new wfRESTAuthenticationController(); - $auth->registerRoutes(); - - $config = new wfRESTConfigController(); - $config->registerRoutes(); - - $scan = new wfRESTScanController(); - $scan->registerRoutes(); - } - } - - public static function ajax_wfcentral_step1_callback() { - // Step 1: Makes GET request to `/central/api/site/access-token` endpoint authenticated with the auth grant supplied by the user. - // - Receives site GUID, public key, short lived JWT. - - $authGrant = isset($_REQUEST['auth-grant']) ? $_REQUEST['auth-grant'] : null; - if (!$authGrant) { - return array( - 'err' => 1, - 'errorMsg' => __("Auth grant is invalid.", 'wordfence'), - ); - } - - $request = new wfCentralAPIRequest('/site/access-token', 'GET', $authGrant); - try { - $response = $request->execute(); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - - if (!isset($response)) { - return array( - 'err' => 1, - 'errorMsg' => __('Internal error when connecting to Wordfence Central (see server error log)', 'wordfence'), - ); - } - else if ($response->isError()) { - return $response->returnErrorArray(); - } - - $body = $response->getJSONBody(); - if (!is_array($body) || !isset($body['data']['attributes'])) { - return array( - 'err' => 1, - 'errorMsg' => sprintf(/* translators: Error message. */ __("Invalid response from Wordfence Central: %s", 'wordfence'), $response->getBody()), - ); - } - if (!array_key_exists('id', $body['data'])) { - return array( - 'err' => 1, - 'errorMsg' => sprintf(/* translators: JSON property. */ __("Invalid response from Wordfence Central. Parameter %s not found in response.", 'wordfence'), 'id'), - ); - } - - $data = $body['data']['attributes']; - $expected = array( - 'public-key', - 'access-token', - ); - foreach ($expected as $key) { - if (!array_key_exists($key, $data)) { - return array( - 'err' => 1, - 'errorMsg' => sprintf(/* translators: JSON property. */ __("Invalid response from Wordfence Central. Parameter %s not found in response.", 'wordfence'), $key), - ); - } - } - - wfConfig::set('wordfenceCentralSiteID', $body['data']['id']); - wfConfig::set('wordfenceCentralPK', pack("H*", $data['public-key'])); - wfConfig::set('wordfenceCentralAccessToken', $data['access-token']); - wfConfig::set('wordfenceCentralCurrentStep', 2); - - wfConfig::set('wordfenceCentralDisconnected', false); - wfConfig::set('wordfenceCentralDisconnectTime', null); - wfConfig::set('wordfenceCentralDisconnectEmail', null); - - return array( - 'success' => 1, - ); - } - - public static function ajax_wfcentral_step2_callback() { - // Step 2: Makes POST request to `/central/api/wf/site/<guid>` endpoint passing in the new public key. - // Uses JWT from auth grant endpoint as auth. - - require_once(WORDFENCE_PATH . '/lib/sodium_compat_fast.php'); - - $accessToken = wfConfig::get('wordfenceCentralAccessToken'); - if (!$accessToken) { - return array( - 'err' => 1, - 'errorMsg' => __("Access token not found.", 'wordfence'), - ); - } - - $keypair = ParagonIE_Sodium_Compat::crypto_sign_keypair(); - $publicKey = ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair); - $secretKey = ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair); - wfConfig::set('wordfenceCentralSecretKey', $secretKey); - - $request = new wfCentralAPIRequest('/site/' . wfConfig::get('wordfenceCentralSiteID'), 'POST', - $accessToken, array( - 'data' => array( - 'attributes' => array( - 'public-key' => ParagonIE_Sodium_Compat::bin2hex($publicKey), - ), - ), - )); - try { - $response = $request->execute(); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - - if (!isset($response)) { - return array( - 'err' => 1, - 'errorMsg' => __('Internal error when connecting to Wordfence Central (see server error log)', 'wordfence'), - ); - } - else if ($response->isError()) { - return $response->returnErrorArray(); - } - - wfConfig::set('wordfenceCentralCurrentStep', 3); - - return array( - 'success' => 1, - ); - } - - public static function ajax_wfcentral_step3_callback() { - // Step 3: Makes GET request to `/central/api/wf/site/<guid>` endpoint signed using Wordfence plugin private key. - // - Expects 200 response with site data. - - try { - $request = new wfCentralAuthenticatedAPIRequest('/site/' . wfConfig::get('wordfenceCentralSiteID')); - $response = $request->execute(); - if ($response->isError()) { - return $response->returnErrorArray(); - } - - $body = $response->getJSONBody(); - if (!is_array($body) || !isset($body['data']['attributes'])) { - return array( - 'error' => 1, - 'errorMsg' => __('Invalid response from Wordfence Central.', 'wordfence'), - ); - } - wfConfig::set('wordfenceCentralSiteData', json_encode($body['data']['attributes'])); - wfConfig::set('wordfenceCentralCurrentStep', 4); - - return array( - 'success' => 1, - ); - - } - catch (wfCentralAPIException $e) { - return array( - 'error' => 1, - 'errorMsg' => $e->getMessage(), - ); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - return array( - 'error' => 1, - 'errorMsg' => $e->getMessage(), - ); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - return array( - 'error' => 1, - 'errorMsg' => $t->getMessage(), - ); - } - } - - public static function ajax_wfcentral_step4_callback() { - // Step 4: Poll for PUT request at `/wp-json/wp/v2/wordfence-auth-grant/` endpoint signed using Wordfence Central private key with short lived JWT. - // - Expects verifiable signature of incoming request from Wordfence Central. - // - Stores auth grant JWT. - - $wfCentralAuthGrant = wfConfig::get('wordfenceCentralUserSiteAuthGrant'); - if ($wfCentralAuthGrant) { - wfConfig::set('wordfenceCentralCurrentStep', 5); - return array( - 'success' => 1, - ); - } - return array( - 'success' => 0, - ); - } - - public static function ajax_wfcentral_step5_callback() { - // Step 5: Makes POST request to `/central/api/site/<guid>/access-token` endpoint signed using Wordfence plugin private key with auth grant JWT. - // - Expects 200 response with access token. - - $wfCentralAuthGrant = wfConfig::get('wordfenceCentralUserSiteAuthGrant'); - if (!$wfCentralAuthGrant) { - return array( - 'error' => 1, - 'errorMsg' => __('Auth grant not found.', 'wordfence'), - ); - } - - try { - $request = new wfCentralAuthenticatedAPIRequest( - sprintf('/site/%s/access-token', wfConfig::get('wordfenceCentralSiteID')), - 'POST', - array( - 'data' => array( - 'attributes' => array( - 'auth-grant' => $wfCentralAuthGrant, - ), - ), - )); - $response = $request->execute(); - if ($response->isError()) { - return $response->returnErrorArray(); - } - - $body = $response->getJSONBody(); - if (!is_array($body) || !isset($body['access-token'])) { - return array( - 'error' => 1, - 'errorMsg' => __('Invalid response from Wordfence Central.', 'wordfence'), - ); - } - wfConfig::set('wordfenceCentralUserSiteAccessToken', $body['access-token']); - wfConfig::set('wordfenceCentralCurrentStep', 6); - - return array( - 'success' => 1, - 'access-token' => $body['access-token'], - 'redirect-url' => sprintf(WORDFENCE_CENTRAL_URL_SEC . '/sites/%s?access-token=%s', - rawurlencode(wfConfig::get('wordfenceCentralSiteID')), rawurlencode($body['access-token'])), - ); - - } - catch (wfCentralAPIException $e) { - return array( - 'error' => 1, - 'errorMsg' => $e->getMessage(), - ); - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - return array( - 'error' => 1, - 'errorMsg' => $e->getMessage(), - ); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - return array( - 'error' => 1, - 'errorMsg' => $t->getMessage(), - ); - } - } - public static function ajax_wfcentral_step6_callback() { - $wfCentralUserSiteAccessToken = wfConfig::get('wordfenceCentralUserSiteAccessToken'); - if (!$wfCentralUserSiteAccessToken) { - return array( - 'error' => 1, - 'errorMsg' => __('Access token not found.', 'wordfence'), - ); - } - - $status = wfConfig::get('scanStageStatuses'); - wfCentral::updateScanStatus($status); - - wfConfig::set('wordfenceCentralConnectTime', time()); - wfConfig::set('wordfenceCentralConnectEmail', wp_get_current_user()->user_email); - - return array( - 'success' => 1, - 'access-token' => $wfCentralUserSiteAccessToken, - 'redirect-url' => sprintf(WORDFENCE_CENTRAL_URL_SEC . '/sites/%s?access-token=%s', - rawurlencode(wfConfig::get('wordfenceCentralSiteID')), rawurlencode($wfCentralUserSiteAccessToken)), - ); - } - - public static function ajax_wfcentral_disconnect_callback() { - try { - $request = new wfCentralAuthenticatedAPIRequest( - sprintf('/site/%s', wfConfig::get('wordfenceCentralSiteID')), - 'DELETE'); - $response = $request->execute(); - } - catch (wfCentralAPIException $e) { - - } - catch (Exception $e) { - wfCentralAPIRequest::handleInternalCentralAPIError($e); - } - catch (Throwable $t) { - wfCentralAPIRequest::handleInternalCentralAPIError($t); - } - - wfRESTConfigController::disconnectConfig(); - - return array( - 'success' => 1, - ); - } - - public static function queueCentralConfigurationSync() { - static $hasRun; - if ($hasRun) { - return; - } - $hasRun = true; - add_action('shutdown', 'wfCentral::requestConfigurationSync'); - } - - public static function hasWoocommerce() { - return class_exists('woocommerce'); - } -} - - -class wfWAFAutoPrependHelper { - - private $serverConfig; - /** - * @var string - */ - private $currentAutoPrependedFile; - - public static function helper($serverConfig = null, $currentAutoPrependedFile = null) { - return new wfWAFAutoPrependHelper($serverConfig, $currentAutoPrependedFile); - } - - public static function isValidServerConfig($serverConfig) { - $validValues = array( - "apache-mod_php", - "apache-suphp", - "cgi", - "litespeed", - "nginx", - "iis", - 'manual', - ); - return in_array($serverConfig, $validValues); - } - - /** - * Verifies the .htaccess block for mod_php if present, returning true if no changes need to happen, false - * if something needs to update. - * - * @return bool - */ - public static function verifyHtaccessMod_php() { - if (WFWAF_AUTO_PREPEND && PHP_MAJOR_VERSION > 5) { - return true; - } - - $serverInfo = wfWebServerInfo::createFromEnvironment(); - if (!$serverInfo->isApacheModPHP()) { - return true; - } - - $htaccessPath = wfUtils::getHomePath() . '.htaccess'; - if (file_exists($htaccessPath)) { - $htaccessContent = file_get_contents($htaccessPath); - $regex = '/# Wordfence WAF.*?# END Wordfence WAF/is'; - if (preg_match($regex, $htaccessContent, $matches)) { - $wafBlock = $matches[0]; - $hasPHP5 = preg_match('/<IfModule mod_php5\.c>\s*php_value auto_prepend_file \'.*?\'\s*<\/IfModule>/is', $wafBlock); - $hasPHP7 = preg_match('/<IfModule mod_php7\.c>\s*php_value auto_prepend_file \'.*?\'\s*<\/IfModule>/is', $wafBlock); - $hasPHP8 = preg_match('/<IfModule mod_php\.c>\s*php_value auto_prepend_file \'.*?\'\s*<\/IfModule>/is', $wafBlock); - if ($hasPHP5 && (!$hasPHP7 || !$hasPHP8)) { //Check if PHP 5 is configured, but not 7 or 8. - return false; - } - } - } - - return true; - } - - /** - * Updates the mod_php block of the .htaccess if needed to include PHP 7. Returns whether or not this was performed successfully. - * - * @return bool - */ - public static function fixHtaccessMod_php() { - $htaccessPath = wfUtils::getHomePath() . '.htaccess'; - if (file_exists($htaccessPath)) { - $htaccessContent = file_get_contents($htaccessPath); - $regex = '/# Wordfence WAF.*?# END Wordfence WAF/is'; - if (preg_match($regex, $htaccessContent, $matches, PREG_OFFSET_CAPTURE)) { - $wafBlock = $matches[0][0]; - $hasPHP5 = preg_match('/<IfModule mod_php5\.c>\s*php_value auto_prepend_file \'(.*?)\'\s*<\/IfModule>/is', $wafBlock, $php5Matches, PREG_OFFSET_CAPTURE); - $hasPHP7 = preg_match('/<IfModule mod_php7\.c>\s*php_value auto_prepend_file \'.*?\'\s*<\/IfModule>/is', $wafBlock, $php7Matches, PREG_OFFSET_CAPTURE); - $hasPHP8 = preg_match('/<IfModule mod_php\.c>\s*php_value auto_prepend_file \'.*?\'\s*<\/IfModule>/is', $wafBlock); - if ($hasPHP5 && !$hasPHP7) { - $beforeWAFBlock = substr($htaccessContent, 0, $matches[0][1]); - $afterWAFBlock = substr($htaccessContent, $matches[0][1] + strlen($wafBlock)); - $beforeMod_php = substr($wafBlock, 0, $php5Matches[0][1]); - $afterMod_php = substr($wafBlock, $php5Matches[0][1] + strlen($php5Matches[0][0])); - $updatedHtaccessContent = $beforeWAFBlock . $beforeMod_php . $php5Matches[0][0] . "\n" . sprintf("<IfModule mod_php7.c>\n\tphp_value auto_prepend_file '%1\$s'\n</IfModule>\n<IfModule mod_php.c>\n\tphp_value auto_prepend_file '%1\$s'\n</IfModule>", $php5Matches[1][0] /* already escaped */) . $afterMod_php . $afterWAFBlock; - return file_put_contents($htaccessPath, $updatedHtaccessContent) !== false; - } - if ($hasPHP5 && $hasPHP7 && !$hasPHP8) { - $beforeWAFBlock = substr($htaccessContent, 0, $matches[0][1]); - $afterWAFBlock = substr($htaccessContent, $matches[0][1] + strlen($wafBlock)); - $beforeMod_php = substr($wafBlock, 0, $php5Matches[0][1]); - $afterMod_php = substr($wafBlock, $php7Matches[0][1] + strlen($php7Matches[0][0])); - $updatedHtaccessContent = $beforeWAFBlock . $beforeMod_php . $php5Matches[0][0] . "\n" . $php7Matches[0][0] . "\n" . sprintf("<IfModule mod_php.c>\n\tphp_value auto_prepend_file '%s'\n</IfModule>", $php5Matches[1][0] /* already escaped */) . $afterMod_php . $afterWAFBlock; - return file_put_contents($htaccessPath, $updatedHtaccessContent) !== false; - } - } - } - return false; - } - - /** - * @param string|null $serverConfig - * @param string|null $currentAutoPrependedFile - */ - public function __construct($serverConfig = null, $currentAutoPrependedFile = null) { - $this->serverConfig = $serverConfig; - $this->currentAutoPrependedFile = $currentAutoPrependedFile; - } - - public function getFilesNeededForBackup() { - $backups = array(); - $htaccess = wfWAFAutoPrependHelper::getHtaccessPath(); - switch ($this->getServerConfig()) { - case 'apache-mod_php': - case 'apache-suphp': - case 'litespeed': - case 'cgi': - if (file_exists($htaccess)) { - $backups[] = $htaccess; - } - break; - } - if ($userIni = ini_get('user_ini.filename')) { - $userIniPath = wfWAFAutoPrependHelper::getUserIniPath(); - switch ($this->getServerConfig()) { - case 'cgi': - case 'apache-suphp': - case 'nginx': - case 'litespeed': - case 'iis': - if (file_exists($userIniPath)) { - $backups[] = $userIniPath; - } - break; - } - } - return $backups; - } - - public function downloadBackups($index = 0) { - $backups = $this->getFilesNeededForBackup(); - if ($backups && array_key_exists($index, $backups)) { - $url = site_url(); - $url = preg_replace('/^https?:\/\//i', '', $url); - $url = preg_replace('/[^a-zA-Z0-9\.]+/', '_', $url); - $url = preg_replace('/^_+/', '', $url); - $url = preg_replace('/_+$/', '', $url); - header('Content-Type: application/octet-stream'); - $backupFileName = ltrim(basename($backups[$index]), '.'); - header('Content-Disposition: attachment; filename="' . $backupFileName . '_Backup_for_' . $url . '.txt"'); - readfile($backups[$index]); - die(); - } - } - - /** - * @return mixed - */ - public function getServerConfig() { - return $this->serverConfig; - } - - /** - * @param mixed $serverConfig - */ - public function setServerConfig($serverConfig) { - $this->serverConfig = $serverConfig; - } - - /** - * @param WP_Filesystem_Base $wp_filesystem - * @throws wfWAFAutoPrependHelperException - */ - public function performInstallation($wp_filesystem) { - $bootstrapPath = wordfence::getWAFBootstrapPath(); - if (!$wp_filesystem->put_contents($bootstrapPath, wordfence::getWAFBootstrapContent($this->currentAutoPrependedFile))) { - throw new wfWAFAutoPrependHelperException(__('We were unable to create the <code>wordfence-waf.php</code> file in the root of the WordPress installation. It\'s possible WordPress cannot write to the <code>wordfence-waf.php</code> file because of file permissions. Please verify the permissions are correct and retry the installation.', 'wordfence')); - } - - $serverConfig = $this->getServerConfig(); - - $htaccessPath = wfWAFAutoPrependHelper::getHtaccessPath(); - $homePath = dirname($htaccessPath); - - $userIniPath = wfWAFAutoPrependHelper::getUserIniPath(); - $userIni = ini_get('user_ini.filename'); - - $userIniHtaccessDirectives = ''; - if ($userIni) { - $userIniHtaccessDirectives = sprintf('<Files "%s"> -<IfModule mod_authz_core.c> - Require all denied -</IfModule> -<IfModule !mod_authz_core.c> - Order deny,allow - Deny from all -</IfModule> -</Files> -', addcslashes($userIni, '"')); - } - - - // .htaccess configuration - switch ($serverConfig) { - case 'apache-mod_php': - $autoPrependDirective = sprintf("# Wordfence WAF -<IfModule mod_php5.c> - php_value auto_prepend_file '%1\$s' -</IfModule> -<IfModule mod_php7.c> - php_value auto_prepend_file '%1\$s' -</IfModule> -<IfModule mod_php.c> - php_value auto_prepend_file '%1\$s' -</IfModule> -$userIniHtaccessDirectives -# END Wordfence WAF -", addcslashes($bootstrapPath, "'")); - break; - - case 'litespeed': - $escapedBootstrapPath = addcslashes($bootstrapPath, "'"); - $autoPrependDirective = sprintf("# Wordfence WAF -<IfModule LiteSpeed> -php_value auto_prepend_file '%s' -</IfModule> -<IfModule lsapi_module> -php_value auto_prepend_file '%s' -</IfModule> -$userIniHtaccessDirectives -# END Wordfence WAF -", $escapedBootstrapPath, $escapedBootstrapPath); - break; - - case 'apache-suphp': - $autoPrependDirective = sprintf("# Wordfence WAF -$userIniHtaccessDirectives -# END Wordfence WAF -", addcslashes($homePath, "'")); - break; - - case 'cgi': - if ($userIniHtaccessDirectives) { - $autoPrependDirective = sprintf("# Wordfence WAF -$userIniHtaccessDirectives -# END Wordfence WAF -", addcslashes($homePath, "'")); - } - break; - - } - - if (!empty($autoPrependDirective)) { - // Modify .htaccess - $htaccessContent = $wp_filesystem->get_contents($htaccessPath); - - if ($htaccessContent) { - $regex = '/# Wordfence WAF.*?# END Wordfence WAF/is'; - if (preg_match($regex, $htaccessContent, $matches)) { - $htaccessContent = preg_replace($regex, $autoPrependDirective, $htaccessContent); - } else { - $htaccessContent .= "\n\n" . $autoPrependDirective; - } - } else { - $htaccessContent = $autoPrependDirective; - } - - if (!$wp_filesystem->put_contents($htaccessPath, $htaccessContent)) { - throw new wfWAFAutoPrependHelperException(__('We were unable to make changes to the .htaccess file. It\'s possible WordPress cannot write to the .htaccess file because of file permissions, which may have been set by another security plugin, or you may have set them manually. Please verify the permissions allow the web server to write to the file, and retry the installation.', 'wordfence')); - } - if ($serverConfig == 'litespeed') { - // sleep(2); - $wp_filesystem->touch($htaccessPath); - } - - } - if ($userIni) { - // .user.ini configuration - switch ($serverConfig) { - case 'cgi': - case 'nginx': - case 'apache-suphp': - case 'litespeed': - case 'iis': - $autoPrependIni = sprintf("; Wordfence WAF -auto_prepend_file = '%s' -; END Wordfence WAF -", addcslashes($bootstrapPath, "'")); - - break; - } - - if (!empty($autoPrependIni)) { - - // Modify .user.ini - $userIniContent = $wp_filesystem->get_contents($userIniPath); - if (is_string($userIniContent)) { - $userIniContent = str_replace('auto_prepend_file', ';auto_prepend_file', $userIniContent); - $regex = '/; Wordfence WAF.*?; END Wordfence WAF/is'; - if (preg_match($regex, $userIniContent, $matches)) { - $userIniContent = preg_replace($regex, $autoPrependIni, $userIniContent); - } else { - $userIniContent .= "\n\n" . $autoPrependIni; - } - } else { - $userIniContent = $autoPrependIni; - } - - if (!$wp_filesystem->put_contents($userIniPath, $userIniContent)) { - throw new wfWAFAutoPrependHelperException(sprintf(/* translators: File path. */ __('We were unable to make changes to the %1$s file. It\'s possible WordPress cannot write to the %1$s file because of file permissions. Please verify the permissions are correct and retry the installation.', 'wordfence'), basename($userIniPath))); - } - } - } - } - - /** - * @param WP_Filesystem_Base $wp_filesystem - * @throws wfWAFAutoPrependHelperException - * - * @return bool Whether or not the .user.ini still has a commented-out auto_prepend_file setting - */ - public function performIniRemoval($wp_filesystem) { - $serverConfig = $this->getServerConfig(); - - $htaccessPath = wfWAFAutoPrependHelper::getHtaccessPath(); - - $userIniPath = wfWAFAutoPrependHelper::getUserIniPath(); - $userIni = ini_get('user_ini.filename'); - - // Modify .htaccess - $htaccessContent = $wp_filesystem->get_contents($htaccessPath); - - if (is_string($htaccessContent)) { - $htaccessContent = preg_replace('/# Wordfence WAF.*?# END Wordfence WAF/is', '', $htaccessContent); - } else { - $htaccessContent = ''; - } - - if (!$wp_filesystem->put_contents($htaccessPath, $htaccessContent)) { - throw new wfWAFAutoPrependHelperException(__('We were unable to make changes to the .htaccess file. It\'s possible WordPress cannot write to the .htaccess file because of file permissions, which may have been set by another security plugin, or you may have set them manually. Please verify the permissions allow the web server to write to the file, and retry the installation.', 'wordfence')); - } - if ($serverConfig == 'litespeed') { - // sleep(2); - $wp_filesystem->touch($htaccessPath); - } - - if ($userIni) { - // Modify .user.ini - $userIniContent = $wp_filesystem->get_contents($userIniPath); - if (is_string($userIniContent)) { - $userIniContent = preg_replace('/; Wordfence WAF.*?; END Wordfence WAF/is', '', $userIniContent); - $userIniContent = str_replace('auto_prepend_file', ';auto_prepend_file', $userIniContent); - } else { - $userIniContent = ''; - } - - if (!$wp_filesystem->put_contents($userIniPath, $userIniContent)) { - throw new wfWAFAutoPrependHelperException(sprintf(/* translators: File path. */ __('We were unable to make changes to the %1$s file. It\'s possible WordPress cannot write to the %1$s file because of file permissions. Please verify the permissions are correct and retry the installation.', 'wordfence'), basename($userIniPath))); - } - - return strpos($userIniContent, 'auto_prepend_file') !== false; - } - - return false; - } - - /** - * @param WP_Filesystem_Base $wp_filesystem - * @throws wfWAFAutoPrependHelperException - */ - public function performAutoPrependFileRemoval($wp_filesystem) { - $bootstrapPath = wordfence::getWAFBootstrapPath(); - if (!$wp_filesystem->delete($bootstrapPath)) { - throw new wfWAFAutoPrependHelperException(__('We were unable to remove the <code>wordfence-waf.php</code> file in the root of the WordPress installation. It\'s possible WordPress cannot remove the <code>wordfence-waf.php</code> file because of file permissions. Please verify the permissions are correct and retry the removal.', 'wordfence')); - } - } - - public static function getHtaccessPath() { - return wfUtils::getHomePath() . '.htaccess'; - } - - public static function getUserIniPath() { - $userIni = ini_get('user_ini.filename'); - if ($userIni) { - return wfUtils::getHomePath() . $userIni; - } - return false; - } - - /** - * Extracts the WAF section from the .htaccess content and returns it (inclusive of the section markers). If not - * present, returns false. - * - * @param string $htaccessContent - * @return false|string - */ - public static function getHtaccessSectionContent($htaccessContent) { - $regex = '/# Wordfence WAF.*?# END Wordfence WAF/is'; - if (preg_match($regex, $htaccessContent, $matches)) { - return $matches[0]; - } - return false; - } - - /** - * Extracts the WAF section from the .user.ini content and returns it (inclusive of the section markers). If not - * present, returns false. - * - * @param string $userIniContent - * @return false|string - */ - public static function getUserIniSectionContent($userIniContent) { - $regex = '/; Wordfence WAF.*?; END Wordfence WAF/is'; - if (preg_match($regex, $userIniContent, $matches)) { - return $matches[0]; - } - return false; - } - - public function usesUserIni() { - $userIni = ini_get('user_ini.filename'); - if (!$userIni) { - return false; - } - switch ($this->getServerConfig()) { - case 'cgi': - case 'apache-suphp': - case 'nginx': - case 'litespeed': - case 'iis': - return true; - } - return false; - } - - public function uninstall() { - /** @var WP_Filesystem_Base $wp_filesystem */ - global $wp_filesystem; - - $htaccessPath = wfWAFAutoPrependHelper::getHtaccessPath(); - $userIniPath = wfWAFAutoPrependHelper::getUserIniPath(); - - $adminURL = admin_url('/'); - $allow_relaxed_file_ownership = true; - $homePath = dirname($htaccessPath); - - ob_start(); - if (false === ($credentials = request_filesystem_credentials($adminURL, '', false, $homePath, - array('version', 'locale'), $allow_relaxed_file_ownership)) - ) { - ob_end_clean(); - return false; - } - - if (!WP_Filesystem($credentials, $homePath, $allow_relaxed_file_ownership)) { - // Failed to connect, Error and request again - request_filesystem_credentials($adminURL, '', true, ABSPATH, array('version', 'locale'), - $allow_relaxed_file_ownership); - ob_end_clean(); - return false; - } - - if ($wp_filesystem->errors->get_error_code()) { - ob_end_clean(); - return false; - } - ob_end_clean(); - - if ($wp_filesystem->is_file($htaccessPath)) { - $htaccessContent = $wp_filesystem->get_contents($htaccessPath); - $regex = '/# Wordfence WAF.*?# END Wordfence WAF/is'; - if (preg_match($regex, $htaccessContent, $matches)) { - $htaccessContent = preg_replace($regex, '', $htaccessContent); - if (!$wp_filesystem->put_contents($htaccessPath, $htaccessContent)) { - return false; - } - } - } - - if ($wp_filesystem->is_file($userIniPath)) { - $userIniContent = $wp_filesystem->get_contents($userIniPath); - $regex = '/; Wordfence WAF.*?; END Wordfence WAF/is'; - if (preg_match($regex, $userIniContent, $matches)) { - $userIniContent = preg_replace($regex, '', $userIniContent); - if (!$wp_filesystem->put_contents($userIniPath, $userIniContent)) { - return false; - } - } - } - - $bootstrapPath = wordfence::getWAFBootstrapPath(); - if ($wp_filesystem->is_file($bootstrapPath)) { - $wp_filesystem->delete($bootstrapPath); - } - return true; - } -} - -class wfWAFAutoPrependHelperException extends Exception { -} diff --git a/wp/wp-content/plugins/wordfence/lib/wordfenceConstants.php b/wp/wp-content/plugins/wordfence/lib/wordfenceConstants.php deleted file mode 100644 index dcefec83..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wordfenceConstants.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -define('WORDFENCE_EPOCH', 1312156800); -define('WORDFENCE_FEEDBACK_EPOCH', 1704213261); -define('WORDFENCE_API_VERSION', '2.26'); -define('WORDFENCE_API_URL_SEC', 'https://noc1.wordfence.com/'); -define('WORDFENCE_API_URL_NONSEC', 'http://noc1.wordfence.com/'); -define('WORDFENCE_API_URL_BASE_SEC', WORDFENCE_API_URL_SEC . 'v' . WORDFENCE_API_VERSION . '/'); -define('WORDFENCE_BREACH_URL_BASE_SEC', WORDFENCE_API_URL_SEC . 'passwords/'); -define('WORDFENCE_HACKATTEMPT_URL_SEC', 'https://noc3.wordfence.com/'); -if (!defined('WORDFENCE_CENTRAL_URL_SEC')) { define('WORDFENCE_CENTRAL_URL_SEC', 'https://www.wordfence.com/central'); } -if (!defined('WORDFENCE_CENTRAL_API_URL_SEC')) { define('WORDFENCE_CENTRAL_API_URL_SEC', 'https://www.wordfence.com/api/wf'); } -if (!defined('WORDFENCE_CENTRAL_PUBLIC_KEY')) { define('WORDFENCE_CENTRAL_PUBLIC_KEY', "\xb6\x33\x81\x05\xdf\xdf\xec\xcf\xf3\xe3\x36\xc6\xf0\x99\xc6\xf7\xca\x05\x36\xca\x87\x54\x53\x43\x31\xf2\xc6\x0d\xe1\x3d\x55\x0f"); } -define('WORDFENCE_MAX_SCAN_LOCK_TIME', 86400); //Increased this from 10 mins to 1 day because very big scans run for a long time. Users can use kill. -define('WORDFENCE_DEFAULT_MAX_SCAN_TIME', 10800); -if (!defined('WORDFENCE_SCAN_ISSUES_MAX_REPORT')) { define('WORDFENCE_SCAN_ISSUES_MAX_REPORT', 1500); } -define('WORDFENCE_TRANSIENTS_TIMEOUT', 3600); //how long are items cached in seconds e.g. files downloaded for diffing -define('WORDFENCE_MAX_IPLOC_AGE', 86400); //1 day -define('WORDFENCE_CRAWLER_VERIFY_CACHE_TIME', 604800); -define('WORDFENCE_REVERSE_LOOKUP_CACHE_TIME', 86400); -define('WORDFENCE_MAX_FILE_SIZE_TO_PROCESS', 52428800); //50 megs -define('WORDFENCE_TWO_FACTOR_GRACE_TIME_AUTHENTICATOR', 90); -define('WORDFENCE_TWO_FACTOR_GRACE_TIME_PHONE', 1800); -if (!defined('WORDFENCE_DISABLE_LIVE_TRAFFIC')) { define('WORDFENCE_DISABLE_LIVE_TRAFFIC', false); } -if (!defined('WORDFENCE_SCAN_ISSUES_PER_PAGE')) { define('WORDFENCE_SCAN_ISSUES_PER_PAGE', 100); } -if (!defined('WORDFENCE_BLOCKED_IPS_PER_PAGE')) { define('WORDFENCE_BLOCKED_IPS_PER_PAGE', 100); } -if (!defined('WORDFENCE_DISABLE_FILE_VIEWER')) { define('WORDFENCE_DISABLE_FILE_VIEWER', false); } -if (!defined('WORDFENCE_SCAN_FAILURE_THRESHOLD')) { define('WORDFENCE_SCAN_FAILURE_THRESHOLD', 300); } -if (!defined('WORDFENCE_SCAN_START_FAILURE_THRESHOLD')) { define('WORDFENCE_SCAN_START_FAILURE_THRESHOLD', 15); } -if (!defined('WORDFENCE_PREFER_WP_HOME_FOR_WPML')) { define('WORDFENCE_PREFER_WP_HOME_FOR_WPML', false); } //When determining the unfiltered `home` and `siteurl` with WPML installed, use WP_HOME and WP_SITEURL if set instead of the database values -if (!defined('WORDFENCE_SCAN_MIN_EXECUTION_TIME')) { define('WORDFENCE_SCAN_MIN_EXECUTION_TIME', 8); } -if (!defined('WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME')) { define('WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME', 90); } -if (!defined('WORDFENCE_ALLOW_DIRECT_MYSQLI')) { define('WORDFENCE_ALLOW_DIRECT_MYSQLI', true); } -if (!defined('WORDFENCE_NOC3_FAILED_BACKOFF_TIME')) { define('WORDFENCE_NOC3_FAILED_BACKOFF_TIME', 60); } -if (!defined('WORDFENCE_WWW_BASE_URL')) - define('WORDFENCE_WWW_BASE_URL', 'https://www.wordfence.com/'); \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wordfenceHash.php b/wp/wp-content/plugins/wordfence/lib/wordfenceHash.php deleted file mode 100644 index 33ffea4f..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wordfenceHash.php +++ /dev/null @@ -1,927 +0,0 @@ -<?php -require_once(dirname(__FILE__) . '/wordfenceClass.php'); -class wordfenceHash { - private $engine = false; - private $db = false; - private $startTime = false; - - //Begin serialized vars - public $totalFiles = 0; - public $totalDirs = 0; - public $totalData = 0; //To do a sanity check, don't use 'du' because it gets sparse files wrong and reports blocks used on disk. Use : find . -type f -ls | awk '{total += $7} END {print total}' - public $stoppedOnFile = false; - private $coreEnabled = false; - private $pluginsEnabled = false; - private $themesEnabled = false; - private $malwareEnabled = false; - private $coreUnknownEnabled = false; - private $knownFiles = false; - private $malwareData = ""; - private $coreHashesData = ''; - private $haveIssues = array(); - private $status = array(); - private $possibleMalware = array(); - private $scannedFiles; - private $totalForks = 0; - private $alertedOnUnknownWordPressVersion = false; - private $foldersEntered = array(); - private $foldersProcessed = array(); - private $suspectedFiles = array(); - private $indexed = false; - private $indexSize = 0; - private $currentIndex = 0; - private $coalescingIssues = array(); - private $pathMap = array(); - - /** - * @param string $path - * @param array $only - * @param array $themes - * @param array $plugins - * @param wfScanEngine $engine - * @throws Exception - */ - public function __construct($scannedFiles, $engine, $malwarePrefixesHash, $coreHashesHash, $scanMode) { - $this->scannedFiles = $scannedFiles; - $this->engine = $engine; - - $this->startTime = microtime(true); - - $options = $this->engine->scanController()->scanOptions(); - if ($options['scansEnabled_core']) { $this->coreEnabled = true; } - if ($options['scansEnabled_plugins']) { $this->pluginsEnabled = true; } - if ($options['scansEnabled_themes']) { $this->themesEnabled = true; } - if ($options['scansEnabled_malware']) { $this->malwareEnabled = true; } - if ($options['scansEnabled_coreUnknown']) { $this->coreUnknownEnabled = true; } - - $this->db = new wfDB(); - - //Doing a delete for now. Later we can optimize this to only scan modified files. - //$this->db->queryWrite("update " . wfDB::networkTable('wfFileMods') . " set oldMD5 = newMD5"); - $this->db->truncate(wfDB::networkTable('wfFileMods')); - $this->db->truncate(wfDB::networkTable('wfKnownFileList')); - $this->db->truncate(wfDB::networkTable('wfPendingIssues')); - $fetchCoreHashesStatus = wfIssues::statusStart(__("Fetching core, theme and plugin file signatures from Wordfence", 'wordfence')); - try { - $this->knownFiles = $this->engine->getKnownFilesLoader()->getKnownFiles(); - } catch (wfScanKnownFilesException $e) { - wfIssues::statusEndErr(); - throw $e; - } - wfIssues::statusEnd($fetchCoreHashesStatus, wfIssues::STATUS_SUCCESS); - if ($this->malwareEnabled) { - $malwarePrefixStatus = wfIssues::statusStart(__("Fetching list of known malware files from Wordfence", 'wordfence')); - - $stored = wfConfig::get_ser('malwarePrefixes', array(), false); - if (is_array($stored) && isset($stored['hash']) && $stored['hash'] == $malwarePrefixesHash && isset($stored['prefixes']) && wfWAFUtils::strlen($stored['prefixes']) % 4 == 0) { - wordfence::status(4, 'info', __("Using cached malware prefixes", 'wordfence')); - } - else { - wordfence::status(4, 'info', __("Fetching fresh malware prefixes", 'wordfence')); - - $malwareData = $engine->api->getStaticURL('/malwarePrefixes.bin'); - if (!$malwareData) { - wfIssues::statusEndErr(); - throw new Exception(__("Could not fetch malware signatures from Wordfence servers.", 'wordfence')); - } - - if (wfWAFUtils::strlen($malwareData) % 4 != 0) { - wfIssues::statusEndErr(); - throw new Exception(__("Malware data received from Wordfence servers was not valid.", 'wordfence')); - } - - $stored = array('hash' => $malwarePrefixesHash, 'prefixes' => $malwareData); - wfConfig::set_ser('malwarePrefixes', $stored, true, wfConfig::DONT_AUTOLOAD); - } - - $this->malwareData = $stored['prefixes']; - wfIssues::statusEnd($malwarePrefixStatus, wfIssues::STATUS_SUCCESS); - } - - if ($this->coreUnknownEnabled) { - $coreHashesStatus = wfIssues::statusStart(__("Fetching list of known core files from Wordfence", 'wordfence')); - - $stored = wfConfig::get_ser('coreHashes', array(), false); - if (is_array($stored) && isset($stored['hash']) && $stored['hash'] == $coreHashesHash && isset($stored['hashes']) && wfWAFUtils::strlen($stored['hashes']) > 0 && wfWAFUtils::strlen($stored['hashes']) % 32 == 0) { - wordfence::status(4, 'info', __("Using cached core hashes", 'wordfence')); - } - else { - wordfence::status(4, 'info', __("Fetching fresh core hashes", 'wordfence')); - - $coreHashesData = $engine->api->getStaticURL('/coreHashes.bin'); - if (!$coreHashesData) { - wfIssues::statusEndErr(); - throw new Exception(__("Could not fetch core hashes from Wordfence servers.", 'wordfence')); - } - - if (wfWAFUtils::strlen($coreHashesData) % 32 != 0) { - wfIssues::statusEndErr(); - throw new Exception(__("Core hashes data received from Wordfence servers was not valid.", 'wordfence')); - } - - $stored = array('hash' => $coreHashesHash, 'hashes' => $coreHashesData); - wfConfig::set_ser('coreHashes', $stored, true, wfConfig::DONT_AUTOLOAD); - } - - $this->coreHashesData = $stored['hashes']; - wfIssues::statusEnd($coreHashesStatus, wfIssues::STATUS_SUCCESS); - } - - $this->haveIssues = array( - 'core' => wfIssues::STATUS_SECURE, - 'coreUnknown' => wfIssues::STATUS_SECURE, - 'themes' => wfIssues::STATUS_SECURE, - 'plugins' => wfIssues::STATUS_SECURE, - 'malware' => wfIssues::STATUS_SECURE, - ); - if($this->coreEnabled){ $this->status['core'] = wfIssues::statusStart(__("Comparing core WordPress files against originals in repository", 'wordfence')); $this->engine->scanController()->startStage(wfScanner::STAGE_FILE_CHANGES); } else { wfIssues::statusDisabled(__("Skipping core scan", 'wordfence')); } - if($this->themesEnabled){ $this->status['themes'] = wfIssues::statusStart(__("Comparing open source themes against WordPress.org originals", 'wordfence')); $this->engine->scanController()->startStage(wfScanner::STAGE_FILE_CHANGES); } else { wfIssues::statusDisabled(__("Skipping theme scan", 'wordfence')); } - if($this->pluginsEnabled){ $this->status['plugins'] = wfIssues::statusStart(__("Comparing plugins against WordPress.org originals", 'wordfence')); $this->engine->scanController()->startStage(wfScanner::STAGE_FILE_CHANGES); } else { wfIssues::statusDisabled(__("Skipping plugin scan", 'wordfence')); } - if($this->malwareEnabled){ $this->status['malware'] = wfIssues::statusStart(__("Scanning for known malware files", 'wordfence')); $this->engine->scanController()->startStage(wfScanner::STAGE_MALWARE_SCAN); } else { wfIssues::statusDisabled(__("Skipping malware scan", 'wordfence')); } - if($this->coreUnknownEnabled){ $this->status['coreUnknown'] = wfIssues::statusStart(__("Scanning for unknown files in wp-admin and wp-includes", 'wordfence')); $this->engine->scanController()->startStage(wfScanner::STAGE_FILE_CHANGES); } else { wfIssues::statusDisabled(__("Skipping unknown core file scan", 'wordfence')); } - - if ($options['scansEnabled_fileContents']) { $this->engine->scanController()->startStage(wfScanner::STAGE_MALWARE_SCAN); } - if ($options['scansEnabled_fileContentsGSB']) { $this->engine->scanController()->startStage(wfScanner::STAGE_CONTENT_SAFETY); } - - if ($this->coreUnknownEnabled && !$this->alertedOnUnknownWordPressVersion && empty($this->knownFiles['core'])) { - require(ABSPATH . 'wp-includes/version.php'); /* @var string $wp_version */ - $this->alertedOnUnknownWordPressVersion = true; - $added = $this->engine->addIssue( - 'coreUnknown', - wfIssues::SEVERITY_MEDIUM, - 'coreUnknown' . $wp_version, - 'coreUnknown' . $wp_version, - sprintf(/* translators: WordPress version. */ __('Unknown WordPress core version: %s', 'wordfence'), $wp_version), - __("The core files scan will not be run because this version of WordPress is not currently indexed by Wordfence. This may be due to using a prerelease version or because the servers are still indexing a new release. If you are using an official WordPress release, this issue will automatically dismiss once the version is indexed and another scan is run.", 'wordfence'), - array() - ); - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $this->haveIssues['coreUnknown'] = wfIssues::STATUS_PROBLEM; } - else if ($this->haveIssues['coreUnknown'] != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $this->haveIssues['coreUnknown'] = wfIssues::STATUS_IGNORED; } - } - } - public function __sleep(){ - return array('totalFiles', 'totalDirs', 'totalData', 'stoppedOnFile', 'coreEnabled', 'pluginsEnabled', 'themesEnabled', 'malwareEnabled', 'coreUnknownEnabled', 'knownFiles', 'haveIssues', 'status', 'possibleMalware', 'scannedFiles', 'totalForks', 'alertedOnUnknownWordPressVersion', 'foldersProcessed', 'suspectedFiles', 'indexed', 'indexSize', 'currentIndex', 'coalescingIssues', 'pathMap'); - } - public function __wakeup(){ - $this->db = new wfDB(); - $this->startTime = microtime(true); - $this->totalForks++; - - $stored = wfConfig::get_ser('malwarePrefixes', array(), false); - if (!isset($stored['prefixes'])) { - $stored['prefixes'] = ''; - } - $this->malwareData = $stored['prefixes']; - - $stored = wfConfig::get_ser('coreHashes', array(), false); - if (!isset($stored['hashes'])) { - $stored['hashes'] = ''; - } - $this->coreHashesData = $stored['hashes']; - } - public function getSuspectedFiles() { - return array_keys($this->suspectedFiles); - } - public function run($engine) { - if($this->totalForks > 1000){ - throw new Exception(sprintf(/* translators: File path. */ __("Wordfence file scanner detected a possible infinite loop. Exiting on file: %s", 'wordfence'), $this->stoppedOnFile)); - } - $this->engine = $engine; - if (!$this->indexed) { - $start = microtime(true); - $indexedFiles = array(); - foreach ($this->scannedFiles as $file) { - $this->_dirIndex($file, $indexedFiles); - } - $this->_serviceIndexQueue($indexedFiles, true); - $this->indexed = true; - unset($this->foldersEntered); $this->foldersEntered = array(); - unset($this->foldersProcessed); $this->foldersProcessed = array(); - $end = microtime(true); - wordfence::status(4, 'info', sprintf(/* translators: Time in seconds. */ __("Index time: %s", 'wordfence'), ($end - $start))); - } - - $this->_checkForTimeout(); - - wordfence::status(4, 'info', __("Beginning file hashing", 'wordfence')); - while ($file = $this->_nextFile()) { - $this->processFile($file); - $this->_checkForTimeout($file); - } - - wordfence::status(4, 'info', __("Processing pending issues", 'wordfence')); - $this->_processPendingIssues(); - - wordfence::status(2, 'info', sprintf(/* translators: 1. Number of files. 2. Data in bytes. */ __('Analyzed %1$d files containing %2$s of data.', 'wordfence'), $this->totalFiles, wfUtils::formatBytes($this->totalData))); - if($this->coreEnabled){ wfIssues::statusEnd($this->status['core'], $this->haveIssues['core']); $this->engine->scanController()->completeStage(wfScanner::STAGE_FILE_CHANGES, $this->haveIssues['core']); } - if($this->themesEnabled){ wfIssues::statusEnd($this->status['themes'], $this->haveIssues['themes']); $this->engine->scanController()->completeStage(wfScanner::STAGE_FILE_CHANGES, $this->haveIssues['themes']); } - if($this->pluginsEnabled){ wfIssues::statusEnd($this->status['plugins'], $this->haveIssues['plugins']); $this->engine->scanController()->completeStage(wfScanner::STAGE_FILE_CHANGES, $this->haveIssues['plugins']); } - if($this->coreUnknownEnabled){ wfIssues::statusEnd($this->status['coreUnknown'], $this->haveIssues['coreUnknown']); $this->engine->scanController()->completeStage(wfScanner::STAGE_FILE_CHANGES, $this->haveIssues['coreUnknown']); } - if(sizeof($this->possibleMalware) > 0){ - $malwareResp = $engine->api->binCall('check_possible_malware', json_encode($this->possibleMalware)); - if($malwareResp['code'] != 200){ - wfIssues::statusEndErr(); - throw new Exception(__("Invalid response from Wordfence API during check_possible_malware", 'wordfence')); - } - $malwareList = json_decode($malwareResp['data'], true); - if(is_array($malwareList) && sizeof($malwareList) > 0){ - for($i = 0; $i < sizeof($malwareList); $i++){ - $file = $malwareList[$i][0]; - $md5 = $malwareList[$i][1]; - $name = $malwareList[$i][2]; - $added = $this->engine->addIssue( - 'file', - wfIssues::SEVERITY_CRITICAL, - $file, - $md5, - sprintf(/* translators: File path. */ __('This file is suspected malware: %s', 'wordfence'), $file), - sprintf(/* translators: Malware name/title. */ __("This file's signature matches a known malware file. The title of the malware is '%s'. Immediately inspect this file using the 'View' option below and consider deleting it from your server.", 'wordfence'), $name), - array( - 'file' => $file, - 'realFile' => array_key_exists($file, $this->pathMap) ? $this->pathMap[$file] : null, - 'cType' => 'unknown', - 'canDiff' => false, - 'canFix' => false, - 'canDelete' => true - ) - ); - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $this->haveIssues['malware'] = wfIssues::STATUS_PROBLEM; } - else if ($this->haveIssues['malware'] != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $this->haveIssues['malware'] = wfIssues::STATUS_IGNORED; } - } - } - } - if($this->malwareEnabled){ wfIssues::statusEnd($this->status['malware'], $this->haveIssues['malware']); $this->engine->scanController()->completeStage(wfScanner::STAGE_MALWARE_SCAN, $this->haveIssues['malware']); } - unset($this->knownFiles); $this->knownFiles = false; - } - private function _dirIndex($file, &$indexedFiles) { - $realPath = $file->getRealPath(); - //Applies to files and dirs - if (!is_readable($realPath)) - return; - if (!$this->_shouldProcessFile($file)) - return; - if (is_dir($realPath)) { - if (isset($this->foldersEntered[$realPath])) - return; - - $this->foldersEntered[$file->getRealPath()] = 1; - - $this->totalDirs++; - try { - foreach (wfFileUtils::getContents($realPath) as $child) { - if (wfFileUtils::isCurrentOrParentDirectory($child)) { - continue; - } - try { - $child = $file->createChild($child); - } - catch (wfInvalidPathException $e) { - wordfence::status(4, 'info', sprintf(__("Ignoring invalid scan file child: %s", 'wordfence'), $e->getPath())); - continue; - } - if (is_file($child->getRealPath())) { - $relativeFile = $child->getWordpressPath(); - if ($this->stoppedOnFile && $child->getRealPath() != $this->stoppedOnFile) { - continue; - } - - if (preg_match('/\.suspected$/i', $relativeFile)) { //Already iterating over all files in the search areas so generate this list here - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Found .suspected file: %s", 'wordfence'), $relativeFile)); - $this->suspectedFiles[$relativeFile] = 1; - } - - $this->_checkForTimeout($child, $indexedFiles); - if ($this->_shouldHashFile($child)) { - $indexedFiles[] = $child; - } - else { - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Skipping unneeded hash: %s", 'wordfence'), (string) $child)); - } - $this->_serviceIndexQueue($indexedFiles); - } - elseif (is_dir($child->getRealPath())) { - $this->_dirIndex($child, $indexedFiles); - } - } - } - catch (wfInaccessibleDirectoryException $e) { - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Skipping inaccessible directory: %s", 'wordfence'), (string) $file)); - } - - $this->foldersProcessed[$realPath] = 1; - unset($this->foldersEntered[$realPath]); - } - else { - if (is_file($realPath)) { - $relativeFile = $file->getWordpressPath(); - if ($this->stoppedOnFile && $realPath != $this->stoppedOnFile) { - return; - } - - if (preg_match('/\.suspected$/i', $relativeFile)) { //Already iterating over all files in the search areas so generate this list here - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Found .suspected file: %s", 'wordfence'), $relativeFile)); - $this->suspectedFiles[$relativeFile] = 1; - } - - $this->_checkForTimeout($file, $indexedFiles); - if ($this->_shouldHashFile($file)) { - $indexedFiles[] = $file; - } - else { - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Skipping unneeded hash: %s", 'wordfence'), (string) $file)); - } - $this->_serviceIndexQueue($indexedFiles); - } - } - } - private function _serviceIndexQueue(&$indexedFiles, $final = false) { - $files = array(); - if (count($indexedFiles) > 500) { - $files = array_splice($indexedFiles, 0, 500); - } - else if ($final) { - $files = $indexedFiles; - $indexedFiles = array(); - } - - $fileCount = count($files); - if ($fileCount > 0) { - $payload = array(); - foreach ($files as $file) { - $payload[] = (string) $file; - $payload[] = $file->getWordpressPath(); - } - global $wpdb; - $table_wfKnownFileList = wfDB::networkTable('wfKnownFileList'); - $query = substr("INSERT INTO {$table_wfKnownFileList} (path, wordpress_path) VALUES " . str_repeat("('%s', '%s'), ", count($files)), 0, -2); - $wpdb->query($wpdb->prepare($query, $payload)); - $this->indexSize += $fileCount; - wordfence::status(2, 'info', sprintf(/* translators: Number of files. */ __("%d files indexed", 'wordfence'), $this->indexSize)); - } - } - private function _nextFile($advanceCursor = true) { - static $files = array(); - if (count($files) == 0) { - global $wpdb; - $table_wfKnownFileList = wfDB::networkTable('wfKnownFileList'); - $rows = $wpdb->get_results($wpdb->prepare("SELECT path, wordpress_path FROM {$table_wfKnownFileList} WHERE id > %d ORDER BY id ASC LIMIT 500", $this->currentIndex)); - $files = array_map( - function ($row) { - return new wfScanFile($row->path, $row->wordpress_path); - }, - $rows - ); - } - - $file = null; - if ($advanceCursor) { - $file = array_shift($files); - $this->currentIndex++; - } - else if (count($files) > 0) { - $file = $files[0]; - } - - if ($file === null) { - return null; - } - return $file; - } - private function _checkForTimeout($file = null, $indexQueue = false) { - $realPath = $file ? $file->getRealPath() : null; - if (($this->stoppedOnFile !== $realPath) && $this->engine->shouldFork()) { //max X seconds but don't allow fork if we're looking for the file we stopped on. Search mode is VERY fast. - if ($indexQueue !== false) { - $this->_serviceIndexQueue($indexQueue, true); - $this->stoppedOnFile = $realPath; - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Forking during indexing: %s", 'wordfence'), (string) $file)); - } - else { - wordfence::status(4, 'info', sprintf(/* translators: PHP max execution time. */ __("Calling fork() from wordfenceHash with maxExecTime: %s", 'wordfence'), $this->engine->maxExecTime)); - } - $this->engine->fork(); - //exits - } - - if ($this->stoppedOnFile && $realPath != $this->stoppedOnFile && $indexQueue !== false) { - return; - } - else if ($this->stoppedOnFile && $realPath == $this->stoppedOnFile) { - $this->stoppedOnFile = false; //Continue indexing - } - } - private function _shouldProcessFile($file) { - $excludePatterns = wordfenceScanner::getExcludeFilePattern(wordfenceScanner::EXCLUSION_PATTERNS_USER); - if ($excludePatterns) { - foreach ($excludePatterns as $pattern) { - if (preg_match($pattern, $file->getWordpressPath())) { - return false; - } - } - } - - $realPath = $file->getRealPath(); - if ($realPath === '/') { - return false; - } - if (isset($this->foldersProcessed[$realPath])) { - return false; - } - - return true; - } - private function processFile($file) { - $realPath = $file->getRealPath(); - $wordpressPath = $file->getWordpressPath(); - if (wfUtils::fileTooBig($realPath)) { - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Skipping file larger than max size: %s", 'wordfence'), $realPath)); - return; - } - - if (function_exists('memory_get_usage')) { - wordfence::status(4, 'info', sprintf(/* translators: 1. File path. 2. Memory in bytes. */ __('Scanning: %1$s (Mem:%2$s)', 'wordfence'), $realPath, sprintf('%.1fM', memory_get_usage(true) / (1024 * 1024)))); - } - else { - wordfence::status(4, 'info', sprintf(/* translators: File path. */ __("Scanning: %s", 'wordfence'), $realPath)); - } - - wfUtils::beginProcessingFile($wordpressPath); - $wfHash = self::hashFile($realPath); - $this->engine->scanController()->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_FILES); - if ($wfHash) { - $md5 = strtoupper($wfHash[0]); - $shac = strtoupper($wfHash[1]); - $knownFile = 0; - if($this->malwareEnabled && $this->isMalwarePrefix($md5)){ - $this->possibleMalware[] = array($wordpressPath, $md5); - $this->pathMap[$wordpressPath] = $realPath; - } - - $knownFileExclude = wordfenceScanner::getExcludeFilePattern(wordfenceScanner::EXCLUSION_PATTERNS_KNOWN_FILES); - $allowKnownFileScan = true; - if ($knownFileExclude) { - foreach ($knownFileExclude as $pattern) { - if (preg_match($pattern, $realPath)) { - $allowKnownFileScan = false; - } - } - } - - if ($allowKnownFileScan) { - if (isset($this->knownFiles['core'][$wordpressPath])) { - if (strtoupper($this->knownFiles['core'][$wordpressPath]) == $shac) { - $knownFile = 1; - } - else { - if ($this->coreEnabled) { - $localFile = ABSPATH . '/' . preg_replace('/^[\.\/]+/', '', $wordpressPath); - $fileContents = @file_get_contents($localFile); - if ($fileContents && (!preg_match('/<\?' . 'php[\r\n\s\t]*\/\/[\r\n\s\t]*Silence is golden\.[\r\n\s\t]*(?:\?>)?[\r\n\s\t]*$/s', $fileContents))) { - $this->engine->addPendingIssue( - 'knownfile', - wfIssues::SEVERITY_HIGH, - 'coreModified' . $wordpressPath, - 'coreModified' . $wordpressPath . $md5, - sprintf(/* translators: File path. */ __('WordPress core file modified: %s', 'wordfence'), $wordpressPath), - __("This WordPress core file has been modified and differs from the original file distributed with this version of WordPress.", 'wordfence'), - array( - 'file' => $wordpressPath, - 'realFile' => $realPath, - 'cType' => 'core', - 'canDiff' => true, - 'canFix' => true, - 'canDelete' => false, - 'haveIssues' => 'core' - ) - ); - } - } - } - } - else if (isset($this->knownFiles['plugins'][$wordpressPath])) { - if (in_array($shac, $this->knownFiles['plugins'][$wordpressPath])) { - $knownFile = 1; - } - else { - if ($this->pluginsEnabled) { - $options = $this->engine->scanController()->scanOptions(); - $shouldGenerateIssue = true; - if (!$options['scansEnabled_highSense'] && preg_match('~/readme\.(?:txt|md)$~i', $wordpressPath)) { //Don't generate issues for changed readme files unless high sensitivity is on - $shouldGenerateIssue = false; - } - - if ($shouldGenerateIssue) { - $itemName = $this->knownFiles['plugins'][$wordpressPath][0]; - $itemVersion = $this->knownFiles['plugins'][$wordpressPath][1]; - $cKey = $this->knownFiles['plugins'][$wordpressPath][2]; - $this->engine->addPendingIssue( - 'knownfile', - wfIssues::SEVERITY_MEDIUM, - 'modifiedplugin' . $wordpressPath, - 'modifiedplugin' . $wordpressPath . $md5, - sprintf(/* translators: File path. */ __('Modified plugin file: %s', 'wordfence'), $wordpressPath), - sprintf( - /* translators: 1. Plugin name. 2. Plugin version. 3. Support URL. */ - __('This file belongs to plugin "%1$s" version "%2$s" and has been modified from the file that is distributed by WordPress.org for this version. Please use the link to see how the file has changed. If you have modified this file yourself, you can safely ignore this warning. If you see a lot of changed files in a plugin that have been made by the author, then try uninstalling and reinstalling the plugin to force an upgrade. Doing this is a workaround for plugin authors who don\'t manage their code correctly. <a href="%3$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - $itemName, - $itemVersion, - wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_MODIFIED_PLUGIN) - ), - array( - 'file' => $wordpressPath, - 'realFile' => $realPath, - 'cType' => 'plugin', - 'canDiff' => true, - 'canFix' => true, - 'canDelete' => false, - 'cName' => $itemName, - 'cVersion' => $itemVersion, - 'cKey' => $cKey, - 'haveIssues' => 'plugins' - ) - ); - } - } - - } - } - else if (isset($this->knownFiles['themes'][$wordpressPath])) { - if (in_array($shac, $this->knownFiles['themes'][$wordpressPath])) { - $knownFile = 1; - } - else { - if ($this->themesEnabled) { - $options = $this->engine->scanController()->scanOptions(); - $shouldGenerateIssue = true; - if (!$options['scansEnabled_highSense'] && preg_match('~/readme\.(?:txt|md)$~i', $wordpressPath)) { //Don't generate issues for changed readme files unless high sensitivity is on - $shouldGenerateIssue = false; - } - - if ($shouldGenerateIssue) { - $itemName = $this->knownFiles['themes'][$wordpressPath][0]; - $itemVersion = $this->knownFiles['themes'][$wordpressPath][1]; - $cKey = $this->knownFiles['themes'][$wordpressPath][2]; - $this->engine->addPendingIssue( - 'knownfile', - wfIssues::SEVERITY_MEDIUM, - 'modifiedtheme' . $wordpressPath, - 'modifiedtheme' . $wordpressPath . $md5, - sprintf(/* translators: File path. */ __('Modified theme file: %s', 'wordfence'), $wordpressPath), - sprintf( - /* translators: 1. Plugin name. 2. Plugin version. 3. Support URL. */ - __('This file belongs to theme "%1$s" version "%2$s" and has been modified from the original distribution. It is common for site owners to modify their theme files, so if you have modified this file yourself you can safely ignore this warning. <a href="%3$s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), - $itemName, - $itemVersion, - wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_MODIFIED_THEME) - ), - array( - 'file' => $wordpressPath, - 'realFile' => $realPath, - 'cType' => 'theme', - 'canDiff' => true, - 'canFix' => true, - 'canDelete' => false, - 'cName' => $itemName, - 'cVersion' => $itemVersion, - 'cKey' => $cKey, - 'haveIssues' => 'themes' - ) - ); - } - } - - } - } - else if ($this->coreUnknownEnabled && !$this->alertedOnUnknownWordPressVersion) { //Check for unknown files in system directories - $restrictedWordPressFolders = array(ABSPATH . 'wp-admin/', ABSPATH . WPINC . '/'); - $added = false; - foreach ($restrictedWordPressFolders as $path) { - if (strpos($realPath, $path) === 0) { - if ($this->isPreviousCoreFile($shac)) { - $added = $this->engine->addIssue( - 'knownfile', - wfIssues::SEVERITY_LOW, - 'coreUnknown' . $wordpressPath, - 'coreUnknown' . $wordpressPath . $md5, - sprintf(/* translators: File path. */ __('Old WordPress core file not removed during update: %s', 'wordfence'), $wordpressPath), - __('This file is in a WordPress core location but is from an older version of WordPress and not used with your current version. Hosting or permissions issues can cause these files to get left behind when WordPress is updated and they should be removed if possible.', 'wordfence'), - array( - 'file' => $wordpressPath, - 'realFile' => $realPath, - 'cType' => 'core', - 'canDiff' => false, - 'canFix' => false, - 'canDelete' => true, - ) - ); - } - else if (preg_match('#/php\.ini$#', $wordpressPath)) { - $this->engine->addPendingIssue( - 'knownfile', - wfIssues::SEVERITY_HIGH, - 'coreUnknown' . $wordpressPath, - 'coreUnknown' . $wordpressPath . $md5, - sprintf(/* translators: File path. */ __('Unknown file in WordPress core: %s', 'wordfence'), $wordpressPath), - __('This file is in a WordPress core location but is not distributed with this version of WordPress. This scan often includes files left over from a previous WordPress version, but it may also find files added by another plugin, files added by your host, or malicious files added by an attacker.', 'wordfence'), - array( - 'file' => $wordpressPath, - 'realFile' => $realPath, - 'cType' => 'core', - 'canDiff' => false, - 'canFix' => false, - 'canDelete' => true, - 'coalesce' => 'php.ini', - 'learnMore' => wfSupportController::supportURL(wfSupportController::ITEM_SCAN_RESULT_UNKNOWN_FILE_CORE), - 'haveIssues' => 'coreUnknown', - ) - ); - } - else { - $added = $this->engine->addIssue( - 'knownfile', - wfIssues::SEVERITY_HIGH, - 'coreUnknown' . $wordpressPath, - 'coreUnknown' . $wordpressPath . $md5, - sprintf(/* translators: File path. */ __('Unknown file in WordPress core: %s', 'wordfence'), $wordpressPath), - sprintf(/* translators: Support URL. */ __('This file is in a WordPress core location but is not distributed with this version of WordPress. This scan often includes files left over from a previous WordPress version, but it may also find files added by another plugin, files added by your host, or malicious files added by an attacker. <a href="%s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_UNKNOWN_FILE_CORE)), - array( - 'file' => $wordpressPath, - 'realFile' => $realPath, - 'cType' => 'core', - 'canDiff' => false, - 'canFix' => false, - 'canDelete' => true, - ) - ); - } - } - } - - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $this->haveIssues['coreUnknown'] = wfIssues::STATUS_PROBLEM; } - else if ($this->haveIssues['coreUnknown'] != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $this->haveIssues['coreUnknown'] = wfIssues::STATUS_IGNORED; } - } - } - // knownFile means that the file is both part of core or a known plugin or theme AND that we recognize the file's hash. - // we could split this into files whose path we recognize and file's whose path we recognize AND who have a valid sig. - // But because we want to scan files whose sig we don't recognize, regardless of known path or not, we only need one "knownFile" field. - $fileModsTable = wfDB::networkTable('wfFileMods'); - $this->db->queryWrite("INSERT INTO {$fileModsTable} (filename, real_path, filenameMD5, knownFile, oldMD5, newMD5, SHAC) VALUES ('%s', '%s', UNHEX(MD5('%s')), %d, '', UNHEX('%s'), UNHEX('%s')) ON DUPLICATE KEY UPDATE newMD5 = UNHEX('%s'), SHAC = UNHEX('%s'), knownFile = %d", $wordpressPath, $realPath, $wordpressPath, $knownFile, $md5, $shac, $md5, $shac, $knownFile); - - $this->totalFiles++; - $this->totalData += @filesize($realPath); //We already checked if file overflows int in the fileTooBig routine above - if($this->totalFiles % 100 === 0){ - wordfence::status(2, 'info', sprintf( - /* translators: 1. Number of files. 2. Data in bytes. */ - __('Analyzed %1$d files containing %2$s of data so far', 'wordfence'), - $this->totalFiles, - wfUtils::formatBytes($this->totalData) - )); - } - } else { - //wordfence::status(2, 'error', "Could not gen hash for file (probably because we don't have permission to access the file): $realPath"); - } - wfUtils::endProcessingFile(); - } - private function _processPendingIssues() { - $fileModsTable = wfDB::networkTable('wfFileMods'); - - $count = $this->engine->getPendingIssueCount(); - $offset = 0; - while ($offset < $count) { - $issues = $this->engine->getPendingIssues($offset); - if (count($issues) == 0) { - break; - } - - //Do a bulk check of is_safe_file - $hashesToCheck = array(); - foreach ($issues as &$i) { - $shac = $this->db->querySingle("SELECT HEX(SHAC) FROM {$fileModsTable} WHERE filename = '%s' AND isSafeFile = '?'", $i['data']['file']); - $shac = strtoupper($shac); - $i['shac'] = null; - if ($shac !== null) { - $shac = strtoupper($shac); - $i['shac'] = $shac; - $hashesToCheck[] = $shac; - } - } - - $safeFiles = array(); - if (count($hashesToCheck) > 0) { - $safeFiles = $this->isSafeFile($hashesToCheck); - } - - //Migrate non-safe file issues to official issues and begin coalescing tagged issues - foreach ($issues as &$i) { - if (!in_array($i['shac'], $safeFiles)) { - $haveIssuesType = $i['data']['haveIssues']; - if (isset($i['data']['coalesce'])) { - $key = $i['data']['coalesce']; - if (!isset($this->coalescingIssues[$key])) { $this->coalescingIssues[$key] = array('count' => 0, 'issue' => $i); } - $this->coalescingIssues[$key]['count']++; - } - else { - $added = $this->engine->addIssue( - $i['type'], - $i['severity'], - $i['ignoreP'], - $i['ignoreC'], - $i['shortMsg'], - $i['longMsg'], - $i['data'], - true //Prevent ignoreP and ignoreC from being hashed again - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $this->haveIssues[$haveIssuesType] = wfIssues::STATUS_PROBLEM; } - else if ($this->haveIssues[$haveIssuesType] != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $this->haveIssues[$haveIssuesType] = wfIssues::STATUS_IGNORED; } - } - - $this->db->queryWrite("UPDATE {$fileModsTable} SET isSafeFile = '0' WHERE SHAC = UNHEX('%s')", $i['shac']); - } - else { - $this->db->queryWrite("UPDATE {$fileModsTable} SET isSafeFile = '1' WHERE SHAC = UNHEX('%s')", $i['shac']); - } - } - - $offset += count($issues); - $this->engine->checkForKill(); - } - - //Insert the coalesced issues (currently just multiple php.ini in system directories) - foreach ($this->coalescingIssues as $c) { - $count = $c['count']; - $i = $c['issue']; - $haveIssuesType = $i['data']['haveIssues']; - $added = $this->engine->addIssue( - $i['type'], - $i['severity'], - $i['ignoreP'], - $i['ignoreC'], - $i['shortMsg'] . ($count > 1 ? ' ' . sprintf(/* translators: Number of scan results. */ __('(+ %d more)', 'wordfence'), $count - 1) : ''), - $i['longMsg'] . ($count > 1 ? ' ' . ($count > 2 ? sprintf(/* translators: Number of files. */ __('%d more similar files were found.', 'wordfence'), $count - 1) : __('1 more similar file was found.', 'wordfence')) : '') . (isset($i['data']['learnMore']) ? ' ' . sprintf(__('<a href="%s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'wordfence'), esc_attr($i['data']['learnMore'])) : ''), - $i['data'], - true //Prevent ignoreP and ignoreC from being hashed again - ); - if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $this->haveIssues[$haveIssuesType] = wfIssues::STATUS_PROBLEM; } - else if ($this->haveIssues[$haveIssuesType] != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $this->haveIssues[$haveIssuesType] = wfIssues::STATUS_IGNORED; } - } - } - public static function hashFile($file) { - $fp = @fopen($file, "rb"); - if (!$fp) { - return false; - } - $md5Context = hash_init('md5'); - $sha256Context = hash_init('sha256'); - while (!feof($fp)) { - $data = fread($fp, 65536); - if ($data === false) { - return false; - } - hash_update($md5Context, $data); - hash_update($sha256Context, str_replace(array("\n","\r","\t"," "),"", $data)); - } - $md5 = hash_final($md5Context, false); - $shac = hash_final($sha256Context, false); - return array($md5, $shac); - } - private function _shouldHashFile($file) { - $wordpressPath = $file->getWordpressPath(); - - //Core File, return true - if ((isset($this->knownFiles['core']) && isset($this->knownFiles['core'][$wordpressPath])) || - (isset($this->knownFiles['plugins']) && isset($this->knownFiles['plugins'][$wordpressPath])) || - (isset($this->knownFiles['themes']) && isset($this->knownFiles['themes'][$wordpressPath]))) { - return true; - } - - //Excluded file, return false - $excludePatterns = wordfenceScanner::getExcludeFilePattern(wordfenceScanner::EXCLUSION_PATTERNS_USER | wordfenceScanner::EXCLUSION_PATTERNS_MALWARE); - if ($excludePatterns) { - foreach ($excludePatterns as $pattern) { - if (preg_match($pattern, $wordpressPath)) { - return false; - } - } - } - - //Unknown file in a core location - if ($this->coreUnknownEnabled && !$this->alertedOnUnknownWordPressVersion) { - $restrictedWordPressFolders = array(ABSPATH . 'wp-admin/', ABSPATH . WPINC . '/'); - foreach ($restrictedWordPressFolders as $path) { - if (strpos($file->getRealPath(), $path) === 0) { - return true; - } - } - } - - //Determine treatment - $fileExt = ''; - if (preg_match('/\.([a-zA-Z\d\-]{1,7})$/', $wordpressPath, $matches)) { - $fileExt = strtolower($matches[1]); - } - $isPHP = false; - if (preg_match('/\.(?:php(?:\d+)?|phtml)(\.|$)/i', $wordpressPath)) { - $isPHP = true; - } - $isHTML = false; - if (preg_match('/\.(?:html?)(\.|$)/i', $wordpressPath)) { - $isHTML = true; - } - $isJS = false; - if (preg_match('/\.(?:js|svg)(\.|$)/i', $wordpressPath)) { - $isJS = true; - } - - $options = $this->engine->scanController()->scanOptions(); - - //If scan images is disabled, only allow .js through - if (!$isPHP && preg_match('/^(?:jpg|jpeg|mp3|avi|m4v|mov|mp4|gif|png|tiff?|svg|sql|js|tbz2?|bz2?|xz|zip|tgz|gz|tar|log|err\d+)$/', $fileExt)) { - if (!$options['scansEnabled_scanImages'] && !$isJS) { - return false; - } - } - - //If high sensitivity is disabled, don't allow .sql - if (strtolower($fileExt) == 'sql') { - if (!$options['scansEnabled_highSense']) { - return false; - } - } - - //Treating as binary, return true - $treatAsBinary = ($isPHP || $isHTML || $options['scansEnabled_scanImages']); - if ($treatAsBinary) { - return true; - } - - //Will be malware scanned, return true - if ($isJS) { - return true; - } - - return false; - } - private function isMalwarePrefix($hexMD5){ - $hasPrefix = $this->_binaryListContains($this->malwareData, wfUtils::hex2bin($hexMD5), 4); - return $hasPrefix !== false; - } - private function isPreviousCoreFile($hexContentsSHAC) { - $hasPrefix = $this->_binaryListContains($this->coreHashesData, wfUtils::hex2bin($hexContentsSHAC), 32); - return $hasPrefix !== false; - } - - /** - * @param $binaryList The binary list to search, sorted as a binary string. - * @param $needle The binary needle to search for. - * @param int $size The byte size of each item in the list. - * @return bool|int false if not found, otherwise the index in the list - */ - private function _binaryListContains($binaryList, $needle, $size /* bytes */) { - $p = substr($needle, 0, $size); - - $count = ceil(wfWAFUtils::strlen($binaryList) / $size); - $low = 0; - $high = $count - 1; - - while ($low <= $high) { - $mid = (int) (($high + $low) / 2); - $val = wfWAFUtils::substr($binaryList, $mid * $size, $size); - $cmp = strcmp($val, $p); - if ($cmp < 0) { - $low = $mid + 1; - } - else if ($cmp > 0) { - $high = $mid - 1; - } - else { - return $mid; - } - } - - return false; - } - - /** - * Queries the is_safe_file endpoint. If provided an array, it does a bulk check and returns an array containing the - * hashes that were marked as safe. If provided a string, it returns a boolean to indicate the safeness of the file. - * - * @param string|array $shac - * @return array|bool - */ - private function isSafeFile($shac) { - if (is_array($shac)) { - $result = $this->engine->api->call('is_safe_file', array(), array('multipleSHAC' => json_encode($shac))); - if (isset($result['isSafe'])) { - return $result['isSafe']; - } - return array(); - } - - $result = $this->engine->api->call('is_safe_file', array(), array('shac' => strtoupper($shac))); - if(isset($result['isSafe']) && $result['isSafe'] == 1){ - return true; - } - return false; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wordfenceScanner.php b/wp/wp-content/plugins/wordfence/lib/wordfenceScanner.php deleted file mode 100644 index 06c62cb9..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wordfenceScanner.php +++ /dev/null @@ -1,814 +0,0 @@ -<?php -require_once(dirname(__FILE__) . '/wordfenceConstants.php'); -require_once(dirname(__FILE__) . '/wordfenceClass.php'); -require_once(dirname(__FILE__) . '/wordfenceURLHoover.php'); -class wordfenceScanner { - /* - * Mask to return all patterns in the exclusion list. - * @var int - */ - const EXCLUSION_PATTERNS_ALL = PHP_INT_MAX; - /* - * Mask for patterns that the user has added. - */ - const EXCLUSION_PATTERNS_USER = 0x1; - /* - * Mask for patterns that should be excluded from the known files scan. - */ - const EXCLUSION_PATTERNS_KNOWN_FILES = 0x2; - /* - * Mask for patterns that should be excluded from the malware scan. - */ - const EXCLUSION_PATTERNS_MALWARE = 0x4; - - //serialized: - protected $path = ''; - protected $results = array(); - public $errorMsg = false; - protected $apiKey = false; - protected $wordpressVersion = ''; - protected $totalFilesScanned = 0; - protected $startTime = false; - protected $lastStatusTime = false; - protected $patterns = ""; - protected $api = false; - protected static $excludePatterns = array(); - protected static $builtinExclusions = array( - array('pattern' => 'wp\-includes\/version\.php', 'include' => self::EXCLUSION_PATTERNS_KNOWN_FILES), //Excluded from the known files scan because non-en_US installations will have extra content that fails the check, still in malware scan - array('pattern' => '(?:wp\-includes|wp\-admin)\/(?:[^\/]+\/+)*(?:\.htaccess|\.htpasswd|php_errorlog|error_log|[^\/]+?\.log|\._|\.DS_Store|\.listing|dwsync\.xml)', 'include' => self::EXCLUSION_PATTERNS_KNOWN_FILES), - ); - /** @var wfScanEngine */ - protected $scanEngine; - private $urlHoover; - - public function __sleep(){ - return array('path', 'results', 'errorMsg', 'apiKey', 'wordpressVersion', 'urlHoover', 'totalFilesScanned', - 'startTime', 'lastStatusTime', 'patterns', 'scanEngine'); - } - public function __wakeup(){ - } - public function __construct($apiKey, $wordpressVersion, $path, $scanEngine) { - $this->apiKey = $apiKey; - $this->wordpressVersion = $wordpressVersion; - $this->api = new wfAPI($this->apiKey, $this->wordpressVersion); - if($path[strlen($path) - 1] != '/'){ - $path .= '/'; - } - $this->path = $path; - $this->scanEngine = $scanEngine; - - - $this->results = array(); - $this->errorMsg = false; - //First extract hosts or IPs and their URLs into $this->hostsFound and URL's into $this->urlsFound - $options = $this->scanEngine->scanController()->scanOptions(); - if ($options['scansEnabled_fileContentsGSB']) { - $this->urlHoover = new wordfenceURLHoover($this->apiKey, $this->wordpressVersion); - } - else { - $this->urlHoover = false; - } - - if ($options['scansEnabled_fileContents']) { - $this->setupSigs(); - } - else { - $this->patterns = array(); - } - } - - /** - * Get scan regexes from noc1 and add any user defined regexes, including descriptions, ID's and time added. - * @todo add caching to this. - * @throws Exception - */ - protected function setupSigs() { - $sigData = $this->api->call('get_patterns', array(), array()); - if(! (is_array($sigData) && isset($sigData['rules'])) ){ - throw new Exception(__('Wordfence could not get the attack signature patterns from the scanning server.', 'wordfence')); - } - - if (is_array($sigData['rules'])) { - $wafPatterns = array(); - $wafCommonStringIndexes = array(); - foreach ($sigData['rules'] as $key => $signatureRow) { - list($id, , $pattern) = $signatureRow; - if (empty($pattern)) { - throw new Exception(__('Wordfence received malformed attack signature patterns from the scanning server.', 'wordfence')); - } - - $logOnly = (isset($signatureRow[5]) && !empty($signatureRow[5])) ? $signatureRow[5] : false; - $commonStringIndexes = (isset($signatureRow[8]) && is_array($signatureRow[8])) ? $signatureRow[8] : array(); - if (@preg_match('/' . $pattern . '/iS', '') === false) { - wordfence::status(1, 'error', sprintf(__('Regex compilation failed for signature %d', 'wordfence'), (int) $id)); - unset($sigData['rules'][$key]); - } - else if (!$logOnly) { - $wafPatterns[] = $pattern; - $wafCommonStringIndexes[] = $commonStringIndexes; - } - } - } - - $userSignatures = wfScanner::shared()->userScanSignatures(); - foreach ($userSignatures as $s) { - $sigData['rules'][] = $s; - } - - $this->patterns = $sigData; - if (isset($this->patterns['signatureUpdateTime'])) { - wfConfig::set('signatureUpdateTime', $this->patterns['signatureUpdateTime']); - } - } - - /** - * Return regular expression to exclude files or false if - * there is no pattern - * - * @param $whichPatterns int Bitmask indicating which patterns to include. - * @return array|boolean - */ - public static function getExcludeFilePattern($whichPatterns = self::EXCLUSION_PATTERNS_USER) { - if (isset(self::$excludePatterns[$whichPatterns])) { - return self::$excludePatterns[$whichPatterns]; - } - - $exParts = array(); - if (($whichPatterns & self::EXCLUSION_PATTERNS_USER) > 0) - { - $exParts = wfScanner::shared()->userExclusions(); - } - - $exParts = array_filter($exParts); - foreach ($exParts as $key => &$exPart) { - $exPart = trim($exPart); - if ($exPart === '*') { - unset($exParts[$key]); - continue; - } - $exPart = preg_quote($exPart, '/'); - $exPart = preg_replace('/\\\\\*/', '.*', $exPart); - } - - foreach (self::$builtinExclusions as $pattern) { - if (($pattern['include'] & $whichPatterns) > 0) { - $exParts[] = $pattern['pattern']; - } - } - - $exParts = array_filter($exParts); - if (!empty($exParts)) { - $chunks = array_chunk($exParts, 100); - self::$excludePatterns[$whichPatterns] = array(); - foreach ($chunks as $parts) { - self::$excludePatterns[$whichPatterns][] = '/(?:' . implode('|', $parts) . ')$/i'; - } - } - else { - self::$excludePatterns[$whichPatterns] = false; - } - - return self::$excludePatterns[$whichPatterns]; - } - - /** - * @param wfScanEngine $forkObj - * @return array - */ - public function scan($forkObj){ - $this->scanEngine = $forkObj; - $loader = $this->scanEngine->getKnownFilesLoader(); - if(! $this->startTime){ - $this->startTime = microtime(true); - } - if(! $this->lastStatusTime){ - $this->lastStatusTime = microtime(true); - } - - //The site's own URL is checked in an earlier scan stage so we exclude it here. - $options = $this->scanEngine->scanController()->scanOptions(); - $hooverExclusions = array(); - if ($options['scansEnabled_fileContentsGSB']) { - $hooverExclusions = wordfenceURLHoover::standardExcludedHosts(); - } - - $backtrackLimit = ini_get('pcre.backtrack_limit'); - if (is_numeric($backtrackLimit)) { - $backtrackLimit = (int) $backtrackLimit; - if ($backtrackLimit > 10000000) { - ini_set('pcre.backtrack_limit', 1000000); - wordfence::status(4, 'info', sprintf(/* translators: PHP ini setting (number). */ __('Backtrack limit is %d, reducing to 1000000', 'wordfence'), $backtrackLimit)); - } - } - else { - $backtrackLimit = false; - } - - $lastCount = 'whatever'; - $excludePatterns = self::getExcludeFilePattern(self::EXCLUSION_PATTERNS_USER | self::EXCLUSION_PATTERNS_MALWARE); - while (true) { - $thisCount = wordfenceMalwareScanFile::countRemaining(); - if ($thisCount == $lastCount) { - //count should always be decreasing. If not, we're in an infinite loop so lets catch it early - wordfence::status(4, 'info', __('Detected loop in malware scan, aborting.', 'wordfence')); - break; - } - $lastCount = $thisCount; - - $files = wordfenceMalwareScanFile::files(); - if (count($files) < 1) { - wordfence::status(4, 'info', __('No files remaining for malware scan.', 'wordfence')); - break; - } - - foreach ($files as $record) { - $file = $record->filename; - if ($excludePatterns) { - foreach ($excludePatterns as $pattern) { - if (preg_match($pattern, $file)) { - $record->markComplete(); - continue 2; - } - } - } - if (!file_exists($record->realPath)) { - $record->markComplete(); - continue; - } - $fileSum = $record->newMD5; - - $fileExt = ''; - if(preg_match('/\.([a-zA-Z\d\-]{1,7})$/', $file, $matches)){ - $fileExt = strtolower($matches[1]); - } - $isPHP = false; - if(preg_match('/\.(?:php(?:\d+)?|phtml)(\.|$)/i', $file)) { - $isPHP = true; - } - $isHTML = false; - if(preg_match('/\.(?:html?)(\.|$)/i', $file)) { - $isHTML = true; - } - $isJS = false; - if(preg_match('/\.(?:js|svg)(\.|$)/i', $file)) { - $isJS = true; - } - $dontScanForURLs = false; - if (!$options['scansEnabled_highSense'] && (preg_match('/^(?:\.htaccess|wp\-config\.php)$/', $file) || $file === ini_get('user_ini.filename'))) { - $dontScanForURLs = true; - } - - $isScanImagesFile = false; - if (!$isPHP && preg_match('/^(?:jpg|jpeg|mp3|avi|m4v|mov|mp4|gif|png|tiff?|svg|sql|js|tbz2?|bz2?|xz|zip|tgz|gz|tar|log|err\d+)$/', $fileExt)) { - if ($options['scansEnabled_scanImages']) { - $isScanImagesFile = true; - } - else if (!$isJS) { - $record->markComplete(); - continue; - } - } - $isHighSensitivityFile = false; - if (strtolower($fileExt) == 'sql') { - if ($options['scansEnabled_highSense']) { - $isHighSensitivityFile = true; - } - else { - $record->markComplete(); - continue; - } - } - if(wfUtils::fileTooBig($record->realPath)){ //We can't use filesize on 32 bit systems for files > 2 gigs - //We should not need this check because files > 2 gigs are not hashed and therefore won't be received back as unknowns from the API server - //But we do it anyway to be safe. - wordfence::status(2, 'error', sprintf(/* translators: File path. */ __('Encountered file that is too large: %s - Skipping.', 'wordfence'), $file)); - $record->markComplete(); - continue; - } - wfUtils::beginProcessingFile($file); - - $fsize = @filesize($record->realPath); //Checked if too big above - $fsize = wfUtils::formatBytes($fsize); - if (function_exists('memory_get_usage')) { - wordfence::status(4, 'info', sprintf( - /* translators: 1. File path. 2. File size. 3. Memory in bytes. */ - __('Scanning contents: %1$s (Size: %2$s Mem: %3$s)', 'wordfence'), - $file, - $fsize, - wfUtils::formatBytes(memory_get_usage(true)) - )); - } else { - wordfence::status(4, 'info', sprintf( - /* translators: 1. File path. 2. File size. */ - __('Scanning contents: %1$s (Size: %2$s)', 'wordfence'), - $file, - $fsize - )); - } - - $stime = microtime(true); - $fh = @fopen($record->realPath, 'r'); - if (!$fh) { - $record->markComplete(); - continue; - } - $totalRead = $record->stoppedOnPosition; - if ($totalRead > 0) { - if (@fseek($fh, $totalRead, SEEK_SET) !== 0) { - $totalRead = 0; - } - } - - $dataForFile = $this->dataForFile($file); - - $first = true; - while (!feof($fh)) { - $data = fread($fh, 1 * 1024 * 1024); //read 1 megs max per chunk - $readSize = wfUtils::strlen($data); - $currentPosition = $totalRead; - $totalRead += $readSize; - if ($readSize < 1) { - break; - } - - $extraMsg = ''; - if ($isScanImagesFile) { - $extraMsg = ' ' . __('This file was detected because you have enabled "Scan images, binary, and other files as if they were executable", which treats non-PHP files as if they were PHP code. This option is more aggressive than the usual scans, and may cause false positives.', 'wordfence'); - } - else if ($isHighSensitivityFile) { - $extraMsg = ' ' . __('This file was detected because you have enabled HIGH SENSITIVITY scanning. This option is more aggressive than the usual scans, and may cause false positives.', 'wordfence'); - } - - $treatAsBinary = ($isPHP || $isHTML || $options['scansEnabled_scanImages']); - if ($options['scansEnabled_fileContents']) { - $allCommonStrings = $this->patterns['commonStrings']; - $commonStringsFound = array_fill(0, count($allCommonStrings), null); //Lazily looked up below - - $regexMatched = false; - foreach ($this->patterns['rules'] as $rule) { - $stoppedOnSignature = $record->stoppedOnSignature; - if (!empty($stoppedOnSignature)) { //Advance until we find the rule we stopped on last time - //wordfence::status(4, 'info', "Searching for malware scan resume point (". $stoppedOnSignature . ") at rule " . $rule[0]); - if ($stoppedOnSignature == $rule[0]) { - $record->updateStoppedOn('', $currentPosition); - wordfence::status(4, 'info', sprintf(/* translators: Malware signature rule ID. */ __('Resuming malware scan at rule %s.', 'wordfence'), $rule[0])); - } - continue; - } - - $type = (isset($rule[4]) && !empty($rule[4])) ? $rule[4] : 'server'; - $logOnly = (isset($rule[5]) && !empty($rule[5])) ? $rule[5] : false; - $commonStringIndexes = (isset($rule[8]) && is_array($rule[8])) ? $rule[8] : array(); - if ($type == 'server' && !$treatAsBinary) { continue; } - else if (($type == 'both' || $type == 'browser') && $isJS) { $extraMsg = ''; } - else if (($type == 'both' || $type == 'browser') && !$treatAsBinary) { continue; } - - if (!$first && substr($rule[2], 0, 1) == '^') { - //wordfence::status(4, 'info', "Skipping malware signature ({$rule[0]}) because it only applies to the file beginning."); - continue; - } - - foreach ($commonStringIndexes as $i) { - if ($commonStringsFound[$i] === null) { - $s = $allCommonStrings[$i]; - $commonStringsFound[$i] = (preg_match('/' . $s . '/i', $data) == 1); - } - - if (!$commonStringsFound[$i]) { - //wordfence::status(4, 'info', "Skipping malware signature ({$rule[0]}) due to short circuit."); - continue 2; - } - } - - /*if (count($commonStringIndexes) > 0) { - wordfence::status(4, 'info', "Processing malware signature ({$rule[0]}) because short circuit matched."); - }*/ - - if (preg_match('/(' . $rule[2] . ')/iS', $data, $matches, PREG_OFFSET_CAPTURE)) { - $customMessage = isset($rule[9]) ? $rule[9] : __('This file appears to be installed or modified by a hacker to perform malicious activity. If you know about this file you can choose to ignore it to exclude it from future scans.', 'wordfence'); - $matchString = $matches[1][0]; - $matchOffset = $matches[1][1]; - $beforeString = wfWAFUtils::substr($data, max(0, $matchOffset - 100), $matchOffset - max(0, $matchOffset - 100)); - $afterString = wfWAFUtils::substr($data, $matchOffset + strlen($matchString), 100); - if (!$logOnly) { - $this->addResult(array( - 'type' => 'file', - 'severity' => wfIssues::SEVERITY_CRITICAL, - 'ignoreP' => $record->realPath, - 'ignoreC' => $fileSum, - 'shortMsg' => sprintf(__('File appears to be malicious or unsafe: %s', 'wordfence'), esc_html($record->getDisplayPath())), - 'longMsg' => $customMessage . ' ' . sprintf(__('The matched text in this file is: %s', 'wordfence'), '<strong style="color: #F00;" class="wf-split-word">' . wfUtils::potentialBinaryStringToHTML((wfUtils::strlen($matchString) > 200 ? wfUtils::substr($matchString, 0, 200) . '...' : $matchString)) . '</strong>') . ' ' . '<br><br>' . sprintf(/* translators: Scan result type. */ __('The issue type is: %s', 'wordfence'), '<strong>' . esc_html($rule[7]) . '</strong>') . '<br>' . sprintf(/* translators: Scan result description. */ __('Description: %s', 'wordfence'), '<strong>' . esc_html($rule[3]) . '</strong>') . $extraMsg, - 'data' => array_merge(array( - 'file' => $file, - 'realFile' => $record->realPath, - 'shac' => $record->SHAC, - 'highSense' => $options['scansEnabled_highSense'] - ), $dataForFile), - )); - } - $regexMatched = true; - $this->scanEngine->recordMetric('malwareSignature', $rule[0], array('file' => substr($file, 0, 255), 'match' => substr($matchString, 0, 65535), 'before' => $beforeString, 'after' => $afterString, 'md5' => $record->newMD5, 'shac' => $record->SHAC), false); - break; - } - - if ($forkObj->shouldFork()) { - $record->updateStoppedOn($rule[0], $currentPosition); - fclose($fh); - - wordfence::status(4, 'info', sprintf(/* translators: Malware signature rule ID. */ __('Forking during malware scan (%s) to ensure continuity.', 'wordfence'), $rule[0])); - $forkObj->fork(); //exits - } - } - if ($regexMatched) { break; } - if ($treatAsBinary && $options['scansEnabled_highSense']) { - $badStringFound = false; - if (strpos($data, $this->patterns['badstrings'][0]) !== false) { - for ($i = 1; $i < sizeof($this->patterns['badstrings']); $i++) { - if (wfUtils::strpos($data, $this->patterns['badstrings'][$i]) !== false) { - $badStringFound = $this->patterns['badstrings'][$i]; - break; - } - } - } - if ($badStringFound) { - $this->addResult(array( - 'type' => 'file', - 'severity' => wfIssues::SEVERITY_CRITICAL, - 'ignoreP' => $record->realPath, - 'ignoreC' => $fileSum, - 'shortMsg' => __('This file may contain malicious executable code: ', 'wordfence') . esc_html($record->getDisplayPath()), - 'longMsg' => sprintf(/* translators: Malware signature matched text. */ __('This file is a PHP executable file and contains the word "eval" (without quotes) and the word "%s" (without quotes). The eval() function along with an encoding function like the one mentioned are commonly used by hackers to hide their code. If you know about this file you can choose to ignore it to exclude it from future scans. This file was detected because you have enabled HIGH SENSITIVITY scanning. This option is more aggressive than the usual scans, and may cause false positives.', 'wordfence'), '<span class="wf-split-word">' . esc_html($badStringFound) . '</span>'), - 'data' => array_merge(array( - 'file' => $file, - 'realFile' => $record->realPath, - 'shac' => $record->SHAC, - 'highSense' => $options['scansEnabled_highSense'] - ), $dataForFile), - )); - break; - } - } - } - - if (!$dontScanForURLs && $options['scansEnabled_fileContentsGSB']) { - $found = $this->urlHoover->hoover($file, $data, $hooverExclusions); - $this->scanEngine->scanController()->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, $found); - } - - if ($totalRead > 2 * 1024 * 1024) { - break; - } - - $first = false; - } - fclose($fh); - $this->totalFilesScanned++; - if(microtime(true) - $this->lastStatusTime > 1){ - $this->lastStatusTime = microtime(true); - $this->writeScanningStatus(); - } - - $record->markComplete(); - $forkObj->forkIfNeeded(); - } - } - $this->writeScanningStatus(); - if ($options['scansEnabled_fileContentsGSB']) { - wordfence::status(2, 'info', __('Asking Wordfence to check URLs against malware list.', 'wordfence')); - $hooverResults = $this->urlHoover->getBaddies(); - if($this->urlHoover->errorMsg){ - $this->errorMsg = $this->urlHoover->errorMsg; - if ($backtrackLimit !== false) { ini_set('pcre.backtrack_limit', $backtrackLimit); } - return false; - } - $this->urlHoover->cleanup(); - - foreach($hooverResults as $file => $hresults){ - $record = wordfenceMalwareScanFile::fileForPath($file); - $dataForFile = $this->dataForFile($file, $record->realPath); - - foreach($hresults as $result){ - if(preg_match('/wfBrowscapCache\.php$/', $file)){ - continue; - } - - if (empty($result['URL'])) { - continue; - } - - if ($result['badList'] == 'goog-malware-shavar') { - $this->addResult(array( - 'type' => 'file', - 'severity' => wfIssues::SEVERITY_CRITICAL, - 'ignoreP' => $record->realPath, - 'ignoreC' => md5_file($record->realPath), - 'shortMsg' => __('File contains suspected malware URL: ', 'wordfence') . esc_html($record->getDisplayPath()), - 'longMsg' => wp_kses(sprintf( - /* translators: 1. Malware signature matched text. 2. Malicious URL. 3. Malicious URL. */ - __('This file contains a suspected malware URL listed on Google\'s list of malware sites. Wordfence decodes %1$s when scanning files so the URL may not be visible if you view this file. The URL is: %2$s - More info available at <a href="http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%3$s&client=googlechrome&hl=en-US" target="_blank" rel="noopener noreferrer">Google Safe Browsing diagnostic page<span class="screen-reader-text"> (opens in new tab)</span></a>.', 'wordfence'), - esc_html($this->patterns['word3']), - esc_html($result['URL']), - urlencode($result['URL']) - ), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('class'))), - 'data' => array_merge(array( - 'file' => $file, - 'realFile' => $record->realPath, - 'shac' => $record->SHAC, - 'badURL' => $result['URL'], - 'gsb' => 'goog-malware-shavar', - 'highSense' => $options['scansEnabled_highSense'] - ), $dataForFile), - )); - } - else if ($result['badList'] == 'googpub-phish-shavar') { - $this->addResult(array( - 'type' => 'file', - 'severity' => wfIssues::SEVERITY_CRITICAL, - 'ignoreP' => $record->realPath, - 'ignoreC' => md5_file($record->realPath), - 'shortMsg' => __('File contains suspected phishing URL: ', 'wordfence') . esc_html($record->getDisplayPath()), - 'longMsg' => __('This file contains a URL that is a suspected phishing site that is currently listed on Google\'s list of known phishing sites. The URL is: ', 'wordfence') . esc_html($result['URL']), - 'data' => array_merge(array( - 'file' => $file, - 'realFile' => $record->realPath, - 'shac' => $record->SHAC, - 'badURL' => $result['URL'], - 'gsb' => 'googpub-phish-shavar', - 'highSense' => $options['scansEnabled_highSense'] - ), $dataForFile), - )); - } - else if ($result['badList'] == 'wordfence-dbl') { - $this->addResult(array( - 'type' => 'file', - 'severity' => wfIssues::SEVERITY_CRITICAL, - 'ignoreP' => $record->realFile, - 'ignoreC' => md5_file($record->realPath), - 'shortMsg' => __('File contains suspected malware URL: ', 'wordfence') . esc_html($record->getDisplayPath()), - 'longMsg' => __('This file contains a URL that is currently listed on Wordfence\'s domain blocklist. The URL is: ', 'wordfence') . esc_html($result['URL']), - 'data' => array_merge(array( - 'file' => $file, - 'realFile' => $record->realPath, - 'shac' => $record->SHAC, - 'badURL' => $result['URL'], - 'gsb' => 'wordfence-dbl', - 'highSense' => $options['scansEnabled_highSense'] - ), $dataForFile), - )); - } - } - } - } - wfUtils::endProcessingFile(); - - wordfence::status(4, 'info', __('Finalizing malware scan results', 'wordfence')); - $hashesToCheck = array(); - foreach ($this->results as $r) { - $hashesToCheck[] = $r['data']['shac']; - } - - if (count($hashesToCheck) > 0) { - $safeFiles = $this->isSafeFile($hashesToCheck); - foreach ($this->results as $index => $value) { - if (in_array($value['data']['shac'], $safeFiles)) { - unset($this->results[$index]); - } - } - } - - if ($backtrackLimit !== false) { ini_set('pcre.backtrack_limit', $backtrackLimit); } - return $this->results; - } - - protected function writeScanningStatus() { - wordfence::status(2, 'info', sprintf( - /* translators: 1. Number of fils. 2. Seconds in millisecond precision. */ - __('Scanned contents of %1$d additional files at %2$.2f per second', 'wordfence'), - $this->totalFilesScanned, - ($this->totalFilesScanned / (microtime(true) - $this->startTime)) - )); - } - - protected function addResult($result) { - for ($i = 0; $i < sizeof($this->results); $i++) { - if ($this->results[$i]['type'] == 'file' && $this->results[$i]['data']['file'] == $result['data']['file']) { - if ($this->results[$i]['severity'] > $result['severity']) { - $this->results[$i] = $result; //Overwrite with more severe results - } - return; - } - } - //We don't have a results for this file so append - $this->results[] = $result; - } - - /** - * Queries the is_safe_file endpoint. If provided an array, it does a bulk check and returns an array containing the - * hashes that were marked as safe. If provided a string, it returns a boolean to indicate the safeness of the file. - * - * @param string|array $shac - * @return array|bool - */ - private function isSafeFile($shac) { - if(! $this->api){ - $this->api = new wfAPI($this->apiKey, $this->wordpressVersion); - } - - if (is_array($shac)) { - $result = $this->api->call('is_safe_file', array(), array('multipleSHAC' => json_encode($shac))); - if (isset($result['isSafe'])) { - return $result['isSafe']; - } - return array(); - } - - $result = $this->api->call('is_safe_file', array(), array('shac' => strtoupper($shac))); - if(isset($result['isSafe']) && $result['isSafe'] == 1){ - return true; - } - return false; - } - - /** - * @param string $file - * @return array - */ - private function dataForFile($file, $fullPath = null) { - $loader = $this->scanEngine->getKnownFilesLoader(); - $data = array(); - if ($isKnownFile = $loader->isKnownFile($file)) { - if ($loader->isKnownCoreFile($file)) { - $data['cType'] = 'core'; - - } else if ($loader->isKnownPluginFile($file)) { - $data['cType'] = 'plugin'; - list($itemName, $itemVersion, $cKey) = $loader->getKnownPluginData($file); - $data = array_merge($data, array( - 'cName' => $itemName, - 'cVersion' => $itemVersion, - 'cKey' => $cKey - )); - - } else if ($loader->isKnownThemeFile($file)) { - $data['cType'] = 'theme'; - list($itemName, $itemVersion, $cKey) = $loader->getKnownThemeData($file); - $data = array_merge($data, array( - 'cName' => $itemName, - 'cVersion' => $itemVersion, - 'cKey' => $cKey - )); - } - } - - $suppressDelete = false; - $canRegenerate = false; - if ($fullPath !== null) { - $bootstrapPath = wordfence::getWAFBootstrapPath(); - $htaccessPath = wfUtils::getHomePath() . '.htaccess'; - $userIni = ini_get('user_ini.filename'); - $userIniPath = false; - if ($userIni) { - $userIniPath = wfUtils::getHomePath() . $userIni; - } - - if ($fullPath == $htaccessPath) { - $suppressDelete = true; - } - else if ($userIniPath !== false && $fullPath == $userIniPath) { - $suppressDelete = true; - } - else if ($fullPath == $bootstrapPath) { - $suppressDelete = true; - $canRegenerate = true; - } - } - - $localFile = realpath($this->path . $file); - $isWPConfig = $localFile === ABSPATH . 'wp-config.php'; - - $data['canDiff'] = $isKnownFile; - $data['canFix'] = $isKnownFile && !$isWPConfig; - $data['canDelete'] = !$isKnownFile && !$canRegenerate && !$suppressDelete && !$isWPConfig; - $data['canRegenerate'] = $canRegenerate && !$isWPConfig; - $data['wpconfig'] = $isWPConfig; - - return $data; - } -} - -/** - * Convenience class for interfacing with the wfFileMods table. - * - * @property string $filename - * @property string $filenameMD5 - * @property string $newMD5 - * @property string $SHAC - * @property string $stoppedOnSignature - * @property string $stoppedOnPosition - * @property string $isSafeFile - */ -class wordfenceMalwareScanFile { - protected $_filename; - protected $_realPath; - protected $_filenameMD5; - protected $_newMD5; - protected $_shac; - protected $_stoppedOnSignature; - protected $_stoppedOnPosition; - protected $_isSafeFile; - - protected static function getDB() { - static $db = null; - if ($db === null) { - $db = new wfDB(); - } - return $db; - } - - public static function countRemaining() { - $db = self::getDB(); - return $db->querySingle("SELECT COUNT(*) FROM " . wfDB::networkTable('wfFileMods') . " WHERE oldMD5 != newMD5 AND knownFile = 0"); - } - - public static function files($limit = 500) { - $db = self::getDB(); - $result = $db->querySelect("SELECT filename, real_path, filenameMD5, HEX(newMD5) AS newMD5, HEX(SHAC) AS SHAC, stoppedOnSignature, stoppedOnPosition, isSafeFile FROM " . wfDB::networkTable('wfFileMods') . " WHERE oldMD5 != newMD5 AND knownFile = 0 limit %d", $limit); - $files = array(); - foreach ($result as $row) { - $files[] = new wordfenceMalwareScanFile($row['filename'], $row['real_path'], $row['filenameMD5'], $row['newMD5'], $row['SHAC'], $row['stoppedOnSignature'], $row['stoppedOnPosition'], $row['isSafeFile']); - } - return $files; - } - - public static function fileForPath($file) { - $db = self::getDB(); - $row = $db->querySingleRec("SELECT filename, real_path, filenameMD5, HEX(newMD5) AS newMD5, HEX(SHAC) AS SHAC, stoppedOnSignature, stoppedOnPosition, isSafeFile FROM " . wfDB::networkTable('wfFileMods') . " WHERE filename = '%s'", $file); - return new wordfenceMalwareScanFile($row['filename'], $row['real_path'], $row['filenameMD5'], $row['newMD5'], $row['SHAC'], $row['stoppedOnSignature'], $row['stoppedOnPosition'], $row['isSafeFile']); - } - - public function __construct($filename, $realPath, $filenameMD5, $newMD5, $shac, $stoppedOnSignature, $stoppedOnPosition, $isSafeFile) { - $this->_filename = $filename; - $this->_realPath = $realPath; - $this->_filenameMD5 = $filenameMD5; - $this->_newMD5 = $newMD5; - $this->_shac = strtoupper($shac); - $this->_stoppedOnSignature = $stoppedOnSignature; - $this->_stoppedOnPosition = $stoppedOnPosition; - $this->_isSafeFile = $isSafeFile; - } - - public function __get($key) { - switch ($key) { - case 'filename': - return $this->_filename; - case 'realPath': - return $this->_realPath; - case 'filenameMD5': - return $this->_filenameMD5; - case 'newMD5': - return $this->_newMD5; - case 'SHAC': - return $this->_shac; - case 'stoppedOnSignature': - return $this->_stoppedOnSignature; - case 'stoppedOnPosition': - return $this->_stoppedOnPosition; - case 'isSafeFile': - return $this->_isSafeFile; - } - } - - public function __toString() { - return "Record [filename: {$this->filename}, realPath: {$this->realPath}, filenameMD5: {$this->filenameMD5}, newMD5: {$this->newMD5}, stoppedOnSignature: {$this->stoppedOnSignature}, stoppedOnPosition: {$this->stoppedOnPosition}]"; - } - - public function markComplete() { - $db = self::getDB(); - $db->queryWrite("UPDATE " . wfDB::networkTable('wfFileMods') . " SET oldMD5 = newMD5 WHERE filenameMD5 = '%s'", $this->filenameMD5); //A way to mark as scanned so that if we come back from a sleep we don't rescan this one. - } - - public function updateStoppedOn($signature, $position) { - $this->_stoppedOnSignature = $signature; - $this->_stoppedOnPosition = $position; - $db = self::getDB(); - $db->queryWrite("UPDATE " . wfDB::networkTable('wfFileMods') . " SET stoppedOnSignature = '%s', stoppedOnPosition = %d WHERE filenameMD5 = '%s'", $this->stoppedOnSignature, $this->stoppedOnPosition, $this->filenameMD5); - } - - public function markSafe() { - $db = self::getDB(); - $db->queryWrite("UPDATE " . wfDB::networkTable('wfFileMods') . " SET isSafeFile = '1' WHERE filenameMD5 = '%s'", $this->filenameMD5); - $this->isSafeFile = '1'; - } - - public function markUnsafe() { - $db = self::getDB(); - $db->queryWrite("UPDATE " . wfDB::networkTable('wfFileMods') . " SET isSafeFile = '0' WHERE filenameMD5 = '%s'", $this->filenameMD5); - $this->isSafeFile = '0'; - } - - public function getDisplayPath() { - if (preg_match('#(^|/)..(/|$)#', $this->filename)) - return $this->realPath; - return $this->filename; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/lib/wordfenceURLHoover.php b/wp/wp-content/plugins/wordfence/lib/wordfenceURLHoover.php deleted file mode 100644 index 082f1fce..00000000 --- a/wp/wp-content/plugins/wordfence/lib/wordfenceURLHoover.php +++ /dev/null @@ -1,613 +0,0 @@ -<?php -require_once(dirname(__FILE__) . '/wfAPI.php'); -require_once(dirname(__FILE__) . '/wfArray.php'); -class wordfenceURLHoover { - private $debug = false; - public $errorMsg = false; - private $hostsToAdd = false; - private $table = ''; - private $apiKey = false; - private $wordpressVersion = false; - private $useDB = true; - private $hostKeys = array(); - private $hostList = array(); - public $currentHooverID = false; - private $_foundSome = false; - private $_excludedHosts = array(); - private $api = false; - private $db = false; - - public static function standardExcludedHosts() { - static $standardExcludedHosts = null; - if ($standardExcludedHosts !== null) { - return $standardExcludedHosts; - } - - global $wpdb; - $excludedHosts = array(); - if (is_multisite()) { - $blogIDs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}"); //Can't use wp_get_sites or get_sites because they return empty at 10k sites - foreach ($blogIDs as $id) { - $homeURL = get_home_url($id); - $host = parse_url($homeURL, PHP_URL_HOST); - if ($host) { - $excludedHosts[$host] = 1; - } - $siteURL = get_site_url($id); - $host = parse_url($siteURL, PHP_URL_HOST); - if ($host) { - $excludedHosts[$host] = 1; - } - } - } - else { - $homeURL = wfUtils::wpHomeURL(); - $host = parse_url($homeURL, PHP_URL_HOST); - if ($host) { - $excludedHosts[$host] = 1; - } - $siteURL = wfUtils::wpSiteURL(); - $host = parse_url($siteURL, PHP_URL_HOST); - if ($host) { - $excludedHosts[$host] = 1; - } - } - - $standardExcludedHosts = array_keys($excludedHosts); - return $standardExcludedHosts; - } - - public function __sleep() { - $this->writeHosts(); - return array('debug', 'errorMsg', 'table', 'apiKey', 'wordpressVersion'); - } - - public function __wakeup() { - $this->hostsToAdd = new wfArray(array('owner', 'host', 'path', 'hostKey')); - $this->api = new wfAPI($this->apiKey, $this->wordpressVersion); - $this->db = new wfDB(); - } - - public function __construct($apiKey, $wordpressVersion, $db = false, $continuation = false) { - $this->hostsToAdd = new wfArray(array('owner', 'host', 'path', 'hostKey')); - $this->apiKey = $apiKey; - $this->wordpressVersion = $wordpressVersion; - $this->api = new wfAPI($apiKey, $wordpressVersion); - if($db){ - $this->db = $db; - } else { - $this->db = new wfDB(); - } - global $wpdb; - if(isset($wpdb)){ - $this->table = wfDB::networkTable('wfHoover'); - } else { - $this->table = 'wp_wfHoover'; - } - - if (!$continuation) { - $this->cleanup(); - } - } - - public function cleanup() { - $this->db->truncate($this->table); - } - - public function hoover($id, $data, $excludedHosts = array()) { - $this->currentHooverID = $id; - $this->_foundSome = 0; - $this->_excludedHosts = $excludedHosts; - @preg_replace_callback('_((?:(?://)(?:\S+(?::\S*)?@)?(?:(?:(?:[a-z\xa1-\xff0-9.-]+)(?:\.(?:(?:xn--[a-z\xa1-\xff0-9-]+)|[a-z\xa1-\xff]{2,}))))(?::\d{2,5})?)(?:/[a-z0-9\-\_\.~\!\*\(\);\:@&\=\+\$,\?#\[\]%]*)*)_iS', array($this, 'captureURL'), $data); - $this->writeHosts(); - return $this->_foundSome; - } - - private function dbg($msg) { - if ($this->debug) { wordfence::status(4, 'info', $msg); } - } - - public function captureURL($matches) { - $id = $this->currentHooverID; - $url = 'http:' . $matches[0]; - if (!filter_var($url, FILTER_VALIDATE_URL)) { - return; - } - - $components = parse_url($url); - if (preg_match('/\.(xn--(?:[a-z0-9-]*)[a-z0-9]+|[a-z\xa1-\xff0-9]{2,})$/i', $components['host'], $tld)) { - $tld = strtolower($tld[1]); - if (strpos(wfConfig::get('tldlist', ''), '|' . $tld . '|') === false) { - return; - } - } - else { - return; - } - - foreach ($this->_excludedHosts as $h) { - if (strcasecmp($h, $components['host']) === 0) { - return; - } - } - - $this->_foundSome++; - - $host = (isset($components['host']) ? $components['host'] : ''); - $path = (isset($components['path']) && !empty($components['path']) ? $components['path'] : '/'); - $hashes = $this->_generateHashes($url); - foreach ($hashes as $h) { - $this->hostsToAdd->push(array('owner' => $id, 'host' => $host, 'path' => $path, 'hostKey' => wfUtils::substr($h, 0, 4))); - } - - if($this->hostsToAdd->size() > 1000){ $this->writeHosts(); } - } - - private function writeHosts() { - if ($this->hostsToAdd->size() < 1) { return; } - if ($this->useDB) { - $sql = "INSERT INTO " . $this->table . " (owner, host, path, hostKey) VALUES "; - while ($elem = $this->hostsToAdd->shift()) { - //This may be an issue for hyperDB or other abstraction layers, but leaving it for now. - $sql .= sprintf("('%s', '%s', '%s', '%s'),", - $this->db->realEscape($elem['owner']), - $this->db->realEscape($elem['host']), - $this->db->realEscape($elem['path']), - $this->db->realEscape($elem['hostKey']) - ); - } - $sql = rtrim($sql, ','); - $this->db->queryWrite($sql); - $this->hostsToAdd->collectGarbage(); - } - else { - while ($elem = $this->hostsToAdd->shift()) { - $keys = str_split($elem['hostKey'], 4); - foreach ($keys as $k) { - $this->hostKeys[] = $k; - } - $this->hostList[] = array( - 'owner' => $elem['owner'], - 'host' => $elem['host'], - 'path' => $elem['path'], - 'hostKey' => $elem['hostKey'] - ); - } - $this->hostsToAdd->collectGarbage(); - } - } - public function getBaddies() { - wordfence::status(4, 'info', __("Gathering host keys.", 'wordfence')); - $allHostKeys = ''; - if ($this->useDB) { - global $wpdb; - $dbh = $wpdb->dbh; - $useMySQLi = wfUtils::useMySQLi(); - if ($useMySQLi) { //If direct-access MySQLi is available, we use it to minimize the memory footprint instead of letting it fetch everything into an array first - wordfence::status(4, 'info', __("Using MySQLi directly.", 'wordfence')); - $result = $dbh->query("SELECT DISTINCT hostKey FROM {$this->table} ORDER BY hostKey ASC LIMIT 100000"); /* We limit to 100,000 prefixes since more than that cannot be reliably checked within the default max_execution_time */ - if (!is_object($result)) { - $this->errorMsg = "Unable to query database"; - $this->dbg($this->errorMsg); - return false; - } - while ($row = $result->fetch_assoc()) { - $allHostKeys .= $row['hostKey']; - } - } - else { - $q1 = $this->db->querySelect("SELECT DISTINCT hostKey FROM {$this->table} ORDER BY hostKey ASC LIMIT 100000"); /* We limit to 100,000 prefixes since more than that cannot be reliably checked within the default max_execution_time */ - foreach ($q1 as $hRec) { - $allHostKeys .= $hRec['hostKey']; - } - } - } - else { - $allHostKeys = implode('', array_values(array_unique($this->hostKeys))); - } - - /** - * Check hash prefixes first. Each one is a 4-byte binary prefix of a SHA-256 hash of the URL. The response will - * be a binary list of 4-byte indices; The full URL for each index should be sent in the secondary query to - * find the true good/bad status. - */ - - $allCount = wfUtils::strlen($allHostKeys) / 4; - if ($allCount > 0) { - if ($this->debug) { - $this->dbg("Checking {$allCount} hostkeys"); - for ($i = 0; $i < $allCount; $i++) { - $key = wfUtils::substr($allHostKeys, $i * 4, 4); - $this->dbg("Checking hostkey: " . bin2hex($key)); - } - } - - wordfence::status(2, 'info', sprintf(/* translators: Number of domains. */ __("Checking %d host keys against Wordfence scanning servers.", 'wordfence'), $allCount)); - $resp = $this->api->binCall('check_host_keys', $allHostKeys); - wordfence::status(2, 'info', __("Done host key check.", 'wordfence')); - $this->dbg("Done host key check"); - - $badHostKeys = ''; - if ($resp['code'] >= 200 && $resp['code'] <= 299) { - $this->dbg("Host key response: " . bin2hex($resp['data'])); - $dataLen = wfUtils::strlen($resp['data']); - if ($dataLen > 0 && $dataLen % 2 == 0) { - $this->dbg("Checking response indexes"); - for ($i = 0; $i < $dataLen; $i += 2) { - $idx = wfUtils::array_first(unpack('n', wfUtils::substr($resp['data'], $i, 2))); - $this->dbg("Checking index {$idx}"); - if ($idx < $allCount) { - $prefix = wfUtils::substr($allHostKeys, $idx * 4, 4); - $badHostKeys .= $prefix; - $this->dbg("Got bad hostkey for record: " . bin2hex($prefix)); - } - else { - $this->dbg("Bad allHostKeys index: {$idx}"); - $this->errorMsg = "Bad allHostKeys index: {$idx}"; - return false; - } - } - } - else if ($dataLen > 0) { - $this->errorMsg = "Invalid data length received from Wordfence server: " . $dataLen; - $this->dbg($this->errorMsg); - return false; - } - } - else { - $this->errorMsg = "Wordfence server responded with an error. HTTP code " . $resp['code'] . " and data: " . $resp['data']; - return false; - } - - $badCount = wfUtils::strlen($badHostKeys) / 4; - if ($badCount > 0) { - $urlsToCheck = array(); - $totalURLs = 0; - - //Reconcile flagged prefixes with their corresponding URLs - for ($i = 0; $i < $badCount; $i++) { - $prefix = wfUtils::substr($badHostKeys, $i * 4, 4); - - if ($this->useDB) { - /** - * Putting a 10000 limit in here for sites that have a huge number of items with the same URL - * that repeats. This is an edge case. But if the URLs are malicious then presumably the admin - * will fix the malicious URLs and on subsequent scans the items (owners) that are above the - * 10000 limit will appear. - */ - $q1 = $this->db->querySelect("SELECT DISTINCT owner, host, path FROM {$this->table} WHERE hostKey = %s LIMIT 10000", $prefix); - foreach ($q1 as $rec) { - $url = 'http://' . $rec['host'] . $rec['path']; - if (!isset($urlsToCheck[$rec['owner']])) { - $urlsToCheck[$rec['owner']] = array(); - } - if (!in_array($url, $urlsToCheck[$rec['owner']])) { - $urlsToCheck[$rec['owner']][] = $url; - $totalURLs++; - } - } - } - else { - foreach ($this->hostList as $rec) { - $pos = wfUtils::strpos($rec['hostKey'], $prefix); - if ($pos !== false && $pos % 4 == 0) { - $url = 'http://' . $rec['host'] . $rec['path']; - if (!isset($urlsToCheck[$rec['owner']])) { - $urlsToCheck[$rec['owner']] = array(); - } - if (!in_array($url, $urlsToCheck[$rec['owner']])) { - $urlsToCheck[$rec['owner']][] = $url; - $totalURLs++; - } - } - } - } - if ($totalURLs > 10000) { break; } - } - - if (count($urlsToCheck) > 0) { - wordfence::status(2, 'info', sprintf( - /* translators: 1. Number of URLs. 2. Number of files. */ - __('Checking %1$d URLs from %2$d sources.', 'wordfence'), - $totalURLs, - sizeof($urlsToCheck) - )); - $badURLs = $this->api->call('check_bad_urls', array(), array('toCheck' => json_encode($urlsToCheck))); - wordfence::status(2, 'info', __("Done URL check.", 'wordfence')); - $this->dbg("Done URL check"); - if (is_array($badURLs) && count($badURLs) > 0) { - $finalResults = array(); - foreach ($badURLs as $file => $badSiteList) { - if (!isset($finalResults[$file])) { - $finalResults[$file] = array(); - } - foreach ($badSiteList as $badSite) { - $finalResults[$file][] = array( - 'URL' => $badSite[0], - 'badList' => $badSite[1] - ); - } - } - $this->dbg("Confirmed " . count($badURLs) . " bad URLs"); - return $finalResults; - } - } - } - } - - return array(); - } - - protected function _generateHashes($url) { - //The GSB specification requires generating and sending hash prefixes for a number of additional similar URLs. See: https://developers.google.com/safe-browsing/v4/urls-hashing#suffixprefix-expressions - - $canonicalURL = $this->_canonicalizeURL($url); - - //Extract the scheme - $scheme = 'http'; - if (preg_match('~^([a-z]+[a-z0-9+\.\-]*)://(.*)$~i', $canonicalURL, $matches)) { - $scheme = strtolower($matches[1]); - $canonicalURL = $matches[2]; - } - - //Separate URL and query string - $query = ''; - if (preg_match('/^([^?]+)(\??.*)/', $canonicalURL, $matches)) { - $canonicalURL = $matches[1]; - $query = $matches[2]; - } - - //Separate host and path - $path = ''; - preg_match('~^(.*?)(?:(/.*)|$)~', $canonicalURL, $matches); - $host = $matches[1]; - if (isset($matches[2])) { - $path = $matches[2]; - } - - //Clean host - $host = $this->_normalizeHost($host); - - //Generate hosts list - $hosts = array(); - if (filter_var(trim($host, '[]'), FILTER_VALIDATE_IP)) { - $hosts[] = $host; - } - else { - $hostComponents = explode('.', $host); - - $numComponents = count($hostComponents) - 7; - if ($numComponents < 1) { - $numComponents = 1; - } - - $hosts[] = $host; - for ($i = $numComponents; $i < count($hostComponents) - 1; $i++) { - $hosts[] = implode('.', array_slice($hostComponents, $i)); - } - } - - //Generate paths list - $paths = array('/'); - $pathComponents = array_filter(explode('/', $path)); - - $numComponents = min(count($pathComponents), 4); - for ($i = 1; $i < $numComponents; $i++) { - $paths[] = '/' . implode('/', array_slice($pathComponents, 0, $i)) . '/'; - } - if ($path != '/') { - $paths[] = $path; - } - if (strlen($query) > 0) { - $paths[] = $path . '?' . $query; - } - $paths = array_reverse($paths); //So we start at the most specific and move to most generic - - //Generate hashes - $hashes = array(); - foreach ($hosts as $h) { - $hashes[$h] = hash('sha256', $h, true); //WFSB compatibility -- it uses hashes without the path - foreach ($paths as $p) { - $key = $h . $p; - $hashes[$key] = hash('sha256', $key, true); - break; //We no longer have any use for the extra path variants, so just include the primary one and exit the loop after - } - } - - return $hashes; - } - - protected function _canonicalizeURL($url) { //Based on https://developers.google.com/safe-browsing/v4/urls-hashing#canonicalization and Google's reference implementation https://github.com/google/safebrowsing/blob/master/urls.go - //Strip fragment - $url = $this->_array_first(explode('#', $url)); - - //Trim space - $url = trim($url); - - //Remove tabs, CR, LF - $url = preg_replace('/[\t\n\r]/', '', $url); - - //Normalize escapes - $url = $this->_normalizeEscape($url); - if ($url === false) { return false; } - - //Extract the scheme - $scheme = 'http'; - if (preg_match('~^([a-z]+[a-z0-9+\.\-]*)://(.*)$~i', $url, $matches)) { - $scheme = strtolower($matches[1]); - $url = $matches[2]; - } - - //Separate URL and query string - $query = ''; - if (preg_match('/^([^?]+)(\??.*)/', $url, $matches)) { - $url = $matches[1]; - $query = $matches[2]; - } - $endsWithSlash = substr($url, -1) == '/'; - - //Separate host and path - $path = ''; - preg_match('~^(.*?)(?:(/.*)|$)~', $url, $matches); - $host = $matches[1]; - if (isset($matches[2])) { - $path = $matches[2]; - } - - //Clean host - $host = $this->_normalizeHost($host); - if ($host === false) { return false; } - - //Clean path - $path = preg_replace('~//+~', '/', $path); //Multiple slashes -> single slash - $path = preg_replace('~(?:^|/)\.(?:$|/)~', '/', $path); //. path components removed - while (preg_match('~/(?!\.\./)[^/]+/\.\.(?:$|/)~', $path)) { //Resolve .. - $path = preg_replace('~/(?!\.\./)[^/]+/\.\.(?:$|/)~', '/', $path, 1); - } - $path = preg_replace('~(?:^|/)\.\.(?:$|/)~', '/', $path); //Eliminate .. at the beginning - $path = trim($path, '.'); - $path = preg_replace('/\.\.+/', '.', $path); - - if ($path == '.' || $path == '') { - $path = '/'; - } - else if ($endsWithSlash && substr($path, -1) != '/') { - $path .= '/'; - } - - return $scheme . '://' . $host . $path . $query; - } - - protected function _normalizeEscape($url) { - $maxDepth = 1024; - $i = 0; - while (preg_match('/%([0-9a-f]{2})/i', $url)) { - $url = preg_replace_callback('/%([0-9a-f]{2})/i', array($this, '_hex2binCallback'), $url); - $i++; - - if ($i > $maxDepth) { - return false; - } - } - - return preg_replace_callback('/[\x00-\x20\x7f-\xff#%]/', array($this, '_bin2hexCallback'), $url); - } - - protected function _hex2binCallback($matches) { - return wfUtils::hex2bin($matches[1]); - } - - protected function _bin2hexCallback($matches) { - return '%' . bin2hex($matches[0]); - } - - protected function _normalizeHost($host) { - //Strip username:password - $host = $this->_array_last(explode('@', $host)); - - //IPv6 literal - if (substr($host, 0, 1) == '[') { - if (strpos($host, ']') === false) { //No closing bracket - return false; - } - } - - //Strip port - $host = preg_replace('/:\d+$/', '', $host); - - //Unicode to IDNA - $u = rawurldecode($host); - if (preg_match('/[\x81-\xff]/', $u)) { //0x80 is technically Unicode, but the GSB canonicalization doesn't consider it one - if (function_exists('idn_to_ascii')) { //Some PHP versions don't have this and we don't have a polyfill - $host = idn_to_ascii($u); - } - } - - //Remove extra dots - $host = trim($host, '.'); - $host = preg_replace('/\.\.+/', '.', $host); - - //Canonicalize IP addresses - if ($iphost = $this->_parseIP($host)) { - return $iphost; - } - - return strtolower($host); - } - - protected function _parseIP($host) { - // The Windows resolver allows a 4-part dotted decimal IP address to have a - // space followed by any old rubbish, so long as the total length of the - // string doesn't get above 15 characters. So, "10.192.95.89 xy" is - // resolved to 10.192.95.89. If the string length is greater than 15 - // characters, e.g. "10.192.95.89 xy.wildcard.example.com", it will be - // resolved through DNS. - if (strlen($host) <= 15) { - $host = $this->_array_first(explode(' ', $host)); - } - - if (!preg_match('/^((?:0x[0-9a-f]+|[0-9\.])+)$/i', $host)) { - return false; - } - - $parts = explode('.', $host); - if (count($parts) > 4) { - return false; - } - - $strings = array(); - foreach ($parts as $i => $p) { - if ($i == count($parts) - 1) { - $strings[] = $this->_canonicalNum($p, 5 - count($parts)); - } - else { - $strings[] = $this->_canonicalNum($p, 1); - } - - if ($strings[$i] == '') { - return ''; - } - } - - return implode('.', $strings); - } - - protected function _canonicalNum($part, $n) { - if ($n <= 0 || $n > 4) { - return ''; - } - - if (preg_match('/^0x(\d+)$/i', $part, $matches)) { //hex - $part = hexdec($matches[1]); - } - else if (preg_match('/^0(\d+)$/i', $part, $matches)) { //octal - $part = octdec($matches[1]); - } - else { - $part = (int) $part; - } - - $strings = array_fill(0, $n, ''); - for ($i = $n - 1; $i >= 0; $i--) { - $strings[$i] = (string) ($part & 0xff); - $part = $part >> 8; - } - return implode('.', $strings); - } - - protected function _array_first($array) { - if (empty($array)) { - return null; - } - - return $array[0]; - } - - protected function _array_last($array) { - if (empty($array)) { - return null; - } - - return $array[count($array) - 1]; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/license.txt b/wp/wp-content/plugins/wordfence/license.txt deleted file mode 100644 index f288702d..00000000 --- a/wp/wp-content/plugins/wordfence/license.txt +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<https://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/wp/wp-content/plugins/wordfence/models/.htaccess b/wp/wp-content/plugins/wordfence/models/.htaccess deleted file mode 100644 index 1fc312f9..00000000 --- a/wp/wp-content/plugins/wordfence/models/.htaccess +++ /dev/null @@ -1,16 +0,0 @@ -<IfModule mod_rewrite.c> - RewriteEngine On - RewriteCond %{REQUEST_URI} \.php$ - RewriteRule .* - [F,L,NC] -</IfModule> -<IfModule !mod_rewrite.c> - <FilesMatch "\.php$"> - <IfModule mod_authz_core.c> - Require all denied - </IfModule> - <IfModule !mod_authz_core.c> - Order deny,allow - Deny from all - </IfModule> - </FilesMatch> -</IfModule> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/models/block/wfBlock.php b/wp/wp-content/plugins/wordfence/models/block/wfBlock.php deleted file mode 100644 index f1e7eeb3..00000000 --- a/wp/wp-content/plugins/wordfence/models/block/wfBlock.php +++ /dev/null @@ -1,1481 +0,0 @@ -<?php - -/** - * Represents an individual block definition. - * - * @property int $id - * @property int $type One of the TYPE_* constants. - * @property string $ip The human-readable version of the IP if applicable for the block type. - * @property int $blockedTime The timestamp the block was created. - * @property string $reason Description of the block. - * @property int $lastAttempt Timestamp of the last request blocked. If never, this will be 0. - * @property int $blockedHits Count of the number of hits blocked. - * @property int $expiration Timestamp when the block will expire. If never, this will be 0. - * @property mixed $parameters Variable parameters defining the block (e.g., the matchers for a pattern block). - * - * @property bool $blockLogin For wfBlock::TYPE_COUNTRY only, this is whether or not to block hits to the login page. - * @property bool $blockSite For wfBlock::TYPE_COUNTRY only, this is whether or not to block hits to the rest of the site. - * @property array $countries For wfBlock::TYPE_COUNTRY only, this is the list of countries to block. - * - * @property mixed $ipRange For wfBlock::TYPE_PATTERN only, this is the matching IP range if set. - * @property mixed $hostname For wfBlock::TYPE_PATTERN only, this is the hostname pattern if set. - * @property mixed $userAgent For wfBlock::TYPE_PATTERN only, this is the user agent pattern if set. - * @property mixed $referrer For wfBlock::TYPE_PATTERN only, this is the HTTP referrer pattern if set. - */ -class wfBlock { - //Constants for block record types - const TYPE_IP_MANUAL = 1; //Same behavior as TYPE_IP_AUTOMATIC_PERMANENT - the reason will be overridden for public display - const TYPE_WFSN_TEMPORARY = 2; - const TYPE_COUNTRY = 3; - const TYPE_PATTERN = 4; - const TYPE_RATE_BLOCK = 5; - const TYPE_RATE_THROTTLE = 6; - const TYPE_LOCKOUT = 7; //Blocks login-related actions only - const TYPE_IP_AUTOMATIC_TEMPORARY = 8; //Automatic block, still temporary - const TYPE_IP_AUTOMATIC_PERMANENT = 9; //Automatic block, started as temporary but now permanent as a result of admin action - - //Constants to identify the match type of a block record - const MATCH_NONE = 0; - const MATCH_IP = 1; - const MATCH_COUNTRY_BLOCK = 2; - const MATCH_COUNTRY_REDIR = 3; - const MATCH_COUNTRY_REDIR_BYPASS = 4; - const MATCH_PATTERN = 5; - - //Duration constants - const DURATION_FOREVER = 0; - - //Constants defining the placeholder IPs for non-IP block records - const MARKER_COUNTRY = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xc0\x00\x02\x01";// 192.0.2.1 TEST-NET-1 - const MARKER_PATTERN = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xc0\x00\x02\x02";// 192.0.2.2 TEST-NET-1 - - private $_id; - private $_type = false; - private $_ip = false; - private $_blockedTime = false; - private $_reason = false; - private $_lastAttempt = false; - private $_blockedHits = false; - private $_expiration = false; - private $_parameters = false; - - /** - * Returns the name of the storage table for the blocks. - * - * @return string - */ - public static function blocksTable() { - return wfDB::networkTable('wfBlocks7'); - } - - /** - * Returns a user-displayable name for the corresponding type constant. - * - * @param int $type - * @return string - */ - public static function nameForType($type) { - switch ($type) { - case self::TYPE_IP_MANUAL: - case self::TYPE_IP_AUTOMATIC_TEMPORARY: - case self::TYPE_IP_AUTOMATIC_PERMANENT: - case self::TYPE_WFSN_TEMPORARY: - case self::TYPE_RATE_BLOCK: - return __('IP Block', 'wordfence'); - case self::TYPE_RATE_THROTTLE: - return __('IP Throttled', 'wordfence'); - case self::TYPE_LOCKOUT: - return __('Lockout', 'wordfence'); - case self::TYPE_COUNTRY: - return __('Country Block', 'wordfence'); - case self::TYPE_PATTERN: - return __('Advanced Block', 'wordfence'); - } - - return __('Unknown', 'wordfence'); - } - - /** - * Returns the number of seconds for a temporary block to last by default. - * - * @return int - */ - public static function blockDuration() { - return (int) wfConfig::get('blockedTime'); - } - - /** - * Returns the number of seconds for a rate limit throttle to last by default. - * - * @return int - */ - public static function rateLimitThrottleDuration() { - return 60; - } - - /** - * Returns the number of seconds for a lockout to last by default. - * - * @return int - */ - public static function lockoutDuration() { - return (int) wfConfig::get('loginSec_lockoutMins') * 60; - } - - /** - * @param string $IP Should be in dot or colon notation (127.0.0.1 or ::1) - * @param bool $forcedWhitelistEntry If provided, returns whether or not the IP is on a forced whitelist (i.e., it's not one the user can delete). - * @return bool - */ - public static function isWhitelisted($IP, &$forcedWhitelistEntry = null) { - if ($forcedWhitelistEntry !== null) { - $forcedWhitelistEntry = false; - } - - if ( - (defined('DOING_CRON') && DOING_CRON) || //Safe - (defined('WORDFENCE_SYNCING_ATTACK_DATA') && WORDFENCE_SYNCING_ATTACK_DATA) //Safe as long as it will actually run since it then exits - ) { - $serverIPs = wfUtils::serverIPs(); - foreach ($serverIPs as $testIP) { - if (wfUtils::inet_pton($IP) == wfUtils::inet_pton($testIP)) { - if ($forcedWhitelistEntry !== null) { - $forcedWhitelistEntry = true; - } - - return true; - } - } - } - - foreach (wfUtils::getIPWhitelist() as $subnet) { - if ($subnet instanceof wfUserIPRange) { - if ($subnet->isIPInRange($IP)) { - return true; - } - } elseif (wfUtils::subnetContainsIP($subnet, $IP)) { - if ($forcedWhitelistEntry !== null) { - $forcedWhitelistEntry = true; - } - return true; - } - } - - return false; - } - - /** - * Validates the payload for block creation. Returns true if valid, otherwise it'll return the first error found. - * - * @param $payload - * @return bool|string - */ - public static function validate($payload) { - if (!isset($payload['type']) || array_search($payload['type'], array('ip-address', 'country', 'custom-pattern')) === false) { return __('Invalid block type.', 'wordfence'); } - if (!isset($payload['duration']) || intval($payload['duration']) < 0) { return __('Invalid block duration.', 'wordfence'); } - if (!isset($payload['reason']) || empty($payload['reason'])) { return __('A block reason must be provided.', 'wordfence'); } - - if ($payload['type'] == 'ip-address') { - if (!isset($payload['ip']) || !filter_var(trim($payload['ip']), FILTER_VALIDATE_IP) || @wfUtils::inet_pton(trim($payload['ip'])) === false) { return __('Invalid IP address.', 'wordfence'); } - if (self::isWhitelisted(trim($payload['ip']))) { return wp_kses(sprintf(/* translators: Support URL */ __('This IP address is in a range of addresses that Wordfence does not block. The IP range may be internal or belong to a service that is always allowed. Allowlisting of external services can be disabled. <a href="%s" target="_blank" rel="noopener noreferrer">Learn More<span class="screen-reader-text"> (opens in new tab)</span></a>', 'wordfence'), wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_WHITELISTED_SERVICES)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()), 'span'=>array('class'=>array()))); } - } - else if ($payload['type'] == 'country') { - if (!isset($payload['blockLogin']) || !isset($payload['blockSite'])) { return __('Nothing selected to block.', 'wordfence'); } - if (!$payload['blockLogin'] && !$payload['blockSite']) { return __('Nothing selected to block.', 'wordfence'); } - if (!isset($payload['countries']) || empty($payload['countries']) || !is_array($payload['countries'])) { return __('No countries selected.', 'wordfence'); } - - require(WORDFENCE_PATH . 'lib/wfBulkCountries.php'); /** @var array $wfBulkCountries */ - foreach ($payload['countries'] as $code) { - if (!isset($wfBulkCountries[$code])) { - return __('An invalid country was selected.', 'wordfence'); - } - } - } - else if ($payload['type'] == 'custom-pattern') { - $hasOne = false; - if (isset($payload['ipRange']) && !empty($payload['ipRange'])) { - $ipRange = new wfUserIPRange($payload['ipRange']); - if ($ipRange->isValidRange()) { - if ($ipRange->isMixedRange()) { - return __('Ranges mixing IPv4 and IPv6 addresses are not supported.', 'wordfence'); - } - - $hasOne = true; - } - else { - return __('Invalid IP range.', 'wordfence'); - } - } - if (isset($payload['hostname']) && !empty($payload['hostname'])) { - if (preg_match('/^[a-z0-9\.\*\-]+$/i', $payload['hostname'])) { - $hasOne = true; - } - else { - return __('Invalid hostname.', 'wordfence'); - } - } - if (isset($payload['userAgent']) && !empty($payload['userAgent'])) { $hasOne = true; } - if (isset($payload['referrer']) && !empty($payload['referrer'])) { $hasOne = true; } - if (!$hasOne) { return __('No block parameters provided.', 'wordfence'); } - } - - return true; - } - - /** - * Creates the block. The $payload value is expected to have been validated prior to calling this. - * - * @param $payload - */ - public static function create($payload) { - $type = $payload['type']; - $duration = max((int) $payload['duration'], 0); - $reason = $payload['reason']; - - if ($type == 'ip-address') { - $ip = trim($payload['ip']); - wfBlock::createIP($reason, $ip, $duration); - } - else if ($type == 'country') { - $blockLogin = !!$payload['blockLogin']; - $blockSite = !!$payload['blockSite']; - $countries = array_unique($payload['countries']); - wfBlock::createCountry($reason, $blockLogin, $blockSite, $countries, $duration); - } - else if ($type == 'custom-pattern') { - $ipRange = ''; - if (isset($payload['ipRange']) && !empty($payload['ipRange'])) { - $ipRange = new wfUserIPRange($payload['ipRange']); - $ipRange = $ipRange->getIPString(); - } - $hostname = (isset($payload['hostname']) && !empty($payload['hostname'])) ? $payload['hostname'] : ''; - $userAgent = (isset($payload['userAgent']) && !empty($payload['userAgent'])) ? $payload['userAgent'] : ''; - $referrer = (isset($payload['referrer']) && !empty($payload['referrer'])) ? $payload['referrer'] : ''; - wfBlock::createPattern($reason, $ipRange, $hostname, $userAgent, $referrer, $duration); - } - } - - /** - * Creates an IP block if one doesn't already exist for the given IP. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $ip - * @param int $duration Optional. Defaults to forever. This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createIP($reason, $ip, $duration = self::DURATION_FOREVER, $blockedTime = false, $lastAttempt = false, $blockedHits = false, $type = self::TYPE_IP_MANUAL) { - global $wpdb; - - if (self::isWhitelisted($ip)) { return; } - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $blocksTable = wfBlock::blocksTable(); - $hasExisting = $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `reason` = %s, `expiration` = %d WHERE `expiration` > UNIX_TIMESTAMP() AND `type` = %d AND `IP` = %s", $reason, ($duration ? $blockedTime + $duration : $duration), $type, wfUtils::inet_pton($ip))); - if (!$hasExisting) { - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, NULL)", $type, wfUtils::inet_pton($ip), $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration))); - - wfConfig::inc('totalIPsBlocked'); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Creates an IP block for a WFSN response if one doesn't already exist for the given IP. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $ip - * @param int $duration This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createWFSN($reason, $ip, $duration, $blockedTime = false, $lastAttempt = false, $blockedHits = false) { - global $wpdb; - - if (self::isWhitelisted($ip)) { return; } - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $blocksTable = wfBlock::blocksTable(); - $hasExisting = $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `reason` = %s, `expiration` = %d WHERE `expiration` > UNIX_TIMESTAMP() AND `type` = %d AND `IP` = %s", $reason, ($duration ? $blockedTime + $duration : $duration), self::TYPE_WFSN_TEMPORARY, wfUtils::inet_pton($ip))); - if (!$hasExisting) { - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, NULL)", self::TYPE_WFSN_TEMPORARY, wfUtils::inet_pton($ip), $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration))); - - wfConfig::inc('totalIPsBlocked'); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Creates an IP block for a rate limit if one doesn't already exist for the given IP. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $ip - * @param int $duration This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createRateBlock($reason, $ip, $duration, $blockedTime = false, $lastAttempt = false, $blockedHits = false) { - global $wpdb; - - if (self::isWhitelisted($ip)) { return; } - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $blocksTable = wfBlock::blocksTable(); - $hasExisting = $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `reason` = %s, `expiration` = %d WHERE `expiration` > UNIX_TIMESTAMP() AND `type` = %d AND `IP` = %s", $reason, ($duration ? $blockedTime + $duration : $duration), self::TYPE_RATE_BLOCK, wfUtils::inet_pton($ip))); - if (!$hasExisting) { - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, NULL)", self::TYPE_RATE_BLOCK, wfUtils::inet_pton($ip), $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration))); - - wfConfig::inc('totalIPsBlocked'); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Creates an IP throttle for a rate limit if one doesn't already exist for the given IP. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $ip - * @param int $duration This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createRateThrottle($reason, $ip, $duration, $blockedTime = false, $lastAttempt = false, $blockedHits = false) { - global $wpdb; - - if (self::isWhitelisted($ip)) { return; } - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $blocksTable = wfBlock::blocksTable(); - $hasExisting = $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `reason` = %s, `expiration` = %d WHERE `expiration` > UNIX_TIMESTAMP() AND `type` = %d AND `IP` = %s", $reason, ($duration ? $blockedTime + $duration : $duration), self::TYPE_RATE_THROTTLE, wfUtils::inet_pton($ip))); - if (!$hasExisting) { - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, NULL)", self::TYPE_RATE_THROTTLE, wfUtils::inet_pton($ip), $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration))); - - wfConfig::inc('totalIPsBlocked'); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Creates a lockout if one doesn't already exist for the given IP. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $ip - * @param int $duration This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createLockout($reason, $ip, $duration, $blockedTime = false, $lastAttempt = false, $blockedHits = false) { - global $wpdb; - - if (self::isWhitelisted($ip)) { return; } - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $blocksTable = wfBlock::blocksTable(); - $hasExisting = $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `reason` = %s, `expiration` = %d WHERE `expiration` > UNIX_TIMESTAMP() AND `type` = %d AND `IP` = %s", $reason, ($duration ? $blockedTime + $duration : $duration), self::TYPE_LOCKOUT, wfUtils::inet_pton($ip))); - if (!$hasExisting) { - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, NULL)", self::TYPE_LOCKOUT, wfUtils::inet_pton($ip), $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration))); - - wfConfig::inc('totalIPsLocked'); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Creates a country block. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $blockLogin - * @param string $blockSite - * @param string $countries - * @param int $duration Optional. Defaults to forever. This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createCountry($reason, $blockLogin, $blockSite, $countries, $duration = self::DURATION_FOREVER, $blockedTime = false, $lastAttempt = false, $blockedHits = false) { - global $wpdb; - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $parameters = array( - 'blockLogin' => $blockLogin ? 1 : 0, - 'blockSite' => $blockSite ? 1 : 0, - 'countries' => $countries, - ); - - $blocksTable = wfBlock::blocksTable(); - $existing = $wpdb->get_var($wpdb->prepare("SELECT `id` FROM `{$blocksTable}` WHERE `type` = %d LIMIT 1", self::TYPE_COUNTRY)); - if ($existing) { - $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `reason` = %s, `parameters` = %s WHERE `id` = %d", $reason, json_encode($parameters), $existing)); - } - else { - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, %s)", self::TYPE_COUNTRY, self::MARKER_COUNTRY, $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration), json_encode($parameters))); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Creates a pattern block. The parameters are expected to have been validated and sanitized prior to calling this. - * - * @param string $reason - * @param string $ipRange - * @param string $hostname - * @param string $userAgent - * @param string $referrer - * @param int $duration Optional. Defaults to forever. This is the number of seconds for the block to last. - * @param bool|int $blockedTime Optional. Defaults to the current timestamp. - * @param bool|int $lastAttempt Optional. Defaults to 0, which means never. - * @param bool|int $blockedHits Optional. Defaults to 0. - */ - public static function createPattern($reason, $ipRange, $hostname, $userAgent, $referrer, $duration = self::DURATION_FOREVER, $blockedTime = false, $lastAttempt = false, $blockedHits = false) { - global $wpdb; - - if ($blockedTime === false) { - $blockedTime = time(); - } - - $parameters = array( - 'ipRange' => $ipRange, - 'hostname' => $hostname, - 'userAgent' => $userAgent, - 'referrer' => $referrer, - ); - - $blocksTable = wfBlock::blocksTable(); - $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, %s)", self::TYPE_PATTERN, self::MARKER_PATTERN, $blockedTime, $reason, (int) $lastAttempt, (int) $blockedHits, ($duration ? $blockedTime + $duration : $duration), json_encode($parameters))); - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Removes all expired blocks. - */ - public static function vacuum() { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query("DELETE FROM `{$blocksTable}` WHERE `expiration` <= UNIX_TIMESTAMP() AND `expiration` != " . self::DURATION_FOREVER); - } - - /** - * Imports all valid blocks in $blocks. If $replaceExisting is true, this will remove all permanent blocks prior to the import. - * - * @param array $blocks - * @param bool $replaceExisting - */ - public static function importBlocks($blocks, $replaceExisting = true) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - - if ($replaceExisting) { - $wpdb->query("DELETE FROM `{$blocksTable}` WHERE `expiration` = " . self::DURATION_FOREVER); - } - - foreach ($blocks as $b) { - self::_importBlock($b); - } - - if (!WFWAF_SUBDIRECTORY_INSTALL && class_exists('wfWAFIPBlocksController')) { - wfWAFIPBlocksController::setNeedsSynchronizeConfigSettings(); - } - } - - /** - * Validates the block import record and inserts it if valid. This validation is identical to what is applied to adding one through the UI. - * - * @param array $b - * @return bool - */ - private static function _importBlock($b) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - - if (!isset($b['type']) || !isset($b['IP']) || !isset($b['blockedTime']) || !isset($b['reason']) || !isset($b['lastAttempt']) || !isset($b['blockedHits'])) { return false; } - if (empty($b['IP']) || empty($b['reason'])) { return false; } - - $ip = @wfUtils::inet_ntop(wfUtils::hex2bin($b['IP'])); - if (!wfUtils::isValidIP($ip)) { return false; } - - switch ($b['type']) { - case self::TYPE_IP_MANUAL: - case self::TYPE_IP_AUTOMATIC_TEMPORARY: - case self::TYPE_IP_AUTOMATIC_PERMANENT: - case self::TYPE_WFSN_TEMPORARY: - case self::TYPE_RATE_BLOCK: - case self::TYPE_RATE_THROTTLE: - case self::TYPE_LOCKOUT: - if (self::isWhitelisted($ip)) { return false; } - - return $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, NULL)", (int) $b['type'], wfUtils::inet_pton($ip), (int) $b['blockedTime'], $b['reason'], (int) $b['lastAttempt'], (int) $b['blockedHits'], self::DURATION_FOREVER)) !== false; - case self::TYPE_COUNTRY: - if (!isset($b['parameters'])) { return false; } - if (wfUtils::inet_pton($ip) != self::MARKER_COUNTRY) { return false; } - $parameters = @json_decode($b['parameters'], true); - if (!isset($parameters['blockLogin']) || !isset($parameters['blockSite']) || !isset($parameters['countries'])) { return false; } - $parameters['blockLogin'] = wfUtils::truthyToInt($parameters['blockLogin']); - $parameters['blockSite'] = wfUtils::truthyToInt($parameters['blockSite']); - - require(WORDFENCE_PATH . 'lib/wfBulkCountries.php'); /** @var array $wfBulkCountries */ - foreach ($parameters['countries'] as $code) { - if (!isset($wfBulkCountries[$code])) { - return false; - } - } - - $parameters = array('blockLogin' => $parameters['blockLogin'], 'blockSite' => $parameters['blockSite'], 'countries' => $parameters['countries']); - - return $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, %s)", self::TYPE_COUNTRY, self::MARKER_COUNTRY, (int) $b['blockedTime'], $b['reason'], (int) $b['lastAttempt'], (int) $b['blockedHits'], self::DURATION_FOREVER, json_encode($parameters))) !== false; - case self::TYPE_PATTERN: - if (!isset($b['parameters'])) { return false; } - if (wfUtils::inet_pton($ip) != self::MARKER_PATTERN) { return false; } - $parameters = @json_decode($b['parameters'], true); - if (!isset($parameters['ipRange']) || !isset($parameters['hostname']) || !isset($parameters['userAgent']) || !isset($parameters['referrer'])) { return false; } - - $hasOne = false; - if (!empty($parameters['ipRange'])) { - $ipRange = new wfUserIPRange($parameters['ipRange']); - if ($ipRange->isValidRange()) { - if ($ipRange->isMixedRange()) { - return false; - } - - $hasOne = true; - } - else { - return false; - } - } - if (!empty($parameters['hostname'])) { - if (preg_match('/^[a-z0-9\.\*\-]+$/i', $parameters['hostname'])) { - $hasOne = true; - } - else { - return false; - } - } - if (!empty($parameters['userAgent'])) { $hasOne = true; } - if (!empty($parameters['referrer'])) { $hasOne = true; } - if (!$hasOne) { return false; } - - $ipRange = ''; - if (!empty($parameters['ipRange'])) { - $ipRange = new wfUserIPRange($parameters['ipRange']); - $ipRange = $ipRange->getIPString(); - } - $parameters = array( - 'ipRange' => $ipRange, - 'hostname' => $parameters['hostname'], - 'userAgent' => $parameters['userAgent'], - 'referrer' => $parameters['referrer'], - ); - - return $wpdb->query($wpdb->prepare("INSERT INTO `{$blocksTable}` (`type`, `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `expiration`, `parameters`) VALUES (%d, %s, %d, %s, %d, %d, %d, %s)", self::TYPE_PATTERN, self::MARKER_PATTERN, (int) $b['blockedTime'], $b['reason'], (int) $b['lastAttempt'], (int) $b['blockedHits'], self::DURATION_FOREVER, json_encode($parameters))) !== false; - } - - return false; - } - - /** - * Returns an array suitable for JSON output of all permanent blocks. - * - * @return array - */ - public static function exportBlocks() { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $query = "SELECT `type`, HEX(`IP`) AS `IP`, `blockedTime`, `reason`, `lastAttempt`, `blockedHits`, `parameters` FROM `{$blocksTable}` WHERE `expiration` = " . self::DURATION_FOREVER; - $rows = $wpdb->get_results($query, ARRAY_A); - return $rows; - } - - /** - * Returns all unexpired blocks (including lockouts by default), optionally only of the specified types. These are sorted descending by the time created. - * - * @param bool $prefetch If true, the full data for the block is fetched rather than using lazy loading. - * @param array $ofTypes An optional array of block types to restrict the returned array of blocks to. - * @param int $offset The offset to start the result fetch at. - * @param int $limit The maximum number of results to return. -1 for all. - * @param string $sortColumn The column to sort by. - * @param string $sortDirection The direction to sort. - * @param string $filter An optional value to filter by. - * @return wfBlock[] - */ - public static function allBlocks($prefetch = false, $ofTypes = array(), $offset = 0, $limit = -1, $sortColumn = 'type', $sortDirection = 'ascending', $filter = '') { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $columns = '`id`'; - if ($prefetch) { - $columns = '*'; - } - - $sort = 'typeSort'; - switch ($sortColumn) { //Match the display table column to the corresponding schema column - case 'type': - //Use default; - break; - case 'detail': - $sort = 'detailSort'; - break; - case 'ruleAdded': - $sort = 'blockedTime'; - break; - case 'reason': - $sort = 'reason'; - break; - case 'expiration': - $sort = 'expiration'; - break; - case 'blockCount': - $sort = 'blockedHits'; - break; - case 'lastAttempt': - $sort = 'lastAttempt'; - break; - } - - $order = 'ASC'; - if ($sortDirection == 'descending') { - $order = 'DESC'; - } - - $query = "SELECT {$columns}, CASE -WHEN `type` = " . self::TYPE_COUNTRY . " THEN 0 -WHEN `type` = " . self::TYPE_PATTERN . " THEN 1 -WHEN `type` = " . self::TYPE_LOCKOUT . " THEN 2 -WHEN `type` = " . self::TYPE_RATE_THROTTLE . " THEN 3 -WHEN `type` = " . self::TYPE_RATE_BLOCK . " THEN 4 -WHEN `type` = " . self::TYPE_IP_AUTOMATIC_PERMANENT . " THEN 5 -WHEN `type` = " . self::TYPE_IP_AUTOMATIC_TEMPORARY . " THEN 6 -WHEN `type` = " . self::TYPE_WFSN_TEMPORARY . " THEN 7 -WHEN `type` = " . self::TYPE_IP_MANUAL . " THEN 8 -ELSE 9999 -END AS `typeSort`, CASE -WHEN `type` = " . self::TYPE_COUNTRY . " THEN `parameters` -WHEN `type` = " . self::TYPE_PATTERN . " THEN `parameters` -WHEN `type` = " . self::TYPE_IP_MANUAL . " THEN `IP` -WHEN `type` = " . self::TYPE_IP_AUTOMATIC_PERMANENT . " THEN `IP` -WHEN `type` = " . self::TYPE_RATE_BLOCK . " THEN `IP` -WHEN `type` = " . self::TYPE_RATE_THROTTLE . " THEN `IP` -WHEN `type` = " . self::TYPE_LOCKOUT . " THEN `IP` -WHEN `type` = " . self::TYPE_WFSN_TEMPORARY . " THEN `IP` -WHEN `type` = " . self::TYPE_IP_AUTOMATIC_TEMPORARY . " THEN `IP` -ELSE 9999 -END AS `detailSort` - FROM `{$blocksTable}` WHERE "; - if (!empty($ofTypes)) { - $sanitizedTypes = array_map('intval', $ofTypes); - $query .= "`type` IN (" . implode(', ', $sanitizedTypes) . ') AND '; - } - $query .= '(`expiration` = ' . self::DURATION_FOREVER . " OR `expiration` > UNIX_TIMESTAMP()) ORDER BY `{$sort}` {$order}, `id` DESC"; - - if ($limit > -1) { - $offset = (int) $offset; - $limit = (int) $limit; - $query .= " LIMIT {$offset},{$limit}"; - } - - $rows = $wpdb->get_results($query, ARRAY_A); - $result = array(); - foreach ($rows as $r) { - if ($prefetch) { - if ($r['type'] == self::TYPE_COUNTRY || $r['type'] == self::TYPE_PATTERN) { - $ip = null; - } - else { - $ip = wfUtils::inet_ntop($r['IP']); - } - - $parameters = null; - if ($r['type'] == self::TYPE_PATTERN || $r['type'] == self::TYPE_COUNTRY) { - $parameters = @json_decode($r['parameters'], true); - } - - $result[] = new wfBlock($r['id'], $r['type'], $ip, $r['blockedTime'], $r['reason'], $r['lastAttempt'], $r['blockedHits'], $r['expiration'], $parameters); - } - else { - $result[] = new wfBlock($r['id']); - } - } - - return $result; - } - - /** - * Functions identically to wfBlock::allBlocks except that it filters the result. The filtering is done within PHP rather than MySQL, so this will impose a performance penalty and should only - * be used when filtering is actually wanted. - * - * @param bool $prefetch - * @param array $ofTypes - * @param int $offset - * @param int $limit - * @param string $sortColumn - * @param string $sortDirection - * @param string $filter - * @return wfBlock[] - */ - public static function filteredBlocks($prefetch = false, $ofTypes = array(), $offset = 0, $limit = -1, $sortColumn = 'type', $sortDirection = 'ascending', $filter = '') { - $filter = trim($filter); - $matchType = ''; - $matchValue = ''; - if (empty($filter)) { - return self::allBlocks($prefetch, $ofTypes, $offset, $limit, $sortColumn, $sortDirection); - } - else if (wfUtils::isValidIP($filter)) { //e.g., 4.5.6.7, ffe0::, ::0 - $matchType = 'ip'; - $matchValue = wfUtils::inet_ntop(wfUtils::inet_pton($filter)); - } - - if (empty($matchType) && preg_match('/^(?:[0-9]+|\*)\.(?:(?:[0-9]+|\*)\.(?!$))*(?:(?:[0-9]+|\*))?$/', trim($filter, '.'))) { //e.g., possible wildcard IPv4 like 4.5.* - $components = explode('.', trim($filter, '.')); - if (count($components) <= 4) { - $components = array_pad($components, 4, '*'); - $matchType = 'ipregex'; - $matchValue = '^'; - foreach ($components as $c) { - if (empty($c) || $c == '*') { - $matchValue .= '\d+'; - } - else { - $matchValue .= (int) $c; - } - - $matchValue .= '\.'; - } - $matchValue = substr($matchValue, 0, -2); - $matchValue .= '$'; - } - } - - if (empty($matchType) && preg_match('/^(?:[0-9a-f]+\:)(?:[0-9a-f]+\:|\*){1,2}(?:[0-9a-f]+|\*)?$/i', $filter)) { //e.g., possible wildcard IPv6 like ffe0:* - $components = explode(':', $filter); - $matchType = 'ipregex'; - $matchValue = '^'; - for ($i = 0; $i < 4; $i++) { - if (isset($components[$i])) { - $matchValue .= strtoupper(str_pad(dechex($components[$i]), 4, '0', STR_PAD_LEFT)); - } - else { - $matchValue .= '[0-9a-f]{4}'; - } - $matchValue .= ':'; - } - $matchValue = substr($matchValue, 0, -1); - $matchValue .= '$'; - } - - if (empty($matchType)) { - $matchType = 'literal'; - $matchValue = $filter; - } - - $offsetProcessed = 0; - $limitProcessed = 0; - - $returnBlocks = array(); - for ($i = 0; true; $i += WORDFENCE_BLOCKED_IPS_PER_PAGE) { - $blocks = wfBlock::allBlocks(true, $ofTypes, $i, WORDFENCE_BLOCKED_IPS_PER_PAGE, $sortColumn, $sortDirection); - if (empty($blocks)) { - break; - } - - foreach ($blocks as $b) { - $include = false; - - if (stripos($b->reason, $filter) !== false) { - $include = true; - } - - if (!$include && $b->type == self::TYPE_PATTERN) { - if (stripos($b->hostname, $filter) !== false) { $include = true; } - else if (stripos($b->userAgent, $filter) !== false) { $include = true; } - else if (stripos($b->referrer, $filter) !== false) { $include = true; } - else if (stripos($b->ipRange, $filter) !== false) { $include = true; } - } - - if (!$include && stripos(self::nameForType($b->type), $filter) !== false) { - $include = true; - } - - if (!$include) { - switch ($matchType) { - case 'ip': - if ($b->matchRequest($matchValue, '', '') != self::MATCH_NONE) { - $include = true; - } - else if ($b->type == self::TYPE_LOCKOUT && wfUtils::inet_pton($matchValue) == wfUtils::inet_pton($b->ip)) { - $include = true; - } - break; - case 'ipregex': - if (preg_match('/' . $matchValue . '/i', $b->ip)) { - $include = true; - } - break; - case 'literal': - //Already checked above - break; - } - } - - if ($include) { - if ($offsetProcessed < $offset) { //Still searching for the start offset - $offsetProcessed++; - continue; - } - - $returnBlocks[] = $b; - $limitProcessed++; - } - - if ($limit != -1 && $limitProcessed >= $limit) { - return $returnBlocks; - } - } - } - - return $returnBlocks; - } - - /** - * Returns all unexpired blocks of types wfBlock::TYPE_IP_MANUAL, wfBlock::TYPE_IP_AUTOMATIC_TEMPORARY, wfBlock::TYPE_IP_AUTOMATIC_PERMANENT, wfBlock::TYPE_WFSN_TEMPORARY, wfBlock::TYPE_RATE_BLOCK, and wfBlock::TYPE_RATE_THROTTLE. - * - * @param bool $prefetch If true, the full data for the block is fetched rather than using lazy loading. - * @return wfBlock[] - */ - public static function ipBlocks($prefetch = false) { - return self::allBlocks($prefetch, array(self::TYPE_IP_MANUAL, self::TYPE_IP_AUTOMATIC_TEMPORARY, self::TYPE_IP_AUTOMATIC_PERMANENT, self::TYPE_WFSN_TEMPORARY, self::TYPE_RATE_BLOCK, self::TYPE_RATE_THROTTLE)); - } - - /** - * Finds an IP block matching the given IP, returning it if found. Returns false if none are found. - * - * @param string $ip - * @return bool|wfBlock - */ - public static function findIPBlock($ip) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - - $query = "SELECT * FROM `{$blocksTable}` WHERE "; - - $ofTypes = array(self::TYPE_IP_MANUAL, self::TYPE_IP_AUTOMATIC_TEMPORARY, self::TYPE_IP_AUTOMATIC_PERMANENT, self::TYPE_WFSN_TEMPORARY, self::TYPE_RATE_BLOCK, self::TYPE_RATE_THROTTLE); - $query .= "`type` IN (" . implode(', ', $ofTypes) . ') AND '; - $query .= "`IP` = %s AND "; - $query .= '(`expiration` = ' . self::DURATION_FOREVER . ' OR `expiration` > UNIX_TIMESTAMP()) ORDER BY `blockedTime` DESC LIMIT 1'; - - $r = $wpdb->get_row($wpdb->prepare($query, wfUtils::inet_pton($ip)), ARRAY_A); - if (is_array($r)) { - $ip = wfUtils::inet_ntop($r['IP']); - return new wfBlock($r['id'], $r['type'], $ip, $r['blockedTime'], $r['reason'], $r['lastAttempt'], $r['blockedHits'], $r['expiration'], null); - } - return false; - } - - /** - * Returns all unexpired blocks of type wfBlock::TYPE_COUNTRY. - * - * @param bool $prefetch If true, the full data for the block is fetched rather than using lazy loading. - * @return wfBlock[] - */ - public static function countryBlocks($prefetch = false) { - return self::allBlocks($prefetch, array(self::TYPE_COUNTRY)); - } - - /** - * Returns whether or not there is a country block rule. - * - * @return bool - */ - public static function hasCountryBlock() { - $countryBlocks = self::countryBlocks(); - return !empty($countryBlocks); - } - - /** - * Returns the value for the country blocking bypass cookie. - * - * @return string - */ - public static function countryBlockingBypassCookieValue() { - $val = wfConfig::get('cbl_cookieVal', false); - if (!$val) { - $val = uniqid(); - wfConfig::set('cbl_cookieVal', $val); - } - return $val; - } - - /** - * Returns all unexpired blocks of type wfBlock::TYPE_PATTERN. - * - * @param bool $prefetch If true, the full data for the block is fetched rather than using lazy loading. - * @return wfBlock[] - */ - public static function patternBlocks($prefetch = false) { - return self::allBlocks($prefetch, array(self::TYPE_PATTERN)); - } - - /** - * Returns all unexpired lockouts (type wfBlock::TYPE_LOCKOUT). - * - * @param bool $prefetch If true, the full data for the block is fetched rather than using lazy loading. - * @return wfBlock[] - */ - public static function lockouts($prefetch = false) { - return self::allBlocks($prefetch, array(self::TYPE_LOCKOUT)); - } - - /** - * Returns the lockout record for the given IP if it exists. - * - * @param string $ip - * @return bool|wfBlock - */ - public static function lockoutForIP($ip) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - - $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$blocksTable}` WHERE `IP` = %s AND `type` = %d AND (`expiration` = %d OR `expiration` > UNIX_TIMESTAMP())", wfUtils::inet_pton($ip), self::TYPE_LOCKOUT, self::DURATION_FOREVER), ARRAY_A); - if ($row) { - return new wfBlock($row['id'], $row['type'], wfUtils::inet_ntop($row['IP']), $row['blockedTime'], $row['reason'], $row['lastAttempt'], $row['blockedHits'], $row['expiration'], null); - } - - return false; - } - - /** - * Removes all blocks whose ID is in the given array. - * - * @param array $blockIDs - * @param bool $retrieve if true, fetch and return the deleted rows - * @return bool|array true(or an array of blocks, if $retrieve is specified) or false on failure - */ - public static function removeBlockIDs($blockIDs, $retrieve=false) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - - $blockIDs = array_map('intval', $blockIDs); - $inClause = implode(', ', $blockIDs); - if($retrieve){ - $blocks = $wpdb->get_results("SELECT * FROM `{$blocksTable}` WHERE `id` IN (".$inClause.")"); - } - else{ - $blocks=true; - } - $query = "DELETE FROM `{$blocksTable}` WHERE `id` IN (" . $inClause . ")"; - if($wpdb->query($query)!==false) { - return $blocks; - } - return false; - } - - /** - * Removes all IP blocks (i.e., manual, wfsn, or rate limited) - */ - public static function removeAllIPBlocks() { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query("DELETE FROM `{$blocksTable}` WHERE `type` IN (" . implode(', ', array(self::TYPE_IP_MANUAL, self::TYPE_IP_AUTOMATIC_TEMPORARY, self::TYPE_IP_AUTOMATIC_PERMANENT, self::TYPE_WFSN_TEMPORARY, self::TYPE_RATE_BLOCK, self::TYPE_RATE_THROTTLE, self::TYPE_LOCKOUT)) . ")"); - } - - /** - * Removes all country blocks - */ - public static function removeAllCountryBlocks() { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query("DELETE FROM `{$blocksTable}` WHERE `type` IN (" . implode(', ', array(self::TYPE_COUNTRY)) . ")"); - } - - /** - * Removes all blocks that were created by WFSN responses. - */ - public static function removeTemporaryWFSNBlocks() { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query($wpdb->prepare("DELETE FROM `{$blocksTable}` WHERE `type` = %d", self::TYPE_WFSN_TEMPORARY)); - } - - /** - * Converts all blocks to non-expiring whose ID is in the given array. - * - * @param array $blockIDs - */ - public static function makePermanentBlockIDs($blockIDs) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - - //TODO: revise this if we support user-customizable durations - $supportedTypes = array( - self::TYPE_WFSN_TEMPORARY, - self::TYPE_RATE_BLOCK, - self::TYPE_RATE_THROTTLE, - self::TYPE_LOCKOUT, - self::TYPE_IP_AUTOMATIC_TEMPORARY, - ); - - $blockIDs = array_map('intval', $blockIDs); - $query = $wpdb->prepare("UPDATE `{$blocksTable}` SET `expiration` = %d, `type` = %d WHERE `id` IN (" . implode(', ', $blockIDs) . ") AND `type` IN (" . implode(', ', $supportedTypes) . ") AND (`expiration` > UNIX_TIMESTAMP())", self::DURATION_FOREVER, self::TYPE_IP_AUTOMATIC_PERMANENT); - $wpdb->query($query); - - $supportedTypes = array( - self::TYPE_IP_MANUAL, - ); - - $blockIDs = array_map('intval', $blockIDs); - $query = $wpdb->prepare("UPDATE `{$blocksTable}` SET `expiration` = %d, `type` = %d WHERE `id` IN (" . implode(', ', $blockIDs) . ") AND `type` IN (" . implode(', ', $supportedTypes) . ") AND (`expiration` > UNIX_TIMESTAMP())", self::DURATION_FOREVER, self::TYPE_IP_MANUAL); - $wpdb->query($query); - } - - /** - * Removes all specific IP blocks and lockouts that can result in the given IP being blocked. - * - * @param string $ip - */ - public static function unblockIP($ip) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query($wpdb->prepare("DELETE FROM `{$blocksTable}` WHERE `IP` = %s", wfUtils::inet_pton($ip))); - } - - /** - * Removes all lockouts that can result in the given IP being blocked. - * - * @param string $ip - */ - public static function unlockOutIP($ip) { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query($wpdb->prepare("DELETE FROM `{$blocksTable}` WHERE `IP` = %s AND `type` = %d", wfUtils::inet_pton($ip), self::TYPE_LOCKOUT)); - } - - /** - * Constructs a wfBlock instance. This _does not_ create a new record in the table, only fetches or updates an existing one. - * - * @param $id - * @param bool $type - * @param bool $ip - * @param bool $blockedTime - * @param bool $reason - * @param bool $lastAttempt - * @param bool $blockedHits - * @param bool $expiration - * @param bool $parameters - */ - public function __construct($id, $type = false, $ip = false, $blockedTime = false, $reason = false, $lastAttempt = false, $blockedHits = false, $expiration = false, $parameters = false) { - $this->_id = $id; - $this->_type = $type; - $this->_ip = $ip; - $this->_blockedTime = $blockedTime; - $this->_reason = $reason; - $this->_lastAttempt = $lastAttempt; - $this->_blockedHits = $blockedHits; - $this->_expiration = $expiration; - $this->_parameters = $parameters; - } - - public function __get($key) { - switch ($key) { - case 'id': - return $this->_id; - case 'type': - if ($this->_type === false) { $this->_fetch(); } - return $this->_type; - case 'ip': - if ($this->_type === false) { $this->_fetch(); } - return $this->_ip; - case 'blockedTime': - if ($this->_type === false) { $this->_fetch(); } - return $this->_blockedTime; - case 'reason': - if ($this->_type === false) { $this->_fetch(); } - return $this->_reason; - case 'lastAttempt': - if ($this->_type === false) { $this->_fetch(); } - return $this->_lastAttempt; - case 'blockedHits': - if ($this->_type === false) { $this->_fetch(); } - return $this->_blockedHits; - case 'expiration': - if ($this->_type === false) { $this->_fetch(); } - return $this->_expiration; - case 'parameters': - if ($this->_type === false) { $this->_fetch(); } - return $this->_parameters; - - //Country - case 'blockLogin': - if ($this->type != self::TYPE_COUNTRY) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['blockLogin']; - case 'blockSite': - if ($this->type != self::TYPE_COUNTRY) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['blockSite']; - case 'countries': - if ($this->type != self::TYPE_COUNTRY) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['countries']; - - //Pattern - case 'ipRange': - if ($this->type != self::TYPE_PATTERN) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['ipRange']; - case 'hostname': - if ($this->type != self::TYPE_PATTERN) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['hostname']; - case 'userAgent': - if ($this->type != self::TYPE_PATTERN) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['userAgent']; - case 'referrer': - if ($this->type != self::TYPE_PATTERN) { throw new OutOfBoundsException("{$key} is not a valid property for this block type"); } - return $this->parameters['referrer']; - } - - throw new OutOfBoundsException("{$key} is not a valid property"); - } - - public function __isset($key) { - switch ($key) { - case 'id': - case 'type': - case 'ip': - case 'blockedTime': - case 'reason': - case 'lastAttempt': - case 'blockedHits': - case 'expiration': - return true; - case 'parameters': - if ($this->_type === false) { $this->_fetch(); } - return !empty($this->_parameters); - - //Country - case 'blockLogin': - if ($this->type != self::TYPE_COUNTRY) { return false; } - return !empty($this->parameters['blockLogin']); - case 'blockSite': - if ($this->type != self::TYPE_COUNTRY) { return false; } - return !empty($this->parameters['blockSite']); - case 'countries': - if ($this->type != self::TYPE_COUNTRY) { return false; } - return !empty($this->parameters['countries']); - - //Pattern - case 'ipRange': - if ($this->type != self::TYPE_PATTERN) { return false; } - return !empty($this->parameters['ipRange']); - case 'hostname': - if ($this->type != self::TYPE_PATTERN) { return false; } - return !empty($this->parameters['hostname']); - case 'userAgent': - if ($this->type != self::TYPE_PATTERN) { return false; } - return !empty($this->parameters['userAgent']); - case 'referrer': - if ($this->type != self::TYPE_PATTERN) { return false; } - return !empty($this->parameters['referrer']); - } - - return false; - } - - /** - * Fetches the record for the block from the database and populates the instance variables. - */ - private function _fetch() { - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$blocksTable}` WHERE `id` = %d", $this->id), ARRAY_A); - if ($row !== null) { - $this->_type = $row['type']; - - $ip = $row['IP']; - if ($ip == self::MARKER_COUNTRY || $ip == self::MARKER_PATTERN) { - $this->_ip = null; - } - else { - $this->_ip = wfUtils::inet_ntop($ip); - } - - $this->_blockedTime = $row['blockedTime']; - $this->_reason = $row['reason']; - $this->_lastAttempt = $row['lastAttempt']; - $this->_blockedHits = $row['blockedHits']; - $this->_expiration = $row['expiration']; - - $parameters = $row['parameters']; - if ($parameters === null) { - $this->_parameters = null; - } - else { - $this->_parameters = @json_decode($parameters, true); - } - } - } - - /** - * Tests the block parameters against the given request. If matched, this will return the corresponding wfBlock::MATCH_ - * constant. If not, it will return wfBlock::MATCH_NONE. - * - * @param $ip - * @param $userAgent - * @param $referrer - * @return int - */ - public function matchRequest($ip, $userAgent, $referrer) { - switch ($this->type) { - case self::TYPE_IP_MANUAL: - case self::TYPE_IP_AUTOMATIC_TEMPORARY: - case self::TYPE_IP_AUTOMATIC_PERMANENT: - case self::TYPE_WFSN_TEMPORARY: - case self::TYPE_RATE_BLOCK: - case self::TYPE_RATE_THROTTLE: - if (wfUtils::inet_pton($ip) == wfUtils::inet_pton($this->ip)) - { - return self::MATCH_IP; - } - break; - case self::TYPE_PATTERN: - $match = (!empty($this->ipRange) || !empty($this->hostname) || !empty($this->userAgent) || !empty($this->referrer)); - if (!empty($this->ipRange)) { - $range = new wfUserIPRange($this->ipRange); - $match = $match && $range->isIPInRange($ip); - } - if (!empty($this->hostname)) { - $hostname = wfUtils::reverseLookup($ip); - $match = $match && preg_match(wfUtils::patternToRegex($this->hostname), $hostname); - } - if (!empty($this->userAgent)) { - $match = $match && fnmatch($this->userAgent, $userAgent, FNM_CASEFOLD); - } - if (!empty($this->referrer)) { - $match = $match && fnmatch($this->referrer, $referrer, FNM_CASEFOLD); - } - - if ($match) { - return self::MATCH_PATTERN; - } - - break; - case self::TYPE_COUNTRY: - if (!wfConfig::get('isPaid')) { - return self::MATCH_NONE; - } - - //Bypass Redirect URL Hit - $bareRequestURI = wfUtils::extractBareURI($_SERVER['REQUEST_URI']); - $bareBypassRedirURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassRedirURL', '')); - if ($bareBypassRedirURI && $bareRequestURI == $bareBypassRedirURI) { - $bypassRedirDest = wfConfig::get('cbl_bypassRedirDest', ''); - if ($bypassRedirDest) { - wfUtils::setcookie('wfCBLBypass', wfBlock::countryBlockingBypassCookieValue(), time() + (86400 * 365), '/', null, wfUtils::isFullSSL(), true); - return self::MATCH_COUNTRY_REDIR_BYPASS; - } - } - - //Bypass View URL Hit - $bareBypassViewURI = wfUtils::extractBareURI(wfConfig::get('cbl_bypassViewURL', '')); - if ($bareBypassViewURI && $bareBypassViewURI == $bareRequestURI) { - wfUtils::setcookie('wfCBLBypass', wfBlock::countryBlockingBypassCookieValue(), time() + (86400 * 365), '/', null, wfUtils::isFullSSL(), true); - return self::MATCH_NONE; - } - - //Early exit checks - if ($this->_shouldBypassCountryBlocking()) { //Has valid bypass cookie - return self::MATCH_NONE; - } - - if ($this->blockLogin) { - add_filter('authenticate', array($this, '_checkForBlockedCountryFilter'), 1, 1); - } - - if (!$this->blockLogin && $this->_isAuthRequest()) { //Not blocking login and this is a login request - return self::MATCH_NONE; - } - else if (!$this->blockSite && !$this->_isAuthRequest()) { //Not blocking site and this may be a site request - return self::MATCH_NONE; - } - else if (is_user_logged_in() && !wfConfig::get('cbl_loggedInBlocked', false)) { //Not blocking logged in users and a login session exists - return self::MATCH_NONE; - } - - //Block everything - if ($this->blockSite && $this->blockLogin) { - return $this->_checkForBlockedCountry(); - } - - //Block the login form itself and any attempt to authenticate - if ($this->blockLogin && $this->_isAuthRequest()) { - return $this->_checkForBlockedCountry(); - } - - //Block requests that aren't to the login page, xmlrpc.php, or a user already logged in - if ($this->blockSite && !$this->_isAuthRequest() && !defined('XMLRPC_REQUEST')) { - return $this->_checkForBlockedCountry(); - } - - //XMLRPC is inaccesible when public portion of the site and auth is disabled - if ($this->blockLogin && $this->blockSite && defined('XMLRPC_REQUEST')) { - return $this->_checkForBlockedCountry(); - } - - break; - } - - return self::MATCH_NONE; - } - - /** - * Returns whether or not the current request should be treated as an auth request. - * - * @return bool - */ - private function _isAuthRequest() { - if ((strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false)) { - return true; - } - return false; - } - - /** - * Tests whether or not the country blocking bypass cookie is set and valid. - * - * @return bool - */ - private function _shouldBypassCountryBlocking() { - if (isset($_COOKIE['wfCBLBypass']) && $_COOKIE['wfCBLBypass'] == wfBlock::countryBlockingBypassCookieValue()) { - return true; - } - return false; - } - - /** - * Checks the country block against the requesting IP, returning the action to take. - * - * @return int - */ - private function _checkForBlockedCountry() { - $blockedCountries = $this->countries; - $bareRequestURI = untrailingslashit(wfUtils::extractBareURI($_SERVER['REQUEST_URI'])); - $IP = wfUtils::getIP(); - if ($country = wfUtils::IP2Country($IP)) { - foreach ($blockedCountries as $blocked) { - if (strtoupper($blocked) == strtoupper($country)) { //At this point we know the user has been blocked - if (wfConfig::get('cbl_action') == 'redir') { - $redirURL = wfConfig::get('cbl_redirURL'); - $eRedirHost = wfUtils::extractHostname($redirURL); - $isExternalRedir = false; - if ($eRedirHost && $eRedirHost != wfUtils::extractHostname(home_url())) { //It's an external redirect... - $isExternalRedir = true; - } - - if ((!$isExternalRedir) && untrailingslashit(wfUtils::extractBareURI($redirURL)) == $bareRequestURI) { //Is this the URI we want to redirect to, then don't block it - return self::MATCH_NONE; - } - else { - return self::MATCH_COUNTRY_REDIR; - } - } - else { - return self::MATCH_COUNTRY_BLOCK; - } - } - } - } - - return self::MATCH_NONE; - } - - /** - * Filter hook for the country blocking check. Does nothing if not blocked, otherwise presents the block page and exits. - * - * Note: Must remain `public` for callback to work. - */ - public function _checkForBlockedCountryFilter($user) { - $block = $this->_checkForBlockedCountry(); - if ($block == self::MATCH_NONE) { - return $user; - } - - $log = wfLog::shared(); - $log->getCurrentRequest()->actionDescription = __('blocked access via country blocking', 'wordfence'); - wfConfig::inc('totalCountryBlocked'); - wfActivityReport::logBlockedIP(wfUtils::getIP(), null, 'country'); - $log->do503(3600, __('Access from your area has been temporarily limited for security reasons', 'wordfence')); //exits - } - - /** - * Adds $quantity to the blocked count and sets the timestamp for lastAttempt. - * - * @param int $quantity - * @param bool|int $timestamp - */ - public function recordBlock($quantity = 1, $timestamp = false) { - if ($timestamp === false) { - $timestamp = time(); - } - - global $wpdb; - $blocksTable = wfBlock::blocksTable(); - $wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `blockedHits` = `blockedHits` + %d, `lastAttempt` = GREATEST(`lastAttempt`, %d) WHERE `id` = %d", $quantity, $timestamp, $this->id)); - $this->_type = false; //Trigger a re-fetch next access - } - - /** - * Returns an array suitable for JSON of the values needed to edit the block. - * - * @return array - */ - public function editValues() { - switch ($this->type) { - case self::TYPE_COUNTRY: - return array( - 'blockLogin' => wfUtils::truthyToInt($this->blockLogin), - 'blockSite' => wfUtils::truthyToInt($this->blockSite), - 'countries' => $this->countries, - 'reason' => $this->reason, - 'expiration' => $this->expiration, - ); - } - - return array(); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/models/block/wfRateLimit.php b/wp/wp-content/plugins/wordfence/models/block/wfRateLimit.php deleted file mode 100644 index 716695ba..00000000 --- a/wp/wp-content/plugins/wordfence/models/block/wfRateLimit.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php - -class wfRateLimit { - const TYPE_GLOBAL = 'global'; - const TYPE_CRAWLER_VIEWS = 'crawler-views'; - const TYPE_CRAWLER_404S = 'crawler-404s'; - const TYPE_HUMAN_VIEWS = 'human-views'; - const TYPE_HUMAN_404S = 'human-404s'; - - const HIT_TYPE_404 = '404'; - const HIT_TYPE_NORMAL = 'hit'; - - const VISITOR_TYPE_HUMAN = 'human'; - const VISITOR_TYPE_CRAWLER = 'crawler'; - - protected $_type; - protected static $_hitCount = false; - - public static function table() { - return wfDB::networkTable('wfTrafficRates'); - } - - public static function trimData() { - $wfdb = wfDB::shared(); - $table = self::table(); - $wfdb->queryWrite("DELETE FROM {$table} WHERE eMin < FLOOR((UNIX_TIMESTAMP() - 60) / 60)"); - } - - public static function globalRateLimit() { - static $_cachedGlobal = null; - if ($_cachedGlobal === null) { - $_cachedGlobal = new wfRateLimit(self::TYPE_GLOBAL); - } - return $_cachedGlobal; - } - - public static function crawlerViewsRateLimit() { - static $_cachedCrawlerViews = null; - if ($_cachedCrawlerViews === null) { - $_cachedCrawlerViews = new wfRateLimit(self::TYPE_CRAWLER_VIEWS); - } - return $_cachedCrawlerViews; - } - - public static function crawler404sRateLimit() { - static $_cachedCrawler404s = null; - if ($_cachedCrawler404s === null) { - $_cachedCrawler404s = new wfRateLimit(self::TYPE_CRAWLER_404S); - } - return $_cachedCrawler404s; - } - - public static function humanViewsRateLimit() { - static $_cachedHumanViews = null; - if ($_cachedHumanViews === null) { - $_cachedHumanViews = new wfRateLimit(self::TYPE_HUMAN_VIEWS); - } - return $_cachedHumanViews; - } - - public static function human404sRateLimit() { - static $_cachedHuman404s = null; - if ($_cachedHuman404s === null) { - $_cachedHuman404s = new wfRateLimit(self::TYPE_HUMAN_404S); - } - return $_cachedHuman404s; - } - - /** - * Returns whether or not humans and bots have the same rate limits configured. - * - * @return bool - */ - public static function identicalHumanBotRateLimits() { - $humanViews = self::humanViewsRateLimit(); - $crawlerViews = self::crawlerViewsRateLimit(); - if ($humanViews->isEnabled() != $crawlerViews->isEnabled()) { - return false; - } - if ($humanViews->limit() != $crawlerViews->limit()) { - return false; - } - - $human404s = self::human404sRateLimit(); - $crawler404s = self::crawler404sRateLimit(); - if ($human404s->isEnabled() != $crawler404s->isEnabled()) { - return false; - } - if ($human404s->limit() != $crawler404s->limit()) { - return false; - } - - return true; - } - - public static function mightRateLimit($hitType) { - if (!wfConfig::get('firewallEnabled')) { - return false; - } - - $IP = wfUtils::getIP(); - if (wfBlock::isWhitelisted($IP)) { - return false; - } - - if (wfConfig::get('neverBlockBG') == 'neverBlockUA' && wfCrawl::isGoogleCrawler()) { - return false; - } - - if (wfConfig::get('neverBlockBG') == 'neverBlockVerified' && wfCrawl::isVerifiedGoogleCrawler()) { - return false; - } - - if ($hitType == '404') { - $allowed404s = wfConfig::get('allowed404s'); - if (is_string($allowed404s)) { - $allowed404s = array_filter(preg_split("/[\r\n]+/", $allowed404s)); - $allowed404sPattern = ''; - foreach ($allowed404s as $allowed404) { - $allowed404sPattern .= preg_replace('/\\\\\*/', '.*?', preg_quote($allowed404, '/')) . '|'; - } - $uri = $_SERVER['REQUEST_URI']; - if (($index = strpos($uri, '?')) !== false) { - $uri = substr($uri, 0, $index); - } - if ($allowed404sPattern && preg_match('/^' . substr($allowed404sPattern, 0, -1) . '$/i', $uri)) { - return false; - } - } - } - - if (self::globalRateLimit()->isEnabled()) { - return true; - } - - $visitorType = self::visitorType(); - - if ($visitorType == self::VISITOR_TYPE_CRAWLER) { - if ($hitType == self::HIT_TYPE_NORMAL) { - if (self::crawlerViewsRateLimit()->isEnabled()) { - return true; - } - } - else { - if (self::crawler404sRateLimit()->isEnabled()) { - return true; - } - } - } - else { - if ($hitType == self::HIT_TYPE_NORMAL) { - if (self::humanViewsRateLimit()->isEnabled()) { - return true; - } - } - else { - if (self::human404sRateLimit()->isEnabled()) { - return true; - } - } - } - - return false; - } - - public static function countHit($hitType, $ip) { - $table = self::table(); - wfDB::shared()->queryWrite("INSERT INTO {$table} (eMin, IP, hitType, hits) VALUES (FLOOR(UNIX_TIMESTAMP() / 60), %s, %s, @wfcurrenthits := 1) ON DUPLICATE KEY UPDATE hits = IF(@wfcurrenthits := hits + 1, hits + 1, hits + 1)", wfUtils::inet_pton($ip), $hitType); - } - - /** - * Returns one of the VISITOR_TYPE_ constants for the purposes of determining which rate limit to apply. - * - * @return string - */ - public static function visitorType() { - static $_cachedVisitorType = null; - if ($_cachedVisitorType === null) { - $_cachedVisitorType = ((isset($_SERVER['HTTP_USER_AGENT']) && wfCrawl::isCrawler($_SERVER['HTTP_USER_AGENT'])) || empty($_SERVER['HTTP_USER_AGENT']) ? wfRateLimit::VISITOR_TYPE_CRAWLER : wfRateLimit::VISITOR_TYPE_HUMAN); - } - return $_cachedVisitorType; - } - - protected function __construct($type) { - $this->_type = $type; - } - - /** - * Returns whether or not this rate limit is configured in a way where it would run. - * - * @return bool - */ - public function isEnabled() { - switch ($this->_type) { - case self::TYPE_GLOBAL: - return wfConfig::get('maxGlobalRequests') != 'DISABLED' && wfConfig::getInt('maxGlobalRequests') > 0; - case self::TYPE_CRAWLER_VIEWS: - return wfConfig::get('maxRequestsCrawlers') != 'DISABLED' && wfConfig::getInt('maxRequestsCrawlers') > 0; - case self::TYPE_CRAWLER_404S: - return wfConfig::get('max404Crawlers') != 'DISABLED' && wfConfig::getInt('max404Crawlers') > 0; - case self::TYPE_HUMAN_VIEWS: - return wfConfig::get('maxRequestsHumans') != 'DISABLED' && wfConfig::getInt('maxRequestsHumans') > 0; - case self::TYPE_HUMAN_404S: - return wfConfig::get('max404Humans') != 'DISABLED' && wfConfig::getInt('max404Humans') > 0; - } - return true; - } - - public function limit() { - switch ($this->_type) { - case self::TYPE_GLOBAL: - return wfConfig::getInt('maxGlobalRequests'); - case self::TYPE_CRAWLER_VIEWS: - return wfConfig::getInt('maxRequestsCrawlers'); - case self::TYPE_CRAWLER_404S: - return wfConfig::getInt('max404Crawlers'); - case self::TYPE_HUMAN_VIEWS: - return wfConfig::getInt('maxRequestsHumans'); - case self::TYPE_HUMAN_404S: - return wfConfig::getInt('max404Humans'); - } - return -1; - } - - public function shouldEnforce($hitType) { - switch ($this->_type) { - case self::TYPE_GLOBAL: - return $this->isEnabled() && $this->_hitCount() > max(wfConfig::getInt('maxGlobalRequests'), 1); - case self::TYPE_CRAWLER_VIEWS: - return self::visitorType() == self::VISITOR_TYPE_CRAWLER && $hitType == self::HIT_TYPE_NORMAL && $this->isEnabled() && $this->_hitCount() > wfConfig::getInt('maxRequestsCrawlers'); - case self::TYPE_CRAWLER_404S: - return self::visitorType() == self::VISITOR_TYPE_CRAWLER && $hitType == self::HIT_TYPE_404 && $this->isEnabled() && $this->_hitCount() > wfConfig::getInt('max404Crawlers'); - case self::TYPE_HUMAN_VIEWS: - return self::visitorType() == self::VISITOR_TYPE_HUMAN && $hitType == self::HIT_TYPE_NORMAL && $this->isEnabled() && $this->_hitCount() > wfConfig::getInt('maxRequestsHumans'); - case self::TYPE_HUMAN_404S: - return self::visitorType() == self::VISITOR_TYPE_HUMAN && $hitType == self::HIT_TYPE_404 && $this->isEnabled() && $this->_hitCount() > wfConfig::getInt('max404Humans'); - } - return false; - } - - /** - * Returns the hit count corresponding to the current request type. - * - * @return int - */ - protected function _hitCount() { - if (self::$_hitCount === false) { - self::$_hitCount = (int) wfDB::shared()->querySingle("SELECT @wfcurrenthits"); - } - return self::$_hitCount; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/models/common/wfTab.php b/wp/wp-content/plugins/wordfence/models/common/wfTab.php deleted file mode 100644 index 8e827bed..00000000 --- a/wp/wp-content/plugins/wordfence/models/common/wfTab.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * Defines a UI tab. - * - * @property string $id - * @property string $a - * @property string $tabTitle - * @property string $pageTitle - * @property bool $active - */ -class wfTab { - protected $_id; - protected $_a; - protected $_tabTitle; - protected $_pageTitle; - protected $_active; - - public function __construct($id, $a, $tabTitle, $pageTitle, $active = false) { - $this->_id = $id; - $this->_a = $a; - $this->_tabTitle = $tabTitle; - $this->_pageTitle = $pageTitle; - $this->_active = $active; - } - - public function __get($name) { - switch ($name) { - case 'id': - return $this->_id; - case 'a': - return $this->_a; - case 'tabTitle': - return $this->_tabTitle; - case 'pageTitle': - return $this->_pageTitle; - case 'active': - return $this->_active; - } - - throw new OutOfBoundsException('Invalid key: ' . $name); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/models/firewall/wfFirewall.php b/wp/wp-content/plugins/wordfence/models/firewall/wfFirewall.php deleted file mode 100644 index dd084370..00000000 --- a/wp/wp-content/plugins/wordfence/models/firewall/wfFirewall.php +++ /dev/null @@ -1,605 +0,0 @@ -<?php - -class wfFirewall -{ - const FIREWALL_MODE_DISABLED = 'disabled'; - const FIREWALL_MODE_LEARNING = 'learning-mode'; - const FIREWALL_MODE_ENABLED = 'enabled'; - - const PROTECTION_MODE_EXTENDED = 'extended'; - const PROTECTION_MODE_BASIC = 'basic'; - - const RULE_MODE_COMMUNITY = 'community'; - const RULE_MODE_PREMIUM = 'premium'; - - const BLACKLIST_MODE_DISABLED = 'disabled'; - const BLACKLIST_MODE_ENABLED = 'enabled'; - - const UPDATE_FAILURE_RATELIMIT = 'ratelimit'; - const UPDATE_FAILURE_UNREACHABLE = 'unreachable'; - const UPDATE_FAILURE_FILESYSTEM = 'filesystem'; - - /** - * Returns a string suitable for display of the firewall status. - * - * @param null|string $status - * @param null|string $protection - * @return string - */ - public function displayText($status = null, $protection = null) { - if ($status === null) { $status = $this->firewallMode(); } - if ($protection === null) { $protection = $this->protectionMode(); } - - switch ($status) { - case self::FIREWALL_MODE_ENABLED: - $statusText = __('Enabled', 'wordfence'); - break; - case self::FIREWALL_MODE_LEARNING: - $statusText = __('Learning Mode', 'wordfence'); - break; - default: - return __('Disabled', 'wordfence'); - } - - switch ($protection) { - case self::PROTECTION_MODE_EXTENDED: - $protectionText = __('Extended Protection', 'wordfence'); - break; - default: - $protectionText = __('Basic Protection', 'wordfence'); - break; - } - - return sprintf('%s (%s)', $statusText, $protectionText); - } - - /** - * Syncs the status from WAF to the wfConfig table if $toDatabase is true, the reverse if false. - * - * @param bool $toDatabase - */ - public function syncStatus($toDatabase = true) { - if ($toDatabase) { - try { - $status = wfWAF::getInstance()->getStorageEngine()->getConfig('wafStatus'); - if (in_array($status, array(self::FIREWALL_MODE_DISABLED, self::FIREWALL_MODE_LEARNING, self::FIREWALL_MODE_ENABLED))) { - wfConfig::set('waf_status', $status); - } - } - catch (Exception $e) { - //Ignore - } - } - else { - try { - $status = wfConfig::get('waf_status'); - if (in_array($status, array(self::FIREWALL_MODE_DISABLED, self::FIREWALL_MODE_LEARNING, self::FIREWALL_MODE_ENABLED))) { - wfWAF::getInstance()->getStorageEngine()->setConfig('wafStatus', $status); - } - } - catch (Exception $e) { - //Ignore - } - } - } - - /** - * Tests the WAF configuration and returns true if successful. - * - * @return bool - */ - public function testConfig() { - try { - wfWAF::getInstance()->getStorageEngine()->isDisabled(); - } - catch (Exception $e) { - return false; - } - - return true; - } - - /** - * Returns a normalized percentage (i.e., in the range [0, 1]) to the corresponding display percentage - * based on license type. - * - * @param float $percentage - * @param bool $adjust Whether or not to adjust the range to [0, 0.7] - * @return float - */ - protected function _normalizedPercentageToDisplay($percentage, $adjust = true) { - if (wfConfig::get('isPaid') || !$adjust) { - return round($percentage, 2); - } - - return round($percentage * 0.70, 2); - } - - /** - * Returns the percentage calculation of the overall firewall status, which is displayed under "Firewall" - * on the Dashboard page. - * - * @return float - */ - public function overallStatus() { - try { - $wafStatus = $this->wafStatus(); - $bruteForceStatus = $this->bruteForceStatus(); - - $percentage = 0.0; - $percentage += $wafStatus * 0.80; - $percentage += $bruteForceStatus * 0.20; - return $this->_normalizedPercentageToDisplay($percentage, false); - } - catch (Exception $e) { - //Ignore, return 0% - } - - return 0.0; - } - - public function statusList($section = null) { - $statusList = array(); - $wafStatusList = $this->wafStatusList($section); - $bruteForceStatusList = $this->bruteForceStatusList(); - - foreach ($wafStatusList as $entry) { - $entry['percentage'] *= 0.8; - $statusList[] = $entry; - } - - foreach ($bruteForceStatusList as $entry) { - $entry['percentage'] *= 0.2; - $statusList[] = $entry; - } - - return array_filter($statusList); - } - - /** - * Returns the percentage calculation of the WAF status, which is displayed under "Web Application - * Firewall" on the Firewall page. - * - * @return float - */ - public function wafStatus() { - try { - $ruleStatus = $this->ruleStatus(true); - $blacklistStatus = $this->blacklistStatus(); - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - $extendedProtection = $wafEnabled && WFWAF_AUTO_PREPEND && !WFWAF_SUBDIRECTORY_INSTALL; - $rateLimitingAdvancedBlockingEnabled = wfConfig::get('firewallEnabled', 1); - - if (!$wafEnabled) { - return 0.0; - } - - $percentage = 0.0; - $percentage += $this->_normalizedPercentageToDisplay($ruleStatus * 0.35, true); - $percentage += $blacklistStatus * 0.35; - $percentage += ($extendedProtection ? 0.20 : 0.0); - $percentage += ($rateLimitingAdvancedBlockingEnabled ? 0.10 : 0.0); - return $this->_normalizedPercentageToDisplay($percentage, false); - } - catch (Exception $e) { - //Ignore, return 0% - } - - return 0.0; - } - - public function wafStatusList($section = null) { - $statusList = array(); - try { - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - if (!$wafEnabled) { - return array( - array( - 'percentage' => 1.0, - 'title' => __('Enable firewall.', 'wordfence'), - ), - ); - } - - // Get percent of rules enabled. - $ruleStatus = $this->ruleStatusDescription(true); - $premiumStatus = array(); - if (!wfConfig::get('isPaid')) { - $premiumStatus = array( - 'percentage' => 0.30, - 'title' => __('Enable Premium Rules.', 'wordfence'), - ); - } - - if ($section === 'rules') { - if ($ruleStatus) { - $ruleStatus['percentage'] = $this->_normalizedPercentageToDisplay($ruleStatus['percentage']); - } - return array_filter(array($ruleStatus, $premiumStatus)); - } - if ($premiumStatus) { - $premiumStatus['percentage'] *= 0.35; - $premiumStatus['percentage'] = $this->_normalizedPercentageToDisplay($premiumStatus['percentage'], false); - } - if ($ruleStatus) { - $ruleStatus['percentage'] *= 0.35; - $ruleStatus['percentage'] = $this->_normalizedPercentageToDisplay($ruleStatus['percentage']); - } - $statusList = array_merge($statusList, array($ruleStatus), array($premiumStatus)); - - $blacklistStatus = $this->blacklistStatusDescription(); - if ($section === 'blacklist') { - return array_filter(array($blacklistStatus)); - } - if ($blacklistStatus) { - $blacklistStatus['percentage'] *= 0.35; - $blacklistStatus['percentage'] = $this->_normalizedPercentageToDisplay($blacklistStatus['percentage'], false); - } - $statusList = array_merge($statusList, array($blacklistStatus)); - - $extendedProtection = $wafEnabled && WFWAF_AUTO_PREPEND && !WFWAF_SUBDIRECTORY_INSTALL; - if (!$extendedProtection) { - $statusList[] = array( - 'percentage' => $this->_normalizedPercentageToDisplay(0.20, false), - 'title' => __('Optimize the Wordfence Firewall.', 'wordfence'), - ); - } - - $rateLimitingAdvancedBlockingEnabled = wfConfig::get('firewallEnabled', 1); - if (!$rateLimitingAdvancedBlockingEnabled) { - $statusList[] = array( - 'percentage' => $this->_normalizedPercentageToDisplay(0.10, false), - 'title' => __('Enable Rate Limiting and Advanced Blocking.', 'wordfence'), - ); - } - - return array_filter($statusList); - } - catch (Exception $e) { - //Ignore, return 0% - } - - if (!WFWAF_OPERATIONAL) { - return array(array('percentage' => 1.0, 'title' => __('Repair the Wordfence Firewall configuration.', 'wordfence'))); - } - - return array(); - } - - /** - * Returns the status of the WAF. - * - * @return string - */ - public function firewallMode() { - try { - return (!WFWAF_ENABLED ? 'disabled' : wfWAF::getInstance()->getStorageEngine()->getConfig('wafStatus')); - } - catch (Exception $e) { - //Ignore - } - - return self::FIREWALL_MODE_DISABLED; - } - - /** - * Returns the current protection mode configured for the WAF. - * - * @return string - */ - public function protectionMode() { - if (defined('WFWAF_AUTO_PREPEND') && WFWAF_AUTO_PREPEND) { - return self::PROTECTION_MODE_EXTENDED; - } - return self::PROTECTION_MODE_BASIC; - } - - /** - * Returns whether or not this installation is in a subdirectory of another WordPress site with the WAF already optimized. - * - * @return bool - */ - public function isSubDirectoryInstallation() { - if (defined('WFWAF_SUBDIRECTORY_INSTALL') && WFWAF_SUBDIRECTORY_INSTALL) { - return true; - } - return false; - } - - /** - * Returns the percentage calculation of the firewall rule status, which is displayed under "Firewall Rules" on the - * Firewall page. - * - * The calculation is the number of rules enabled divided by the total number of rules. If the WAF is in learning - * mode, no rules are enforced, so it's clamped to 0%. - * - * @param bool $round Round the percentage (in the range [0, 1]) to be only whole percentages. - * @return float - */ - public function ruleStatus($round = false) { - try { - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - if (!$wafEnabled) { - return 0.0; - } - - /*$learningMode = !!wfWAF::getInstance()->isInLearningMode(); - if ($learningMode) { - return 0.0; - }*/ - - $rules = wfWAF::getInstance()->getRules(); - $disabledRules = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('disabledRules'); - /** @var wfWAFRule $rule */ - $enabledCount = 0; - foreach ($rules as $ruleID => $rule) { - if (isset($disabledRules[$ruleID]) && $disabledRules[$ruleID]) { - continue; - } - - $enabledCount++; - } - - $percentEnabled = (count($rules) == 0 ? 0 : $enabledCount / count($rules)); - if ($round) { - return round($percentEnabled, 2); - } - - return $this->_normalizedPercentageToDisplay($percentEnabled); - } - catch (Exception $e) { - //Ignore, return 0% - } - - return 0.0; - } - - /** - * @param bool $round - * @return array - */ - public function ruleStatusDescription($round = false) { - try { - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - if (!$wafEnabled) { - return array( - 'percentage' => 1.0, - 'title' => __('Enable firewall.', 'wordfence'), - ); - } - - /*$learningMode = !!wfWAF::getInstance()->isInLearningMode(); - if ($learningMode) { - return 0.0; - }*/ - - $rules = wfWAF::getInstance()->getRules(); - $disabledRules = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('disabledRules'); - /** @var wfWAFRule $rule */ - $enabledCount = 0; - foreach ($rules as $ruleID => $rule) { - if (isset($disabledRules[$ruleID]) && $disabledRules[$ruleID]) { - continue; - } - - $enabledCount++; - } - - $percentEnabled = 1.0 - ((float) (count($rules) == 0 ? 0 : $enabledCount / count($rules))); - if ($percentEnabled === 0.0) { - return array(); - } - $reenbleCount = count($rules) - $enabledCount; - return array( - 'percentage' => ($round ? round($percentEnabled, 2) : $percentEnabled), - 'title' => sprintf(_n('Re-enable %d firewall rule.', 'Re-enable %d firewall rules.', $reenbleCount, 'wordfence'), number_format_i18n($reenbleCount)), - ); - } - catch (Exception $e) { - //Ignore, return 0% - } - - return array( - 'percentage' => 1.0, - 'title' => __('Enable firewall.', 'wordfence'), - ); - } - - /** - * Returns the rule feed that is in use. - * - * @return string - */ - public function ruleMode() { - if (wfConfig::get('isPaid')) { - return self::RULE_MODE_PREMIUM; - } - return self::RULE_MODE_COMMUNITY; - } - - /** - * Returns 100% if the blacklist is enabled, 0% if not. - * - * @return float - */ - public function blacklistStatus() { - try { - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - if (!$wafEnabled) { - return 0.0; - } - - return $this->blacklistMode() == self::BLACKLIST_MODE_ENABLED ? 1.0 : 0.0; - } - catch (Exception $e) { - //Ignore, return 0% - } - - return 0.0; - } - - /** - * Returns 100% if the blacklist is enabled, 0% if not. - * - * @return array - */ - public function blacklistStatusDescription() { - try { - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - if (!$wafEnabled) { - return array( - 'percentage' => 1.0, - 'title' => __('Enable Firewall.', 'wordfence'), - ); - } - - if ($this->blacklistMode() == self::BLACKLIST_MODE_ENABLED) { - return array(); - } - return array( - 'percentage' => 1.0, - 'title' => __('Enable Real-Time IP Blocklist.', 'wordfence'), - ); - } - catch (Exception $e) { - //Ignore, return 0% - } - - return array( - 'percentage' => 1.0, - 'title' => __('Enable Real-Time IP Blocklist.', 'wordfence'), - ); - } - - /** - * Returns the blacklist mode. - * - * @return string - */ - public function blacklistMode() { - $blacklistEnabled = false; - try { - $wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled()); - $blacklistEnabled = $wafEnabled && !wfWAF::getInstance()->getStorageEngine()->getConfig('disableWAFBlacklistBlocking'); - } - catch (Exception $e) { - //Do nothing - } - - if (wfConfig::get('isPaid') && $blacklistEnabled) { - return self::BLACKLIST_MODE_ENABLED; - } - return self::BLACKLIST_MODE_DISABLED; - } - - /** - * Returns a percentage rating for the brute force protection status. This includes both the WFSN enabled status - * and the status of individual login security options. These options are available to all, so they are always - * in the range [0,1]. - * - * @return float - */ - public function bruteForceStatus() { - $networkBruteForceEnabled = !!wfConfig::get('other_WFNet'); - $localBruteForceEnabled = !!wfConfig::get('loginSecurityEnabled'); - - $percentage = 0.0; - - if ($localBruteForceEnabled) { - $percentage += 0.1; - - if ($networkBruteForceEnabled) { - $percentage += 0.5; - } - if (wfConfig::get('loginSec_strongPasswds_enabled') && (wfConfig::get('loginSec_strongPasswds') == 'pubs' || wfConfig::get('loginSec_strongPasswds') == 'all')) { - $percentage += 0.1; - } - if (wfConfig::get('loginSec_maskLoginErrors')) { - $percentage += 0.1; - } - if (wfConfig::get('loginSec_blockAdminReg')) { - $percentage += 0.1; - } - if (wfConfig::get('loginSec_disableAuthorScan')) { - $percentage += 0.1; - } - } - - return round($percentage, 2); - } - - /** - * Returns the status of the WAF's learning mode. - * - * @return bool|int Returns true if enabled without an automatic switchover, a timestamp if enabled with one, and false if not in learning mode. - */ - public function learningModeStatus() { - if ($this->firewallMode() != self::FIREWALL_MODE_LEARNING) { - return false; - } - - try { - $config = wfWAF::getInstance()->getStorageEngine(); - if ($config->getConfig('learningModeGracePeriodEnabled')) { - return (int) $config->getConfig('learningModeGracePeriod'); - } - - return true; - } - catch (Exception $e) { - //Ignore, return false - } - - return false; - } - - /** - * @return array - */ - public function bruteForceStatusList() { - $networkBruteForceEnabled = !!wfConfig::get('other_WFNet'); - $localBruteForceEnabled = !!wfConfig::get('loginSecurityEnabled'); - - $status = array(); - - if ($localBruteForceEnabled) { - if (!$networkBruteForceEnabled) { - $status[] = array( - 'percentage' => 0.5, - 'title' => __('Enable Real-Time Wordfence Security Network.', 'wordfence'), - ); - } - if (!wfConfig::get('loginSec_strongPasswds_enabled')) { - $status[] = array( - 'percentage' => 0.1, - 'title' => __('Enforce Strong Passwords.', 'wordfence'), - ); - } - if (!wfConfig::get('loginSec_maskLoginErrors')) { - $status[] = array( - 'percentage' => 0.1, - 'title' => __('Enable Mask Login Errors.', 'wordfence'), - ); - } - if (!wfConfig::get('loginSec_blockAdminReg')) { - $status[] = array( - 'percentage' => 0.1, - 'title' => __('Enable Block Admin Registration.', 'wordfence'), - ); - } - if (!wfConfig::get('loginSec_disableAuthorScan')) { - $status[] = array( - 'percentage' => 0.1, - 'title' => __('Disable Author Scanning.', 'wordfence'), - ); - } - } else { - $status[] = array( - 'percentage' => 1.0, - 'title' => __('Enable Brute Force Protection.', 'wordfence'), - ); - } - - return array_filter($status); - } -} diff --git a/wp/wp-content/plugins/wordfence/models/page/wfPage.php b/wp/wp-content/plugins/wordfence/models/page/wfPage.php deleted file mode 100644 index 884c043e..00000000 --- a/wp/wp-content/plugins/wordfence/models/page/wfPage.php +++ /dev/null @@ -1,263 +0,0 @@ -<?php - -class wfPage { - const PAGE_DASHBOARD = 'dashboard'; - const PAGE_DASHBOARD_OPTIONS = 'dashboard-options'; - const PAGE_FIREWALL = 'firewall'; - const PAGE_FIREWALL_OPTIONS = 'firewall-options'; - const PAGE_BLOCKING = 'blocking'; - const PAGE_BLOCKING_OPTIONS = 'blocking-options'; - const PAGE_SCAN = 'scan'; - const PAGE_SCAN_OPTIONS = 'scan-options'; - const PAGE_TOOLS_2FA = 'tools-2fa'; - const PAGE_TOOLS_LIVE_TRAFFIC = 'tools-2fa'; - const PAGE_TOOLS_WHOIS = 'tools-whois'; - const PAGE_TOOLS_IMPORT_EXPORT = 'tools-import-export'; - const PAGE_TOOLS_DIAGNOSTICS = 'tools-diagnostics'; - const PAGE_SUPPORT = 'support'; - - /** @var string */ - private $_identifier; - - /** - * Provides validation for a user-provided page identifier. - * - * @param string $identifier - * @return bool - */ - public static function isValidPage($identifier) { - switch ($identifier) { - case self::PAGE_DASHBOARD: - case self::PAGE_DASHBOARD_OPTIONS: - case self::PAGE_FIREWALL: - case self::PAGE_FIREWALL_OPTIONS: - case self::PAGE_BLOCKING: - case self::PAGE_BLOCKING_OPTIONS: - case self::PAGE_SCAN: - case self::PAGE_SCAN_OPTIONS: - case self::PAGE_TOOLS_2FA: - case self::PAGE_TOOLS_LIVE_TRAFFIC: - case self::PAGE_TOOLS_IMPORT_EXPORT: - case self::PAGE_TOOLS_WHOIS: - case self::PAGE_TOOLS_DIAGNOSTICS: - case self::PAGE_SUPPORT: - return true; - } - return false; - } - - /** - * Convenience function for returning the user-displayable label for the given page. - * - * @param string $identifier - * @return bool|string - */ - public static function pageLabel($identifier) { - $page = new wfPage($identifier); - return $page->label(); - } - - /** - * Convenience function for returning the canonical URL for the given page. - * - * @param string $identifier - * @param string|bool $source The source page identifier to append to the URL if wanted. - * @return string - */ - public static function pageURL($identifier, $source = false) { - $page = new wfPage($identifier); - return $page->url($source); - } - - public function __construct($identifier) { - $this->_identifier = $identifier; - } - - public function __get($key) { - switch ($key) { - case 'identifier': - return $this->_identifier; - } - - throw new OutOfBoundsException("{$key} is not a valid property"); - } - - public function __isset($key) { - switch ($key) { - case 'identifier': - return true; - } - return false; - } - - /** - * Returns the user-displayable label for the page. - * - * @return bool|string - */ - public function label() { - switch ($this->identifier) { - case self::PAGE_DASHBOARD: - return __('Dashboard', 'wordfence'); - case self::PAGE_DASHBOARD_OPTIONS: - return __('Global Options', 'wordfence'); - case self::PAGE_FIREWALL: - return __('Firewall', 'wordfence'); - case self::PAGE_FIREWALL_OPTIONS: - return __('Firewall Options', 'wordfence'); - case self::PAGE_BLOCKING: - return __('Blocking', 'wordfence'); - case self::PAGE_BLOCKING_OPTIONS: - return __('Blocking Options', 'wordfence'); - case self::PAGE_SCAN: - return __('Scan', 'wordfence'); - case self::PAGE_SCAN_OPTIONS: - return __('Scan Options', 'wordfence'); - case self::PAGE_TOOLS_2FA: - return __('Two-Factor Authentication', 'wordfence'); - case self::PAGE_TOOLS_LIVE_TRAFFIC: - return __('Live Traffic', 'wordfence'); - case self::PAGE_TOOLS_IMPORT_EXPORT: - return __('Import/Export Options', 'wordfence'); - case self::PAGE_TOOLS_WHOIS: - return __('Whois Lookup', 'wordfence'); - case self::PAGE_TOOLS_DIAGNOSTICS: - return __('Diagnostics', 'wordfence'); - case self::PAGE_SUPPORT: - return __('Support', 'wordfence'); - } - - return false; - } - - /** - * Returns the canonical URL for the page. - * - * @param string|bool $source The source page identifier to append to the URL if wanted. - * @return string - */ - public function url($source = false) { - $page = ''; - $subpage = ''; - $hash = ''; - switch ($this->identifier) { - case self::PAGE_DASHBOARD: - $page = 'Wordfence'; - break; - case self::PAGE_DASHBOARD_OPTIONS: - $page = 'Wordfence'; - $subpage = 'global_options'; - break; - case self::PAGE_FIREWALL: - $page = 'WordfenceWAF'; - break; - case self::PAGE_FIREWALL_OPTIONS: - $page = 'WordfenceWAF'; - $subpage = 'waf_options'; - break; - case self::PAGE_BLOCKING: - $page = 'WordfenceWAF'; - $hash = '#top#blocking'; - break; - case self::PAGE_BLOCKING_OPTIONS: - $page = 'WordfenceWAF'; - $subpage = 'blocking_options'; - break; - case self::PAGE_SCAN: - $page = 'WordfenceScan'; - break; - case self::PAGE_SCAN_OPTIONS: - $page = 'WordfenceScan'; - $subpage = 'scan_options'; - break; - case self::PAGE_TOOLS_2FA: - $page = 'WordfenceTools'; - $subpage = 'twofactor'; - break; - case self::PAGE_TOOLS_LIVE_TRAFFIC: - $page = 'WordfenceTools'; - $subpage = 'livetraffic'; - break; - case self::PAGE_TOOLS_IMPORT_EXPORT: - $page = 'WordfenceTools'; - $subpage = 'importexport'; - break; - case self::PAGE_TOOLS_WHOIS: - $page = 'WordfenceTools'; - $subpage = 'whois'; - break; - case self::PAGE_TOOLS_DIAGNOSTICS: - $page = 'WordfenceTools'; - $subpage = 'diagnostics'; - break; - case self::PAGE_SUPPORT: - $page = 'WordfenceSupport'; - break; - } - - $baseURL = 'admin.php?'; - $baseURL .= 'page=' . rawurlencode($page); - if (!empty($subpage)) { $baseURL .= '&subpage=' . rawurlencode($subpage); } - if (self::isValidPage($source)) { $baseURL .= '&source=' . rawurlencode($source); } - if (!empty($hash)) { $baseURL .= $this->_hashURLEncode($hash); } - if (function_exists('network_admin_url') && is_multisite()) { - return network_admin_url($baseURL); - } - - return admin_url($baseURL); - } - - /** - * Splits a URI hash component and URL-encodes its members. - * - * @param string $hash - * @return string - */ - private function _hashURLEncode($hash) { - $components = explode('#', $hash); - foreach ($components as &$c) { - $c = rawurlencode($c); - } - return implode('#', $components); - } - - /** - * Returns an ordered array of the pages required to reach this page, this page being the last entry in the array. - * - * @return array - */ - public function breadcrumbs() { - switch ($this->identifier) { - case self::PAGE_DASHBOARD: - return array($this); - case self::PAGE_DASHBOARD_OPTIONS: - return array(new wfPage(wfPage::PAGE_DASHBOARD), $this); - case self::PAGE_FIREWALL: - return array($this); - case self::PAGE_FIREWALL_OPTIONS: - return array(new wfPage(wfPage::PAGE_FIREWALL), $this); - case self::PAGE_BLOCKING: - return array($this); - case self::PAGE_BLOCKING_OPTIONS: - return array(new wfPage(wfPage::PAGE_BLOCKING), $this); - case self::PAGE_SCAN: - return array($this); - case self::PAGE_SCAN_OPTIONS: - return array(new wfPage(wfPage::PAGE_SCAN), $this); - case self::PAGE_TOOLS_2FA: - return array($this); - case self::PAGE_TOOLS_LIVE_TRAFFIC: - return array($this); - case self::PAGE_TOOLS_IMPORT_EXPORT: - return array($this); - case self::PAGE_TOOLS_WHOIS: - return array($this); - case self::PAGE_TOOLS_DIAGNOSTICS: - return array($this); - case self::PAGE_SUPPORT: - return array($this); - } - - return array(); - } -} diff --git a/wp/wp-content/plugins/wordfence/models/scanner/wfScanner.php b/wp/wp-content/plugins/wordfence/models/scanner/wfScanner.php deleted file mode 100644 index 2e2e3e33..00000000 --- a/wp/wp-content/plugins/wordfence/models/scanner/wfScanner.php +++ /dev/null @@ -1,1241 +0,0 @@ -<?php - -class wfScanner { - const SCAN_TYPE_QUICK = 'quick'; - const SCAN_TYPE_LIMITED = 'limited'; - const SCAN_TYPE_STANDARD = 'standard'; - const SCAN_TYPE_HIGH_SENSITIVITY = 'highsensitivity'; - const SCAN_TYPE_CUSTOM = 'custom'; - - const SCAN_SCHEDULING_MODE_AUTOMATIC = 'auto'; - const SCAN_SCHEDULING_MODE_MANUAL = 'manual'; - - const MANUAL_SCHEDULING_ONCE_DAILY = 'onceDaily'; - const MANUAL_SCHEDULING_TWICE_DAILY = 'twiceDaily'; - const MANUAL_SCHEDULING_EVERY_OTHER_DAY = 'everyOtherDay'; - const MANUAL_SCHEDULING_WEEKDAYS = 'weekdays'; - const MANUAL_SCHEDULING_WEEKENDS = 'weekends'; - const MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS = 'oddDaysWE'; - const MANUAL_SCHEDULING_CUSTOM = 'custom'; - - const SIGNATURE_MODE_PREMIUM = 'premium'; - const SIGNATURE_MODE_COMMUNITY = 'community'; - - const STATUS_PENDING = 'pending'; - const STATUS_RUNNING = 'running'; - const STATUS_RUNNING_WARNING = 'running-warning'; - const STATUS_COMPLETE_SUCCESS = 'complete-success'; - const STATUS_COMPLETE_WARNING = 'complete-warning'; - const STATUS_PREMIUM = 'premium'; - const STATUS_DISABLED = 'disabled'; - - const STAGE_SPAMVERTISING_CHECKS = 'spamvertising'; - const STAGE_SPAM_CHECK = 'spam'; - const STAGE_BLACKLIST_CHECK = 'blacklist'; - const STAGE_SERVER_STATE = 'server'; - const STAGE_FILE_CHANGES = 'changes'; - const STAGE_PUBLIC_FILES = 'public'; - const STAGE_MALWARE_SCAN = 'malware'; - const STAGE_CONTENT_SAFETY = 'content'; - const STAGE_PASSWORD_STRENGTH = 'password'; - const STAGE_VULNERABILITY_SCAN = 'vulnerability'; - const STAGE_OPTIONS_AUDIT = 'options'; - - const SUMMARY_TOTAL_USERS = 'totalUsers'; - const SUMMARY_TOTAL_PAGES = 'totalPages'; - const SUMMARY_TOTAL_POSTS = 'totalPosts'; - const SUMMARY_TOTAL_COMMENTS = 'totalComments'; - const SUMMARY_TOTAL_CATEGORIES = 'totalCategories'; - const SUMMARY_TOTAL_TABLES = 'totalTables'; - const SUMMARY_TOTAL_ROWS = 'totalRows'; - const SUMMARY_SCANNED_POSTS = 'scannedPosts'; - const SUMMARY_SCANNED_COMMENTS = 'scannedComments'; - const SUMMARY_SCANNED_FILES = 'scannedFiles'; - const SUMMARY_SCANNED_PLUGINS = 'scannedPlugins'; - const SUMMARY_SCANNED_THEMES = 'scannedThemes'; - const SUMMARY_SCANNED_USERS = 'scannedUsers'; - const SUMMARY_SCANNED_URLS = 'scannedURLs'; - - private $_scanType = false; - - private $_summary = false; - private $_destructRegistered = false; - private $_dirty = false; - - /** - * Returns the singleton wfScanner with the user-configured scan type set. - * - * @return wfScanner - */ - public static function shared() { - static $_scanner = null; - if ($_scanner === null) { - $_scanner = new wfScanner(); - } - return $_scanner; - } - - /** - * Schedules a cron rescheduling to happen at the end of the current process's execution. - */ - public static function setNeedsRescheduling() { - static $willReschedule = false; - if (!$willReschedule) { - $willReschedule = true; - register_shutdown_function(array(self::shared(), 'scheduleScans')); - } - } - - /** - * Returns whether or not the scan type passed is valid. - * - * @param $type - * @return bool - */ - public static function isValidScanType($type) { - switch ($type) { - case self::SCAN_TYPE_QUICK: - case self::SCAN_TYPE_LIMITED: - case self::SCAN_TYPE_HIGH_SENSITIVITY: - case self::SCAN_TYPE_CUSTOM: - case self::SCAN_TYPE_STANDARD: - return true; - } - return false; - } - - /** - * Returns the display string for the given type. - * - * @param string $type - * @return string - */ - public static function displayScanType($type) { - switch ($type) { - case self::SCAN_TYPE_QUICK: - return __('Quick', 'wordfence'); - case self::SCAN_TYPE_LIMITED: - return __('Limited', 'wordfence'); - case self::SCAN_TYPE_HIGH_SENSITIVITY: - return __('High Sensitivity', 'wordfence'); - case self::SCAN_TYPE_CUSTOM: - return __('Custom', 'wordfence'); - case self::SCAN_TYPE_STANDARD: - default: - return __('Standard', 'wordfence'); - } - } - - /** - * Returns the display detail string for the given type. - * - * @param string $type - * @return string - */ - public static function displayScanTypeDetail($type) { - switch ($type) { - case self::SCAN_TYPE_QUICK: - case self::SCAN_TYPE_LIMITED: - return __('Low resource utilization, limited detection capability', 'wordfence'); - case self::SCAN_TYPE_HIGH_SENSITIVITY: - return __('Standard detection capability, chance of false positives', 'wordfence'); - case self::SCAN_TYPE_CUSTOM: - return __('Custom scan options selected', 'wordfence'); - case self::SCAN_TYPE_STANDARD: - default: - return __('Standard detection capability', 'wordfence'); - } - } - - /** - * Returns an array of the scan options (as keys) and the corresponding value for the quick scan type. All omitted - * scan stages are considered disabled. - * - * @return array - */ - public static function quickScanTypeOptions() { - $oldVersions = true; - $wafStatus = true; - if (wfConfig::get('scanType') == self::SCAN_TYPE_CUSTOM) { //Obey the setting in custom if that's the true scan type - $oldVersions = wfConfig::get('scansEnabled_oldVersions'); - $wafStatus = wfConfig::get('scansEnabled_wafStatus'); - } - - return array_merge(self::_inactiveScanOptions(), array( - 'scansEnabled_oldVersions' => $oldVersions, - 'scansEnabled_wafStatus' => $wafStatus, - )); - } - - /** - * Returns an array of the scan options (as keys) and the corresponding value for the limited scan type. - * - * @return array - */ - public static function limitedScanTypeOptions() { - return array_merge(self::_inactiveScanOptions(), array( - 'scansEnabled_checkHowGetIPs' => true, - 'scansEnabled_malware' => true, - 'scansEnabled_fileContents' => true, - 'scansEnabled_fileContentsGSB' => true, - 'scansEnabled_suspiciousOptions' => true, - 'scansEnabled_oldVersions' => true, - 'scansEnabled_wafStatus' => true, - 'lowResourceScansEnabled' => true, - 'scan_exclude' => wfConfig::get('scan_exclude', ''), - 'scan_include_extra' => wfConfig::get('scan_include_extra', ''), - 'scansEnabled_geoipSupport' => true, - )); - } - - /** - * Returns an array of the scan options (as keys) and the corresponding value for the standard scan type. - * - * @return array - */ - public static function standardScanTypeOptions() { - return array_merge(self::_inactiveScanOptions(), array( - 'spamvertizeCheck' => true, - 'checkSpamIP' => true, - 'scansEnabled_checkGSB' => true, - 'scansEnabled_checkHowGetIPs' => true, - 'scansEnabled_checkReadableConfig' => true, - 'scansEnabled_suspectedFiles' => true, - 'scansEnabled_core' => true, - 'scansEnabled_coreUnknown' => true, - 'scansEnabled_malware' => true, - 'scansEnabled_fileContents' => true, - 'scansEnabled_fileContentsGSB' => true, - 'scansEnabled_posts' => true, - 'scansEnabled_comments' => true, - 'scansEnabled_suspiciousOptions' => true, - 'scansEnabled_oldVersions' => true, - 'scansEnabled_suspiciousAdminUsers' => true, - 'scansEnabled_passwds' => true, - 'scansEnabled_diskSpace' => true, - 'scansEnabled_wafStatus' => true, - 'scan_exclude' => wfConfig::get('scan_exclude', ''), - 'scan_include_extra' => wfConfig::get('scan_include_extra', ''), - 'scansEnabled_geoipSupport' => true, - )); - } - - /** - * Returns an array of the scan options (as keys) and the corresponding value for the high sensitivity scan type. - * - * @return array - */ - public static function highSensitivityScanTypeOptions() { - return array_merge(self::_inactiveScanOptions(), array( - 'spamvertizeCheck' => true, - 'checkSpamIP' => true, - 'scansEnabled_checkGSB' => true, - 'scansEnabled_checkHowGetIPs' => true, - 'scansEnabled_checkReadableConfig' => true, - 'scansEnabled_suspectedFiles' => true, - 'scansEnabled_core' => true, - 'scansEnabled_themes' => true, - 'scansEnabled_plugins' => true, - 'scansEnabled_coreUnknown' => true, - 'scansEnabled_malware' => true, - 'scansEnabled_fileContents' => true, - 'scansEnabled_fileContentsGSB' => true, - 'scansEnabled_posts' => true, - 'scansEnabled_comments' => true, - 'scansEnabled_suspiciousOptions' => true, - 'scansEnabled_oldVersions' => true, - 'scansEnabled_suspiciousAdminUsers' => true, - 'scansEnabled_passwds' => true, - 'scansEnabled_diskSpace' => true, - 'scansEnabled_wafStatus' => true, - 'other_scanOutside' => true, - 'scansEnabled_scanImages' => true, - 'scan_exclude' => wfConfig::get('scan_exclude', ''), - 'scan_include_extra' => wfConfig::get('scan_include_extra', ''), - 'scansEnabled_geoipSupport' => true, - )); - } - - /** - * Returns an array of the scan options (as keys) and the corresponding value for the custom scan type. - * - * @return array - */ - public static function customScanTypeOptions() { - $allOptions = self::_inactiveScanOptions(); - foreach ($allOptions as $key => &$value) { - $value = wfConfig::get($key); - } - - $allOptions['scansEnabled_geoipSupport'] = true; - $allOptions['scansEnabled_highSense'] = false; //deprecated - - return $allOptions; - } - - /** - * Returns an array of scan options and their inactive values for convenience in merging with the various scan type - * option arrays. - * - * @return array - */ - protected static function _inactiveScanOptions() { - return array( - 'spamvertizeCheck' => false, - 'checkSpamIP' => false, - 'scansEnabled_checkGSB' => false, - 'scansEnabled_checkHowGetIPs' => false, - 'scansEnabled_checkReadableConfig' => false, - 'scansEnabled_suspectedFiles' => false, - 'scansEnabled_core' => false, - 'scansEnabled_themes' => false, - 'scansEnabled_plugins' => false, - 'scansEnabled_coreUnknown' => false, - 'scansEnabled_malware' => false, - 'scansEnabled_fileContents' => false, - 'scan_include_extra' => '', - 'scansEnabled_fileContentsGSB' => false, - 'scansEnabled_posts' => false, - 'scansEnabled_comments' => false, - 'scansEnabled_suspiciousOptions' => false, - 'scansEnabled_oldVersions' => false, - 'scansEnabled_suspiciousAdminUsers' => false, - 'scansEnabled_passwds' => false, - 'scansEnabled_diskSpace' => false, - 'scansEnabled_wafStatus' => false, - 'other_scanOutside' => false, - 'scansEnabled_scanImages' => false, - 'scansEnabled_highSense' => false, - 'lowResourceScansEnabled' => false, - 'scan_exclude' => '', - 'scansEnabled_geoipSupport' => false, - ); - } - - /** - * Returns the scan options only available to premium users. - * - * @return array - */ - protected static function _premiumScanOptions() { - return array('spamvertizeCheck', 'checkSpamIP', 'scansEnabled_checkGSB'); - } - - /** - * Returns an array of weights for calculating the scan option status score. - * - * @return array - */ - protected static function _scanOptionWeights() { - return array( - 'spamvertizeCheck' => 0.05, - 'checkSpamIP' => 0.05, - 'scansEnabled_checkGSB' => 0.05, - 'scansEnabled_checkHowGetIPs' => 0.05, - 'scansEnabled_checkReadableConfig' => 0.05, - 'scansEnabled_suspectedFiles' => 0.05, - 'scansEnabled_core' => 0.05, - 'scansEnabled_themes' => 0, - 'scansEnabled_plugins' => 0, - 'scansEnabled_coreUnknown' => 0.05, - 'scansEnabled_malware' => 0.05, - 'scansEnabled_fileContents' => 0.1, - 'scan_include_extra' => 0, - 'scansEnabled_fileContentsGSB' => 0.05, - 'scansEnabled_posts' => 0.05, - 'scansEnabled_comments' => 0.05, - 'scansEnabled_suspiciousOptions' => 0.05, - 'scansEnabled_oldVersions' => 0.1, - 'scansEnabled_suspiciousAdminUsers' => 0.05, - 'scansEnabled_passwds' => 0.05, - 'scansEnabled_diskSpace' => 0.05, - 'other_scanOutside' => 0, - 'scansEnabled_scanImages' => 0, - 'scansEnabled_highSense' => 0, - 'lowResourceScansEnabled' => 0, - 'scan_exclude' => 0, - 'scansEnabled_geoipSupport' => 0, - 'scansEnabled_wafStatus' => 0, - ); - } - - /** - * wfScanner constructor. - * @param int|bool $scanType If false, defaults to the config option `scanType`. - */ - public function __construct($scanType = false) { - if ($scanType === false || !self::isValidScanType($scanType)) { - $this->_scanType = wfConfig::get('scanType'); - } - else { - $this->_scanType = $scanType; - } - } - - /** - * Returns whether or not the scanner will run as premium. - * - * @return bool - */ - public function isPremiumScan() { - return !!wfConfig::get('isPaid'); - } - - /** - * Returns whether or not automatic scans will run. - * - * @return bool - */ - public function isEnabled() { - return !!wfConfig::get('scheduledScansEnabled'); - } - - /** - * Returns whether or not a scan is running. A scan is considered running if the timestamp - * under wf_scanRunning is within WORDFENCE_MAX_SCAN_LOCK_TIME seconds of now. - * - * @return bool - */ - public function isRunning() { - $scanRunning = wfConfig::get('wf_scanRunning'); - return ($scanRunning && time() - $scanRunning < WORDFENCE_MAX_SCAN_LOCK_TIME); - } - - /** - * Returns the current scan scheduling mode. - * - * @return string One of the SCAN_SCHEDULING_MODE_ constants - */ - public function schedulingMode() { - if (wfConfig::get('isPaid') && wfConfig::get('schedMode') == 'manual') { - return self::SCAN_SCHEDULING_MODE_MANUAL; - } - return self::SCAN_SCHEDULING_MODE_AUTOMATIC; - } - - /** - * Returns the manual scheduling type. This is only applicable when the scheduling mode is - * SCAN_SCHEDULING_MODE_MANUAL. - * - * @return string One of the MANUAL_SCHEDULING_ constants. - */ - public function manualSchedulingType() { - return wfConfig::get('manualScanType', self::MANUAL_SCHEDULING_ONCE_DAILY); - } - - /** - * Returns the start hour used for non-custom manual schedules. This is initially random but may be modified - * by the user later. - * - * @return int An hour number. - */ - public function manualSchedulingStartHour() { - return wfConfig::get('schedStartHour'); - } - - /** - * Returns the currently defined custom schedule. This is only applicable when the scheduling mode is - * SCAN_SCHEDULING_MODE_MANUAL and the manual type is set to MANUAL_SCHEDULING_CUSTOM. - * - * @return array The array will be of the format array(0 => array(0 => 0, 1 => 0 ... 23 => 0), ... 6 => array(...)) - */ - public function customSchedule() { - $normalizedSchedule = array_fill(0, 7, array_fill(0, 24, 0)); - $storedSchedule = wfConfig::get_ser('scanSched', array()); - if (is_array($storedSchedule) && !empty($storedSchedule) && is_array($storedSchedule[0])) { - foreach ($storedSchedule as $dayNumber => $day) { - foreach ($day as $hourNumber => $enabled) { - $normalizedSchedule[$dayNumber][$hourNumber] = wfUtils::truthyToInt($enabled); - } - } - } - return $normalizedSchedule; - } - - /** - * Returns an associative array containing the current state each scan stage and its corresponding status. - * - * @return array - */ - public function stageStatus() { - $status = $this->_defaultStageStatuses(); - $runningStatus = wfConfig::get_ser('scanStageStatuses', array(), false); - $status = array_merge($status, $runningStatus); - - foreach ($status as $stage => &$value) { //Convert value array into status only - $value = $value['status']; - if (!$this->isRunning() && $value == self::STATUS_RUNNING) { - $value = self::STATUS_PENDING; - } - } - - return $status; - } - - /** - * Returns an array of all scan options for the given stage that are enabled. - * - * @param string $stage One of the STAGE_ constants - * @return array - */ - private function _scanJobsForStage($stage) { - $always = array(); - $options = array(); - switch ($stage) { - case self::STAGE_SPAMVERTISING_CHECKS: - $options = array( - 'spamvertizeCheck', - ); - break; - case self::STAGE_SPAM_CHECK: - $options = array( - 'checkSpamIP', - ); - break; - case self::STAGE_BLACKLIST_CHECK: - $options = array( - 'scansEnabled_checkGSB', - ); - break; - case self::STAGE_SERVER_STATE: - if ($this->scanType() != self::SCAN_TYPE_QUICK) { - $always = array( - 'checkSkippedFiles', - ); - } - $options = array( - 'scansEnabled_checkHowGetIPs', - 'scansEnabled_diskSpace', - 'scansEnabled_wafStatus', - 'scansEnabled_geoipSupport', - ); - break; - case self::STAGE_FILE_CHANGES: - $options = array( - 'scansEnabled_core', - 'scansEnabled_themes', - 'scansEnabled_plugins', - 'scansEnabled_coreUnknown', - ); - break; - case self::STAGE_PUBLIC_FILES: - $options = array( - 'scansEnabled_checkReadableConfig', - 'scansEnabled_suspectedFiles', - ); - break; - case self::STAGE_MALWARE_SCAN: - $options = array( - 'scansEnabled_malware', - 'scansEnabled_fileContents', - ); - break; - case self::STAGE_CONTENT_SAFETY: - $options = array( - 'scansEnabled_posts', - 'scansEnabled_comments', - 'scansEnabled_fileContentsGSB', - ); - break; - case self::STAGE_PASSWORD_STRENGTH: - $options = array( - 'scansEnabled_passwds', - ); - break; - case self::STAGE_VULNERABILITY_SCAN: - $options = array( - 'scansEnabled_oldVersions', - ); - break; - case self::STAGE_OPTIONS_AUDIT: - $options = array( - 'scansEnabled_suspiciousOptions', - 'scansEnabled_suspiciousAdminUsers', - ); - break; - } - - $enabledOptions = $this->scanOptions(); - $filteredOptions = array(); - foreach ($options as $o) { - if (isset($enabledOptions[$o]) && $enabledOptions[$o]) { - $filteredOptions[] = $o; - } - } - - return array_merge($filteredOptions, $always); - } - - /** - * Returns an associative array containing each scan stage's default state. The keys are the stage identifiers and the value - * is an array in the format - * array( - * 'started' => the number of tasks for this stage that have started (initially 0), - * 'finished' => the number of tasks that have started and finished (initially 0), - * 'expected' => the expected number of tasks to run for this stage (based on the scan type and options enabled) - * ) - * - * @return array - */ - private function _defaultStageStatuses() { - $status = array( - self::STAGE_SPAMVERTISING_CHECKS => array('status' => ($this->isPremiumScan() ? self::STATUS_PENDING : self::STATUS_PREMIUM), 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_SPAM_CHECK => array('status' => ($this->isPremiumScan() ? self::STATUS_PENDING : self::STATUS_PREMIUM), 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_BLACKLIST_CHECK => array('status' => ($this->isPremiumScan() ? self::STATUS_PENDING : self::STATUS_PREMIUM), 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_SERVER_STATE => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_FILE_CHANGES => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_PUBLIC_FILES => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_MALWARE_SCAN => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_CONTENT_SAFETY => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_PASSWORD_STRENGTH => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_VULNERABILITY_SCAN => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - self::STAGE_OPTIONS_AUDIT => array('status' => self::STATUS_PENDING, 'started' => 0, 'finished' => 0, 'expected' => 0), - ); - - foreach ($status as $stage => &$parameters) { - if ($parameters['status'] == self::STATUS_PREMIUM) { - continue; - } - - $jobs = $this->_scanJobsForStage($stage); - if (count($jobs)) { - $parameters['expected'] = count($jobs); - } - else { - $parameters['status'] = self::STATUS_DISABLED; - } - } - - return $status; - } - - /** - * Resets the state of the scan stage status record. - */ - public function resetStages() { - if ($this->scanType() == self::SCAN_TYPE_QUICK) { //Suppress for quick scans - return; - } - wfConfig::set_ser('scanStageStatuses', $this->_defaultStageStatuses(), false, wfConfig::DONT_AUTOLOAD); - } - - /** - * Increments the stage started counter and marks it as running if not already in that state. - * - * @param string $stageID One of the STAGE_ constants - */ - public function startStage($stageID) { - if ($this->scanType() == self::SCAN_TYPE_QUICK) { //Suppress for quick scans - return; - } - - $runningStatus = wfConfig::get_ser('scanStageStatuses', array(), false); - if ($runningStatus[$stageID]['status'] != self::STATUS_RUNNING_WARNING) { - $runningStatus[$stageID]['status'] = self::STATUS_RUNNING; - } - - $runningStatus[$stageID]['started'] += 1; - wfConfig::set_ser('scanStageStatuses', $runningStatus, false, wfConfig::DONT_AUTOLOAD); - if (wfCentral::isConnected()) { - wfCentral::updateScanStatus($runningStatus); - } - } - - /** - * Increments the stage finished counter and updates the stage status according to whether it's fully finished or encountered a negative status. - * - * @param string $stageID One of the STAGE_ constants. - * @param string $status One of the wfIssues::STATUS_ constants - */ - public function completeStage($stageID, $status) { - if ($this->scanType() == self::SCAN_TYPE_QUICK) { //Suppress for quick scans - return; - } - - $runningStatus = wfConfig::get_ser('scanStageStatuses', array(), false); - - if ($runningStatus[$stageID]['status'] == self::STATUS_RUNNING && ($status == wfIssues::STATUS_PROBLEM)) { - $runningStatus[$stageID]['status'] = self::STATUS_RUNNING_WARNING; - } - - $runningStatus[$stageID]['finished'] += 1; - if ($runningStatus[$stageID]['finished'] >= $runningStatus[$stageID]['expected']) { - if ($runningStatus[$stageID]['status'] == self::STATUS_RUNNING) { - $runningStatus[$stageID]['status'] = self::STATUS_COMPLETE_SUCCESS; - } - else { - $runningStatus[$stageID]['status'] = self::STATUS_COMPLETE_WARNING; - } - } - - wfConfig::set_ser('scanStageStatuses', $runningStatus, false, wfConfig::DONT_AUTOLOAD); - if (wfCentral::isConnected()) { - wfCentral::updateScanStatus($runningStatus); - } - - } - - /** - * Returns the selected type of the scan. - * - * @return string - */ - public function scanType() { - switch ($this->_scanType) { - case self::SCAN_TYPE_QUICK://SCAN_TYPE_QUICK is not user-selectable - case self::SCAN_TYPE_LIMITED: - case self::SCAN_TYPE_STANDARD: - case self::SCAN_TYPE_HIGH_SENSITIVITY: - case self::SCAN_TYPE_CUSTOM: - return $this->_scanType; - } - return self::SCAN_TYPE_STANDARD; - } - - /** - * Returns a normalized percentage (i.e., in the range [0, 1]) to the corresponding display percentage - * based on license type. - * - * @param float $percentage - * @return float - */ - protected function _normalizedPercentageToDisplay($percentage) { - if ($this->isPremiumScan()) { - return round($percentage, 2); - } - - return round($percentage * 0.70, 2); - } - - /** - * Returns a normalized percentage (i.e., in the range [0, 1]) for the scan type status indicator. - * - * @return float - */ - public function scanTypeStatus() { - $isFree = !wfConfig::get('isPaid'); - $weights = self::_scanOptionWeights(); - $options = $this->scanOptions(); - $score = 0.0; - $premiumOptions = self::_premiumScanOptions(); - foreach ($options as $key => $value) { - if ($isFree && array_search($key, $premiumOptions) !== false) { - continue; - } - - if ($value) { - $score += $weights[$key]; - } - } - return $this->_normalizedPercentageToDisplay($score); - } - - public function scanTypeStatusList() { - $isFree = !wfConfig::get('isPaid'); - $weights = self::_scanOptionWeights(); - $options = $this->scanOptions(); - $disabledOptionCount = 0; - $premiumDisabledOptionCount = 0; - $percentage = 0.0; - $premiumPercentage = 0.0; - $premiumOptions = self::_premiumScanOptions(); - $statusList = array(); - foreach ($options as $key => $value) { - if ($isFree && array_search($key, $premiumOptions) !== false) { - $premiumPercentage += $weights[$key]; - $premiumDisabledOptionCount++; - continue; - } - - if (!$value && $weights[$key] > 0) { - $percentage += $weights[$key]; - $disabledOptionCount++; - } - } - - $remainingPercentage = 1 - $this->scanTypeStatus(); - if ($isFree) { - $remainingPercentage -= 0.30; - $statusList[] = array( - 'percentage' => 0.30, - 'title' => __('Enable Premium Scan Signatures.', 'wordfence'), - ); - } - - if ($premiumPercentage > 0) { - $subtraction = min($this->_normalizedPercentageToDisplay($premiumPercentage), $remainingPercentage); - $remainingPercentage -= $subtraction; - $statusList[] = array( - 'percentage' => $subtraction, - 'title' => __('Enable Premium Reputation Checks.', 'wordfence'), - ); - } - - if ($percentage > 0) { - $subtraction = min($this->_normalizedPercentageToDisplay($percentage), $remainingPercentage); - $statusList[] = array( - 'percentage' => $subtraction, - 'title' => sprintf(_n('Enable %d scan option.', 'Enable %d scan options.', $disabledOptionCount,'wordfence'), number_format_i18n($disabledOptionCount)), - ); - } - - return $statusList; - } - /** - * Returns the malware signature feed that is in use. - * - * @return string - */ - public function signatureMode() { - if ($this->isPremiumScan()) { - return self::SIGNATURE_MODE_PREMIUM; - } - return self::SIGNATURE_MODE_COMMUNITY; - } - - /** - * Returns a normalized percentage (i.e., in the range [0, 1]) for the reputation status indicator. - * - * @return float - */ - public function reputationStatus() { - $score = 0.0; - if ($this->isPremiumScan()) { - $options = $this->scanOptions(); - if ($options['spamvertizeCheck']) { $score += 0.333; } - if ($options['checkSpamIP']) { $score += 0.333; } - if ($options['scansEnabled_checkGSB']) { $score += 0.333; } - } - return round($score, 2); - } - - /** - * @return array - */ - public function reputationStatusList() { - $statusList = array(); - $options = $this->scanOptions(); - - $reputationChecks = array( - 'spamvertizeCheck' => __('Enable scan option to check if this website is being "Spamvertised".', 'wordfence'), - 'checkSpamIP' => __('Enable scan option to check if your website IP is generating spam.', 'wordfence'), - 'scansEnabled_checkGSB' => __('Enable scan option to check if your website is on a domain blocklist.', 'wordfence'), - ); - - foreach ($reputationChecks as $option => $optionLabel) { - if (!$this->isPremiumScan() || !$options[$option]) { - $statusList[] = array( - 'percentage' => round(1 / count($reputationChecks), 2), - 'title' => $optionLabel, - ); - } - } - return $statusList; - } - - /** - * Returns the options for the configured scan type. - * - * @return array - */ - public function scanOptions() { - switch ($this->scanType()) { - case self::SCAN_TYPE_QUICK: - return self::quickScanTypeOptions(); - case self::SCAN_TYPE_LIMITED: - return self::limitedScanTypeOptions(); - case self::SCAN_TYPE_STANDARD: - return self::standardScanTypeOptions(); - case self::SCAN_TYPE_HIGH_SENSITIVITY: - return self::highSensitivityScanTypeOptions(); - case self::SCAN_TYPE_CUSTOM: - return self::customScanTypeOptions(); - } - } - - /** - * Returns the array of jobs for the scan type. - * - * @return array - */ - public function jobs() { - $options = $this->scanOptions(); - $preferredOrder = array( - 'checkSpamvertized' => array('spamvertizeCheck'), - 'checkSpamIP' => array('checkSpamIP'), - 'checkGSB' => array('scansEnabled_checkGSB'), - 'checkHowGetIPs' => array('scansEnabled_checkHowGetIPs'), - 'diskSpace' => array('scansEnabled_diskSpace'), - 'wafStatus' => array('scansEnabled_wafStatus'), - 'geoipSupport' => array('scansEnabled_geoipSupport'), - 'checkSkippedFiles' => ($this->scanType() != self::SCAN_TYPE_QUICK), //Always runs except for quick - 'knownFiles' => ($this->scanType() != self::SCAN_TYPE_QUICK), //Always runs except for quick, options are scansEnabled_core, scansEnabled_themes, scansEnabled_plugins, scansEnabled_coreUnknown, scansEnabled_malware - 'checkReadableConfig' => array('scansEnabled_checkReadableConfig'), - 'fileContents' => ($this->scanType() != self::SCAN_TYPE_QUICK), //Always runs except for quick, options are scansEnabled_fileContents and scansEnabled_fileContentsGSB - 'suspectedFiles' => array('scansEnabled_suspectedFiles'), - 'posts' => array('scansEnabled_posts'), - 'comments' => array('scansEnabled_comments'), - 'passwds' => array('scansEnabled_passwds'), - 'oldVersions' => array('scansEnabled_oldVersions'), - 'suspiciousAdminUsers' => array('scansEnabled_suspiciousAdminUsers'), - 'suspiciousOptions' => array('scansEnabled_suspiciousOptions'), - ); - - $jobs = array(); - foreach ($preferredOrder as $job => $enabler) { - if ($enabler === true) { - $jobs[] = $job; - } - else if (is_array($enabler)) { - foreach ($enabler as $o) { - if ($options[$o]) { - $jobs[] = $job; - break; - } - } - } - } - return $jobs; - } - - /** - * Returns whether or not the scanner should use its low resource mode. - * - * @return bool - */ - public function useLowResourceScanning() { - $options = $this->scanOptions(); - return $options['lowResourceScansEnabled']; - } - - /** - * Returns the array of user-defined malware signatures for use by the scanner. - * - * @return array - */ - public function userScanSignatures() { - $options = $this->scanOptions(); - $value = $options['scan_include_extra']; - $signatures = array(); - if (!empty($value)) { - $regexs = explode("\n", $value); - $id = 1000001; - foreach ($regexs as $r) { - $r = rtrim($r, "\r"); - if (preg_match('/' . $r . '/i', "") !== false) { - $signatures[] = array($id++, time(), $r, __('User defined scan pattern', 'wordfence')); - } - } - } - return $signatures; - } - - /** - * Returns whether or not the scanner should check files outside of the WordPress installation. - * - * @return bool - */ - public function scanOutsideWordPress() { - $options = $this->scanOptions(); - return $options['other_scanOutside']; - } - - /** - * Returns the cleaned up array of user-excluded scan paths and patterns. - * - * @return array - */ - public function userExclusions() { - $options = $this->scanOptions(); - $value = $options['scan_exclude']; - return explode("\n", wfUtils::cleanupOneEntryPerLine($value)); - } - - /** - * Fetches the scan summary items into the internal cache. - */ - private function _fetchSummaryItems() { - if ($this->_summary !== false) { - return; - } - - $this->_summary = wfConfig::get_ser('wf_summaryItems', array()); - } - - /** - * Writes the scan summary cache to permanent storage. - */ - private function _saveSummaryItems() { - if ($this->_summary !== false && $this->_dirty) { - $this->_summary['lastUpdate'] = time(); - wfConfig::set_ser('wf_summaryItems', $this->_summary); - } - $this->_dirty = false; - } - - /** - * Saves the scan summary cache if it has been more than two seconds since the last update. - * - * @return bool Whether or not it saved. - */ - private function _maybeSaveSummaryItems() { - if ($this->_summary !== false && $this->_summary['lastUpdate'] < (time() - 2)) { - $this->_saveSummaryItems(); - return true; - } - return false; - } - - /** - * Populates the scan summary with the default counters. - */ - public function resetSummaryItems() { - global $wpdb; - - $this->_summary = array(); - $this->_summary[self::SUMMARY_SCANNED_POSTS] = 0; - $this->_summary[self::SUMMARY_SCANNED_COMMENTS] = 0; - $this->_summary[self::SUMMARY_SCANNED_FILES] = 0; - $this->_summary[self::SUMMARY_SCANNED_PLUGINS] = 0; - $this->_summary[self::SUMMARY_SCANNED_THEMES] = 0; - $this->_summary[self::SUMMARY_SCANNED_USERS] = 0; - $this->_summary[self::SUMMARY_SCANNED_URLS] = 0; - - $this->_dirty = true; - $this->_saveSummaryItems(); - } - - /** - * Forces a save of the scan summary cache. - */ - public function flushSummaryItems() { - $this->_saveSummaryItems(); - } - - /** - * Returns the corresponding summary value for $key or $default if not found. - * - * @param $key - * @param mixed $default The value returned if there is no value for $key. - * @return mixed - */ - public function getSummaryItem($key, $default = false) { - $this->_fetchSummaryItems(); - if (isset($this->_summary[$key])) { - return $this->_summary[$key]; - } - return $default; - } - - /** - * Sets the summary item $key as $value. - * - * @param $key - * @param $value - */ - public function setSummaryItem($key, $value) { - $this->_fetchSummaryItems(); - $this->_summary[$key] = $value; - $this->_dirty = true; - - if (!$this->_maybeSaveSummaryItems() && !$this->_destructRegistered) { - register_shutdown_function(array($this, 'flushSummaryItems')); - $this->_destructRegistered = true; - } - } - - /** - * Atomically increments the summary item under $key by $value. - * - * @param $key - * @param int $value - */ - public function incrementSummaryItem($key, $value = 1) { - if ($value == 0) { return; } - $this->_fetchSummaryItems(); - if (isset($this->_summary[$key])) { - $this->_summary[$key] += $value; - $this->_dirty = true; - - if (!$this->_maybeSaveSummaryItems() && !$this->_destructRegistered) { - register_shutdown_function(array($this, 'flushSummaryItems')); - $this->_destructRegistered = true; - } - } - } - - /** - * Schedules a single scan for the given time. If $originalTime is provided, it will be associated with the cron. - * - * @param $futureTime - * @param bool|int $originalTime - */ - public function scheduleSingleScan($futureTime, $originalTime = false) { - if (is_main_site()) { // Removed ability to activate on network site in v5.3.12 - if ($originalTime === false) { - $originalTime = $futureTime; - } - wp_schedule_single_event($futureTime, 'wordfence_start_scheduled_scan', array((int) $originalTime)); - - //Saving our own copy of the schedule because the wp-cron functions all require the args list to act - $allScansScheduled = wfConfig::get_ser('allScansScheduled', array()); - $allScansScheduled[] = array('timestamp' => $futureTime, 'args' => array((int) $originalTime)); - wfConfig::set_ser('allScansScheduled', $allScansScheduled); - } - } - - /** - * Clears all scheduled scan cron jobs and re-creates them. - */ - public function scheduleScans() { - $this->unscheduleAllScans(); - if (!$this->isEnabled()) { - return; - } - - if ($this->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_MANUAL) { - //Generate a two-week schedule - $manualType = $this->manualSchedulingType(); - $preferredHour = $this->manualSchedulingStartHour(); - switch ($manualType) { - case self::MANUAL_SCHEDULING_ONCE_DAILY: - $schedule = array_fill(0, 14, array_fill(0, 24, 0)); - foreach ($schedule as $dayNumber => &$day) { - $day[$preferredHour] = 1; - } - break; - case self::MANUAL_SCHEDULING_TWICE_DAILY: - $schedule = array_fill(0, 14, array_fill(0, 24, 0)); - foreach ($schedule as $dayNumber => &$day) { - $day[$preferredHour] = 1; - $day[($preferredHour + 12) % 24] = 1; - } - break; - case self::MANUAL_SCHEDULING_EVERY_OTHER_DAY: - $baseDay = floor(time() / 86400); - $schedule = array_fill(0, 14, array_fill(0, 24, 0)); - foreach ($schedule as $dayNumber => &$day) { - if (($baseDay + $dayNumber) % 2) { - $day[$preferredHour] = 1; - } - } - break; - case self::MANUAL_SCHEDULING_WEEKDAYS: - $schedule = array_fill(0, 14, array_fill(0, 24, 0)); - foreach ($schedule as $dayNumber => &$day) { - if ($dayNumber > 0 && $dayNumber < 6) { - $day[$preferredHour] = 1; - } - } - break; - case self::MANUAL_SCHEDULING_WEEKENDS: - $schedule = array_fill(0, 14, array_fill(0, 24, 0)); - foreach ($schedule as $dayNumber => &$day) { - if ($dayNumber == 0 || $dayNumber == 6) { - $day[$preferredHour] = 1; - } - } - break; - case self::MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS: - $schedule = array_fill(0, 14, array_fill(0, 24, 0)); - foreach ($schedule as $dayNumber => &$day) { - if ($dayNumber == 0 || $dayNumber == 6 || ($dayNumber % 2)) { - $day[$preferredHour] = 1; - } - } - break; - case self::MANUAL_SCHEDULING_CUSTOM: - $oneWeekSchedule = $this->customSchedule(); - $schedule = array(); - foreach ($oneWeekSchedule as $day) { $schedule[] = $day; } - foreach ($oneWeekSchedule as $day) { $schedule[] = $day; } - break; - } - - $now = time(); - $tzOffset = wfUtils::formatLocalTime('Z', $now); - - //Apply the time zone shift so the start times align to the server's time zone - $shiftedSchedule = array_fill(0, 14, array()); - foreach ($schedule as $dayNumber => $day) { - foreach ($day as $hourNumber => $enabled) { - if ($enabled) { - $effectiveHour = round(($hourNumber * 3600 - $tzOffset) / 3600, 2); //round() rather than floor() to account for fractional time zones - $wrappedHour = ($effectiveHour + 24) % 24; - if ($effectiveHour < 0) { - if ($dayNumber > 0) { - $shiftedSchedule[$dayNumber - 1][$wrappedHour] = 1; - } - } - else if ($effectiveHour > 23) { - if ($dayNumber < count($schedule) - 1) { - $shiftedSchedule[$dayNumber + 1][$wrappedHour] = 1; - } - } - else { - $shiftedSchedule[$dayNumber][$effectiveHour] = 1; - } - } - } - } - $schedule = $shiftedSchedule; - - //Trim out all but an 8-day period - $currentDayOfWeekUTC = date('w', $now); - $currentHourUTC = date('G', $now); - $periodStart = floor($now / 86400) * 86400 - $currentDayOfWeekUTC * 86400; - $schedule = array_slice($schedule, $currentDayOfWeekUTC, null, true); - $schedule = array_slice($schedule, 0, 8, true); - - //Schedule them - foreach ($schedule as $dayNumber => $day) { - foreach ($day as $hourNumber => $enabled) { - if ($enabled) { - if ($dayNumber == $currentDayOfWeekUTC && $currentHourUTC > $hourNumber) { //It's today and we've already passed its hour, skip it - continue; - } - else if ($dayNumber > 6 && ($dayNumber % 7) == $currentDayOfWeekUTC && $currentHourUTC <= $hourNumber) { //It's one week from today but beyond the current hour, skip it this cycle - continue; - } - - $scanTime = $periodStart + $dayNumber * 86400 + $hourNumber * 3600 + wfWAFUtils::random_int(0, 3600); - wordfence::status(4, 'info', sprintf( - /* translators: 1. Day of week. 2. Hour of day. 3. Localized date. */ - __("Scheduled time for day %s hour %s is: %s", 'wordfence'), - $dayNumber, - $hourNumber, - wfUtils::formatLocalTime('l jS \of F Y h:i:s A P', $scanTime) - )); - $this->scheduleSingleScan($scanTime); - } - } - } - } - else { - $noc1ScanSchedule = wfConfig::get_ser('noc1ScanSchedule', array()); - foreach ($noc1ScanSchedule as $timestamp) { - $timestamp = wfUtils::denormalizedTime($timestamp); - if ($timestamp > time()) { - $this->scheduleSingleScan($timestamp); - } - } - } - } - - public function unscheduleAllScans() { - $allScansScheduled = wfConfig::get_ser('allScansScheduled', array()); - foreach ($allScansScheduled as $entry) { - wp_unschedule_event($entry['timestamp'], 'wordfence_start_scheduled_scan', $entry['args']); - } - wp_clear_scheduled_hook('wordfence_start_scheduled_scan'); - wfConfig::set_ser('allScansScheduled', array()); - } - - public function lastScanTime() { - return wfConfig::get('scanTime'); - } - - public function recordLastScanTime() { - wfConfig::set('scanTime', microtime(true)); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/.htaccess b/wp/wp-content/plugins/wordfence/modules/login-security/classes/.htaccess deleted file mode 100644 index d16a02be..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/.htaccess +++ /dev/null @@ -1,16 +0,0 @@ -<IfModule mod_rewrite.c> - RewriteEngine On - RewriteCond %{REQUEST_URI} \.php$ - RewriteRule .* - [F,L,NC] -</IfModule> -<IfModule !mod_rewrite.c> - <FilesMatch "\.php$"> - <IfModule mod_authz_core.c> - Require all denied - </IfModule> - <IfModule !mod_authz_core.c> - Order deny,allow - Deny from all - </IfModule> - </FilesMatch> -</IfModule> diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/ajax.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/ajax.php deleted file mode 100644 index 11d020c3..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/ajax.php +++ /dev/null @@ -1,558 +0,0 @@ -<?php - -namespace WordfenceLS; - -use WordfenceLS\Crypto\Model_JWT; -use WordfenceLS\Crypto\Model_Symmetric; - -class Controller_AJAX { - - const MAX_USERS_TO_NOTIFY = 100; - - protected $_actions = null; //Populated on init - - /** - * Returns the singleton Controller_AJAX. - * - * @return Controller_AJAX - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_AJAX(); - } - return $_shared; - } - - public function init() { - $this->_actions = array( - 'authenticate' => array( - 'handler' => array($this, '_ajax_authenticate_callback'), - 'nopriv' => true, - 'nonce' => false, - 'permissions' => array(), //Format is 'permission' => 'error message' - 'required_parameters' => array(), - ), - 'register_support' => array( - 'handler' => array($this, '_ajax_register_support_callback'), - 'nopriv' => true, - 'nonce' => false, - 'permissions' => array(), - 'required_parameters' => array('wfls-message-nonce', 'wfls-message'), - ), - 'activate' => array( - 'handler' => array($this, '_ajax_activate_callback'), - 'permissions' => array(), - 'required_parameters' => array('nonce', 'secret', 'recovery', 'code', 'user'), - ), - 'deactivate' => array( - 'handler' => array($this, '_ajax_deactivate_callback'), - 'permissions' => array(), - 'required_parameters' => array('nonce', 'user'), - ), - 'regenerate' => array( - 'handler' => array($this, '_ajax_regenerate_callback'), - 'permissions' => array(), - 'required_parameters' => array('nonce', 'user'), - ), - 'save_options' => array( - 'handler' => array($this, '_ajax_save_options_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to change options.', 'wordfence')), - 'required_parameters' => array('nonce', 'changes'), - ), - 'send_grace_period_notification' => array( - 'handler' => array($this, '_ajax_send_grace_period_notification_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to send notifications.', 'wordfence')), - 'required_parameters' => array('nonce', 'role', 'url'), - ), - 'update_ip_preview' => array( - 'handler' => array($this, '_ajax_update_ip_preview_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to change options.', 'wordfence')), - 'required_parameters' => array('nonce', 'ip_source', 'ip_source_trusted_proxies'), - ), - 'dismiss_notice' => array( - 'handler' => array($this, '_ajax_dismiss_notice_callback'), - 'permissions' => array(), - 'required_parameters' => array('nonce', 'id'), - ), - 'reset_recaptcha_stats' => array( - 'handler' => array($this, '_ajax_reset_recaptcha_stats_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to reset reCAPTCHA statistics.', 'wordfence')), - 'required_parameters' => array('nonce'), - ), - 'reset_2fa_grace_period' => array ( - 'handler' => array($this, '_ajax_reset_2fa_grace_period_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to reset the 2FA grace period.', 'wordfence')), - 'required_parameters' => array('nonce', 'user_id') - ), - 'revoke_2fa_grace_period' => array ( - 'handler' => array($this, '_ajax_revoke_2fa_grace_period_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to revoke the 2FA grace period.', 'wordfence')), - 'required_parameters' => array('nonce', 'user_id') - ), - 'reset_ntp_failure_count' => array( - 'handler' => array($this, '_ajax_reset_ntp_failure_count_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to reset the NTP failure count.', 'wordfence')), - 'required_parameters' => array(), - ), - 'disable_ntp' => array( - 'handler' => array($this, '_ajax_disable_ntp_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to disable NTP.', 'wordfence')), - 'required_parameters' => array(), - ), - 'dismiss_persistent_notice' => array( - 'handler' => array($this, '_ajax_dismiss_persistent_notice_callback'), - 'permissions' => array(Controller_Permissions::CAP_MANAGE_SETTINGS => __('You do not have permission to dismiss this notice.', 'wordfence')), - 'required_parameters' => array('nonce', 'notice_id') - ) - ); - - $this->_init_actions(); - } - - public function _init_actions() { - foreach ($this->_actions as $action => $parameters) { - if (isset($parameters['nopriv']) && $parameters['nopriv']) { - add_action('wp_ajax_nopriv_wordfence_ls_' . $action, array($this, '_ajax_handler')); - } - add_action('wp_ajax_wordfence_ls_' . $action, array($this, '_ajax_handler')); - } - } - - /** - * This is a convenience function for sending a JSON response and ensuring that execution stops after sending - * since wp_die() can be interrupted. - * - * @param $response - * @param int|null $status_code - */ - public static function send_json($response, $status_code = null) { - wp_send_json($response, $status_code); - die(); - } - - public function _ajax_handler() { - $action = (isset($_POST['action']) && is_string($_POST['action']) && $_POST['action']) ? $_POST['action'] : $_GET['action']; - if (preg_match('~wordfence_ls_([a-zA-Z_0-9]+)$~', $action, $matches)) { - $action = $matches[1]; - if (!isset($this->_actions[$action])) { - self::send_json(array('error' => esc_html__('An unknown action was provided.', 'wordfence'))); - } - - $parameters = $this->_actions[$action]; - if (!empty($parameters['required_parameters'])) { - foreach ($parameters['required_parameters'] as $k) { - if (!isset($_POST[$k])) { - self::send_json(array('error' => esc_html__('An expected parameter was not provided.', 'wordfence'))); - } - } - } - - if (!isset($parameters['nonce']) || $parameters['nonce']) { - $nonce = (isset($_POST['nonce']) && is_string($_POST['nonce']) && $_POST['nonce']) ? $_POST['nonce'] : $_GET['nonce']; - if (!is_string($nonce) || !wp_verify_nonce($nonce, 'wp-ajax')) { - self::send_json(array('error' => esc_html__('Your browser sent an invalid security token. Please try reloading this page.', 'wordfence'), 'tokenInvalid' => 1)); - } - } - - if (!empty($parameters['permissions'])) { - $user = wp_get_current_user(); - foreach ($parameters['permissions'] as $permission => $error) { - if (!user_can($user, $permission)) { - self::send_json(array('error' => $error)); - } - } - } - - call_user_func($parameters['handler']); - } - } - - public function _ajax_authenticate_callback() { - $credentialKeys = array( - 'log' => 'pwd', - 'username' => 'password' - ); - $username = null; - $password = null; - foreach ($credentialKeys as $usernameKey => $passwordKey) { - if (array_key_exists($usernameKey, $_POST) && array_key_exists($passwordKey, $_POST) && is_string($_POST[$usernameKey]) && is_string($_POST[$passwordKey])) { - $username = $_POST[$usernameKey]; - $password = $_POST[$passwordKey]; - break; - } - } - if (empty($username) || empty($password)) { - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: A username and password must be provided. <a href="%s" title="Password Lost and Found">Lost your password</a>?', 'wordfence'), wp_lostpassword_url()), array('strong'=>array(), 'a'=>array('href'=>array(), 'title'=>array()))))); - } - - $legacy2FAActive = Controller_WordfenceLS::shared()->legacy_2fa_active(); - if ($legacy2FAActive) { //Legacy 2FA is active, pass it on to the authenticate filter - self::send_json(array('login' => 1)); - } - - do_action_ref_array('wp_authenticate', array(&$username, &$password)); - - define('WORDFENCE_LS_AUTHENTICATION_CHECK', true); //Prevents our auth filter from recursing - $user = wp_authenticate($username, $password); - if (is_object($user) && ($user instanceof \WP_User)) { - if (!Controller_Users::shared()->has_2fa_active($user) || Controller_Whitelist::shared()->is_whitelisted(Model_Request::current()->ip()) || Controller_Users::shared()->has_remembered_2fa($user) || defined('WORDFENCE_LS_COMBINED_IS_VALID')) { //Not enabled for this user, is whitelisted, has a valid remembered cookie, or has already provided a 2FA code via the password field pass the credentials on to the normal login flow - self::send_json(array('login' => 1)); - } - self::send_json(array('login' => 1, 'two_factor_required' => true)); - } - else if (is_wp_error($user)) { - $errors = array(); - $messages = array(); - $reset = false; - foreach ($user->get_error_codes() as $code) { - if ($code == 'invalid_username' || $code == 'invalid_email' || $code == 'incorrect_password' || $code == 'authentication_failed') { - $errors[] = wp_kses(sprintf(__('<strong>ERROR</strong>: The username or password you entered is incorrect. <a href="%s" title="Password Lost and Found">Lost your password</a>?', 'wordfence'), wp_lostpassword_url()), array('strong'=>array(), 'a'=>array('href'=>array(), 'title'=>array()))); - } - else { - if ($code == 'wfls_twofactor_invalid') { - $reset = true; - } - - $severity = $user->get_error_data($code); - foreach ($user->get_error_messages($code) as $error_message) { - if ($severity == 'message') { - $messages[] = $error_message; - } - else { - $errors[] = $error_message; - } - } - } - } - - if (!empty($errors)) { - $errors = implode('<br>', $errors); - $errors = apply_filters('login_errors', $errors); - self::send_json(array('error' => $errors, 'reset' => $reset)); - } - - if (!empty($messages)) { - $messages = implode('<br>', $messages); - $messages = apply_filters('login_errors', $messages); - self::send_json(array('message' => $messages, 'reset' => $reset)); - } - } - - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: The username or password you entered is incorrect. <a href="%s" title="Password Lost and Found">Lost your password</a>?', 'wordfence'), wp_lostpassword_url()), array('strong'=>array(), 'a'=>array('href'=>array(), 'title'=>array()))))); - } - - public function _ajax_register_support_callback() { - $email = null; - if (array_key_exists('email', $_POST) && is_string($_POST['email'])) { - $email = $_POST['email']; - } - else if (array_key_exists('user_email', $_POST) && is_string($_POST['user_email'])) { - $email = $_POST['user_email']; - } - if ( - $email === null || - !isset($_POST['wfls-message']) || !is_string($_POST['wfls-message']) || - !isset($_POST['wfls-message-nonce']) || !is_string($_POST['wfls-message-nonce'])) { - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: Unable to send message. Please refresh the page and try again.', 'wordfence')), array('strong'=>array())))); - } - - $email = sanitize_email($email); - $login = ''; - if (array_key_exists('user_login', $_POST) && is_string($_POST['user_login'])) - $login = sanitize_user($_POST['user_login']); - $message = strip_tags($_POST['wfls-message']); - $nonce = $_POST['wfls-message-nonce']; - - if ((isset($_POST['user_login']) && empty($login)) || empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) { - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: Unable to send message. Please refresh the page and try again.', 'wordfence')), array('strong'=>array())))); - } - - $jwt = Model_JWT::decode_jwt($_POST['wfls-message-nonce']); - if ($jwt && isset($jwt->payload['ip']) && isset($jwt->payload['score'])) { - $decryptedIP = Model_Symmetric::decrypt($jwt->payload['ip']); - $decryptedScore = Model_Symmetric::decrypt($jwt->payload['score']); - if ($decryptedIP === false || $decryptedScore === false || Model_IP::inet_pton($decryptedIP) !== Model_IP::inet_pton(Model_Request::current()->ip())) { //JWT IP and the current request's IP don't match, refuse the message - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: Unable to send message. Please refresh the page and try again.', 'wordfence')), array('strong'=>array())))); - } - - $identifier = bin2hex(Model_IP::inet_pton($decryptedIP)); - $tokenBucket = new Model_TokenBucket('rate:' . $identifier, 2, 1 / (6 * Model_TokenBucket::HOUR)); //Maximum of two requests, refilling at a rate of one per six hours - if (!$tokenBucket->consume(1)) { - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: Unable to send message. You have exceeded the maximum number of messages that may be sent at this time. Please try again later.', 'wordfence')), array('strong'=>array())))); - } - - $email = array( - 'to' => get_site_option('admin_email'), - 'subject' => __('Blocked User Registration Contact Form', 'wordfence'), - 'body' => sprintf(__("A visitor blocked from registration sent the following message.\n\n----------------------------------------\n\nIP: %s\nUsername: %s\nEmail: %s\nreCAPTCHA Score: %f\n\n----------------------------------------\n\n%s", 'wordfence'), $decryptedIP, $login, $email, $decryptedScore, $message), - 'headers' => '', - ); - $success = wp_mail($email['to'], $email['subject'], $email['body'], $email['headers']); - if ($success) { - self::send_json(array('message' => wp_kses(sprintf(__('<strong>MESSAGE SENT</strong>: Your message was sent to the site owner.', 'wordfence')), array('strong'=>array())))); - } - - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: An error occurred while sending the message. Please try again.', 'wordfence')), array('strong'=>array())))); - } - - self::send_json(array('error' => wp_kses(sprintf(__('<strong>ERROR</strong>: Unable to send message. Please refresh the page and try again.', 'wordfence')), array('strong'=>array())))); - } - - public function _ajax_activate_callback() { - $userID = (int) @$_POST['user']; - $user = wp_get_current_user(); - if ($user->ID != $userID) { - if (!user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS)) { - self::send_json(array('error' => esc_html__('You do not have permission to activate the given user.', 'wordfence'))); - } - else { - $user = new \WP_User($userID); - if (!$user->exists()) { - self::send_json(array('error' => esc_html__('The given user does not exist.', 'wordfence'))); - } - } - } - else if (!user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF)) { - self::send_json(array('error' => esc_html__('You do not have permission to activate 2FA.', 'wordfence'))); - } - - if (Controller_Users::shared()->has_2fa_active($user)) { - self::send_json(array('error' => esc_html__('The given user already has two-factor authentication active.', 'wordfence'))); - } - - $matches = (isset($_POST['secret']) && isset($_POST['code']) && is_string($_POST['secret']) && is_string($_POST['code']) && Controller_TOTP::shared()->check_code($_POST['secret'], $_POST['code'])); - if ($matches === false) { - self::send_json(array('error' => esc_html__('The code provided does not match the expected value. Please verify that the time on your authenticator device is correct and that this server\'s time is correct.', 'wordfence'))); - } - - Controller_TOTP::shared()->activate_2fa($user, $_POST['secret'], $_POST['recovery'], $matches); - Controller_Notices::shared()->remove_notice(false, 'wfls-will-be-required', $user); - self::send_json(array('activated' => 1, 'text' => sprintf(count($_POST['recovery']) == 1 ? esc_html__('%d unused recovery code remains. You may generate a new set by clicking below.', 'wordfence') : esc_html__('%d unused recovery codes remain. You may generate a new set by clicking below.', 'wordfence'), count($_POST['recovery'])))); - } - - public function _ajax_deactivate_callback() { - $userID = (int) @$_POST['user']; - $user = wp_get_current_user(); - if ($user->ID != $userID) { - if (!user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS)) { - self::send_json(array('error' => esc_html__('You do not have permission to deactivate the given user.', 'wordfence'))); - } - else { - $user = new \WP_User($userID); - if (!$user->exists()) { - self::send_json(array('error' => esc_html__('The user does not exist.', 'wordfence'))); - } - } - } - else if (!user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF)) { - self::send_json(array('error' => esc_html__('You do not have permission to deactivate 2FA.', 'wordfence'))); - } - - if (!Controller_Users::shared()->has_2fa_active($user)) { - self::send_json(array('error' => esc_html__('The user specified does not have two-factor authentication active.', 'wordfence'))); - } - - Controller_Users::shared()->deactivate_2fa($user); - self::send_json(array('deactivated' => 1)); - } - - public function _ajax_regenerate_callback() { - $userID = (int) @$_POST['user']; - $user = wp_get_current_user(); - if ($user->ID != $userID) { - if (!user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS)) { - self::send_json(array('error' => esc_html__('You do not have permission to generate new recovery codes for the given user.', 'wordfence'))); - } - else { - $user = new \WP_User($userID); - if (!$user->exists()) { - self::send_json(array('error' => esc_html__('The user does not exist.', 'wordfence'))); - } - } - } - else if (!user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF)) { - self::send_json(array('error' => esc_html__('You do not have permission to generate new recovery codes.', 'wordfence'))); - } - - if (!Controller_Users::shared()->has_2fa_active($user)) { - self::send_json(array('error' => esc_html__('The user specified does not have two-factor authentication active.', 'wordfence'))); - } - - $codes = Controller_Users::shared()->regenerate_recovery_codes($user); - self::send_json(array('regenerated' => 1, 'recovery' => array_map(function($r) { return implode(' ', str_split(bin2hex($r), 4)); }, $codes), 'text' => sprintf(count($codes) == 1 ? esc_html__('%d unused recovery code remains. You may generate a new set by clicking below.', 'wordfence') : esc_html__('%d unused recovery codes remain. You may generate a new set by clicking below.', 'wordfence'), count($codes)))); - } - - public function _ajax_save_options_callback() { - if (!empty($_POST['changes']) && is_string($_POST['changes']) && is_array($changes = json_decode(stripslashes($_POST['changes']), true))) { - try { - $errors = Controller_Settings::shared()->validate_multiple($changes); - if ($errors !== true) { - if (count($errors) == 1) { - $e = array_shift($errors); - self::send_json(array('error' => esc_html(sprintf(__('An error occurred while saving the configuration: %s', 'wordfence'), $e)))); - } - else if (count($errors) > 1) { - $compoundMessage = array(); - foreach ($errors as $e) { - $compoundMessage[] = esc_html($e); - } - self::send_json(array( - 'error' => wp_kses(sprintf(__('Errors occurred while saving the configuration: %s', 'wordfence'), '<ul><li>' . implode('</li><li>', $compoundMessage) . '</li></ul>'), array('ul'=>array(), 'li'=>array())), - 'html' => true, - )); - } - - self::send_json(array( - 'error' => esc_html__('Errors occurred while saving the configuration.', 'wordfence'), - )); - } - - Controller_Settings::shared()->set_multiple($changes); - - if (array_key_exists(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION, $changes) || array_key_exists(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION, $changes)) - Controller_WordfenceLS::shared()->refresh_rewrite_rules(); - - $response = array('success' => true); - return self::send_json($response); - } - catch (\Exception $e) { - self::send_json(array( - 'error' => $e->getMessage(), - )); - } - } - - self::send_json(array( - 'error' => esc_html__('No configuration changes were provided to save.', 'wordfence'), - )); - } - - public function _ajax_send_grace_period_notification_callback() { - $notifyAll = isset($_POST['notify_all']); - $users = Controller_Users::shared()->get_users_by_role($_POST['role'], $notifyAll ? null: self::MAX_USERS_TO_NOTIFY + 1); - $url = $_POST['url']; - if (!empty($url)) { - $url = get_site_url(null, $url); - if (filter_var($url, FILTER_VALIDATE_URL) === false) { - self::send_json(array('error' => esc_html__('The specified URL is invalid.', 'wordfence'))); - } - } - $userCount = count($users); - if (!$notifyAll && $userCount > self::MAX_USERS_TO_NOTIFY) - self::send_json(array('error' => esc_html(sprintf(__('More than %d users exist for the selected role. This notification is not designed to handle large groups of users. In such instances, using a different solution for notifying users of upcoming 2FA requirements is recommended.', 'wordfence'), self::MAX_USERS_TO_NOTIFY)), 'limit_exceeded' => true)); - $sent = 0; - foreach ($users as $user) { - Controller_Users::shared()->requires_2fa($user, $inGracePeriod, $requiredAt); - if ($inGracePeriod && !Controller_Users::shared()->has_2fa_active($user)) { - $subject = sprintf(__('2FA will soon be required on %s', 'wordfence'), home_url()); - $requiredDate = Controller_Time::format_local_time('F j, Y g:i A', $requiredAt); - if (empty($url)) { - $userUrl = (is_multisite() && is_super_admin($user->ID)) ? network_admin_url('admin.php?page=WFLS') : admin_url('admin.php?page=WFLS'); - } - else { - $userUrl = $url; - } - - $message = sprintf( - __("<html><body><p>You do not currently have two-factor authentication active on your account, which will be required beginning %s.</p><p><a href=\"%s\">Configure 2FA</a></p></body></html>", 'wordfence'), - $requiredDate, - htmlentities($userUrl) - ); - - wp_mail($user->user_email, $subject, $message, array('Content-Type: text/html')); - $sent++; - } - } - - if ($userCount == 0) { - self::send_json(array('error' => esc_html__('No users currently exist with the selected role.', 'wordfence'))); - } - else if ($sent == 0) { - self::send_json(array('confirmation' => esc_html__('All users with the selected role already have two-factor authentication activated or have been locked out.', 'wordfence'))); - } - else if ($sent == 1) { - self::send_json(array('confirmation' => esc_html(sprintf(__('A reminder to activate two-factor authentication was sent to %d user.', 'wordfence'), $sent)))); - } - self::send_json(array('confirmation' => esc_html(sprintf(__('A reminder to activate two-factor authentication was sent to %d users.', 'wordfence'), $sent)))); - } - - public function _ajax_update_ip_preview_callback() { - $source = $_POST['ip_source']; - $raw_proxies = $_POST['ip_source_trusted_proxies']; - if (!is_string($source) || !is_string($raw_proxies)) { - die(); - } - - $valid = array(); - $invalid = array(); - $test = preg_split('/[\r\n,]+/', $raw_proxies); - foreach ($test as $value) { - if (strlen($value) > 0) { - if (Model_IP::is_valid_ip($value) || Model_IP::is_valid_cidr_range($value)) { - $valid[] = $value; - } - else { - $invalid[] = $value; - } - } - } - $trusted_proxies = $valid; - - $preview = Model_Request::current()->detected_ip_preview($source, $trusted_proxies); - $ip = Model_Request::current()->ip_for_field($source, $trusted_proxies); - self::send_json(array('ip' => $ip[0], 'preview' => $preview)); - } - - public function _ajax_dismiss_notice_callback() { - Controller_Notices::shared()->remove_notice($_POST['id'], false, wp_get_current_user()); - } - - public function _ajax_reset_recaptcha_stats_callback() { - Controller_Settings::shared()->set_array(Controller_Settings::OPTION_CAPTCHA_STATS, array('counts' => array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 'avg' => 0)); - $response = array('success' => true); - self::send_json($response); - } - - public function _ajax_reset_2fa_grace_period_callback() { - $userId = (int) $_POST['user_id']; - $gracePeriodOverride = array_key_exists('grace_period_override', $_POST) ? (int) $_POST['grace_period_override'] : null; - $user = get_userdata($userId); - if ($user === false) - self::send_json(array('error' => esc_html__('Invalid user specified', 'wordfence'))); - if ($gracePeriodOverride < 0 || $gracePeriodOverride > Controller_Settings::MAX_REQUIRE_2FA_USER_GRACE_PERIOD) - self::send_json(array('error' => esc_html__('Invalid grace period override', 'wordfence'))); - $gracePeriodAllowed = Controller_Users::shared()->get_grace_period_allowed_flag($userId); - if (!$gracePeriodAllowed) - Controller_Users::shared()->allow_grace_period($userId); - if (!Controller_Users::shared()->reset_2fa_grace_period($user, $gracePeriodOverride)) - self::send_json(array('error' => esc_html__('Failed to reset grace period', 'wordfence'))); - self::send_json(array('success' => true)); - } - - public function _ajax_revoke_2fa_grace_period_callback() { - $user = get_userdata((int) $_POST['user_id']); - if ($user === false) - self::send_json(array('error' => esc_html__('Invalid user specified', 'wordfence'))); - Controller_Users::shared()->revoke_grace_period($user); - self::send_json(array('success' => true)); - } - - public function _ajax_reset_ntp_failure_count_callback() { - Controller_Settings::shared()->reset_ntp_failure_count(); - } - - public function _ajax_disable_ntp_callback() { - Controller_Settings::shared()->disable_ntp_cron(); - } - - public function _ajax_dismiss_persistent_notice_callback() { - $userId = get_current_user_id(); - $noticeId = $_POST['notice_id']; - if ($userId !== 0 && Controller_Notices::shared()->dismiss_persistent_notice($userId, $noticeId)) - self::send_json(array('success' => true)); - self::send_json(array( - 'error' => esc_html__('Unable to dismiss notice', 'wordfence') - )); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/captcha.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/captcha.php deleted file mode 100644 index a1bd284b..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/captcha.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Controller_CAPTCHA { - const RESPONSE_MODE_ALLOW = 'allow'; - const RESPONSE_MODE_REQUIRE_VERIFICATION = 'verify'; - - const RECAPTCHA_ENDPOINT = 'https://www.google.com/recaptcha/api/siteverify'; - - /** - * Returns the singleton Controller_CAPTCHA. - * - * @return Controller_CAPTCHA - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_CAPTCHA(); - } - return $_shared; - } - - /** - * Returns whether or not the authentication CAPTCHA is enabled. - * - * @return bool - */ - public function enabled() { - $key = $this->site_key(); - $secret = $this->_secret(); - return Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_AUTH_CAPTCHA) && !empty($key) && !empty($secret); - } - - /** - * Returns the public reCAPTCHA key if set. - * - * @return string|bool - */ - public function site_key() { - return Controller_Settings::shared()->get(Controller_Settings::OPTION_RECAPTCHA_SITE_KEY); - } - - /** - * Returns the private reCAPTCHA secret if set. - * - * @return string|bool - */ - protected function _secret() { - return Controller_Settings::shared()->get(Controller_Settings::OPTION_RECAPTCHA_SECRET); - } - - /** - * Returns the bot/human threshold for comparing the score against, defaulting to 0.5. - * - * @return float - */ - public function threshold() { - return Controller_Settings::shared()->get_float(Controller_Settings::OPTION_RECAPTCHA_THRESHOLD, 0.5); - } - - /** - * Determine whether or not test mode for reCAPTCHA is enabled - * - * @return bool - */ - public function test_mode() { - return Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_CAPTCHA_TEST_MODE); - } - - /** - * Queries the reCAPTCHA endpoint with the given token, verifies the action matches, and returns the corresponding - * score. If validation fails, false is returned. Any other failure (e.g., mangled response or connection dropped) returns 0.0. - * - * @param string $token - * @param string $action - * @param int $timeout - * @return float|false - */ - public function score($token, $action = 'login', $timeout = 10) { - try { - $payload = array( - 'secret' => $this->_secret(), - 'response' => $token, - 'remoteip' => Model_Request::current()->ip(), - ); - - $response = wp_remote_post(self::RECAPTCHA_ENDPOINT, - array( - 'body' => $payload, - 'headers' => array( - 'Referer' => false, - ), - 'timeout' => $timeout, - 'blocking' => true, - )); - - if (!is_wp_error($response)) { - $jsonResponse = wp_remote_retrieve_body($response); - $decoded = @json_decode($jsonResponse, true); - if (is_array($decoded) && isset($decoded['success']) && isset($decoded['score']) && isset($decoded['action'])) { - if ($decoded['success'] && $decoded['action'] == $action) { - return (float) $decoded['score']; - } - return false; - } - } - } - catch (\Exception $e) { - //Fall through - } - - return 0.0; - } - - /** - * Returns true if the score is >= the threshold to be considered a human request. - * - * @param float $score - * @return bool - */ - public function is_human($score) { - if ($this->test_mode()) { - return true; - } - - $threshold = $this->threshold(); - return ($score >= $threshold || abs($score - $threshold) < 0.0001); - } - - /** - * Check if the current request is an XML RPC request - * @return bool - */ - private static function is_xml_rpc() { - return defined('XMLRPC_REQUEST') && XMLRPC_REQUEST; - } - - /** - * Check if captcha is required for the current request - * @return bool - */ - public function is_captcha_required() { - $required = $this->enabled() && !self::is_xml_rpc(); - return apply_filters('wordfence_ls_require_captcha', $required); - } - - /** - * Get the captcha token provided with the current request - * @param string $key if specified, override the default token parameter - * @return string|null the captcha token, if present, null otherwise - */ - public function get_token($key = 'wfls-captcha-token') { - return (isset($_POST[$key]) && is_string($_POST[$key]) && !empty($_POST[$key]) ? $_POST[$key] : null); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/cron.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/cron.php deleted file mode 100644 index b3d9bbc7..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/cron.php +++ /dev/null @@ -1 +0,0 @@ -<?php diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/db.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/db.php deleted file mode 100644 index 49f01abd..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/db.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -namespace WordfenceLS; - -use RuntimeException; - -class Controller_DB { - const TABLE_2FA_SECRETS = 'wfls_2fa_secrets'; - const TABLE_SETTINGS = 'wfls_settings'; - const TABLE_ROLE_COUNTS = 'wfls_role_counts'; - const TABLE_ROLE_COUNTS_TEMPORARY = 'wfls_role_counts_temporary'; - - const SCHEMA_VERSION = 2; - - /** - * Returns the singleton Controller_DB. - * - * @return Controller_DB - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_DB(); - } - return $_shared; - } - - /** - * Returns the table prefix for the main site on multisites and the site itself on single site installations. - * - * @return string - */ - public static function network_prefix() { - global $wpdb; - return $wpdb->base_prefix; - } - - /** - * Returns the table with the site (single site installations) or network (multisite) prefix added. - * - * @param string $table - * @return string - */ - public static function network_table($table) { - return self::network_prefix() . $table; - } - - public function __get($key) { - switch ($key) { - case 'secrets': - return self::network_table(self::TABLE_2FA_SECRETS); - case 'settings': - return self::network_table(self::TABLE_SETTINGS); - case 'role_counts': - return self::network_table(self::TABLE_ROLE_COUNTS); - case 'role_counts_temporary': - return self::network_table(self::TABLE_ROLE_COUNTS_TEMPORARY); - } - - throw new \OutOfBoundsException('Unknown key: ' . $key); - } - - public function install() { - $this->_create_schema(); - - global $wpdb; - $table = $this->secrets; - $wpdb->query($wpdb->prepare("UPDATE `{$table}` SET `vtime` = LEAST(`vtime`, %d)", Controller_Time::time())); - } - - public function uninstall() { - $tables = array(self::TABLE_2FA_SECRETS, self::TABLE_SETTINGS, self::TABLE_ROLE_COUNTS); - foreach ($tables as $table) { - global $wpdb; - $wpdb->query('DROP TABLE IF EXISTS `' . self::network_table($table) . '`'); - } - } - - private function create_table($name, $definition, $temporary = false) { - global $wpdb; - if (is_array($definition)) { - foreach ($definition as $attempt) { - if ($this->create_table($name, $attempt, $temporary)) - return true; - } - return false; - } - else { - return $wpdb->query('CREATE ' . ($temporary ? 'TEMPORARY ' : '') . 'TABLE IF NOT EXISTS `' . self::network_table($name) . '` ' . $definition); - } - } - - private function create_temporary_table($name, $definition) { - if (Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_DISABLE_TEMPORARY_TABLES)) - return false; - if ($this->create_table($name, $definition, true)) - return true; - Controller_Settings::shared()->set(Controller_Settings::OPTION_DISABLE_TEMPORARY_TABLES, true); - return false; - } - - private function get_role_counts_table_definition($engine = null) { - $engineClause = $engine === null ? '' : "ENGINE={$engine}"; - return <<<SQL - ( - serialized_roles VARBINARY(255) NOT NULL, - two_factor_inactive TINYINT(1) NOT NULL, - user_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (serialized_roles, two_factor_inactive) - ) {$engineClause}; -SQL; - } - - private function get_role_counts_table_definition_options() { - return array( - $this->get_role_counts_table_definition('MEMORY'), - $this->get_role_counts_table_definition('MyISAM'), - $this->get_role_counts_table_definition() - ); - } - - protected function _create_schema() { - $tables = array( - self::TABLE_2FA_SECRETS => '( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` bigint(20) unsigned NOT NULL, - `secret` tinyblob NOT NULL, - `recovery` blob NOT NULL, - `ctime` int(10) unsigned NOT NULL, - `vtime` int(10) unsigned NOT NULL, - `mode` enum(\'authenticator\') NOT NULL DEFAULT \'authenticator\', - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8;', - self::TABLE_SETTINGS => '( - `name` varchar(191) NOT NULL DEFAULT \'\', - `value` longblob, - `autoload` enum(\'no\',\'yes\') NOT NULL DEFAULT \'yes\', - PRIMARY KEY (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8;', - self::TABLE_ROLE_COUNTS => $this->get_role_counts_table_definition_options() - ); - - foreach ($tables as $table => $def) { - $this->create_table($table, $def); - } - - Controller_Settings::shared()->set(Controller_Settings::OPTION_SCHEMA_VERSION, self::SCHEMA_VERSION); - } - - public function require_schema_version($version) { - $current = Controller_Settings::shared()->get_int(Controller_Settings::OPTION_SCHEMA_VERSION); - if ($current < $version) { - $this->install(); - } - } - - public function query($query) { - global $wpdb; - if ($wpdb->query($query) === false) - throw new RuntimeException("Failed to execute query: {$query}"); - } - - public function get_wpdb() { - global $wpdb; - return $wpdb; - } - - public function create_temporary_role_counts_table() { - return $this->create_temporary_table(self::TABLE_ROLE_COUNTS_TEMPORARY, $this->get_role_counts_table_definition_options()); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/notices.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/notices.php deleted file mode 100644 index 6d83f639..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/notices.php +++ /dev/null @@ -1,199 +0,0 @@ -<?php - -namespace WordfenceLS; - -use WordfenceLS\Text\Model_HTML; - -class Controller_Notices { - const USER_META_KEY = 'wfls_notices'; - const PERSISTENT_NOTICE_DISMISS_PREFIX = 'wfls-dismiss-'; - const PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION = 'wfls-woocommerce-integration-notice'; - - /** - * Returns the singleton Controller_Notices. - * - * @return Controller_Notices - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_Notices(); - } - return $_shared; - } - - private $persistentNotices = array(); - - /** - * Adds an admin notice to the display queue. If $user is provided, it will show only for that user, otherwise it - * will show for all administrators. - * - * @param string $severity - * @param string|Model_HTML $message - * @param bool|string $category If not false, notices with the same category will be removed prior to adding this one. - * @param bool|\WP_User $user If not false, the user that the notice should show for. - */ - public function add_notice($severity, $message, $category = false, $user = false) { - $notices = $this->_notices($user); - foreach ($notices as $id => $n) { - if ($category !== false && isset($n['category']) && $n['category'] == $category) { //Same category overwrites previous entry - unset($notices[$id]); - } - } - - $id = Model_Crypto::uuid(); - $notices[$id] = array( - 'severity' => $severity, - 'messageHTML' => Model_HTML::esc_html($message), - ); - - if ($category !== false) { - $notices[$id]['category'] = $category; - } - - $this->_save_notices($notices, $user); - } - - /** - * Removes a notice using one of two possible search methods: - * - * 1. If $id matches. $category is ignored but only notices for $user are checked. - * 2. If $category matches. Only notices for $user are checked. - * - * @param bool|int $id - * @param bool|string $category - * @param bool|\WP_User $user - */ - public function remove_notice($id = false, $category = false, $user = false) { - if ($id === false && $category === false) { - return; - } - else if ($id !== false) { - $category = false; - } - - $notices = $this->_notices($user); - foreach ($notices as $nid => $n) { - if ($id == $nid) { //ID match - unset($notices[$nid]); - break; - } - else if ($id !== false) { - continue; - } - - if ($category !== false && isset($n['category']) && $category == $n['category']) { //Category match - unset($notices[$nid]); - } - } - $this->_save_notices($notices, $user); - } - - /** - * Returns whether or not a notice exists for the given user. - * - * @param bool|\WP_User $user - * @return bool - */ - public function has_notice($user) { - $notices = $this->_notices($user); - return !!count($notices) || $this->has_persistent_notices(); - } - - /** - * Enqueues a user's notices. For administrators this also includes global notices. - * - * @return bool Whether any notices were enqueued. - */ - public function enqueue_notices() { - $user = wp_get_current_user(); - if ($user->ID == 0) { - return false; - } - - $added = false; - $notices = array(); - if (Controller_Permissions::shared()->can_manage_settings($user)) { - $globalNotices = $this->_notices(false); - $notices = array_merge($notices, $globalNotices); - } - - $userNotices = $this->_notices($user); - $notices = array_merge($notices, $userNotices); - - foreach ($notices as $nid => $n) { - $notice = new Model_Notice($nid, $n['severity'], $n['messageHTML'], $n['category']); - if (is_multisite()) { - add_action('network_admin_notices', array($notice, 'display_notice')); - } - else { - add_action('admin_notices', array($notice, 'display_notice')); - } - - $added = true; - } - - return $added; - } - - /** - * Utility - */ - - /** - * Returns the notices for a user if provided, otherwise the global notices. - * - * @param bool|\WP_User $user - * @return array - */ - protected function _notices($user) { - if ($user instanceof \WP_User) { - $notices = get_user_meta($user->ID, self::USER_META_KEY, true); - return array_filter((array) $notices); - } - return Controller_Settings::shared()->get_array(Controller_Settings::OPTION_GLOBAL_NOTICES); - } - - /** - * Saves the notices. - * - * @param array $notices - * @param bool|\WP_User $user - */ - protected function _save_notices($notices, $user) { - if ($user instanceof \WP_User) { - update_user_meta($user->ID, self::USER_META_KEY, $notices); - return; - } - Controller_Settings::shared()->set_array(Controller_Settings::OPTION_GLOBAL_NOTICES, $notices, true); - } - - public function get_persistent_notice_ids() { - return array( - self::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION - ); - } - - private static function get_persistent_notice_dismiss_key($noticeId) { - return self::PERSISTENT_NOTICE_DISMISS_PREFIX . $noticeId; - } - - public function register_persistent_notice($noticeId) { - $this->persistentNotices[] = $noticeId; - } - - public function has_persistent_notices() { - return count($this->persistentNotices) > 0; - } - - public function dismiss_persistent_notice($userId, $noticeId) { - if (!in_array($noticeId, $this->get_persistent_notice_ids(), true)) - return false; - update_user_option($userId, self::get_persistent_notice_dismiss_key($noticeId), true, true); - return true; - } - - public function is_persistent_notice_dismissed($userId, $noticeId) { - return (bool) get_user_option(self::get_persistent_notice_dismiss_key($noticeId), $userId); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php deleted file mode 100644 index cbdd9f85..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php +++ /dev/null @@ -1,448 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Controller_Permissions { - const CAP_ACTIVATE_2FA_SELF = 'wf2fa_activate_2fa_self'; //Activate 2FA on its own user account - const CAP_ACTIVATE_2FA_OTHERS = 'wf2fa_activate_2fa_others'; //Activate 2FA on user accounts other than its own - const CAP_MANAGE_SETTINGS = 'wf2fa_manage_settings'; //Edit settings for the plugin - - const SETTING_LAST_ROLE_CHANGE = 'wfls_last_role_change'; - const SETTING_LAST_ROLE_SYNC = 'wfls_last_role_sync'; - - private $network_roles = array(); - private $multisite_roles = null; - - /** - * Returns the singleton Controller_Permissions. - * - * @return Controller_Permissions - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_Permissions(); - } - return $_shared; - } - - public function install() { - $this->_on_role_change(); - if (is_multisite()) { - //Super Admin automatically gets all capabilities, so we don't need to explicitly add them - $this->_add_cap_multisite('administrator', self::CAP_ACTIVATE_2FA_SELF, $this->get_primary_sites()); - } - else { - $this->_add_cap('administrator', self::CAP_ACTIVATE_2FA_SELF); - $this->_add_cap('administrator', self::CAP_ACTIVATE_2FA_OTHERS); - $this->_add_cap('administrator', self::CAP_MANAGE_SETTINGS); - } - } - - public function uninstall() { - if (Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_DELETE_ON_DEACTIVATION)) { - if (is_multisite()) { - $sites = $this->get_sites(); - foreach ($sites as $id) { - switch_to_blog($id); - wp_clear_scheduled_hook('wordfence_ls_role_sync_cron'); - restore_current_blog(); - } - } - } - } - - public static function _init_actions() { - add_action('wordfence_ls_role_sync_cron', array(Controller_Permissions::shared(), '_role_sync_cron')); - } - - public function init() { - global $wp_version; - if (is_multisite()) { - if (version_compare($wp_version, '5.1.0', '>=')) { - add_action('wp_initialize_site', array($this, '_wp_initialize_site'), 99); - } - else { - add_action('wpmu_new_blog', array($this, '_wpmu_new_blog'), 10, 5); - } - - add_action('init', array($this, '_validate_role_sync_cron'), 1); - } - } - - /** - * Syncs roles to the new multisite blog. - * - * @param $site_id - * @param $user_id - * @param $domain - * @param $path - * @param $network_id - */ - public function _wpmu_new_blog($site_id, $user_id, $domain, $path, $network_id) { - $this->sync_roles($network_id, $site_id); - } - - /** - * Syncs roles to the new multisite blog. - * - * @param $new_site - */ - public function _wp_initialize_site($new_site) { - $this->sync_roles($new_site->site_id, $new_site->blog_id); - } - - /** - * Creates the hourly cron (if needed) that handles syncing the roles/permissions for the current blog. Because crons - * are specific to individual blogs on multisite rather than to the network itself, this will end up creating a cron - * for every member blog of the multisite. - * - * If there is a new role change since the last sync, a one-off cron will be fired to sync it sooner than the normal - * recurrence period. - * - * Multisite only. - * - */ - public function _validate_role_sync_cron() { - if (!wp_next_scheduled('wordfence_ls_role_sync_cron')) { - wp_schedule_event(time(), 'hourly', 'wordfence_ls_role_sync_cron'); - } - else { - $last_role_change = (int) get_site_option(self::SETTING_LAST_ROLE_CHANGE, 0); - if ($last_role_change >= get_option(self::SETTING_LAST_ROLE_SYNC, 0)) { - wp_schedule_single_event(time(), 'wordfence_ls_role_sync_cron'); //Force queue an update in case the normal cron is still a while out - } - } - } - - /** - * Handles syncing the roles/permissions for the current blog when the cron fires. - */ - public function _role_sync_cron() { - $last_role_change = (int) get_site_option(self::SETTING_LAST_ROLE_CHANGE, 0); - if ($last_role_change === 0) { - $this->_on_role_change(); - } - - if ($last_role_change >= get_option(self::SETTING_LAST_ROLE_SYNC, 0)) { - $network_id = get_current_site()->id; - $blog_id = get_current_blog_id(); - $this->sync_roles($network_id, $blog_id); - update_option(self::SETTING_LAST_ROLE_SYNC, time()); - } - } - - private function _on_role_change() { - update_site_option(self::SETTING_LAST_ROLE_CHANGE, time()); - } - - /** - * Get the primary site ID for a given network - */ - private function get_primary_site_id($network_id) { - global $wpdb; - if(function_exists('get_network')){ - $network=get_network($network_id); //TODO: Support multi-network throughout plugin - return (int)$network->blog_id; - } - else{ - return (int)$wpdb->get_var($wpdb->prepare("SELECT blogs.blog_id FROM {$wpdb->site} sites JOIN {$wpdb->blogs} blogs ON blogs.site_id=sites.id AND blogs.path=sites.path WHERE sites.id=%d", $network_id)); - } - } - - /** - * Get all primary sites in a multi-network setup - */ - private function get_primary_sites() { - global $wpdb; - if(function_exists('get_networks')){ - return array_map(function($network){ return $network->blog_id; }, get_networks()); - } - else{ - return $wpdb->get_col("SELECT blogs.blog_id FROM {$wpdb->site} sites JOIN {$wpdb->blogs} blogs ON blogs.site_id=sites.id AND blogs.path=sites.path"); - } - } - - /** - * Returns an array of all multisite `blog_id` values, optionally limiting the result to the subset between - * ($from, $from + $count]. - * - * @param int $from - * @param int $count - * @return array - */ - private function get_sites($from = 0, $count = 0) { - global $wpdb; - if ($from === 0 && $count === 0) { - return $wpdb->get_col("SELECT `blog_id` FROM `{$wpdb->blogs}` WHERE `deleted` = 0 ORDER BY blog_id "); - } - return $wpdb->get_col($wpdb->prepare("SELECT `blog_id` FROM `{$wpdb->blogs}` WHERE `deleted` = 0 AND blog_id > %d ORDER BY blog_id LIMIT %d", $from, $count)); - } - - /** - * Sync role capabilities from the default site to a newly added site - * @param int $network_id the relevant network - * @param int $site_id the newly added site(blog) - */ - private function sync_roles($network_id, $site_id){ - if(array_key_exists($network_id, $this->network_roles)){ - $current_roles=$this->network_roles[$network_id]; - } - else{ - $current_roles=$this->_wp_roles($this->get_primary_site_id($network_id)); - $this->network_roles[$network_id]=$current_roles; - } - $new_site_roles=$this->_wp_roles($site_id); - $capabilities=array( - self::CAP_ACTIVATE_2FA_SELF, - self::CAP_ACTIVATE_2FA_OTHERS, - self::CAP_MANAGE_SETTINGS - ); - foreach($current_roles->get_names() as $role_name=>$role_label){ - if($new_site_roles->get_role($role_name)===null) - $new_site_roles->add_role($role_name, $role_label); - $role=$current_roles->get_role($role_name); - foreach($capabilities as $cap){ - if($role->has_cap($cap)){ - $this->_add_cap_multisite($role_name, $cap, array($site_id)); - } - else{ - $this->_remove_cap_multisite($role_name, $cap, array($site_id)); - } - } - } - } - - public function allow_2fa_self($role_name) { - $this->_on_role_change(); - if (is_multisite()) { - return $this->_add_cap_multisite($role_name, self::CAP_ACTIVATE_2FA_SELF, $this->get_primary_sites()); - } - else { - return $this->_add_cap($role_name, self::CAP_ACTIVATE_2FA_SELF); - } - } - - public function disallow_2fa_self($role_name) { - $this->_on_role_change(); - if (is_multisite()) { - return $this->_remove_cap_multisite($role_name, self::CAP_ACTIVATE_2FA_SELF, $this->get_primary_sites()); - } - else { - if ($role_name == 'administrator') { - return true; - } - return $this->_remove_cap($role_name, self::CAP_ACTIVATE_2FA_SELF); - } - } - - public function can_manage_settings($user = false) { - if ($user === false) { - $user = wp_get_current_user(); - } - - if (!($user instanceof \WP_User)) { - return false; - } - return $user->has_cap(self::CAP_MANAGE_SETTINGS); - } - - public function can_role_manage_settings($role) { - if (is_string($role)) { - $role = get_role($role); - } - if ($role) - return $role->has_cap(self::CAP_MANAGE_SETTINGS); - return false; - } - - private function _wp_roles($site_id = null) { - require(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */ - if (version_compare($wp_version, '4.9', '>=')) { - return new \WP_Roles($site_id); - } - - //\WP_Roles in WP < 4.9 initializes based on the current blog ID - if (is_multisite()) { - switch_to_blog($site_id); - } - $wp_roles = new \WP_Roles(); - if (is_multisite()) { - restore_current_blog(); - } - return $wp_roles; - } - - private function _add_cap_multisite($role_name, $cap, $blog_ids=null) { - if ($role_name === 'super-admin') - return true; - global $wpdb; - $blogs = $blog_ids===null?$wpdb->get_col("SELECT `blog_id` FROM `{$wpdb->blogs}` WHERE `deleted` = 0"):$blog_ids; - $added = false; - foreach ($blogs as $id) { - $wp_roles = $this->_wp_roles($id); - switch_to_blog($id); - $added = $this->_add_cap($role_name, $cap, $wp_roles) || $added; - restore_current_blog(); - } - return $added; - } - - private function _add_cap($role_name, $cap, $wp_roles = null) { - if ($wp_roles === null) { $wp_roles = $this->_wp_roles(); } - $role = $wp_roles->get_role($role_name); - if ($role === null) { - return false; - } - - $wp_roles->add_cap($role_name, $cap); - return true; - } - - private function _remove_cap_multisite($role_name, $cap, $blog_ids=null) { - if ($role_name === 'super-admin') - return false; - global $wpdb; - $blogs = $blog_ids===null?$wpdb->get_col("SELECT `blog_id` FROM `{$wpdb->blogs}` WHERE `deleted` = 0"):$blog_ids; - $removed = false; - foreach ($blogs as $id) { - $wp_roles = $this->_wp_roles($id); - switch_to_blog($id); - $removed = $this->_remove_cap($role_name, $cap, $wp_roles) || $removed; - restore_current_blog(); - } - return $removed; - } - - private function _remove_cap($role_name, $cap, $wp_roles = null) { - if ($wp_roles === null) { $wp_roles = $this->_wp_roles(); } - $role = $wp_roles->get_role($role_name); - if ($role === null) { - return false; - } - - $wp_roles->remove_cap($role_name, $cap); - return true; - } - - /** - * Loads the role capability info for the multisite blog IDs in `$includedSites` and appends it to - * `$this->multisite_roles`. Role capability data that is already loaded will be skipped. - * - * @param array $includeSites An array of multisite blog IDs to load. - */ - private function _load_multisite_roles($includeSites) { - global $wpdb; - - $needed = array_diff($includeSites, array_keys($this->multisite_roles)); - if (empty($needed)) { - return; - } - - $suffix = "user_roles"; - $queries = array(); - foreach ($needed as $b) { - $tables = $wpdb->tables('blog', true, $b); - $queries[] = "SELECT CAST(option_name AS CHAR UNICODE) AS option_name, CAST(option_value AS CHAR UNICODE) AS option_value FROM {$tables['options']} WHERE option_name LIKE '%{$suffix}'"; - } - - $chunks = array_chunk($queries, 50); - $options = array(); - foreach ($chunks as $c) { - $rows = $wpdb->get_results(implode(' UNION ', $c), OBJECT_K); - foreach ($rows as $row) { - $options[$row->option_name] = $row->option_value; - } - } - - $extractor = new Utility_MultisiteConfigurationExtractor($wpdb->base_prefix, $suffix); - foreach ($extractor->extract($options) as $site => $option) { - $this->multisite_roles[$site] = maybe_unserialize($option); - } - } - - /** - * Returns an array of multisite roles. This is guaranteed to include the multisite blogs in `$includeSites` but may - * include others from earlier calls that are cached. - * - * @param array $includeSites An array for multisite blog IDs. - * @return array - */ - public function get_multisite_roles($includeSites) { - if ($this->multisite_roles === null) { - $this->multisite_roles = array(); - } - - $this->_load_multisite_roles($includeSites); - return $this->multisite_roles; - } - - /** - * Returns the sites + roles that a user has on multisite. The structure of the returned array has the keys as the - * individual site IDs and the associated value as an array of the user's capabilities on that site. - * - * @param WP_User $user - * @return array - */ - public function get_multisite_roles_for_user($user) { - global $wpdb; - $roles = array(); - $meta = get_user_meta($user->ID); - if (is_array($meta)) { - $extractor = new Utility_MultisiteConfigurationExtractor($wpdb->base_prefix, 'capabilities'); - foreach ($extractor->extract($meta) as $site => $capabilities) { - if (!is_array($capabilities)) { continue; } - $capabilities = array_map('maybe_unserialize', $capabilities); - $localRoles = array(); - foreach ($capabilities as $entry) { - foreach ($entry as $role => $state) { - if ($state) - $localRoles[$role] = true; - } - } - $roles[$site] = array_keys($localRoles); - } - } - return $roles; - } - - public function get_all_roles($user) { - global $wpdb; - if (is_multisite()) { - $roles = array(); - if (is_super_admin($user->ID)) { - $roles['super-admin'] = true; - } - foreach ($this->get_multisite_roles_for_user($user) as $site => $siteRoles) { - foreach ($siteRoles as $role) { - $roles[$role] = true; - } - } - return array_keys($roles); - } - else { - return $user->roles; - } - } - - public function does_user_have_multisite_capability($user, $capability) { - $userRoles = $this->get_multisite_roles_for_user($user); - if (in_array('super-admin', $userRoles)) { - return true; - } - - $blogRoles = $this->get_multisite_roles(array_keys($userRoles)); - $blogs = get_blogs_of_user($user->ID); - foreach ($blogs as $blogId => $blog) { - $blogId = (int) $blogId; - if (!array_key_exists($blogId, $userRoles) || !array_key_exists($blogId, $blogRoles)) { continue; } //Blog with ID `$blogId` should be ignored - foreach ($userRoles[$blogId] as $userRole) { - if (!array_key_exists($userRole, $blogRoles[$blogId]) || !array_key_exists('capabilities', $blogRoles[$blogId][$userRole])) { continue; } //Sanity check for needed keys, should not happen - - $capabilities = $blogRoles[$blogId][$userRole]['capabilities']; - if (array_key_exists($capability, $capabilities) && $capabilities[$capability]) { return true; } - } - } - return false; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/settings.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/settings.php deleted file mode 100644 index e25521ed..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/settings.php +++ /dev/null @@ -1,576 +0,0 @@ -<?php - -namespace WordfenceLS; - -use WordfenceLS\Settings\Model_DB; -use WordfenceLS\Settings\Model_WPOptions; - -class Controller_Settings { - //Configurable - const OPTION_XMLRPC_ENABLED = 'xmlrpc-enabled'; - const OPTION_2FA_WHITELISTED = 'whitelisted'; - const OPTION_IP_SOURCE = 'ip-source'; - const OPTION_IP_TRUSTED_PROXIES = 'ip-trusted-proxies'; - const OPTION_REQUIRE_2FA_ADMIN = 'require-2fa.administrator'; - const OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED = 'require-2fa-grace-period-enabled'; - const OPTION_REQUIRE_2FA_GRACE_PERIOD = 'require-2fa-grace-period'; - const OPTION_REQUIRE_2FA_USER_GRACE_PERIOD = '2fa-user-grace-period'; - const OPTION_REMEMBER_DEVICE_ENABLED = 'remember-device'; - const OPTION_REMEMBER_DEVICE_DURATION = 'remember-device-duration'; - const OPTION_ALLOW_XML_RPC = 'allow-xml-rpc'; - const OPTION_ENABLE_AUTH_CAPTCHA = 'enable-auth-captcha'; - const OPTION_CAPTCHA_TEST_MODE = 'recaptcha-test-mode'; - const OPTION_RECAPTCHA_SITE_KEY = 'recaptcha-site-key'; - const OPTION_RECAPTCHA_SECRET = 'recaptcha-secret'; - const OPTION_RECAPTCHA_THRESHOLD = 'recaptcha-threshold'; - const OPTION_DELETE_ON_DEACTIVATION = 'delete-deactivation'; - const OPTION_PREFIX_REQUIRED_2FA_ROLE = 'required-2fa-role'; - const OPTION_ENABLE_WOOCOMMERCE_INTEGRATION = 'enable-woocommerce-integration'; - const OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION = 'enable-woocommerce-account-integration'; - const OPTION_ENABLE_SHORTCODE = 'enable-shortcode'; - const OPTION_ENABLE_LOGIN_HISTORY_COLUMNS = 'enable-login-history-columns'; - const OPTION_STACK_UI_COLUMNS = 'stack-ui-columns'; - - //Internal - const OPTION_GLOBAL_NOTICES = 'global-notices'; - const OPTION_LAST_SECRET_REFRESH = 'last-secret-refresh'; - const OPTION_USE_NTP = 'use-ntp'; - const OPTION_ALLOW_DISABLING_NTP = 'allow-disabling-ntp'; - const OPTION_NTP_FAILURE_COUNT = 'ntp-failure-count'; - const OPTION_NTP_OFFSET = 'ntp-offset'; - const OPTION_SHARED_HASH_SECRET_KEY = 'shared-hash-secret'; - const OPTION_SHARED_SYMMETRIC_SECRET_KEY = 'shared-symmetric-secret'; - const OPTION_DISMISSED_FRESH_INSTALL_MODAL = 'dismissed-fresh-install-modal'; - const OPTION_CAPTCHA_STATS = 'captcha-stats'; - const OPTION_SCHEMA_VERSION = 'schema-version'; - const OPTION_USER_COUNT_QUERY_STATE = 'user-count-query-state'; - const OPTION_DISABLE_TEMPORARY_TABLES = 'disable-temporary-tables'; - - const DEFAULT_REQUIRE_2FA_USER_GRACE_PERIOD = 10; - const MAX_REQUIRE_2FA_USER_GRACE_PERIOD = 99; - - const STATE_2FA_DISABLED = 'disabled'; - const STATE_2FA_OPTIONAL = 'optional'; - const STATE_2FA_REQUIRED = 'required'; - - protected $_settingsStorage; - - /** - * Returns the singleton Controller_Settings. - * - * @return Controller_Settings - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_Settings(); - } - return $_shared; - } - - public function __construct($settingsStorage = false) { - if (!$settingsStorage) { - $settingsStorage = new Model_DB(); - } - $this->_settingsStorage = $settingsStorage; - $this->_migrate_admin_2fa_requirements_to_roles(); - } - - public function set_defaults() { - $this->_settingsStorage->set_multiple(array( - self::OPTION_XMLRPC_ENABLED => array('value' => true, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_2FA_WHITELISTED => array('value' => '', 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_IP_SOURCE => array('value' => Model_Request::IP_SOURCE_AUTOMATIC, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_IP_TRUSTED_PROXIES => array('value' => '', 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_REQUIRE_2FA_ADMIN => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD => array('value' => self::DEFAULT_REQUIRE_2FA_USER_GRACE_PERIOD, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_GLOBAL_NOTICES => array('value' => '[]', 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_REMEMBER_DEVICE_ENABLED => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_REMEMBER_DEVICE_DURATION => array('value' => (30 * 86400), 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_ALLOW_XML_RPC => array('value' => true, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_ENABLE_AUTH_CAPTCHA => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_CAPTCHA_STATS => array('value' => '{"counts":[0,0,0,0,0,0,0,0,0,0,0],"avg":0}', 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_RECAPTCHA_THRESHOLD => array('value' => 0.5, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_LAST_SECRET_REFRESH => array('value' => 0, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_DELETE_ON_DEACTIVATION => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_ENABLE_SHORTCODE => array('value' => false, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_ENABLE_LOGIN_HISTORY_COLUMNS => array('value' => true, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_STACK_UI_COLUMNS => array('value' => true, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_SCHEMA_VERSION => array('value' => 0, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_USER_COUNT_QUERY_STATE => array('value' => 0, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false), - self::OPTION_DISABLE_TEMPORARY_TABLES => array('value' => 0, 'autoload' => Model_Settings::AUTOLOAD_YES, 'allowOverwrite' => false) - )); - } - - public function set($key, $value, $already_validated = false) { - return $this->set_multiple(array($key => $value), $already_validated); - } - - public function set_array($key, $value, $already_validated = false) { - return $this->set_multiple(array($key => json_encode($value)), $already_validated); - } - - public function set_multiple($changes, $already_validated = false) { - if (!$already_validated && $this->validate_multiple($changes) !== true) { - return false; - } - $changes = $this->clean_multiple($changes); - $changes = $this->preprocess_multiple($changes); - $this->_settingsStorage->set_multiple($changes); - return true; - } - - public function get($key, $default = false) { - return $this->_settingsStorage->get($key, $default); - } - - public function get_bool($key, $default = false) { - return $this->_truthy_to_bool($this->get($key, $default)); - } - - public function get_int($key, $default = 0) { - return intval($this->get($key, $default)); - } - - public function get_float($key, $default = 0.0) { - return (float) $this->get($key, $default); - } - - public function get_array($key, $default = array()) { - $value = $this->get($key, null); - if (is_string($value)) { - $value = @json_decode($value, true); - } - else { - $value = null; - } - return is_array($value) ? $value : $default; - } - - public function remove($key) { - $this->_settingsStorage->remove($key); - } - - /** - * Validates whether a user-entered setting value is acceptable. Returns true if valid or an error message if not. - * - * @param string $key - * @param mixed $value - * @return bool|string - */ - public function validate($key, $value) { - switch ($key) { - //Boolean - case self::OPTION_XMLRPC_ENABLED: - case self::OPTION_REQUIRE_2FA_ADMIN: - case self::OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED: - case self::OPTION_REMEMBER_DEVICE_ENABLED: - case self::OPTION_ALLOW_XML_RPC: - case self::OPTION_ENABLE_AUTH_CAPTCHA: - case self::OPTION_CAPTCHA_TEST_MODE: - case self::OPTION_DISMISSED_FRESH_INSTALL_MODAL: - case self::OPTION_DELETE_ON_DEACTIVATION: - case self::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION: - case self::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION: - case self::OPTION_ENABLE_SHORTCODE: - case self::OPTION_ENABLE_LOGIN_HISTORY_COLUMNS: - case self::OPTION_STACK_UI_COLUMNS: - case self::OPTION_USER_COUNT_QUERY_STATE: - case self::OPTION_DISABLE_TEMPORARY_TABLES: - return true; - - //Int - case self::OPTION_LAST_SECRET_REFRESH: - return is_numeric($value); //Left using is_numeric to prevent issues with existing values - case self::OPTION_SCHEMA_VERSION: - return Utility_Number::isInteger($value, 0); - - //Array - case self::OPTION_GLOBAL_NOTICES: - case self::OPTION_CAPTCHA_STATS: - return preg_match('/^\[.*\]$/', $value) || preg_match('/^\{.*\}$/', $value); //Only a rough JSON validation - - //Special - case self::OPTION_IP_TRUSTED_PROXIES: - case self::OPTION_2FA_WHITELISTED: - $parsed = array_filter(array_map(function($s) { return trim($s); }, preg_split('/[\r\n]/', $value))); - foreach ($parsed as $entry) { - if (!Controller_Whitelist::shared()->is_valid_range($entry)) { - return sprintf(__('The IP/range %s is invalid.', 'wordfence'), esc_html($entry)); - } - } - return true; - case self::OPTION_IP_SOURCE: - if (!in_array($value, array(Model_Request::IP_SOURCE_AUTOMATIC, Model_Request::IP_SOURCE_REMOTE_ADDR, Model_Request::IP_SOURCE_X_FORWARDED_FOR, Model_Request::IP_SOURCE_X_REAL_IP))) { - return __('An invalid IP source was provided.', 'wordfence'); - } - return true; - case self::OPTION_REQUIRE_2FA_GRACE_PERIOD: - $gracePeriodEnd = strtotime($value); - if ($gracePeriodEnd <= \WordfenceLS\Controller_Time::time()) { - return __('The grace period end time must be in the future.', 'wordfence'); - } - return true; - case self::OPTION_REMEMBER_DEVICE_DURATION: - return is_numeric($value) && $value > 0; - case self::OPTION_RECAPTCHA_THRESHOLD: - return is_numeric($value) && $value >= 0 && $value <= 1; - case self::OPTION_RECAPTCHA_SITE_KEY: - if (empty($value)) { - return true; - } - - $response = wp_remote_get('https://www.google.com/recaptcha/api.js?render=' . urlencode($value)); - - if (!is_wp_error($response)) { - $status = wp_remote_retrieve_response_code($response); - if ($status == 200) { - return true; - } - - $data = wp_remote_retrieve_body($response); - if (strpos($data, 'grecaptcha') === false) { - return __('Unable to validate the reCAPTCHA site key. Please check the key and try again.', 'wordfence'); - } - return true; - } - return sprintf(__('An error was encountered while validating the reCAPTCHA site key: %s', 'wordfence'), $response->get_error_message()); - case self::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD: - return is_numeric($value) && $value >= 0 && $value <= self::MAX_REQUIRE_2FA_USER_GRACE_PERIOD; - } - return true; - } - - public function validate_multiple($values) { - $errors = array(); - foreach ($values as $key => $value) { - $status = $this->validate($key, $value); - if ($status !== true) { - $errors[$key] = $status; - } - } - - if (!empty($errors)) { - return $errors; - } - - return true; - } - - /** - * Cleans and normalizes a setting value for use in saving. - * - * @param string $key - * @param mixed $value - * @return mixed - */ - public function clean($key, $value) { - switch ($key) { - //Boolean - case self::OPTION_XMLRPC_ENABLED: - case self::OPTION_REQUIRE_2FA_ADMIN: - case self::OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED: - case self::OPTION_REMEMBER_DEVICE_ENABLED: - case self::OPTION_ALLOW_XML_RPC: - case self::OPTION_ENABLE_AUTH_CAPTCHA: - case self::OPTION_CAPTCHA_TEST_MODE: - case self::OPTION_DISMISSED_FRESH_INSTALL_MODAL: - case self::OPTION_DELETE_ON_DEACTIVATION: - case self::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION: - case self::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION: - case self::OPTION_ENABLE_SHORTCODE; - case self::OPTION_ENABLE_LOGIN_HISTORY_COLUMNS: - case self::OPTION_STACK_UI_COLUMNS: - case self::OPTION_USER_COUNT_QUERY_STATE: - case self::OPTION_DISABLE_TEMPORARY_TABLES: - return $this->_truthy_to_bool($value); - - //Int - case self::OPTION_REMEMBER_DEVICE_DURATION: - case self::OPTION_LAST_SECRET_REFRESH: - case self::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD: - case self::OPTION_SCHEMA_VERSION: - return (int) $value; - - //Float - case self::OPTION_RECAPTCHA_THRESHOLD: - return (float) $value; - - //Special - case self::OPTION_IP_TRUSTED_PROXIES: - case self::OPTION_2FA_WHITELISTED: - $parsed = array_filter(array_map(function($s) { return trim($s); }, preg_split('/[\r\n]/', $value))); - $cleaned = array(); - foreach ($parsed as $item) { - $cleaned[] = $this->_sanitize_ip_range($item); - } - return implode("\n", $cleaned); - case self::OPTION_REQUIRE_2FA_GRACE_PERIOD: - $dt = $this->_parse_local_time($value); - return $dt->format('U'); - case self::OPTION_RECAPTCHA_SITE_KEY: - case self::OPTION_RECAPTCHA_SECRET: - return trim($value); - } - return $value; - } - - public function clean_multiple($changes) { - $cleaned = array(); - foreach ($changes as $key => $value) { - $cleaned[$key] = $this->clean($key, $value); - } - return $cleaned; - } - - private function get_required_2fa_role_key($role) { - return implode('.', array(self::OPTION_PREFIX_REQUIRED_2FA_ROLE, $role)); - } - - public function get_required_2fa_role_activation_time($role) { - $time = $this->get_int($this->get_required_2fa_role_key($role), -1); - if ($time < 0) - return false; - return $time; - } - - public function get_user_2fa_grace_period() { - return $this->get_int(self::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD, self::DEFAULT_REQUIRE_2FA_USER_GRACE_PERIOD); - } - - /** - * Preprocesses the value, returning true if it was saved here (e.g., saved 2fa enabled by assigning a role - * capability) or false if it is to be saved by the backing storage. - * - * @param string $key - * @param mixed $value - * @param array &$settings the array of settings to process, this function may append additional values from preprocessing - * @return bool - */ - public function preprocess($key, $value, &$settings) { - if (preg_match('/^enabled-roles\.(.+)$/', $key, $matches)) { //Enabled roles are stored as capabilities rather than in the settings storage - $role = $matches[1]; - if ($role === 'super-admin') { - $roleValid = true; - } - elseif (in_array($value, array(self::STATE_2FA_OPTIONAL, self::STATE_2FA_REQUIRED))) { - $roleValid = Controller_Permissions::shared()->allow_2fa_self($role); - } - else { - $roleValid = Controller_Permissions::shared()->disallow_2fa_self($role); - } - if ($roleValid) - $settings[$this->get_required_2fa_role_key($role)] = ($value === self::STATE_2FA_REQUIRED ? time() : -1); - return true; - } - return false; - } - - public function preprocess_multiple($changes) { - $remaining = array(); - foreach ($changes as $key => $value) { - if (!$this->preprocess($key, $value, $remaining)) { - $remaining[$key] = $value; - } - } - return $remaining; - } - - /** - * Convenience - */ - - /** - * Returns a cleaned array containing the whitelist entries. - * - * @return array - */ - public function whitelisted_ips() { - return array_filter(array_map(function($s) { return trim($s); }, preg_split('/[\r\n]/', $this->get(self::OPTION_2FA_WHITELISTED, '')))); - } - - /** - * Returns a cleaned array containing the trusted proxy entries. - * - * @return array - */ - public function trusted_proxies() { - return array_filter(array_map(function($s) { return trim($s); }, preg_split('/[\r\n]/', $this->get(self::OPTION_IP_TRUSTED_PROXIES, '')))); - } - - public function get_ntp_failure_count() { - return $this->get_int(self::OPTION_NTP_FAILURE_COUNT, 0); - } - - public function reset_ntp_failure_count() { - $this->set(self::OPTION_NTP_FAILURE_COUNT, 0); - } - - public function increment_ntp_failure_count() { - $count = $this->get_ntp_failure_count(); - if ($count < 0) - return false; - $count++; - $this->set(self::OPTION_NTP_FAILURE_COUNT, $count); - return $count; - } - - public function is_ntp_disabled_via_constant() { - return defined('WORDFENCE_LS_DISABLE_NTP') && WORDFENCE_LS_DISABLE_NTP; - } - - public function is_ntp_enabled($requireOffset = true) { - if ($this->is_ntp_cron_disabled()) - return false; - if ($this->get_bool(self::OPTION_USE_NTP, true)) { - if ($requireOffset) { - $offset = $this->get(self::OPTION_NTP_OFFSET, null); - return $offset !== null && abs((int)$offset) <= Controller_TOTP::TIME_WINDOW_LENGTH; - } - else { - return true; - } - } - return false; - } - - public function is_ntp_cron_disabled(&$failureCount = null) { - if ($this->is_ntp_disabled_via_constant()) - return true; - $failureCount = $this->get_ntp_failure_count(); - if ($failureCount >= Controller_Time::FAILURE_LIMIT) { - return true; - } - else if ($failureCount < 0) { - $failureCount = 0; - return true; - } - return false; - } - - public function disable_ntp_cron() { - $this->set(self::OPTION_NTP_FAILURE_COUNT, -1); - } - - public function are_login_history_columns_enabled() { - return Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_LOGIN_HISTORY_COLUMNS, true); - } - - public function should_stack_ui_columns() { - return self::shared()->get_bool(Controller_Settings::OPTION_STACK_UI_COLUMNS, true); - } - - /** - * Utility - */ - - /** - * Translates a value to a boolean, correctly interpreting various textual representations. - * - * @param $value - * @return bool - */ - protected function _truthy_to_bool($value) { - if ($value === true || $value === false) { - return $value; - } - - if (is_numeric($value)) { - return !!$value; - } - - if (preg_match('/^(?:f(?:alse)?|no?|off)$/i', $value)) { - return false; - } - else if (preg_match('/^(?:t(?:rue)?|y(?:es)?|on)$/i', $value)) { - return true; - } - - return !empty($value); - } - - /** - * Parses the given time string and returns its DateTime with the server's configured time zone. - * - * @param string $timestring - * @return \DateTime - */ - protected function _parse_local_time($timestring) { - $utc = new \DateTimeZone('UTC'); - $tz = get_option('timezone_string'); - if (!empty($tz)) { - $tz = new \DateTimeZone($tz); - return new \DateTime($timestring, $tz); - } - else { - $gmt = get_option('gmt_offset'); - if (!empty($gmt)) { - if (PHP_VERSION_ID < 50510) { - $timestamp = strtotime($timestring); - $dtStr = gmdate("c", (int) ($timestamp + $gmt * 3600)); //Have to do it this way because of < PHP 5.5.10 - return new \DateTime($dtStr, $utc); - } - else { - $direction = ($gmt > 0 ? '+' : '-'); - $gmt = abs($gmt); - $h = (int) $gmt; - $m = ($gmt - $h) * 60; - $tz = new \DateTimeZone($direction . str_pad($h, 2, '0', STR_PAD_LEFT) . str_pad($m, 2, '0', STR_PAD_LEFT)); - return new \DateTime($timestring, $tz); - } - } - } - return new \DateTime($timestring); - } - - /** - * Cleans a user-entered IP range of unnecessary characters and normalizes some glyphs. - * - * @param string $range - * @return string - */ - protected function _sanitize_ip_range($range) { - $range = preg_replace('/\s/', '', $range); //Strip whitespace - $range = preg_replace('/[\\x{2013}-\\x{2015}]/u', '-', $range); //Non-hyphen dashes to hyphen - $range = strtolower($range); - - if (preg_match('/^\d+-\d+$/', $range)) { //v5 32 bit int style format - list($start, $end) = explode('-', $range); - $start = long2ip($start); - $end = long2ip($end); - $range = "{$start}-{$end}"; - } - - return $range; - } - - private function _migrate_admin_2fa_requirements_to_roles() { - if (!$this->get_bool(self::OPTION_REQUIRE_2FA_ADMIN)) - return; - $time = time(); - if (is_multisite()) { - $this->set($this->get_required_2fa_role_key('super-admin'), $time, true); - } - else { - $roles = new \WP_Roles(); - foreach ($roles->roles as $key => $data) { - $role = $roles->get_role($key); - if (Controller_Permissions::shared()->can_role_manage_settings($role) && Controller_Permissions::shared()->allow_2fa_self($role->name)) { - $this->set($this->get_required_2fa_role_key($role->name), $time, true); - } - } - } - $this->remove(self::OPTION_REQUIRE_2FA_ADMIN); - $this->remove(self::OPTION_REQUIRE_2FA_GRACE_PERIOD); - $this->remove(self::OPTION_REQUIRE_2FA_GRACE_PERIOD_ENABLED); - } - - public function reset_ntp_disabled_flag() { - $this->remove(self::OPTION_USE_NTP); - $this->remove(self::OPTION_NTP_OFFSET); - $this->remove(self::OPTION_NTP_FAILURE_COUNT); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/support.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/support.php deleted file mode 100644 index 5c01deb2..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/support.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Controller_Support { - const ITEM_INDEX = 'index'; - - const ITEM_CHANGELOG = 'changelog'; - - const ITEM_VERSION_WORDPRESS = 'version-wordpress'; - const ITEM_VERSION_PHP = 'version-php'; - const ITEM_VERSION_OPENSSL = 'version-ssl'; - - const ITEM_GDPR = 'gdpr'; - const ITEM_GDPR_DPA = 'gdpr-dpa'; - - const ITEM_MODULE_LOGIN_SECURITY = 'module-login-security'; - const ITEM_MODULE_LOGIN_SECURITY_2FA = 'module-login-security-2fa'; - const ITEM_MODULE_LOGIN_SECURITY_2FA_APPS = 'module-login-security-2fa-apps'; - const ITEM_MODULE_LOGIN_SECURITY_CAPTCHA = 'module-login-security-captcha'; - const ITEM_MODULE_LOGIN_SECURITY_ROLES = 'module-login-security-roles'; - const ITEM_MODULE_LOGIN_SECURITY_OPTION_WOOCOMMERCE_ACCOUNT_INTEGRATION = 'module-login-security-option-woocommerce-account-integration'; - const ITEM_MODULE_LOGIN_SECURITY_OPTION_SHORTCODE = 'module-login-security-option-shortcode'; - const ITEM_MODULE_LOGIN_SECURITY_OPTION_STACK_UI_COLUMNS = 'module-login-security-option-stack-ui-columns'; - const ITEM_MODULE_LOGIN_SECURITY_2FA_NOTIFICATIONS = 'module-login-security-2fa-notifications'; - - public static function esc_supportURL($item = self::ITEM_INDEX) { - return esc_url(self::supportURL($item)); - } - - public static function supportURL($item = self::ITEM_INDEX) { - $base = 'https://www.wordfence.com/help/'; - switch ($item) { - case self::ITEM_INDEX: - return 'https://www.wordfence.com/help/'; - - //These all fall through to the query format - - case self::ITEM_VERSION_WORDPRESS: - case self::ITEM_VERSION_PHP: - case self::ITEM_VERSION_OPENSSL: - - case self::ITEM_GDPR: - case self::ITEM_GDPR_DPA: - - case self::ITEM_MODULE_LOGIN_SECURITY: - case self::ITEM_MODULE_LOGIN_SECURITY_2FA: - case self::ITEM_MODULE_LOGIN_SECURITY_CAPTCHA: - case self::ITEM_MODULE_LOGIN_SECURITY_ROLES: - case self::ITEM_MODULE_LOGIN_SECURITY_OPTION_WOOCOMMERCE_ACCOUNT_INTEGRATION: - case self::ITEM_MODULE_LOGIN_SECURITY_OPTION_SHORTCODE: - case self::ITEM_MODULE_LOGIN_SECURITY_OPTION_STACK_UI_COLUMNS: - case self::ITEM_MODULE_LOGIN_SECURITY_2FA_NOTIFICATIONS: - return $base . '?query=' . $item; - } - - return ''; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/time.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/time.php deleted file mode 100644 index f09854d3..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/time.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Controller_Time { - const NTP_VERSION = 3; // https://www.ietf.org/rfc/rfc1305.txt - const NTP_EPOCH_CONVERT = 2208988800; //RFC 5905, page 13 - const FAILURE_LIMIT = 3; - - /** - * Returns the singleton Controller_Time. - * - * @return Controller_Time - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_Time(); - } - return $_shared; - } - - public function install() { - wp_clear_scheduled_hook('wordfence_ls_ntp_cron'); - if (is_main_site()) { - wp_schedule_event(time() + 10, 'hourly', 'wordfence_ls_ntp_cron'); - } - Controller_Settings::shared()->reset_ntp_disabled_flag(); - } - - public function uninstall() { - wp_clear_scheduled_hook('wordfence_ls_ntp_cron'); - Controller_Settings::shared()->reset_ntp_disabled_flag(); - } - - public function init() { - $this->_init_actions(); - } - - public function _init_actions() { - add_action('wordfence_ls_ntp_cron', array($this, '_wordfence_ls_ntp_cron')); - } - - public function _wordfence_ls_ntp_cron() { - if (Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ALLOW_DISABLING_NTP) && Controller_Settings::shared()->is_ntp_cron_disabled()) - return; - $ntp = self::ntp_time(); - $time = time(); - - if ($ntp === false) { - $failureCount = Controller_Settings::shared()->increment_ntp_failure_count(); - if ($failureCount >= self::FAILURE_LIMIT) { - Controller_Settings::shared()->set(Controller_Settings::OPTION_USE_NTP, false); - Controller_Settings::shared()->set(Controller_Settings::OPTION_NTP_OFFSET, 0); - } - } - else { - Controller_Settings::shared()->reset_ntp_failure_count(); - Controller_Settings::shared()->set(Controller_Settings::OPTION_USE_NTP, true); - Controller_Settings::shared()->set(Controller_Settings::OPTION_NTP_OFFSET, $ntp - $time); - } - Controller_Settings::shared()->set(Controller_Settings::OPTION_ALLOW_DISABLING_NTP, true); - } - - /** - * Returns the current UTC timestamp, offset as needed to reflect the time retrieved from an NTP request or (if - * running in the complete plugin) offset as needed from the Wordfence server's true time. - * - * @param bool|int $time The timestamp to apply any offset to. If `false`, it will use the current timestamp. - * @return int - */ - public static function time($time = false) { - if ($time === false) { - $time = time(); - } - - $offset = 0; - if (Controller_Settings::shared()->is_ntp_enabled()) { - $offset = Controller_Settings::shared()->get_int(Controller_Settings::OPTION_NTP_OFFSET); - } - else if (WORDFENCE_LS_FROM_CORE) { - $offset = \wfUtils::normalizedTime($time) - $time; - } - - return $time + $offset; - } - - /** - * Returns the current timestamp from ntp.org using the NTP protocol. If unable to (e.g., UDP connections are blocked), - * it will return false. - * - * @return bool|float - */ - public static function ntp_time() { - $servers = array('0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'); - - //Header - RFC 5905, page 18 - $header = '00'; //LI (leap indicator) - 2 bits: 00 for "no warning" - $header .= sprintf('%03d', decbin(self::NTP_VERSION)); //VN (version number) - 3 bits: 011 for version 3 - $header .= '011'; //Mode (association mode) - 3 bit: 011 for "client" - - $packet = chr(bindec($header)); - $packet .= str_repeat("\x0", 39); - - foreach ($servers as $s) { - $socket = @fsockopen('udp://' . $s, 123, $err_no, $err_str, 1); - if ($socket) { - stream_set_timeout($socket, 1); - $remote_originate = microtime(true); - $secondsNTP = ((int) $remote_originate) + self::NTP_EPOCH_CONVERT; - $fractional = sprintf('%010d', round(($remote_originate - ((int) $remote_originate)) * 0x100000000)); - $packed = pack('N', $secondsNTP) . pack('N', $fractional); - - if (@fwrite($socket, $packet . $packed)) { - $response = fread($socket, 48); - $local_transmitted = microtime(true); - } - @fclose($socket); - - if (isset($response) && Model_Crypto::strlen($response) == 48) { - break; - } - } - } - - if (isset($response) && Model_Crypto::strlen($response) == 48) { - $longs = unpack("N12", $response); - - $remote_originate_seconds = sprintf('%u', $longs[7]) - self::NTP_EPOCH_CONVERT; - $remote_received_seconds = sprintf('%u', $longs[9]) - self::NTP_EPOCH_CONVERT; - $remote_transmitted_seconds = sprintf('%u', $longs[11]) - self::NTP_EPOCH_CONVERT; - - $remote_originate_fraction = sprintf('%u', $longs[8]) / 0x100000000; - $remote_received_fraction = sprintf('%u', $longs[10]) / 0x100000000; - $remote_transmitted_fraction = sprintf('%u', $longs[12]) / 0x100000000; - - $remote_originate = $remote_originate_seconds + $remote_originate_fraction; - $remote_received = $remote_received_seconds + $remote_received_fraction; - $remote_transmitted = $remote_transmitted_seconds + $remote_transmitted_fraction; - - $delay = (($local_transmitted - $remote_originate) / 2) - ($remote_transmitted - $remote_received); - - $ntp_time = $remote_transmitted - $delay; - return $ntp_time; - } - - return false; - } - - /** - * Formats and returns the given timestamp using the time zone set for the WordPress installation. - * - * @param string $format See the PHP docs on DateTime for the format options. - * @param int|bool $timestamp Assumed to be in UTC. If false, defaults to the current timestamp. - * @return string - */ - public static function format_local_time($format, $timestamp = false) { - if ($timestamp === false) { - $timestamp = self::time(); - } - - $utc = new \DateTimeZone('UTC'); - if (!function_exists('date_timestamp_set')) { - $dtStr = gmdate("c", (int) $timestamp); //Have to do it this way because of PHP 5.2 - $dt = new \DateTime($dtStr, $utc); - } - else { - $dt = new \DateTime('now', $utc); - $dt->setTimestamp($timestamp); - } - - $tz = get_option('timezone_string'); - if (!empty($tz)) { - $dt->setTimezone(new \DateTimeZone($tz)); - } - else { - $gmt = get_option('gmt_offset'); - if (!empty($gmt)) { - if (PHP_VERSION_ID < 50510) { - $dtStr = gmdate("c", (int) ($timestamp + $gmt * 3600)); //Have to do it this way because of < PHP 5.5.10 - $dt = new \DateTime($dtStr, $utc); - } - else { - $direction = ($gmt > 0 ? '+' : '-'); - $gmt = abs($gmt); - $h = (int) $gmt; - $m = ($gmt - $h) * 60; - $dt->setTimezone(new \DateTimeZone($direction . str_pad($h, 2, '0', STR_PAD_LEFT) . str_pad($m, 2, '0', STR_PAD_LEFT))); - } - } - } - return $dt->format($format); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/totp.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/totp.php deleted file mode 100644 index 1ec7f95b..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/totp.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Controller_TOTP { - const TIME_WINDOW_LENGTH = 30; - - /** - * Returns the singleton Controller_TOTP. - * - * @return Controller_TOTP - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_TOTP(); - } - return $_shared; - } - - public function init() { - - } - - /** - * Activates a user with the given TOTP parameters. - * - * @param \WP_User $user - * @param string $secret The secret as a hex string. - * @param string[] $recovery An array of recovery codes as hex strings. - * @param bool|int $vtime The timestamp of the verification code or false to use the current timestamp. - */ - public function activate_2fa($user, $secret, $recovery, $vtime = false) { - if ($vtime === false) { - $vtime = Controller_Time::time(); - } - - global $wpdb; - $table = Controller_DB::shared()->secrets; - $wpdb->query($wpdb->prepare("INSERT INTO `{$table}` (`user_id`, `secret`, `recovery`, `ctime`, `vtime`, `mode`) VALUES (%d, %s, %s, UNIX_TIMESTAMP(), %d, 'authenticator')", $user->ID, Model_Compat::hex2bin($secret), implode('', array_map(function($r) { return Model_Compat::hex2bin($r); }, $recovery)), $vtime)); - } - - /** - * Validates the 2FA (or recovery) code for the given user. This will return `null` if the user does not have 2FA - * enabled. This check will mark the code as used, preventing its use again. - * - * @param \WP_User $user - * @param string $code - * @return bool|null Returns null if the user does not have 2FA enabled, false if the code is invalid, and true if valid. - */ - public function validate_2fa($user, $code, $update = true) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - $record = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$table}` WHERE `user_id` = %d FOR UPDATE", $user->ID), ARRAY_A); - if (!$record) { - return null; - } - - if (preg_match('/^(?:[a-f0-9]{4}\s*){4}$/i', $code)) { //Recovery code - $code = strtolower(preg_replace('/\s/i', '', $code)); - $recoveryCodes = str_split(strtolower(bin2hex($record['recovery'])), 16); - - $index = array_search($code, $recoveryCodes); - if ($index !== false) { - if ($update) { - unset($recoveryCodes[$index]); - $updatedRecoveryCodes = implode('', $recoveryCodes); - $wpdb->query($wpdb->prepare("UPDATE `{$table}` SET `recovery` = X%s WHERE `id` = %d", $updatedRecoveryCodes, $record['id'])); - } - $wpdb->query('COMMIT'); - return true; - } - } - else if (preg_match('/^(?:[0-9]{3}\s*){2}$/i', $code)) { //TOTP code - $code = preg_replace('/\s/i', '', $code); - $secret = bin2hex($record['secret']); - - $matches = $this->check_code($secret, $code, floor($record['vtime'] / self::TIME_WINDOW_LENGTH)); - if ($matches !== false) { - if ($update) { - $wpdb->query($wpdb->prepare("UPDATE `{$table}` SET `vtime` = %d WHERE `id` = %d", $matches, $record['id'])); - } - $wpdb->query('COMMIT'); - return true; - } - } - - $wpdb->query('ROLLBACK'); - return false; - } - - /** - * Checks whether or not the code is valid for the given secret. If it is, it returns the time window (as a timestamp) - * that matched. If no time windows are provided, it checks the current and one on each side. - * - * @param string $secret The secret as a hex string. - * @param string $code The code. - * @param null|int The last-used time window (as a timestamp). - * @param null|array $windows An array of time windows or null to use the default. - * @return bool|int The time window if matches, otherwise false. - */ - public function check_code($secret, $code, $previous = null, $windows = null) { - $timeCode = floor(Controller_Time::time() / self::TIME_WINDOW_LENGTH); - - if ($windows === null) { - $windows = array(); - $validRange = array(-1, 1); //90 second range for authenticator - - $lowRange = $validRange[0]; - $highRange = $validRange[1]; - for ($i = 0; $i >= $lowRange; $i--) { - $windows[] = $timeCode + $i; - } - for ($i = 1; $i <= $highRange; $i++) { - $windows[] = $timeCode + $i; - } - } - - foreach ($windows as $w) { - if ($previous !== null && $previous >= $w) { - continue; - } - - $expectedCode = $this->_generate_totp($secret, dechex($w)); - if (hash_equals($expectedCode, $code)) { - return $w * self::TIME_WINDOW_LENGTH; - } - } - - return false; - } - - /** - * Generates a TOTP value using the provided parameters. - * - * @param $key The key in hex. - * @param $time The desired time code in hex. - * @param int $digits The number of digits. - * @return string The TOTP value. - */ - private function _generate_totp($key, $time, $digits = 6) - { - $time = Model_Compat::hex2bin(str_pad($time, 16, '0', STR_PAD_LEFT)); - $key = Model_Compat::hex2bin($key); - $hash = hash_hmac('sha1', $time, $key); - - $offset = hexdec(substr($hash, -2)) & 0xf; - $intermediate = ( ((hexdec(substr($hash, $offset * 2, 2)) & 0x7f) << 24) | - ((hexdec(substr($hash, ($offset + 1) * 2, 2)) & 0xff) << 16) | - ((hexdec(substr($hash, ($offset + 2) * 2, 2)) & 0xff) << 8) | - ((hexdec(substr($hash, ($offset + 3) * 2, 2)) & 0xff)) - ); - $otp = $intermediate % pow(10, $digits); - - return str_pad("{$otp}", $digits, '0', STR_PAD_LEFT); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php deleted file mode 100644 index a611ff02..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php +++ /dev/null @@ -1,975 +0,0 @@ -<?php - -namespace WordfenceLS; - -use WordfenceLS\Crypto\Model_JWT; -use WordfenceLS\Crypto\Model_Symmetric; -use RuntimeException; - -class Controller_Users { - const RECOVERY_CODE_COUNT = 5; - const RECOVERY_CODE_SIZE = 8; - const SECONDS_PER_DAY = 86400; - const META_KEY_GRACE_PERIOD_RESET = 'wfls-grace-period-reset'; - const META_KEY_GRACE_PERIOD_OVERRIDE = 'wfls-grace-period-override'; - const META_KEY_ALLOW_GRACE_PERIOD = 'wfls-allow-grace-period'; - const META_KEY_VERIFICATION_TOKENS = 'wfls-verification-tokens'; - const VERIFICATION_TOKEN_BYTES = 64; - const VERIFICATION_TOKEN_LIMIT = 5; //Max number of concurrent tokens - const VERIFICATION_TOKEN_TRANSIENT_PREFIX = 'wfls_verify_'; - const LARGE_USER_BASE_THRESHOLD = 1000; - const TRUNCATED_ROLE_KEY = 1; - - /** - * Returns the singleton Controller_Users. - * - * @return Controller_Users - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_Users(); - } - return $_shared; - } - - public function init() { - $this->_init_actions(); - } - - /** - * Imports the array of 2FA secrets. Users that do not currently exist or are disallowed from enabling 2FA are not imported. - * - * @param array $secrets An array of secrets in the format array(<user id> => array('secret' => <secret in hex>, 'recovery' => <recovery keys in hex>, 'ctime' => <timestamp>, 'vtime' => <timestamp>, 'type' => <type>), ...) - * @return int The number imported. - */ - public function import_2fa($secrets) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - - $count = 0; - foreach ($secrets as $id => $parameters) { - $user = new \WP_User($id); - if (!$user->exists() || !$this->can_activate_2fa($user) || $parameters['type'] != 'authenticator' || $this->has_2fa_active($user)) { continue; } - $secret = Model_Compat::hex2bin($parameters['secret']); - $recovery = Model_Compat::hex2bin($parameters['recovery']); - $ctime = (int) $parameters['ctime']; - $vtime = min((int) $parameters['vtime'], Controller_Time::time()); - $type = $parameters['type']; - $wpdb->query($wpdb->prepare("INSERT INTO `{$table}` (`user_id`, `secret`, `recovery`, `ctime`, `vtime`, `mode`) VALUES (%d, %s, %s, %d, %d, %s)", $user->ID, $secret, $recovery, $ctime, $vtime, $type)); - $count++; - } - return $count; - } - - public function admin_users() { - //We should eventually allow for any user to be granted the manage capability, but we won't account for that now - if (is_multisite()) { - $logins = get_super_admins(); - $users = array(); - foreach ($logins as $l) { - $user = new \WP_User(null, $l); - if ($user->ID > 0) { - $users[] = $user; - } - } - return $users; - } - - $query = new \WP_User_Query(http_build_query(array('role' => 'administrator', 'number' => -1))); - return $query->get_results(); - } - - public function get_users_by_role($role, $limit = -1) { - if ($role === 'super-admin') { - $superAdmins = array(); - foreach(get_super_admins() as $username) { - $superAdmins[] = new \WP_User($username); - } - return $superAdmins; - } - else { - $query = new \WP_User_Query(http_build_query(array('role' => $role, 'number' => is_int($limit) ? $limit : -1))); - return $query->get_results(); - } - } - - /** - * Returns whether or not the user has a valid remembered device. - * - * @param \WP_User $user - * @return bool - */ - public function has_remembered_2fa($user) { - static $_cache = array(); - if (isset($_cache[$user->ID])) { - return $_cache[$user->ID]; - } - - if (!Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED)) { - return false; - } - - $maxExpiration = \WordfenceLS\Controller_Time::time() + Controller_Settings::shared()->get_int(Controller_Settings::OPTION_REMEMBER_DEVICE_DURATION); - - $encrypted = Model_Symmetric::encrypt((string) $user->ID); - if (!$encrypted) { //Can't generate cookie key due to host failure - return false; - } - - foreach ($_COOKIE as $name => $value) { - if (!preg_match('/^wfls\-remembered\-(.+)$/', $name, $matches)) { - continue; - } - - $jwt = Model_JWT::decode_jwt($value); - if (!$jwt || !isset($jwt->payload['iv'])) { - continue; - } - - if (\WordfenceLS\Controller_Time::time() > min($jwt->expiration, $maxExpiration)) { //Either JWT is expired or the remember period was shortened since generating it - continue; - } - - $data = Model_JWT::base64url_convert_from($matches[1]); - $iv = $jwt->payload['iv']; - $encrypted = array('data' => $data, 'iv' => $iv); - $userID = (int) Model_Symmetric::decrypt($encrypted); - if ($userID != 0 && $userID == $user->ID) { - $_cache[$user->ID] = true; - return true; - } - } - - $_cache[$user->ID] = false; - return false; - } - - /** - * Sets the cookie needed to remember the 2FA status. - * - * @param \WP_User $user - */ - public function remember_2fa($user) { - if (!Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED)) { - return; - } - - if ($this->has_remembered_2fa($user)) { - return; - } - - $encrypted = Model_Symmetric::encrypt((string) $user->ID); - if (!$encrypted) { //Can't generate cookie key due to host failure - return; - } - - //Remove old cookies - foreach ($_COOKIE as $name => $value) { - if (!preg_match('/^wfls\-remembered\-(.+)$/', $name, $matches)) { - continue; - } - setcookie($name, '', \WordfenceLS\Controller_Time::time() - 86400); - } - - //Set the new one - $expiration = \WordfenceLS\Controller_Time::time() + Controller_Settings::shared()->get_int(Controller_Settings::OPTION_REMEMBER_DEVICE_DURATION); - $jwt = new Model_JWT(array('iv' => $encrypted['iv']), $expiration); - $cookieName = 'wfls-remembered-' . Model_JWT::base64url_convert_to($encrypted['data']); - $cookieValue = (string) $jwt; - setcookie($cookieName, $cookieValue, $expiration, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), true); - } - - /** - * Returns whether or not 2FA can be activated on the given user. - * - * @param \WP_User $user - * @return bool - */ - public function can_activate_2fa($user) { - if (is_multisite() && !is_super_admin($user->ID)) { - return Controller_Permissions::shared()->does_user_have_multisite_capability($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF); - } - return user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF); - } - - /** - * Returns whether or not any user has 2FA activated. - * - * @return bool - */ - public function any_2fa_active() { - global $wpdb; - $table = Controller_DB::shared()->secrets; - return !!intval($wpdb->get_var("SELECT COUNT(*) FROM `{$table}`")); - } - - /** - * Returns whether or not the user has 2FA activated. - * - * @param \WP_User $user - * @return bool - */ - public function has_2fa_active($user) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - return $this->can_activate_2fa($user) && !!intval($wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM `{$table}` WHERE `user_id` = %d", $user->ID))); - } - - /** - * Deactivates a user. - * - * @param \WP_User $user - */ - public function deactivate_2fa($user) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - $wpdb->query($wpdb->prepare("DELETE FROM `{$table}` WHERE `user_id` = %d", $user->ID)); - } - - private function has_admin_with_2fa_active() { - static $cache = null; - if ($cache === null) { - $activeIDs = $this->_user_ids_with_2fa_active(); - foreach ($activeIDs as $id) { - if (Controller_Permissions::shared()->can_manage_settings(new \WP_User($id))) { - $cache = true; - return $cache; - } - } - $cache = false; - } - return $cache; - } - - /** - * Returns whether or not 2FA is required for the user regardless of activation status. 2FA is considered required - * when the option to require it is enabled and there is at least one administrator with it active. - * - * @param \WP_User $user - * @param bool &$gracePeriod - * @param int &$requiredAt - * @return bool - */ - public function requires_2fa($user, &$gracePeriod = false, &$requiredAt = null) { - static $cache = array(); - if (array_key_exists($user->ID, $cache)) { - list($required, $gracePeriod, $requiredAt) = $cache[$user->ID]; - return $required; - } - else { - $gracePeriod = false; - $requiredAt = null; - $required = $this->does_user_role_require_2fa($user, $gracePeriod, $requiredAt); - $cache[$user->ID] = array($required, $gracePeriod, $requiredAt); - return $required; - } - } - - /** - * Returns the number of recovery codes remaining for the user or null if the user does not have 2FA active. - * - * @param \WP_User $user - * @return float|null - */ - public function recovery_code_count($user) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - $record = $wpdb->get_var($wpdb->prepare("SELECT `recovery` FROM `{$table}` WHERE `user_id` = %d", $user->ID)); - if (!$record) { - return null; - } - - return floor(Model_Crypto::strlen($record) / self::RECOVERY_CODE_SIZE); - } - - /** - * Generates a new set of recovery codes and saves them to $user if provided. - * - * @param \WP_User|bool $user The user to save the codes to or false to just return codes. - * @param int $count - * @return array - */ - public function regenerate_recovery_codes($user = false, $count = self::RECOVERY_CODE_COUNT) { - $codes = array(); - for ($i = 0; $i < $count; $i++) { - $c = \WordfenceLS\Model_Crypto::random_bytes(self::RECOVERY_CODE_SIZE); - $codes[] = $c; - } - - if ($user && Controller_Users::shared()->has_2fa_active($user)) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - $wpdb->query($wpdb->prepare("UPDATE `{$table}` SET `recovery` = %s WHERE `user_id` = %d", implode('', $codes), $user->ID)); - } - - return $codes; - } - - /** - * Records the reCAPTCHA score for later display. - * - * This is not atomic, which means this can miscount on hits that overlap, but the overhead of being atomic is not - * worth it for our use. - * - * @param \WP_User $user|null - * @param float $score - */ - public function record_captcha_score($user, $score) { - if (!Controller_CAPTCHA::shared()->enabled()) { return; } - if ($this->has_2fa_active($user)) { return; } //2FA activated users do not retrieve a score - - if ($user) { update_user_meta($user->ID, 'wfls-last-captcha-score', $score); } - $stats = Controller_Settings::shared()->get_array(Controller_Settings::OPTION_CAPTCHA_STATS); - $int_score = min(max((int) ($score * 10), 0), 10); - $count = array_sum($stats['counts']); - $stats['counts'][$int_score]++; - $stats['avg'] = ($stats['avg'] * $count + $int_score) / ($count + 1); - Controller_Settings::shared()->set_array(Controller_Settings::OPTION_CAPTCHA_STATS, $stats); - } - - /** - * Returns the active and inactive user counts. - * - * @return array - */ - public function user_counts() { - if (is_multisite() && function_exists('get_user_count')) { - $total_users = get_user_count(); - } - else { - global $wpdb; - $total_users = (int) $wpdb->get_var("SELECT COUNT(ID) as c FROM {$wpdb->users}"); - } - $active_users = $this->active_count(); - return array('active_users' => $active_users, 'inactive_users' => max($total_users - $active_users, 0)); - } - - public function detailed_user_counts($force = false) { - global $wpdb; - - $blog_prefix = $wpdb->get_blog_prefix(); - $wp_roles = new \WP_Roles(); - $roles = $wp_roles->get_names(); - - $counts = array(); - $groups = array('avail_roles' => 0, 'active_avail_roles' => 0); - - foreach ($groups as $group => $count) { - $counts[$group] = array(); - foreach ($roles as $role_key => $role_name) { - $counts[$group][$role_key] = 0; - } - $counts[$group][self::TRUNCATED_ROLE_KEY] = 0; - } - - $dbController = Controller_DB::shared(); - - if ($dbController->create_temporary_role_counts_table()) { - $lock = new Utility_NullLock(); - $role_counts_table = $dbController->role_counts_temporary; - } - else { - $lock = new Utility_DatabaseLock($dbController, 'role-count-calculation'); - $role_counts_table = $dbController->role_counts; - } - - try { - $lock->acquire(); - - if(!$force && Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_USER_COUNT_QUERY_STATE)) - throw new RuntimeException('Previous user count query failed to completed successfully. User count queries are currently disabled'); - Controller_Settings::shared()->set(Controller_Settings::OPTION_USER_COUNT_QUERY_STATE, true); - - $dbController->require_schema_version(2); - $secrets_table = $dbController->secrets; - - $dbController->query("TRUNCATE {$role_counts_table}"); - $dbController->query($wpdb->prepare(<<<SQL - INSERT INTO {$role_counts_table} - SELECT - um.meta_value AS serialized_roles, - s.user_id IS NULL AS two_factor_inactive, - 1 AS user_count - FROM - {$wpdb->usermeta} um - INNER JOIN {$wpdb->users} u ON u.ID = um.user_id - LEFT JOIN {$secrets_table} s ON s.user_id = u.ID - WHERE - meta_key = %s - ON DUPLICATE KEY - UPDATE user_count = user_count + 1; -SQL - , "{$blog_prefix}capabilities")); - - $results = $wpdb->get_results(<<<SQL - SELECT - serialized_roles AS serialized_roles, - two_factor_inactive, - user_count - FROM - {$role_counts_table}; -SQL - , OBJECT); - - Controller_Settings::shared()->set(Controller_Settings::OPTION_USER_COUNT_QUERY_STATE, false); - } - catch (RuntimeException $e) { - $lock->release(); //Finally is not supported in older PHP versions, so it is necessary to release the lock in two places - return false; - } - $lock->release(); - - foreach ($results as $row) { - $truncated_role = false; - try { - $row_roles = Utility_Serialization::unserialize($row->serialized_roles, array('allowed_classes' => false), 'is_array'); - } - catch (RuntimeException $e) { - $row_roles = array(self::TRUNCATED_ROLE_KEY => true); - $truncated_role = true; - } - foreach ($row_roles as $row_role => $state) { - if ($state !== true || (!$truncated_role && !is_string($row_role))) - continue; - if (array_key_exists($row_role, $roles) || $row_role === self::TRUNCATED_ROLE_KEY) { - foreach ($groups as $group => &$group_count) { - if ($group === 'active_avail_roles' && $row->two_factor_inactive) - continue; - $counts[$group][$row_role] += $row->user_count; - $group_count += $row->user_count; - } - } - } - } - - foreach ($roles as $role_key => $role_name) { - if ($counts['avail_roles'][$role_key] === 0 && $counts['active_avail_roles'][$role_key] === 0) { - unset($counts['avail_roles'][$role_key]); - unset($counts['active_avail_roles'][$role_key]); - } - } - - // Separately add super admins for multisite - if (is_multisite()) { - $superAdmins = 0; - $activeSuperAdmins = 0; - foreach(get_super_admins() as $username) { - $superAdmins++; - $user = new \WP_User($username); - if ($this->has_2fa_active($user)) { - $activeSuperAdmins++; - } - } - $counts['avail_roles']['super-admin'] = $superAdmins; - $counts['active_avail_roles']['super-admin'] = $activeSuperAdmins; - } - - $counts['total_users'] = $groups['avail_roles']; - $counts['active_total_users'] = $groups['active_avail_roles']; - - return $counts; - } - - /** - * Returns the number of users with 2FA active. - * - * @return int - */ - public function active_count() { - global $wpdb; - $table = Controller_DB::shared()->secrets; - return intval($wpdb->get_var("SELECT COUNT(*) FROM `{$table}`")); - } - - /** - * WP Filters/Actions - */ - - protected function _init_actions() { - add_action('deleted_user', array($this, '_deleted_user')); - add_filter('manage_users_columns', array($this, '_manage_users_columns')); - add_filter('manage_users_custom_column', array($this, '_manage_users_custom_column'), 10, 3); - add_filter('manage_users_sortable_columns', array($this, '_manage_users_sortable_columns'), 10, 1); - add_filter('users_list_table_query_args', array($this, '_users_list_table_query_args')); - add_filter('user_row_actions', array($this, '_user_row_actions'), 10, 2); - add_filter('views_users', array($this, '_views_users')); - - if (is_multisite()) { - add_filter('manage_users-network_columns', array($this, '_manage_users_columns')); - add_filter('manage_users-network_custom_column', array($this, '_manage_users_custom_column'), 10, 3); - add_filter('manage_users-network_sortable_columns', array($this, '_manage_users_sortable_columns'), 10, 1); - add_filter('ms_user_row_actions', array($this, '_user_row_actions'), 10, 2); - add_filter('views_users-network', array($this, '_views_users')); - } - } - - public function _deleted_user($id) { - $user = new \WP_User($id); - if ($user instanceof \WP_User && !$user->exists()) { - global $wpdb; - $table = Controller_DB::shared()->secrets; - $wpdb->query($wpdb->prepare("DELETE FROM `{$table}` WHERE `user_id` = %d", $id)); - } - } - - public function _manage_users_columns($columns = array()) { - if (user_can(wp_get_current_user(), Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS)) { - $columns['wfls_2fa_status'] = esc_html__('2FA Status', 'wordfence'); - } - - if (Controller_Settings::shared()->are_login_history_columns_enabled() && Controller_Permissions::shared()->can_manage_settings(wp_get_current_user())) { - $columns['wfls_last_login'] = esc_html__('Last Login', 'wordfence'); - if (Controller_CAPTCHA::shared()->enabled()) { - $columns['wfls_last_captcha'] = esc_html__('Last CAPTCHA', 'wordfence'); - } - } - return $columns; - } - - public function _manage_users_custom_column($value = '', $column_name = '', $user_id = 0) { - switch($column_name) { - case 'wfls_2fa_status': - $user = new \WP_User($user_id); - $value = __('Not Allowed', 'wordfence'); - if (Controller_Users::shared()->can_activate_2fa($user)) { - $has2fa = Controller_Users::shared()->has_2fa_active($user); - $requires2fa = $this->requires_2fa($user, $inGracePeriod); - if ($has2fa) { - $value = esc_html__('Active', 'wordfence'); - } - elseif ($inGracePeriod) { - $value = wp_kses(__('Inactive<small class="wfls-sub-status">(Grace Period)</small>', 'wordfence'), array('small'=>array('class'=>array()))); - } - elseif (($requires2fa && !$has2fa)) { - $value = wp_kses($inGracePeriod === null ? __('Locked Out<small class="wfls-sub-status">(Grace Period Disabled)</small>', 'wordfence') : __('Locked Out<small class="wfls-sub-status">(Grace Period Exceeded)</small>', 'wordfence'), array('small'=>array('class'=>array()))); - } - else { - $value = esc_html__('Inactive', 'wordfence'); - } - } - break; - case 'wfls_last_login': - $value = '-'; - if (($last = get_user_meta($user_id, 'wfls-last-login', true)) && Utility_Number::isUnixTimestamp($last)) { - $value = Controller_Time::format_local_time(get_option('date_format') . ' ' . get_option('time_format'), $last); - } - break; - case 'wfls_last_captcha': - $user = new \WP_User($user_id); - if (Controller_Users::shared()->can_activate_2fa($user) && Controller_Users::shared()->has_2fa_active($user)) { - $value = __('(not required)', 'wordfence'); - } - else { - $value = '-'; - if (($last = get_user_meta($user_id, 'wfls-last-captcha-score', true))) { - $value = number_format($last, 1); - } - } - break; - } - - return $value; - } - - public function _manage_users_sortable_columns($sortable_columns) { - return array_merge($sortable_columns, array( - 'wfls_last_login' => 'wfls-lastlogin', - 'wfls_last_captcha' => 'wfls-lastcaptcha', - )); - } - - protected function _user_ids_with_2fa_active() { - global $wpdb; - $table = Controller_DB::shared()->secrets; - return $wpdb->get_col("SELECT DISTINCT `user_id` FROM {$table}"); - } - - public function _users_list_table_query_args($args) { - if (isset($_REQUEST['wf2fa']) && preg_match('/^(?:in)?active$/i', $_REQUEST['wf2fa'])) { - $mode = strtolower($_REQUEST['wf2fa']); - if ($mode == 'active') { - $args['include'] = $this->_user_ids_with_2fa_active(); - } - else if ($mode == 'inactive') { - unset($args['include']); - $args['exclude'] = $this->_user_ids_with_2fa_active(); - } - } - - if (isset($args['orderby'])) { - if (is_string($args['orderby'])) { - if ($args['orderby'] == 'wfls-lastlogin') { - $args['meta_key'] = 'wfls-last-login'; - $args['orderby'] = 'meta_value'; - } - else if ($args['orderby'] == 'wfls-lastcaptcha') { - $args['meta_key'] = 'wfls-last-captcha-score'; - $args['orderby'] = 'meta_value'; - } - } - else { - $has_one = false; - if (array_key_exists('wfls-lastlogin', $args['orderby'])) { - $args['meta_key'] = 'wfls-last-login'; - $args['orderby']['meta_value'] = $args['orderby']['wfls-lastlogin']; - unset($args['orderby']['wfls-lastlogin']); - $has_one = true; - } - - if (array_key_exists('wfls-lastcaptcha', $args['orderby'])) { - if (!$has_one) { //We have to discard one if both are set to sort by because $meta_key can only be a single value rather than an array - $args['meta_key'] = 'wfls-last-captcha-score'; - $args['orderby']['meta_value'] = $args['orderby']['wfls-lastcaptcha']; - } - unset($args['orderby']['wfls-lastcaptcha']); - $has_one = true; - } - - if (in_array('wfls-lastlogin', $args['orderby'])) { - if (!$has_one) { //We have to discard one if both are set to sort by because $meta_key can only be a single value rather than an array - $args['meta_key'] = 'wfls-last-login'; - $args['orderby'][] = 'meta_value'; - } - unset($args['orderby'][array_search('wfls-lastlogin', $args['orderby'])]); - $has_one = true; - } - - if (in_array('wfls-lastcaptcha', $args['orderby'])) { - if (!$has_one) { //We have to discard one if both are set to sort by because $meta_key can only be a single value rather than an array - $args['meta_key'] = 'wfls-last-captcha-score'; - $args['orderby'][] = 'meta_value'; - } - unset($args['orderby'][array_search('wfls-lastcaptcha', $args['orderby'])]); - $has_one = true; - } - } - } - return $args; - } - - public function _user_row_actions($actions, $user) { - //Format is 'view' => '<a href="https://wfpremium.dev1.ryanbritton.com/author/ryan/" aria-label="View posts by ryan">View</a>' - if (user_can(wp_get_current_user(), Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS) && (Controller_Users::shared()->can_activate_2fa($user) || Controller_Users::shared()->has_2fa_active($user))) { - $url = (is_multisite() ? network_admin_url('admin.php?page=WFLS&user=' . $user->ID) : admin_url('admin.php?page=WFLS&user=' . $user->ID)); - $actions['wf2fa'] = '<a href="' . esc_url($url) . '" aria-label="' . esc_attr(sprintf(__('Edit two-factor authentication for %s', 'wordfence'), $user->user_login)) . '">' . esc_html__('2FA', 'wordfence') . '</a>'; - } - return $actions; - } - - public function _views_users($views) { - //Format is 'subscriber' => '<a href=\\'users.php?role=subscriber\\'>Subscriber <span class="count">(40,002)</span></a>', - include(ABSPATH . WPINC . '/version.php'); /** @var string $wp_version */ - if (user_can(wp_get_current_user(), Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS) && version_compare($wp_version, '4.4.0', '>=')) { - $counts = $this->user_counts(); - $views['all'] = str_replace(' class="current" aria-current="page"', '', $views['all']); - $views['wfls-active'] = '<a href="' . esc_url(add_query_arg('wf2fa', 'active', 'users.php')) . '"' . (isset($_GET['wf2fa']) && $_GET['wf2fa'] == 'active' ? ' class="current" aria-current="page"' : '') . '>' . esc_html__('2FA Active', 'wordfence') . ' <span class="count">(' . number_format($counts['active_users']) . ')</span></a>'; - $views['wfls-inactive'] = '<a href="' . esc_url(add_query_arg('wf2fa', 'inactive', 'users.php')) . '"' . (isset($_GET['wf2fa']) && $_GET['wf2fa'] == 'inactive' ? ' class="current" aria-current="page"' : '') . '>' . esc_html__('2FA Inactive', 'wordfence') . ' <span class="count">(' . number_format($counts['inactive_users']) . ')</span></a>'; - } - return $views; - } - - private function get_grace_period_reset_time($user) { - $time = get_user_option(self::META_KEY_GRACE_PERIOD_RESET, $user->ID); - if (empty($time)) - return null; - return (int) $time; - } - - public function get_grace_period_override($user) { - $override = get_user_option(self::META_KEY_GRACE_PERIOD_OVERRIDE, $user->ID); - if ($override === false) - return null; - return (int) $override; - } - - private function does_user_role_require_2fa($user, &$inGracePeriod = null, &$requiredAt = null) { - $is2faAdmin = Controller_Permissions::shared()->can_manage_settings($user); - $userDate = self::get_grace_period_reset_time($user); - if ($userDate === null) - $userDate = self::get_registration_date($user); - if ($is2faAdmin && !$this->get_grace_period_allowed_flag($user->ID)) { - $gracePeriod = 0; - $inGracePeriod = null; - } - else { - $gracePeriod = self::get_grace_period_override($user); - if ($gracePeriod === null) - $gracePeriod = Controller_Settings::shared()->get_user_2fa_grace_period(); - $gracePeriod *= self::SECONDS_PER_DAY; - $inGracePeriod = false; - } - $now = time(); - foreach (Controller_Permissions::shared()->get_all_roles($user) as $role) { - $roleDate = Controller_Settings::shared()->get_required_2fa_role_activation_time($role); - if ($roleDate === false) - continue; - $effectiveDate = max($userDate, $roleDate) + $gracePeriod; - if ($requiredAt === null || $effectiveDate < $requiredAt) - $requiredAt = $effectiveDate; - if ($effectiveDate <= $now && (!$is2faAdmin || $this->has_admin_with_2fa_active())) { - if ($inGracePeriod) - $inGracePeriod = false; - return true; - } - else if ($inGracePeriod !== null) { - $inGracePeriod = true; - } - } - return false; - } - - private static function get_registration_date($user) { - return strtotime($user->user_registered); - } - - public function reset_2fa_grace_period($user, $override = null) { - if (!$this->can_activate_2fa($user) || $this->has_2fa_active($user)) - return false; - update_user_option($user->ID, self::META_KEY_GRACE_PERIOD_RESET, time(), true); - if ($override !== null) - update_user_option($user->ID, self::META_KEY_GRACE_PERIOD_OVERRIDE, (int) $override, true); - return true; - } - - public function revoke_grace_period($user) { - foreach(array( - self::META_KEY_GRACE_PERIOD_RESET, - self::META_KEY_GRACE_PERIOD_OVERRIDE, - self::META_KEY_ALLOW_GRACE_PERIOD - ) as $option) { - delete_user_option($user->ID, $option, true); - } - } - - public function allow_grace_period($userId) { - update_user_option($userId, self::META_KEY_ALLOW_GRACE_PERIOD, true, true); - } - - public function get_grace_period_allowed_flag($userId) { - return (bool) get_user_option(self::META_KEY_ALLOW_GRACE_PERIOD, $userId); - } - - public function has_revokable_grace_period($user) { - return $this->get_grace_period_allowed_flag($user->ID) || $this->get_grace_period_reset_time($user) !== null; - } - - private function get_inactive_2fa_super_admins($gracePeriod = false) { - $inactive = array(); - foreach(get_super_admins() as $username) { - $user = new \WP_User($username); - if (!$this->has_2fa_active($user)) { - $this->requires_2fa($user, $inGracePeriod, $requiredAt); - if ($gracePeriod === null || $gracePeriod == $inGracePeriod) { - $current = new \StdClass(); - $current->user_id = $user->ID; - $current->user_login = $username; - $current->required_at = $requiredAt; - $inactive[] = $current; - } - } - } - return $inactive; - } - - private function generate_inactive_2fa_user_query($roleKey, $gracePeriod = null, $page = null, $perPage = null) { - global $wpdb; - $secondsPerDay = (int) self::SECONDS_PER_DAY; - $gracePeriodSeconds = (int) (Controller_Settings::shared()->get_user_2fa_grace_period() * self::SECONDS_PER_DAY); - $roleTime = (int) (Controller_Settings::shared()->get_required_2fa_role_activation_time($roleKey)); - $siteId = get_current_blog_id(); - $blogPrefix = $wpdb->get_blog_prefix($siteId); - $usermeta = $wpdb->usermeta; - $users = $wpdb->users; - $secrets = Controller_DB::shared()->secrets; - $admin = Controller_Permissions::shared()->can_role_manage_settings($roleKey); - $parameters = array( - self::META_KEY_GRACE_PERIOD_RESET, - self::META_KEY_GRACE_PERIOD_OVERRIDE - ); - $gracePeriodClause = "IF(overrides.days IS NULL, $gracePeriodSeconds, overrides.days * $secondsPerDay)"; - $registeredTimestampClause = "UNIX_TIMESTAMP(CONVERT_TZ($users.user_registered, '+00:00', @@time_zone))"; - $now = time(); - if ($admin) { - $allowancesJoin = <<<SQL - LEFT JOIN ( - SELECT - user_id, - meta_value AS allowed - FROM - $usermeta - WHERE - meta_key = %s - ) allowances ON allowances.user_id = $usermeta.user_id -SQL; - $parameters[] = self::META_KEY_ALLOW_GRACE_PERIOD; - $allowedClause = 'IFNULL(allowances.allowed, 0)'; - $gracePeriodClause = "IF($allowedClause = 0, 0, $gracePeriodClause)"; - } - else { - $allowancesJoin = null; - $allowedClause = null; - } - $timeClause = "GREATEST($roleTime, $registeredTimestampClause, IFNULL(resets.time, 0)) + $gracePeriodClause"; - $query = <<<SQL - SELECT - $usermeta.user_id, - $users.user_login, - $timeClause AS required_at - FROM - $usermeta - JOIN $users ON $users.ID = $usermeta.user_id - LEFT JOIN ( - SELECT - user_id, - meta_value AS time - FROM - $usermeta - WHERE - meta_key = %s - ) resets ON resets.user_id = $usermeta.user_id - LEFT JOIN ( - SELECT - user_id, - meta_value AS days - FROM - $usermeta - WHERE - meta_key = %s - ) overrides ON overrides.user_id = $usermeta.user_id - $allowancesJoin - WHERE - meta_key = '{$blogPrefix}capabilities' - AND meta_value LIKE %s - AND NOT $usermeta.user_id IN(SELECT user_id FROM {$secrets}) -SQL; - $conditions = array(); - $operator = 'AND'; - if ($gracePeriod !== null) { - if ($gracePeriod) { - $conditions[] = "$timeClause > $now"; - } - else { - $conditions[] = "$timeClause <= $now"; - $operator = 'OR'; - } - } - if ($admin) { - $conditions[] = $allowedClause . ' = ' . ($gracePeriod ? 1 : 0); - } - if (!empty($conditions)) - $query .= ' AND (' . implode(" $operator ", $conditions). ')'; - if ($page !== null && $perPage !== null) { - $offset = (int) (($page - 1) * $perPage); - $limit = (int) ($perPage + 1); - if ($offset >= 0 && $perPage > 0) - $query .= " LIMIT $offset, $limit"; - } - $serializedRoleKey = serialize($roleKey); - $roleMatch = '%' . (method_exists($wpdb, 'esc_like') ? $wpdb->esc_like($serializedRoleKey) : addcslashes($serializedRoleKey, '_%\\')). '%'; - $parameters[] = $roleMatch; - return $wpdb->prepare( - $query.';', - $parameters - ); - } - - public function get_inactive_2fa_users($roleKey, $gracePeriod = null, $page = null, $perPage = null, &$lastPage = null) { - global $wpdb; - if (is_multisite() && $roleKey === 'super-admin') { - $superAdmins = $this->get_inactive_2fa_super_admins($gracePeriod); - if ($page !== null && $perPage !== null) { - $start = ($page - 1) * $perPage; - $end = $start + $perPage; - $lastPage = $end >= count($superAdmins); - $superAdmins = array_slice($superAdmins, $start, $perPage); - } - return $superAdmins; - } - else { - $query = $this->generate_inactive_2fa_user_query($roleKey, $gracePeriod, $page, $perPage); - $results = $wpdb->get_results($query); - if (count($results) > $perPage) { - $lastPage = false; - array_pop($results); - } - else { - $lastPage = true; - } - return $results; - } - } - - private function get_verification_token_transient_key($hash) { - return self::VERIFICATION_TOKEN_TRANSIENT_PREFIX . $hash; - } - - private function load_verification_token($hash) { - $key = $this->get_verification_token_transient_key($hash); - $userId = get_transient($key); - if ($userId === false) - return null; - return intval($userId); - } - - private function load_verification_tokens($user) { - $storedHashes = get_user_meta($user->ID, self::META_KEY_VERIFICATION_TOKENS, true); - $validHashes = array(); - if (is_array($storedHashes)) { - foreach ($storedHashes as $hash) { - $userId = $this->load_verification_token($hash); - if ($userId === $user->ID) - $validHashes[] = $hash; - } - } - return $validHashes; - } - - private function hash_verification_token($token) { - return wp_hash($token); - } - - public function generate_verification_token($user) { - $token = Model_Crypto::random_bytes(self::VERIFICATION_TOKEN_BYTES); - $hash = $this->hash_verification_token($token); - $tokens = $this->load_verification_tokens($user); - array_unshift($tokens, $hash); - while (count($tokens) > self::VERIFICATION_TOKEN_LIMIT) { - $excessHash = array_pop($tokens); - delete_transient($this->get_verification_token_transient_key($excessHash)); - } - $key = $this->get_verification_token_transient_key($hash); - set_transient($key, $user->ID, WORDFENCE_LS_EMAIL_VALIDITY_DURATION_MINUTES * 60); - update_user_meta($user->ID, self::META_KEY_VERIFICATION_TOKENS, $tokens); - return base64_encode($token); - } - - public function validate_verification_token($token, $user = null) { - $hash = $this->hash_verification_token(base64_decode($token)); - $userId = $this->load_verification_token($hash); - return $userId !== null && ($user === null || $userId === $user->ID); - } - - public function get_user_count() { - global $wpdb; - if (function_exists('get_user_count')) - return get_user_count(); - return $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->users}"); - } - - public function has_large_user_base() { - return $this->get_user_count() >= self::LARGE_USER_BASE_THRESHOLD; - } - - public function should_force_user_counts() { - return isset($_GET['wfls-show-user-counts']); - } - - public function get_detailed_user_counts_if_enabled() { - $force = $this->should_force_user_counts(); - if ($this->has_large_user_base() && !$force) - return null; - return $this->detailed_user_counts($force); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/whitelist.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/whitelist.php deleted file mode 100644 index fc313d50..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/whitelist.php +++ /dev/null @@ -1,317 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Controller_Whitelist { - private $_cachedStatus = array(); - - /** - * Returns the singleton Controller_Whitelist. - * - * @return Controller_Whitelist - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_Whitelist(); - } - return $_shared; - } - - public function is_whitelisted($ip) { - $ipHash = hash('sha256', Model_IP::inet_pton($ip)); - if (isset($this->_cachedStatus[$ipHash])) { - return $this->_cachedStatus[$ipHash]; - } - - $whitelist = Controller_Settings::shared()->whitelisted_ips(); - foreach ($whitelist as $entry) { - if ($this->ip_in_range($ip, $entry)) { - $this->_cachedStatus[$ipHash] = true; - return true; - } - } - $this->_cachedStatus[$ipHash] = false; - return false; - } - - /** - * Check if the supplied IP address is within the user supplied range. - * - * @param string $ip - * @return bool - */ - public function ip_in_range($ip, $range) { - if (strpos($range, '/') !== false) { //CIDR range -- 127.0.0.1/24 - return $this->_cidr_contains_ip($range, $ip); - } - else if (strpos($range, '[') !== false) { //Bracketed range -- 127.0.0.[1-100] - // IPv4 range - if (strpos($range, '.') !== false && strpos($ip, '.') !== false) { - // IPv4-mapped-IPv6 - if (preg_match('/:ffff:([^:]+)$/i', $range, $matches)) { - $range = $matches[1]; - } - if (preg_match('/:ffff:([^:]+)$/i', $ip, $matches)) { - $ip = $matches[1]; - } - - // Range check - if (preg_match('/\[\d+\-\d+\]/', $range)) { - $ipParts = explode('.', $ip); - $whiteParts = explode('.', $range); - $mismatch = false; - if (count($whiteParts) != 4 || count($ipParts) != 4) { - return false; - } - - for ($i = 0; $i <= 3; $i++) { - if (preg_match('/^\[(\d+)\-(\d+)\]$/', $whiteParts[$i], $m)) { - if ($ipParts[$i] < $m[1] || $ipParts[$i] > $m[2]) { - $mismatch = true; - } - } - else if ($whiteParts[$i] != $ipParts[$i]) { - $mismatch = true; - } - } - if ($mismatch === false) { - return true; // Is whitelisted because we did not get a mismatch - } - } - else if ($range == $ip) { - return true; - } - - // IPv6 range - } - else if (strpos($range, ':') !== false && strpos($ip, ':') !== false) { - $ip = strtolower(Model_IP::expand_ipv6_address($ip)); - $range = strtolower($this->_expand_ipv6_range($range)); - if (preg_match('/\[[a-f0-9]+\-[a-f0-9]+\]/i', $range)) { - $IPparts = explode(':', $ip); - $whiteParts = explode(':', $range); - $mismatch = false; - if (count($whiteParts) != 8 || count($IPparts) != 8) { - return false; - } - - for ($i = 0; $i <= 7; $i++) { - if (preg_match('/^\[([a-f0-9]+)\-([a-f0-9]+)\]$/i', $whiteParts[$i], $m)) { - $ip_group = hexdec($IPparts[$i]); - $range_group_from = hexdec($m[1]); - $range_group_to = hexdec($m[2]); - if ($ip_group < $range_group_from || $ip_group > $range_group_to) { - $mismatch = true; - break; - } - } - else if ($whiteParts[$i] != $IPparts[$i]) { - $mismatch = true; - break; - } - } - if ($mismatch === false) { - return true; // Is whitelisted because we did not get a mismatch - } - } - else if ($range == $ip) { - return true; - } - } - } - else if (strpos($range, '-') !== false) { //Linear range -- 127.0.0.1 - 127.0.1.100 - list($ip1, $ip2) = explode('-', $range); - $ip1N = Model_IP::inet_pton($ip1); - $ip2N = Model_IP::inet_pton($ip2); - $ipN = Model_IP::inet_pton($ip); - return (strcmp($ip1N, $ipN) <= 0 && strcmp($ip2N, $ipN) >= 0); - } - else { //Treat as a literal IP - $ip1 = Model_IP::inet_pton($range); - $ip2 = Model_IP::inet_pton($ip); - if ($ip1 !== false && $ip1 === $ip2) { - return true; - } - } - - return false; - } - - /** - * Utility - */ - - /** - * Returns whether or not the CIDR-formatted subnet contains $ip. - * - * @param string $subnet - * @param string $ip A human-readable IP. - * @return bool - */ - protected function _cidr_contains_ip($subnet, $ip) { - list($network, $prefix) = array_pad(explode('/', $subnet, 2), 2, null); - - if (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - // If no prefix was supplied, 32 is implied for IPv4 - if ($prefix === null) { - $prefix = 32; - } - - // Validate the IPv4 network prefix - if ($prefix < 0 || $prefix > 32) { - return false; - } - - // Increase the IPv4 network prefix to work in the IPv6 address space - $prefix += 96; - } - else { - // If no prefix was supplied, 128 is implied for IPv6 - if ($prefix === null) { - $prefix = 128; - } - - // Validate the IPv6 network prefix - if ($prefix < 1 || $prefix > 128) { - return false; - } - } - - $bin_network = Model_Crypto::substr(Model_IP::inet_pton($network), 0, ceil($prefix / 8)); - $bin_ip = Model_Crypto::substr(Model_IP::inet_pton($ip), 0, ceil($prefix / 8)); - if ($prefix % 8 != 0) { //Adjust the last relevant character to fit the mask length since the character's bits are split over it - $pos = intval($prefix / 8); - $adjustment = chr(((0xff << (8 - ($prefix % 8))) & 0xff)); - $bin_network[$pos] = ($bin_network[$pos] & $adjustment); - $bin_ip[$pos] = ($bin_ip[$pos] & $adjustment); - } - - return ($bin_network === $bin_ip); - } - - /** - * Expands a compressed printable range representation of an IPv6 address. - * - * @param string $range - * @return string - */ - protected function _expand_ipv6_range($range) { - $colon_count = substr_count($range, ':'); - $dbl_colon_count = substr_count($range, '::'); - if ($dbl_colon_count > 1) { - return false; - } - $dbl_colon_pos = strpos($range, '::'); - if ($dbl_colon_pos !== false) { - $range = str_replace('::', str_repeat(':0000', (($dbl_colon_pos === 0 || $dbl_colon_pos === strlen($range) - 2) ? 9 : 8) - $colon_count) . ':', $range); - $range = trim($range, ':'); - } - $colon_count = substr_count($range, ':'); - if ($colon_count != 7) { - return false; - } - - $groups = explode(':', $range); - $expanded = ''; - foreach ($groups as $group) { - if (preg_match('/\[([a-f0-9]{1,4})\-([a-f0-9]{1,4})\]/i', $group, $matches)) { - $expanded .= sprintf('[%s-%s]', str_pad(strtolower($matches[1]), 4, '0', STR_PAD_LEFT), str_pad(strtolower($matches[2]), 4, '0', STR_PAD_LEFT)) . ':'; - } - else if (preg_match('/[a-f0-9]{1,4}/i', $group)) { - $expanded .= str_pad(strtolower($group), 4, '0', STR_PAD_LEFT) . ':'; - } - else { - return false; - } - } - return trim($expanded, ':'); - } - - /** - * @return bool - */ - public function is_valid_range($range) { - return $this->_is_valid_cidr_range($range) || $this->_is_valid_bracketed_range($range) || $this->_is_valid_linear_range($range) || Model_IP::is_valid_ip($range); - } - - protected function _is_valid_cidr_range($range) { //e.g., 192.0.2.1/24 - if (preg_match('/[^0-9a-f:\/\.]/i', $range)) { return false; } - $components = explode('/', $range); - if (count($components) != 2) { return false; } - - list($ip, $prefix) = $components; - if (!Model_IP::is_valid_ip($ip)) { return false; } - - if (!preg_match('/^\d+$/', $prefix)) { return false; } - - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - if ($prefix < 0 || $prefix > 32) { return false; } - } - else { - if ($prefix < 1 || $prefix > 128) { return false; } - } - - return true; - } - - protected function _is_valid_bracketed_range($range) { //e.g., 192.0.2.[1-10] - if (preg_match('/[^0-9a-f:\.\[\]\-]/i', $range)) { return false; } - if (strpos($range, '.') !== false) { //IPv4 - if (preg_match_all('/(\d+)/', $range, $matches) > 0) { - foreach ($matches[1] as $match) { - $group = (int) $match; - if ($group > 255 || $group < 0) { - return false; - } - } - } - - $group_regex = '([0-9]{1,3}|\[[0-9]{1,3}\-[0-9]{1,3}\])'; - return preg_match('/^' . str_repeat("{$group_regex}\\.", 3) . $group_regex . '$/i', $range) > 0; - } - - //IPv6 - if (strpos($range, '::') !== false) { - $range = $this->_expand_ipv6_range($range); - } - - if (!$range) { - return false; - } - $group_regex = '([a-f0-9]{1,4}|\[[a-f0-9]{1,4}\-[a-f0-9]{1,4}\])'; - return preg_match('/^' . str_repeat($group_regex . ':', 7) . $group_regex . '$/i', $range) > 0; - } - - protected function _is_valid_linear_range($range) { //e.g., 192.0.2.1-192.0.2.100 - if (preg_match('/[^0-9a-f:\.\-]/i', $range)) { return false; } - list($ip1, $ip2) = explode("-", $range); - $ip1N = Model_IP::inet_pton($ip1); - $ip2N = Model_IP::inet_pton($ip2); - - if ($ip1N === false || !Model_IP::is_valid_ip($ip1) || $ip2N === false || !Model_IP::is_valid_ip($ip2)) { - return false; - } - - return strcmp($ip1N, $ip2N) <= 0; - } - - protected function _is_mixed_range($range) { //e.g., 192.0.2.1-2001:db8::ffff - if (preg_match('/[^0-9a-f:\.\-]/i', $range)) { return false; } - list($ip1, $ip2) = explode("-", $range); - - $ipv4Count = 0; - $ipv4Count += filter_var($ip1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false ? 1 : 0; - $ipv4Count += filter_var($ip2, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false ? 1 : 0; - - $ipv6Count = 0; - $ipv6Count += filter_var($ip1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false ? 1 : 0; - $ipv6Count += filter_var($ip2, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false ? 1 : 0; - - if ($ipv4Count != 2 && $ipv6Count != 2) { - return true; - } - - return false; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/wordfencels.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/wordfencels.php deleted file mode 100644 index 4faa0a71..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/controller/wordfencels.php +++ /dev/null @@ -1,1094 +0,0 @@ -<?php - -namespace WordfenceLS; - -use WordfenceLS\Crypto\Model_JWT; -use WordfenceLS\Crypto\Model_Symmetric; -use WordfenceLS\Text\Model_HTML; -use WordfenceLS\View\Model_Tab; -use WordfenceLS\View\Model_Title; - -class Controller_WordfenceLS { - const VERSION_KEY = 'wordfence_ls_version'; - const USERS_PER_PAGE = 25; - const SHORTCODE_2FA_MANAGEMENT = 'wordfence_2fa_management'; - const WOOCOMMERCE_ENDPOINT = 'wordfence-2fa'; - - private $management_assets_registered = false; - private $management_assets_enqueued = false; - private $use_core_font_awesome_styles = null; - - /** - * Returns the singleton Controller_Wordfence2FA. - * - * @return Controller_WordfenceLS - */ - public static function shared() { - static $_shared = null; - if ($_shared === null) { - $_shared = new Controller_WordfenceLS(); - } - return $_shared; - } - - public function init() { - $this->_init_actions(); - Controller_AJAX::shared()->init(); - Controller_Users::shared()->init(); - Controller_Time::shared()->init(); - Controller_Permissions::shared()->init(); - } - - protected function _init_actions() { - register_activation_hook(WORDFENCE_LS_FCPATH, array($this, '_install_plugin')); - register_deactivation_hook(WORDFENCE_LS_FCPATH, array($this, '_uninstall_plugin')); - - $versionInOptions = ((is_multisite() && function_exists('get_network_option')) ? get_network_option(null, self::VERSION_KEY, false) : get_option(self::VERSION_KEY, false)); - if (!$versionInOptions || version_compare(WORDFENCE_LS_VERSION, $versionInOptions, '>')) { //Either there is no version in options or the version in options is greater and we need to run the upgrade - $this->_install(); - } - - if (!Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ALLOW_XML_RPC)) { - add_filter('xmlrpc_enabled', array($this, '_block_xml_rpc')); - } - - add_action('admin_init', array($this, '_admin_init')); - add_action('login_enqueue_scripts', array($this, '_login_enqueue_scripts')); - add_filter('authenticate', array($this, '_authenticate'), 25, 3); - add_action('set_logged_in_cookie', array($this, '_set_logged_in_cookie'), 25, 4); - add_action('wp_login', array($this, '_record_login'), 999, 1); - add_action('register_post', array($this, '_register_post'), 25, 3); - add_filter('wp_login_errors', array($this, '_wp_login_errors'), 25, 3); - if ($this->is_woocommerce_integration_enabled()) { - $this->init_woocommerce_actions(); - } - add_action('user_new_form', array($this, '_user_new_form')); - add_action('user_register', array($this, '_user_register')); - - $useSubmenu = WORDFENCE_LS_FROM_CORE; - if (is_multisite() && !is_network_admin()) { - $useSubmenu = false; - } - - add_action('admin_menu', array($this, '_admin_menu'), $useSubmenu ? 55 : 10); - if (is_multisite()) { - add_action('network_admin_menu', array($this, '_admin_menu'), $useSubmenu ? 55 : 10); - } - add_action('admin_enqueue_scripts', array($this, '_admin_enqueue_scripts')); - - add_action('show_user_profile', array($this, '_edit_user_profile'), 0); //We can't add it to the password section directly -- priority 0 is as close as we can get - add_action('edit_user_profile', array($this, '_edit_user_profile'), 0); - - add_action('init', array($this, '_wordpress_init')); - if ($this->is_shortcode_enabled()) - add_action('wp_enqueue_scripts', array($this, '_handle_shortcode_prerequisites')); - - Controller_Permissions::_init_actions(); - } - - public function _wordpress_init() { - if (!WORDFENCE_LS_FROM_CORE) - load_plugin_textdomain('wordfence-login-security', false, WORDFENCE_LS_PATH . 'languages'); - if ($this->is_shortcode_enabled()) - add_shortcode(self::SHORTCODE_2FA_MANAGEMENT, array($this, '_handle_user_2fa_management_shortcode')); - } - - private function init_woocommerce_actions() { - add_action('woocommerce_before_customer_login_form', array($this, '_woocommerce_login_enqueue_scripts')); - add_action('woocommerce_before_checkout_form', array($this, '_woocommerce_checkout_login_enqueue_scripts')); - add_action('wp_loaded', array($this, '_handle_woocommerce_registration'), 10, 0); //Woocommerce uses priority 20 - - if ($this->is_woocommerce_account_integration_enabled()) { - add_filter('woocommerce_account_menu_items', array($this, '_woocommerce_account_menu_items')); - add_filter('woocommerce_account_wordfence-2fa_endpoint', array($this, '_woocommerce_account_menu_content')); - add_filter('woocommerce_get_query_vars', array($this, '_woocommerce_get_query_vars')); - add_action('wp_enqueue_scripts', array($this, '_woocommerce_account_enqueue_assets')); - } - } - - public function _admin_init() { - if (WORDFENCE_LS_FROM_CORE) { - \wfModuleController::shared()->addOptionIndex('wfls-option-enable-2fa-roles', __('Login Security: Enable 2FA for these roles', 'wordfence')); - \wfModuleController::shared()->addOptionIndex('wfls-option-allow-remember', __('Login Security: Allow remembering device for 30 days', 'wordfence')); - \wfModuleController::shared()->addOptionIndex('wfls-option-require-2fa-xml-rpc', __('Login Security: Require 2FA for XML-RPC call authentication', 'wordfence')); - \wfModuleController::shared()->addOptionIndex('wfls-option-disable-xml-rpc', __('Login Security: Disable XML-RPC authentication', 'wordfence')); - \wfModuleController::shared()->addOptionIndex('wfls-option-whitelist-2fa', __('Login Security: Allowlisted IP addresses that bypass 2FA and reCAPTCHA', 'wordfence')); - \wfModuleController::shared()->addOptionIndex('wfls-option-enable-captcha', __('Login Security: Enable reCAPTCHA on the login and user registration pages', 'wordfence')); - - $title = __('Login Security Options', 'wordfence'); - $description = __('Login Security options are available on the Login Security options page', 'wordfence'); - $url = esc_url(network_admin_url('admin.php?page=WFLS#top#settings')); - $link = __('Login Security Options', 'wordfence');; - \wfModuleController::shared()->addOptionBlock(<<<END -<div class="wf-row"> - <div class="wf-col-xs-12"> - <div class="wf-block wf-always-active" data-persistence-key=""> - <div class="wf-block-header"> - <div class="wf-block-header-content"> - <div class="wf-block-title"> - <strong>{$title}</strong> - </div> - </div> - </div> - <div class="wf-block-content"> - <ul class="wf-block-list"> - <li> - <ul class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width wf-add-top wf-add-bottom"> - <li>{$description}</li> - <li class="wf-right wf-left-xs wf-padding-add-top-xs-small"> - <a href="{$url}" class="wf-btn wf-btn-primary wf-btn-callout-subtle" id="wf-login-security-options">{$link}</a> - </li> - </ul> - <input type="hidden" id="wfls-option-enable-2fa-roles"> - <input type="hidden" id="wfls-option-allow-remember"> - <input type="hidden" id="wfls-option-require-2fa-xml-rpc"> - <input type="hidden" id="wfls-option-disable-xml-rpc"> - <input type="hidden" id="wfls-option-whitelist-2fa"> - <input type="hidden" id="wfls-option-enable-captcha"> - </li> - </ul> - </div> - </div> - </div> -</div> <!-- end ls options --> -END -); - } - - if (Controller_Permissions::shared()->can_manage_settings()) { - if ((is_plugin_active('jetpack/jetpack.php') || (is_multisite() && is_plugin_active_for_network('jetpack/jetpack.php'))) && !Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ALLOW_XML_RPC)) { - if (is_multisite()) { - add_action('network_admin_notices', array($this, '_jetpack_xml_rpc_notice')); - } - else { - add_action('admin_notices', array($this, '_jetpack_xml_rpc_notice')); - } - } - - if (Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_CAPTCHA_TEST_MODE) && Controller_CAPTCHA::shared()->enabled()) { - if (is_multisite()) { - add_action('network_admin_notices', array($this, '_recaptcha_test_notice')); - } - else { - add_action('admin_notices', array($this, '_recaptcha_test_notice')); - } - } - - if ($this->has_woocommerce() && !Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION)) { - if (!Controller_Notices::shared()->is_persistent_notice_dismissed(get_current_user_id(), Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION)) { - Controller_Notices::shared()->register_persistent_notice(Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION); - add_action(is_multisite() ? 'network_admin_notices' : 'admin_notices', array($this, '_woocommerce_integration_notice')); - } - } - } - } - - /** - * Notices - */ - - public function _jetpack_xml_rpc_notice() { - echo '<div class="notice notice-warning"><p>' . wp_kses(sprintf(__('XML-RPC authentication is disabled. Jetpack is currently active and requires XML-RPC authentication to work correctly. <a href="%s">Manage Settings</a>', 'wordfence'), esc_url(network_admin_url('admin.php?page=WFLS#top#settings'))), array('a'=>array('href'=>array()))) . '</p></div>'; - } - - public function _recaptcha_test_notice() { - echo '<div class="notice notice-warning"><p>' . wp_kses(sprintf(__('reCAPTCHA test mode is enabled. While enabled, login and registration requests will be checked for their score but will not be blocked if the score is below the minimum score. <a href="%s">Manage Settings</a>', 'wordfence'), esc_url(network_admin_url('admin.php?page=WFLS#top#settings'))), array('a'=>array('href'=>array()))) . '</p></div>'; - } - - public function _woocommerce_integration_notice() { -?> - <div id="<?php echo esc_attr(Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION) ?>" class="notice notice-warning is-dismissible wfls-persistent-notice"> - <p> - <?php esc_html_e('WooCommerce appears to be installed, but the Wordfence Login Security WooCommerce integration is not currently enabled. Without this feature, WooCommerce forms will not support all functionality provided by Wordfence Login Security, including CAPTCHA for the login page and user registration.', 'wordfence'); ?> - <a href="<?php echo esc_attr(esc_url(network_admin_url('admin.php?page=WFLS#top#settings'))) ?>"><?php esc_html_e('Manage Settings', 'wordfence') ?></a> - </p> - </div> -<?php - } - - /** - * Installation/Uninstallation - */ - - public function _install_plugin() { - $this->_install(); - } - - public function _uninstall_plugin() { - Controller_Time::shared()->uninstall(); - Controller_Permissions::shared()->uninstall(); - - foreach (array(self::VERSION_KEY) as $opt) { - if (is_multisite() && function_exists('delete_network_option')) { - delete_network_option(null, $opt); - } - delete_option($opt); - } - - if (Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_DELETE_ON_DEACTIVATION)) { - Controller_DB::shared()->uninstall(); - } - - $this->purge_rewrite_rules(); - } - - protected function _install() { - static $_runInstallCalled = false; - if ($_runInstallCalled) { return; } - $_runInstallCalled = true; - - if (function_exists('ignore_user_abort')) { - @ignore_user_abort(true); - } - - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - - $previousVersion = ((is_multisite() && function_exists('get_network_option')) ? get_network_option(null, self::VERSION_KEY, '0.0.0') : get_option(self::VERSION_KEY, '0.0.0')); - if (is_multisite() && function_exists('update_network_option')) { - update_network_option(null, self::VERSION_KEY, WORDFENCE_LS_VERSION); //In case we have a fatal error we don't want to keep running install. - } - else { - update_option(self::VERSION_KEY, WORDFENCE_LS_VERSION); //In case we have a fatal error we don't want to keep running install. - } - - Controller_DB::shared()->install(); - Controller_Settings::shared()->set_defaults(); - - if (\WordfenceLS\Controller_Time::time() > Controller_Settings::shared()->get_int(Controller_Settings::OPTION_LAST_SECRET_REFRESH) + 180 * 86400) { - Model_Crypto::refresh_secrets(); - } - - Controller_Time::shared()->install(); - Controller_Permissions::shared()->install(); - - $this->purge_rewrite_rules(); - } - - private function purge_rewrite_rules() { - // This is usually done internally in WP_Rewrite::flush_rules, but is followed there by WP_Rewrite::wp_rewrite_rules which repopulates it. This should cause it to be repopulated on the next request. - update_option('rewrite_rules', ''); - } - - /** - * In most cases, this will be done internally by WooCommerce since we are using the woocommerce_get_query_vars filter, but when toggling the option on our settings page we must still do this manually - */ - private function register_rewrite_endpoints() { - add_rewrite_endpoint(self::WOOCOMMERCE_ENDPOINT, $this->is_woocommerce_account_integration_enabled() ? EP_PAGES : EP_NONE); - } - - public function refresh_rewrite_rules() { - $this->register_rewrite_endpoints(); - flush_rewrite_rules(); - } - - public function _block_xml_rpc() { - /** - * Fires just prior to blocking an XML-RPC request. After firing this action hook the XML-RPC request is blocked. - * - * @param int $source The source code of the block. - */ - do_action('wfls_xml_rpc_blocked', 2); - return false; - } - - private function has_woocommerce() { - return class_exists('woocommerce'); - } - - private function is_woocommerce_integration_enabled() { - return Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION); - } - - private function is_woocommerce_account_integration_enabled() { - return $this->is_woocommerce_integration_enabled() && Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION); - } - - private function is_shortcode_enabled() { - return Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_SHORTCODE); - } - - public function _woocommerce_login_enqueue_scripts() { - wp_enqueue_style('dashicons'); - $this->_login_enqueue_scripts(); - } - - public function _woocommerce_checkout_login_enqueue_scripts() { - /** - * This is the same check used in WooCommerce to determine whether or not to display the checkout login form - * @see templates/checkout/form-login.php in WooCommerce - */ - if ( is_user_logged_in() || 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ) { - return; - } - $this->_woocommerce_login_enqueue_scripts(); - } - - /** - * Login Page - */ - public function _login_enqueue_scripts() { - $useCAPTCHA = Controller_CAPTCHA::shared()->enabled(); - if ($useCAPTCHA) { - wp_enqueue_script('wordfence-ls-recaptcha', 'https://www.google.com/recaptcha/api.js?render=' . urlencode(Controller_Settings::shared()->get(Controller_Settings::OPTION_RECAPTCHA_SITE_KEY))); - } - - if ($useCAPTCHA || Controller_Users::shared()->any_2fa_active()) { - $this->validate_email_verification_token(null, $verification); - - Model_Script::create('wordfence-ls-login', Model_Asset::js('login.js'), array('jquery'), WORDFENCE_LS_VERSION) - ->withTranslations(array( - 'Message to Support' => __('Message to Support', 'wordfence'), - 'Send' => __('Send', 'wordfence'), - 'An error was encountered while trying to send the message. Please try again.' => __('An error was encountered while trying to send the message. Please try again.', 'wordfence'), - '<strong>ERROR</strong>: An error was encountered while trying to send the message. Please try again.' => wp_kses(__('<strong>ERROR</strong>: An error was encountered while trying to send the message. Please try again.', 'wordfence'), array('strong' => array())), - 'Login failed with status code 403. Please contact the site administrator.' => __('Login failed with status code 403. Please contact the site administrator.', 'wordfence'), - '<strong>ERROR</strong>: Login failed with status code 403. Please contact the site administrator.' => wp_kses(__('<strong>ERROR</strong>: Login failed with status code 403. Please contact the site administrator.', 'wordfence'), array('strong' => array())), - 'Login failed with status code 503. Please contact the site administrator.' => __('Login failed with status code 503. Please contact the site administrator.', 'wordfence'), - '<strong>ERROR</strong>: Login failed with status code 503. Please contact the site administrator.' => wp_kses(__('<strong>ERROR</strong>: Login failed with status code 503. Please contact the site administrator.', 'wordfence'), array('strong' => array())), - 'Wordfence 2FA Code' => __('Wordfence 2FA Code', 'wordfence'), - 'Remember for 30 days' => __('Remember for 30 days', 'wordfence'), - 'Log In' => __('Log In', 'wordfence'), - '<strong>ERROR</strong>: An error was encountered while trying to authenticate. Please try again.' => wp_kses(__('<strong>ERROR</strong>: An error was encountered while trying to authenticate. Please try again.', 'wordfence'), array('strong' => array())), - 'The Wordfence 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes.' => __('The Wordfence 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes.', 'wordfence') - )) - ->setTranslationObjectName('WFLS_LOGIN_TRANSLATIONS') - ->enqueue(); - wp_enqueue_style('wordfence-ls-login', Model_Asset::css('login.css'), array(), WORDFENCE_LS_VERSION); - wp_localize_script('wordfence-ls-login', 'WFLSVars', array( - 'ajaxurl' => Utility_URL::relative_admin_url('admin-ajax.php'), - 'nonce' => wp_create_nonce('wp-ajax'), - 'recaptchasitekey' => Controller_Settings::shared()->get(Controller_Settings::OPTION_RECAPTCHA_SITE_KEY), - 'useCAPTCHA' => $useCAPTCHA, - 'allowremember' => Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED), - 'verification' => $verification, - )); - } - } - - private function get_2fa_management_script_data() { - return array( - 'WFLSVars' => array( - 'ajaxurl' => Utility_URL::relative_admin_url('admin-ajax.php'), - 'nonce' => wp_create_nonce('wp-ajax'), - 'modalTemplate' => Model_View::create('common/modal-prompt', array('title' => '${title}', 'message' => '${message}', 'primaryButton' => array('id' => 'wfls-generic-modal-close', 'label' => __('Close', 'wordfence'), 'link' => '#')))->render(), - 'modalNoButtonsTemplate' => Model_View::create('common/modal-prompt', array('title' => '${title}', 'message' => '${message}'))->render(), - 'tokenInvalidTemplate' => Model_View::create('common/modal-prompt', array('title' => '${title}', 'message' => '${message}', 'primaryButton' => array('id' => 'wfls-token-invalid-modal-reload', 'label' => __('Reload', 'wordfence'), 'link' => '#')))->render(), - 'modalHTMLTemplate' => Model_View::create('common/modal-prompt', array('title' => '${title}', 'message' => '{{html message}}', 'primaryButton' => array('id' => 'wfls-generic-modal-close', 'label' => __('Close', 'wordfence'), 'link' => '#')))->render() - ) - ); - } - - public function should_use_core_font_awesome_styles() { - if ($this->use_core_font_awesome_styles === null) { - $this->use_core_font_awesome_styles = wp_style_is('wordfence-font-awesome-style'); - } - return $this->use_core_font_awesome_styles; - } - - private function get_2fa_management_assets($embedded = false) { - $assets = array( - Model_Script::create('wordfence-ls-jquery.qrcode', Model_Asset::js('jquery.qrcode.min.js'), array('jquery'), WORDFENCE_LS_VERSION), - Model_Script::create('wordfence-ls-jquery.tmpl', Model_Asset::js('jquery.tmpl.min.js'), array('jquery'), WORDFENCE_LS_VERSION), - Model_Script::create('wordfence-ls-jquery.colorbox', Model_Asset::js('jquery.colorbox.min.js'), array('jquery'), WORDFENCE_LS_VERSION) - ); - if (Controller_Permissions::shared()->can_manage_settings()) { - $assets[] = Model_Style::create('wordfence-ls-jquery-ui-css', Model_Asset::css('jquery-ui.min.css'), array(), WORDFENCE_LS_VERSION); - $assets[] = Model_Style::create('wordfence-ls-jquery-ui-css.structure', Model_Asset::css('jquery-ui.structure.min.css'), array(), WORDFENCE_LS_VERSION); - $assets[] = Model_Style::create('wordfence-ls-jquery-ui-css.theme', Model_Asset::css('jquery-ui.theme.min.css'), array(), WORDFENCE_LS_VERSION); - } - $assets[] = Model_Script::create('wordfence-ls-admin', Model_Asset::js('admin.js'), array('jquery'), WORDFENCE_LS_VERSION) - ->withTranslation('You have unsaved changes to your options. If you leave this page, those changes will be lost.', __('You have unsaved changes to your options. If you leave this page, those changes will be lost.', 'wordfence')) - ->setTranslationObjectName('WFLS_ADMIN_TRANSLATIONS'); - $registered = array( - Model_Script::create('chart-js', Model_Asset::js('chart.umd.js'), array('jquery'), '4.2.1')->setRegistered(), - Model_Script::create('wordfence-select2-js', Model_Asset::js('wfselect2.min.js'), array('jquery'), WORDFENCE_LS_VERSION)->setRegistered(), - Model_Style::create('wordfence-select2-css', Model_Asset::css('wfselect2.min.css'), array(), WORDFENCE_LS_VERSION)->setRegistered() - ); - if (!WORDFENCE_LS_FROM_CORE && !$this->management_assets_registered) { - foreach ($registered as $asset) - $asset->register(); - $this->management_assets_registered = true; - } - $assets = array_merge($assets, $registered); - $assets[] = Model_Style::create('wordfence-ls-admin', Model_Asset::css('admin.css'), array(), WORDFENCE_LS_VERSION); - $assets[] = Model_Style::create('wordfence-ls-colorbox', Model_Asset::css('colorbox.css'), array(), WORDFENCE_LS_VERSION); - $assets[] = Model_Style::create('wordfence-ls-ionicons', Model_Asset::css('ionicons.css'), array(), WORDFENCE_LS_VERSION); - if ($embedded) { - $assets[] = Model_Style::create('dashicons'); - $assets[] = Model_Style::create('wordfence-ls-embedded', Model_Asset::css('embedded.css'), array(), WORDFENCE_LS_VERSION); - } - if (!$this->should_use_core_font_awesome_styles()) { - $assets[] = Model_Style::create('wordfence-ls-font-awesome', Model_Asset::css('font-awesome.css'), array(), WORDFENCE_LS_VERSION); - } - return $assets; - } - - private function enqueue_2fa_management_assets($embedded = false) { - if ($this->management_assets_enqueued) - return; - foreach ($this->get_2fa_management_assets($embedded) as $asset) - $asset->enqueue(); - foreach ($this->get_2fa_management_script_data() as $key => $data) - wp_localize_script('wordfence-ls-admin', $key, $data); - $this->management_assets_enqueued = true; - } - - /** - * Admin Pages - */ - public function _admin_enqueue_scripts($hookSuffix) { - if (isset($_GET['page']) && $_GET['page'] == 'WFLS') { - $this->enqueue_2fa_management_assets(); - } - else { - wp_enqueue_style('wordfence-ls-admin-global', Model_Asset::css('admin-global.css'), array(), WORDFENCE_LS_VERSION); - } - - if (Controller_Notices::shared()->has_notice(wp_get_current_user()) || in_array($hookSuffix, array('user-edit.php', 'user-new.php', 'profile.php'))) { - wp_enqueue_script('wordfence-ls-admin-global', Model_Asset::js('admin-global.js'), array('jquery'), WORDFENCE_LS_VERSION); - - wp_localize_script('wordfence-ls-admin-global', 'GWFLSVars', array( - 'ajaxurl' => admin_url('admin-ajax.php'), - 'nonce' => wp_create_nonce('wp-ajax'), - )); - } - - } - - public function _edit_user_profile($user) { - if ($user->ID == get_current_user_id() || !current_user_can(Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS)) { - $manageURL = admin_url('admin.php?page=WFLS'); - } - else { - $manageURL = admin_url('admin.php?page=WFLS&user=' . ((int) $user->ID)); - } - - if (is_multisite() && is_super_admin()) { - if ($user->ID == get_current_user_id()) { - $manageURL = network_admin_url('admin.php?page=WFLS'); - } - else { - $manageURL = network_admin_url('admin.php?page=WFLS&user=' . ((int) $user->ID)); - } - } - $userAllowed2fa = Controller_Users::shared()->can_activate_2fa($user); - $viewerIsUser = $user->ID == get_current_user_id(); - $viewerCanManage2fa = current_user_can(Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS); - $requires2fa = Controller_Users::shared()->requires_2fa($user, $inGracePeriod, $requiredAt); - $has2fa = Controller_Users::shared()->has_2fa_active($user); - $lockedOut = $requires2fa && !$has2fa; - $hasGracePeriod = Controller_Settings::shared()->get_user_2fa_grace_period() > 0; - if ($userAllowed2fa && ($viewerIsUser || $viewerCanManage2fa)): -?> - <h2 id="wfls-user-settings"><?php esc_html_e('Wordfence Login Security', 'wordfence'); ?></h2> - <table class="form-table"> - <tr id="wordfence-ls"> - <th><label for="wordfence-ls-btn"><?php esc_html_e('2FA Status', 'wordfence'); ?></label></th> - <td> - <?php if ($userAllowed2fa): ?> - <p> - <strong><?php echo $lockedOut ? esc_html__('Locked Out', 'wordfence') : ($has2fa ? esc_html__('Active', 'wordfence') : esc_html__('Inactive', 'wordfence')); ?>:</strong> - <?php echo $lockedOut ? - ($viewerIsUser ? esc_html__('Two-factor authentication is required for your account, but has not been configured.', 'wordfence') : esc_html__('Two-factor authentication is required for this account, but has not been configured.', 'wordfence')) - : ($has2fa ? esc_html__('Wordfence 2FA is active.', 'wordfence') : esc_html__('Wordfence 2FA is inactive.', 'wordfence')); ?> - <a href="<?php echo Controller_Support::esc_supportURL(Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence'); ?></a> - </p> - <?php if (!$has2fa && $inGracePeriod): ?> - <p><strong><?php echo sprintf($viewerIsUser ? - esc_html__('Two-factor authentication must be activated for your account prior to %s to avoid losing access.', 'wordfence') - : esc_html__('Two-factor authentication must be activated for this account prior to %s.', 'wordfence') - , Controller_Time::format_local_time('F j, Y g:i A', $requiredAt)) ?></strong></p> - <?php endif ?> - <?php if ($has2fa || $viewerIsUser): ?><p><a href="<?php echo esc_url($manageURL); ?>" class="button"><?php echo (Controller_Users::shared()->has_2fa_active($user) ? esc_html__('Manage 2FA', 'wordfence') : esc_html__('Activate 2FA', 'wordfence')); ?></a></p><?php endif ?> - <?php endif ?> - <?php if ($viewerCanManage2fa): ?> - <?php if (!$userAllowed2fa): ?> - <p><strong><?php esc_html_e('Disabled', 'wordfence'); ?>:</strong> <?php esc_html_e('Two-factor authentication is not currently enabled for this account type. To enable it, visit the Wordfence 2FA Settings page.', 'wordfence'); ?> <a href="#"><?php esc_html_e('Learn More', 'wordfence'); ?></a></p> - <?php endif ?> - <?php if ($lockedOut): ?> - <?php echo Model_View::create( - 'common/reset-grace-period', - array( - 'user' => $user, - 'gracePeriod' => $inGracePeriod - ))->render() ?> - <?php elseif ($inGracePeriod && Controller_Users::shared()->has_revokable_grace_period($user)): ?> - <?php echo Model_View::create( - 'common/revoke-grace-period', - array( - 'user' => $user - ))->render() ?> - <?php endif ?> - <p> - <a href="<?php echo esc_url(is_multisite() ? network_admin_url('admin.php?page=WFLS#top#settings') : admin_url('admin.php?page=WFLS#top#settings')); ?>" class="button"><?php esc_html_e('Manage 2FA Settings', 'wordfence'); ?></a> - </p> - <?php endif ?> - </td> - </tr> - </table> -<?php - endif; - } - - /** - * Authentication - */ - - private function _is_woocommerce_login() { - if (!$this->has_woocommerce()) - return false; - $nonceValue = ''; - foreach (array('woocommerce-login-nonce', '_wpnonce') as $key) { - if (array_key_exists($key, $_REQUEST)) { - $nonceValue = $_REQUEST[$key]; - break; - } - } - - return ( isset( $_POST['login'], $_POST['username'], $_POST['password'] ) && is_string($nonceValue) && wp_verify_nonce( $nonceValue, 'woocommerce-login' ) ); - } - - public function _authenticate($user, $username, $password) { - if (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST && !Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_XMLRPC_ENABLED)) { //XML-RPC call and we're not enforcing 2FA on it - return $user; - } - - if (Controller_Whitelist::shared()->is_whitelisted(Model_Request::current()->ip())) { //Whitelisted, so we're not enforcing 2FA - return $user; - } - - $isLogin = !(defined('WORDFENCE_LS_AUTHENTICATION_CHECK') && WORDFENCE_LS_AUTHENTICATION_CHECK); //Checking for the purpose of prompting for 2FA, don't enforce it here - $combinedTwoFactor = false; - - /* - * If we don't have a valid $user at this point, it means the $username/$password combo is invalid. We'll check - * to see if the user has provided a combined password in the format `<password><code>`, populating $user from - * that if so. - */ - if (!defined('WORDFENCE_LS_CHECKING_COMBINED') && (!isset($_POST['wfls-token']) || !is_string($_POST['wfls-token'])) && (!is_object($user) || !($user instanceof \WP_User))) { - //Compatibility with WF legacy 2FA - $combinedTOTPRegex = '/((?:[0-9]{3}\s*){2})$/i'; - $combinedRecoveryRegex = '/((?:[a-f0-9]{4}\s*){4})$/i'; - if ($this->legacy_2fa_active()) { - $combinedTOTPRegex = '/(?<! wf)((?:[0-9]{3}\s*){2})$/i'; - $combinedRecoveryRegex = '/(?<! wf)((?:[a-f0-9]{4}\s*){4})$/i'; - } - - if (preg_match($combinedTOTPRegex, $password, $matches)) { //Possible TOTP code - if (strlen($password) > strlen($matches[1])) { - $revisedPassword = substr($password, 0, strlen($password) - strlen($matches[1])); - $code = $matches[1]; - } - } - else if (preg_match($combinedRecoveryRegex, $password, $matches)) { //Possible recovery code - if (strlen($password) > strlen($matches[1])) { - $revisedPassword = substr($password, 0, strlen($password) - strlen($matches[1])); - $code = $matches[1]; - } - } - - if (isset($revisedPassword)) { - define('WORDFENCE_LS_CHECKING_COMBINED', true); //Avoid recursing into this block - if (!defined('WORDFENCE_LS_AUTHENTICATION_CHECK')) { define('WORDFENCE_LS_AUTHENTICATION_CHECK', true); } - $revisedUser = wp_authenticate($username, $revisedPassword); - if (is_object($revisedUser) && ($revisedUser instanceof \WP_User) && Controller_TOTP::shared()->validate_2fa($revisedUser, $code, $isLogin)) { - define('WORDFENCE_LS_COMBINED_IS_VALID', true); //This will cause the front-end to skip the 2FA prompt - $user = $revisedUser; - $combinedTwoFactor = true; - } - } - } - - /* - * CAPTCHA Check - * - * It will be enforced so long as: - * - * 1. It's enabled and keys are set. - * 2. This is not an XML-RPC request. An XML-RPC request is de facto an automated request, so a CAPTCHA makes - * no sense. - * 3. A filter does not override it. This is to allow plugins with REST endpoints that handle authentication - * themselves to opt out of the requirement. - * 4. The user does not have 2FA enabled. 2FA exempts the user from requiring email verification if the score is - * below the threshold. - * 5. The request is not a WooCommerce login while WC integration is disabled - */ - if ($isLogin && !empty($username) && (!$this->_is_woocommerce_login() || Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION))) { //Login attempt, not just a wp-login.php page load - - $requireCAPTCHA = Controller_CAPTCHA::shared()->is_captcha_required(); - - $performVerification = false; - $token = Controller_CAPTCHA::shared()->get_token(); - if ($requireCAPTCHA && empty($token) && !Controller_CAPTCHA::shared()->test_mode()) { //No CAPTCHA token means forced additional verification (if neither 2FA nor test mode are active) - $performVerification = true; - } - - if ($requireCAPTCHA && !$performVerification) { - $score = Controller_CAPTCHA::shared()->score($token); - if ($score === false && !Controller_CAPTCHA::shared()->test_mode()) { //An invalid token will require additional verification (if neither 2FA nor test mode are active) - $performVerification = true; - } - } - - if (!isset($score)) { $score = false; } - - if (is_object($user) && $user instanceof \WP_User) { - if (Controller_Users::shared()->has_2fa_active($user)) { //CAPTCHA enforcement skipped for users with 2FA active - $requireCAPTCHA = false; - $performVerification = false; - } - - Controller_Users::shared()->record_captcha_score($user, $score); - - //Skip the CAPTCHA check if the email address was verified - if ($this->validate_email_verification_token($user)) { - $requireCAPTCHA = false; - $performVerification = false; - } - - if ($requireCAPTCHA && ($performVerification || !Controller_CAPTCHA::shared()->is_human($score))) { - if ($this->has_woocommerce() && array_key_exists('woocommerce-login-nonce', $_POST)) { - $loginUrl = get_permalink(get_option('woocommerce_myaccount_page_id')); - } - else { - $loginUrl = wp_login_url(); - } - $verificationUrl = add_query_arg( - array( - 'wfls-email-verification' => rawurlencode(Controller_Users::shared()->generate_verification_token($user)) - ), - $loginUrl - ); - $view = new Model_View('email/login-verification', array( - 'siteName' => get_bloginfo('name', 'raw'), - 'siteURL' => rtrim(site_url(), '/') . '/', - 'verificationURL' => $verificationUrl, - 'ip' => Model_Request::current()->ip(), - 'canEnable2FA' => Controller_Users::shared()->can_activate_2fa($user), - )); - wp_mail($user->user_email, __('Login Verification Required', 'wordfence'), $view->render(), "Content-Type: text/html"); - - return new \WP_Error('wfls_captcha_verify', wp_kses(__('<strong>VERIFICATION REQUIRED</strong>: Additional verification is required for login. Please check the email address associated with the account for a verification link.', 'wordfence'), array('strong'=>array()))); - } - - } - } - - if (!$combinedTwoFactor) { - - if ($isLogin && $user instanceof \WP_User) { - if (Controller_Users::shared()->has_2fa_active($user)) { - if (Controller_Users::shared()->has_remembered_2fa($user)) { - return $user; - } - elseif (array_key_exists('wfls-token', $_POST)) { - if (is_string($_POST['wfls-token']) && Controller_TOTP::shared()->validate_2fa($user, $_POST['wfls-token'])) { - return $user; - } - else { - return new \WP_Error('wfls_twofactor_failed', wp_kses(__('<strong>CODE INVALID</strong>: The 2FA code provided is either expired or invalid. Please try again.', 'wordfence'), array('strong'=>array()))); - } - } - } - $in2faGracePeriod = false; - $time2faRequired = null; - if (Controller_Users::shared()->has_2fa_active($user)) { - $legacy2FAActive = Controller_WordfenceLS::shared()->legacy_2fa_active(); - if ($legacy2FAActive) { - return new \WP_Error('wfls_twofactor_required', wp_kses(__('<strong>CODE REQUIRED</strong>: Please enter your 2FA code immediately after your password in the same field.', 'wordfence'), array('strong'=>array()))); - } - return new \WP_Error('wfls_twofactor_required', wp_kses(__('<strong>CODE REQUIRED</strong>: Please provide your 2FA code when prompted.', 'wordfence'), array('strong'=>array()))); - } - else if (Controller_Users::shared()->requires_2fa($user, $in2faGracePeriod, $time2faRequired)) { - return new \WP_Error('wfls_twofactor_blocked', wp_kses(__('<strong>LOGIN BLOCKED</strong>: 2FA is required to be active on your account. Please contact the site administrator.', 'wordfence'), array('strong'=>array()))); - } - else if ($in2faGracePeriod) { - Controller_Notices::shared()->add_notice(Model_Notice::SEVERITY_CRITICAL, new Model_HTML(wp_kses(sprintf(__('You do not currently have two-factor authentication active on your account, which will be required beginning %s. <a href="%s">Configure 2FA</a>', 'wordfence'), Controller_Time::format_local_time('F j, Y g:i A', $time2faRequired), esc_url((is_multisite() && is_super_admin($user->ID)) ? network_admin_url('admin.php?page=WFLS') : admin_url('admin.php?page=WFLS'))), array('a'=>array('href'=>array())))), 'wfls-will-be-required', $user); - } - } - - } - - return $user; - } - - public function _set_logged_in_cookie($logged_in_cookie, $expire, $expiration, $user_id) { - $user = new \WP_User($user_id); - if (Controller_Users::shared()->has_2fa_active($user) && isset($_POST['wfls-remember-device']) && $_POST['wfls-remember-device']) { - Controller_Users::shared()->remember_2fa($user); - } - delete_user_meta($user_id, 'wfls-captcha-nonce'); - } - - public function _record_login($user_login/*, $user -- we'd like to use the second parameter instead, but too many plugins call this hook and only provide one of the two required parameters*/) { - $user = get_user_by('login', $user_login); - if (is_object($user) && $user instanceof \WP_User && $user->exists()) { - update_user_meta($user->ID, 'wfls-last-login', Controller_Time::time()); - } - } - - public function _register_post($sanitized_user_login, $user_email, $errors) { - if (!empty($sanitized_user_login)) { - $captchaResult = $this->process_registration_captcha_with_hooks(); - if ($captchaResult !== true) { - $errors->add($captchaResult['category'], $captchaResult['message']); - } - } - } - - private function validate_email_verification_token($user = null, &$token = null) { - $token = isset($_REQUEST['wfls-email-verification']) ? $_REQUEST['wfls-email-verification'] : null; - if (empty($token)) - return null; - return is_string($token) && Controller_Users::shared()->validate_verification_token($token, $user); - } - - /** - * @param \WP_Error $errors - * @param string $redirect_to - * @return \WP_Error - */ - public function _wp_login_errors($errors, $redirect_to) { - $has_errors = (method_exists($errors, 'has_errors') ? $errors->has_errors() : !empty($errors->errors)); //has_errors was added in WP 5.1 - $emailVerificationTokenValid = $this->validate_email_verification_token(); - if (!$has_errors && $emailVerificationTokenValid !== null) { - if ($emailVerificationTokenValid) { - $errors->add('wfls_email_verified', esc_html__('Email verification succeeded. Please continue logging in.', 'wordfence'), 'message'); - } - else { - $errors->add('wfls_email_not_verified', esc_html__('Email verification invalid or expired. Please try again.', 'wordfence'), 'message'); - } - } - return $errors; - } - - public function legacy_2fa_active() { - $wfLegacy2FAActive = false; - if (class_exists('wfConfig') && \wfConfig::get('isPaid')) { - $twoFactorUsers = \wfConfig::get_ser('twoFactorUsers', array()); - if (is_array($twoFactorUsers) && count($twoFactorUsers) > 0) { - foreach ($twoFactorUsers as $t) { - if ($t[3] == 'activated') { - $testUser = get_user_by('ID', $t[0]); - if (is_object($testUser) && $testUser instanceof \WP_User && \wfUtils::isAdmin($testUser)) { - $wfLegacy2FAActive = true; - break; - } - } - } - } - - if ($wfLegacy2FAActive && class_exists('wfCredentialsController') && method_exists('wfCredentialsController', 'useLegacy2FA') && !\wfCredentialsController::useLegacy2FA()) { - $wfLegacy2FAActive = false; - } - } - return $wfLegacy2FAActive; - } - - /** - * Menu - */ - - public function _admin_menu() { - $user = wp_get_current_user(); - if (Controller_Notices::shared()->has_notice($user)) { - Controller_Users::shared()->requires_2fa($user, $gracePeriod); - if (!$gracePeriod) { - Controller_Notices::shared()->remove_notice(false, 'wfls-will-be-required', $user); - } - } - - Controller_Notices::shared()->enqueue_notices(); - - $useSubmenu = WORDFENCE_LS_FROM_CORE && current_user_can('activate_plugins'); - if (is_multisite() && !is_network_admin()) { - $useSubmenu = false; - - if (is_super_admin()) { - return; - } - } - - if ($useSubmenu) { - add_submenu_page('Wordfence', __('Login Security', 'wordfence'), __('Login Security', 'wordfence'), Controller_Permissions::CAP_ACTIVATE_2FA_SELF, 'WFLS', array($this, '_menu')); - } - else { - add_menu_page(__('Login Security', 'wordfence'), __('Login Security', 'wordfence'), Controller_Permissions::CAP_ACTIVATE_2FA_SELF, 'WFLS', array($this, '_menu'), Model_Asset::img('menu.svg')); - } - } - - public function _menu() { - $user = wp_get_current_user(); - $administrator = false; - $canEditUsers = false; - if (Controller_Permissions::shared()->can_manage_settings($user)) { - $administrator = true; - } - - if (user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_OTHERS)) { - $canEditUsers = true; - if (isset($_GET['user'])) { - $user = new \WP_User((int) $_GET['user']); - if (!$user->exists()) { - $user = wp_get_current_user(); - } - } - } - - $sections = array(); - - if (isset($_GET['role']) && $canEditUsers) { - $roleKey = $_GET['role']; - $roles = new \WP_Roles(); - $role = $roles->get_role($roleKey); - $roleTitle = $roleKey === 'super-admin' ? __('Super Administrator', 'wordfence') : $roles->role_names[$roleKey]; - $requiredAt = Controller_Settings::shared()->get_required_2fa_role_activation_time($roleKey); - $states = array( - 'grace_period' => array( - 'title' => __('Grace Period', 'wordfence'), - 'gracePeriod' => true - ), - 'locked_out' => array( - 'title' => __('Locked Out', 'wordfence'), - 'gracePeriod' => false - ) - ); - foreach ($states as $key => $state) { - $pageKey = "page_$key"; - $page = isset($_GET[$pageKey]) ? max((int) $_GET[$pageKey], 1) : 1; - $title = $state['title']; - $lastPage = true; - if ($requiredAt === false) - $users = array(); - else - $users = Controller_Users::shared()->get_inactive_2fa_users($roleKey, $state['gracePeriod'], $page, self::USERS_PER_PAGE, $lastPage); - $sections[] = array( - 'tab' => new Model_Tab($key, $key, $title, $title), - 'title' => new Model_Title($key, sprintf(__('Users without 2FA active (%s)', 'wordfence'), $title) . ' - ' . $roleTitle), - 'content' => new Model_View('page/role', array( - 'role' => $role, - 'roleTitle' => $roleTitle, - 'stateTitle' => $title, - 'requiredAt' => $requiredAt, - 'state' => $state, - 'users' => $users, - 'page' => $page, - 'lastPage' => $lastPage, - 'pageKey' => $pageKey, - 'stateKey' => $key - )), - ); - } - } - else { - $sections[] = array( - 'tab' => new Model_Tab('manage', 'manage', __('Two-Factor Authentication', 'wordfence'), __('Two-Factor Authentication', 'wordfence')), - 'title' => new Model_Title('manage', __('Two-Factor Authentication', 'wordfence'), Controller_Support::supportURL(Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA), new Model_HTML(wp_kses(__('Learn more<span class="wfls-hidden-xs"> about Two-Factor Authentication</span>', 'wordfence'), array('span'=>array('class'=>array()))))), - 'content' => new Model_View('page/manage', array( - 'user' => $user, - 'canEditUsers' => $canEditUsers, - )), - ); - - if ($administrator) { - $sections[] = array( - 'tab' => new Model_Tab('settings', 'settings', __('Settings', 'wordfence'), __('Settings', 'wordfence')), - 'title' => new Model_Title('settings', __('Login Security Settings', 'wordfence'), Controller_Support::supportURL(Controller_Support::ITEM_MODULE_LOGIN_SECURITY), new Model_HTML(wp_kses(__('Learn more<span class="wfls-hidden-xs"> about Login Security</span>', 'wordfence'), array('span'=>array('class'=>array()))))), - 'content' => new Model_View('page/settings', array( - 'hasWoocommerce' => $this->has_woocommerce() - )), - ); - } - } - - $view = new Model_View('page/page', array( - 'sections' => $sections, - )); - echo $view->render(); - } - - private function process_registration_captcha() { - if (Controller_Whitelist::shared()->is_whitelisted(Model_Request::current()->ip())) { //Whitelisted, so we're not enforcing 2FA - return true; - } - - $captchaController = Controller_CAPTCHA::shared(); - $requireCaptcha = $captchaController->is_captcha_required(); - $token = $captchaController->get_token(); - - if ($requireCaptcha) { - if ($token === null && !$captchaController->test_mode()) { - return array( - 'message' => wp_kses(__('<strong>REGISTRATION ATTEMPT BLOCKED</strong>: This site requires a security token created when the page loads for all registration attempts. Please ensure JavaScript is enabled and try again.', 'wordfence'), array('strong'=>array())), - 'category' => 'wfls_captcha_required' - ); - } - $score = $captchaController->score($token); - if ($score === false && !$captchaController->test_mode()) { - return array( - 'message' => wp_kses(__('<strong>REGISTRATION ATTEMPT BLOCKED</strong>: The security token for the login attempt was invalid or expired. Please reload the page and try again.', 'wordfence'), array('strong'=>array())), - 'category' => 'wfls_captcha_required' - ); - } - Controller_Users::shared()->record_captcha_score(null, $score); - if (!$captchaController->is_human($score)) { - $encryptedIP = Model_Symmetric::encrypt(Model_Request::current()->ip()); - $encryptedScore = Model_Symmetric::encrypt($score); - $result = array( - 'category' => 'wfls_registration_blocked' - ); - if ($encryptedIP && $encryptedScore && filter_var(get_site_option('admin_email'), FILTER_VALIDATE_EMAIL)) { - $jwt = new Model_JWT(array('ip' => $encryptedIP, 'score' => $encryptedScore), Controller_Time::time() + 600); - $result['message'] = wp_kses(sprintf(__('<strong>REGISTRATION BLOCKED</strong>: The registration request was blocked because it was flagged as spam. Please try again or <a href="#" class="wfls-registration-captcha-contact" data-token="%s">contact the site owner</a> for help.', 'wordfence'), esc_attr((string)$jwt)), array('strong'=>array(), 'a'=>array('href'=>array(), 'class'=>array(), 'data-token'=>array()))); - } - else { - $result['message'] = wp_kses(__('<strong>REGISTRATION BLOCKED</strong>: The registration request was blocked because it was flagged as spam. Please try again or contact the site owner for help.', 'wordfence'), array('strong'=>array())); - } - return $result; - } - } - return true; - } - - /** - * @param int $endpointType the type of endpoint being processed - * The default value of 1 corresponds to a regular login - * @see wordfence::wfsnEndpointType() - */ - private function process_registration_captcha_with_hooks($endpointType = 1) { - $result = $this->process_registration_captcha(); - if ($result !== true) { - if ($result['category'] === 'wfls_registration_blocked') { - /** - * Fires just prior to blocking user registration due to a failed CAPTCHA. After firing this action hook - * the registration attempt is blocked. - * - * @param int $source The source code of the block. - */ - do_action('wfls_registration_blocked', $endpointType); - - /** - * Filters the message to show if registration is blocked due to a captcha rejection. - * - * @since 1.0.0 - * - * @param string $message The message to display, HTML allowed. - */ - $result['message'] = apply_filters('wfls_registration_blocked_message', $result['message']); - } - } - return $result; - } - - private function disable_woocommerce_registration($message) { - if ($this->has_woocommerce()) { - remove_action('wp_loaded', array('WC_Form_Handler', 'process_registration'), 20); - wc_add_notice($message, 'error'); - } - } - - public function _handle_woocommerce_registration() { - if ($this->has_woocommerce() && isset($_POST['register'], $_POST['email']) && (isset($_POST['_wpnonce']) || isset($_POST['woocommerce-register-nonce']))) { - $captchaResult = $this->process_registration_captcha_with_hooks(); - if ($captchaResult !== true) { - $this->disable_woocommerce_registration($captchaResult['message']); - } - } - } - - public function _user_new_form() { - if (Controller_Settings::shared()->get_user_2fa_grace_period()) - echo Model_View::create('user/grace-period-toggle', array())->render(); - } - - public function _user_register($newUserId) { - $creator = wp_get_current_user(); - if (!Controller_Permissions::shared()->can_manage_settings($creator) || $creator->ID == $newUserId) - return; - if (isset($_POST['wfls-grace-period-toggle'])) - Controller_Users::shared()->allow_grace_period($newUserId); - } - - public function _woocommerce_account_menu_items($items) { - if ($this->can_user_activate_2fa_self()) { - $endpointId = self::WOOCOMMERCE_ENDPOINT; - $label = __('Wordfence 2FA', 'wordfence'); - if (!Utility_Array::insertAfter($items, 'edit-account', $endpointId, $label)) { - $items[$endpointId] = $label; - } - } - return $items; - } - - public function _woocommerce_get_query_vars($query_vars) { - $query_vars[self::WOOCOMMERCE_ENDPOINT] = self::WOOCOMMERCE_ENDPOINT; - return $query_vars; - } - - private function can_user_activate_2fa_self($user = null) { - if ($user === null) - $user = wp_get_current_user(); - return user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF); - } - - private function render_embedded_user_2fa_management_interface($stacked = null) { - $user = wp_get_current_user(); - $stacked = $stacked === null ? Controller_Settings::shared()->should_stack_ui_columns() : $stacked; - if ($this->can_user_activate_2fa_self($user)) { - $assets = $this->management_assets_enqueued ? array() : $this->get_2fa_management_assets(true); - $scriptData = $this->management_assets_enqueued ? array() : $this->get_2fa_management_script_data(); - return Model_View::create( - 'page/manage-embedded', - array( - 'user' => $user, - 'stacked' => $stacked, - 'assets' => $assets, - 'scriptData' => $scriptData - ) - )->render(); - } - else { - return Model_View::create('page/permission-denied')->render(); - } - } - - public function _woocommerce_account_menu_content() { - echo $this->render_embedded_user_2fa_management_interface(); - } - - private function does_current_page_include_shortcode($shortcode) { - global $post; - return $post instanceof \WP_Post && has_shortcode($post->post_content, $shortcode); - } - - public function _woocommerce_account_enqueue_assets() { - if (!$this->has_woocommerce()) - return; - if ($this->does_current_page_include_shortcode('woocommerce_my_account')) { - wp_enqueue_style('wordfence-ls-woocommerce-account-styles', Model_Asset::css('woocommerce-account.css'), array(), WORDFENCE_LS_VERSION); - $this->enqueue_2fa_management_assets(true); - } - } - - public function _handle_user_2fa_management_shortcode($attributes, $content = null, $shortcode = null) { - $shortcode = $shortcode === null ? self::SHORTCODE_2FA_MANAGEMENT : $shortcode; - $attributes = shortcode_atts( - array( - 'stacked' => Controller_Settings::shared()->should_stack_ui_columns() ? 'true' : 'false' - ), - $attributes, - $shortcode - ); - $stacked = filter_var($attributes['stacked'], FILTER_VALIDATE_BOOLEAN); - return $this->render_embedded_user_2fa_management_interface($stacked); - } - - public function _handle_shortcode_prerequisites() { - if ($this->does_current_page_include_shortcode(self::SHORTCODE_2FA_MANAGEMENT)) { - if (!is_user_logged_in()) - auth_redirect(); - $this->enqueue_2fa_management_assets(true); - } - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/2fainitializationdata.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/2fainitializationdata.php deleted file mode 100644 index 77770350..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/2fainitializationdata.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_2faInitializationData { - - private $user; - private $raw_secret; - private $base32_secret; - private $otp_url; - private $recovery_codes; - - public function __construct($user) { - $this->user = $user; - $this->raw_secret = Model_Crypto::random_bytes(20); - } - - public function get_user() { - return $this->user; - } - - public function get_raw_secret() { - return $this->raw_secret; - } - - public function get_base32_secret() { - if ($this->base32_secret === null) - $this->base32_secret = Utility_BaseConversion::base32_encode($this->raw_secret); - return $this->base32_secret; - } - - private function generate_otp_url() { - return "otpauth://totp/" . rawurlencode(preg_replace('~^https?://~i', '', home_url()) . ' (' . $this->user->user_login . ')') . '?secret=' . $this->get_base32_secret() . '&algorithm=SHA1&digits=6&period=30&issuer=Wordfence'; - } - - public function get_otp_url() { - if ($this->otp_url === null) - $this->otp_url = $this->generate_otp_url(); - return $this->otp_url; - } - - public function get_recovery_codes() { - if ($this->recovery_codes === null) - $this->recovery_codes = Controller_Users::shared()->regenerate_recovery_codes(); - return $this->recovery_codes; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/asset.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/asset.php deleted file mode 100644 index b464e1e6..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/asset.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -namespace WordfenceLS; - -abstract class Model_Asset { - - protected $handle; - protected $source; - protected $dependencies; - protected $version; - protected $registered = false; - - public function __construct($handle, $source = '', $dependencies = array(), $version = false) { - $this->handle = $handle; - $this->source = $source; - $this->dependencies = $dependencies; - $this->version = $version; - } - - public function getSourceUrl() { - if (empty($this->source)) - return null; - $url = $this->source; - if (is_string($this->version)) - $url = add_query_arg('ver', $this->version, $this->source); - return $url; - } - - public abstract function enqueue(); - - public abstract function isEnqueued(); - - public abstract function renderInline(); - - public function renderInlineIfNotEnqueued() { - if (!$this->isEnqueued()) - $this->renderInline(); - } - - public function setRegistered() { - $this->registered = true; - return $this; - } - - public function register() { - return $this->setRegistered(); - } - - public static function js($file) { - return self::_pluginBaseURL() . 'js/' . self::_versionedFileName($file); - } - - public static function css($file) { - return self::_pluginBaseURL() . 'css/' . self::_versionedFileName($file); - } - - public static function img($file) { - return self::_pluginBaseURL() . 'img/' . $file; - } - - protected static function _pluginBaseURL() { - return plugins_url('', WORDFENCE_LS_FCPATH) . '/'; - } - - protected static function _versionedFileName($subpath) { - $version = WORDFENCE_LS_BUILD_NUMBER; - if ($version != 'WORDFENCE_LS_BUILD_NUMBER' && preg_match('/^(.+?)(\.[^\.]+)$/', $subpath, $matches)) { - $prefix = $matches[1]; - $suffix = $matches[2]; - return $prefix . '.' . $version . $suffix; - } - - return $subpath; - } - - public static function create($handle, $source = '', $dependencies = array(), $version = false) { - return new static($handle, $source, $dependencies, $version); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/compat.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/compat.php deleted file mode 100644 index 6390b444..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/compat.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -namespace WordfenceLS; - -class Model_Compat { - public static function hex2bin($string) { //Polyfill for PHP < 5.4 - if (!is_string($string)) { return false; } - if (strlen($string) % 2 == 1) { return false; } - return pack('H*', $string); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto.php deleted file mode 100644 index d72e02f0..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto.php +++ /dev/null @@ -1,295 +0,0 @@ -<?php - -namespace WordfenceLS; - -abstract class Model_Crypto { - /** - * Refreshes the secrets used by the plugin. - */ - public static function refresh_secrets() { - Controller_Settings::shared()->set(Controller_Settings::OPTION_SHARED_HASH_SECRET_KEY, bin2hex(self::random_bytes(32))); - Controller_Settings::shared()->set(Controller_Settings::OPTION_SHARED_SYMMETRIC_SECRET_KEY, bin2hex(self::random_bytes(32))); - Controller_Settings::shared()->set(Controller_Settings::OPTION_LAST_SECRET_REFRESH, Controller_Time::time(), true); - } - - /** - * Returns the secret for hashing. - * - * @return string - */ - public static function shared_hash_secret() { - return Controller_Settings::shared()->get(Controller_Settings::OPTION_SHARED_HASH_SECRET_KEY); - } - - /** - * Returns the secret for symmetric encryption. - * - * @return string - */ - public static function shared_symmetric_secret() { - return Controller_Settings::shared()->get(Controller_Settings::OPTION_SHARED_SYMMETRIC_SECRET_KEY); - } - - /** - * Returns whether or not the installation has the required crypto support for this to work. - * - * @return bool - */ - public static function has_required_crypto_functions() { - if (function_exists('openssl_get_publickey') && function_exists('openssl_get_cipher_methods')) { - $ciphers = openssl_get_cipher_methods(); - return array_search('aes-256-cbc', $ciphers) !== false; - } - return false; - } - - /** - * Utility - */ - - public static function random_bytes($bytes) { - $bytes = (int) $bytes; - if (function_exists('random_bytes')) { - try { - $rand = random_bytes($bytes); - if (is_string($rand) && self::strlen($rand) === $bytes) { - return $rand; - } - } catch (\Exception $e) { - // Fall through - } catch (\TypeError $e) { - // Fall through - } catch (\Error $e) { - // Fall through - } - } - if (function_exists('mcrypt_create_iv')) { - // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved,PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved,PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved - $rand = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); - if (is_string($rand) && self::strlen($rand) === $bytes) { - return $rand; - } - } - if (function_exists('openssl_random_pseudo_bytes')) { - $rand = @openssl_random_pseudo_bytes($bytes, $strong); - if (is_string($rand) && self::strlen($rand) === $bytes) { - return $rand; - } - } - // Last resort is insecure - $return = ''; - for ($i = 0; $i < $bytes; $i++) { - $return .= chr(mt_rand(0, 255)); - } - return $return; - } - - /** - * Polyfill for random_int. - * - * @param int $min - * @param int $max - * @return int - */ - public static function random_int($min = 0, $max = 0x7FFFFFFF) { - if (function_exists('random_int')) { - try { - return random_int($min, $max); - } catch (\Exception $e) { - // Fall through - } catch (\TypeError $e) { - // Fall through - } catch (\Error $e) { - // Fall through - } - } - $diff = $max - $min; - $bytes = self::random_bytes(4); - if ($bytes === false || self::strlen($bytes) != 4) { - throw new \RuntimeException("Unable to get 4 bytes"); - } - $val = @unpack("Nint", $bytes); - $val = $val['int'] & 0x7FFFFFFF; - $fp = (float) $val / 2147483647.0; // convert to [0,1] - return (int) (round($fp * $diff) + $min); - } - - public static function uuid() { - return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', - // 32 bits for "time_low" - self::random_int(0, 0xffff), self::random_int(0, 0xffff), - - // 16 bits for "time_mid" - self::random_int(0, 0xffff), - - // 16 bits for "time_hi_and_version", - // four most significant bits holds version number 4 - self::random_int(0, 0x0fff) | 0x4000, - - // 16 bits, 8 bits for "clk_seq_hi_res", - // 8 bits for "clk_seq_low", - // two most significant bits holds zero and one for variant DCE1.1 - self::random_int(0, 0x3fff) | 0x8000, - - // 48 bits for "node" - self::random_int(0, 0xffff), self::random_int(0, 0xffff), self::random_int(0, 0xffff) - ); - } - - /** - * Set the mbstring internal encoding to a binary safe encoding when func_overload - * is enabled. - * - * When mbstring.func_overload is in use for multi-byte encodings, the results from - * strlen() and similar functions respect the utf8 characters, causing binary data - * to return incorrect lengths. - * - * This function overrides the mbstring encoding to a binary-safe encoding, and - * resets it to the users expected encoding afterwards through the - * `reset_mbstring_encoding` function. - * - * It is safe to recursively call this function, however each - * `_mbstring_binary_safe_encoding()` call must be followed up with an equal number - * of `_reset_mbstring_encoding()` calls. - * - * @see Model_Crypto::_reset_mbstring_encoding - * - * @staticvar array $encodings - * @staticvar bool $overloaded - * - * @param bool $reset Optional. Whether to reset the encoding back to a previously-set encoding. - * Default false. - */ - protected static function _mbstring_binary_safe_encoding($reset = false) { - static $encodings = array(); - static $overloaded = null; - - if (is_null($overloaded)) { - // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated - $overloaded = function_exists('mb_internal_encoding') && (ini_get('mbstring.func_overload') & 2); - } - - if (false === $overloaded) { return; } - - if (!$reset) { - $encoding = mb_internal_encoding(); - array_push($encodings, $encoding); - mb_internal_encoding('ISO-8859-1'); - } - - if ($reset && $encodings) { - $encoding = array_pop($encodings); - mb_internal_encoding($encoding); - } - } - - /** - * Reset the mbstring internal encoding to a users previously set encoding. - * - * @see Model_Crypto::_mbstring_binary_safe_encoding - */ - protected static function _reset_mbstring_encoding() { - self::_mbstring_binary_safe_encoding(true); - } - - /** - * @param callable $function - * @param array $args - * @return mixed - */ - protected static function _call_mb_string_function($function, $args) { - self::_mbstring_binary_safe_encoding(); - $return = call_user_func_array($function, $args); - self::_reset_mbstring_encoding(); - return $return; - } - - /** - * Multibyte safe strlen. - * - * @param $binary - * @return int - */ - public static function strlen($binary) { - $args = func_get_args(); - return self::_call_mb_string_function('strlen', $args); - } - - /** - * @param $haystack - * @param $needle - * @param int $offset - * @return int - */ - public static function stripos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::_call_mb_string_function('stripos', $args); - } - - /** - * @param $string - * @return mixed - */ - public static function strtolower($string) { - $args = func_get_args(); - return self::_call_mb_string_function('strtolower', $args); - } - - /** - * @param $string - * @param $start - * @param $length - * @return mixed - */ - public static function substr($string, $start, $length = null) { - if ($length === null) { $length = self::strlen($string); } - return self::_call_mb_string_function('substr', array( - $string, $start, $length - )); - } - - /** - * @param $haystack - * @param $needle - * @param int $offset - * @return mixed - */ - public static function strpos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::_call_mb_string_function('strpos', $args); - } - - /** - * @param string $haystack - * @param string $needle - * @param int $offset - * @param int $length - * @return mixed - */ - public static function substr_count($haystack, $needle, $offset = 0, $length = null) { - if ($length === null) { $length = self::strlen($haystack); } - return self::_call_mb_string_function('substr_count', array( - $haystack, $needle, $offset, $length - )); - } - - /** - * @param $string - * @return mixed - */ - public static function strtoupper($string) { - $args = func_get_args(); - return self::_call_mb_string_function('strtoupper', $args); - } - - /** - * @param string $haystack - * @param string $needle - * @param int $offset - * @return mixed - */ - public static function strrpos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::_call_mb_string_function('strrpos', $args); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/base2n.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/base2n.php deleted file mode 100644 index cd850420..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/base2n.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php - -namespace WordfenceLS\Crypto; -/** - * Binary-to-text PHP Utilities - * - * @package binary-to-text-php - * @link https://github.com/ademarre/binary-to-text-php - * @author Andre DeMarre - * @copyright 2009-2013 Andre DeMarre - * @license http://opensource.org/licenses/MIT MIT - */ - -/** - * Class for binary-to-text encoding with a base of 2^n - * - * The Base2n class is for binary-to-text conversion. It employs a - * generalization of the algorithms used by many encoding schemes that - * use a fixed number of bits to encode each character. In other words, - * the base is a power of 2. - * - * Earlier versions of this class were named - * FixedBitNotation and FixedBitEncoding. - * - * @package binary-to-text-php - */ -class Model_Base2n -{ - protected $_chars; - protected $_bitsPerCharacter; - protected $_radix; - protected $_rightPadFinalBits; - protected $_padFinalGroup; - protected $_padCharacter; - protected $_caseSensitive; - protected $_charmap; - - /** - * Constructor - * - * @param integer $bitsPerCharacter Bits to use for each encoded character - * @param string $chars Base character alphabet - * @param boolean $caseSensitive To decode in a case-sensitive manner - * @param boolean $rightPadFinalBits How to encode last character - * @param boolean $padFinalGroup Add padding to end of encoded output - * @param string $padCharacter Character to use for padding - * - * @throws InvalidArgumentException for incompatible parameters - */ - public function __construct( - $bitsPerCharacter, - $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_', - $caseSensitive = TRUE, $rightPadFinalBits = FALSE, - $padFinalGroup = FALSE, $padCharacter = '=') - { - // Ensure validity of $chars - if (!is_string($chars) || ($charLength = strlen($chars)) < 2) { - throw new \InvalidArgumentException('$chars must be a string of at least two characters'); - } - - // Ensure validity of $padCharacter - if ($padFinalGroup) { - if (!is_string($padCharacter) || !isset($padCharacter[0])) { - throw new \InvalidArgumentException('$padCharacter must be a string of one character'); - } - - if ($caseSensitive) { - $padCharFound = strpos($chars, $padCharacter[0]); - } else { - $padCharFound = stripos($chars, $padCharacter[0]); - } - - if ($padCharFound !== FALSE) { - throw new \InvalidArgumentException('$padCharacter can not be a member of $chars'); - } - } - - // Ensure validity of $bitsPerCharacter - if (!is_int($bitsPerCharacter)) { - throw new \InvalidArgumentException('$bitsPerCharacter must be an integer'); - } - - if ($bitsPerCharacter < 1) { - // $bitsPerCharacter must be at least 1 - throw new \InvalidArgumentException('$bitsPerCharacter can not be less than 1'); - - } elseif ($charLength < 1 << $bitsPerCharacter) { - // Character length of $chars is too small for $bitsPerCharacter - // Find greatest acceptable value of $bitsPerCharacter - $bitsPerCharacter = 1; - $radix = 2; - - while ($charLength >= ($radix <<= 1) && $bitsPerCharacter < 8) { - $bitsPerCharacter++; - } - - $radix >>= 1; - throw new \InvalidArgumentException( - '$bitsPerCharacter can not be more than ' . $bitsPerCharacter - . ' given $chars length of ' . $charLength - . ' (max radix ' . $radix . ')'); - - } elseif ($bitsPerCharacter > 8) { - // $bitsPerCharacter must not be greater than 8 - throw new \InvalidArgumentException('$bitsPerCharacter can not be greater than 8'); - - } else { - $radix = 1 << $bitsPerCharacter; - } - - $this->_chars = $chars; - $this->_bitsPerCharacter = $bitsPerCharacter; - $this->_radix = $radix; - $this->_rightPadFinalBits = $rightPadFinalBits; - $this->_padFinalGroup = $padFinalGroup; - $this->_padCharacter = $padCharacter[0]; - $this->_caseSensitive = $caseSensitive; - } - - /** - * Encode a string - * - * @param string $rawString Binary data to encode - * @return string - */ - public function encode($rawString) - { - // Unpack string into an array of bytes - $bytes = unpack('C*', $rawString); - $byteCount = count($bytes); - - $encodedString = ''; - $byte = array_shift($bytes); - $bitsRead = 0; - $oldBits = 0; - - $chars = $this->_chars; - $bitsPerCharacter = $this->_bitsPerCharacter; - $rightPadFinalBits = $this->_rightPadFinalBits; - $padFinalGroup = $this->_padFinalGroup; - $padCharacter = $this->_padCharacter; - - $charsPerByte = 8 / $bitsPerCharacter; - $encodedLength = $byteCount * $charsPerByte; - - // Generate encoded output; each loop produces one encoded character - for ($c = 0; $c < $encodedLength; $c++) { - - // Get the bits needed for this encoded character - if ($bitsRead + $bitsPerCharacter > 8) { - // Not enough bits remain in this byte for the current character - // Save the remaining bits before getting the next byte - $oldBitCount = 8 - $bitsRead; - $oldBits = $byte ^ ($byte >> $oldBitCount << $oldBitCount); - $newBitCount = $bitsPerCharacter - $oldBitCount; - - if (!$bytes) { - // Last bits; match final character and exit loop - if ($rightPadFinalBits) $oldBits <<= $newBitCount; - $encodedString .= $chars[$oldBits]; - - if ($padFinalGroup) { - // Array of the lowest common multiples of $bitsPerCharacter and 8, divided by 8 - $lcmMap = array(1 => 1, 2 => 1, 3 => 3, 4 => 1, 5 => 5, 6 => 3, 7 => 7, 8 => 1); - $bytesPerGroup = $lcmMap[$bitsPerCharacter]; - $pads = $bytesPerGroup * $charsPerByte - ceil((strlen($rawString) % $bytesPerGroup) * $charsPerByte); - $encodedString .= str_repeat($padCharacter, $pads); - } - - break; - } - - // Get next byte - $byte = array_shift($bytes); - $bitsRead = 0; - - } else { - $oldBitCount = 0; - $newBitCount = $bitsPerCharacter; - } - - // Read only the needed bits from this byte - $bits = $byte >> 8 - ($bitsRead + ($newBitCount)); - $bits ^= $bits >> $newBitCount << $newBitCount; - $bitsRead += $newBitCount; - - if ($oldBitCount) { - // Bits come from seperate bytes, add $oldBits to $bits - $bits = ($oldBits << $newBitCount) | $bits; - } - - $encodedString .= $chars[$bits]; - } - - return $encodedString; - } - - /** - * Decode a string - * - * @param string $encodedString Data to decode - * @param boolean $strict Returns NULL if $encodedString contains an undecodable character - * @return string - */ - public function decode($encodedString, $strict = FALSE) - { - if (!$encodedString || !is_string($encodedString)) { - // Empty string, nothing to decode - return ''; - } - - $chars = $this->_chars; - $bitsPerCharacter = $this->_bitsPerCharacter; - $radix = $this->_radix; - $rightPadFinalBits = $this->_rightPadFinalBits; - $padFinalGroup = $this->_padFinalGroup; - $padCharacter = $this->_padCharacter; - $caseSensitive = $this->_caseSensitive; - - // Get index of encoded characters - if ($this->_charmap) { - $charmap = $this->_charmap; - - } else { - $charmap = array(); - - for ($i = 0; $i < $radix; $i++) { - $charmap[$chars[$i]] = $i; - } - - $this->_charmap = $charmap; - } - - // The last encoded character is $encodedString[$lastNotatedIndex] - $lastNotatedIndex = strlen($encodedString) - 1; - - // Remove trailing padding characters - if ($padFinalGroup) { - while ($encodedString[$lastNotatedIndex] === $padCharacter) { - $encodedString = substr($encodedString, 0, $lastNotatedIndex); - $lastNotatedIndex--; - } - } - - $rawString = ''; - $byte = 0; - $bitsWritten = 0; - - // Convert each encoded character to a series of unencoded bits - for ($c = 0; $c <= $lastNotatedIndex; $c++) { - - if (!$caseSensitive && !isset($charmap[$encodedString[$c]])) { - // Encoded character was not found; try other case - if (isset($charmap[$cUpper = strtoupper($encodedString[$c])])) { - $charmap[$encodedString[$c]] = $charmap[$cUpper]; - - } elseif (isset($charmap[$cLower = strtolower($encodedString[$c])])) { - $charmap[$encodedString[$c]] = $charmap[$cLower]; - } - } - - if (isset($charmap[$encodedString[$c]])) { - $bitsNeeded = 8 - $bitsWritten; - $unusedBitCount = $bitsPerCharacter - $bitsNeeded; - - // Get the new bits ready - if ($bitsNeeded > $bitsPerCharacter) { - // New bits aren't enough to complete a byte; shift them left into position - $newBits = $charmap[$encodedString[$c]] << $bitsNeeded - $bitsPerCharacter; - $bitsWritten += $bitsPerCharacter; - - } elseif ($c !== $lastNotatedIndex || $rightPadFinalBits) { - // Zero or more too many bits to complete a byte; shift right - $newBits = $charmap[$encodedString[$c]] >> $unusedBitCount; - $bitsWritten = 8; //$bitsWritten += $bitsNeeded; - - } else { - // Final bits don't need to be shifted - $newBits = $charmap[$encodedString[$c]]; - $bitsWritten = 8; - } - - $byte |= $newBits; - - if ($bitsWritten === 8 || $c === $lastNotatedIndex) { - // Byte is ready to be written - $rawString .= pack('C', $byte); - - if ($c !== $lastNotatedIndex) { - // Start the next byte - $bitsWritten = $unusedBitCount; - $byte = ($charmap[$encodedString[$c]] ^ ($newBits << $unusedBitCount)) << 8 - $bitsWritten; - } - } - - } elseif ($strict) { - // Unable to decode character; abort - return NULL; - } - } - - return $rawString; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/jwt.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/jwt.php deleted file mode 100644 index c441b1c2..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/jwt.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php - -namespace WordfenceLS\Crypto; - -use WordfenceLS\Controller_Time; -use WordfenceLS\Model_Crypto; - -/** - * Class Model_JWT - * @package Wordfence2FA\Crypto - * @property array $payload - * @property int $expiration - */ -class Model_JWT { - private $_payload; - private $_expiration; - - /** - * Decodes and returns the payload of a JWT. This also validates the signature and expiration. Currently assumes HS256 JWTs. - * - * @param string $token - * @return Model_JWT|bool The decoded JWT or false if the token is invalid or fails validation. - */ - public static function decode_jwt($token) { - $components = explode('.', $token); - if (count($components) != 3) { - return false; - } - - $key = Model_Crypto::shared_hash_secret(); - $body = $components[0] . '.' . $components[1]; - $signature = hash_hmac('sha256', $body, $key, true); - $testSignature = self::base64url_decode($components[2]); - if (!hash_equals($signature, $testSignature)) { - return false; - } - - $json = self::base64url_decode($components[1]); - $payload = @json_decode($json, true); - $expiration = false; - if (isset($payload['_exp'])) { - $expiration = $payload['_exp']; - - if ($payload['_exp'] < Controller_Time::time()) { - return false; - } - - unset($payload['_exp']); - } - - return new self($payload, $expiration); - } - - /** - * Model_JWT constructor. - * - * @param array $payload - * @param bool|int $expiration - */ - public function __construct($payload, $expiration = false) { - $this->_payload = $payload; - $this->_expiration = $expiration; - } - - public function __toString() { - $payload = $this->_payload; - if ($this->_expiration !== false) { - $payload['_exp'] = $this->_expiration; - } - $key = Model_Crypto::shared_hash_secret(); - $header = '{"alg":"HS256","typ":"JWT"}'; - $body = self::base64url_encode($header) . '.' . self::base64url_encode(json_encode($payload)); - $signature = hash_hmac('sha256', $body, $key, true); - return $body . '.' . self::base64url_encode($signature); - } - - public function __isset($key) { - switch ($key) { - case 'payload': - case 'expiration': - return true; - } - - throw new \OutOfBoundsException('Invalid key: ' . $key); - } - - public function __get($key) { - switch ($key) { - case 'payload': - return $this->_payload; - case 'expiration': - return $this->_expiration; - } - - throw new \OutOfBoundsException('Invalid key: ' . $key); - } - - /** - * Utility - */ - - /** - * Base64URL-encodes the given payload. This is identical to base64_encode except it substitutes characters - * not safe for use in URLs. - * - * @param string $payload - * @return string - */ - public static function base64url_encode($payload) { - return self::base64url_convert_to(base64_encode($payload)); - } - - public static function base64url_convert_to($base64) { - $intermediate = rtrim($base64, '='); - $intermediate = str_replace('+', '-', $intermediate); - $intermediate = str_replace('/', '_', $intermediate); - return $intermediate; - } - - /** - * Base64URL-decodes the given payload. This is identical to base64_encode except it allows for the characters - * substituted by base64url_encode. - * - * @param string $payload - * @return string - */ - public static function base64url_decode($payload) { - return base64_decode(self::base64url_convert_from($payload)); - } - - public static function base64url_convert_from($base64url) { - $intermediate = str_replace('_', '/', $base64url); - $intermediate = str_replace('-', '+', $intermediate); - return $intermediate; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/symmetric.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/symmetric.php deleted file mode 100644 index 90e011d4..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/crypto/symmetric.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace WordfenceLS\Crypto; - -use WordfenceLS\Model_Crypto; - -abstract class Model_Symmetric { - /** - * Returns $data encrypted with the shared symmetric key or false if unable to do so. - * - * @param string $data - * @return bool|array - */ - public static function encrypt($data) { - if (!Model_Crypto::has_required_crypto_functions()) { - return false; - } - - $symmetricKey = Model_Crypto::shared_symmetric_secret(); - $iv = Model_Crypto::random_bytes(16); - $encrypted = @openssl_encrypt($data, 'aes-256-cbc', $symmetricKey, OPENSSL_RAW_DATA, $iv); - if ($encrypted) { - return array('data' => base64_encode($encrypted), 'iv' => base64_encode($iv)); - } - return false; - } - - /** - * Returns the decrypted value of a payload encrypted by Model_Symmetric::encrypt - * - * @param array $encrypted - * @return bool|string - */ - public static function decrypt($encrypted) { - if (!Model_Crypto::has_required_crypto_functions()) { - return false; - } - - if (!isset($encrypted['data']) || !isset($encrypted['iv'])) { - return false; - } - - $symmetricKey = Model_Crypto::shared_symmetric_secret(); - $iv = base64_decode($encrypted['iv']); - $encrypted = base64_decode($encrypted['data']); - $data = @openssl_decrypt($encrypted, 'aes-256-cbc', $symmetricKey, OPENSSL_RAW_DATA, $iv); - return $data; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/ip.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/ip.php deleted file mode 100644 index 33275c2f..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/ip.php +++ /dev/null @@ -1,187 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_IP { - /** - * Returns the human-readable representation of a packed binary IP address. - * - * @param string $ip - * @return bool|string - */ - public static function inet_ntop($ip) { - if (Model_Crypto::strlen($ip) == 16 && Model_Crypto::substr($ip, 0, 12) == "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff") { - $ip = Model_Crypto::substr($ip, 12, 4); - } - - if (self::has_ipv6()) { - return @inet_ntop($ip); - } - - // IPv4 - if (Model_Crypto::strlen($ip) === 4) { - return ord($ip[0]) . '.' . ord($ip[1]) . '.' . ord($ip[2]) . '.' . ord($ip[3]); - } - - // IPv6 - if (Model_Crypto::strlen($ip) === 16) { - // IPv4 mapped IPv6 - if (Model_Crypto::substr($ip, 0, 12) == "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff") { - return "::ffff:" . ord($ip[12]) . '.' . ord($ip[13]) . '.' . ord($ip[14]) . '.' . ord($ip[15]); - } - - $hex = bin2hex($ip); - $groups = str_split($hex, 4); - $in_collapse = false; - $done_collapse = false; - foreach ($groups as $index => $group) { - if ($group == '0000' && !$done_collapse) { - if ($in_collapse) { - $groups[$index] = ''; - continue; - } - $groups[$index] = ':'; - $in_collapse = true; - continue; - } - if ($in_collapse) { - $done_collapse = true; - } - $groups[$index] = ltrim($groups[$index], '0'); - if (strlen($groups[$index]) === 0) { - $groups[$index] = '0'; - } - } - $ip = join(':', array_filter($groups, 'strlen')); - $ip = str_replace(':::', '::', $ip); - return $ip == ':' ? '::' : $ip; - } - - return false; - } - - /** - * Returns the packed binary representation of an IP address from the human readable version. - * - * @param string $ip - * @return string - */ - public static function inet_pton($ip) { - if (self::has_ipv6()) { - $pton = @inet_pton($ip); - if ($pton === false) { - return false; - } - } - else { - if (preg_match('/^(?:\d{1,3}(?:\.|$)){4}/', $ip)) { // IPv4 - $octets = explode('.', $ip); - $pton = chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]); - } - else if (preg_match('/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/i', $ip)) { // IPv6 - if ($ip === '::') { - $pton = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - } - else { - $colon_count = substr_count($ip, ':'); - $dbl_colon_pos = strpos($ip, '::'); - if ($dbl_colon_pos !== false) { - $ip = str_replace('::', str_repeat(':0000', (($dbl_colon_pos === 0 || $dbl_colon_pos === strlen($ip) - 2) ? 9 : 8) - $colon_count) . ':', $ip); - $ip = trim($ip, ':'); - } - - $ip_groups = explode(':', $ip); - $ipv6_bin = ''; - foreach ($ip_groups as $ip_group) { - $ipv6_bin .= pack('H*', str_pad($ip_group, 4, '0', STR_PAD_LEFT)); - } - - if (Model_Crypto::strlen($ipv6_bin) == 16) { - $pton = $ipv6_bin; - } - else { - return false; - } - } - } - else if (preg_match('/^(?:\:(?:\:0{1,4}){0,4}\:|(?:0{1,4}\:){5})ffff\:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/i', $ip, $matches)) { // IPv4 mapped IPv6 - $octets = explode('.', $matches[1]); - $pton = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" . chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]); - } - else { - return false; - } - } - - $pton = str_pad($pton, 16, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT); - return $pton; - } - - /** - * Verify PHP was compiled with IPv6 support. - * - * Some hosts appear to not have inet_ntop, and others appear to have inet_ntop but are unable to process IPv6 addresses. - * - * @return bool - */ - public static function has_ipv6() { - return defined('AF_INET6'); - } - - /** - * Expands a compressed printable representation of an IPv6 address. - * - * @param string $ip - * @return string - */ - public static function expand_ipv6_address($ip) { - $hex = bin2hex(self::inet_pton($ip)); - $ip = substr(preg_replace("/([a-f0-9]{4})/i", "$1:", $hex), 0, -1); - return $ip; - } - - /** - * Returns whether or not the IP is a valid format. - * - * @param string $ip - * @return bool - */ - public static function is_valid_ip($ip) { - return filter_var($ip, FILTER_VALIDATE_IP) !== false; - } - - /** - * Returns whether or not the range is a valid CIDR range. - * - * @param string $range - * @return bool - */ - public static function is_valid_cidr_range($range) { - $components = explode('/', $range); - if (count($components) != 2) { return false; } - - list($ip, $prefix) = $components; - if (!self::is_valid_ip($ip)) { return false; } - - if (!preg_match('/^\d+$/', $prefix)) { return false; } - - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - if ($prefix < 0 || $prefix > 32) { return false; } - } - else { - if ($prefix < 1 || $prefix > 128) { return false; } - } - - return true; - } - - /** - * Returns whether or not the IP is in the IPv6-mapped-IPv4 format. - * - * @param string $ip - * @return bool - */ - public static function is_ipv6_mapped_ipv4($ip) { - return preg_match('/^(?:\:(?:\:0{1,4}){0,4}\:|(?:0{1,4}\:){5})ffff\:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/i', $ip) > 0; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/notice.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/notice.php deleted file mode 100644 index 2cab3a4f..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/notice.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_Notice { - const SEVERITY_CRITICAL = 'critical'; - const SEVERITY_WARNING = 'warning'; - const SEVERITY_INFO = 'info'; - - private $_id; - private $_severity; - private $_messageHTML; - private $_category; - - public function __construct($id, $severity, $messageHTML, $category) { - $this->_id = $id; - $this->_severity = $severity; - $this->_messageHTML = $messageHTML; - $this->_category = $category; - } - - public function display_notice() { - $severityClass = 'notice-info'; - if ($this->_severity == self::SEVERITY_CRITICAL) { - $severityClass = 'notice-error'; - } - else if ($this->_severity == self::SEVERITY_WARNING) { - $severityClass = 'notice-warning'; - } - - echo '<div class="wfls-notice notice ' . $severityClass . '" data-notice-id="' . esc_attr($this->_id) . '" data-notice-type="' . esc_attr($this->_category) . '"><p>' . $this->_messageHTML . '</p><p>' . sprintf(__('<a class="wfls-btn wfls-btn-default wfls-btn-sm wfls-dismiss-link" href="#" onclick="GWFLS.dismiss_notice(\'%s\'); return false;">Dismiss</a>', 'wordfence'), esc_attr($this->_id)) . '</p></div>'; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/request.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/request.php deleted file mode 100644 index ca22a6a5..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/request.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_Request { - const IP_SOURCE_AUTOMATIC = ''; - const IP_SOURCE_REMOTE_ADDR = 'REMOTE_ADDR'; - const IP_SOURCE_X_FORWARDED_FOR = 'HTTP_X_FORWARDED_FOR'; - const IP_SOURCE_X_REAL_IP = 'HTTP_X_REAL_IP'; - - private $_cachedIP; - - public static function current() { - return new Model_Request(); - } - - public function detected_ip_preview($source = null, $trusted_proxies = null) { - if ($source === null) { - $source = Controller_Settings::shared()->get(Controller_Settings::OPTION_IP_SOURCE); - } - - $record = $this->_ip($source); - if (is_array($record)) { - list($ip, $variable) = $record; - if (isset($_SERVER[$variable]) && strpos($_SERVER[$variable], ',') !== false) { - $items = preg_replace('/[\s,]/', '', explode(',', $_SERVER[$variable])); - $output = ''; - foreach ($items as $i) { - if ($ip == $i) { - $output .= ', <strong>' . esc_html($i) . '</strong>'; - } - else { - $output .= ', ' . esc_html($i); - } - } - - return substr($output, 2); - } - return '<strong>' . esc_html($ip) . '</strong>'; - } - return false; - } - - public function ip($refreshCache = false) { - if (WORDFENCE_LS_FROM_CORE) { - return \wfUtils::getIP($refreshCache); - } - - if (!isset($this->_cachedIP) || $refreshCache) { - $this->_cachedIP = $this->_ip(Controller_Settings::shared()->get(Controller_Settings::OPTION_IP_SOURCE), Controller_Settings::shared()->trusted_proxies()); - } - - return $this->_cachedIP[0]; //Format is array(<text IP>, <field found in>) - } - - public function ip_for_field($source, $trusted_proxies) { - return $this->_ip($source, $trusted_proxies); - } - - protected function _ip($source = null, $trusted_proxies = null) { - if ($source === null) { - $source = Controller_Settings::shared()->get(Controller_Settings::OPTION_IP_SOURCE); - } - - $possible_ips = $this->_possible_ips($source); - if ($trusted_proxies === null) { $trusted_proxies = array(); } - return $this->_find_preferred_ip($possible_ips, $trusted_proxies); - } - - protected function _possible_ips($source = null) { - $defaultIP = (is_array($_SERVER) && isset($_SERVER[self::IP_SOURCE_REMOTE_ADDR])) ? array($_SERVER[self::IP_SOURCE_REMOTE_ADDR], self::IP_SOURCE_REMOTE_ADDR) : array('127.0.0.1', self::IP_SOURCE_REMOTE_ADDR); - - if ($source) { - if ($source == self::IP_SOURCE_REMOTE_ADDR) { - return array($defaultIP); - } - - $check = array( - array((isset($_SERVER[$source]) ? $_SERVER[$source] : ''), $source), - $defaultIP, - ); - return $check; - } - - $check = array($defaultIP); - if (isset($_SERVER[self::IP_SOURCE_X_FORWARDED_FOR])) { - $check[] = array($_SERVER[self::IP_SOURCE_X_FORWARDED_FOR], self::IP_SOURCE_X_FORWARDED_FOR); - } - if (isset($_SERVER[self::IP_SOURCE_X_REAL_IP])) { - $check[] = array($_SERVER[self::IP_SOURCE_X_REAL_IP], self::IP_SOURCE_X_REAL_IP); - } - return $check; - } - - protected function _find_preferred_ip($possible_ips, $trusted_proxies) { - $privates = array(); - foreach ($possible_ips as $entry) { - list($value, $var) = $entry; - if (is_array($value)) { // An array of IPs - foreach ($value as $index => $j) { - if (!Model_IP::is_valid_ip($j)) { - $j = preg_replace('/:\d+$/', '', $j); //Strip off port if present - } - - if (Model_IP::is_valid_ip($j)) { - if (Model_IP::is_ipv6_mapped_ipv4($j)) { - $j = Model_IP::inet_ntop(Model_IP::inet_pton($j)); - } - - foreach ($trusted_proxies as $proxy) { - if (!empty($proxy)) { - if (Controller_Whitelist::shared()->ip_in_range($j, $proxy) && $index < count($value) - 1) { - continue 2; - } - } - } - - if (filter_var($j, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) { - $privates[] = array($j, $var); - } - else { - return array($j, $var); - } - } - } - continue; - } - - $skipToNext = false; - $separators = array(',', ' ', "\t"); - foreach ($separators as $char) { // A list of IPs separated by <separator>: 192.0.2.15,192.0.2.35,192.0.2.254 - if (strpos($value, $char) !== false) { - $sp = explode($char, $value); - $sp = array_reverse($sp); - foreach ($sp as $index => $j) { - $j = trim($j); - if (!Model_IP::is_valid_ip($j)) { - $j = preg_replace('/:\d+$/', '', $j); //Strip off port - } - - if (Model_IP::is_valid_ip($j)) { - if (Model_IP::is_ipv6_mapped_ipv4($j)) { - $j = Model_IP::inet_ntop(Model_IP::inet_pton($j)); - } - - foreach ($trusted_proxies as $proxy) { - if (!empty($proxy)) { - if (Controller_Whitelist::shared()->ip_in_range($j, $proxy) && $index < count($sp) - 1) { - continue 2; - } - } - } - - if (filter_var($j, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) { - $privates[] = array($j, $var); - } - else { - return array($j, $var); - } - } - } - $skipToNext = true; - break; - } - } - if ($skipToNext) { continue; } //Skip to next item because this one had a comma/space/tab, but we didn't find a valid, non-private address - - // A literal IP - if (!Model_IP::is_valid_ip($value)) { - $value = preg_replace('/:\d+$/', '', $value); //Strip off port - } - - if (Model_IP::is_valid_ip($value)) { - if (Model_IP::is_ipv6_mapped_ipv4($value)) { - $value = Model_IP::inet_ntop(Model_IP::inet_pton($value)); - } - - if (filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) { - $privates[] = array($value, $var); - } - else { - return array($value, $var); - } - } - } - - if (count($privates) > 0) { - return $privates[0]; - } - - return false; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/script.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/script.php deleted file mode 100644 index 37e6c972..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/script.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_Script extends Model_Asset { - - private $translations = array(); - private $translationObjectName = null; - - public function enqueue() { - if ($this->registered) { - wp_enqueue_script($this->handle); - } - else { - wp_enqueue_script($this->handle, $this->source, $this->dependencies, $this->version); - } - if ($this->translationObjectName && !empty($this->translations)) { - wp_localize_script($this->handle, $this->translationObjectName, $this->translations); - } - } - - public function isEnqueued() { - return wp_script_is($this->handle); - } - - public function renderInline() { - if (empty($this->source)) - return; -?> - <script type="text/javascript" src="<?php echo esc_attr($this->getSourceUrl()) ?>"></script> -<?php - } - - public function register() { - wp_register_script($this->handle, $this->source, $this->dependencies, $this->version); - return parent::register(); - } - - public function withTranslation($placeholder, $translation) { - $this->translations[$placeholder] = $translation; - return $this; - } - - public function withTranslations($translations) { - $this->translations = $translations; - return $this; - } - - public function setTranslationObjectName($name) { - $this->translationObjectName = $name; - return $this; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings.php deleted file mode 100644 index 863dc7c7..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace WordfenceLS; - -abstract class Model_Settings { - const AUTOLOAD_YES = 'yes'; - const AUTOLOAD_NO = 'no'; - - /** - * Sets $value to $key. - * - * @param string $key - * @param mixed $value - * @param string $autoload Whether or not the key/value pair should autoload in storages that do that. - * @param bool $allowOverwrite If false, only sets the value if key does not already exist. - */ - abstract public function set($key, $value, $autoload = self::AUTOLOAD_YES, $allowOverwrite = true); - abstract public function set_multiple($values); - abstract public function get($key, $default); - abstract public function remove($key); -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings/db.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings/db.php deleted file mode 100644 index 58a3c421..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings/db.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php - -namespace WordfenceLS\Settings; - -use WordfenceLS\Controller_DB; -use WordfenceLS\Model_Settings; - -class Model_DB extends Model_Settings { - const AUTOLOAD_NO = 'no'; - const AUTOLOAD_YES = 'yes'; - - public function set($key, $value, $autoload = self::AUTOLOAD_YES, $allowOverwrite = true) { - global $wpdb; - $table = Controller_DB::shared()->settings; - if (!$allowOverwrite) { - if ($this->_has_cached($key)) { - return; - } - - $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$table}` WHERE `name` = %s", $key), ARRAY_A); - if (is_array($row)) { - return; - } - } - - if ($wpdb->query($wpdb->prepare("INSERT INTO `{$table}` (`name`, `value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`), `autoload` = VALUES(`autoload`)", $key, $value, $autoload)) !== false && $autoload != self::AUTOLOAD_NO) { - $this->_update_cached($key, $value); - do_action('wfls_settings_set', $key, $value); - } - } - - public function set_multiple($values) { - foreach ($values as $key => $value) { - if (is_array($value)) { - $this->set($key, $value['value'], $value['autoload'], $value['allowOverwrite']); - } - else { - $this->set($key, $value); - } - } - } - - public function get($key, $default = false) { - global $wpdb; - - if ($this->_has_cached($key)) { - return $this->_cached_value($key); - } - - $table = Controller_DB::shared()->settings; - if (!($setting = $wpdb->get_row($wpdb->prepare("SELECT `name`, `value`, `autoload` FROM `{$table}` WHERE `name` = %s", $key)))) { - return $default; - } - - if ($setting->autoload != self::AUTOLOAD_NO) { - $this->_update_cached($key, $setting->value); - } - return $setting->value; - } - - public function remove($key) { - global $wpdb; - $table = Controller_DB::shared()->settings; - $wpdb->query($wpdb->prepare("DELETE FROM `{$table}` WHERE `name` = %s", $key)); - $this->_remove_cached($key); - } - - private function _cached() { - global $wpdb; - - $settings = wp_cache_get('allsettings', 'wordfence-ls'); - if (!$settings) { - $table = Controller_DB::shared()->settings; - $suppress = $wpdb->suppress_errors(); - $raw = $wpdb->get_results("SELECT `name`, `value` FROM `{$table}` WHERE `autoload` = 'yes'"); - $wpdb->suppress_errors($suppress); - $settings = array(); - foreach ((array) $raw as $o) { - $settings[$o->name] = $o->value; - } - - wp_cache_add_non_persistent_groups('wordfence-ls'); - wp_cache_add('allsettings', $settings, 'wordfence-ls'); - } - - return $settings; - } - - private function _update_cached($key, $value) { - $settings = $this->_cached(); - $settings[$key] = $value; - wp_cache_set('allsettings', $settings, 'wordfence-ls'); - } - - private function _remove_cached($key) { - $settings = $this->_cached(); - if (isset($settings[$key])) { - unset($settings[$key]); - wp_cache_set('allsettings', $settings, 'wordfence-ls'); - } - } - - private function _cached_value($key) { - global $wpdb; - - $settings = $this->_cached(); - if (isset($settings[$key])) { - return $settings[$key]; - } - - $table = Controller_DB::shared()->settings; - $value = $wpdb->get_var($wpdb->prepare("SELECT `value` FROM `{$table}` WHERE name = %s", $key)); - if ($value !== null) { - $settings[$key] = $value; - wp_cache_set('allsettings', $settings, 'wordfence-ls'); - } - return $value; - } - public function _has_cached($key) { - $settings = $this->_cached(); - return isset($settings[$key]); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings/wpoptions.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings/wpoptions.php deleted file mode 100644 index ff82c47b..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/settings/wpoptions.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace WordfenceLS\Settings; - -use WordfenceLS\Model_Settings; - -class Model_WPOptions extends Model_Settings { - protected $_prefix; - - public function __construct($prefix = '') { - $this->_prefix = $prefix; - } - - protected function _translate_key($key) { - return strtolower(preg_replace('/[^a-z0-9]/i', '_', $key)); - } - - public function set($key, $value, $autoload = self::AUTOLOAD_YES, $allowOverwrite = true) { - $key = $this->_translate_key($this->_prefix . $key); - if (!$allowOverwrite) { - if (is_multisite()) { - add_network_option(null, $key, $value); - } - else { - add_option($key, $value, '', $autoload); - } - } - else { - if (is_multisite()) { - update_network_option(null, $key, $value); - } - else { - update_option($key, $value, $autoload); - } - } - } - - public function set_multiple($values) { - foreach ($values as $key => $value) { - if (is_array($value)) { - $this->set($key, $value['value'], $value['autoload'], $value['allowOverwrite']); - } - else { - $this->set($key, $value); - } - } - } - - public function get($key, $default = false) { - $key = $this->_translate_key($this->_prefix . $key); - if (is_multisite()) { - $value = get_network_option($key, $default); - } - else { - $value = get_option($key, $default); - } - return $value; - } - - public function remove($key) { - $key = $this->_translate_key($this->_prefix . $key); - if (is_multisite()) { - delete_network_option(null, $key); - } - else { - delete_option($key); - } - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/style.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/style.php deleted file mode 100644 index ecc251cc..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/style.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_Style extends Model_Asset { - - public function enqueue() { - if ($this->registered) { - wp_enqueue_style($this->handle); - } - else { - wp_enqueue_style($this->handle, $this->source, $this->dependencies, $this->version); - } - } - - public function isEnqueued() { - return wp_style_is($this->handle); - } - - public function renderInline() { - if (empty($this->source)) - return; - $url = esc_attr($this->getSourceUrl()); - $linkTag = "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\">"; -?> - <script type="text/javascript"> - jQuery('head').append(<?php echo json_encode($linkTag) ?>); - </script> -<?php - } - - public function register() { - wp_register_style($this->handle, $this->source, $this->dependencies, $this->version); - return parent::register(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/text/html.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/text/html.php deleted file mode 100644 index c2dacdfe..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/text/html.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -namespace WordfenceLS\Text; - -/** - * Represents text that is already HTML-safe and should not be encoded again. - * @package Wordfence2FA\Text - */ -class Model_HTML { - private $_html; - - public static function esc_html($content) { - if (is_object($content) && ($content instanceof Model_HTML)) { - return (string) $content; - } - return esc_html($content); - } - - public function __construct($html) { - $this->_html = $html; - } - - public function __toString() { - return $this->_html; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/text/javascript.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/text/javascript.php deleted file mode 100644 index 74f69ffb..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/text/javascript.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -namespace WordfenceLS\Text; - -/** - * Represents text that is already JavaScript-safe and should not be encoded again. - * @package Wordfence2FA\Text - */ -class Model_JavaScript { - private $_javaScript; - - /** - * Returns a string escaped for use in JavaScript. This is almost identical in behavior to esc_js except that - * we don't call _wp_specialchars and keep \r rather than stripping it. - * - * @param string|Model_JavaScript $content - * @return string - */ - public static function esc_js($content) { - if (is_object($content) && ($content instanceof Model_HTML)) { - return (string) $content; - } - - $safe_text = wp_check_invalid_utf8($content); - $safe_text = preg_replace('/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes($safe_text)); - $safe_text = str_replace("\r", '\\r', $safe_text); - $safe_text = str_replace("\n", '\\n', addslashes($safe_text)); - return apply_filters('js_escape', $safe_text, $content); - } - - public static function echo_string_literal($string) { - echo "'" . self::esc_js($string) . "'"; - } - - public function __construct($javaScript) { - $this->_javaScript = $javaScript; - } - - public function __toString() { - return $this->_javaScript; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/tokenbucket.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/tokenbucket.php deleted file mode 100644 index 22e98935..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/tokenbucket.php +++ /dev/null @@ -1,195 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_TokenBucket { - /* Constants to map from tokens per unit to tokens per second */ - const MICROSECOND = 0.000001; - const MILLISECOND = 0.001; - const SECOND = 1; - const MINUTE = 60; - const HOUR = 3600; - const DAY = 86400; - const WEEK = 604800; - const MONTH = 2629743.83; - const YEAR = 31556926; - - const BACKING_REDIS = 'redis'; - const BACKING_WP_OPTIONS = 'wpoptions'; - - private $_identifier; - private $_bucketSize; - private $_tokensPerSecond; - - private $_backing; - private $_redis; - - /** - * Model_TokenBucket constructor. - * - * @param string $identifier The identifier for the bucket record in the database - * @param int $bucketSize The maximum capacity of the bucket. - * @param double $tokensPerSecond The number of tokens per second added to the bucket. - * @param string $backing The backing storage to use. - */ - public function __construct($identifier, $bucketSize, $tokensPerSecond, $backing = self::BACKING_WP_OPTIONS) { - $this->_identifier = $identifier; - $this->_bucketSize = $bucketSize; - $this->_tokensPerSecond = $tokensPerSecond; - $this->_backing = $backing; - - if ($backing == self::BACKING_REDIS) { - $this->_redis = new \Redis(); - $this->_redis->pconnect('127.0.0.1'); - } - } - - /** - * Attempts to acquire a lock for the bucket. - * - * @param int $timeout - * @return bool Whether or not the lock was acquired. - */ - private function _lock($timeout = 30) { - if ($this->_backing == self::BACKING_WP_OPTIONS) { - $start = microtime(true); - while (!$this->_wp_options_create_lock($this->_identifier)) { - if (microtime(true) - $start > $timeout) { - return false; - } - usleep(5000); // 5 ms - } - return true; - } - else if ($this->_backing == self::BACKING_REDIS) { - if ($this->_redis === false) { - return false; - } - - $start = microtime(true); - while (!$this->_redis->setnx('lock:' . $this->_identifier, '1')) { - if (microtime(true) - $start > $timeout) { - return false; - } - usleep(5000); // 5 ms - } - $this->_redis->expire('lock:' . $this->_identifier, 30); - return true; - } - return false; - } - - private function _unlock() { - if ($this->_backing == self::BACKING_WP_OPTIONS) { - $this->_wp_options_release_lock($this->_identifier); - } - else if ($this->_backing == self::BACKING_REDIS) { - if ($this->_redis === false) { - return; - } - - $this->_redis->del('lock:' . $this->_identifier); - } - } - - private function _wp_options_create_lock($name, $timeout = null) { //Our own version of WP_Upgrader::create_lock - global $wpdb; - - if (!$timeout) { - $timeout = 3600; - } - - $lock_option = 'wfls_' . $name . '.lock'; - $lock_result = $wpdb->query($wpdb->prepare("INSERT IGNORE INTO `{$wpdb->options}` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'no')", $lock_option, time())); - - if (!$lock_result) { - $lock_result = get_option($lock_option); - if (!$lock_result) { - return false; - } - - if ($lock_result > (time() - $timeout)) { - return false; - } - - $this->_wp_options_release_lock($name); - return $this->_wp_options_create_lock($name, $timeout); - } - - return true; - } - - private function _wp_options_release_lock($name) { - return delete_option('wfls_' . $name . '.lock'); - } - - /** - * Atomically checks the available token count, creating the initial record if needed, and updates the available token count if the requested number of tokens is available. - * - * @param int $tokenCount - * @return bool Whether or not there were enough tokens to satisfy the request. - */ - public function consume($tokenCount = 1) { - if (!$this->_lock()) { return false; } - - if ($this->_backing == self::BACKING_WP_OPTIONS) { - $record = get_transient('wflsbucket:' . $this->_identifier); - } - else if ($this->_backing == self::BACKING_REDIS) { - $record = $this->_redis->get('bucket:' . $this->_identifier); - } - else { - return false; - } - - if ($record === false) { - if ($tokenCount > $this->_bucketSize) { - $this->_unlock(); - return false; - } - - $this->_bootstrap($this->_bucketSize - $tokenCount); - $this->_unlock(); - return true; - } - - $tokens = min($this->_secondsToTokens(microtime(true) - (float) $record), $this->_bucketSize); - if ($tokenCount > $tokens) { - $this->_unlock(); - return false; - } - - if ($this->_backing == self::BACKING_WP_OPTIONS) { - set_transient('wflsbucket:' . $this->_identifier, (string) (microtime(true) - $this->_tokensToSeconds($tokens - $tokenCount)), ceil($this->_tokensToSeconds($this->_bucketSize))); - } - else if ($this->_backing == self::BACKING_REDIS) { - $this->_redis->set('bucket:' . $this->_identifier, (string) (microtime(true) - $this->_tokensToSeconds($tokens - $tokenCount))); - } - - $this->_unlock(); - return true; - } - - /** - * Creates an initial record with the given number of tokens. - * - * @param int $initialTokens - */ - protected function _bootstrap($initialTokens) { - $microtime = microtime(true) - $this->_tokensToSeconds($initialTokens); - if ($this->_backing == self::BACKING_WP_OPTIONS) { - set_transient('wflsbucket:' . $this->_identifier, (string) $microtime, ceil($this->_tokensToSeconds($this->_bucketSize))); - } - else if ($this->_backing == self::BACKING_REDIS) { - $this->_redis->set('bucket:' . $this->_identifier, (string) $microtime); - } - } - - protected function _tokensToSeconds($tokens) { - return $tokens / $this->_tokensPerSecond; - } - - protected function _secondsToTokens($seconds) { - return (int) $seconds * $this->_tokensPerSecond; - } -} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view.php deleted file mode 100644 index b2636f50..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Model_View { - /** - * @var string - */ - protected $path; - - /** - * @var string - */ - protected $file_extension = '.php'; - - /** - * @var string - */ - protected $view; - - /** - * @var array - */ - protected $data; - - /** - * Equivalent to the constructor but allows for call chaining. - * - * @param string $view - * @param array $data - * @return Model_View - */ - public static function create($view, $data = array()) { - return new self($view, $data); - } - - /** - * @param string $view - * @param array $data - */ - public function __construct($view, $data = array()) { - $this->path = WORDFENCE_LS_PATH . 'views'; - $this->view = $view; - $this->data = $data; - } - - /** - * @return string - * @throws ViewNotFoundException - */ - public function render() { - $view = preg_replace('/\.{2,}/', '.', $this->view); - $path = $this->path . '/' . $view . $this->file_extension; - if (!file_exists($path)) { - throw new ViewNotFoundException('The view ' . $path . ' does not exist or is not readable.'); - } - - extract($this->data, EXTR_SKIP); - - ob_start(); - /** @noinspection PhpIncludeInspection */ - include $path; - return ob_get_clean(); - } - - /** - * @return string - */ - public function __toString() { - try { - return $this->render(); - } - catch (ViewNotFoundException $e) { - return defined('WP_DEBUG') && WP_DEBUG ? $e->getMessage() : 'The view could not be loaded.'; - } - } - - /** - * @param $data - * @return $this - */ - public function addData($data) { - $this->data = array_merge($data, $this->data); - return $this; - } - - /** - * @return array - */ - public function getData() { - return $this->data; - } - - /** - * @param array $data - * @return $this - */ - public function setData($data) { - $this->data = $data; - return $this; - } - - /** - * @return string - */ - public function getView() { - return $this->view; - } - - /** - * @param string $view - * @return $this - */ - public function setView($view) { - $this->view = $view; - return $this; - } - - /** - * Prevent POP - */ - public function __wakeup() { - $this->path = WORDFENCE_LS_PATH . 'views'; - $this->view = null; - $this->data = array(); - $this->file_extension = '.php'; - } -} - -class ViewNotFoundException extends \Exception { } diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view/tab.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view/tab.php deleted file mode 100644 index 84d516c8..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view/tab.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace WordfenceLS\View; - -/** - * Represents a tab in the UI. - * - * @package Wordfence2FA\View - * @property string $id - * @property string $a - * @property string $tabTitle - * @property string $pageTitle - * @property bool $active - */ -class Model_Tab { - protected $_id; - protected $_a; - protected $_tabTitle; - protected $_pageTitle; - protected $_active; - - public function __construct($id, $a, $tabTitle, $pageTitle, $active = false) { - $this->_id = $id; - $this->_a = $a; - $this->_tabTitle = $tabTitle; - $this->_pageTitle = $pageTitle; - $this->_active = $active; - } - - public function __get($name) { - switch ($name) { - case 'id': - return $this->_id; - case 'a': - return $this->_a; - case 'tabTitle': - return $this->_tabTitle; - case 'pageTitle': - return $this->_pageTitle; - case 'active': - return $this->_active; - } - - throw new \OutOfBoundsException('Invalid key: ' . $name); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view/title.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view/title.php deleted file mode 100644 index 407abb1e..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/model/view/title.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace WordfenceLS\View; - -/** - * Class Model_Title - * @package Wordfence2FA\Page - * @var string $id A valid DOM ID for the title. - * @var string|Model_HTML $title The title text or HTML. - * @var string $helpURL The help URL. - * @var string|Model_HTML $helpLink The text/HTML of the help link. - */ -class Model_Title { - private $_id; - private $_title; - private $_helpURL; - private $_helpLink; - - public function __construct($id, $title, $helpURL = null, $helpLink = null) { - $this->_id = $id; - $this->_title = $title; - $this->_helpURL = $helpURL; - $this->_helpLink = $helpLink; - } - - public function __get($name) { - switch ($name) { - case 'id': - return $this->_id; - case 'title': - return $this->_title; - case 'helpURL': - return $this->_helpURL; - case 'helpLink': - return $this->_helpLink; - } - - throw new \OutOfBoundsException('Invalid key: ' . $name); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/array.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/array.php deleted file mode 100644 index b7308326..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/array.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Utility_Array { - - public static function findOffset($array, $key) { - $offset = 0; - foreach ($array as $index => $value) { - if ($index === $key) - return $offset; - $offset++; - } - return null; - } - - public static function insertAfter(&$array, $targetKey, $key, $value) { - $offset = self::findOffset($array, $targetKey); - if ($offset === null) - return false; - $array = array_merge( - array_slice($array, 0, $offset + 1), - array( $key => $value ), - array_slice($array, $offset + 1) - ); - return true; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/baseconversion.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/baseconversion.php deleted file mode 100644 index 3b2eb4b9..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/baseconversion.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace WordfenceLS; - -use WordfenceLS\Crypto\Model_Base2n; - -class Utility_BaseConversion { - - public static function get_base32() { - static $base32 = null; - if ($base32 === null) - $base32 = new Model_Base2n(5, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', false, true, true); - return $base32; - } - - public static function base32_encode($data) { - $base32 = self::get_base32(); - return $base32->encode($data); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/databaselock.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/databaselock.php deleted file mode 100644 index 17f3607f..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/databaselock.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php - -namespace WordfenceLS; - -use RuntimeException; - -class Utility_DatabaseLock implements Utility_Lock { - - const DEFAULT_TIMEOUT = 30; - const MAX_TIMEOUT = 120; - - private $wpdb; - private $table; - private $key; - private $timeout; - private $expirationTimestamp; - - public function __construct($dbController, $key, $timeout = null) { - $this->wpdb = $dbController->get_wpdb(); - $this->table = $dbController->settings; - $this->key = "lock:{$key}"; - $this->timeout = self::resolveTimeout($timeout); - } - - private static function resolveTimeout($timeout) { - if ($timeout === null) - $timeout = ini_get('max_execution_time'); - $timeout = (int) $timeout; - if ($timeout <= 0 || $timeout > self::MAX_TIMEOUT) - return self::DEFAULT_TIMEOUT; - return $timeout; - } - - private function clearExpired($timestamp) { - $this->wpdb->query($this->wpdb->prepare(<<<SQL - DELETE - FROM {$this->table} - WHERE - name = %s - AND value < %d -SQL - , $this->key, $timestamp)); - } - - private function insert($expirationTimestamp) { - $result = $this->wpdb->query($this->wpdb->prepare(<<<SQL - INSERT IGNORE - INTO {$this->table} - (name, value, autoload) - VALUES(%s, %d, 'no') -SQL - , $this->key, $expirationTimestamp)); - return $result === 1; - } - - public function acquire($delay = self::DEFAULT_DELAY) { - $attempts = (int) ($this->timeout * 1000000 / $delay); - for (; $attempts > 0; $attempts--) { - $timestamp = time(); - $this->clearExpired($timestamp); - $expirationTimestamp = $timestamp + $this->timeout; - $locked = $this->insert($expirationTimestamp); - if ($locked) { - $this->expirationTimestamp = $expirationTimestamp; - return; - } - usleep($delay); - } - throw new RuntimeException("Failed to acquire lock {$this->key}"); - } - - private function delete($expirationTimestamp) { - $this->wpdb->delete( - $this->table, - array ( - 'name' => $this->key, - 'value' => $expirationTimestamp - ), - array ( - '%s', - '%d' - ) - ); - } - - public function release() { - if ($this->expirationTimestamp === null) - return; - $this->delete($this->expirationTimestamp); - $this->expirationTimestamp = null; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/lock.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/lock.php deleted file mode 100644 index 374030f9..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/lock.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace WordfenceLS; - -interface Utility_Lock { - - const DEFAULT_DELAY = 100000; - - public function acquire($delay = self::DEFAULT_DELAY); - - public function release(); - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/measuredstring.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/measuredstring.php deleted file mode 100644 index 6c194d04..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/measuredstring.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Utility_MeasuredString { - - public $string; - public $length; - - public function __construct($string) { - $this->string = $string; - $this->length = strlen($string); - } - - public function __toString() { - return $this->string; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/multisite.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/multisite.php deleted file mode 100644 index 14f4d5d0..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/multisite.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Utility_Multisite { - - /** - * Returns an array of all active multisite blogs (if `$blogIds` is `null`) or a list of active multisite blogs - * filtered to only those in `$blogIds` if non-null. - * - * @param array|null $blogIds - * @return array - */ - public static function retrieve_active_sites($blogIds = null) { - $args = array( - 'number' => '', /* WordPress core passes an empty string which appears to remove the result set limit */ - 'update_site_meta_cache' => false, /* Defaults to true which is not desirable for this use case */ - //Ignore archived/spam/deleted sites - 'archived' => 0, - 'spam' => 0, - 'deleted' => 0 - ); - - if ($blogIds !== null) { - $args['site__in'] = $blogIds; - } - - if (function_exists('get_sites')) { - return get_sites($args); - } - - global $wpdb; - if ($blogIds !== null) { - $blogIdsQuery = implode(',', wp_parse_id_list($args['site__in'])); - return $wpdb->get_results("SELECT * FROM {$wpdb->blogs} WHERE blog_id IN ({$blogIdsQuery}) AND archived = 0 AND spam = 0 AND deleted = 0"); - } - - return $wpdb->get_results("SELECT * FROM {$wpdb->blogs} WHERE archived = 0 AND spam = 0 AND deleted = 0"); - } -} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/multisiteconfigurationextractor.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/multisiteconfigurationextractor.php deleted file mode 100644 index 4b18db63..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/multisiteconfigurationextractor.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Utility_MultisiteConfigurationExtractor { - - private $prefix, $suffix; - private $suffixOffset; - - public function __construct($prefix, $suffix) { - $this->prefix = new Utility_MeasuredString($prefix); - $this->suffix = new Utility_MeasuredString($suffix); - $this->suffixOffset = -$this->suffix->length; - } - - /** - * Parses a `get_user_meta` result array into a more usable format. The input array will be something similar to - * [ - * 'wp_capabilities' => '...', - * 'wp_3_capabilities' => '...', - * 'wp_4_capabilities' => '...', - * 'wp_10_capabilities' => '...', - * ] - * - * This will return - * [ - * 1 => '...', - * 3 => '...', - * 4 => '...', - * 10 => '...', - * ] - * - * @param array $values - * @return array - */ - private function parseBlogIds($values) { - $parsed = array(); - foreach ($values as $key => $value) { - if (substr($key, $this->suffixOffset) === $this->suffix->string && strpos($key, (string) $this->prefix) === 0) { - $blogId = substr($key, $this->prefix->length, strlen($key) - $this->prefix->length + $this->suffixOffset); - if (empty($blogId)) { - $parsed[1] = $value; - } - else if (substr($blogId, -1) === '_') { - $parsed[(int) $blogId] = $value; - } - } - } - return $parsed; - } - - /** - * Filters $values, which is the resulting array from `$this->parseBlogIds` so it contains only the values for the - * sites in $sites. - * - * @param array $values - * @param array $sites - * @return array - */ - private function filterValues($values, $sites) { - $filtered = array(); - foreach ($sites as $site) { - $blogId = (int) $site->blog_id; - $filtered[$blogId] = $values[$blogId]; - } - return $filtered; - } - - /** - * Processes a `get_user_meta` result array to re-key it so the keys are the numerical ID of all multisite blog IDs - * in `$values` that are still in an active state. - * - * @param array $values - * @return array - */ - public function extract($values) { - $parsed = $this->parseBlogIds($values); - if (empty($parsed)) - return $parsed; - $sites = Utility_Multisite::retrieve_active_sites(array_keys($parsed)); - return $this->filterValues($parsed, $sites); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/nulllock.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/nulllock.php deleted file mode 100644 index edebbc13..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/nulllock.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace WordfenceLS; - -/** - * An implementation of the Utility_Lock that doesn't actually do any locking - */ -class Utility_NullLock implements Utility_Lock { - - public function acquire($delay = self::DEFAULT_DELAY) { - //Do nothing - } - - public function release() { - //Do nothing - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/number.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/number.php deleted file mode 100644 index f2c37a0d..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/number.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Utility_Number { - - public static function isInteger($value, $min = null, $max = null) { - $options = array(); - if ($min !== null) - $options['min_range'] = $min; - if ($max !== null) - $options['max_range'] = $max; - return filter_var($value, FILTER_VALIDATE_INT, array('options' => $options)) !== false; - } - - public static function isUnixTimestamp($value) { - return self::isInteger($value, 0); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/serialization.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/serialization.php deleted file mode 100644 index bc126a3b..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/serialization.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace WordfenceLS; - -use RuntimeException; - -class Utility_Serialization { - - public static function unserialize($data, $options = array(), $validator = null) { - static $serializedFalse; - if ($serializedFalse === null) - $serializedFalse = serialize(false); - if ($data === $serializedFalse) - return false; - if (!is_serialized($data)) - throw new RuntimeException('Input data is not serialized'); - if (version_compare(PHP_VERSION, '5.6', '<=')) { - $unserialized = @unserialize($data); - } - else { - $unserialized = @unserialize($data, $options); - } - if ($unserialized === false) - throw new RuntimeException('Deserialization failed'); - if ($validator !== null && !$validator($unserialized)) - throw new RuntimeException('Validation of unserialized data failed'); - return $unserialized; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/url.php b/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/url.php deleted file mode 100644 index 6bf03cc1..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/classes/utility/url.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -namespace WordfenceLS; - -class Utility_URL { - - /** - * Similar to WordPress' `admin_url`, this returns a host-relative URL for the given path. It may be used to avoid - * canonicalization issues with CORS (e.g., the site is configured for the www. variant of the URL but doesn't forward - * the other). - * - * @param string $path - * @return string - */ - public static function relative_admin_url($path = '') { - $url = admin_url($path); - $components = parse_url($url); - $s = $components['path']; - if (!empty($components['query'])) { - $s .= '?' . $components['query']; - } - if (!empty($components['fragment'])) { - $s .= '#' . $components['fragment']; - } - return $s; - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/admin-global.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/admin-global.1704213472.css deleted file mode 100644 index aee3b337..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/admin-global.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wfls-clearfix:before,.wfls-clearfix:after{content:" ";display:table}.wfls-clearfix:after{clear:both}.wfls-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.4rem 1rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width: 768px){.wfls-btn{padding:.5rem 1.25rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px}}.wfls-btn:focus,.wfls-btn.wfls-focus,.wfls-btn:active:focus,.wfls-btn:active.wfls-focus,.wfls-btn.wfls-active:focus,.wfls-btn.wfls-active.wfls-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wfls-btn:hover,.wfls-btn:focus,.wfls-btn.wfls-focus{color:#00709e;text-decoration:none !important}.wfls-btn:active,.wfls-btn.wfls-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wfls-btn.wfls-disabled,.wfls-btn[disabled],.wfls-btn[readonly],fieldset[disabled] .wfls-btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none}a.wfls-btn{text-decoration:none}a.wfls-btn.wfls-disabled,fieldset[disabled] a.wfls-btn{cursor:not-allowed;pointer-events:none}.wfls-btn-default{color:#00709e;background-color:#fff;border-color:#00709e}.wfls-btn-default:focus,.wfls-btn-default.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}.wfls-btn-default:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wfls-btn-default:active,.wfls-btn-default.active,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wfls-btn-default:active:hover,.wfls-btn-default:active:focus,.wfls-btn-default:active.focus,.wfls-btn-default.active:hover,.wfls-btn-default.active:focus,.wfls-btn-default.active.focus,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}.wfls-btn-default:active,.wfls-btn-default.wfls-active,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle{background-image:none}.wfls-btn-default.wfls-disabled,.wfls-btn-default[disabled],.wfls-btn-default[readonly],fieldset[disabled] .wfls-btn-default{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed;opacity:0.75}.wfls-btn-default.wfls-disabled:hover,.wfls-btn-default.wfls-disabled:focus,.wfls-btn-default.wfls-disabled.wfls-focus,.wfls-btn-default[disabled]:hover,.wfls-btn-default[disabled]:focus,.wfls-btn-default[disabled].wfls-focus,.wfls-btn-default[readonly]:hover,.wfls-btn-default[readonly]:focus,.wfls-btn-default[readonly].wfls-focus,fieldset[disabled] .wfls-btn-default:hover,fieldset[disabled] .wfls-btn-default:focus,fieldset[disabled] .wfls-btn-default.wfls-focus{background-color:#fff;border-color:#00709e}.wfls-btn-default .wfls-badge{color:#fff;background-color:#00709e}.wfls-btn-primary{color:#fff;background-color:#00709e;border-color:#005e85}.wfls-btn-primary:focus,.wfls-btn-primary.focus{color:#fff;background-color:#004c6b;border-color:#000405}.wfls-btn-primary:hover{color:#fff;background-color:#004c6b;border-color:#003347}.wfls-btn-primary:active,.wfls-btn-primary.active,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}.wfls-btn-primary:active:hover,.wfls-btn-primary:active:focus,.wfls-btn-primary:active.focus,.wfls-btn-primary.active:hover,.wfls-btn-primary.active:focus,.wfls-btn-primary.active.focus,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}.wfls-btn-primary:active,.wfls-btn-primary.wfls-active,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle{background-image:none}.wfls-btn-primary.wfls-disabled,.wfls-btn-primary[disabled],.wfls-btn-primary[readonly],fieldset[disabled] .wfls-btn-primary{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed;opacity:0.75}.wfls-btn-primary.wfls-disabled:hover,.wfls-btn-primary.wfls-disabled:focus,.wfls-btn-primary.wfls-disabled.wfls-focus,.wfls-btn-primary[disabled]:hover,.wfls-btn-primary[disabled]:focus,.wfls-btn-primary[disabled].wfls-focus,.wfls-btn-primary[readonly]:hover,.wfls-btn-primary[readonly]:focus,.wfls-btn-primary[readonly].wfls-focus,fieldset[disabled] .wfls-btn-primary:hover,fieldset[disabled] .wfls-btn-primary:focus,fieldset[disabled] .wfls-btn-primary.wfls-focus{background-color:#00709e;border-color:#005e85}.wfls-btn-primary .wfls-badge{color:#00709e;background-color:#fff}.wfls-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.wfls-btn-success:focus,.wfls-btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.wfls-btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.wfls-btn-success:active,.wfls-btn-success.active,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.wfls-btn-success:active:hover,.wfls-btn-success:active:focus,.wfls-btn-success:active.focus,.wfls-btn-success.active:hover,.wfls-btn-success.active:focus,.wfls-btn-success.active.focus,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle.focus{color:#fff;background-color:#398439;border-color:#255625}.wfls-btn-success:active,.wfls-btn-success.wfls-active,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle{background-image:none}.wfls-btn-success.wfls-disabled,.wfls-btn-success[disabled],.wfls-btn-success[readonly],fieldset[disabled] .wfls-btn-success{color:#fff;background-color:#95d195;border-color:#8bca8b;cursor:not-allowed;opacity:0.75}.wfls-btn-success.wfls-disabled:hover,.wfls-btn-success.wfls-disabled:focus,.wfls-btn-success.wfls-disabled.wfls-focus,.wfls-btn-success[disabled]:hover,.wfls-btn-success[disabled]:focus,.wfls-btn-success[disabled].wfls-focus,.wfls-btn-success[readonly]:hover,.wfls-btn-success[readonly]:focus,.wfls-btn-success[readonly].wfls-focus,fieldset[disabled] .wfls-btn-success:hover,fieldset[disabled] .wfls-btn-success:focus,fieldset[disabled] .wfls-btn-success.wfls-focus{background-color:#5cb85c;border-color:#4cae4c}.wfls-btn-success .wfls-badge{color:#5cb85c;background-color:#fff}.wfls-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.wfls-btn-info:focus,.wfls-btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.wfls-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.wfls-btn-info:active,.wfls-btn-info.active,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.wfls-btn-info:active:hover,.wfls-btn-info:active:focus,.wfls-btn-info:active.focus,.wfls-btn-info.active:hover,.wfls-btn-info.active:focus,.wfls-btn-info.active.focus,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.wfls-btn-info:active,.wfls-btn-info.wfls-active,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle{background-image:none}.wfls-btn-info.wfls-disabled,.wfls-btn-info[disabled],.wfls-btn-info[readonly],fieldset[disabled] .wfls-btn-info{color:#fff;background-color:#94d6ea;border-color:#87d1e7;cursor:not-allowed;opacity:0.75}.wfls-btn-info.wfls-disabled:hover,.wfls-btn-info.wfls-disabled:focus,.wfls-btn-info.wfls-disabled.wfls-focus,.wfls-btn-info[disabled]:hover,.wfls-btn-info[disabled]:focus,.wfls-btn-info[disabled].wfls-focus,.wfls-btn-info[readonly]:hover,.wfls-btn-info[readonly]:focus,.wfls-btn-info[readonly].wfls-focus,fieldset[disabled] .wfls-btn-info:hover,fieldset[disabled] .wfls-btn-info:focus,fieldset[disabled] .wfls-btn-info.wfls-focus{background-color:#5bc0de;border-color:#46b8da}.wfls-btn-info .wfls-badge{color:#5bc0de;background-color:#fff}.wfls-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.wfls-btn-warning:focus,.wfls-btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.wfls-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.wfls-btn-warning:active,.wfls-btn-warning.active,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.wfls-btn-warning:active:hover,.wfls-btn-warning:active:focus,.wfls-btn-warning:active.focus,.wfls-btn-warning.active:hover,.wfls-btn-warning.active:focus,.wfls-btn-warning.active.focus,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.wfls-btn-warning:active,.wfls-btn-warning.wfls-active,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle{background-image:none}.wfls-btn-warning.wfls-disabled,.wfls-btn-warning[disabled],.wfls-btn-warning[readonly],fieldset[disabled] .wfls-btn-warning{color:#fff;background-color:#f5ca8c;border-color:#f4c37c;cursor:not-allowed;opacity:0.75}.wfls-btn-warning.wfls-disabled:hover,.wfls-btn-warning.wfls-disabled:focus,.wfls-btn-warning.wfls-disabled.wfls-focus,.wfls-btn-warning[disabled]:hover,.wfls-btn-warning[disabled]:focus,.wfls-btn-warning[disabled].wfls-focus,.wfls-btn-warning[readonly]:hover,.wfls-btn-warning[readonly]:focus,.wfls-btn-warning[readonly].wfls-focus,fieldset[disabled] .wfls-btn-warning:hover,fieldset[disabled] .wfls-btn-warning:focus,fieldset[disabled] .wfls-btn-warning.wfls-focus{background-color:#f0ad4e;border-color:#eea236}.wfls-btn-warning .wfls-badge{color:#f0ad4e;background-color:#fff}.wfls-btn-danger{color:#fff;background-color:#930000;border-color:#7a0000}.wfls-btn-danger:focus,.wfls-btn-danger.focus{color:#fff;background-color:#600000;border-color:#000}.wfls-btn-danger:hover{color:#fff;background-color:#600000;border-color:#3c0000}.wfls-btn-danger:active,.wfls-btn-danger.active,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle{color:#fff;background-color:#600000;border-color:#3c0000}.wfls-btn-danger:active:hover,.wfls-btn-danger:active:focus,.wfls-btn-danger:active.focus,.wfls-btn-danger.active:hover,.wfls-btn-danger.active:focus,.wfls-btn-danger.active.focus,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle.focus{color:#fff;background-color:#3c0000;border-color:#000}.wfls-btn-danger:active,.wfls-btn-danger.wfls-active,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle{background-image:none}.wfls-btn-danger.wfls-disabled,.wfls-btn-danger[disabled],.wfls-btn-danger[readonly],fieldset[disabled] .wfls-btn-danger{color:#fff;background-color:#b95959;border-color:#a95959;cursor:not-allowed;opacity:0.75}.wfls-btn-danger.wfls-disabled:hover,.wfls-btn-danger.wfls-disabled:focus,.wfls-btn-danger.wfls-disabled.wfls-focus,.wfls-btn-danger[disabled]:hover,.wfls-btn-danger[disabled]:focus,.wfls-btn-danger[disabled].wfls-focus,.wfls-btn-danger[readonly]:hover,.wfls-btn-danger[readonly]:focus,.wfls-btn-danger[readonly].wfls-focus,fieldset[disabled] .wfls-btn-danger:hover,fieldset[disabled] .wfls-btn-danger:focus,fieldset[disabled] .wfls-btn-danger.wfls-focus{background-color:#930000;border-color:#7a0000}.wfls-btn-danger .wfls-badge{color:#930000;background-color:#fff}.wfls-btn-callout{font-weight:600;text-transform:uppercase}.wfls-btn-callout-subtle{font-weight:400;text-transform:uppercase}.wfls-btn-link{color:#00709e;font-weight:normal;border-radius:0}.wfls-btn-link,.wfls-btn-link:active,.wfls-btn-link.wfls-active,.wfls-btn-link[disabled],fieldset[disabled] .wfls-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wfls-btn-link,.wfls-btn-link:hover,.wfls-btn-link:focus,.wfls-btn-link:active{border-color:transparent}.wfls-btn-link:hover,.wfls-btn-link:focus{color:#003a52;text-decoration:underline;background-color:transparent}.wfls-btn-link[disabled]:hover,.wfls-btn-link[disabled]:focus,fieldset[disabled] .wfls-btn-link:hover,fieldset[disabled] .wfls-btn-link:focus{color:#777;text-decoration:none}.wfls-btn-lg,.wfls-btn-group-lg>.wfls-btn{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wfls-btn-sm,.wfls-btn-group-sm>.wfls-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wfls-btn-xs,.wfls-btn-group-xs>.wfls-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.wfls-btn-block{display:block;width:100%}.wfls-btn-block+.wfls-btn-block{margin-top:5px}input[type="submit"].wfls-btn-block,input[type="reset"].wfls-btn-block,input[type="button"].wfls-btn-block{width:100%}.wfls-btn-group,.wfls-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wfls-btn-group>.wfls-btn,.wfls-btn-group-vertical>.wfls-btn{position:relative;float:left}.wfls-btn-group>.wfls-btn:hover,.wfls-btn-group>.wfls-btn:focus,.wfls-btn-group>.wfls-btn:active,.wfls-btn-group>.wfls-btn.wfls-active,.wfls-btn-group-vertical>.wfls-btn:hover,.wfls-btn-group-vertical>.wfls-btn:focus,.wfls-btn-group-vertical>.wfls-btn:active,.wfls-btn-group-vertical>.wfls-btn.wfls-active{z-index:2}.wfls-btn-group .wfls-btn+.wfls-btn,.wfls-btn-group .wfls-btn+.wfls-btn-group,.wfls-btn-group .wfls-btn-group+.wfls-btn,.wfls-btn-group .wfls-btn-group+.wfls-btn-group{margin-left:-1px}.wfls-btn-toolbar{margin-left:-5px}.wfls-btn-toolbar:before,.wfls-btn-toolbar:after{content:" ";display:table}.wfls-btn-toolbar:after{clear:both}.wfls-btn-toolbar .wfls-btn,.wfls-btn-toolbar .wfls-btn-group,.wfls-btn-toolbar .wfls-input-group{float:left}.wfls-btn-toolbar>.wfls-btn,.wfls-btn-toolbar>.wfls-btn-group,.wfls-btn-toolbar>.wfls-input-group{margin-left:5px}.wfls-btn-group>.wfls-btn:not(:first-child):not(:last-child):not(.wfls-dropdown-toggle){border-radius:0}.wfls-btn-group>.wfls-btn:first-child{margin-left:0}.wfls-btn-group>.wfls-btn:first-child:not(:last-child):not(.wfls-dropdown-toggle){-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group>.wfls-btn:last-child:not(:first-child),.wfls-btn-group>.wfls-dropdown-toggle:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wfls-btn-group>.wfls-btn-group{float:left}.wfls-btn-group>.wfls-btn-group:not(:first-child):not(:last-child)>.wfls-btn{border-radius:0}.wfls-btn-group>.wfls-btn-group:first-child:not(:last-child)>.wfls-btn:last-child,.wfls-btn-group>.wfls-btn-group:first-child:not(:last-child)>.wfls-dropdown-toggle{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group>.wfls-btn-group:last-child:not(:first-child)>.wfls-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wfls-btn-group .wfls-dropdown-toggle:active,.wfls-btn-group.wfls-open .wfls-dropdown-toggle{outline:0}.wfls-btn-group>.wfls-btn+.wfls-dropdown-toggle{padding-left:8px;padding-right:8px}.wfls-btn-group>.wfls-btn-lg+.wfls-dropdown-toggle,.wfls-btn-group-lg.wfls-btn-group>.wfls-btn+.wfls-dropdown-toggle{padding-left:12px;padding-right:12px}.wfls-btn-group.open .wfls-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wfls-btn-group.open .wfls-dropdown-toggle.wfls-btn-link{-webkit-box-shadow:none;box-shadow:none}.wfls-btn .wfls-caret{margin-left:0}.wfls-btn-lg .wfls-caret,.wfls-btn-group-lg>.wfls-btn .wfls-caret{border-width:5px 5px 0;border-bottom-width:0}.wfls-dropup .wfls-btn-lg .wfls-caret,.wfls-dropup .wfls-btn-group-lg>.wfls-btn .wfls-caret{border-width:0 5px 5px}.wfls-btn-group-vertical>.wfls-btn,.wfls-btn-group-vertical>.wfls-btn-group,.wfls-btn-group-vertical>.wfls-btn-group>.wfls-btn{display:block;float:none;width:100%;max-width:100%}.wfls-btn-group-vertical>.wfls-btn-group:before,.wfls-btn-group-vertical>.wfls-btn-group:after{content:" ";display:table}.wfls-btn-group-vertical>.wfls-btn-group:after{clear:both}.wfls-btn-group-vertical>.wfls-btn-group>.wfls-btn{float:none}.wfls-btn-group-vertical>.wfls-btn+.wfls-btn,.wfls-btn-group-vertical>.wfls-btn+.wfls-btn-group,.wfls-btn-group-vertical>.wfls-btn-group+.wfls-btn,.wfls-btn-group-vertical>.wfls-btn-group+.wfls-btn-group{margin-top:-1px;margin-left:0}.wfls-btn-group-vertical>.wfls-btn:not(:first-child):not(:last-child){border-radius:0}.wfls-btn-group-vertical>.wfls-btn:first-child:not(:last-child){-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group-vertical>.wfls-btn:last-child:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wfls-btn-group-vertical>.wfls-btn-group:not(:first-child):not(:last-child)>.wfls-btn{border-radius:0}.wfls-btn-group-vertical>.wfls-btn-group:first-child:not(:last-child)>.wfls-btn:last-child,.wfls-btn-group-vertical>.wfls-btn-group:first-child:not(:last-child)>.wfls-dropdown-toggle{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group-vertical>.wfls-btn-group:last-child:not(:first-child)>.wfls-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wfls-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wfls-btn-group-justified>.wfls-btn,.wfls-btn-group-justified>.wfls-btn-group{float:none;display:table-cell;width:1%}.wfls-btn-group-justified>.wfls-btn-group .wfls-btn{width:100%}.wfls-btn-group-justified>.wfls-btn-group .wfls-dropdown-menu{left:auto}[data-toggle="buttons"]>.wfls-btn input[type="radio"],[data-toggle="buttons"]>.wfls-btn input[type="checkbox"],[data-toggle="buttons"]>.wfls-btn-group>.wfls-btn input[type="radio"],[data-toggle="buttons"]>.wfls-btn-group>.wfls-btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wfls-pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.wfls-pagination>li{display:inline}.wfls-pagination>li>a,.wfls-pagination>li>span{position:relative;float:left;padding:.5rem 1.25rem;line-height:1.42857;text-decoration:none;color:#00709e;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.wfls-pagination>li:first-child>a,.wfls-pagination>li:first-child>span{margin-left:0;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.wfls-pagination>li:last-child>a,.wfls-pagination>li:last-child>span{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wfls-pagination>li>a:hover,.wfls-pagination>li>a:focus,.wfls-pagination>li>span:hover,.wfls-pagination>li>span:focus{z-index:2;color:#003a52;background-color:#e2e2e2;border-color:#ddd}.wfls-pagination>.wfls-active>a,.wfls-pagination>.wfls-active>a:hover,.wfls-pagination>.wfls-active>a:focus,.wfls-pagination>.wfls-active>span,.wfls-pagination>.wfls-active>span:hover,.wfls-pagination>.wfls-active>span:focus{z-index:3;color:#fff;background-color:#00709e;border-color:#00709e;cursor:default}.wfls-pagination>.wfls-disabled>span,.wfls-pagination>.wfls-disabled>span:hover,.wfls-pagination>.wfls-disabled>span:focus,.wfls-pagination>.wfls-disabled>a,.wfls-pagination>.wfls-disabled>a:hover,.wfls-pagination>.wfls-disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.wfls-pagination-lg>li>a,.wfls-pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.wfls-pagination-lg>li:first-child>a,.wfls-pagination-lg>li:first-child>span{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wfls-pagination-lg>li:last-child>a,.wfls-pagination-lg>li:last-child>span{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wfls-pagination-sm>li>a,.wfls-pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.wfls-pagination-sm>li:first-child>a,.wfls-pagination-sm>li:first-child>span{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.wfls-pagination-sm>li:last-child>a,.wfls-pagination-sm>li:last-child>span{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}#wfls-notices{margin-top:15px}#wfls-notices .wfls-admin-notice{margin-left:0px;margin-right:0px}.wfls-success-text,.wfls-notice-text{display:inline-block;vertical-align:middle;line-height:1.3;font-size:16px;font-weight:bold;font-style:italic}.wfls-notice{margin:12px 0;padding:8px;background-color:#ffffe0;border:1px solid #ffd975;border-width:1px 1px 1px 10px}.wfls-notice-text{color:#6d798c}.wfls-success{margin:12px 0;padding:8px;background-color:#ffffff;border:1px solid #16bc9b;border-width:1px 1px 1px 10px}.wfls-success-text{color:#11967a}.wfls-premium-callout{border:1px solid #dfdfdf;background-color:#ffffff;padding:16px;margin:20px 0 0;text-align:center}.wfls-premium-callout ul{margin:8px 0;padding:0 0 0 15px}.wfls-premium-callout ul li{list-style-type:disc;margin:0;padding:0}.wfls-premium-callout .center{text-align:center;margin:0}.wfls-premium-callout .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}small.wfls-sub-status{display:block}.wfls-grace-period-container{display:flex;align-items:center;justify-content:left;margin-bottom:1rem;margin-top:1rem}.wfls-grace-period-container .wfls-grace-period-input-container{margin-right:1.5rem;text-align:center}.wfls-grace-period-container .wfls-grace-period-input-container label{display:block;font-weight:bold}.wfls-grace-period-container .wfls-grace-period-input-container input{width:3em;text-align:center}#wfls-reset-grace-period-failed{text-align:center}#toplevel_page_WFLS .wp-menu-image img{max-width:16px;max-height:16px} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/admin.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/admin.1704213472.css deleted file mode 100644 index 043555a9..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/admin.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.wfls-clearfix:before,.wfls-clearfix:after{content:" ";display:table}.wfls-clearfix:after{clear:both}.wfls-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.4rem 1rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width: 768px){.wfls-btn{padding:.5rem 1.25rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px}}.wfls-btn:focus,.wfls-btn.wfls-focus,.wfls-btn:active:focus,.wfls-btn:active.wfls-focus,.wfls-btn.wfls-active:focus,.wfls-btn.wfls-active.wfls-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wfls-btn:hover,.wfls-btn:focus,.wfls-btn.wfls-focus{color:#00709e;text-decoration:none !important}.wfls-btn:active,.wfls-btn.wfls-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wfls-btn.wfls-disabled,.wfls-btn[disabled],.wfls-btn[readonly],fieldset[disabled] .wfls-btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none}a.wfls-btn{text-decoration:none}a.wfls-btn.wfls-disabled,fieldset[disabled] a.wfls-btn{cursor:not-allowed;pointer-events:none}.wfls-btn-default{color:#00709e;background-color:#fff;border-color:#00709e}.wfls-btn-default:focus,.wfls-btn-default.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}.wfls-btn-default:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wfls-btn-default:active,.wfls-btn-default.active,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wfls-btn-default:active:hover,.wfls-btn-default:active:focus,.wfls-btn-default:active.focus,.wfls-btn-default.active:hover,.wfls-btn-default.active:focus,.wfls-btn-default.active.focus,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}.wfls-btn-default:active,.wfls-btn-default.wfls-active,.wfls-open>.wfls-btn-default.wfls-dropdown-toggle{background-image:none}.wfls-btn-default.wfls-disabled,.wfls-btn-default[disabled],.wfls-btn-default[readonly],fieldset[disabled] .wfls-btn-default{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed;opacity:0.75}.wfls-btn-default.wfls-disabled:hover,.wfls-btn-default.wfls-disabled:focus,.wfls-btn-default.wfls-disabled.wfls-focus,.wfls-btn-default[disabled]:hover,.wfls-btn-default[disabled]:focus,.wfls-btn-default[disabled].wfls-focus,.wfls-btn-default[readonly]:hover,.wfls-btn-default[readonly]:focus,.wfls-btn-default[readonly].wfls-focus,fieldset[disabled] .wfls-btn-default:hover,fieldset[disabled] .wfls-btn-default:focus,fieldset[disabled] .wfls-btn-default.wfls-focus{background-color:#fff;border-color:#00709e}.wfls-btn-default .wfls-badge{color:#fff;background-color:#00709e}.wfls-btn-primary{color:#fff;background-color:#00709e;border-color:#005e85}.wfls-btn-primary:focus,.wfls-btn-primary.focus{color:#fff;background-color:#004c6b;border-color:#000405}.wfls-btn-primary:hover{color:#fff;background-color:#004c6b;border-color:#003347}.wfls-btn-primary:active,.wfls-btn-primary.active,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}.wfls-btn-primary:active:hover,.wfls-btn-primary:active:focus,.wfls-btn-primary:active.focus,.wfls-btn-primary.active:hover,.wfls-btn-primary.active:focus,.wfls-btn-primary.active.focus,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}.wfls-btn-primary:active,.wfls-btn-primary.wfls-active,.wfls-open>.wfls-btn-primary.wfls-dropdown-toggle{background-image:none}.wfls-btn-primary.wfls-disabled,.wfls-btn-primary[disabled],.wfls-btn-primary[readonly],fieldset[disabled] .wfls-btn-primary{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed;opacity:0.75}.wfls-btn-primary.wfls-disabled:hover,.wfls-btn-primary.wfls-disabled:focus,.wfls-btn-primary.wfls-disabled.wfls-focus,.wfls-btn-primary[disabled]:hover,.wfls-btn-primary[disabled]:focus,.wfls-btn-primary[disabled].wfls-focus,.wfls-btn-primary[readonly]:hover,.wfls-btn-primary[readonly]:focus,.wfls-btn-primary[readonly].wfls-focus,fieldset[disabled] .wfls-btn-primary:hover,fieldset[disabled] .wfls-btn-primary:focus,fieldset[disabled] .wfls-btn-primary.wfls-focus{background-color:#00709e;border-color:#005e85}.wfls-btn-primary .wfls-badge{color:#00709e;background-color:#fff}.wfls-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.wfls-btn-success:focus,.wfls-btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.wfls-btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.wfls-btn-success:active,.wfls-btn-success.active,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.wfls-btn-success:active:hover,.wfls-btn-success:active:focus,.wfls-btn-success:active.focus,.wfls-btn-success.active:hover,.wfls-btn-success.active:focus,.wfls-btn-success.active.focus,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle.focus{color:#fff;background-color:#398439;border-color:#255625}.wfls-btn-success:active,.wfls-btn-success.wfls-active,.wfls-open>.wfls-btn-success.wfls-dropdown-toggle{background-image:none}.wfls-btn-success.wfls-disabled,.wfls-btn-success[disabled],.wfls-btn-success[readonly],fieldset[disabled] .wfls-btn-success{color:#fff;background-color:#95d195;border-color:#8bca8b;cursor:not-allowed;opacity:0.75}.wfls-btn-success.wfls-disabled:hover,.wfls-btn-success.wfls-disabled:focus,.wfls-btn-success.wfls-disabled.wfls-focus,.wfls-btn-success[disabled]:hover,.wfls-btn-success[disabled]:focus,.wfls-btn-success[disabled].wfls-focus,.wfls-btn-success[readonly]:hover,.wfls-btn-success[readonly]:focus,.wfls-btn-success[readonly].wfls-focus,fieldset[disabled] .wfls-btn-success:hover,fieldset[disabled] .wfls-btn-success:focus,fieldset[disabled] .wfls-btn-success.wfls-focus{background-color:#5cb85c;border-color:#4cae4c}.wfls-btn-success .wfls-badge{color:#5cb85c;background-color:#fff}.wfls-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.wfls-btn-info:focus,.wfls-btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.wfls-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.wfls-btn-info:active,.wfls-btn-info.active,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.wfls-btn-info:active:hover,.wfls-btn-info:active:focus,.wfls-btn-info:active.focus,.wfls-btn-info.active:hover,.wfls-btn-info.active:focus,.wfls-btn-info.active.focus,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.wfls-btn-info:active,.wfls-btn-info.wfls-active,.wfls-open>.wfls-btn-info.wfls-dropdown-toggle{background-image:none}.wfls-btn-info.wfls-disabled,.wfls-btn-info[disabled],.wfls-btn-info[readonly],fieldset[disabled] .wfls-btn-info{color:#fff;background-color:#94d6ea;border-color:#87d1e7;cursor:not-allowed;opacity:0.75}.wfls-btn-info.wfls-disabled:hover,.wfls-btn-info.wfls-disabled:focus,.wfls-btn-info.wfls-disabled.wfls-focus,.wfls-btn-info[disabled]:hover,.wfls-btn-info[disabled]:focus,.wfls-btn-info[disabled].wfls-focus,.wfls-btn-info[readonly]:hover,.wfls-btn-info[readonly]:focus,.wfls-btn-info[readonly].wfls-focus,fieldset[disabled] .wfls-btn-info:hover,fieldset[disabled] .wfls-btn-info:focus,fieldset[disabled] .wfls-btn-info.wfls-focus{background-color:#5bc0de;border-color:#46b8da}.wfls-btn-info .wfls-badge{color:#5bc0de;background-color:#fff}.wfls-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.wfls-btn-warning:focus,.wfls-btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.wfls-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.wfls-btn-warning:active,.wfls-btn-warning.active,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.wfls-btn-warning:active:hover,.wfls-btn-warning:active:focus,.wfls-btn-warning:active.focus,.wfls-btn-warning.active:hover,.wfls-btn-warning.active:focus,.wfls-btn-warning.active.focus,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.wfls-btn-warning:active,.wfls-btn-warning.wfls-active,.wfls-open>.wfls-btn-warning.wfls-dropdown-toggle{background-image:none}.wfls-btn-warning.wfls-disabled,.wfls-btn-warning[disabled],.wfls-btn-warning[readonly],fieldset[disabled] .wfls-btn-warning{color:#fff;background-color:#f5ca8c;border-color:#f4c37c;cursor:not-allowed;opacity:0.75}.wfls-btn-warning.wfls-disabled:hover,.wfls-btn-warning.wfls-disabled:focus,.wfls-btn-warning.wfls-disabled.wfls-focus,.wfls-btn-warning[disabled]:hover,.wfls-btn-warning[disabled]:focus,.wfls-btn-warning[disabled].wfls-focus,.wfls-btn-warning[readonly]:hover,.wfls-btn-warning[readonly]:focus,.wfls-btn-warning[readonly].wfls-focus,fieldset[disabled] .wfls-btn-warning:hover,fieldset[disabled] .wfls-btn-warning:focus,fieldset[disabled] .wfls-btn-warning.wfls-focus{background-color:#f0ad4e;border-color:#eea236}.wfls-btn-warning .wfls-badge{color:#f0ad4e;background-color:#fff}.wfls-btn-danger{color:#fff;background-color:#930000;border-color:#7a0000}.wfls-btn-danger:focus,.wfls-btn-danger.focus{color:#fff;background-color:#600000;border-color:#000}.wfls-btn-danger:hover{color:#fff;background-color:#600000;border-color:#3c0000}.wfls-btn-danger:active,.wfls-btn-danger.active,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle{color:#fff;background-color:#600000;border-color:#3c0000}.wfls-btn-danger:active:hover,.wfls-btn-danger:active:focus,.wfls-btn-danger:active.focus,.wfls-btn-danger.active:hover,.wfls-btn-danger.active:focus,.wfls-btn-danger.active.focus,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle:hover,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle:focus,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle.focus{color:#fff;background-color:#3c0000;border-color:#000}.wfls-btn-danger:active,.wfls-btn-danger.wfls-active,.wfls-open>.wfls-btn-danger.wfls-dropdown-toggle{background-image:none}.wfls-btn-danger.wfls-disabled,.wfls-btn-danger[disabled],.wfls-btn-danger[readonly],fieldset[disabled] .wfls-btn-danger{color:#fff;background-color:#b95959;border-color:#a95959;cursor:not-allowed;opacity:0.75}.wfls-btn-danger.wfls-disabled:hover,.wfls-btn-danger.wfls-disabled:focus,.wfls-btn-danger.wfls-disabled.wfls-focus,.wfls-btn-danger[disabled]:hover,.wfls-btn-danger[disabled]:focus,.wfls-btn-danger[disabled].wfls-focus,.wfls-btn-danger[readonly]:hover,.wfls-btn-danger[readonly]:focus,.wfls-btn-danger[readonly].wfls-focus,fieldset[disabled] .wfls-btn-danger:hover,fieldset[disabled] .wfls-btn-danger:focus,fieldset[disabled] .wfls-btn-danger.wfls-focus{background-color:#930000;border-color:#7a0000}.wfls-btn-danger .wfls-badge{color:#930000;background-color:#fff}.wfls-btn-callout{font-weight:600;text-transform:uppercase}.wfls-btn-callout-subtle{font-weight:400;text-transform:uppercase}.wfls-btn-link{color:#00709e;font-weight:normal;border-radius:0}.wfls-btn-link,.wfls-btn-link:active,.wfls-btn-link.wfls-active,.wfls-btn-link[disabled],fieldset[disabled] .wfls-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wfls-btn-link,.wfls-btn-link:hover,.wfls-btn-link:focus,.wfls-btn-link:active{border-color:transparent}.wfls-btn-link:hover,.wfls-btn-link:focus{color:#003a52;text-decoration:underline;background-color:transparent}.wfls-btn-link[disabled]:hover,.wfls-btn-link[disabled]:focus,fieldset[disabled] .wfls-btn-link:hover,fieldset[disabled] .wfls-btn-link:focus{color:#777;text-decoration:none}.wfls-btn-lg,.wfls-btn-group-lg>.wfls-btn{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wfls-btn-sm,.wfls-btn-group-sm>.wfls-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wfls-btn-xs,.wfls-btn-group-xs>.wfls-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.wfls-btn-block{display:block;width:100%}.wfls-btn-block+.wfls-btn-block{margin-top:5px}input[type="submit"].wfls-btn-block,input[type="reset"].wfls-btn-block,input[type="button"].wfls-btn-block{width:100%}.wfls-btn-group,.wfls-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wfls-btn-group>.wfls-btn,.wfls-btn-group-vertical>.wfls-btn{position:relative;float:left}.wfls-btn-group>.wfls-btn:hover,.wfls-btn-group>.wfls-btn:focus,.wfls-btn-group>.wfls-btn:active,.wfls-btn-group>.wfls-btn.wfls-active,.wfls-btn-group-vertical>.wfls-btn:hover,.wfls-btn-group-vertical>.wfls-btn:focus,.wfls-btn-group-vertical>.wfls-btn:active,.wfls-btn-group-vertical>.wfls-btn.wfls-active{z-index:2}.wfls-btn-group .wfls-btn+.wfls-btn,.wfls-btn-group .wfls-btn+.wfls-btn-group,.wfls-btn-group .wfls-btn-group+.wfls-btn,.wfls-btn-group .wfls-btn-group+.wfls-btn-group{margin-left:-1px}.wfls-btn-toolbar{margin-left:-5px}.wfls-btn-toolbar:before,.wfls-btn-toolbar:after{content:" ";display:table}.wfls-btn-toolbar:after{clear:both}.wfls-btn-toolbar .wfls-btn,.wfls-btn-toolbar .wfls-btn-group,.wfls-btn-toolbar .wfls-input-group{float:left}.wfls-btn-toolbar>.wfls-btn,.wfls-btn-toolbar>.wfls-btn-group,.wfls-btn-toolbar>.wfls-input-group{margin-left:5px}.wfls-btn-group>.wfls-btn:not(:first-child):not(:last-child):not(.wfls-dropdown-toggle){border-radius:0}.wfls-btn-group>.wfls-btn:first-child{margin-left:0}.wfls-btn-group>.wfls-btn:first-child:not(:last-child):not(.wfls-dropdown-toggle){-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group>.wfls-btn:last-child:not(:first-child),.wfls-btn-group>.wfls-dropdown-toggle:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wfls-btn-group>.wfls-btn-group{float:left}.wfls-btn-group>.wfls-btn-group:not(:first-child):not(:last-child)>.wfls-btn{border-radius:0}.wfls-btn-group>.wfls-btn-group:first-child:not(:last-child)>.wfls-btn:last-child,.wfls-btn-group>.wfls-btn-group:first-child:not(:last-child)>.wfls-dropdown-toggle{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group>.wfls-btn-group:last-child:not(:first-child)>.wfls-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wfls-btn-group .wfls-dropdown-toggle:active,.wfls-btn-group.wfls-open .wfls-dropdown-toggle{outline:0}.wfls-btn-group>.wfls-btn+.wfls-dropdown-toggle{padding-left:8px;padding-right:8px}.wfls-btn-group>.wfls-btn-lg+.wfls-dropdown-toggle,.wfls-btn-group-lg.wfls-btn-group>.wfls-btn+.wfls-dropdown-toggle{padding-left:12px;padding-right:12px}.wfls-btn-group.open .wfls-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wfls-btn-group.open .wfls-dropdown-toggle.wfls-btn-link{-webkit-box-shadow:none;box-shadow:none}.wfls-btn .wfls-caret{margin-left:0}.wfls-btn-lg .wfls-caret,.wfls-btn-group-lg>.wfls-btn .wfls-caret{border-width:5px 5px 0;border-bottom-width:0}.wfls-dropup .wfls-btn-lg .wfls-caret,.wfls-dropup .wfls-btn-group-lg>.wfls-btn .wfls-caret{border-width:0 5px 5px}.wfls-btn-group-vertical>.wfls-btn,.wfls-btn-group-vertical>.wfls-btn-group,.wfls-btn-group-vertical>.wfls-btn-group>.wfls-btn{display:block;float:none;width:100%;max-width:100%}.wfls-btn-group-vertical>.wfls-btn-group:before,.wfls-btn-group-vertical>.wfls-btn-group:after{content:" ";display:table}.wfls-btn-group-vertical>.wfls-btn-group:after{clear:both}.wfls-btn-group-vertical>.wfls-btn-group>.wfls-btn{float:none}.wfls-btn-group-vertical>.wfls-btn+.wfls-btn,.wfls-btn-group-vertical>.wfls-btn+.wfls-btn-group,.wfls-btn-group-vertical>.wfls-btn-group+.wfls-btn,.wfls-btn-group-vertical>.wfls-btn-group+.wfls-btn-group{margin-top:-1px;margin-left:0}.wfls-btn-group-vertical>.wfls-btn:not(:first-child):not(:last-child){border-radius:0}.wfls-btn-group-vertical>.wfls-btn:first-child:not(:last-child){-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group-vertical>.wfls-btn:last-child:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wfls-btn-group-vertical>.wfls-btn-group:not(:first-child):not(:last-child)>.wfls-btn{border-radius:0}.wfls-btn-group-vertical>.wfls-btn-group:first-child:not(:last-child)>.wfls-btn:last-child,.wfls-btn-group-vertical>.wfls-btn-group:first-child:not(:last-child)>.wfls-dropdown-toggle{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wfls-btn-group-vertical>.wfls-btn-group:last-child:not(:first-child)>.wfls-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wfls-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wfls-btn-group-justified>.wfls-btn,.wfls-btn-group-justified>.wfls-btn-group{float:none;display:table-cell;width:1%}.wfls-btn-group-justified>.wfls-btn-group .wfls-btn{width:100%}.wfls-btn-group-justified>.wfls-btn-group .wfls-dropdown-menu{left:auto}[data-toggle="buttons"]>.wfls-btn input[type="radio"],[data-toggle="buttons"]>.wfls-btn input[type="checkbox"],[data-toggle="buttons"]>.wfls-btn-group>.wfls-btn input[type="radio"],[data-toggle="buttons"]>.wfls-btn-group>.wfls-btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wfls-pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.wfls-pagination>li{display:inline}.wfls-pagination>li>a,.wfls-pagination>li>span{position:relative;float:left;padding:.5rem 1.25rem;line-height:1.42857;text-decoration:none;color:#00709e;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.wfls-pagination>li:first-child>a,.wfls-pagination>li:first-child>span{margin-left:0;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.wfls-pagination>li:last-child>a,.wfls-pagination>li:last-child>span{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wfls-pagination>li>a:hover,.wfls-pagination>li>a:focus,.wfls-pagination>li>span:hover,.wfls-pagination>li>span:focus{z-index:2;color:#003a52;background-color:#e2e2e2;border-color:#ddd}.wfls-pagination>.wfls-active>a,.wfls-pagination>.wfls-active>a:hover,.wfls-pagination>.wfls-active>a:focus,.wfls-pagination>.wfls-active>span,.wfls-pagination>.wfls-active>span:hover,.wfls-pagination>.wfls-active>span:focus{z-index:3;color:#fff;background-color:#00709e;border-color:#00709e;cursor:default}.wfls-pagination>.wfls-disabled>span,.wfls-pagination>.wfls-disabled>span:hover,.wfls-pagination>.wfls-disabled>span:focus,.wfls-pagination>.wfls-disabled>a,.wfls-pagination>.wfls-disabled>a:hover,.wfls-pagination>.wfls-disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.wfls-pagination-lg>li>a,.wfls-pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.wfls-pagination-lg>li:first-child>a,.wfls-pagination-lg>li:first-child>span{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wfls-pagination-lg>li:last-child>a,.wfls-pagination-lg>li:last-child>span{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wfls-pagination-sm>li>a,.wfls-pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.wfls-pagination-sm>li:first-child>a,.wfls-pagination-sm>li:first-child>span{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.wfls-pagination-sm>li:last-child>a,.wfls-pagination-sm>li:last-child>span{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}@-ms-viewport{width:device-width}.wfls-visible-xs{display:none !important}.wfls-visible-sm{display:none !important}.wfls-visible-md{display:none !important}.wfls-visible-lg{display:none !important}.wfls-visible-xs-block,.wfls-visible-xs-inline,.wfls-visible-xs-inline-block,.wfls-visible-sm-block,.wfls-visible-sm-inline,.wfls-visible-sm-inline-block,.wfls-visible-md-block,.wfls-visible-md-inline,.wfls-visible-md-inline-block,.wfls-visible-lg-block,.wfls-visible-lg-inline,.wfls-visible-lg-inline-block{display:none !important}@media (max-width: 767px){.wfls-visible-xs{display:block !important}table.wfls-visible-xs{display:table !important}tr.wfls-visible-xs{display:table-row !important}th.wfls-visible-xs,td.wfls-visible-xs{display:table-cell !important}}@media (max-width: 767px){.wfls-visible-xs-block{display:block !important}}@media (max-width: 767px){.wfls-visible-xs-inline{display:inline !important}}@media (max-width: 767px){.wfls-visible-xs-inline-block{display:inline-block !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-visible-sm{display:block !important}table.wfls-visible-sm{display:table !important}tr.wfls-visible-sm{display:table-row !important}th.wfls-visible-sm,td.wfls-visible-sm{display:table-cell !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-visible-sm-block{display:block !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-visible-sm-inline{display:inline !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-visible-sm-inline-block{display:inline-block !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-visible-md{display:block !important}table.wfls-visible-md{display:table !important}tr.wfls-visible-md{display:table-row !important}th.wfls-visible-md,td.wfls-visible-md{display:table-cell !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-visible-md-block{display:block !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-visible-md-inline{display:inline !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-visible-md-inline-block{display:inline-block !important}}@media (min-width: 1200px){.wfls-visible-lg{display:block !important}table.wfls-visible-lg{display:table !important}tr.wfls-visible-lg{display:table-row !important}th.wfls-visible-lg,td.wfls-visible-lg{display:table-cell !important}}@media (min-width: 1200px){.wfls-visible-lg-block{display:block !important}}@media (min-width: 1200px){.wfls-visible-lg-inline{display:inline !important}}@media (min-width: 1200px){.wfls-visible-lg-inline-block{display:inline-block !important}}@media (max-width: 767px){.wfls-hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-hidden-md{display:none !important}}@media (min-width: 1200px){.wfls-hidden-lg{display:none !important}}.wfls-visible-print{display:none !important}@media print{.wfls-visible-print{display:block !important}table.wfls-visible-print{display:table !important}tr.wfls-visible-print{display:table-row !important}th.wfls-visible-print,td.wfls-visible-print{display:table-cell !important}}.wfls-visible-print-block{display:none !important}@media print{.wfls-visible-print-block{display:block !important}}.wfls-visible-print-inline{display:none !important}@media print{.wfls-visible-print-inline{display:inline !important}}.wfls-visible-print-inline-block{display:none !important}@media print{.wfls-visible-print-inline-block{display:inline-block !important}}@media print{.wfls-hidden-print{display:none !important}}.wfls-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wfls-container:before,.wfls-container:after{content:" ";display:table}.wfls-container:after{clear:both}@media (min-width: 768px){.wfls-container{width:750px}}@media (min-width: 992px){.wfls-container{width:970px}}@media (min-width: 1200px){.wfls-container{width:1170px}}.wfls-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wfls-container-fluid:before,.wfls-container-fluid:after{content:" ";display:table}.wfls-container-fluid:after{clear:both}.wfls-row{margin-left:-15px;margin-right:-15px}.wfls-row:before,.wfls-row:after{content:" ";display:table}.wfls-row:after{clear:both}.wfls-col-xs-1,.wfls-col-sm-1,.wfls-col-md-1,.wfls-col-lg-1,.wfls-col-xs-2,.wfls-col-sm-2,.wfls-col-md-2,.wfls-col-lg-2,.wfls-col-xs-3,.wfls-col-sm-3,.wfls-col-md-3,.wfls-col-lg-3,.wfls-col-xs-4,.wfls-col-sm-4,.wfls-col-md-4,.wfls-col-lg-4,.wfls-col-xs-5,.wfls-col-sm-5,.wfls-col-md-5,.wfls-col-lg-5,.wfls-col-xs-6,.wfls-col-sm-6,.wfls-col-md-6,.wfls-col-lg-6,.wfls-col-xs-7,.wfls-col-sm-7,.wfls-col-md-7,.wfls-col-lg-7,.wfls-col-xs-8,.wfls-col-sm-8,.wfls-col-md-8,.wfls-col-lg-8,.wfls-col-xs-9,.wfls-col-sm-9,.wfls-col-md-9,.wfls-col-lg-9,.wfls-col-xs-10,.wfls-col-sm-10,.wfls-col-md-10,.wfls-col-lg-10,.wfls-col-xs-11,.wfls-col-sm-11,.wfls-col-md-11,.wfls-col-lg-11,.wfls-col-xs-12,.wfls-col-sm-12,.wfls-col-md-12,.wfls-col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px;box-sizing:border-box}.wfls-col-xs-1,.wfls-col-xs-2,.wfls-col-xs-3,.wfls-col-xs-4,.wfls-col-xs-5,.wfls-col-xs-6,.wfls-col-xs-7,.wfls-col-xs-8,.wfls-col-xs-9,.wfls-col-xs-10,.wfls-col-xs-11,.wfls-col-xs-12{float:left}.wfls-col-xs-1{width:8.33333%}.wfls-col-xs-2{width:16.66667%}.wfls-col-xs-3{width:25%}.wfls-col-xs-4{width:33.33333%}.wfls-col-xs-5{width:41.66667%}.wfls-col-xs-6{width:50%}.wfls-col-xs-7{width:58.33333%}.wfls-col-xs-8{width:66.66667%}.wfls-col-xs-9{width:75%}.wfls-col-xs-10{width:83.33333%}.wfls-col-xs-11{width:91.66667%}.wfls-col-xs-12{width:100%}.wfls-col-xs-pull-0{right:auto}.wfls-col-xs-pull-1{right:8.33333%}.wfls-col-xs-pull-2{right:16.66667%}.wfls-col-xs-pull-3{right:25%}.wfls-col-xs-pull-4{right:33.33333%}.wfls-col-xs-pull-5{right:41.66667%}.wfls-col-xs-pull-6{right:50%}.wfls-col-xs-pull-7{right:58.33333%}.wfls-col-xs-pull-8{right:66.66667%}.wfls-col-xs-pull-9{right:75%}.wfls-col-xs-pull-10{right:83.33333%}.wfls-col-xs-pull-11{right:91.66667%}.wfls-col-xs-pull-12{right:100%}.wfls-col-xs-push-0{left:auto}.wfls-col-xs-push-1{left:8.33333%}.wfls-col-xs-push-2{left:16.66667%}.wfls-col-xs-push-3{left:25%}.wfls-col-xs-push-4{left:33.33333%}.wfls-col-xs-push-5{left:41.66667%}.wfls-col-xs-push-6{left:50%}.wfls-col-xs-push-7{left:58.33333%}.wfls-col-xs-push-8{left:66.66667%}.wfls-col-xs-push-9{left:75%}.wfls-col-xs-push-10{left:83.33333%}.wfls-col-xs-push-11{left:91.66667%}.wfls-col-xs-push-12{left:100%}.wfls-col-xs-offset-0{margin-left:0%}.wfls-col-xs-offset-1{margin-left:8.33333%}.wfls-col-xs-offset-2{margin-left:16.66667%}.wfls-col-xs-offset-3{margin-left:25%}.wfls-col-xs-offset-4{margin-left:33.33333%}.wfls-col-xs-offset-5{margin-left:41.66667%}.wfls-col-xs-offset-6{margin-left:50%}.wfls-col-xs-offset-7{margin-left:58.33333%}.wfls-col-xs-offset-8{margin-left:66.66667%}.wfls-col-xs-offset-9{margin-left:75%}.wfls-col-xs-offset-10{margin-left:83.33333%}.wfls-col-xs-offset-11{margin-left:91.66667%}.wfls-col-xs-offset-12{margin-left:100%}.wfls-col-xs-half-padding-left{padding-left:8px}.wfls-col-xs-half-padding-right{padding-right:7px}@media (min-width: 768px){.wfls-col-sm-1,.wfls-col-sm-2,.wfls-col-sm-3,.wfls-col-sm-4,.wfls-col-sm-5,.wfls-col-sm-6,.wfls-col-sm-7,.wfls-col-sm-8,.wfls-col-sm-9,.wfls-col-sm-10,.wfls-col-sm-11,.wfls-col-sm-12{float:left}.wfls-col-sm-1{width:8.33333%}.wfls-col-sm-2{width:16.66667%}.wfls-col-sm-3{width:25%}.wfls-col-sm-4{width:33.33333%}.wfls-col-sm-5{width:41.66667%}.wfls-col-sm-6{width:50%}.wfls-col-sm-7{width:58.33333%}.wfls-col-sm-8{width:66.66667%}.wfls-col-sm-9{width:75%}.wfls-col-sm-10{width:83.33333%}.wfls-col-sm-11{width:91.66667%}.wfls-col-sm-12{width:100%}.wfls-col-sm-pull-0{right:auto}.wfls-col-sm-pull-1{right:8.33333%}.wfls-col-sm-pull-2{right:16.66667%}.wfls-col-sm-pull-3{right:25%}.wfls-col-sm-pull-4{right:33.33333%}.wfls-col-sm-pull-5{right:41.66667%}.wfls-col-sm-pull-6{right:50%}.wfls-col-sm-pull-7{right:58.33333%}.wfls-col-sm-pull-8{right:66.66667%}.wfls-col-sm-pull-9{right:75%}.wfls-col-sm-pull-10{right:83.33333%}.wfls-col-sm-pull-11{right:91.66667%}.wfls-col-sm-pull-12{right:100%}.wfls-col-sm-push-0{left:auto}.wfls-col-sm-push-1{left:8.33333%}.wfls-col-sm-push-2{left:16.66667%}.wfls-col-sm-push-3{left:25%}.wfls-col-sm-push-4{left:33.33333%}.wfls-col-sm-push-5{left:41.66667%}.wfls-col-sm-push-6{left:50%}.wfls-col-sm-push-7{left:58.33333%}.wfls-col-sm-push-8{left:66.66667%}.wfls-col-sm-push-9{left:75%}.wfls-col-sm-push-10{left:83.33333%}.wfls-col-sm-push-11{left:91.66667%}.wfls-col-sm-push-12{left:100%}.wfls-col-sm-offset-0{margin-left:0%}.wfls-col-sm-offset-1{margin-left:8.33333%}.wfls-col-sm-offset-2{margin-left:16.66667%}.wfls-col-sm-offset-3{margin-left:25%}.wfls-col-sm-offset-4{margin-left:33.33333%}.wfls-col-sm-offset-5{margin-left:41.66667%}.wfls-col-sm-offset-6{margin-left:50%}.wfls-col-sm-offset-7{margin-left:58.33333%}.wfls-col-sm-offset-8{margin-left:66.66667%}.wfls-col-sm-offset-9{margin-left:75%}.wfls-col-sm-offset-10{margin-left:83.33333%}.wfls-col-sm-offset-11{margin-left:91.66667%}.wfls-col-sm-offset-12{margin-left:100%}.wfls-col-sm-half-padding-left{padding-left:8px}.wfls-col-sm-half-padding-right{padding-right:7px}}@media (min-width: 992px){.wfls-col-md-1,.wfls-col-md-2,.wfls-col-md-3,.wfls-col-md-4,.wfls-col-md-5,.wfls-col-md-6,.wfls-col-md-7,.wfls-col-md-8,.wfls-col-md-9,.wfls-col-md-10,.wfls-col-md-11,.wfls-col-md-12{float:left}.wfls-col-md-1{width:8.33333%}.wfls-col-md-2{width:16.66667%}.wfls-col-md-3{width:25%}.wfls-col-md-4{width:33.33333%}.wfls-col-md-5{width:41.66667%}.wfls-col-md-6{width:50%}.wfls-col-md-7{width:58.33333%}.wfls-col-md-8{width:66.66667%}.wfls-col-md-9{width:75%}.wfls-col-md-10{width:83.33333%}.wfls-col-md-11{width:91.66667%}.wfls-col-md-12{width:100%}.wfls-col-md-pull-0{right:auto}.wfls-col-md-pull-1{right:8.33333%}.wfls-col-md-pull-2{right:16.66667%}.wfls-col-md-pull-3{right:25%}.wfls-col-md-pull-4{right:33.33333%}.wfls-col-md-pull-5{right:41.66667%}.wfls-col-md-pull-6{right:50%}.wfls-col-md-pull-7{right:58.33333%}.wfls-col-md-pull-8{right:66.66667%}.wfls-col-md-pull-9{right:75%}.wfls-col-md-pull-10{right:83.33333%}.wfls-col-md-pull-11{right:91.66667%}.wfls-col-md-pull-12{right:100%}.wfls-col-md-push-0{left:auto}.wfls-col-md-push-1{left:8.33333%}.wfls-col-md-push-2{left:16.66667%}.wfls-col-md-push-3{left:25%}.wfls-col-md-push-4{left:33.33333%}.wfls-col-md-push-5{left:41.66667%}.wfls-col-md-push-6{left:50%}.wfls-col-md-push-7{left:58.33333%}.wfls-col-md-push-8{left:66.66667%}.wfls-col-md-push-9{left:75%}.wfls-col-md-push-10{left:83.33333%}.wfls-col-md-push-11{left:91.66667%}.wfls-col-md-push-12{left:100%}.wfls-col-md-offset-0{margin-left:0%}.wfls-col-md-offset-1{margin-left:8.33333%}.wfls-col-md-offset-2{margin-left:16.66667%}.wfls-col-md-offset-3{margin-left:25%}.wfls-col-md-offset-4{margin-left:33.33333%}.wfls-col-md-offset-5{margin-left:41.66667%}.wfls-col-md-offset-6{margin-left:50%}.wfls-col-md-offset-7{margin-left:58.33333%}.wfls-col-md-offset-8{margin-left:66.66667%}.wfls-col-md-offset-9{margin-left:75%}.wfls-col-md-offset-10{margin-left:83.33333%}.wfls-col-md-offset-11{margin-left:91.66667%}.wfls-col-md-offset-12{margin-left:100%}.wfls-col-md-half-padding-left{padding-left:8px}.wfls-col-md-half-padding-right{padding-right:7px}}@media (min-width: 1200px){.wfls-col-lg-1,.wfls-col-lg-2,.wfls-col-lg-3,.wfls-col-lg-4,.wfls-col-lg-5,.wfls-col-lg-6,.wfls-col-lg-7,.wfls-col-lg-8,.wfls-col-lg-9,.wfls-col-lg-10,.wfls-col-lg-11,.wfls-col-lg-12{float:left}.wfls-col-lg-1{width:8.33333%}.wfls-col-lg-2{width:16.66667%}.wfls-col-lg-3{width:25%}.wfls-col-lg-4{width:33.33333%}.wfls-col-lg-5{width:41.66667%}.wfls-col-lg-6{width:50%}.wfls-col-lg-7{width:58.33333%}.wfls-col-lg-8{width:66.66667%}.wfls-col-lg-9{width:75%}.wfls-col-lg-10{width:83.33333%}.wfls-col-lg-11{width:91.66667%}.wfls-col-lg-12{width:100%}.wfls-col-lg-pull-0{right:auto}.wfls-col-lg-pull-1{right:8.33333%}.wfls-col-lg-pull-2{right:16.66667%}.wfls-col-lg-pull-3{right:25%}.wfls-col-lg-pull-4{right:33.33333%}.wfls-col-lg-pull-5{right:41.66667%}.wfls-col-lg-pull-6{right:50%}.wfls-col-lg-pull-7{right:58.33333%}.wfls-col-lg-pull-8{right:66.66667%}.wfls-col-lg-pull-9{right:75%}.wfls-col-lg-pull-10{right:83.33333%}.wfls-col-lg-pull-11{right:91.66667%}.wfls-col-lg-pull-12{right:100%}.wfls-col-lg-push-0{left:auto}.wfls-col-lg-push-1{left:8.33333%}.wfls-col-lg-push-2{left:16.66667%}.wfls-col-lg-push-3{left:25%}.wfls-col-lg-push-4{left:33.33333%}.wfls-col-lg-push-5{left:41.66667%}.wfls-col-lg-push-6{left:50%}.wfls-col-lg-push-7{left:58.33333%}.wfls-col-lg-push-8{left:66.66667%}.wfls-col-lg-push-9{left:75%}.wfls-col-lg-push-10{left:83.33333%}.wfls-col-lg-push-11{left:91.66667%}.wfls-col-lg-push-12{left:100%}.wfls-col-lg-offset-0{margin-left:0%}.wfls-col-lg-offset-1{margin-left:8.33333%}.wfls-col-lg-offset-2{margin-left:16.66667%}.wfls-col-lg-offset-3{margin-left:25%}.wfls-col-lg-offset-4{margin-left:33.33333%}.wfls-col-lg-offset-5{margin-left:41.66667%}.wfls-col-lg-offset-6{margin-left:50%}.wfls-col-lg-offset-7{margin-left:58.33333%}.wfls-col-lg-offset-8{margin-left:66.66667%}.wfls-col-lg-offset-9{margin-left:75%}.wfls-col-lg-offset-10{margin-left:83.33333%}.wfls-col-lg-offset-11{margin-left:91.66667%}.wfls-col-lg-offset-12{margin-left:100%}.wfls-col-lg-half-padding-left{padding-left:8px}.wfls-col-lg-half-padding-right{padding-right:7px}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}label.wfls-plain{font-weight:normal}label.wfls-control-label.wfls-disabled{pointer-events:none}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:1.5rem;font-size:14px;line-height:1.42857;color:#555}.wfls-form-control{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#555;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wfls-form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.wfls-form-control::-moz-placeholder{color:#bfbfbf;opacity:1}.wfls-form-control:-ms-input-placeholder{color:#bfbfbf}.wfls-form-control::-webkit-input-placeholder{color:#bfbfbf}.wfls-form-control::-ms-expand{border:0;background-color:transparent}.wfls-form-control[disabled],.wfls-form-control[readonly],fieldset[disabled] .wfls-form-control{background-color:#e2e2e2;opacity:1}.wfls-form-control[disabled],.wfls-form-control[readonly],fieldset[disabled] .wfls-form-control{cursor:not-allowed;pointer-events:none}textarea.wfls-form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio: 0){input[type="date"].wfls-form-control,input[type="time"].wfls-form-control,input[type="datetime-local"].wfls-form-control,input[type="month"].wfls-form-control{line-height:38px}input[type="date"].wfls-input-sm,.wfls-input-group-sm input[type="date"],input[type="time"].wfls-input-sm,.wfls-input-group-sm input[type="time"],input[type="datetime-local"].wfls-input-sm,.wfls-input-group-sm input[type="datetime-local"],input[type="month"].wfls-input-sm,.wfls-input-group-sm input[type="month"]{line-height:30px}input[type="date"].wfls-input-lg,.wfls-input-group-lg input[type="date"],input[type="time"].wfls-input-lg,.wfls-input-group-lg input[type="time"],input[type="datetime-local"].wfls-input-lg,.wfls-input-group-lg input[type="datetime-local"],input[type="month"].wfls-input-lg,.wfls-input-group-lg input[type="month"]{line-height:46px}}.wfls-form-group{margin-bottom:8px}.wfls-form-group.wfls-sub-group label{color:#666666;font-weight:normal;padding-left:20px}.wfls-form-group.wfls-focus{border-left:4px solid #11967a;padding-bottom:8px;background-color:#e5e5e5}.wfls-form-group.wfls-focus label{margin-left:-4px}.wfls-radio,.wfls-checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.wfls-radio label,.wfls-checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.wfls-radio input[type="radio"],.wfls-radio-inline input[type="radio"],.wfls-checkbox input[type="checkbox"],.wfls-checkbox-inline input[type="checkbox"]{margin-top:4px \9}.wfls-radio-offset{padding-left:29px}@media (min-width: 768px){.wfls-radio-offset{padding-left:20px}}.wfls-radio+.wfls-radio,.wfls-checkbox+.wfls-checkbox{margin-top:-5px}.wfls-radio-inline,.wfls-checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.wfls-radio-inline+.wfls-radio-inline,.wfls-checkbox-inline+.wfls-checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"][readonly],input[type="radio"].wfls-disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"][readonly],input[type="checkbox"].wfls-disabled,fieldset[disabled] input[type="checkbox"]{cursor:not-allowed;pointer-events:none}.wfls-radio-inline.wfls-disabled,fieldset[disabled] .wfls-radio-inline,.wfls-checkbox-inline.wfls-disabled,fieldset[disabled] .wfls-checkbox-inline{cursor:not-allowed}.wfls-radio.wfls-disabled label,fieldset[disabled] .wfls-radio label,.wfls-checkbox.wfls-disabled label,fieldset[disabled] .wfls-checkbox label{cursor:not-allowed;pointer-events:none}.wfls-form-control-static{padding-top:1.5rem;padding-bottom:1.5rem;margin:0;line-height:1}.wfls-form-control-static.wfls-input-lg,.wfls-form-control-static.wfls-input-sm{padding-left:0;padding-right:0}.wfls-input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.wfls-input-sm{height:30px;line-height:30px}textarea.wfls-input-sm,select[multiple].wfls-input-sm{height:auto}.wfls-form-group-sm .wfls-form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wfls-form-group-sm select.wfls-form-control{height:30px;line-height:30px}.wfls-form-group-sm textarea.wfls-form-control,.wfls-form-group-sm select[multiple].wfls-form-control{height:auto}.wfls-form-group-sm .wfls-form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.wfls-input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}select.wfls-input-lg{height:46px;line-height:46px}textarea.wfls-input-lg,select[multiple].wfls-input-lg{height:auto}.wfls-form-group-lg .wfls-form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wfls-form-group-lg select.wfls-form-control{height:46px;line-height:46px}.wfls-form-group-lg textarea.wfls-form-control,.wfls-form-group-lg select[multiple].wfls-form-control{height:auto}.wfls-form-group-lg .wfls-form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.33333}.wfls-has-feedback{position:relative}.wfls-has-feedback .wfls-form-control{padding-right:47.5px}.wfls-form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.wfls-input-lg+.wfls-form-control-feedback,.wfls-input-group-lg+.wfls-form-control-feedback,.wfls-form-group-lg .wfls-form-control+.wfls-form-control-feedback{width:46px;height:46px;line-height:46px}.wfls-input-sm+.wfls-form-control-feedback,.wfls-input-group-sm+.wfls-form-control-feedback,.wfls-form-group-sm .wfls-form-control+.wfls-form-control-feedback{width:30px;height:30px;line-height:30px}.wfls-has-success .wfls-help-block,.wfls-has-success .wfls-control-label,.wfls-has-success .wfls-radio,.wfls-has-success .wfls-checkbox,.wfls-has-success .wfls-radio-inline,.wfls-has-success .wfls-checkbox-inline,.wfls-has-success.wfls-radio label,.wfls-has-success.wfls-checkbox label,.wfls-has-success.wfls-radio-inline label,.wfls-has-success.wfls-checkbox-inline label{color:#3c763d}.wfls-has-success .wfls-form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wfls-has-success .wfls-form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.wfls-has-success .wfls-input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.wfls-has-success .wfls-form-control-feedback{color:#3c763d}.wfls-has-warning .wfls-help-block,.wfls-has-warning .wfls-control-label,.wfls-has-warning .wfls-radio,.wfls-has-warning .wfls-checkbox,.wfls-has-warning .wfls-radio-inline,.wfls-has-warning .wfls-checkbox-inline,.wfls-has-warning.wfls-radio label,.wfls-has-warning.wfls-checkbox label,.wfls-has-warning.wfls-radio-inline label,.wfls-has-warning.wfls-checkbox-inline label{color:#8a6d3b}.wfls-has-warning .wfls-form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wfls-has-warning .wfls-form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.wfls-has-warning .wfls-input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.wfls-has-warning .wfls-form-control-feedback{color:#8a6d3b}.wfls-has-error .wfls-help-block,.wfls-has-error .wfls-control-label,.wfls-has-error .wfls-radio,.wfls-has-error .wfls-checkbox,.wfls-has-error .wfls-radio-inline,.wfls-has-error .wfls-checkbox-inline,.wfls-has-error.wfls-radio label,.wfls-has-error.wfls-checkbox label,.wfls-has-error.wfls-radio-inline label,.wfls-has-error.wfls-checkbox-inline label{color:#a94442}.wfls-has-error .wfls-form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wfls-has-error .wfls-form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.wfls-has-error .wfls-input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.wfls-has-error .wfls-form-control-feedback{color:#a94442}.wfls-has-feedback label ~ .wfls-form-control-feedback{top:25px}.wfls-has-feedback label.wfls-sr-only ~ .wfls-form-control-feedback{top:0}.wfls-help-block{display:block;margin-top:5px;color:#737373}@media (min-width: 768px){.wfls-form-inline .wfls-form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.wfls-form-inline .wfls-form-control{display:inline-block;width:auto;vertical-align:middle}.wfls-form-inline .wfls-form-control-static{display:inline-block}.wfls-form-inline .wfls-input-group{display:inline-table;vertical-align:middle}.wfls-form-inline .wfls-input-group .wfls-input-group-addon,.wfls-form-inline .wfls-input-group .wfls-input-group-btn,.wfls-form-inline .wfls-input-group .wfls-form-control{width:auto}.wfls-form-inline .wfls-input-group>.wfls-form-control{width:100%}.wfls-form-inline .wfls-control-label{margin-bottom:0;vertical-align:middle}.wfls-form-inline .wfls-radio,.wfls-form-inline .wfls-checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.wfls-form-inline .wfls-radio label,.wfls-form-inline .wfls-checkbox label{padding-left:0}.wfls-form-inline .wfls-radio input[type="radio"],.wfls-form-inline .wfls-checkbox input[type="checkbox"]{position:relative;margin-left:0}.wfls-form-inline .wfls-has-feedback .wfls-form-control-feedback{top:0}}.wfls-form-horizontal .wfls-radio,.wfls-form-horizontal .wfls-checkbox,.wfls-form-horizontal .wfls-radio-inline,.wfls-form-horizontal .wfls-checkbox-inline{margin-top:0;margin-bottom:0;padding-top:1.5rem}.wfls-form-horizontal .wfls-radio,.wfls-form-horizontal .wfls-checkbox{min-height:29px}.wfls-form-horizontal .wfls-form-group{margin-left:-15px;margin-right:-15px}.wfls-form-horizontal .wfls-form-group:before,.wfls-form-horizontal .wfls-form-group:after{content:" ";display:table}.wfls-form-horizontal .wfls-form-group:after{clear:both}@media (min-width: 768px){.wfls-form-horizontal .wfls-control-label{text-align:right;margin-bottom:0;padding-top:1.5rem}}.wfls-form-horizontal .wfls-has-feedback .wfls-form-control-feedback{right:15px}@media (min-width: 768px){.wfls-form-horizontal .wfls-form-group-lg .wfls-control-label{padding-top:11px;font-size:18px}}@media (min-width: 768px){.wfls-form-horizontal .wfls-form-group-sm .wfls-control-label{padding-top:6px;font-size:12px}}@media (min-width: 768px){#input-recaptchaSiteKey,#input-recaptchaSecret{min-width:400px}}hr.wfls-half{border:0 !important;border-bottom:1px solid #e4e4e4 !important;width:50%;margin:1.25rem auto}.wrap.wordfence-ls{direction:ltr}@media (min-width: 768px){.wrap.wordfence-ls{max-width:750px}}@media (min-width: 992px){.wrap.wordfence-ls{max-width:970px}}@media (min-width: 1200px){.wrap.wordfence-ls{max-width:1170px}}.wrap.wordfence-ls>.wfls-container-fluid{padding-left:0px;padding-right:0px}.wrap.wordfence-ls .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wrap.wordfence-ls a{text-decoration:none}.wrap.wordfence-ls a:hover{text-decoration:underline}.wrap.wordfence-ls a.wfls-btn:hover{text-decoration:none}.wrap.wordfence-ls p,.wrap.wordfence-ls td,.wrap.wordfence-ls li{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wrap.wordfence-ls p strong,.wrap.wordfence-ls td strong,.wrap.wordfence-ls li strong{font-weight:600}.wrap.wordfence-ls p em,.wrap.wordfence-ls td em,.wrap.wordfence-ls li em{font-weight:normal}.wrap.wordfence-ls h1,.wrap.wordfence-ls h2,.wrap.wordfence-ls h3,.wrap.wordfence-ls h4,.wrap.wordfence-ls h5,.wrap.wordfence-ls h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:700}.wrap.wordfence-ls h2{font-size:1.3125rem;line-height:1.5}.wrap.wordfence-ls h3{font-size:1.125rem}.wrap.wordfence-ls h4{font-size:1rem}a{color:#00709e}.wfls-inline-help{color:#9f9fa0}.wfls-inline-help:hover{color:#00709e}.wordfenceWrap{margin:20px 0 0 20px}#wfHeading:after{content:'.';visibility:hidden;display:block;clear:both;height:0px}.wfls-header-icon{background-image:url(../img/header.svg);width:32px;height:32px;background-position:0 0;background-repeat:no-repeat;padding:0;margin:0 5px 0 0;float:left}a.wfhelp{margin:0 3px 0 3px;text-decoration:none;display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased}a.wfhelp:before{content:'\f29c'}.wordfence .resulticon{display:block;float:left;width:16px;height:16px;background-position:0 0;background-repeat:no-repeat;border-width:0;padding:0;margin:0 3px 0 0;background-image:url(../img/icons/bullet_yellow.png)}.wordfenceBoldTD{font-weight:bold}.wfAjax24{display:none;width:24px;height:24px;background-image:url(../img/icons/ajax24.gif);margin:0;padding:0}div.wfLoadingWhite32{width:32px;height:32px;background-image:url(../img/icons/ajaxWhite32x32.gif);margin:0;padding:0}.wfTabsContainer{background-color:#FFF;overflow:hidden;border:1px solid #CCC;padding:15px;min-height:200px;-webkit-font-smoothing:antialiased}#wfTabs::after{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}#wfTabs a{float:left;z-index:10;height:18px;margin:0 5px -1px 0;padding:5px 8px;border:1px solid #CCC;text-decoration:none;background-color:#EFEFEF;color:#21759B;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}#wfTabs a.selected{border-bottom:1px solid #FFF;background-color:#FFF;color:#777}.wordfenceTopTab{display:none;margin-top:15px}.wordfenceTopTab.active{display:block}.wordfenceHelpLink{margin-top:15px}.wfAjaxLight128{background-image:url(../img/icons/ajax3.gif)}.wfStrong{font-weight:bold}.wordfenceModeElem{width:1px;height:1px;opacity:0}.wfWarn{color:#F00}img.wfFlag{vertical-align:middle;margin:-3px 4px 0 0}.wfHitTime{font-style:italic}.wfAvatar img{vertical-align:middle;margin-right:0.5rem}.wfls-hex-sequence{color:#587ECB}.wfLoadMoreButton.disabled,.wfLoadMoreButton[disabled]{pointer-events:none;opacity:0.65}table.wfConfigForm th{font-weight:normal;text-align:left;padding:2px 3px 1px 0;vertical-align:middle}table.wfConfigForm td{vertical-align:middle}table.wfConfigForm td.align-top{vertical-align:top}table th.wfConfigEnable{font-weight:bold;min-width:25%}.wfSavedMsg{display:none;color:#A00}table th.wfSubheading{font-weight:bold;padding-top:10px}h3.wfConfigHeading{font-size:22px;color:#777;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:italic;font-weight:normal}.wfTipText{color:#777;font-family:Georgia,Times New Roman,Times,serif;font-style:italic}.wfBlackCursor{color:#FFF}.wfls-spinner{display:inline-block;width:4px}.wferror{color:#F00}#wordfenceWorking{padding:10px 40px 6px 16px;z-index:100000;position:fixed;right:16px;bottom:0px;background-color:#fcb214;border:5px solid #fcb214;border-width:6px 15px 6px 6px;color:#525355;font-size:12px;font-weight:bold;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-image:url("../img/icons/working-indicator.gif");background-position:100% 50%;background-repeat:no-repeat}@media (max-width: 960px){#wordfenceWorking{left:auto;right:0px}}#paidWrap{position:relative}.paidInnerMsg{width:500px;margin:150px auto 0 auto;color:#000;font-size:18px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.8em;text-align:center;-webkit-font-smoothing:antialiased}.wfMarker{height:1px;width:1px}.wfPaidOnlyNotice{width:500px;background-color:#FFFFE0;border:1px solid #000;padding:10px;margin:20px}.wfOnOffSwitch{display:inline-block;position:relative !important;width:69px !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important}.wfOnOffSwitch-checkbox{display:none !important}.wfOnOffSwitch-label{display:block !important;overflow:hidden !important;cursor:pointer !important;border:2px solid #999999 !important;border-radius:19px !important;margin:0}.wfOnOffSwitch-inner{width:200% !important;margin-left:-100% !important;-webkit-transition:margin 0.3s ease-in !important;-o-transition:margin 0.3s ease-in !important;transition:margin 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important}.wfOnOffSwitch-inner:before,.wfOnOffSwitch-inner:after{float:left !important;width:50% !important;height:19px !important;padding:0 !important;line-height:19px !important;font-size:14px !important;color:white !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif !important;font-weight:bold !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;-webkit-box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important;box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important}.wfOnOffSwitch-inner:before{content:"ON" !important;padding-left:10px !important;background-color:#30D965 !important;color:#FFFFFF !important;-moz-border-radius:19px 0 0 19px !important;-webkit-border-radius:19px;border-radius:19px 0 0 19px !important}.wfOnOffSwitch-inner:after{content:"OFF" !important;padding-right:10px !important;background-color:#EEEEEE !important;color:#999999 !important;text-align:right !important;-moz-border-radius:0 19px 19px 0 !important;-webkit-border-radius:0;border-radius:0 19px 19px 0 !important}.wfOnOffSwitch-switch{width:19px !important;margin:0 !important;background:#FFFFFF !important;border:2px solid #999999 !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;position:absolute !important;top:0 !important;bottom:0 !important;right:46px !important;-webkit-transition:all 0.3s ease-in !important;-o-transition:all 0.3s ease-in !important;transition:all 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjgwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=') !important;background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0.1)),color-stop(80%, rgba(0,0,0,0))) !important;background-image:-moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:-webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:linear-gradient(to center bottom, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;box-shadow:0 1px 1px white inset !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-inner{margin-left:0 !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-switch{right:0 !important}#wordfenceConfigWarning,#wordfenceAdminEmailWarning{clear:left;margin-top:5px}.wfls-striped-table{width:100%;max-width:100%;border-collapse:collapse}.wfls-striped-table th{border-left:1px solid #bdbdbd}.wfls-striped-table th:first-of-type{border-left:0}.wfls-striped-table th,.wfls-striped-table td{padding:1rem}.wfls-striped-table thead th,.wfls-striped-table thead td,.wfls-striped-table tfoot th,.wfls-striped-table tfoot td,.wfls-striped-table tbody.thead th,.wfls-striped-table tbody.thead td{background-color:#ebebeb;color:#777;font-weight:bold;text-align:left}.wfls-striped-table tbody tr.even td,.wfls-striped-table tbody tr:nth-child(2n) td{background-color:#ffffff}.wfls-striped-table tbody tr td,.wfls-striped-table tbody tr.odd td{background-color:#fafafa}.wfls-striped-table tbody tr:hover>td{background-color:#fffbd8}.wfls-striped-table tbody.empty-row tr td{border-width:0;padding:8px 0;background-color:transparent}.wfls-striped-table .wfls-result-error,.wfls-block-list .wfls-result-error{color:#d0514c !important;font-weight:bold}.wfls-striped-table .wfls-result-error:before,.wfls-block-list .wfls-result-error:before{content:"\2718"}.wfls-striped-table .wfls-result-success{max-width:20%}.wfls-striped-table .wfls-result-success,.wfls-block-list .wfls-result-success{color:#008c10 !important;font-weight:bold}.wfls-striped-table .wfls-result-success:before,.wfls-block-list .wfls-result-success:before{content:"\2713"}.wfls-striped-table .wfls-result-success:before,.wfls-block-list .wfls-result-success:before,.wfls-striped-table .wfls-result-error:before,.wfls-block-list .wfls-result-error:before{font-size:16px;display:inline-block;margin:0px 8px 0px 0px}.wfls-striped-table .wfls-result-inactive,.wfls-block-list .wfls-result-inactive{font-weight:bold;color:#666666 !important}.wfls-fixed-table{table-layout:fixed}pre.wfls-pre{margin:8px 0 20px;padding:12px;background:#ffffff;border:1px solid #999999;overflow:auto}.wfls-center{text-align:center}#wfConfigForm,.wfls-diagnostics-wrapper{max-width:1035px}.wfls-hidden{display:none !important}.wfls-card{position:relative;margin:0 auto .625rem;padding:1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wfls-card .wfls-card-inner{min-height:76px;width:100%;padding:8px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}.wfls-card .wfls-card-inner .wfls-card-content{max-width:75%}.wfls-card .wfls-card-inner .wfls-card-content .wfls-card-title{font-size:1.125rem;width:100%}.wfls-card .wfls-card-inner .wfls-card-content .wfls-card-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.875rem;color:#4f748e}.wfls-card .wfls-card-inner .wfls-card-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wfls-card .wfls-card-inner .wfls-card-action .wfls-card-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wfls-card .wfls-card-inner .wfls-card-action .wfls-card-action-checkbox{background-image:url(../img/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wfls-card .wfls-card-inner .wfls-card-action .wfls-card-action-checkbox.checked{background-position:right center}.wfls-card .wfls-card-extra{display:none;padding:0.5rem;margin-top:1rem;border-top:1px solid #f3f6f8}@media (min-width: 768px){.wfls-card .wfls-card-extra{padding:1rem}}.wfls-card.active .wfls-card-extra{display:block}.wfls-card.wfls-card-left .wfls-card-content{margin-left:48px}.wfls-card.wfls-card-left .wfls-card-action{right:auto;left:0px}.wfls-card.disabled .wfls-card-content .wfls-card-title{color:#aaaaaa}.wfls-card.disabled .wfls-card-content .wfls-card-subtitle{color:#8ea6be}.wfls-inline-block{display:inline-block}@media (max-width: 767px){.wfls-inline-block-xs{display:inline-block}}.wfls-full-width{width:100%;max-width:100%}.wfls-no-top{margin-top:0 !important}.wfls-add-top{margin-top:1rem !important}.wfls-add-top-large{margin-top:1.5rem !important}.wfls-add-top-medium{margin-top:0.75rem !important}.wfls-add-top-small{margin-top:0.5rem !important}.wfls-add-top-smaller{margin-top:0.25rem !important}.wfls-no-bottom{margin-bottom:0 !important}.wfls-add-bottom{margin-bottom:1rem !important}.wfls-add-bottom-large{margin-bottom:1.5rem !important}.wfls-add-bottom-medium{margin-bottom:0.75rem !important}.wfls-add-bottom-small{margin-bottom:0.5rem !important}.wfls-add-bottom-smaller{margin-bottom:0.25rem !important}.wfls-padding-no-top{padding-top:0 !important}.wfls-no-right{margin-right:0 !important}.wfls-padding-no-bottom{padding-bottom:0 !important}.wfls-padding-no-left{padding-left:0 !important}.wfls-padding-no-right{padding-right:0 !important}.wfls-padding-add-top{padding-top:1rem !important}.wfls-padding-add-top-small{padding-top:0.5rem !important}.wfls-padding-add-top-medium{padding-top:0.75rem !important}.wfls-padding-add-top-large{padding-top:1.5rem !important}.wfls-padding-add-top-responsive{padding-top:1rem !important}@media (min-width: 768px){.wfls-padding-add-top-responsive{padding-top:1.5rem !important}}.wfls-padding-add-bottom{padding-bottom:1rem !important}.wfls-padding-add-bottom-small{padding-bottom:0.5rem !important}.wfls-padding-add-bottom-medium{padding-bottom:0.75rem !important}.wfls-padding-add-bottom-large{padding-bottom:1.5rem !important}.wfls-padding-add-bottom-responsive{padding-bottom:1rem !important}@media (min-width: 768px){.wfls-padding-add-bottom-responsive{padding-bottom:1.5rem !important}}.wfls-padding-no-bottom{padding-bottom:0 !important}.wfls-padding-add-left{padding-left:1rem !important}.wfls-padding-add-left-small{padding-left:0.5rem !important}.wfls-padding-add-left-medium{padding-left:0.75rem !important}.wfls-padding-add-left-large{padding-left:1.5rem !important}.wfls-padding-add-left-responsive{padding-left:1rem !important}@media (min-width: 768px){.wfls-padding-add-left-responsive{padding-left:1.5rem !important}}.wfls-padding-add-right{padding-right:1rem !important}.wfls-padding-add-right-small{padding-right:0.5rem !important}.wfls-padding-add-right-medium{padding-right:0.75rem !important}.wfls-padding-add-right-large{padding-right:1.5rem !important}.wfls-padding-add-right-responsive{padding-right:1rem !important}@media (min-width: 768px){.wfls-padding-add-right-responsive{padding-right:1.5rem !important}}.wfls-left{text-align:left !important}.wfls-center{text-align:center !important}.wfls-block-center{margin:0 auto}.wfls-right{text-align:right !important}.wfls-block-right{margin:0 0 0 auto}@media (max-width: 767px){.wfls-left-xs{text-align:left !important}.wfls-center-xs{text-align:center !important}.wfls-padding-add-top-xs{padding-top:1rem !important}.wfls-padding-add-top-xs-small{padding-top:0.5rem !important}.wfls-padding-add-top-xs-large{padding-top:1.5rem !important}.wfls-padding-add-bottom-xs{padding-bottom:1rem !important}.wfls-padding-add-bottom-xs-small{padding-bottom:0.5rem !important}.wfls-padding-add-bottom-xs-large{padding-bottom:1.5rem !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-left-sm{text-align:left !important}.wfls-center-sm{text-align:center !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-left-md{text-align:left !important}.wfls-center-md{text-align:center !important}}@media (min-width: 1200px){.wfls-left-lg{text-align:left !important}.wfls-center-lg{text-align:center !important}}.wfls-border-no-top{border-top:none !important}.wfls-border-no-right{border-right:none !important}.wfls-border-no-bottom{border-bottom:none !important}.wfls-border-no-left{border-left:none !important}.wfls-overflow-x-auto{overflow-x:auto}.wfls-overflow-y-auto{overflow-y:auto}@media (max-width: 767px){.wfls-overflow-x-auto-xs{overflow-x:auto}.wfls-overflow-y-auto-xs{overflow-y:auto}}.wfls-blue{color:#00709e !important}.wfls-blue-light{color:#008cc1 !important}.wfls-gray-dark{color:#2d2d2d !important}.wfls-gray-blue{color:#3f596b !important}.wfls-green-dark{color:#11967a !important}.wfls-green-light{color:#16bc9b !important}.wfls-red-dark{color:#930000 !important}.wfls-red-light{color:#c10000 !important}.wfls-yellow-dark{color:#fcb214 !important}.wfls-yellow-light{color:#ffd10a !important}.wfls-gray{color:#525355 !important}.wfls-gray-light{color:#9f9fa0 !important}.wfls-nowrap{white-space:nowrap}.wfls-tip{color:#fcb214;font-size:1.1rem;margin-right:0.25rem}.wfls-text-small{font-size:85% !important}.wfls-text-plain{font-weight:400 !important}.wfls-scroll-x::-webkit-scrollbar,.wfls-scroll-y::-webkit-scrollbar{-webkit-appearance:none;width:7px;height:7px}.wfls-scroll-x::-webkit-scrollbar-thumb,.wfls-scroll-y::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,0.194);-webkit-box-shadow:0 0 1px rgba(255,255,255,0.5)}.wfls-split-word{word-wrap:break-word;word-break:break-all}@media (max-width: 767px){.wfls-split-word-xs{word-wrap:break-word;word-break:break-all;white-space:normal !important}}.wfselect2-container{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;min-width:200px}@media (min-width: 768px){.wfselect2-container{min-width:280px}}@media (min-width: 992px){.wfselect2-container{min-width:320px}}@media (max-width: 767px){.wfselect2-container .wfselect2-search.wfselect2-search--inline{margin:0 !important}}.wfls-select2-placeholder-fix .wfselect2-search__field{width:auto !important}.wfls-page-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;margin-top:0.5rem}.wfls-page-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wfls-page-title>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px;padding-right:0.25rem}.wfls-page-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wfls-page-title h2{padding:0 !important}.wfls-page-title .wfOnOffSwitch{-webkit-flex-basis:69px;flex-basis:69px;-webkit-flex-shrink:0;flex-shrink:0;margin-left:0.5rem}.wfls-tab-container{background-color:#fff}@media (min-width: 768px){.wfls-tab-container{background-color:unset}}.wfls-page-tabs,.wfls-page-fixed-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;border-bottom:1px solid #d0d0d0;margin:0;margin-top:0.5rem;margin-left:-10px;margin-right:-10px}@media (min-width: 768px){.wfls-page-tabs,.wfls-page-fixed-tabs{margin-left:0;margin-right:0}}.wfls-page-tabs>*,.wfls-page-fixed-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wfls-page-tabs>*:first-child,.wfls-page-fixed-tabs>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px}.wfls-page-tabs .wordfence-icon32,.wfls-page-fixed-tabs .wordfence-icon32{margin:0;margin-right:0.5rem;margin-left:0.5rem}@media (min-width: 768px){.wfls-page-tabs .wordfence-icon32,.wfls-page-fixed-tabs .wordfence-icon32{margin-left:0}}.wfls-page-tabs .wfls-text-tab,.wfls-page-fixed-tabs .wfls-text-tab{margin:0;margin-left:0.5rem;color:#333}.wfls-page-tabs .wfls-tab,.wfls-page-fixed-tabs .wfls-tab{border:1px solid #fff;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin-bottom:-1px;margin-right:0.5rem;color:#333}@media (min-width: 768px){.wfls-page-tabs .wfls-tab,.wfls-page-fixed-tabs .wfls-tab{border:1px solid #d0d0d0;background:#e6e6e6}}.wfls-page-tabs .wfls-tab a,.wfls-page-fixed-tabs .wfls-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wfls-page-tabs .wfls-tab.wfls-active,.wfls-page-tabs .wfls-tab:hover,.wfls-page-fixed-tabs .wfls-tab.wfls-active,.wfls-page-fixed-tabs .wfls-tab:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#00709e;-webkit-box-shadow:none;box-shadow:none}.wfls-page-tabs .wfls-tab.wfls-active a,.wfls-page-tabs .wfls-tab:hover a,.wfls-page-fixed-tabs .wfls-tab.wfls-active a,.wfls-page-fixed-tabs .wfls-tab:hover a{color:#00709e}.wfls-tab-content{display:none;margin-top:15px}.wfls-tab-content.wfls-active{display:block}.wfls-fixed-tab-content{margin-top:15px}.wfls-section-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start}.wfls-section-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wfls-section-title>h1,.wfls-section-title>h2,.wfls-section-title>h3,.wfls-section-title>h4,.wfls-section-title>h5,.wfls-section-title>h6{-webkit-flex-grow:1;flex-grow:1;color:#2d2d2d !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif !important;line-height:1.5rem !important;font-weight:700 !important;padding:0 !important;margin:0 !important}@media (min-width: 768px){.wfls-section-title>h1,.wfls-section-title>h2,.wfls-section-title>h3,.wfls-section-title>h4,.wfls-section-title>h5,.wfls-section-title>h6{padding-right:0.25rem !important}}.wfls-section-title h2{font-size:1.3125rem;line-height:1.5}.wfls-section-title h3{font-size:1.125rem}.wfls-section-title h4{font-size:1rem}.wfls-section-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wfls-status-circular{position:relative}.wfls-status-circular-text{position:absolute;left:50%;top:50%;padding:0;margin:0;transform:translate(-50%, -50%);color:#aaa;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wfls-status-circular .wfls-status-overlay-text{position:absolute;left:50%;top:50%;padding:0;margin:0;width:200%;text-align:center;transform:translate(-50%, -50%);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;font-weight:normal;line-height:1.3125;opacity:0.0;color:#777}.wfls-status-warning,.wfls-status-critical,.wfls-status-payment-expiring,.wfls-status-renewing{width:100px;height:100px;margin-bottom:1rem}.wfls-status-warning svg path{fill:#fcb214}.wfls-status-critical svg path{fill:#930000}.wfls-status-payment-expiring svg rect,.wfls-status-payment-expiring svg path{fill:#930000}.wfls-status-renewing svg rect,.wfls-status-renewing svg path{fill:#11967a}#howGetIPs-preview{color:#8c8c8c}#howGetIPs-preview strong{color:#666}.wfls-scrollTop{background:#424242;bottom:30px;right:15px;position:fixed;z-index:999;display:none}.wfls-scrollTop a{background:#959595;display:block;padding:4px 5px;line-height:32px;width:32px;color:#ffffff;text-align:center}.wfls-back-icon{color:#00709e;margin-right:0.75rem;font-size:1.5rem !important}.wfls-back-link-chevron{margin-left:1rem}.wfls-back-link-chevron:first-of-type{margin-left:0}.wfls-back-link{font-weight:bold;text-decoration:none}.wfls-premium-link{font-weight:bold}.wfls-boolean-switch{border:1px solid #aaa;display:block;cursor:pointer;width:54px;height:30px;min-width:54px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;line-height:30px !important;background-color:#ffffff;position:relative;box-sizing:border-box;transition:background-color 0.2s ease-in-out, border-color 0.2s ease-in-out}@media (min-width: 768px){.wfls-boolean-switch{width:34px;height:20px;min-width:34px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}.wfls-boolean-switch .wfls-boolean-switch-handle{position:relative;display:block;border:1px solid #aaa;background-color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;margin-top:-1px;box-sizing:border-box;left:-1px;transition:border-color 0.2s ease-in-out, left 0.2s ease-in-out}@media (min-width: 768px){.wfls-boolean-switch .wfls-boolean-switch-handle{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}}.wfls-boolean-switch.wfls-active{border:1px solid #00709e;background-color:#00709e}.wfls-boolean-switch.wfls-active .wfls-boolean-switch-handle{border:1px solid #00709e;left:25px}@media (min-width: 768px){.wfls-boolean-switch.wfls-active .wfls-boolean-switch-handle{left:15px}}.wfls-boolean-switch.wfls-disabled{pointer-events:none;border-color:#e2e2e2}.wfls-boolean-switch.wfls-disabled .wfls-boolean-switch-handle{border-color:#e2e2e2}.wfls-boolean-switch.wfls-disabled.wfls-active{border-color:#e2e2e2;background-color:#e2e2e2}.wfls-boolean-switch.wfls-disabled.wfls-active .wfls-boolean-switch-handle{border-color:#e2e2e2}.wfls-option-checkbox,[type=checkbox].wfls-option-checkbox+label:before{content:"";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px #aaa;color:#ffffff !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wfls-option-checkbox,[type=checkbox].wfls-option-checkbox+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:25px !important}}@media (min-width: 768px){.wfls-option-checkbox{position:relative}.wfls-option-checkbox>*{position:absolute;top:9px;left:50%;transform:translateX(-50%) translateY(-50%)}}.wfls-option-radio,[type=radio].wfls-option-radio+label:before{content:"\f401";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;line-height:30px !important;text-align:center !important;color:#ccc !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wfls-option-radio,[type=radio].wfls-option-radio+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}[type=checkbox].wfls-option-checkbox.wfls-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:20px !important}[type=radio].wfls-option-radio.wfls-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;line-height:21px !important;font-size:20px !important}[type=checkbox].wfls-option-checkbox+label:before,[type=radio].wfls-option-radio+label:before{text-align:center !important;text-indent:0px;display:inline-block;vertical-align:-6px;margin:0px 5px 0px 0px;font-weight:normal;font-style:normal}[type=checkbox].wfls-option-checkbox.wfls-small+label:before,[type=radio].wfls-option-radio.wfls-small+label:before{text-indent:0px;vertical-align:-3px}.wfls-option-checkbox.wfls-checked,[type=checkbox].wfls-option-checkbox:checked+label:before{color:#ffffff !important;box-shadow:0px 0px 0px 1px #00709e !important;background-color:#00709e !important}.wfls-option-checkbox.wfls-disabled,[type=checkbox].wfls-option-checkbox:disabled+label:before{color:#f1f1f1 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wfls-option-checkbox.wfls-checked.wfls-disabled,[type=checkbox].wfls-option-checkbox:disabled:checked+label:before{color:#777 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wfls-option-radio.wfls-checked,[type=radio].wfls-option-radio:checked+label:before{content:"\f3a7";color:#00709e !important}.wfls-option-checkbox[type=checkbox],.wfls-option-checkbox[type=radio],.wfls-option-radio[type=checkbox],.wfls-option-radio[type=radio]{position:absolute;left:-9999px}.wfls-option-text input[type="text"],input.wfls-input-text{text-align:left;width:100%;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.65)}.wfls-option-text input[type="text"]:placeholder-shown,input.wfls-input-text:placeholder-shown{font-style:italic;color:#bfbfbf}::-webkit-input-placeholder{color:#bfbfbf}:-moz-placeholder{color:#bfbfbf;opacity:1}::-moz-placeholder{color:#bfbfbf;opacity:1}:-ms-input-placeholder{color:#bfbfbf}::-ms-input-placeholder{color:#bfbfbf}::placeholder{color:#bfbfbf}.wfls-option-premium .wfls-option-title,.wfls-option-premium .wfls-option-title>ul>li,.wfls-option.wfls-disabled .wfls-option-title,.wfls-option.wfls-disabled .wfls-option-title>ul>li{color:#aaa !important}.wfls-option-premium .wfls-option-checkbox,.wfls-option-premium .wfls-option-radio,.wfls-option.wfls-disabled .wfls-option-checkbox,.wfls-option.wfls-disabled .wfls-option-radio{opacity:0.5}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status .wfls-block-labeled-value-value{padding-top:0}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status .wfls-block-labeled-value-value .wfls-fa{font-size:8rem}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status .wfls-block-labeled-value-value svg{width:160px}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status .wfls-block-labeled-value-label{font-size:1.35rem;font-weight:300;padding-bottom:0}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status-premium .wfls-block-labeled-value-value{color:#9f9fa0}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status-premium .wfls-block-labeled-value-value svg{fill:#9f9fa0}.wfls-block .wfls-block-content .wfls-block-labeled-value.wfls-protection-status-premium .wfls-block-labeled-value-label{color:#9f9fa0}.wfls-indeterminate-progress{-webkit-animation:wfls-indeterminate-progress-keyframes 1s steps(8, end) infinite;-o-animation:wfls-indeterminate-progress-keyframes 1s steps(8, end) infinite;animation:wfls-indeterminate-progress-keyframes 1s steps(8, end) infinite}.wfls-indeterminate-progress path{fill:#00709e}@-moz-keyframes wfls-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wfls-indeterminate-progress-keyframes{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes wfls-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.wfls-flex-row{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wfls-flex-row .wfls-flex-row-1{-webkit-flex-grow:1;flex-grow:1}.wfls-flex-row .wfls-flex-row-0{-webkit-flex-grow:0;flex-grow:0}.wfls-flex-row.wfls-flex-row-wrappable,.wfls-flex-row.wfls-flex-row-xs-wrappable{-webkit-flex-wrap:wrap;flex-wrap:wrap}.wfls-flex-row.wfls-flex-row-equal-heights{-webkit-align-items:stretch;align-items:stretch}.wfls-flex-row .wfls-flex-item-full-width{width:100%}.wfls-flex-row .wfls-flex-item-xs-100{-webkit-flex-basis:100%;flex-basis:100%;max-width:100%}@media (min-width: 768px){.wfls-flex-row.wfls-flex-row-xs-wrappable{-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wfls-flex-row .wfls-flex-item-sm-50{-webkit-flex-basis:50%;flex-basis:50%}}.wfls-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}.wfls-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wfls-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wfls-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wfls-switch>li.wfls-active{color:#ffffff;background-color:#00709e}.wfls-tooltip,.ui-widget.wfls-tooltip{max-width:600px;font-size:0.75rem;overflow-wrap:break-word}.wfls-widget-learning-mode{border-top:1px solid #eee;margin:0 -1rem;padding:1rem;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row}@media (min-width: 768px){.wfls-widget-learning-mode{padding:1.5rem}}.wfls-widget-learning-mode svg{width:18px}.wfls-widget-learning-mode svg path{fill:#aaa}.wfls-widget-learning-mode span{padding-left:0.5rem;font-size:.875rem;line-height:1.3125;font-weight:600}.wfls-drawer-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:160px;background-color:rgba(0,0,0,0.5);z-index:9980;padding:5rem 0}.folded .wfls-drawer-overlay{left:36px}@media only screen and (max-width: 960px){.auto-fold .wfls-drawer-overlay{left:36px}}.rtl .wfls-drawer-overlay{right:160px;left:0px}.rtl .folded .wfls-drawer-overlay{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wfls-drawer-overlay{right:36px}}@media screen and (max-width: 782px){.wfls-drawer-overlay,.folded .wfls-drawer-overlay,.auto-fold .wfls-drawer-overlay,.rtl .wfls-drawer-overlay,.rtl .folded .wfls-drawer-overlay,.rtl .auto-fold .wfls-drawer-overlay{left:0px;right:0px}}.wfls-drawer{background-color:#ffffff;position:fixed;top:32px;bottom:0px;right:0px;z-index:9981}.wfls-drawer .wfls-modal{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;height:100%}.wfls-drawer .wfls-modal ul,.wfls-drawer .wfls-modal li{padding:0;margin:0}.wfls-drawer .wfls-modal .wfls-modal-header{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#00709e;color:#ffffff}.wfls-drawer .wfls-modal .wfls-modal-header .wfls-modal-header-content{max-width:75%}.wfls-drawer .wfls-modal .wfls-modal-header .wfls-modal-header-content .wfls-modal-title{font-size:1.3125rem;line-height:1.5;font-weight:300;width:100%;transition:color 0.2s ease-in}.wfls-drawer .wfls-modal .wfls-modal-header .wfls-modal-header-content .wfls-modal-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wfls-drawer .wfls-modal .wfls-modal-content{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;padding:1rem}.wfls-drawer .wfls-modal .wfls-modal-content>*:first-child{margin-top:0}.wfls-drawer .wfls-modal .wfls-modal-content select,.wfls-drawer .wfls-modal .wfls-modal-content select option,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){.wfls-drawer .wfls-modal .wfls-modal-content select,.wfls-drawer .wfls-modal .wfls-modal-content select option,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){.wfls-drawer .wfls-modal .wfls-modal-content select,.wfls-drawer .wfls-modal .wfls-modal-content select option,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default{font-size:0.9rem}}.wfls-drawer .wfls-modal .wfls-modal-content .wfls-option-select-option,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wfls-drawer .wfls-modal .wfls-modal-content .wfls-option-select-option .wfselect2-selection__rendered,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection__rendered,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wfls-drawer .wfls-modal .wfls-modal-content .wfls-option-select-option .wfselect2-selection__arrow,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection__arrow,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wfls-drawer .wfls-modal .wfls-modal-content .wfls-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wfls-drawer .wfls-modal .wfls-modal-content .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}.wfls-drawer .wfls-modal .wfls-modal-footer{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#f1f1f1;border-top:1px solid #d9d9d9}.wfls-mobile-menu-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:100000}.wfls-mobile-menu-overlay>.wfls-mobile-menu-tap-hint{position:absolute;top:25%;left:50%;transform:translateX(-50%);color:#ffffff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wfls-mobile-menu{position:fixed;left:50%;transform:translateX(-50%);z-index:100001}.wfls-mobile-menu>.wfls-mobile-menu-items{margin:0;padding:0 0 0.25rem 0;list-style:none}.wfls-mobile-menu>.wfls-mobile-menu-items>li{margin:0;padding:0.25rem 0}.wfls-mobile-menu>.wfls-mobile-menu-items>li>a{box-sizing:border-box}.wfls-callout-warning{background-color:#feecc4;padding:0.8rem 1.25rem}.wfls-tip-light-bulb{color:#fcb214;font-size:1.5rem;font-weight:bold}.wfls-tip-info-message{padding-left:0.5rem !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}#wfls-qr-code{width:175px;height:175px;margin:0 auto}@media (min-width: 500px){#wfls-qr-code{width:256px;height:256px}}#wfls-qr-code-text{max-width:100%}#wfls-activate-field{margin:0 auto;font-size:1.5rem;display:block;text-align:center}.wfls-recovery-codes{list-style-type:none}.wfls-recovery-codes li{font-family:monospace !important;text-align:center}#wfls-recovery-download .dashicons,#wfls-recovery-new-download .dashicons{line-height:26px}#wfls-ip-source-trusted-proxies{display:none}ul.wfls-option.wfls-option-howgetips .wfls-option-ip-source-details{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.8rem;margin-top:0.5rem}#wfls-ip-source-preview{color:#8c8c8c}#wfls-ip-source-preview strong{color:#666}.wfls-inline-notice{background:#fff;border:1px solid #ccd0d4;border-left-color:#ffb900;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,0.04);padding:4px 12px;display:flex;justify-content:flex-start;align-items:center}.wfls-inline-notice>*{flex-grow:1}.wfls-inline-notice:first-child{flex-grow:0;flex-shrink:0}.wfls-inline-notice span{padding-left:0.5rem}.wfls-page-indicator{vertical-align:bottom}#wfls-customer-2fa-required-warning{margin-top:0}#wfls-activation-help-link-container{margin-right:0.5rem}.wfls-block{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;position:relative;margin:0 auto 0.5rem;box-sizing:border-box;background-color:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3}.wfls-block.wfls-block-transparent{background-color:transparent;box-shadow:none}.wfls-block .wfls-block-banner{min-height:44px;margin:0 -1rem;padding:0;box-sizing:border-box;position:relative;background-color:#fcb214;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row}.wfls-block .wfls-block-banner>li{margin:0;padding:0.75rem 1rem}@media (min-width: 768px){.wfls-block .wfls-block-banner{margin:0 -1.5rem}.wfls-block .wfls-block-banner>li{padding:0.75rem 1.5rem}}.wfls-block .wfls-block-header{-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0;padding:1rem 0 0.5rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wfls-block .wfls-block-header.wfls-block-header-border-bottom{border-bottom:1px solid #e2e2e2;padding-left:1rem;padding-right:1rem}@media (min-width: 768px){.wfls-block .wfls-block-header.wfls-block-header-border-bottom{padding-right:1.5rem;padding-left:1.5rem}}.wfls-block .wfls-block-header .wfls-block-header-content{max-width:75%}.wfls-block .wfls-block-header .wfls-block-header-content .wfls-block-title{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;width:100%;transition:color 0.2s ease-in}.wfls-block .wfls-block-header .wfls-block-header-content .wfls-block-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:0.775rem}.wfls-block .wfls-block-header .wfls-block-header-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wfls-block .wfls-block-header .wfls-block-header-action.wfls-block-header-action-text{width:auto}.wfls-block .wfls-block-header .wfls-block-header-action.wfls-block-header-action-text.wfls-block-header-action-text-success{color:#11967a}.wfls-block .wfls-block-header .wfls-block-header-action.wfls-block-header-action-text.wfls-block-header-action-text-warning{color:#930000}.wfls-block .wfls-block-header .wfls-block-header-action.wfls-block-header-action-text.wfls-block-header-action-text-warning a{color:#930000}.wfls-block .wfls-block-header .wfls-block-header-action .wfls-block-header-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px}.wfls-block .wfls-block-header .wfls-block-header-action .wfls-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzc3NyIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center;width:12px;height:12px;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),background 0.2s ease-in}.wfls-block .wfls-block-header .wfls-block-header-action .wfls-block-header-action-checkbox{background-image:url(../img/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wfls-block .wfls-block-header .wfls-block-header-action .wfls-block-header-action-checkbox.wfls-checked{background-position:right center}.wfls-block .wfls-block-content{-webkit-flex-grow:1;flex-grow:1;display:none;padding:0 1rem}@media (min-width: 768px){.wfls-block .wfls-block-content{padding:0 1.5rem}}.wfls-block .wfls-block-content .wfls-block-list{margin:0 -1rem;padding:0;list-style:none}@media (min-width: 768px){.wfls-block .wfls-block-content .wfls-block-list{margin:0 -1.5rem}}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-striped>li:nth-of-type(even){background-color:#ffffff}.wfls-block .wfls-block-content .wfls-block-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #e2e2e2;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}@media (min-width: 768px){.wfls-block .wfls-block-content .wfls-block-list>li{padding:0 1.5rem}}.wfls-block .wfls-block-content .wfls-block-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #e2e2e2}@media (min-width: 768px){.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal.wfls-block-list-nowrap{overflow-y:auto;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal.wfls-block-list-nowrap>li{-webkit-flex-shrink:0;flex-shrink:0}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal.wfls-block-list-horizontal-5>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:20%;flex-basis:20%}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal.wfls-block-list-equal>li{max-width:50%}}@media (min-width: 992px){.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal.wfls-block-list-equal>li{max-width:25%}}.wfls-block .wfls-block-content .wfls-block-list.wfls-block-list-horizontal.wfls-block-list-horizontal-5.wfls-block-list-equal>li{max-width:20%}.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-state{text-align:center}@media (min-width: 1200px){.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-state{text-align:left}}.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-state-enabled .wfls-fa{color:#11967a}.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-state-disabled .wfls-fa{color:#525355}.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-state-premium{color:#9f9fa0}.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-dismiss{padding-left:2rem;font-size:1.25rem}.wfls-block .wfls-block-content .wfls-block-list .wfls-block-list-dismiss a{color:#525355}.wfls-block .wfls-block-content:first-child>.wfls-block-list>li:first-child{border-top:none}.wfls-block .wfls-block-content .wfls-block-left-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}@media (min-width: 768px){.wfls-block .wfls-block-content .wfls-block-left-right{margin:0 -1.5rem}}.wfls-block .wfls-block-content .wfls-block-left-right.wfls-block-left-right-nowrap{-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wfls-block .wfls-block-content .wfls-block-left-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wfls-block .wfls-block-content .wfls-block-left-right>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wfls-block .wfls-block-content .wfls-block-left-right>li.wfls-left{text-align:left}.wfls-block .wfls-block-content .wfls-block-left-right>li.wfls-right{text-align:right}.wfls-block .wfls-block-content .wfls-block-left-center-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:center;align-content:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wfls-block .wfls-block-content .wfls-block-left-center-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:33.3333%;flex-basis:33.3333%;max-width:33.3333%}.wfls-block .wfls-block-content .wfls-block-left-center-right>li a{text-decoration:none;font-size:.875rem}.wfls-block .wfls-block-content .wfls-block-left-center-right>li.wfls-left{text-align:left}.wfls-block .wfls-block-content .wfls-block-left-center-right>li.wfls-center{text-align:center;-webkit-justify-content:center;justify-content:center}.wfls-block .wfls-block-content .wfls-block-left-center-right>li.wfls-center .wordfence-icon32{margin:0}.wfls-block .wfls-block-content .wfls-block-left-center-right>li.wfls-right{text-align:right;-webkit-justify-content:flex-end;justify-content:flex-end}.wfls-block .wfls-block-content .wfls-block-labeled-value{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}@media (min-width: 768px){.wfls-block .wfls-block-content .wfls-block-labeled-value{margin:0 -1.5rem;padding:1.5rem}}.wfls-block .wfls-block-content .wfls-block-labeled-value-value{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wfls-block .wfls-block-content .wfls-block-labeled-value-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wfls-block .wfls-block-footer{-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#e4e4e4}.wfls-block .wfls-block-footer .wfls-block-footer-content{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;width:100%}.wfls-block .wfls-block-footer .wfls-block-footer-content>*{-webkit-flex-grow:1;flex-grow:1}.wfls-block .wfls-block-footer .wfls-block-footer-content .wfls-block-title{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;width:100%;transition:color 0.2s ease-in}.wfls-block .wfls-block-footer .wfls-block-footer-content .wfls-block-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:0.775rem}.wfls-block .wfls-block-footer .wfls-block-footer-action{-webkit-flex-grow:0;flex-grow:0;background:none;border:0;outline:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;vertical-align:middle}.wfls-block.wfls-block-no-header .wfls-block-content .wfls-block-list>li{border-top:none}.wfls-block.wfls-active .wfls-block-content,.wfls-block.wfls-always-active .wfls-block-content{display:block}.wfls-block.wfls-active>.wfls-block-header>.wfls-block-header-content>.wfls-block-title{color:#00709e}.wfls-block.wfls-active>.wfls-block-header>.wfls-block-header-content>.wfls-block-header-action>.wfls-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzAwNzA5ZSIvPgo8L3N2Zz4=") !important;transform:rotate(90deg)}.wfls-block.wfls-disabled>.wfls-block-header>.wfls-block-header-content>.wfls-block-title,.wfls-block.wfls-disabled>.wfls-block-header>.wfls-block-header-content>.wfls-block-subtitle{color:#bfbfbf !important}.wfls-block.wfls-disabled>.wfls-block-header>.wfls-block-header-content>.wfls-block-header-action>.wfls-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iI2JkYmRiZCIvPgo8L3N2Zz4=") !important;transform:rotate(0deg)}.wfls-block.wfls-disabled>.wfls-block-content{display:none !important}.wfls-block.wfls-block-header-left .wfls-block-header-content{margin-left:48px}.wfls-block.wfls-block-header-left .wfls-block-header-action{right:auto;left:0px}.wfls-block.wfls-disabled .wfls-dashboard-item-content .wfls-block-title{color:#aaaaaa}.wfls-block.wfls-disabled .wfls-dashboard-item-content .wfls-block-subtitle{color:#8ea6be}.wfls-section-title{margin-bottom:1rem}.wfls-status-detail{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}.wfls-status-detail p{margin:0 0 0.45rem 0}.wfls-status-detail .wfls-status-circular{margin-bottom:1rem}.wfls-status-detail .wfls-status-detail-title{font-weight:700 !important;font-size:1rem !important;line-height:1.3125 !important}.wfls-status-detail .wfls-status-detail-subtitle{font-size:.875rem !important;line-height:1.3125 !important;font-weight:normal !important;text-align:center}.wfls-status-detail .wfls-status-detail-link>a{font-weight:600 !important;font-size:0.85rem !important}.wfls-block-navigation-option{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wfls-block-navigation-option svg.wfls-block-navigation-option-icon{width:50px;min-width:50px;fill:#9f9fa0}.wfls-block-navigation-option:hover{cursor:pointer}.wfls-block-navigation-option:hover a{text-decoration:underline}.wfls-block-navigation-option:hover svg.wfls-block-navigation-option-icon{fill:#00709e}.wfls-select-group{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;-webkit-flex-grow:0 !important;flex-grow:0 !important}.wfls-select-group .wfselect2-container{min-width:200px}@media (max-width: 767px){.wfls-select-group .wfselect2-container{max-width:100px}}.wfls-select-group .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wfls-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}.wfls-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wfls-select-group .wfls-form-control{display:inline-block;width:auto;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.wfls-flex-horizontal{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important}.wfls-flex-horizontal>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wfls-flex-horizontal.wfls-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wfls-flex-horizontal.wfls-flex-align-right{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.wfls-flex-horizontal.wfls-flex-full-width{width:100%}.wfls-flex-horizontal.wfls-flex-full-width>*:last-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wfls-flex-horizontal.wfls-flex-full-width.wfls-flex-grow-first>*:first-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wfls-flex-horizontal.wfls-flex-full-width.wfls-flex-grow-first>*:last-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wfls-flex-horizontal.wfls-flex-full-width.wfls-flex-grow-all>*:first-child,.wfls-flex-horizontal.wfls-flex-full-width.wfls-flex-grow-all>*{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wfls-flex-horizontal>li{padding:0;margin:0}.wfls-flex-vertical{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wfls-flex-vertical>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wfls-flex-vertical.wfls-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wfls-flex-vertical.wfls-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wfls-flex-vertical.wfls-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}@media (max-width: 767px){.wfls-flex-vertical.wfls-flex-align-left-xs{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 768px) and (max-width: 991px){.wfls-flex-vertical.wfls-flex-align-left-sm{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 992px) and (max-width: 1199px){.wfls-flex-vertical.wfls-flex-align-left-md{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 1200px){.wfls-flex-vertical.wfls-flex-align-left-lg{-webkit-align-items:flex-start !important;align-items:flex-start !important}}.wfls-flex-vertical>li{padding:0;margin:0}@media (max-width: 767px){.wfls-flex-vertical-xs{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wfls-flex-vertical-xs>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wfls-flex-vertical-xs.wfls-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wfls-flex-vertical-xs.wfls-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wfls-flex-vertical-xs.wfls-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}}ul.wfls-option,.wfls-form-field{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:1rem 0;position:relative}ul.wfls-option li,.wfls-form-field li{margin:0;padding:0}ul.wfls-option.wfls-option-no-spacing,.wfls-form-field.wfls-option-no-spacing{padding:0;margin:0}ul.wfls-option.wfls-option-toggled>*:last-child,ul.wfls-option.wfls-option-toggled-boolean-switch>*:last-child,ul.wfls-option.wfls-option-toggled-select>*:last-child,ul.wfls-option.wfls-option-select>*:last-child,ul.wfls-option.wfls-option-text>*:last-child,ul.wfls-option.wfls-option-textarea>*:last-child,ul.wfls-option.wfls-option-switch>*:last-child,ul.wfls-option.wfls-option-footer>*:last-child,.wfls-form-field.wfls-option-toggled>*:last-child,.wfls-form-field.wfls-option-toggled-boolean-switch>*:last-child,.wfls-form-field.wfls-option-toggled-select>*:last-child,.wfls-form-field.wfls-option-select>*:last-child,.wfls-form-field.wfls-option-text>*:last-child,.wfls-form-field.wfls-option-textarea>*:last-child,.wfls-form-field.wfls-option-switch>*:last-child,.wfls-form-field.wfls-option-footer>*:last-child{margin-right:1rem}@media (max-width: 768px){ul.wfls-option.wfls-option-footer,.wfls-form-field.wfls-option-footer{-webkit-flex-direction:column;flex-direction:column}}ul.wfls-option>.wfls-option-content,.wfls-form-field>.wfls-option-content{-webkit-flex-grow:1;flex-grow:1}ul.wfls-option>.wfls-option-content>ul,.wfls-form-field>.wfls-option-content>ul{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;width:100%}ul.wfls-option>.wfls-option-content>ul>*:first-child,.wfls-form-field>.wfls-option-content>ul>*:first-child{-webkit-flex-grow:1;flex-grow:1}@media (min-width: 768px){ul.wfls-option>.wfls-option-content>ul,.wfls-form-field>.wfls-option-content>ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}ul.wfls-option.wfls-option-toggled-segmented *,.wfls-form-field.wfls-option-toggled-segmented *{-webkit-flex-grow:0;flex-grow:0}ul.wfls-option.wfls-option-toggled-segmented *:first-child,.wfls-form-field.wfls-option-toggled-segmented *:first-child{-webkit-flex-grow:1;flex-grow:1}ul.wfls-option.wfls-option-toggled-segmented>*:last-child,.wfls-form-field.wfls-option-toggled-segmented>*:last-child{margin-left:1rem}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-title,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-title{font-size:.8rem}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:50%;flex-basis:50%;display:block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#00709e;background-color:#fff;border-color:#00709e;border-radius:0}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:active,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.active,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:active,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.active,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:active:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:active:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:active.focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.active:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.active:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.active.focus,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle:hover,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle:focus,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle.focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:active:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:active:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:active.focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.active:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.active:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.active.focus,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle:hover,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle:focus,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:active,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-active,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:active,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-active,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-dropdown-toggle{background-image:none}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[disabled],ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[readonly],fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[disabled],.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[readonly],fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed;opacity:0.75}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled.wfls-focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[disabled]:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[disabled]:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[disabled].wfls-focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[readonly]:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[readonly]:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label[readonly].wfls-focus,fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:hover,fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label:focus,fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-disabled.wfls-focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[disabled]:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[disabled]:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[disabled].wfls-focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[readonly]:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[readonly]:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label[readonly].wfls-focus,fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:hover,fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label:focus,fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-focus{background-color:#fff;border-color:#00709e}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label .wfls-badge,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label .wfls-badge{color:#fff;background-color:#00709e}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-segment-first,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-segment-first{border-radius:4px 0 0 4px}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments label.wfls-segment-last,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments label.wfls-segment-last{border-radius:0 4px 4px 0}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio],.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]{position:absolute;left:-9999px}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label{color:#fff;background-color:#00709e;border-color:#005e85}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#004c6b;border-color:#000405}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#004c6b;border-color:#003347}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active.focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active.focus,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle:hover,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle:focus,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle.focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active.focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.active.focus,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle:hover,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle:focus,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-active,.wfls-open>ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:active,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-active,.wfls-open>.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-dropdown-toggle{background-image:none}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled],ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled],.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed;opacity:0.75}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled.wfls-focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled]:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled]:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled].wfls-focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly]:hover,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly]:focus,ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly].wfls-focus,fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-disabled.wfls-focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled]:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled]:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[disabled].wfls-focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly]:hover,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly]:focus,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label[readonly].wfls-focus,fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label.wfls-focus{background-color:#00709e;border-color:#005e85}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label .wfls-badge,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:checked+label .wfls-badge{color:#00709e;background-color:#fff}ul.wfls-option.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:disabled+label,.wfls-form-field.wfls-option-toggled-segmented .wfls-option-segments [type=radio]:disabled+label{cursor:not-allowed;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:.65}ul.wfls-option.wfls-option-toggled-multiple,ul.wfls-option.wfls-option-2fa-roles,.wfls-form-field.wfls-option-toggled-multiple,.wfls-form-field.wfls-option-2fa-roles{-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;align-items:flex-start}ul.wfls-option.wfls-option-toggled-multiple>.wfls-option-title,ul.wfls-option.wfls-option-2fa-roles>.wfls-option-title,.wfls-form-field.wfls-option-toggled-multiple>.wfls-option-title,.wfls-form-field.wfls-option-2fa-roles>.wfls-option-title{font-weight:600}ul.wfls-option.wfls-option-2fa-roles .wfls-option-content ul,.wfls-form-field.wfls-option-2fa-roles .wfls-option-content ul{flex-wrap:wrap}ul.wfls-option.wfls-option-2fa-roles .wfls-option-content ul li,.wfls-form-field.wfls-option-2fa-roles .wfls-option-content ul li{flex-grow:0;display:inline;margin:0 0.75rem 0.75rem 0}ul.wfls-option.wfls-option-2fa-roles .wfls-option-content ul li label,.wfls-form-field.wfls-option-2fa-roles .wfls-option-content ul li label{display:block;font-weight:bold}ul.wfls-option.wfls-option-2fa-roles .wfls-option-content ul li select,.wfls-form-field.wfls-option-2fa-roles .wfls-option-content ul li select{display:block}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-grace-period-container label,ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-grace-period-container input,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-grace-period-container label,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-grace-period-container input{vertical-align:middle}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-grace-period-container label,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-grace-period-container label{margin-bottom:0}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-grace-period-container .wfls-primary-label,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-grace-period-container .wfls-primary-label{display:block;margin-bottom:0.25rem}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-grace-period-container #wfls-grace-period-zero-warning,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-grace-period-container #wfls-grace-period-zero-warning{margin-top:0.5rem}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-notification-action,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-notification-action{margin-top:0.5rem}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-notification-action div,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-notification-action div{display:inline-block}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-notification-action label,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-notification-action label{display:block}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-notification-action h4,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-notification-action h4{margin:0}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-notification-action p,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-notification-action p{margin-top:0.5rem}ul.wfls-option.wfls-option-2fa-roles .wfls-2fa-notification-action p small,.wfls-form-field.wfls-option-2fa-roles .wfls-2fa-notification-action p small{display:inline}ul.wfls-option.wfls-option-2fa-roles small,.wfls-form-field.wfls-option-2fa-roles small{margin-top:0.5rem;display:block}ul.wfls-option>.wfls-option-spacer,.wfls-form-field>.wfls-option-spacer{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wfls-option>.wfls-option-spacer,.wfls-form-field>.wfls-option-spacer{width:20px;height:20px}}ul.wfls-option>.wfls-option-premium-lock,.wfls-form-field>.wfls-option-premium-lock{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:contain;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wfls-option>.wfls-option-premium-lock,.wfls-form-field>.wfls-option-premium-lock{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wfls-option>.wfls-option-checkbox,.wfls-form-field>.wfls-option-checkbox{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}ul.wfls-option>.wfls-boolean-switch,.wfls-form-field>.wfls-boolean-switch{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wfls-option>.wfls-boolean-switch,.wfls-form-field>.wfls-boolean-switch{margin:0 1rem 0 1rem}}ul.wfls-option.wfls-option-no-spacing>.wfls-boolean-switch,.wfls-form-field.wfls-option-no-spacing>.wfls-boolean-switch{margin:0}ul.wfls-option>.wfls-option-radio-container,.wfls-form-field>.wfls-option-radio-container{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wfls-option>.wfls-option-radio-container,.wfls-form-field>.wfls-option-radio-container{margin:0 2rem 0 1rem}}ul.wfls-option>.wfls-option-radio-container [type=radio].wfls-option-radio+label:before,.wfls-form-field>.wfls-option-radio-container [type=radio].wfls-option-radio+label:before{margin:0}ul.wfls-option>li>.wfls-option-title,ul.wfls-option>.wfls-option-title,ul.wfls-option>.wfls-option-content>ul>.wfls-option-title,.wfls-form-field>li>.wfls-option-title,.wfls-form-field>.wfls-option-title,.wfls-form-field>.wfls-option-content>ul>.wfls-option-title{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;color:#2b2b2b;padding-right:0.5rem}ul.wfls-option>li>.wfls-option-title.wfls-option-title-top,ul.wfls-option>.wfls-option-title.wfls-option-title-top,ul.wfls-option>.wfls-option-content>ul>.wfls-option-title.wfls-option-title-top,.wfls-form-field>li>.wfls-option-title.wfls-option-title-top,.wfls-form-field>.wfls-option-title.wfls-option-title-top,.wfls-form-field>.wfls-option-content>ul>.wfls-option-title.wfls-option-title-top{-webkit-align-self:flex-start;align-self:flex-start}ul.wfls-option>li>.wfls-option-title.wfls-option-title-bottom,ul.wfls-option>.wfls-option-title.wfls-option-title-bottom,ul.wfls-option>.wfls-option-content>ul>.wfls-option-title.wfls-option-title-bottom,.wfls-form-field>li>.wfls-option-title.wfls-option-title-bottom,.wfls-form-field>.wfls-option-title.wfls-option-title-bottom,.wfls-form-field>.wfls-option-content>ul>.wfls-option-title.wfls-option-title-bottom{-webkit-align-self:flex-end;align-self:flex-end}ul.wfls-option .wfls-option-subtitle,.wfls-form-field .wfls-option-subtitle{padding-top:0.25rem;font-size:0.75rem}ul.wfls-option .wfls-flex-vertical .wfls-option-title,.wfls-form-field .wfls-flex-vertical .wfls-option-title{padding-bottom:0.75rem}ul.wfls-option.wfls-flex-vertical>.wfls-option-subtitle,.wfls-form-field.wfls-flex-vertical>.wfls-option-subtitle{padding-top:0.25rem !important;font-size:0.75rem !important}ul.wfls-option .wfls-option-checkboxes,ul.wfls-option .wfls-option-checkboxes>ul,.wfls-form-field .wfls-option-checkboxes,.wfls-form-field .wfls-option-checkboxes>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wfls-option .wfls-option-checkboxes.wfls-option-checkboxes-wrap,ul.wfls-option .wfls-option-checkboxes>ul.wfls-option-checkboxes-wrap,.wfls-form-field .wfls-option-checkboxes.wfls-option-checkboxes-wrap,.wfls-form-field .wfls-option-checkboxes>ul.wfls-option-checkboxes-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}ul.wfls-option .wfls-option-checkboxes,.wfls-form-field .wfls-option-checkboxes{margin-top:0.5rem}ul.wfls-option .wfls-option-checkboxes>ul,.wfls-form-field .wfls-option-checkboxes>ul{margin-top:0.5rem;margin-right:1rem}@media (min-width: 768px){ul.wfls-option .wfls-option-checkboxes>ul,.wfls-form-field .wfls-option-checkboxes>ul{margin-right:1.5rem}}ul.wfls-option .wfls-option-checkboxes>ul:last-of-type,.wfls-form-field .wfls-option-checkboxes>ul:last-of-type{margin-right:0}ul.wfls-option .wfls-option-checkboxes>ul>.wfls-option-checkbox,.wfls-form-field .wfls-option-checkboxes>ul>.wfls-option-checkbox{margin:0 1rem 0 0}ul.wfls-option li.wfls-option-text,ul.wfls-option li.wfls-option-textarea,ul.wfls-option td.wfls-option-text,.wfls-form-field li.wfls-option-text,.wfls-form-field li.wfls-option-textarea,.wfls-form-field td.wfls-option-text{padding-top:0.5rem}@media (min-width: 768px){ul.wfls-option li.wfls-option-text,ul.wfls-option li.wfls-option-textarea,ul.wfls-option td.wfls-option-text,.wfls-form-field li.wfls-option-text,.wfls-form-field li.wfls-option-textarea,.wfls-form-field td.wfls-option-text{-webkit-flex-grow:1;flex-grow:1;text-align:right;padding-left:1rem;padding-top:0}}ul.wfls-option li.wfls-option-text>input[type="text"],.wfls-form-field li.wfls-option-text>input[type="text"]{max-width:240px}@media (min-width: 768px){ul.wfls-option li.wfls-option-text>input[type="text"],.wfls-form-field li.wfls-option-text>input[type="text"]{max-width:280px}}@media (min-width: 992px){ul.wfls-option li.wfls-option-text>input[type="text"],.wfls-form-field li.wfls-option-text>input[type="text"]{max-width:340px}}ul.wfls-option li.wfls-option-text.wfls-option-full-width>input[type="text"],.wfls-form-field li.wfls-option-text.wfls-option-full-width>input[type="text"]{max-width:100%;width:100%}ul.wfls-option li.wfls-option-textarea,.wfls-form-field li.wfls-option-textarea{min-width:150px;max-width:240px}@media (min-width: 768px){ul.wfls-option li.wfls-option-textarea,.wfls-form-field li.wfls-option-textarea{min-width:200px;max-width:400px}}@media (min-width: 992px){ul.wfls-option li.wfls-option-textarea,.wfls-form-field li.wfls-option-textarea{min-width:250px;max-width:500px}}ul.wfls-option li.wfls-option-textarea>textarea,.wfls-form-field li.wfls-option-textarea>textarea{width:100%;height:80px;min-width:150px;max-width:240px}@media (min-width: 768px){ul.wfls-option li.wfls-option-textarea>textarea,.wfls-form-field li.wfls-option-textarea>textarea{min-width:200px;max-width:280px}}@media (min-width: 992px){ul.wfls-option li.wfls-option-textarea>textarea,.wfls-form-field li.wfls-option-textarea>textarea{min-width:250px;max-width:340px}}ul.wfls-option li.wfls-option-textarea>.wfls-flex-vertical>li>textarea,.wfls-form-field li.wfls-option-textarea>.wfls-flex-vertical>li>textarea{width:100%;height:80px;box-sizing:border-box}ul.wfls-option li.wfls-option-textarea>.wfls-flex-vertical>li.wfls-option-subtitle,.wfls-form-field li.wfls-option-textarea>.wfls-flex-vertical>li.wfls-option-subtitle{width:100%;text-align:left}ul.wfls-option li.wfls-option-switch,.wfls-form-field li.wfls-option-switch{-webkit-flex-grow:1;flex-grow:1}ul.wfls-option li.wfls-option-switch.wfls-right .wfls-switch,.wfls-form-field li.wfls-option-switch.wfls-right .wfls-switch{justify-content:flex-end !important}ul.wfls-option li.wfls-option-select,.wfls-form-field li.wfls-option-select{-webkit-flex-grow:1;flex-grow:1;text-align:right}ul.wfls-option li.wfls-option-select select,ul.wfls-option li.wfls-option-select select option,ul.wfls-option li.wfls-option-select .wfselect2-container--default,.wfls-form-field li.wfls-option-select select,.wfls-form-field li.wfls-option-select select option,.wfls-form-field li.wfls-option-select .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){ul.wfls-option li.wfls-option-select select,ul.wfls-option li.wfls-option-select select option,ul.wfls-option li.wfls-option-select .wfselect2-container--default,.wfls-form-field li.wfls-option-select select,.wfls-form-field li.wfls-option-select select option,.wfls-form-field li.wfls-option-select .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){ul.wfls-option li.wfls-option-select select,ul.wfls-option li.wfls-option-select select option,ul.wfls-option li.wfls-option-select .wfselect2-container--default,.wfls-form-field li.wfls-option-select select,.wfls-form-field li.wfls-option-select select option,.wfls-form-field li.wfls-option-select .wfselect2-container--default{font-size:0.9rem}}ul.wfls-option li.wfls-option-select .wfls-option-select-option,ul.wfls-option li.wfls-option-select .wfselect2-container--default,ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single,.wfls-form-field li.wfls-option-select .wfls-option-select-option,.wfls-form-field li.wfls-option-select .wfselect2-container--default,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}ul.wfls-option li.wfls-option-select .wfls-option-select-option .wfselect2-selection__rendered,ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection__rendered,ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wfls-form-field li.wfls-option-select .wfls-option-select-option .wfselect2-selection__rendered,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection__rendered,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}ul.wfls-option li.wfls-option-select .wfls-option-select-option .wfselect2-selection__arrow,ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection__arrow,ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wfls-form-field li.wfls-option-select .wfls-option-select-option .wfselect2-selection__arrow,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection__arrow,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}ul.wfls-option li.wfls-option-select .wfls-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wfls-option li.wfls-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered,.wfls-form-field li.wfls-option-select .wfls-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wfls-form-field li.wfls-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}ul.wfls-option li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wfls-form-field li.wfls-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}ul.wfls-option li.wfls-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wfls-form-field li.wfls-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}ul.wfls-option.wfls-option-token select,.wfls-form-field.wfls-option-token select{width:240px}@media (min-width: 768px){ul.wfls-option.wfls-option-token select,.wfls-form-field.wfls-option-token select{width:280px}}@media (min-width: 992px){ul.wfls-option.wfls-option-token select,.wfls-form-field.wfls-option-token select{width:320px}}ul.wfls-option.wfls-option-token .wfselect2-container--default,ul.wfls-option.wfls-option-token .wfselect2-container--default .wfselect2-selection--multiple,.wfls-form-field.wfls-option-token .wfselect2-container--default,.wfls-form-field.wfls-option-token .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}ul.wfls-option.wfls-option-token .wfselect2-container--default .wfselect2-selection__choice,ul.wfls-option.wfls-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice,.wfls-form-field.wfls-option-token .wfselect2-container--default .wfselect2-selection__choice,.wfls-form-field.wfls-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#fff;border-color:#e2e2e2;padding:0.5rem}ul.wfls-option.wfls-option-token .wfselect2-container--default .wfselect2-search__field,ul.wfls-option.wfls-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field,.wfls-form-field.wfls-option-token .wfselect2-container--default .wfselect2-search__field,.wfls-form-field.wfls-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}ul.wfls-option.wfls-child-option,.wfls-form-field.wfls-child-option{margin-left:calc(1rem + 20px)}ul.wfls-option .wfls-woocommerce-customer-integration-message,.wfls-form-field .wfls-woocommerce-customer-integration-message{margin-top:0;margin-bottom:0.5rem}ul.wfls-option .wfls-woocommerce-customer-integration-message small,.wfls-form-field .wfls-woocommerce-customer-integration-message small{margin-top:0}#wfls-option-require-2fa{margin-top:1rem}#wfls-option-require-2fa>li>ul{margin-left:1rem}@media (min-width: 768px){#wfls-option-require-2fa>li>ul{margin-left:1.5rem}}#wfls-option-require-2fa>li>ul:first-of-type{margin-left:0}#wfls-option-require-2fa>li>ul>.wfls-option-checkbox{margin:0 1rem 0 0}.wfls-option-sub{padding-left:2rem !important;margin-left:30px !important}.wfls-select2-suppress-dropdown .wfselect2-results,.wfls-select2-suppress-dropdown .wfselect2-dropdown{display:none}.wfls-options-controls{direction:ltr;background:#ffffff;border-bottom:1px solid #e2e2e2;position:absolute;left:160px;right:0px;top:46px;z-index:900;padding-left:15px;padding-right:15px}@media (min-width: 616px){.wfls-options-controls{position:fixed}}.wfls-options-controls .wfls-block{margin:0}@media (min-width: 782px){.wfls-options-controls .wfls-block{margin:0.5rem 0}}.wfls-options-controls,.sticky-menu .wfls-options-controls{top:32px}.folded .wfls-options-controls{left:36px}@media only screen and (max-width: 960px){.auto-fold .wfls-options-controls{left:36px}}.rtl .wfls-options-controls{right:160px;left:0px}.rtl .folded .wfls-options-controls{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wfls-options-controls{right:36px}}@media screen and (max-width: 782px){.wfls-options-controls,.folded .wfls-options-controls,.auto-fold .wfls-options-controls,.rtl .wfls-options-controls,.rtl .folded .wfls-options-controls,.rtl .auto-fold .wfls-options-controls{left:-10px;right:0px}}.wfls-options-controls-spacer{height:45px}@media (min-width: 782px){.wfls-options-controls-spacer{height:75px}}.wfls-options-controls-spacer,.sticky-menu .wfls-options-controls-spacer{top:61px}.wordfence .wfselect2-container .wfselect2-selection--single{border:1px solid #dadada;font-weight:normal;font-size:0.8rem}.wfls-block-title h3{margin:0;font-size:1.25rem}.wfls-save-banner{position:sticky;z-index:9998;top:32px;padding:0.5rem 1.5rem 0.5rem 0;background-color:#FFFFFF;margin-bottom:0.5rem;text-align:right}#wfls-notices{margin-top:15px}#wfls-notices .wfls-admin-notice{margin-left:0px;margin-right:0px}.wfls-success-text,.wfls-notice-text{display:inline-block;vertical-align:middle;line-height:1.3;font-size:16px;font-weight:bold;font-style:italic}.wfls-notice{margin:12px 0;padding:8px;background-color:#ffffe0;border:1px solid #ffd975;border-width:1px 1px 1px 10px}.wfls-notice-text{color:#6d798c}.wfls-success{margin:12px 0;padding:8px;background-color:#ffffff;border:1px solid #16bc9b;border-width:1px 1px 1px 10px}.wfls-success-text{color:#11967a}.wfls-premium-callout{border:1px solid #dfdfdf;background-color:#ffffff;padding:16px;margin:20px 0 0;text-align:center}.wfls-premium-callout ul{margin:8px 0;padding:0 0 0 15px}.wfls-premium-callout ul li{list-style-type:disc;margin:0;padding:0}.wfls-premium-callout .center{text-align:center;margin:0}.wfls-premium-callout .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}table.wfls-table{background-color:transparent;border-collapse:collapse;border-spacing:0}table.wfls-table td,table.wfls-table th{padding:0}.wfls-table caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}.wfls-table th{text-align:left}.wfls-table{width:100%;max-width:100%;margin-bottom:20px}.wfls-table>thead>tr>th,.wfls-table>thead>tr>td,.wfls-table>tbody>tr>th,.wfls-table>tbody>tr>td,.wfls-table>tfoot>tr>th,.wfls-table>tfoot>tr>td{padding:8px;line-height:1.42857;vertical-align:top;border-top:1px solid #ddd}.wfls-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.wfls-table>caption+thead>tr:first-child>th,.wfls-table>caption+thead>tr:first-child>td,.wfls-table>colgroup+thead>tr:first-child>th,.wfls-table>colgroup+thead>tr:first-child>td,.wfls-table>thead:first-child>tr:first-child>th,.wfls-table>thead:first-child>tr:first-child>td{border-top:0}.wfls-table>tbody+tbody{border-top:2px solid #ddd}.wfls-table .wfls-table{background-color:#fff}.wfls-table-header-separators>thead>tr>th{border-left:2px solid #ddd}.wfls-table-header-separators>thead>tr>th:first-child{border-left:0}.wfls-table-condensed>thead>tr>th,.wfls-table-condensed>thead>tr>td,.wfls-table-condensed>tbody>tr>th,.wfls-table-condensed>tbody>tr>td,.wfls-table-condensed>tfoot>tr>th,.wfls-table-condensed>tfoot>tr>td{padding:5px}.wfls-table-expanded>thead>tr>th,.wfls-table-expanded>thead>tr>td,.wfls-table-expanded>tbody>tr>th,.wfls-table-expanded>tbody>tr>td,.wfls-table-expanded>tfoot>tr>th,.wfls-table-expanded>tfoot>tr>td{padding:0.5rem 1rem}@media (min-width: 768px){.wfls-table-expanded>thead>tr>th,.wfls-table-expanded>thead>tr>td,.wfls-table-expanded>tbody>tr>th,.wfls-table-expanded>tbody>tr>td,.wfls-table-expanded>tfoot>tr>th,.wfls-table-expanded>tfoot>tr>td{padding:1rem 1.5rem}}.wfls-table-bordered{border:1px solid #ddd}.wfls-table-bordered>thead>tr>th,.wfls-table-bordered>thead>tr>td,.wfls-table-bordered>tbody>tr>th,.wfls-table-bordered>tbody>tr>td,.wfls-table-bordered>tfoot>tr>th,.wfls-table-bordered>tfoot>tr>td{border:1px solid #ddd}.wfls-table-bordered>thead>tr>th,.wfls-table-bordered>thead>tr>td{border-bottom-width:2px}.wfls-table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.wfls-table-hover>tbody>tr:hover{background-color:#f5f5f5}table.wfls-table col[class*="col-"]{position:static;float:none;display:table-column}table.wfls-table td[class*="col-"],table.wfls-table th[class*="col-"]{position:static;float:none;display:table-cell}.wfls-table>thead>tr>td.active,.wfls-table>thead>tr>th.active,.wfls-table>thead>tr.active>td,.wfls-table>thead>tr.active>th,.wfls-table>tbody>tr>td.active,.wfls-table>tbody>tr>th.active,.wfls-table>tbody>tr.active>td,.wfls-table>tbody>tr.active>th,.wfls-table>tfoot>tr>td.active,.wfls-table>tfoot>tr>th.active,.wfls-table>tfoot>tr.active>td,.wfls-table>tfoot>tr.active>th{background-color:#f5f5f5}.wfls-table-hover>tbody>tr>td.active:hover,.wfls-table-hover>tbody>tr>th.active:hover,.wfls-table-hover>tbody>tr.active:hover>td,.wfls-table-hover>tbody>tr:hover>.active,.wfls-table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.wfls-table>thead>tr>td.success,.wfls-table>thead>tr>th.success,.wfls-table>thead>tr.success>td,.wfls-table>thead>tr.success>th,.wfls-table>tbody>tr>td.success,.wfls-table>tbody>tr>th.success,.wfls-table>tbody>tr.success>td,.wfls-table>tbody>tr.success>th,.wfls-table>tfoot>tr>td.success,.wfls-table>tfoot>tr>th.success,.wfls-table>tfoot>tr.success>td,.wfls-table>tfoot>tr.success>th{background-color:#dff0d8}.wfls-table-hover>tbody>tr>td.success:hover,.wfls-table-hover>tbody>tr>th.success:hover,.wfls-table-hover>tbody>tr.success:hover>td,.wfls-table-hover>tbody>tr:hover>.success,.wfls-table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.wfls-table>thead>tr>td.info,.wfls-table>thead>tr>th.info,.wfls-table>thead>tr.info>td,.wfls-table>thead>tr.info>th,.wfls-table>tbody>tr>td.info,.wfls-table>tbody>tr>th.info,.wfls-table>tbody>tr.info>td,.wfls-table>tbody>tr.info>th,.wfls-table>tfoot>tr>td.info,.wfls-table>tfoot>tr>th.info,.wfls-table>tfoot>tr.info>td,.wfls-table>tfoot>tr.info>th{background-color:#d9edf7}.wfls-table-hover>tbody>tr>td.info:hover,.wfls-table-hover>tbody>tr>th.info:hover,.wfls-table-hover>tbody>tr.info:hover>td,.wfls-table-hover>tbody>tr:hover>.info,.wfls-table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.wfls-table>thead>tr>td.warning,.wfls-table>thead>tr>th.warning,.wfls-table>thead>tr.warning>td,.wfls-table>thead>tr.warning>th,.wfls-table>tbody>tr>td.warning,.wfls-table>tbody>tr>th.warning,.wfls-table>tbody>tr.warning>td,.wfls-table>tbody>tr.warning>th,.wfls-table>tfoot>tr>td.warning,.wfls-table>tfoot>tr>th.warning,.wfls-table>tfoot>tr.warning>td,.wfls-table>tfoot>tr.warning>th{background-color:#fcf8e3}.wfls-table-hover>tbody>tr>td.warning:hover,.wfls-table-hover>tbody>tr>th.warning:hover,.wfls-table-hover>tbody>tr.warning:hover>td,.wfls-table-hover>tbody>tr:hover>.warning,.wfls-table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.wfls-table>thead>tr>td.danger,.wfls-table>thead>tr>th.danger,.wfls-table>thead>tr.danger>td,.wfls-table>thead>tr.danger>th,.wfls-table>tbody>tr>td.danger,.wfls-table>tbody>tr>th.danger,.wfls-table>tbody>tr.danger>td,.wfls-table>tbody>tr.danger>th,.wfls-table>tfoot>tr>td.danger,.wfls-table>tfoot>tr>th.danger,.wfls-table>tfoot>tr.danger>td,.wfls-table>tfoot>tr.danger>th{background-color:#f2dede}.wfls-table-hover>tbody>tr>td.danger:hover,.wfls-table-hover>tbody>tr>th.danger:hover,.wfls-table-hover>tbody>tr.danger:hover>td,.wfls-table-hover>tbody>tr:hover>.danger,.wfls-table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.wfls-table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width: 767px){.wfls-table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.wfls-table-responsive>.wfls-table{margin-bottom:0}.wfls-table-responsive>.wfls-table>thead>tr>th,.wfls-table-responsive>.wfls-table>thead>tr>td,.wfls-table-responsive>.wfls-table>tbody>tr>th,.wfls-table-responsive>.wfls-table>tbody>tr>td,.wfls-table-responsive>.wfls-table>tfoot>tr>th,.wfls-table-responsive>.wfls-table>tfoot>tr>td{white-space:nowrap}.wfls-table-responsive>.wfls-table-bordered{border:0}.wfls-table-responsive>.wfls-table-bordered>thead>tr>th:first-child,.wfls-table-responsive>.wfls-table-bordered>thead>tr>td:first-child,.wfls-table-responsive>.wfls-table-bordered>tbody>tr>th:first-child,.wfls-table-responsive>.wfls-table-bordered>tbody>tr>td:first-child,.wfls-table-responsive>.wfls-table-bordered>tfoot>tr>th:first-child,.wfls-table-responsive>.wfls-table-bordered>tfoot>tr>td:first-child{border-left:0}.wfls-table-responsive>.wfls-table-bordered>thead>tr>th:last-child,.wfls-table-responsive>.wfls-table-bordered>thead>tr>td:last-child,.wfls-table-responsive>.wfls-table-bordered>tbody>tr>th:last-child,.wfls-table-responsive>.wfls-table-bordered>tbody>tr>td:last-child,.wfls-table-responsive>.wfls-table-bordered>tfoot>tr>th:last-child,.wfls-table-responsive>.wfls-table-bordered>tfoot>tr>td:last-child{border-right:0}.wfls-table-responsive>.wfls-table-bordered>tbody>tr:last-child>th,.wfls-table-responsive>.wfls-table-bordered>tbody>tr:last-child>td,.wfls-table-responsive>.wfls-table-bordered>tfoot>tr:last-child>th,.wfls-table-responsive>.wfls-table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.wfls-sortable{position:relative;padding-right:2rem !important}.wfls-sortable .wfls-sorted-ascending,.wfls-sortable .wfls-sorted-descending{display:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.wfls-sortable.wfls-unsorted:hover .wfls-sorted-ascending{display:block}.wfls-sortable.wfls-unsorted,.wfls-sortable.wfls-sorted-ascending,.wfls-sortable.wfls-sorted-descending{cursor:pointer}.wfls-sortable.wfls-unsorted:hover,.wfls-sortable.wfls-sorted-ascending:hover,.wfls-sortable.wfls-sorted-descending:hover{background-color:#e0e0e0}.wfls-sortable.wfls-sorted-ascending,.wfls-sortable.wfls-sorted-descending{background-color:#e0e0e0}.wfls-sortable.wfls-sorted-ascending .wfls-sorted-ascending{display:block}.wfls-sortable.wfls-sorted-descending .wfls-sorted-descending{display:block}.wfls-nav{margin-bottom:0;padding-left:0;list-style:none}.wfls-nav:before,.wfls-nav:after{content:" ";display:table}.wfls-nav:after{clear:both}.wfls-nav>li{position:relative;display:block}.wfls-nav>li>a{position:relative;display:block;padding:8px 12px}.wfls-nav>li>a:hover,.wfls-nav>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wfls-nav>li.wfls-disabled>a{color:#777}.wfls-nav>li.wfls-disabled>a:hover,.wfls-nav>li.wfls-disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.wfls-nav .wfls-open>a,.wfls-nav .wfls-open>a:hover,.wfls-nav .wfls-open>a:focus{background-color:#e2e2e2;border-color:#00709e}.wfls-nav>li>a>img{max-width:none}.wfls-nav-tabs{border-bottom:1px solid #d0d0d0}.wfls-nav-tabs>li{float:left;margin-bottom:-1px}.wfls-nav-tabs>li>a{margin-right:2px;line-height:1.42857;border:1px solid transparent;border-radius:4px 4px 0 0}.wfls-nav-tabs>li>a:hover{border-color:#e2e2e2 #e2e2e2 #d0d0d0}.wfls-nav-tabs>li.wfls-active>a,.wfls-nav-tabs>li.wfls-active>a:hover,.wfls-nav-tabs>li.wfls-active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.wfls-nav-pills>li{float:left}.wfls-nav-pills>li>a{border-radius:4px;text-decoration:none;position:relative;display:block;padding:8px 12px}.wfls-nav-pills>li>a:hover,.wfls-nav-pills>li>a:focus{text-decoration:none !important;background-color:#e2e2e2}.wfls-nav-pills>li+li{margin-left:2px}.wfls-nav-pills>li.wfls-active>a,.wfls-nav-pills>li.wfls-active>a:hover,.wfls-nav-pills>li.wfls-active>a:focus{color:#fff;background-color:#00709e}.wfls-nav-pills.wfls-nav-pills-bordered>li>a{border:1px solid #e2e2e2}.wfls-nav-pills.wfls-nav-pills-connected>li>a{border-radius:0;border-right-width:0px}.wfls-nav-pills.wfls-nav-pills-connected>li+li{margin-left:0}.wfls-nav-pills.wfls-nav-pills-connected>li.active+li>a{border-left-width:0px}.wfls-nav-pills.wfls-nav-pills-connected>li:first-of-type>a{-moz-border-radius:4px 0 0 4px;-webkit-border-radius:4px;border-radius:4px 0 0 4px}.wfls-nav-pills.wfls-nav-pills-connected>li:last-of-type>a{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0;border-radius:0 4px 4px 0;border-right-width:1px}.wfls-nav-stacked>li{float:none}.wfls-nav-stacked>li+li{margin-top:2px;margin-left:0}.wfls-nav-justified,.wfls-nav-tabs.wfls-nav-justified{width:100%}.wfls-nav-justified>li,.wfls-nav-tabs.wfls-nav-justified>li{float:none}.wfls-nav-justified>li>a,.wfls-nav-tabs.wfls-nav-justified>li>a{text-align:center;margin-bottom:5px}.wfls-nav-justified>.wfls-dropdown .wfls-dropdown-menu{top:auto;left:auto}@media (min-width: 768px){.wfls-nav-justified>li,.wfls-nav-tabs.wfls-nav-justified>li{display:table-cell;width:1%}.wfls-nav-justified>li>a,.wfls-nav-tabs.wfls-nav-justified>li>a{margin-bottom:0}}.wfls-nav-tabs-justified,.wfls-nav-tabs.wfls-nav-justified{border-bottom:0}.wfls-nav-tabs-justified>li>a,.wfls-nav-tabs.wfls-nav-justified>li>a{margin-right:0;border-radius:4px}.wfls-nav-tabs-justified>.wfls-active>a,.wfls-nav-tabs.wfls-nav-justified>.wfls-active>a,.wfls-nav-tabs-justified>.wfls-active>a:hover,.wfls-nav-tabs.wfls-nav-justified>.wfls-active>a:hover,.wfls-nav-tabs-justified>.wfls-active>a:focus,.wfls-nav-tabs.wfls-nav-justified>.wfls-active>a:focus{border:1px solid #ddd}@media (min-width: 768px){.wfls-nav-tabs-justified>li>a,.wfls-nav-tabs.wfls-nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.wfls-nav-tabs-justified>.wfls-active>a,.wfls-nav-tabs.wfls-nav-justified>.wfls-active>a,.wfls-nav-tabs-justified>.wfls-active>a:hover,.wfls-nav-tabs.wfls-nav-justified>.wfls-active>a:hover,.wfls-nav-tabs-justified>.wfls-active>a:focus,.wfls-nav-tabs.wfls-nav-justified>.wfls-active>a:focus{border-bottom-color:#fff}}.wfls-tab-content>.wfls-tab-pane{display:none}.wfls-tab-content>.wfls-active{display:block}.wfls-nav-tabs .wfls-dropdown-menu{margin-top:-1px;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wfls-navbar-brand{float:left;padding:12px 8px;font-size:18px;line-height:20px;margin:10px 0 0 0}.wfls-navbar-brand:hover,.wfls-navbar-brand:focus{text-decoration:none}.wfls-navbar-brand>img{display:block}@media (min-width: 768px){.navbar>.container .wfls-navbar-brand,.navbar>.container-fluid .wfls-navbar-brand{margin-left:-8px}}.wfls-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.wfls-dropup,.wfls-dropdown{position:relative}.wfls-dropdown-toggle:focus{outline:0}.wfls-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.wfls-dropdown-menu .wfls-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.wfls-dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857;color:#333;text-decoration:none;white-space:nowrap}.wfls-dropdown-menu>li>a:hover,.wfls-dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.wfls-dropdown-menu>.wfls-active>a,.wfls-dropdown-menu>.wfls-active>a:hover,.wfls-dropdown-menu>.wfls-active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#00709e}.wfls-dropdown-menu>.wfls-disabled>a,.wfls-dropdown-menu>.wfls-disabled>a:hover,.wfls-dropdown-menu>.wfls-disabled>a:focus{color:#777}.wfls-dropdown-menu>.wfls-disabled>a:hover,.wfls-dropdown-menu>.wfls-disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.wfls-open>.wfls-dropdown-menu{display:block}.wfls-open>a{outline:0}.wfls-dropdown-menu-right{left:auto;right:0}.wfls-dropdown-menu-left{left:0;right:auto}.wfls-dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857;color:#777;white-space:nowrap}.wfls-dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.wfls-pull-right>.wfls-dropdown-menu{right:0;left:auto}.wfls-dropup .wfls-caret,.wfls-navbar-fixed-bottom .wfls-dropdown .wfls-caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.wfls-dropup .wfls-dropdown-menu,.wfls-navbar-fixed-bottom .wfls-dropdown .wfls-dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width: 768px){.wfls-navbar-right .wfls-dropdown-menu{right:0;left:auto}.wfls-navbar-right .wfls-dropdown-menu-left{left:0;right:auto}}.wfls-mobile-dropdown{border:1px solid #ccc;margin-left:.5em;padding:5px 10px;font-size:14px;line-height:24px;margin:10px 10px 0 0;background:#f1f1f1;color:#000;font-weight:600;text-decoration:none}.wfls-alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.wfls-alert h4{margin-top:0;color:inherit}.wfls-alert .wfls-alert-link{font-weight:bold}.wfls-alert>p,.wfls-alert>ul{margin-bottom:0}.wfls-alert>p+p{margin-top:5px}.wfls-alert-dismissable,.wfls-alert-dismissible{padding-right:35px}.wfls-alert-dismissable .close,.wfls-alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.wfls-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.wfls-alert-success hr{border-top-color:#c9e2b3}.wfls-alert-success .alert-link{color:#2b542c}.wfls-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.wfls-alert-info hr{border-top-color:#a6e1ec}.wfls-alert-info .alert-link{color:#245269}.wfls-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.wfls-alert-warning hr{border-top-color:#f7e1b5}.wfls-alert-warning .alert-link{color:#66512c}.wfls-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.wfls-alert-danger hr{border-top-color:#e4b9c0}.wfls-alert-danger .alert-link{color:#843534}#wfls-onboarding-standalone-modal{margin-bottom:1rem}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-header{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;background-color:#00709e;color:#ffffff;padding:1rem 2rem}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-header #wfls-onboarding-standalone-modal-dismiss{font-size:1.35rem;color:#ffffff;text-decoration:none}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-header #wfls-onboarding-standalone-modal-dismiss:hover{color:#f1f1f1}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-header>*:last-child{-webkit-flex-grow:1;flex-grow:1;text-align:right}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-content{background-color:#ffffff;padding:1rem 2rem}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-content>p{margin-bottom:0}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-content>p:first-child{margin-top:0}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-footer{background-color:#525355;color:#ffffff;padding:0.5rem 2rem}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-footer>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}#wfls-onboarding-standalone-modal #wfls-onboarding-standalone-modal-footer>ul>li{margin:0;padding:0 0 0 1rem}.wfls-grace-period-container{display:flex;align-items:center;justify-content:left;margin-bottom:1rem;margin-top:1rem}.wfls-grace-period-container .wfls-grace-period-input-container{margin-right:1.5rem;text-align:center}.wfls-grace-period-container .wfls-grace-period-input-container label{display:block;font-weight:bold}.wfls-grace-period-container .wfls-grace-period-input-container input{width:3em;text-align:center}#wfls-reset-grace-period-failed{text-align:center}.wfls-recaptcha-score-history .wfls-recaptcha-chart-container{position:relative;display:inline-block;width:350px;max-width:100%}@media screen and (max-width: 480px){.wfls-recaptcha-score-history .wfls-recaptcha-chart-container{width:70vw}}#toplevel_page_WFLS .wp-menu-image img{max-width:16px;max-height:16px} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/colorbox.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/colorbox.1704213472.css deleted file mode 100644 index 66ac7005..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/colorbox.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -#wflscolorbox,#wflscboxOverlay,#wflscboxWrapper{position:absolute;top:0;left:0;z-index:9999;overflow:hidden}#wflscboxOverlay{position:fixed;width:100%;height:100%}#wflscboxMiddleLeft,#wflscboxBottomLeft{clear:left}#wflscboxContent{position:relative}#wflscboxLoadedContent{overflow:auto}#wflscboxTitle{margin:0}#wflscboxLoadingOverlay,#wflscboxLoadingGraphic{position:absolute;top:0;left:0;width:100%}#wflscboxPrevious,#wflscboxNext,#wflscboxClose,#wflscboxSlideshow{cursor:pointer}.wflscboxPhoto{float:left;margin:auto;border:0;display:block}.wflscboxIframe{width:100%;height:100%;display:block;border:0}#wflscboxOverlay{background:#777;background:-webkit-radial-gradient(rgba(120,120,120,0.8), rgba(100,100,100,0.8) 50%, #464646);background:-moz-radial-gradient(rgba(120,120,120,0.6), rgba(100,100,100,0.8) 20%, #464646)}#wflscboxContent{background:#fff;overflow:hidden;padding:0 0 8px;margin:20px;-webkit-border-radius:3px 3px 2px 2px;-moz-border-radius:3px 3px 2px 2px;border-radius:3px 3px 2px 2px;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.4);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.4);box-shadow:0 2px 4px rgba(0,0,0,0.4);-webkit-background-clip:padding-box}#wflscboxError{padding:50px;border:1px solid #ccc}#wflscboxLoadedContent{margin:10px 20px 28px 20px;font-family:Arial;color:#333;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}#wflscboxTitle{position:absolute;bottom:8px;left:5px;text-align:center;width:100%;color:#949494}#wflscboxCurrent{position:absolute;bottom:8px;left:63px;color:#949494;text-indent:-9999px}#wflscboxSlideshow{position:absolute;bottom:8px;right:35px;color:#0092ef}#wflscboxPrevious{position:absolute;bottom:5px;left:5px;background:url(../img/lightbox-controls.png) no-repeat -75px 0;width:25px;height:25px;text-indent:-9999px}#wflscboxPrevious.hover{background-position:-75px -25px}#wflscboxNext{position:absolute;bottom:5px;left:32px;background:url(../img/lightbox-controls.png) no-repeat -50px 0;width:25px;height:25px;text-indent:-9999px}#wflscboxNext.hover{background-position:-50px -25px}#wflscboxLoadingOverlay{background:url(../img/loading_background.png) no-repeat center center}#wflscboxLoadingGraphic{background:url(../img/loading.gif) no-repeat center center}#wflscboxClose{position:absolute;bottom:5px;right:5px;background:url(../img/lightbox-controls.png) no-repeat -25px 0;width:25px;height:25px;text-indent:-9999px}#wflscboxClose.hover{background-position:-25px -25px}#wflscolorbox.wfls-modal ul,#wflscolorbox.wfls-modal li{padding:0;margin:0}#wflscolorbox.wfls-modal #wflscboxContent{padding:0}#wflscolorbox.wfls-modal #wflscboxLoadedContent{margin:0}#wflscolorbox.wfls-modal .wfls-modal-success{overflow:auto;background-color:#00709e}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-model-success-wrapper{margin:0.25rem;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MS42NSA3MC43OSI+PHBhdGggZD0iTTkwLjA4LDguNzMsODIuOTEsMS41N2E1LjE5LDUuMTksMCwwLDAtNy40MywwTDMzLjMxLDQzLjc0LDE2LjE2LDI2LjU5YTUuMiw1LjIsMCwwLDAtNy40MywwTDEuNTcsMzMuNzdhNS4xOSw1LjE5LDAsMCwwLDAsNy40M2wyOCwyOGE1LjIsNS4yLDAsMCwwLDcuNDMsMEw5MC4wOCwxNi4xN2E1LjE5LDUuMTksMCwwLDAsMC03LjQzWm0wLDAiIGZpbGw9IiMwMDdjYWMiLz48L3N2Zz4=");background-position:top center;background-repeat:no-repeat}#wflscolorbox.wfls-modal .wfls-modal-header{min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;border-bottom:1px solid #d9d9d9}#wflscolorbox.wfls-modal .wfls-modal-header .wfls-modal-header-content{max-width:75%}#wflscolorbox.wfls-modal .wfls-modal-header .wfls-modal-header-content .wfls-modal-title{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.95rem;width:100%;transition:color 0.2s ease-in}#wflscolorbox.wfls-modal .wfls-modal-header .wfls-modal-header-content .wfls-modal-subtitle{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}#wflscolorbox.wfls-modal .wfls-modal-header .wfls-modal-header-action{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end}#wflscolorbox.wfls-modal .wfls-modal-header .wfls-modal-header-action .wfls-modal-header-action-close a{color:#525355}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-modal-header{border-bottom:0px}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-modal-header .wfls-modal-header-content{max-width:100%;width:100%;padding-top:1rem}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-modal-header .wfls-modal-header-content .wfls-modal-title{font-size:1.3125rem;font-weight:300;line-height:1.5;text-align:center;color:#ffffff}#wflscolorbox.wfls-modal .wfls-modal-content{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:1rem}#wflscolorbox.wfls-modal .wfls-modal-content>*:first-child{margin-top:0}#wflscolorbox.wfls-modal .wfls-modal-content select,#wflscolorbox.wfls-modal .wfls-modal-content select option,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){#wflscolorbox.wfls-modal .wfls-modal-content select,#wflscolorbox.wfls-modal .wfls-modal-content select option,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){#wflscolorbox.wfls-modal .wfls-modal-content select,#wflscolorbox.wfls-modal .wfls-modal-content select option,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default{font-size:0.9rem}}#wflscolorbox.wfls-modal .wfls-modal-content .wfls-option-select-option,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}#wflscolorbox.wfls-modal .wfls-modal-content .wfls-option-select-option .wflsselect2-selection__rendered,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection__rendered,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection--single .wflsselect2-selection__rendered{color:#333;line-height:40px}#wflscolorbox.wfls-modal .wfls-modal-content .wfls-option-select-option .wflsselect2-selection__arrow,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection__arrow,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection--single .wflsselect2-selection__arrow{height:38px}#wflscolorbox.wfls-modal .wfls-modal-content .wfls-option-select-option.wflsselect2-container--disabled .wflsselect2-selection__rendered,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default.wflsselect2-container--disabled .wflsselect2-selection__rendered,#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection--single.wflsselect2-container--disabled .wflsselect2-selection__rendered{color:#aaa}#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default .wflsselect2-selection--single .wflsselect2-selection__arrow b{border-color:#333 transparent transparent}#wflscolorbox.wfls-modal .wfls-modal-content .wflsselect2-container--default.wflsselect2-container--open .wflsselect2-selection--single .wflsselect2-selection__arrow b{border-color:transparent transparent #333}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-modal-content{text-align:center;color:#ffffff;padding:0 1.5rem 2rem 1.5rem}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-modal-content a{text-decoration:underline;color:#fff}#wflscolorbox.wfls-modal .wfls-modal-footer{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#f1f1f1;border-top:1px solid #d9d9d9}#wflscolorbox.wfls-modal .wfls-modal-success .wfls-modal-footer{background-color:#ccc;border-top:1px solid #bfbfbf}#wflscolorbox,#wflscolorbox:before,#wflscolorbox:after{box-sizing:content-box}#wflscolorbox h1,#wflscolorbox h2,#wflscolorbox h3,#wflscolorbox h4,#wflscolorbox h5,#wflscolorbox h6{display:block;font-weight:600}#wflscolorbox h1{font-size:2em;margin:.67em 0}#wflscolorbox h2,#wflscolorbox h3{font-size:1.3em;margin:1em 0}#wflscolorbox h1,#wflscolorbox h2,#wflscolorbox h3{color:#23282d}#wflscolorbox p{font-size:13px;line-height:1.5;margin:1em 0} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/embedded.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/embedded.1704213472.css deleted file mode 100644 index 64d79d31..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/embedded.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -#wfls-management-embedded .wfls-flex-row-wrapped{flex-wrap:wrap;-webkit-flex-wrap:wrap}#wfls-management-embedded ul.wfls-recovery-codes{margin-left:0;padding-left:0}#wfls-management-embedded .wfls-btn{text-decoration:none}#wfls-management-embedded #wfls-qr-code-text{margin-top:0.5rem}#wfls-management-embedded>div>div:not(:last-child){margin-bottom:0.75rem}#wfls-management-embedded>div.wfls-no-bottom-column-margin>div:not(:last-child){margin-bottom:0}#wfls-management-embedded input[type=text]{width:auto}.wfls-modal-footer ul{list-style-type:none} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/font-awesome.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/font-awesome.1704213472.css deleted file mode 100644 index d7850836..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/font-awesome.1704213472.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../../../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff");font-weight:normal;font-style:normal}.wfls-fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wfls-fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.wfls-fa-2x{font-size:2em}.wfls-fa-3x{font-size:3em}.wfls-fa-4x{font-size:4em}.wfls-fa-5x{font-size:5em}.wfls-fa-fw{width:1.28571em;text-align:center}.wfls-fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.wfls-fa-ul>li{position:relative}.wfls-fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.wfls-fa-li.wfls-fa-lg{left:-1.85714em}.wfls-fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.wfls-fa-pull-left{float:left}.wfls-fa-pull-right{float:right}.wfls-fa.wfls-fa-pull-left{margin-right:.3em}.wfls-fa.wfls-fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.wfls-fa.pull-left{margin-right:.3em}.wfls-fa.pull-right{margin-left:.3em}.wfls-fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.wfls-fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wfls-fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.wfls-fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wfls-fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.wfls-fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.wfls-fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .wfls-fa-rotate-90,:root .wfls-fa-rotate-180,:root .wfls-fa-rotate-270,:root .wfls-fa-flip-horizontal,:root .wfls-fa-flip-vertical{filter:none}.wfls-fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.wfls-fa-stack-1x,.wfls-fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.wfls-fa-stack-1x{line-height:inherit}.wfls-fa-stack-2x{font-size:2em}.wfls-fa-inverse{color:#fff}.wfls-fa-glass:before{content:""}.wfls-fa-music:before{content:""}.wfls-fa-search:before{content:""}.wfls-fa-envelope-o:before{content:""}.wfls-fa-heart:before{content:""}.wfls-fa-star:before{content:""}.wfls-fa-star-o:before{content:""}.wfls-fa-user:before{content:""}.wfls-fa-film:before{content:""}.wfls-fa-th-large:before{content:""}.wfls-fa-th:before{content:""}.wfls-fa-th-list:before{content:""}.wfls-fa-check:before{content:""}.wfls-fa-remove:before,.wfls-fa-close:before,.wfls-fa-times:before{content:""}.wfls-fa-search-plus:before{content:""}.wfls-fa-search-minus:before{content:""}.wfls-fa-power-off:before{content:""}.wfls-fa-signal:before{content:""}.wfls-fa-gear:before,.wfls-fa-cog:before{content:""}.wfls-fa-trash-o:before{content:""}.wfls-fa-home:before{content:""}.wfls-fa-file-o:before{content:""}.wfls-fa-clock-o:before{content:""}.wfls-fa-road:before{content:""}.wfls-fa-download:before{content:""}.wfls-fa-arrow-circle-o-down:before{content:""}.wfls-fa-arrow-circle-o-up:before{content:""}.wfls-fa-inbox:before{content:""}.wfls-fa-play-circle-o:before{content:""}.wfls-fa-rotate-right:before,.wfls-fa-repeat:before{content:""}.wfls-fa-refresh:before{content:""}.wfls-fa-list-alt:before{content:""}.wfls-fa-lock:before{content:""}.wfls-fa-flag:before{content:""}.wfls-fa-headphones:before{content:""}.wfls-fa-volume-off:before{content:""}.wfls-fa-volume-down:before{content:""}.wfls-fa-volume-up:before{content:""}.wfls-fa-qrcode:before{content:""}.wfls-fa-barcode:before{content:""}.wfls-fa-tag:before{content:""}.wfls-fa-tags:before{content:""}.wfls-fa-book:before{content:""}.wfls-fa-bookmark:before{content:""}.wfls-fa-print:before{content:""}.wfls-fa-camera:before{content:""}.wfls-fa-font:before{content:""}.wfls-fa-bold:before{content:""}.wfls-fa-italic:before{content:""}.wfls-fa-text-height:before{content:""}.wfls-fa-text-width:before{content:""}.wfls-fa-align-left:before{content:""}.wfls-fa-align-center:before{content:""}.wfls-fa-align-right:before{content:""}.wfls-fa-align-justify:before{content:""}.wfls-fa-list:before{content:""}.wfls-fa-dedent:before,.wfls-fa-outdent:before{content:""}.wfls-fa-indent:before{content:""}.wfls-fa-video-camera:before{content:""}.wfls-fa-photo:before,.wfls-fa-image:before,.wfls-fa-picture-o:before{content:""}.wfls-fa-pencil:before{content:""}.wfls-fa-map-marker:before{content:""}.wfls-fa-adjust:before{content:""}.wfls-fa-tint:before{content:""}.wfls-fa-edit:before,.wfls-fa-pencil-square-o:before{content:""}.wfls-fa-share-square-o:before{content:""}.wfls-fa-check-square-o:before{content:""}.wfls-fa-arrows:before{content:""}.wfls-fa-step-backward:before{content:""}.wfls-fa-fast-backward:before{content:""}.wfls-fa-backward:before{content:""}.wfls-fa-play:before{content:""}.wfls-fa-pause:before{content:""}.wfls-fa-stop:before{content:""}.wfls-fa-forward:before{content:""}.wfls-fa-fast-forward:before{content:""}.wfls-fa-step-forward:before{content:""}.wfls-fa-eject:before{content:""}.wfls-fa-chevron-left:before{content:""}.wfls-fa-chevron-right:before{content:""}.wfls-fa-plus-circle:before{content:""}.wfls-fa-minus-circle:before{content:""}.wfls-fa-times-circle:before{content:""}.wfls-fa-check-circle:before{content:""}.wfls-fa-question-circle:before{content:""}.wfls-fa-info-circle:before{content:""}.wfls-fa-crosshairs:before{content:""}.wfls-fa-times-circle-o:before{content:""}.wfls-fa-check-circle-o:before{content:""}.wfls-fa-ban:before{content:""}.wfls-fa-arrow-left:before{content:""}.wfls-fa-arrow-right:before{content:""}.wfls-fa-arrow-up:before{content:""}.wfls-fa-arrow-down:before{content:""}.wfls-fa-mail-forward:before,.wfls-fa-share:before{content:""}.wfls-fa-expand:before{content:""}.wfls-fa-compress:before{content:""}.wfls-fa-plus:before{content:""}.wfls-fa-minus:before{content:""}.wfls-fa-asterisk:before{content:""}.wfls-fa-exclamation-circle:before{content:""}.wfls-fa-gift:before{content:""}.wfls-fa-leaf:before{content:""}.wfls-fa-fire:before{content:""}.wfls-fa-eye:before{content:""}.wfls-fa-eye-slash:before{content:""}.wfls-fa-warning:before,.wfls-fa-exclamation-triangle:before{content:""}.wfls-fa-plane:before{content:""}.wfls-fa-calendar:before{content:""}.wfls-fa-random:before{content:""}.wfls-fa-comment:before{content:""}.wfls-fa-magnet:before{content:""}.wfls-fa-chevron-up:before{content:""}.wfls-fa-chevron-down:before{content:""}.wfls-fa-retweet:before{content:""}.wfls-fa-shopping-cart:before{content:""}.wfls-fa-folder:before{content:""}.wfls-fa-folder-open:before{content:""}.wfls-fa-arrows-v:before{content:""}.wfls-fa-arrows-h:before{content:""}.wfls-fa-bar-chart-o:before,.wfls-fa-bar-chart:before{content:""}.wfls-fa-twitter-square:before{content:""}.wfls-fa-facebook-square:before{content:""}.wfls-fa-camera-retro:before{content:""}.wfls-fa-key:before{content:""}.wfls-fa-gears:before,.wfls-fa-cogs:before{content:""}.wfls-fa-comments:before{content:""}.wfls-fa-thumbs-o-up:before{content:""}.wfls-fa-thumbs-o-down:before{content:""}.wfls-fa-star-half:before{content:""}.wfls-fa-heart-o:before{content:""}.wfls-fa-sign-out:before{content:""}.wfls-fa-linkedin-square:before{content:""}.wfls-fa-thumb-tack:before{content:""}.wfls-fa-external-link:before{content:""}.wfls-fa-sign-in:before{content:""}.wfls-fa-trophy:before{content:""}.wfls-fa-github-square:before{content:""}.wfls-fa-upload:before{content:""}.wfls-fa-lemon-o:before{content:""}.wfls-fa-phone:before{content:""}.wfls-fa-square-o:before{content:""}.wfls-fa-bookmark-o:before{content:""}.wfls-fa-phone-square:before{content:""}.wfls-fa-twitter:before{content:""}.wfls-fa-facebook-f:before,.wfls-fa-facebook:before{content:""}.wfls-fa-github:before{content:""}.wfls-fa-unlock:before{content:""}.wfls-fa-credit-card:before{content:""}.wfls-fa-feed:before,.wfls-fa-rss:before{content:""}.wfls-fa-hdd-o:before{content:""}.wfls-fa-bullhorn:before{content:""}.wfls-fa-bell:before{content:""}.wfls-fa-certificate:before{content:""}.wfls-fa-hand-o-right:before{content:""}.wfls-fa-hand-o-left:before{content:""}.wfls-fa-hand-o-up:before{content:""}.wfls-fa-hand-o-down:before{content:""}.wfls-fa-arrow-circle-left:before{content:""}.wfls-fa-arrow-circle-right:before{content:""}.wfls-fa-arrow-circle-up:before{content:""}.wfls-fa-arrow-circle-down:before{content:""}.wfls-fa-globe:before{content:""}.wfls-fa-wrench:before{content:""}.wfls-fa-tasks:before{content:""}.wfls-fa-filter:before{content:""}.wfls-fa-briefcase:before{content:""}.wfls-fa-arrows-alt:before{content:""}.wfls-fa-group:before,.wfls-fa-users:before{content:""}.wfls-fa-chain:before,.wfls-fa-link:before{content:""}.wfls-fa-cloud:before{content:""}.wfls-fa-flask:before{content:""}.wfls-fa-cut:before,.wfls-fa-scissors:before{content:""}.wfls-fa-copy:before,.wfls-fa-files-o:before{content:""}.wfls-fa-paperclip:before{content:""}.wfls-fa-save:before,.wfls-fa-floppy-o:before{content:""}.wfls-fa-square:before{content:""}.wfls-fa-navicon:before,.wfls-fa-reorder:before,.wfls-fa-bars:before{content:""}.wfls-fa-list-ul:before{content:""}.wfls-fa-list-ol:before{content:""}.wfls-fa-strikethrough:before{content:""}.wfls-fa-underline:before{content:""}.wfls-fa-table:before{content:""}.wfls-fa-magic:before{content:""}.wfls-fa-truck:before{content:""}.wfls-fa-pinterest:before{content:""}.wfls-fa-pinterest-square:before{content:""}.wfls-fa-google-plus-square:before{content:""}.wfls-fa-google-plus:before{content:""}.wfls-fa-money:before{content:""}.wfls-fa-caret-down:before{content:""}.wfls-fa-caret-up:before{content:""}.wfls-fa-caret-left:before{content:""}.wfls-fa-caret-right:before{content:""}.wfls-fa-columns:before{content:""}.wfls-fa-unsorted:before,.wfls-fa-sort:before{content:""}.wfls-fa-sort-down:before,.wfls-fa-sort-desc:before{content:""}.wfls-fa-sort-up:before,.wfls-fa-sort-asc:before{content:""}.wfls-fa-envelope:before{content:""}.wfls-fa-linkedin:before{content:""}.wfls-fa-rotate-left:before,.wfls-fa-undo:before{content:""}.wfls-fa-legal:before,.wfls-fa-gavel:before{content:""}.wfls-fa-dashboard:before,.wfls-fa-tachometer:before{content:""}.wfls-fa-comment-o:before{content:""}.wfls-fa-comments-o:before{content:""}.wfls-fa-flash:before,.wfls-fa-bolt:before{content:""}.wfls-fa-sitemap:before{content:""}.wfls-fa-umbrella:before{content:""}.wfls-fa-paste:before,.wfls-fa-clipboard:before{content:""}.wfls-fa-lightbulb-o:before{content:""}.wfls-fa-exchange:before{content:""}.wfls-fa-cloud-download:before{content:""}.wfls-fa-cloud-upload:before{content:""}.wfls-fa-user-md:before{content:""}.wfls-fa-stethoscope:before{content:""}.wfls-fa-suitcase:before{content:""}.wfls-fa-bell-o:before{content:""}.wfls-fa-coffee:before{content:""}.wfls-fa-cutlery:before{content:""}.wfls-fa-file-text-o:before{content:""}.wfls-fa-building-o:before{content:""}.wfls-fa-hospital-o:before{content:""}.wfls-fa-ambulance:before{content:""}.wfls-fa-medkit:before{content:""}.wfls-fa-fighter-jet:before{content:""}.wfls-fa-beer:before{content:""}.wfls-fa-h-square:before{content:""}.wfls-fa-plus-square:before{content:""}.wfls-fa-angle-double-left:before{content:""}.wfls-fa-angle-double-right:before{content:""}.wfls-fa-angle-double-up:before{content:""}.wfls-fa-angle-double-down:before{content:""}.wfls-fa-angle-left:before{content:""}.wfls-fa-angle-right:before{content:""}.wfls-fa-angle-up:before{content:""}.wfls-fa-angle-down:before{content:""}.wfls-fa-desktop:before{content:""}.wfls-fa-laptop:before{content:""}.wfls-fa-tablet:before{content:""}.wfls-fa-mobile-phone:before,.wfls-fa-mobile:before{content:""}.wfls-fa-circle-o:before{content:""}.wfls-fa-quote-left:before{content:""}.wfls-fa-quote-right:before{content:""}.wfls-fa-spinner:before{content:""}.wfls-fa-circle:before{content:""}.wfls-fa-mail-reply:before,.wfls-fa-reply:before{content:""}.wfls-fa-github-alt:before{content:""}.wfls-fa-folder-o:before{content:""}.wfls-fa-folder-open-o:before{content:""}.wfls-fa-smile-o:before{content:""}.wfls-fa-frown-o:before{content:""}.wfls-fa-meh-o:before{content:""}.wfls-fa-gamepad:before{content:""}.wfls-fa-keyboard-o:before{content:""}.wfls-fa-flag-o:before{content:""}.wfls-fa-flag-checkered:before{content:""}.wfls-fa-terminal:before{content:""}.wfls-fa-code:before{content:""}.wfls-fa-mail-reply-all:before,.wfls-fa-reply-all:before{content:""}.wfls-fa-star-half-empty:before,.wfls-fa-star-half-full:before,.wfls-fa-star-half-o:before{content:""}.wfls-fa-location-arrow:before{content:""}.wfls-fa-crop:before{content:""}.wfls-fa-code-fork:before{content:""}.wfls-fa-unlink:before,.wfls-fa-chain-broken:before{content:""}.wfls-fa-question:before{content:""}.wfls-fa-info:before{content:""}.wfls-fa-exclamation:before{content:""}.wfls-fa-superscript:before{content:""}.wfls-fa-subscript:before{content:""}.wfls-fa-eraser:before{content:""}.wfls-fa-puzzle-piece:before{content:""}.wfls-fa-microphone:before{content:""}.wfls-fa-microphone-slash:before{content:""}.wfls-fa-shield:before{content:""}.wfls-fa-calendar-o:before{content:""}.wfls-fa-fire-extinguisher:before{content:""}.wfls-fa-rocket:before{content:""}.wfls-fa-maxcdn:before{content:""}.wfls-fa-chevron-circle-left:before{content:""}.wfls-fa-chevron-circle-right:before{content:""}.wfls-fa-chevron-circle-up:before{content:""}.wfls-fa-chevron-circle-down:before{content:""}.wfls-fa-html5:before{content:""}.wfls-fa-css3:before{content:""}.wfls-fa-anchor:before{content:""}.wfls-fa-unlock-alt:before{content:""}.wfls-fa-bullseye:before{content:""}.wfls-fa-ellipsis-h:before{content:""}.wfls-fa-ellipsis-v:before{content:""}.wfls-fa-rss-square:before{content:""}.wfls-fa-play-circle:before{content:""}.wfls-fa-ticket:before{content:""}.wfls-fa-minus-square:before{content:""}.wfls-fa-minus-square-o:before{content:""}.wfls-fa-level-up:before{content:""}.wfls-fa-level-down:before{content:""}.wfls-fa-check-square:before{content:""}.wfls-fa-pencil-square:before{content:""}.wfls-fa-external-link-square:before{content:""}.wfls-fa-share-square:before{content:""}.wfls-fa-compass:before{content:""}.wfls-fa-toggle-down:before,.wfls-fa-caret-square-o-down:before{content:""}.wfls-fa-toggle-up:before,.wfls-fa-caret-square-o-up:before{content:""}.wfls-fa-toggle-right:before,.wfls-fa-caret-square-o-right:before{content:""}.wfls-fa-euro:before,.wfls-fa-eur:before{content:""}.wfls-fa-gbp:before{content:""}.wfls-fa-dollar:before,.wfls-fa-usd:before{content:""}.wfls-fa-rupee:before,.wfls-fa-inr:before{content:""}.wfls-fa-cny:before,.wfls-fa-rmb:before,.wfls-fa-yen:before,.wfls-fa-jpy:before{content:""}.wfls-fa-ruble:before,.wfls-fa-rouble:before,.wfls-fa-rub:before{content:""}.wfls-fa-won:before,.wfls-fa-krw:before{content:""}.wfls-fa-bitcoin:before,.wfls-fa-btc:before{content:""}.wfls-fa-file:before{content:""}.wfls-fa-file-text:before{content:""}.wfls-fa-sort-alpha-asc:before{content:""}.wfls-fa-sort-alpha-desc:before{content:""}.wfls-fa-sort-amount-asc:before{content:""}.wfls-fa-sort-amount-desc:before{content:""}.wfls-fa-sort-numeric-asc:before{content:""}.wfls-fa-sort-numeric-desc:before{content:""}.wfls-fa-thumbs-up:before{content:""}.wfls-fa-thumbs-down:before{content:""}.wfls-fa-youtube-square:before{content:""}.wfls-fa-youtube:before{content:""}.wfls-fa-xing:before{content:""}.wfls-fa-xing-square:before{content:""}.wfls-fa-youtube-play:before{content:""}.wfls-fa-dropbox:before{content:""}.wfls-fa-stack-overflow:before{content:""}.wfls-fa-instagram:before{content:""}.wfls-fa-flickr:before{content:""}.wfls-fa-adn:before{content:""}.wfls-fa-bitbucket:before{content:""}.wfls-fa-bitbucket-square:before{content:""}.wfls-fa-tumblr:before{content:""}.wfls-fa-tumblr-square:before{content:""}.wfls-fa-long-arrow-down:before{content:""}.wfls-fa-long-arrow-up:before{content:""}.wfls-fa-long-arrow-left:before{content:""}.wfls-fa-long-arrow-right:before{content:""}.wfls-fa-apple:before{content:""}.wfls-fa-windows:before{content:""}.wfls-fa-android:before{content:""}.wfls-fa-linux:before{content:""}.wfls-fa-dribbble:before{content:""}.wfls-fa-skype:before{content:""}.wfls-fa-foursquare:before{content:""}.wfls-fa-trello:before{content:""}.wfls-fa-female:before{content:""}.wfls-fa-male:before{content:""}.wfls-fa-gittip:before,.wfls-fa-gratipay:before{content:""}.wfls-fa-sun-o:before{content:""}.wfls-fa-moon-o:before{content:""}.wfls-fa-archive:before{content:""}.wfls-fa-bug:before{content:""}.wfls-fa-vk:before{content:""}.wfls-fa-weibo:before{content:""}.wfls-fa-renren:before{content:""}.wfls-fa-pagelines:before{content:""}.wfls-fa-stack-exchange:before{content:""}.wfls-fa-arrow-circle-o-right:before{content:""}.wfls-fa-arrow-circle-o-left:before{content:""}.wfls-fa-toggle-left:before,.wfls-fa-caret-square-o-left:before{content:""}.wfls-fa-dot-circle-o:before{content:""}.wfls-fa-wheelchair:before{content:""}.wfls-fa-vimeo-square:before{content:""}.wfls-fa-turkish-lira:before,.wfls-fa-try:before{content:""}.wfls-fa-plus-square-o:before{content:""}.wfls-fa-space-shuttle:before{content:""}.wfls-fa-slack:before{content:""}.wfls-fa-envelope-square:before{content:""}.wfls-fa-wordpress:before{content:""}.wfls-fa-openid:before{content:""}.wfls-fa-institution:before,.wfls-fa-bank:before,.wfls-fa-university:before{content:""}.wfls-fa-mortar-board:before,.wfls-fa-graduation-cap:before{content:""}.wfls-fa-yahoo:before{content:""}.wfls-fa-google:before{content:""}.wfls-fa-reddit:before{content:""}.wfls-fa-reddit-square:before{content:""}.wfls-fa-stumbleupon-circle:before{content:""}.wfls-fa-stumbleupon:before{content:""}.wfls-fa-delicious:before{content:""}.wfls-fa-digg:before{content:""}.wfls-fa-pied-piper-pp:before{content:""}.wfls-fa-pied-piper-alt:before{content:""}.wfls-fa-drupal:before{content:""}.wfls-fa-joomla:before{content:""}.wfls-fa-language:before{content:""}.wfls-fa-fax:before{content:""}.wfls-fa-building:before{content:""}.wfls-fa-child:before{content:""}.wfls-fa-paw:before{content:""}.wfls-fa-spoon:before{content:""}.wfls-fa-cube:before{content:""}.wfls-fa-cubes:before{content:""}.wfls-fa-behance:before{content:""}.wfls-fa-behance-square:before{content:""}.wfls-fa-steam:before{content:""}.wfls-fa-steam-square:before{content:""}.wfls-fa-recycle:before{content:""}.wfls-fa-automobile:before,.wfls-fa-car:before{content:""}.wfls-fa-cab:before,.wfls-fa-taxi:before{content:""}.wfls-fa-tree:before{content:""}.wfls-fa-spotify:before{content:""}.wfls-fa-deviantart:before{content:""}.wfls-fa-soundcloud:before{content:""}.wfls-fa-database:before{content:""}.wfls-fa-file-pdf-o:before{content:""}.wfls-fa-file-word-o:before{content:""}.wfls-fa-file-excel-o:before{content:""}.wfls-fa-file-powerpoint-o:before{content:""}.wfls-fa-file-photo-o:before,.wfls-fa-file-picture-o:before,.wfls-fa-file-image-o:before{content:""}.wfls-fa-file-zip-o:before,.wfls-fa-file-archive-o:before{content:""}.wfls-fa-file-sound-o:before,.wfls-fa-file-audio-o:before{content:""}.wfls-fa-file-movie-o:before,.wfls-fa-file-video-o:before{content:""}.wfls-fa-file-code-o:before{content:""}.wfls-fa-vine:before{content:""}.wfls-fa-codepen:before{content:""}.wfls-fa-jsfiddle:before{content:""}.wfls-fa-life-bouy:before,.wfls-fa-life-buoy:before,.wfls-fa-life-saver:before,.wfls-fa-support:before,.wfls-fa-life-ring:before{content:""}.wfls-fa-circle-o-notch:before{content:""}.wfls-fa-ra:before,.wfls-fa-resistance:before,.wfls-fa-rebel:before{content:""}.wfls-fa-ge:before,.wfls-fa-empire:before{content:""}.wfls-fa-git-square:before{content:""}.wfls-fa-git:before{content:""}.wfls-fa-y-combinator-square:before,.wfls-fa-yc-square:before,.wfls-fa-hacker-news:before{content:""}.wfls-fa-tencent-weibo:before{content:""}.wfls-fa-qq:before{content:""}.wfls-fa-wechat:before,.wfls-fa-weixin:before{content:""}.wfls-fa-send:before,.wfls-fa-paper-plane:before{content:""}.wfls-fa-send-o:before,.wfls-fa-paper-plane-o:before{content:""}.wfls-fa-history:before{content:""}.wfls-fa-circle-thin:before{content:""}.wfls-fa-header:before{content:""}.wfls-fa-paragraph:before{content:""}.wfls-fa-sliders:before{content:""}.wfls-fa-share-alt:before{content:""}.wfls-fa-share-alt-square:before{content:""}.wfls-fa-bomb:before{content:""}.wfls-fa-soccer-ball-o:before,.wfls-fa-futbol-o:before{content:""}.wfls-fa-tty:before{content:""}.wfls-fa-binoculars:before{content:""}.wfls-fa-plug:before{content:""}.wfls-fa-slideshare:before{content:""}.wfls-fa-twitch:before{content:""}.wfls-fa-yelp:before{content:""}.wfls-fa-newspaper-o:before{content:""}.wfls-fa-wifi:before{content:""}.wfls-fa-calculator:before{content:""}.wfls-fa-paypal:before{content:""}.wfls-fa-google-wallet:before{content:""}.wfls-fa-cc-visa:before{content:""}.wfls-fa-cc-mastercard:before{content:""}.wfls-fa-cc-discover:before{content:""}.wfls-fa-cc-amex:before{content:""}.wfls-fa-cc-paypal:before{content:""}.wfls-fa-cc-stripe:before{content:""}.wfls-fa-bell-slash:before{content:""}.wfls-fa-bell-slash-o:before{content:""}.wfls-fa-trash:before{content:""}.wfls-fa-copyright:before{content:""}.wfls-fa-at:before{content:""}.wfls-fa-eyedropper:before{content:""}.wfls-fa-paint-brush:before{content:""}.wfls-fa-birthday-cake:before{content:""}.wfls-fa-area-chart:before{content:""}.wfls-fa-pie-chart:before{content:""}.wfls-fa-line-chart:before{content:""}.wfls-fa-lastfm:before{content:""}.wfls-fa-lastfm-square:before{content:""}.wfls-fa-toggle-off:before{content:""}.wfls-fa-toggle-on:before{content:""}.wfls-fa-bicycle:before{content:""}.wfls-fa-bus:before{content:""}.wfls-fa-ioxhost:before{content:""}.wfls-fa-angellist:before{content:""}.wfls-fa-cc:before{content:""}.wfls-fa-shekel:before,.wfls-fa-sheqel:before,.wfls-fa-ils:before{content:""}.wfls-fa-meanpath:before{content:""}.wfls-fa-buysellads:before{content:""}.wfls-fa-connectdevelop:before{content:""}.wfls-fa-dashcube:before{content:""}.wfls-fa-forumbee:before{content:""}.wfls-fa-leanpub:before{content:""}.wfls-fa-sellsy:before{content:""}.wfls-fa-shirtsinbulk:before{content:""}.wfls-fa-simplybuilt:before{content:""}.wfls-fa-skyatlas:before{content:""}.wfls-fa-cart-plus:before{content:""}.wfls-fa-cart-arrow-down:before{content:""}.wfls-fa-diamond:before{content:""}.wfls-fa-ship:before{content:""}.wfls-fa-user-secret:before{content:""}.wfls-fa-motorcycle:before{content:""}.wfls-fa-street-view:before{content:""}.wfls-fa-heartbeat:before{content:""}.wfls-fa-venus:before{content:""}.wfls-fa-mars:before{content:""}.wfls-fa-mercury:before{content:""}.wfls-fa-intersex:before,.wfls-fa-transgender:before{content:""}.wfls-fa-transgender-alt:before{content:""}.wfls-fa-venus-double:before{content:""}.wfls-fa-mars-double:before{content:""}.wfls-fa-venus-mars:before{content:""}.wfls-fa-mars-stroke:before{content:""}.wfls-fa-mars-stroke-v:before{content:""}.wfls-fa-mars-stroke-h:before{content:""}.wfls-fa-neuter:before{content:""}.wfls-fa-genderless:before{content:""}.wfls-fa-facebook-official:before{content:""}.wfls-fa-pinterest-p:before{content:""}.wfls-fa-whatsapp:before{content:""}.wfls-fa-server:before{content:""}.wfls-fa-user-plus:before{content:""}.wfls-fa-user-times:before{content:""}.wfls-fa-hotel:before,.wfls-fa-bed:before{content:""}.wfls-fa-viacoin:before{content:""}.wfls-fa-train:before{content:""}.wfls-fa-subway:before{content:""}.wfls-fa-medium:before{content:""}.wfls-fa-yc:before,.wfls-fa-y-combinator:before{content:""}.wfls-fa-optin-monster:before{content:""}.wfls-fa-opencart:before{content:""}.wfls-fa-expeditedssl:before{content:""}.wfls-fa-battery-4:before,.wfls-fa-battery:before,.wfls-fa-battery-full:before{content:""}.wfls-fa-battery-3:before,.wfls-fa-battery-three-quarters:before{content:""}.wfls-fa-battery-2:before,.wfls-fa-battery-half:before{content:""}.wfls-fa-battery-1:before,.wfls-fa-battery-quarter:before{content:""}.wfls-fa-battery-0:before,.wfls-fa-battery-empty:before{content:""}.wfls-fa-mouse-pointer:before{content:""}.wfls-fa-i-cursor:before{content:""}.wfls-fa-object-group:before{content:""}.wfls-fa-object-ungroup:before{content:""}.wfls-fa-sticky-note:before{content:""}.wfls-fa-sticky-note-o:before{content:""}.wfls-fa-cc-jcb:before{content:""}.wfls-fa-cc-diners-club:before{content:""}.wfls-fa-clone:before{content:""}.wfls-fa-balance-scale:before{content:""}.wfls-fa-hourglass-o:before{content:""}.wfls-fa-hourglass-1:before,.wfls-fa-hourglass-start:before{content:""}.wfls-fa-hourglass-2:before,.wfls-fa-hourglass-half:before{content:""}.wfls-fa-hourglass-3:before,.wfls-fa-hourglass-end:before{content:""}.wfls-fa-hourglass:before{content:""}.wfls-fa-hand-grab-o:before,.wfls-fa-hand-rock-o:before{content:""}.wfls-fa-hand-stop-o:before,.wfls-fa-hand-paper-o:before{content:""}.wfls-fa-hand-scissors-o:before{content:""}.wfls-fa-hand-lizard-o:before{content:""}.wfls-fa-hand-spock-o:before{content:""}.wfls-fa-hand-pointer-o:before{content:""}.wfls-fa-hand-peace-o:before{content:""}.wfls-fa-trademark:before{content:""}.wfls-fa-registered:before{content:""}.wfls-fa-creative-commons:before{content:""}.wfls-fa-gg:before{content:""}.wfls-fa-gg-circle:before{content:""}.wfls-fa-tripadvisor:before{content:""}.wfls-fa-odnoklassniki:before{content:""}.wfls-fa-odnoklassniki-square:before{content:""}.wfls-fa-get-pocket:before{content:""}.wfls-fa-wikipedia-w:before{content:""}.wfls-fa-safari:before{content:""}.wfls-fa-chrome:before{content:""}.wfls-fa-firefox:before{content:""}.wfls-fa-opera:before{content:""}.wfls-fa-internet-explorer:before{content:""}.wfls-fa-tv:before,.wfls-fa-television:before{content:""}.wfls-fa-contao:before{content:""}.wfls-fa-500px:before{content:""}.wfls-fa-amazon:before{content:""}.wfls-fa-calendar-plus-o:before{content:""}.wfls-fa-calendar-minus-o:before{content:""}.wfls-fa-calendar-times-o:before{content:""}.wfls-fa-calendar-check-o:before{content:""}.wfls-fa-industry:before{content:""}.wfls-fa-map-pin:before{content:""}.wfls-fa-map-signs:before{content:""}.wfls-fa-map-o:before{content:""}.wfls-fa-map:before{content:""}.wfls-fa-commenting:before{content:""}.wfls-fa-commenting-o:before{content:""}.wfls-fa-houzz:before{content:""}.wfls-fa-vimeo:before{content:""}.wfls-fa-black-tie:before{content:""}.wfls-fa-fonticons:before{content:""}.wfls-fa-reddit-alien:before{content:""}.wfls-fa-edge:before{content:""}.wfls-fa-credit-card-alt:before{content:""}.wfls-fa-codiepie:before{content:""}.wfls-fa-modx:before{content:""}.wfls-fa-fort-awesome:before{content:""}.wfls-fa-usb:before{content:""}.wfls-fa-product-hunt:before{content:""}.wfls-fa-mixcloud:before{content:""}.wfls-fa-scribd:before{content:""}.wfls-fa-pause-circle:before{content:""}.wfls-fa-pause-circle-o:before{content:""}.wfls-fa-stop-circle:before{content:""}.wfls-fa-stop-circle-o:before{content:""}.wfls-fa-shopping-bag:before{content:""}.wfls-fa-shopping-basket:before{content:""}.wfls-fa-hashtag:before{content:""}.wfls-fa-bluetooth:before{content:""}.wfls-fa-bluetooth-b:before{content:""}.wfls-fa-percent:before{content:""}.wfls-fa-gitlab:before{content:""}.wfls-fa-wpbeginner:before{content:""}.wfls-fa-wpforms:before{content:""}.wfls-fa-envira:before{content:""}.wfls-fa-universal-access:before{content:""}.wfls-fa-wheelchair-alt:before{content:""}.wfls-fa-question-circle-o:before{content:""}.wfls-fa-blind:before{content:""}.wfls-fa-audio-description:before{content:""}.wfls-fa-volume-control-phone:before{content:""}.wfls-fa-braille:before{content:""}.wfls-fa-assistive-listening-systems:before{content:""}.wfls-fa-asl-interpreting:before,.wfls-fa-american-sign-language-interpreting:before{content:""}.wfls-fa-deafness:before,.wfls-fa-hard-of-hearing:before,.wfls-fa-deaf:before{content:""}.wfls-fa-glide:before{content:""}.wfls-fa-glide-g:before{content:""}.wfls-fa-signing:before,.wfls-fa-sign-language:before{content:""}.wfls-fa-low-vision:before{content:""}.wfls-fa-viadeo:before{content:""}.wfls-fa-viadeo-square:before{content:""}.wfls-fa-snapchat:before{content:""}.wfls-fa-snapchat-ghost:before{content:""}.wfls-fa-snapchat-square:before{content:""}.wfls-fa-pied-piper:before{content:""}.wfls-fa-first-order:before{content:""}.wfls-fa-yoast:before{content:""}.wfls-fa-themeisle:before{content:""}.wfls-fa-google-plus-circle:before,.wfls-fa-google-plus-official:before{content:""}.wfls-fa-fa:before,.wfls-fa-font-awesome:before{content:""}.wfls-fa-handshake-o:before{content:""}.wfls-fa-envelope-open:before{content:""}.wfls-fa-envelope-open-o:before{content:""}.wfls-fa-linode:before{content:""}.wfls-fa-address-book:before{content:""}.wfls-fa-address-book-o:before{content:""}.wfls-fa-vcard:before,.wfls-fa-address-card:before{content:""}.wfls-fa-vcard-o:before,.wfls-fa-address-card-o:before{content:""}.wfls-fa-user-circle:before{content:""}.wfls-fa-user-circle-o:before{content:""}.wfls-fa-user-o:before{content:""}.wfls-fa-id-badge:before{content:""}.wfls-fa-drivers-license:before,.wfls-fa-id-card:before{content:""}.wfls-fa-drivers-license-o:before,.wfls-fa-id-card-o:before{content:""}.wfls-fa-quora:before{content:""}.wfls-fa-free-code-camp:before{content:""}.wfls-fa-telegram:before{content:""}.wfls-fa-thermometer-4:before,.wfls-fa-thermometer:before,.wfls-fa-thermometer-full:before{content:""}.wfls-fa-thermometer-3:before,.wfls-fa-thermometer-three-quarters:before{content:""}.wfls-fa-thermometer-2:before,.wfls-fa-thermometer-half:before{content:""}.wfls-fa-thermometer-1:before,.wfls-fa-thermometer-quarter:before{content:""}.wfls-fa-thermometer-0:before,.wfls-fa-thermometer-empty:before{content:""}.wfls-fa-shower:before{content:""}.wfls-fa-bathtub:before,.wfls-fa-s15:before,.wfls-fa-bath:before{content:""}.wfls-fa-podcast:before{content:""}.wfls-fa-window-maximize:before{content:""}.wfls-fa-window-minimize:before{content:""}.wfls-fa-window-restore:before{content:""}.wfls-fa-times-rectangle:before,.wfls-fa-window-close:before{content:""}.wfls-fa-times-rectangle-o:before,.wfls-fa-window-close-o:before{content:""}.wfls-fa-bandcamp:before{content:""}.wfls-fa-grav:before{content:""}.wfls-fa-etsy:before{content:""}.wfls-fa-imdb:before{content:""}.wfls-fa-ravelry:before{content:""}.wfls-fa-eercast:before{content:""}.wfls-fa-microchip:before{content:""}.wfls-fa-snowflake-o:before{content:""}.wfls-fa-superpowers:before{content:""}.wfls-fa-wpexplorer:before{content:""}.wfls-fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/ionicons.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/ionicons.1704213472.css deleted file mode 100644 index 378d5d3c..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/ionicons.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:"Ionicons";src:url("../../../fonts/ionicons.woff?v=2.0.0") format("woff");font-weight:normal;font-style:normal}.wf-ion,.wf-ionicons,.wfls-ion-alert:before,.wfls-ion-alert-circled:before,.wfls-ion-android-add:before,.wfls-ion-android-add-circle:before,.wfls-ion-android-alarm-clock:before,.wfls-ion-android-alert:before,.wfls-ion-android-apps:before,.wfls-ion-android-archive:before,.wfls-ion-android-arrow-back:before,.wfls-ion-android-arrow-down:before,.wfls-ion-android-arrow-dropdown:before,.wfls-ion-android-arrow-dropdown-circle:before,.wfls-ion-android-arrow-dropleft:before,.wfls-ion-android-arrow-dropleft-circle:before,.wfls-ion-android-arrow-dropright:before,.wfls-ion-android-arrow-dropright-circle:before,.wfls-ion-android-arrow-dropup:before,.wfls-ion-android-arrow-dropup-circle:before,.wfls-ion-android-arrow-forward:before,.wfls-ion-android-arrow-up:before,.wfls-ion-android-attach:before,.wfls-ion-android-bar:before,.wfls-ion-android-bicycle:before,.wfls-ion-android-boat:before,.wfls-ion-android-bookmark:before,.wfls-ion-android-bulb:before,.wfls-ion-android-bus:before,.wfls-ion-android-calendar:before,.wfls-ion-android-call:before,.wfls-ion-android-camera:before,.wfls-ion-android-cancel:before,.wfls-ion-android-car:before,.wfls-ion-android-cart:before,.wfls-ion-android-chat:before,.wfls-ion-android-checkbox:before,.wfls-ion-android-checkbox-blank:before,.wfls-ion-android-checkbox-outline:before,.wfls-ion-android-checkbox-outline-blank:before,.wfls-ion-android-checkmark-circle:before,.wfls-ion-android-clipboard:before,.wfls-ion-android-close:before,.wfls-ion-android-cloud:before,.wfls-ion-android-cloud-circle:before,.wfls-ion-android-cloud-done:before,.wfls-ion-android-cloud-outline:before,.wfls-ion-android-color-palette:before,.wfls-ion-android-compass:before,.wfls-ion-android-contact:before,.wfls-ion-android-contacts:before,.wfls-ion-android-contract:before,.wfls-ion-android-create:before,.wfls-ion-android-delete:before,.wfls-ion-android-desktop:before,.wfls-ion-android-document:before,.wfls-ion-android-done:before,.wfls-ion-android-done-all:before,.wfls-ion-android-download:before,.wfls-ion-android-drafts:before,.wfls-ion-android-exit:before,.wfls-ion-android-expand:before,.wfls-ion-android-favorite:before,.wfls-ion-android-favorite-outline:before,.wfls-ion-android-film:before,.wfls-ion-android-folder:before,.wfls-ion-android-folder-open:before,.wfls-ion-android-funnel:before,.wfls-ion-android-globe:before,.wfls-ion-android-hand:before,.wfls-ion-android-hangout:before,.wfls-ion-android-happy:before,.wfls-ion-android-home:before,.wfls-ion-android-image:before,.wfls-ion-android-laptop:before,.wfls-ion-android-list:before,.wfls-ion-android-locate:before,.wfls-ion-android-lock:before,.wfls-ion-android-mail:before,.wfls-ion-android-map:before,.wfls-ion-android-menu:before,.wfls-ion-android-microphone:before,.wfls-ion-android-microphone-off:before,.wfls-ion-android-more-horizontal:before,.wfls-ion-android-more-vertical:before,.wfls-ion-android-navigate:before,.wfls-ion-android-notifications:before,.wfls-ion-android-notifications-none:before,.wfls-ion-android-notifications-off:before,.wfls-ion-android-open:before,.wfls-ion-android-options:before,.wfls-ion-android-people:before,.wfls-ion-android-person:before,.wfls-ion-android-person-add:before,.wfls-ion-android-phone-landscape:before,.wfls-ion-android-phone-portrait:before,.wfls-ion-android-pin:before,.wfls-ion-android-plane:before,.wfls-ion-android-playstore:before,.wfls-ion-android-print:before,.wfls-ion-android-radio-button-off:before,.wfls-ion-android-radio-button-on:before,.wfls-ion-android-refresh:before,.wfls-ion-android-remove:before,.wfls-ion-android-remove-circle:before,.wfls-ion-android-restaurant:before,.wfls-ion-android-sad:before,.wfls-ion-android-search:before,.wfls-ion-android-send:before,.wfls-ion-android-settings:before,.wfls-ion-android-share:before,.wfls-ion-android-share-alt:before,.wfls-ion-android-star:before,.wfls-ion-android-star-half:before,.wfls-ion-android-star-outline:before,.wfls-ion-android-stopwatch:before,.wfls-ion-android-subway:before,.wfls-ion-android-sunny:before,.wfls-ion-android-sync:before,.wfls-ion-android-textsms:before,.wfls-ion-android-time:before,.wfls-ion-android-train:before,.wfls-ion-android-unlock:before,.wfls-ion-android-upload:before,.wfls-ion-android-volume-down:before,.wfls-ion-android-volume-mute:before,.wfls-ion-android-volume-off:before,.wfls-ion-android-volume-up:before,.wfls-ion-android-walk:before,.wfls-ion-android-warning:before,.wfls-ion-android-watch:before,.wfls-ion-android-wifi:before,.wfls-ion-aperture:before,.wfls-ion-archive:before,.wfls-ion-arrow-down-a:before,.wfls-ion-arrow-down-b:before,.wfls-ion-arrow-down-c:before,.wfls-ion-arrow-expand:before,.wfls-ion-arrow-graph-down-left:before,.wfls-ion-arrow-graph-down-right:before,.wfls-ion-arrow-graph-up-left:before,.wfls-ion-arrow-graph-up-right:before,.wfls-ion-arrow-left-a:before,.wfls-ion-arrow-left-b:before,.wfls-ion-arrow-left-c:before,.wfls-ion-arrow-move:before,.wfls-ion-arrow-resize:before,.wfls-ion-arrow-return-left:before,.wfls-ion-arrow-return-right:before,.wfls-ion-arrow-right-a:before,.wfls-ion-arrow-right-b:before,.wfls-ion-arrow-right-c:before,.wfls-ion-arrow-shrink:before,.wfls-ion-arrow-swap:before,.wfls-ion-arrow-up-a:before,.wfls-ion-arrow-up-b:before,.wfls-ion-arrow-up-c:before,.wfls-ion-asterisk:before,.wfls-ion-at:before,.wfls-ion-backspace:before,.wfls-ion-backspace-outline:before,.wfls-ion-bag:before,.wfls-ion-battery-charging:before,.wfls-ion-battery-empty:before,.wfls-ion-battery-full:before,.wfls-ion-battery-half:before,.wfls-ion-battery-low:before,.wfls-ion-beaker:before,.wfls-ion-beer:before,.wfls-ion-bluetooth:before,.wfls-ion-bonfire:before,.wfls-ion-bookmark:before,.wfls-ion-bowtie:before,.wfls-ion-briefcase:before,.wfls-ion-bug:before,.wfls-ion-calculator:before,.wfls-ion-calendar:before,.wfls-ion-camera:before,.wfls-ion-card:before,.wfls-ion-cash:before,.wfls-ion-chatbox:before,.wfls-ion-chatbox-working:before,.wfls-ion-chatboxes:before,.wfls-ion-chatbubble:before,.wfls-ion-chatbubble-working:before,.wfls-ion-chatbubbles:before,.wfls-ion-checkmark:before,.wfls-ion-checkmark-circled:before,.wfls-ion-checkmark-round:before,.wfls-ion-chevron-down:before,.wfls-ion-chevron-left:before,.wfls-ion-chevron-right:before,.wfls-ion-chevron-up:before,.wfls-ion-clipboard:before,.wfls-ion-clock:before,.wfls-ion-close:before,.wfls-ion-close-circled:before,.wfls-ion-close-round:before,.wfls-ion-closed-captioning:before,.wfls-ion-cloud:before,.wfls-ion-code:before,.wfls-ion-code-download:before,.wfls-ion-code-working:before,.wfls-ion-coffee:before,.wfls-ion-compass:before,.wfls-ion-compose:before,.wfls-ion-connection-bars:before,.wfls-ion-contrast:before,.wfls-ion-crop:before,.wfls-ion-cube:before,.wfls-ion-disc:before,.wfls-ion-document:before,.wfls-ion-document-text:before,.wfls-ion-drag:before,.wfls-ion-earth:before,.wfls-ion-easel:before,.wfls-ion-edit:before,.wfls-ion-egg:before,.wfls-ion-eject:before,.wfls-ion-email:before,.wfls-ion-email-unread:before,.wfls-ion-erlenmeyer-flask:before,.wfls-ion-erlenmeyer-flask-bubbles:before,.wfls-ion-eye:before,.wfls-ion-eye-disabled:before,.wfls-ion-female:before,.wfls-ion-filing:before,.wfls-ion-film-marker:before,.wfls-ion-fireball:before,.wfls-ion-flag:before,.wfls-ion-flame:before,.wfls-ion-flash:before,.wfls-ion-flash-off:before,.wfls-ion-folder:before,.wfls-ion-fork:before,.wfls-ion-fork-repo:before,.wfls-ion-forward:before,.wfls-ion-funnel:before,.wfls-ion-gear-a:before,.wfls-ion-gear-b:before,.wfls-ion-grid:before,.wfls-ion-hammer:before,.wfls-ion-happy:before,.wfls-ion-happy-outline:before,.wfls-ion-headphone:before,.wfls-ion-heart:before,.wfls-ion-heart-broken:before,.wfls-ion-help:before,.wfls-ion-help-buoy:before,.wfls-ion-help-circled:before,.wfls-ion-home:before,.wfls-ion-icecream:before,.wfls-ion-image:before,.wfls-ion-images:before,.wfls-ion-information:before,.wfls-ion-information-circled:before,.wfls-ion-ionic:before,.wfls-ion-ios-alarm:before,.wfls-ion-ios-alarm-outline:before,.wfls-ion-ios-albums:before,.wfls-ion-ios-albums-outline:before,.wfls-ion-ios-americanfootball:before,.wfls-ion-ios-americanfootball-outline:before,.wfls-ion-ios-analytics:before,.wfls-ion-ios-analytics-outline:before,.wfls-ion-ios-arrow-back:before,.wfls-ion-ios-arrow-down:before,.wfls-ion-ios-arrow-forward:before,.wfls-ion-ios-arrow-left:before,.wfls-ion-ios-arrow-right:before,.wfls-ion-ios-arrow-thin-down:before,.wfls-ion-ios-arrow-thin-left:before,.wfls-ion-ios-arrow-thin-right:before,.wfls-ion-ios-arrow-thin-up:before,.wfls-ion-ios-arrow-up:before,.wfls-ion-ios-at:before,.wfls-ion-ios-at-outline:before,.wfls-ion-ios-barcode:before,.wfls-ion-ios-barcode-outline:before,.wfls-ion-ios-baseball:before,.wfls-ion-ios-baseball-outline:before,.wfls-ion-ios-basketball:before,.wfls-ion-ios-basketball-outline:before,.wfls-ion-ios-bell:before,.wfls-ion-ios-bell-outline:before,.wfls-ion-ios-body:before,.wfls-ion-ios-body-outline:before,.wfls-ion-ios-bolt:before,.wfls-ion-ios-bolt-outline:before,.wfls-ion-ios-book:before,.wfls-ion-ios-book-outline:before,.wfls-ion-ios-bookmarks:before,.wfls-ion-ios-bookmarks-outline:before,.wfls-ion-ios-box:before,.wfls-ion-ios-box-outline:before,.wfls-ion-ios-briefcase:before,.wfls-ion-ios-briefcase-outline:before,.wfls-ion-ios-browsers:before,.wfls-ion-ios-browsers-outline:before,.wfls-ion-ios-calculator:before,.wfls-ion-ios-calculator-outline:before,.wfls-ion-ios-calendar:before,.wfls-ion-ios-calendar-outline:before,.wfls-ion-ios-camera:before,.wfls-ion-ios-camera-outline:before,.wfls-ion-ios-cart:before,.wfls-ion-ios-cart-outline:before,.wfls-ion-ios-chatboxes:before,.wfls-ion-ios-chatboxes-outline:before,.wfls-ion-ios-chatbubble:before,.wfls-ion-ios-chatbubble-outline:before,.wfls-ion-ios-checkmark:before,.wfls-ion-ios-checkmark-empty:before,.wfls-ion-ios-checkmark-outline:before,.wfls-ion-ios-circle-filled:before,.wfls-ion-ios-circle-outline:before,.wfls-ion-ios-clock:before,.wfls-ion-ios-clock-outline:before,.wfls-ion-ios-close:before,.wfls-ion-ios-close-empty:before,.wfls-ion-ios-close-outline:before,.wfls-ion-ios-cloud:before,.wfls-ion-ios-cloud-download:before,.wfls-ion-ios-cloud-download-outline:before,.wfls-ion-ios-cloud-outline:before,.wfls-ion-ios-cloud-upload:before,.wfls-ion-ios-cloud-upload-outline:before,.wfls-ion-ios-cloudy:before,.wfls-ion-ios-cloudy-night:before,.wfls-ion-ios-cloudy-night-outline:before,.wfls-ion-ios-cloudy-outline:before,.wfls-ion-ios-cog:before,.wfls-ion-ios-cog-outline:before,.wfls-ion-ios-color-filter:before,.wfls-ion-ios-color-filter-outline:before,.wfls-ion-ios-color-wand:before,.wfls-ion-ios-color-wand-outline:before,.wfls-ion-ios-compose:before,.wfls-ion-ios-compose-outline:before,.wfls-ion-ios-contact:before,.wfls-ion-ios-contact-outline:before,.wfls-ion-ios-copy:before,.wfls-ion-ios-copy-outline:before,.wfls-ion-ios-crop:before,.wfls-ion-ios-crop-strong:before,.wfls-ion-ios-download:before,.wfls-ion-ios-download-outline:before,.wfls-ion-ios-drag:before,.wfls-ion-ios-email:before,.wfls-ion-ios-email-outline:before,.wfls-ion-ios-eye:before,.wfls-ion-ios-eye-outline:before,.wfls-ion-ios-fastforward:before,.wfls-ion-ios-fastforward-outline:before,.wfls-ion-ios-filing:before,.wfls-ion-ios-filing-outline:before,.wfls-ion-ios-film:before,.wfls-ion-ios-film-outline:before,.wfls-ion-ios-flag:before,.wfls-ion-ios-flag-outline:before,.wfls-ion-ios-flame:before,.wfls-ion-ios-flame-outline:before,.wfls-ion-ios-flask:before,.wfls-ion-ios-flask-outline:before,.wfls-ion-ios-flower:before,.wfls-ion-ios-flower-outline:before,.wfls-ion-ios-folder:before,.wfls-ion-ios-folder-outline:before,.wfls-ion-ios-football:before,.wfls-ion-ios-football-outline:before,.wfls-ion-ios-game-controller-a:before,.wfls-ion-ios-game-controller-a-outline:before,.wfls-ion-ios-game-controller-b:before,.wfls-ion-ios-game-controller-b-outline:before,.wfls-ion-ios-gear:before,.wfls-ion-ios-gear-outline:before,.wfls-ion-ios-glasses:before,.wfls-ion-ios-glasses-outline:before,.wfls-ion-ios-grid-view:before,.wfls-ion-ios-grid-view-outline:before,.wfls-ion-ios-heart:before,.wfls-ion-ios-heart-outline:before,.wfls-ion-ios-help:before,.wfls-ion-ios-help-empty:before,.wfls-ion-ios-help-outline:before,.wfls-ion-ios-home:before,.wfls-ion-ios-home-outline:before,.wfls-ion-ios-infinite:before,.wfls-ion-ios-infinite-outline:before,.wfls-ion-ios-information:before,.wfls-ion-ios-information-empty:before,.wfls-ion-ios-information-outline:before,.wfls-ion-ios-ionic-outline:before,.wfls-ion-ios-keypad:before,.wfls-ion-ios-keypad-outline:before,.wfls-ion-ios-lightbulb:before,.wfls-ion-ios-lightbulb-outline:before,.wfls-ion-ios-list:before,.wfls-ion-ios-list-outline:before,.wfls-ion-ios-location:before,.wfls-ion-ios-location-outline:before,.wfls-ion-ios-locked:before,.wfls-ion-ios-locked-outline:before,.wfls-ion-ios-loop:before,.wfls-ion-ios-loop-strong:before,.wfls-ion-ios-medical:before,.wfls-ion-ios-medical-outline:before,.wfls-ion-ios-medkit:before,.wfls-ion-ios-medkit-outline:before,.wfls-ion-ios-mic:before,.wfls-ion-ios-mic-off:before,.wfls-ion-ios-mic-outline:before,.wfls-ion-ios-minus:before,.wfls-ion-ios-minus-empty:before,.wfls-ion-ios-minus-outline:before,.wfls-ion-ios-monitor:before,.wfls-ion-ios-monitor-outline:before,.wfls-ion-ios-moon:before,.wfls-ion-ios-moon-outline:before,.wfls-ion-ios-more:before,.wfls-ion-ios-more-outline:before,.wfls-ion-ios-musical-note:before,.wfls-ion-ios-musical-notes:before,.wfls-ion-ios-navigate:before,.wfls-ion-ios-navigate-outline:before,.wfls-ion-ios-nutrition:before,.wfls-ion-ios-nutrition-outline:before,.wfls-ion-ios-paper:before,.wfls-ion-ios-paper-outline:before,.wfls-ion-ios-paperplane:before,.wfls-ion-ios-paperplane-outline:before,.wfls-ion-ios-partlysunny:before,.wfls-ion-ios-partlysunny-outline:before,.wfls-ion-ios-pause:before,.wfls-ion-ios-pause-outline:before,.wfls-ion-ios-paw:before,.wfls-ion-ios-paw-outline:before,.wfls-ion-ios-people:before,.wfls-ion-ios-people-outline:before,.wfls-ion-ios-person:before,.wfls-ion-ios-person-outline:before,.wfls-ion-ios-personadd:before,.wfls-ion-ios-personadd-outline:before,.wfls-ion-ios-photos:before,.wfls-ion-ios-photos-outline:before,.wfls-ion-ios-pie:before,.wfls-ion-ios-pie-outline:before,.wfls-ion-ios-pint:before,.wfls-ion-ios-pint-outline:before,.wfls-ion-ios-play:before,.wfls-ion-ios-play-outline:before,.wfls-ion-ios-plus:before,.wfls-ion-ios-plus-empty:before,.wfls-ion-ios-plus-outline:before,.wfls-ion-ios-pricetag:before,.wfls-ion-ios-pricetag-outline:before,.wfls-ion-ios-pricetags:before,.wfls-ion-ios-pricetags-outline:before,.wfls-ion-ios-printer:before,.wfls-ion-ios-printer-outline:before,.wfls-ion-ios-pulse:before,.wfls-ion-ios-pulse-strong:before,.wfls-ion-ios-rainy:before,.wfls-ion-ios-rainy-outline:before,.wfls-ion-ios-recording:before,.wfls-ion-ios-recording-outline:before,.wfls-ion-ios-redo:before,.wfls-ion-ios-redo-outline:before,.wfls-ion-ios-refresh:before,.wfls-ion-ios-refresh-empty:before,.wfls-ion-ios-refresh-outline:before,.wfls-ion-ios-reload:before,.wfls-ion-ios-reverse-camera:before,.wfls-ion-ios-reverse-camera-outline:before,.wfls-ion-ios-rewind:before,.wfls-ion-ios-rewind-outline:before,.wfls-ion-ios-rose:before,.wfls-ion-ios-rose-outline:before,.wfls-ion-ios-search:before,.wfls-ion-ios-search-strong:before,.wfls-ion-ios-settings:before,.wfls-ion-ios-settings-strong:before,.wfls-ion-ios-shuffle:before,.wfls-ion-ios-shuffle-strong:before,.wfls-ion-ios-skipbackward:before,.wfls-ion-ios-skipbackward-outline:before,.wfls-ion-ios-skipforward:before,.wfls-ion-ios-skipforward-outline:before,.wfls-ion-ios-snowy:before,.wfls-ion-ios-speedometer:before,.wfls-ion-ios-speedometer-outline:before,.wfls-ion-ios-star:before,.wfls-ion-ios-star-half:before,.wfls-ion-ios-star-outline:before,.wfls-ion-ios-stopwatch:before,.wfls-ion-ios-stopwatch-outline:before,.wfls-ion-ios-sunny:before,.wfls-ion-ios-sunny-outline:before,.wfls-ion-ios-telephone:before,.wfls-ion-ios-telephone-outline:before,.wfls-ion-ios-tennisball:before,.wfls-ion-ios-tennisball-outline:before,.wfls-ion-ios-thunderstorm:before,.wfls-ion-ios-thunderstorm-outline:before,.wfls-ion-ios-time:before,.wfls-ion-ios-time-outline:before,.wfls-ion-ios-timer:before,.wfls-ion-ios-timer-outline:before,.wfls-ion-ios-toggle:before,.wfls-ion-ios-toggle-outline:before,.wfls-ion-ios-trash:before,.wfls-ion-ios-trash-outline:before,.wfls-ion-ios-undo:before,.wfls-ion-ios-undo-outline:before,.wfls-ion-ios-unlocked:before,.wfls-ion-ios-unlocked-outline:before,.wfls-ion-ios-upload:before,.wfls-ion-ios-upload-outline:before,.wfls-ion-ios-videocam:before,.wfls-ion-ios-videocam-outline:before,.wfls-ion-ios-volume-high:before,.wfls-ion-ios-volume-low:before,.wfls-ion-ios-wineglass:before,.wfls-ion-ios-wineglass-outline:before,.wfls-ion-ios-world:before,.wfls-ion-ios-world-outline:before,.wfls-ion-ipad:before,.wfls-ion-iphone:before,.wfls-ion-ipod:before,.wfls-ion-jet:before,.wfls-ion-key:before,.wfls-ion-knife:before,.wfls-ion-laptop:before,.wfls-ion-leaf:before,.wfls-ion-levels:before,.wfls-ion-lightbulb:before,.wfls-ion-link:before,.wfls-ion-load-a:before,.wfls-ion-load-b:before,.wfls-ion-load-c:before,.wfls-ion-load-d:before,.wfls-ion-location:before,.wfls-ion-lock-combination:before,.wfls-ion-locked:before,.wfls-ion-log-in:before,.wfls-ion-log-out:before,.wfls-ion-loop:before,.wfls-ion-magnet:before,.wfls-ion-male:before,.wfls-ion-man:before,.wfls-ion-map:before,.wfls-ion-medkit:before,.wfls-ion-merge:before,.wfls-ion-mic-a:before,.wfls-ion-mic-b:before,.wfls-ion-mic-c:before,.wfls-ion-minus:before,.wfls-ion-minus-circled:before,.wfls-ion-minus-round:before,.wfls-ion-model-s:before,.wfls-ion-monitor:before,.wfls-ion-more:before,.wfls-ion-mouse:before,.wfls-ion-music-note:before,.wfls-ion-navicon:before,.wfls-ion-navicon-round:before,.wfls-ion-navigate:before,.wfls-ion-network:before,.wfls-ion-no-smoking:before,.wfls-ion-nuclear:before,.wfls-ion-outlet:before,.wfls-ion-paintbrush:before,.wfls-ion-paintbucket:before,.wfls-ion-paper-airplane:before,.wfls-ion-paperclip:before,.wfls-ion-pause:before,.wfls-ion-person:before,.wfls-ion-person-add:before,.wfls-ion-person-stalker:before,.wfls-ion-pie-graph:before,.wfls-ion-pin:before,.wfls-ion-pinpoint:before,.wfls-ion-pizza:before,.wfls-ion-plane:before,.wfls-ion-planet:before,.wfls-ion-play:before,.wfls-ion-playstation:before,.wfls-ion-plus:before,.wfls-ion-plus-circled:before,.wfls-ion-plus-round:before,.wfls-ion-podium:before,.wfls-ion-pound:before,.wfls-ion-power:before,.wfls-ion-pricetag:before,.wfls-ion-pricetags:before,.wfls-ion-printer:before,.wfls-ion-pull-request:before,.wfls-ion-qr-scanner:before,.wfls-ion-quote:before,.wfls-ion-radio-waves:before,.wfls-ion-record:before,.wfls-ion-refresh:before,.wfls-ion-reply:before,.wfls-ion-reply-all:before,.wfls-ion-ribbon-a:before,.wfls-ion-ribbon-b:before,.wfls-ion-sad:before,.wfls-ion-sad-outline:before,.wfls-ion-scissors:before,.wfls-ion-search:before,.wfls-ion-settings:before,.wfls-ion-share:before,.wfls-ion-shuffle:before,.wfls-ion-skip-backward:before,.wfls-ion-skip-forward:before,.wfls-ion-social-android:before,.wfls-ion-social-android-outline:before,.wfls-ion-social-angular:before,.wfls-ion-social-angular-outline:before,.wfls-ion-social-apple:before,.wfls-ion-social-apple-outline:before,.wfls-ion-social-bitcoin:before,.wfls-ion-social-bitcoin-outline:before,.wfls-ion-social-buffer:before,.wfls-ion-social-buffer-outline:before,.wfls-ion-social-chrome:before,.wfls-ion-social-chrome-outline:before,.wfls-ion-social-codepen:before,.wfls-ion-social-codepen-outline:before,.wfls-ion-social-css3:before,.wfls-ion-social-css3-outline:before,.wfls-ion-social-designernews:before,.wfls-ion-social-designernews-outline:before,.wfls-ion-social-dribbble:before,.wfls-ion-social-dribbble-outline:before,.wfls-ion-social-dropbox:before,.wfls-ion-social-dropbox-outline:before,.wfls-ion-social-euro:before,.wfls-ion-social-euro-outline:before,.wfls-ion-social-facebook:before,.wfls-ion-social-facebook-outline:before,.wfls-ion-social-foursquare:before,.wfls-ion-social-foursquare-outline:before,.wfls-ion-social-freebsd-devil:before,.wfls-ion-social-github:before,.wfls-ion-social-github-outline:before,.wfls-ion-social-google:before,.wfls-ion-social-google-outline:before,.wfls-ion-social-googleplus:before,.wfls-ion-social-googleplus-outline:before,.wfls-ion-social-hackernews:before,.wfls-ion-social-hackernews-outline:before,.wfls-ion-social-html5:before,.wfls-ion-social-html5-outline:before,.wfls-ion-social-instagram:before,.wfls-ion-social-instagram-outline:before,.wfls-ion-social-javascript:before,.wfls-ion-social-javascript-outline:before,.wfls-ion-social-linkedin:before,.wfls-ion-social-linkedin-outline:before,.wfls-ion-social-markdown:before,.wfls-ion-social-nodejs:before,.wfls-ion-social-octocat:before,.wfls-ion-social-pinterest:before,.wfls-ion-social-pinterest-outline:before,.wfls-ion-social-python:before,.wfls-ion-social-reddit:before,.wfls-ion-social-reddit-outline:before,.wfls-ion-social-rss:before,.wfls-ion-social-rss-outline:before,.wfls-ion-social-sass:before,.wfls-ion-social-skype:before,.wfls-ion-social-skype-outline:before,.wfls-ion-social-snapchat:before,.wfls-ion-social-snapchat-outline:before,.wfls-ion-social-tumblr:before,.wfls-ion-social-tumblr-outline:before,.wfls-ion-social-tux:before,.wfls-ion-social-twitch:before,.wfls-ion-social-twitch-outline:before,.wfls-ion-social-twitter:before,.wfls-ion-social-twitter-outline:before,.wfls-ion-social-usd:before,.wfls-ion-social-usd-outline:before,.wfls-ion-social-vimeo:before,.wfls-ion-social-vimeo-outline:before,.wfls-ion-social-whatsapp:before,.wfls-ion-social-whatsapp-outline:before,.wfls-ion-social-windows:before,.wfls-ion-social-windows-outline:before,.wfls-ion-social-wordpress:before,.wfls-ion-social-wordpress-outline:before,.wfls-ion-social-yahoo:before,.wfls-ion-social-yahoo-outline:before,.wfls-ion-social-yen:before,.wfls-ion-social-yen-outline:before,.wfls-ion-social-youtube:before,.wfls-ion-social-youtube-outline:before,.wfls-ion-soup-can:before,.wfls-ion-soup-can-outline:before,.wfls-ion-speakerphone:before,.wfls-ion-speedometer:before,.wfls-ion-spoon:before,.wfls-ion-star:before,.wfls-ion-stats-bars:before,.wfls-ion-steam:before,.wfls-ion-stop:before,.wfls-ion-thermometer:before,.wfls-ion-thumbsdown:before,.wfls-ion-thumbsup:before,.wfls-ion-toggle:before,.wfls-ion-toggle-filled:before,.wfls-ion-transgender:before,.wfls-ion-trash-a:before,.wfls-ion-trash-b:before,.wfls-ion-trophy:before,.wfls-ion-tshirt:before,.wfls-ion-tshirt-outline:before,.wfls-ion-umbrella:before,.wfls-ion-university:before,.wfls-ion-unlocked:before,.wfls-ion-upload:before,.wfls-ion-usb:before,.wfls-ion-videocamera:before,.wfls-ion-volume-high:before,.wfls-ion-volume-low:before,.wfls-ion-volume-medium:before,.wfls-ion-volume-mute:before,.wfls-ion-wand:before,.wfls-ion-waterdrop:before,.wfls-ion-wifi:before,.wfls-ion-wineglass:before,.wfls-ion-woman:before,.wfls-ion-wrench:before,.wfls-ion-xbox:before{display:inline-block;font-family:"Ionicons" !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wfls-ion-alert:before{content:""}.wfls-ion-alert-circled:before{content:""}.wfls-ion-android-add:before{content:""}.wfls-ion-android-add-circle:before{content:""}.wfls-ion-android-alarm-clock:before{content:""}.wfls-ion-android-alert:before{content:""}.wfls-ion-android-apps:before{content:""}.wfls-ion-android-archive:before{content:""}.wfls-ion-android-arrow-back:before{content:""}.wfls-ion-android-arrow-down:before{content:""}.wfls-ion-android-arrow-dropdown:before{content:""}.wfls-ion-android-arrow-dropdown-circle:before{content:""}.wfls-ion-android-arrow-dropleft:before{content:""}.wfls-ion-android-arrow-dropleft-circle:before{content:""}.wfls-ion-android-arrow-dropright:before{content:""}.wfls-ion-android-arrow-dropright-circle:before{content:""}.wfls-ion-android-arrow-dropup:before{content:""}.wfls-ion-android-arrow-dropup-circle:before{content:""}.wfls-ion-android-arrow-forward:before{content:""}.wfls-ion-android-arrow-up:before{content:""}.wfls-ion-android-attach:before{content:""}.wfls-ion-android-bar:before{content:""}.wfls-ion-android-bicycle:before{content:""}.wfls-ion-android-boat:before{content:""}.wfls-ion-android-bookmark:before{content:""}.wfls-ion-android-bulb:before{content:""}.wfls-ion-android-bus:before{content:""}.wfls-ion-android-calendar:before{content:""}.wfls-ion-android-call:before{content:""}.wfls-ion-android-camera:before{content:""}.wfls-ion-android-cancel:before{content:""}.wfls-ion-android-car:before{content:""}.wfls-ion-android-cart:before{content:""}.wfls-ion-android-chat:before{content:""}.wfls-ion-android-checkbox:before{content:""}.wfls-ion-android-checkbox-blank:before{content:""}.wfls-ion-android-checkbox-outline:before{content:""}.wfls-ion-android-checkbox-outline-blank:before{content:""}.wfls-ion-android-checkmark-circle:before{content:""}.wfls-ion-android-clipboard:before{content:""}.wfls-ion-android-close:before{content:""}.wfls-ion-android-cloud:before{content:""}.wfls-ion-android-cloud-circle:before{content:""}.wfls-ion-android-cloud-done:before{content:""}.wfls-ion-android-cloud-outline:before{content:""}.wfls-ion-android-color-palette:before{content:""}.wfls-ion-android-compass:before{content:""}.wfls-ion-android-contact:before{content:""}.wfls-ion-android-contacts:before{content:""}.wfls-ion-android-contract:before{content:""}.wfls-ion-android-create:before{content:""}.wfls-ion-android-delete:before{content:""}.wfls-ion-android-desktop:before{content:""}.wfls-ion-android-document:before{content:""}.wfls-ion-android-done:before{content:""}.wfls-ion-android-done-all:before{content:""}.wfls-ion-android-download:before{content:""}.wfls-ion-android-drafts:before{content:""}.wfls-ion-android-exit:before{content:""}.wfls-ion-android-expand:before{content:""}.wfls-ion-android-favorite:before{content:""}.wfls-ion-android-favorite-outline:before{content:""}.wfls-ion-android-film:before{content:""}.wfls-ion-android-folder:before{content:""}.wfls-ion-android-folder-open:before{content:""}.wfls-ion-android-funnel:before{content:""}.wfls-ion-android-globe:before{content:""}.wfls-ion-android-hand:before{content:""}.wfls-ion-android-hangout:before{content:""}.wfls-ion-android-happy:before{content:""}.wfls-ion-android-home:before{content:""}.wfls-ion-android-image:before{content:""}.wfls-ion-android-laptop:before{content:""}.wfls-ion-android-list:before{content:""}.wfls-ion-android-locate:before{content:""}.wfls-ion-android-lock:before{content:""}.wfls-ion-android-mail:before{content:""}.wfls-ion-android-map:before{content:""}.wfls-ion-android-menu:before{content:""}.wfls-ion-android-microphone:before{content:""}.wfls-ion-android-microphone-off:before{content:""}.wfls-ion-android-more-horizontal:before{content:""}.wfls-ion-android-more-vertical:before{content:""}.wfls-ion-android-navigate:before{content:""}.wfls-ion-android-notifications:before{content:""}.wfls-ion-android-notifications-none:before{content:""}.wfls-ion-android-notifications-off:before{content:""}.wfls-ion-android-open:before{content:""}.wfls-ion-android-options:before{content:""}.wfls-ion-android-people:before{content:""}.wfls-ion-android-person:before{content:""}.wfls-ion-android-person-add:before{content:""}.wfls-ion-android-phone-landscape:before{content:""}.wfls-ion-android-phone-portrait:before{content:""}.wfls-ion-android-pin:before{content:""}.wfls-ion-android-plane:before{content:""}.wfls-ion-android-playstore:before{content:""}.wfls-ion-android-print:before{content:""}.wfls-ion-android-radio-button-off:before{content:""}.wfls-ion-android-radio-button-on:before{content:""}.wfls-ion-android-refresh:before{content:""}.wfls-ion-android-remove:before{content:""}.wfls-ion-android-remove-circle:before{content:""}.wfls-ion-android-restaurant:before{content:""}.wfls-ion-android-sad:before{content:""}.wfls-ion-android-search:before{content:""}.wfls-ion-android-send:before{content:""}.wfls-ion-android-settings:before{content:""}.wfls-ion-android-share:before{content:""}.wfls-ion-android-share-alt:before{content:""}.wfls-ion-android-star:before{content:""}.wfls-ion-android-star-half:before{content:""}.wfls-ion-android-star-outline:before{content:""}.wfls-ion-android-stopwatch:before{content:""}.wfls-ion-android-subway:before{content:""}.wfls-ion-android-sunny:before{content:""}.wfls-ion-android-sync:before{content:""}.wfls-ion-android-textsms:before{content:""}.wfls-ion-android-time:before{content:""}.wfls-ion-android-train:before{content:""}.wfls-ion-android-unlock:before{content:""}.wfls-ion-android-upload:before{content:""}.wfls-ion-android-volume-down:before{content:""}.wfls-ion-android-volume-mute:before{content:""}.wfls-ion-android-volume-off:before{content:""}.wfls-ion-android-volume-up:before{content:""}.wfls-ion-android-walk:before{content:""}.wfls-ion-android-warning:before{content:""}.wfls-ion-android-watch:before{content:""}.wfls-ion-android-wifi:before{content:""}.wfls-ion-aperture:before{content:""}.wfls-ion-archive:before{content:""}.wfls-ion-arrow-down-a:before{content:""}.wfls-ion-arrow-down-b:before{content:""}.wfls-ion-arrow-down-c:before{content:""}.wfls-ion-arrow-expand:before{content:""}.wfls-ion-arrow-graph-down-left:before{content:""}.wfls-ion-arrow-graph-down-right:before{content:""}.wfls-ion-arrow-graph-up-left:before{content:""}.wfls-ion-arrow-graph-up-right:before{content:""}.wfls-ion-arrow-left-a:before{content:""}.wfls-ion-arrow-left-b:before{content:""}.wfls-ion-arrow-left-c:before{content:""}.wfls-ion-arrow-move:before{content:""}.wfls-ion-arrow-resize:before{content:""}.wfls-ion-arrow-return-left:before{content:""}.wfls-ion-arrow-return-right:before{content:""}.wfls-ion-arrow-right-a:before{content:""}.wfls-ion-arrow-right-b:before{content:""}.wfls-ion-arrow-right-c:before{content:""}.wfls-ion-arrow-shrink:before{content:""}.wfls-ion-arrow-swap:before{content:""}.wfls-ion-arrow-up-a:before{content:""}.wfls-ion-arrow-up-b:before{content:""}.wfls-ion-arrow-up-c:before{content:""}.wfls-ion-asterisk:before{content:""}.wfls-ion-at:before{content:""}.wfls-ion-backspace:before{content:""}.wfls-ion-backspace-outline:before{content:""}.wfls-ion-bag:before{content:""}.wfls-ion-battery-charging:before{content:""}.wfls-ion-battery-empty:before{content:""}.wfls-ion-battery-full:before{content:""}.wfls-ion-battery-half:before{content:""}.wfls-ion-battery-low:before{content:""}.wfls-ion-beaker:before{content:""}.wfls-ion-beer:before{content:""}.wfls-ion-bluetooth:before{content:""}.wfls-ion-bonfire:before{content:""}.wfls-ion-bookmark:before{content:""}.wfls-ion-bowtie:before{content:""}.wfls-ion-briefcase:before{content:""}.wfls-ion-bug:before{content:""}.wfls-ion-calculator:before{content:""}.wfls-ion-calendar:before{content:""}.wfls-ion-camera:before{content:""}.wfls-ion-card:before{content:""}.wfls-ion-cash:before{content:""}.wfls-ion-chatbox:before{content:""}.wfls-ion-chatbox-working:before{content:""}.wfls-ion-chatboxes:before{content:""}.wfls-ion-chatbubble:before{content:""}.wfls-ion-chatbubble-working:before{content:""}.wfls-ion-chatbubbles:before{content:""}.wfls-ion-checkmark:before{content:""}.wfls-ion-checkmark-circled:before{content:""}.wfls-ion-checkmark-round:before{content:""}.wfls-ion-chevron-down:before{content:""}.wfls-ion-chevron-left:before{content:""}.wfls-ion-chevron-right:before{content:""}.wfls-ion-chevron-up:before{content:""}.wfls-ion-clipboard:before{content:""}.wfls-ion-clock:before{content:""}.wfls-ion-close:before{content:""}.wfls-ion-close-circled:before{content:""}.wfls-ion-close-round:before{content:""}.wfls-ion-closed-captioning:before{content:""}.wfls-ion-cloud:before{content:""}.wfls-ion-code:before{content:""}.wfls-ion-code-download:before{content:""}.wfls-ion-code-working:before{content:""}.wfls-ion-coffee:before{content:""}.wfls-ion-compass:before{content:""}.wfls-ion-compose:before{content:""}.wfls-ion-connection-bars:before{content:""}.wfls-ion-contrast:before{content:""}.wfls-ion-crop:before{content:""}.wfls-ion-cube:before{content:""}.wfls-ion-disc:before{content:""}.wfls-ion-document:before{content:""}.wfls-ion-document-text:before{content:""}.wfls-ion-drag:before{content:""}.wfls-ion-earth:before{content:""}.wfls-ion-easel:before{content:""}.wfls-ion-edit:before{content:""}.wfls-ion-egg:before{content:""}.wfls-ion-eject:before{content:""}.wfls-ion-email:before{content:""}.wfls-ion-email-unread:before{content:""}.wfls-ion-erlenmeyer-flask:before{content:""}.wfls-ion-erlenmeyer-flask-bubbles:before{content:""}.wfls-ion-eye:before{content:""}.wfls-ion-eye-disabled:before{content:""}.wfls-ion-female:before{content:""}.wfls-ion-filing:before{content:""}.wfls-ion-film-marker:before{content:""}.wfls-ion-fireball:before{content:""}.wfls-ion-flag:before{content:""}.wfls-ion-flame:before{content:""}.wfls-ion-flash:before{content:""}.wfls-ion-flash-off:before{content:""}.wfls-ion-folder:before{content:""}.wfls-ion-fork:before{content:""}.wfls-ion-fork-repo:before{content:""}.wfls-ion-forward:before{content:""}.wfls-ion-funnel:before{content:""}.wfls-ion-gear-a:before{content:""}.wfls-ion-gear-b:before{content:""}.wfls-ion-grid:before{content:""}.wfls-ion-hammer:before{content:""}.wfls-ion-happy:before{content:""}.wfls-ion-happy-outline:before{content:""}.wfls-ion-headphone:before{content:""}.wfls-ion-heart:before{content:""}.wfls-ion-heart-broken:before{content:""}.wfls-ion-help:before{content:""}.wfls-ion-help-buoy:before{content:""}.wfls-ion-help-circled:before{content:""}.wfls-ion-home:before{content:""}.wfls-ion-icecream:before{content:""}.wfls-ion-image:before{content:""}.wfls-ion-images:before{content:""}.wfls-ion-information:before{content:""}.wfls-ion-information-circled:before{content:""}.wfls-ion-ionic:before{content:""}.wfls-ion-ios-alarm:before{content:""}.wfls-ion-ios-alarm-outline:before{content:""}.wfls-ion-ios-albums:before{content:""}.wfls-ion-ios-albums-outline:before{content:""}.wfls-ion-ios-americanfootball:before{content:""}.wfls-ion-ios-americanfootball-outline:before{content:""}.wfls-ion-ios-analytics:before{content:""}.wfls-ion-ios-analytics-outline:before{content:""}.wfls-ion-ios-arrow-back:before{content:""}.wfls-ion-ios-arrow-down:before{content:""}.wfls-ion-ios-arrow-forward:before{content:""}.wfls-ion-ios-arrow-left:before{content:""}.wfls-ion-ios-arrow-right:before{content:""}.wfls-ion-ios-arrow-thin-down:before{content:""}.wfls-ion-ios-arrow-thin-left:before{content:""}.wfls-ion-ios-arrow-thin-right:before{content:""}.wfls-ion-ios-arrow-thin-up:before{content:""}.wfls-ion-ios-arrow-up:before{content:""}.wfls-ion-ios-at:before{content:""}.wfls-ion-ios-at-outline:before{content:""}.wfls-ion-ios-barcode:before{content:""}.wfls-ion-ios-barcode-outline:before{content:""}.wfls-ion-ios-baseball:before{content:""}.wfls-ion-ios-baseball-outline:before{content:""}.wfls-ion-ios-basketball:before{content:""}.wfls-ion-ios-basketball-outline:before{content:""}.wfls-ion-ios-bell:before{content:""}.wfls-ion-ios-bell-outline:before{content:""}.wfls-ion-ios-body:before{content:""}.wfls-ion-ios-body-outline:before{content:""}.wfls-ion-ios-bolt:before{content:""}.wfls-ion-ios-bolt-outline:before{content:""}.wfls-ion-ios-book:before{content:""}.wfls-ion-ios-book-outline:before{content:""}.wfls-ion-ios-bookmarks:before{content:""}.wfls-ion-ios-bookmarks-outline:before{content:""}.wfls-ion-ios-box:before{content:""}.wfls-ion-ios-box-outline:before{content:""}.wfls-ion-ios-briefcase:before{content:""}.wfls-ion-ios-briefcase-outline:before{content:""}.wfls-ion-ios-browsers:before{content:""}.wfls-ion-ios-browsers-outline:before{content:""}.wfls-ion-ios-calculator:before{content:""}.wfls-ion-ios-calculator-outline:before{content:""}.wfls-ion-ios-calendar:before{content:""}.wfls-ion-ios-calendar-outline:before{content:""}.wfls-ion-ios-camera:before{content:""}.wfls-ion-ios-camera-outline:before{content:""}.wfls-ion-ios-cart:before{content:""}.wfls-ion-ios-cart-outline:before{content:""}.wfls-ion-ios-chatboxes:before{content:""}.wfls-ion-ios-chatboxes-outline:before{content:""}.wfls-ion-ios-chatbubble:before{content:""}.wfls-ion-ios-chatbubble-outline:before{content:""}.wfls-ion-ios-checkmark:before{content:""}.wfls-ion-ios-checkmark-empty:before{content:""}.wfls-ion-ios-checkmark-outline:before{content:""}.wfls-ion-ios-circle-filled:before{content:""}.wfls-ion-ios-circle-outline:before{content:""}.wfls-ion-ios-clock:before{content:""}.wfls-ion-ios-clock-outline:before{content:""}.wfls-ion-ios-close:before{content:""}.wfls-ion-ios-close-empty:before{content:""}.wfls-ion-ios-close-outline:before{content:""}.wfls-ion-ios-cloud:before{content:""}.wfls-ion-ios-cloud-download:before{content:""}.wfls-ion-ios-cloud-download-outline:before{content:""}.wfls-ion-ios-cloud-outline:before{content:""}.wfls-ion-ios-cloud-upload:before{content:""}.wfls-ion-ios-cloud-upload-outline:before{content:""}.wfls-ion-ios-cloudy:before{content:""}.wfls-ion-ios-cloudy-night:before{content:""}.wfls-ion-ios-cloudy-night-outline:before{content:""}.wfls-ion-ios-cloudy-outline:before{content:""}.wfls-ion-ios-cog:before{content:""}.wfls-ion-ios-cog-outline:before{content:""}.wfls-ion-ios-color-filter:before{content:""}.wfls-ion-ios-color-filter-outline:before{content:""}.wfls-ion-ios-color-wand:before{content:""}.wfls-ion-ios-color-wand-outline:before{content:""}.wfls-ion-ios-compose:before{content:""}.wfls-ion-ios-compose-outline:before{content:""}.wfls-ion-ios-contact:before{content:""}.wfls-ion-ios-contact-outline:before{content:""}.wfls-ion-ios-copy:before{content:""}.wfls-ion-ios-copy-outline:before{content:""}.wfls-ion-ios-crop:before{content:""}.wfls-ion-ios-crop-strong:before{content:""}.wfls-ion-ios-download:before{content:""}.wfls-ion-ios-download-outline:before{content:""}.wfls-ion-ios-drag:before{content:""}.wfls-ion-ios-email:before{content:""}.wfls-ion-ios-email-outline:before{content:""}.wfls-ion-ios-eye:before{content:""}.wfls-ion-ios-eye-outline:before{content:""}.wfls-ion-ios-fastforward:before{content:""}.wfls-ion-ios-fastforward-outline:before{content:""}.wfls-ion-ios-filing:before{content:""}.wfls-ion-ios-filing-outline:before{content:""}.wfls-ion-ios-film:before{content:""}.wfls-ion-ios-film-outline:before{content:""}.wfls-ion-ios-flag:before{content:""}.wfls-ion-ios-flag-outline:before{content:""}.wfls-ion-ios-flame:before{content:""}.wfls-ion-ios-flame-outline:before{content:""}.wfls-ion-ios-flask:before{content:""}.wfls-ion-ios-flask-outline:before{content:""}.wfls-ion-ios-flower:before{content:""}.wfls-ion-ios-flower-outline:before{content:""}.wfls-ion-ios-folder:before{content:""}.wfls-ion-ios-folder-outline:before{content:""}.wfls-ion-ios-football:before{content:""}.wfls-ion-ios-football-outline:before{content:""}.wfls-ion-ios-game-controller-a:before{content:""}.wfls-ion-ios-game-controller-a-outline:before{content:""}.wfls-ion-ios-game-controller-b:before{content:""}.wfls-ion-ios-game-controller-b-outline:before{content:""}.wfls-ion-ios-gear:before{content:""}.wfls-ion-ios-gear-outline:before{content:""}.wfls-ion-ios-glasses:before{content:""}.wfls-ion-ios-glasses-outline:before{content:""}.wfls-ion-ios-grid-view:before{content:""}.wfls-ion-ios-grid-view-outline:before{content:""}.wfls-ion-ios-heart:before{content:""}.wfls-ion-ios-heart-outline:before{content:""}.wfls-ion-ios-help:before{content:""}.wfls-ion-ios-help-empty:before{content:""}.wfls-ion-ios-help-outline:before{content:""}.wfls-ion-ios-home:before{content:""}.wfls-ion-ios-home-outline:before{content:""}.wfls-ion-ios-infinite:before{content:""}.wfls-ion-ios-infinite-outline:before{content:""}.wfls-ion-ios-information:before{content:""}.wfls-ion-ios-information-empty:before{content:""}.wfls-ion-ios-information-outline:before{content:""}.wfls-ion-ios-ionic-outline:before{content:""}.wfls-ion-ios-keypad:before{content:""}.wfls-ion-ios-keypad-outline:before{content:""}.wfls-ion-ios-lightbulb:before{content:""}.wfls-ion-ios-lightbulb-outline:before{content:""}.wfls-ion-ios-list:before{content:""}.wfls-ion-ios-list-outline:before{content:""}.wfls-ion-ios-location:before{content:""}.wfls-ion-ios-location-outline:before{content:""}.wfls-ion-ios-locked:before{content:""}.wfls-ion-ios-locked-outline:before{content:""}.wfls-ion-ios-loop:before{content:""}.wfls-ion-ios-loop-strong:before{content:""}.wfls-ion-ios-medical:before{content:""}.wfls-ion-ios-medical-outline:before{content:""}.wfls-ion-ios-medkit:before{content:""}.wfls-ion-ios-medkit-outline:before{content:""}.wfls-ion-ios-mic:before{content:""}.wfls-ion-ios-mic-off:before{content:""}.wfls-ion-ios-mic-outline:before{content:""}.wfls-ion-ios-minus:before{content:""}.wfls-ion-ios-minus-empty:before{content:""}.wfls-ion-ios-minus-outline:before{content:""}.wfls-ion-ios-monitor:before{content:""}.wfls-ion-ios-monitor-outline:before{content:""}.wfls-ion-ios-moon:before{content:""}.wfls-ion-ios-moon-outline:before{content:""}.wfls-ion-ios-more:before{content:""}.wfls-ion-ios-more-outline:before{content:""}.wfls-ion-ios-musical-note:before{content:""}.wfls-ion-ios-musical-notes:before{content:""}.wfls-ion-ios-navigate:before{content:""}.wfls-ion-ios-navigate-outline:before{content:""}.wfls-ion-ios-nutrition:before{content:""}.wfls-ion-ios-nutrition-outline:before{content:""}.wfls-ion-ios-paper:before{content:""}.wfls-ion-ios-paper-outline:before{content:""}.wfls-ion-ios-paperplane:before{content:""}.wfls-ion-ios-paperplane-outline:before{content:""}.wfls-ion-ios-partlysunny:before{content:""}.wfls-ion-ios-partlysunny-outline:before{content:""}.wfls-ion-ios-pause:before{content:""}.wfls-ion-ios-pause-outline:before{content:""}.wfls-ion-ios-paw:before{content:""}.wfls-ion-ios-paw-outline:before{content:""}.wfls-ion-ios-people:before{content:""}.wfls-ion-ios-people-outline:before{content:""}.wfls-ion-ios-person:before{content:""}.wfls-ion-ios-person-outline:before{content:""}.wfls-ion-ios-personadd:before{content:""}.wfls-ion-ios-personadd-outline:before{content:""}.wfls-ion-ios-photos:before{content:""}.wfls-ion-ios-photos-outline:before{content:""}.wfls-ion-ios-pie:before{content:""}.wfls-ion-ios-pie-outline:before{content:""}.wfls-ion-ios-pint:before{content:""}.wfls-ion-ios-pint-outline:before{content:""}.wfls-ion-ios-play:before{content:""}.wfls-ion-ios-play-outline:before{content:""}.wfls-ion-ios-plus:before{content:""}.wfls-ion-ios-plus-empty:before{content:""}.wfls-ion-ios-plus-outline:before{content:""}.wfls-ion-ios-pricetag:before{content:""}.wfls-ion-ios-pricetag-outline:before{content:""}.wfls-ion-ios-pricetags:before{content:""}.wfls-ion-ios-pricetags-outline:before{content:""}.wfls-ion-ios-printer:before{content:""}.wfls-ion-ios-printer-outline:before{content:""}.wfls-ion-ios-pulse:before{content:""}.wfls-ion-ios-pulse-strong:before{content:""}.wfls-ion-ios-rainy:before{content:""}.wfls-ion-ios-rainy-outline:before{content:""}.wfls-ion-ios-recording:before{content:""}.wfls-ion-ios-recording-outline:before{content:""}.wfls-ion-ios-redo:before{content:""}.wfls-ion-ios-redo-outline:before{content:""}.wfls-ion-ios-refresh:before{content:""}.wfls-ion-ios-refresh-empty:before{content:""}.wfls-ion-ios-refresh-outline:before{content:""}.wfls-ion-ios-reload:before{content:""}.wfls-ion-ios-reverse-camera:before{content:""}.wfls-ion-ios-reverse-camera-outline:before{content:""}.wfls-ion-ios-rewind:before{content:""}.wfls-ion-ios-rewind-outline:before{content:""}.wfls-ion-ios-rose:before{content:""}.wfls-ion-ios-rose-outline:before{content:""}.wfls-ion-ios-search:before{content:""}.wfls-ion-ios-search-strong:before{content:""}.wfls-ion-ios-settings:before{content:""}.wfls-ion-ios-settings-strong:before{content:""}.wfls-ion-ios-shuffle:before{content:""}.wfls-ion-ios-shuffle-strong:before{content:""}.wfls-ion-ios-skipbackward:before{content:""}.wfls-ion-ios-skipbackward-outline:before{content:""}.wfls-ion-ios-skipforward:before{content:""}.wfls-ion-ios-skipforward-outline:before{content:""}.wfls-ion-ios-snowy:before{content:""}.wfls-ion-ios-speedometer:before{content:""}.wfls-ion-ios-speedometer-outline:before{content:""}.wfls-ion-ios-star:before{content:""}.wfls-ion-ios-star-half:before{content:""}.wfls-ion-ios-star-outline:before{content:""}.wfls-ion-ios-stopwatch:before{content:""}.wfls-ion-ios-stopwatch-outline:before{content:""}.wfls-ion-ios-sunny:before{content:""}.wfls-ion-ios-sunny-outline:before{content:""}.wfls-ion-ios-telephone:before{content:""}.wfls-ion-ios-telephone-outline:before{content:""}.wfls-ion-ios-tennisball:before{content:""}.wfls-ion-ios-tennisball-outline:before{content:""}.wfls-ion-ios-thunderstorm:before{content:""}.wfls-ion-ios-thunderstorm-outline:before{content:""}.wfls-ion-ios-time:before{content:""}.wfls-ion-ios-time-outline:before{content:""}.wfls-ion-ios-timer:before{content:""}.wfls-ion-ios-timer-outline:before{content:""}.wfls-ion-ios-toggle:before{content:""}.wfls-ion-ios-toggle-outline:before{content:""}.wfls-ion-ios-trash:before{content:""}.wfls-ion-ios-trash-outline:before{content:""}.wfls-ion-ios-undo:before{content:""}.wfls-ion-ios-undo-outline:before{content:""}.wfls-ion-ios-unlocked:before{content:""}.wfls-ion-ios-unlocked-outline:before{content:""}.wfls-ion-ios-upload:before{content:""}.wfls-ion-ios-upload-outline:before{content:""}.wfls-ion-ios-videocam:before{content:""}.wfls-ion-ios-videocam-outline:before{content:""}.wfls-ion-ios-volume-high:before{content:""}.wfls-ion-ios-volume-low:before{content:""}.wfls-ion-ios-wineglass:before{content:""}.wfls-ion-ios-wineglass-outline:before{content:""}.wfls-ion-ios-world:before{content:""}.wfls-ion-ios-world-outline:before{content:""}.wfls-ion-ipad:before{content:""}.wfls-ion-iphone:before{content:""}.wfls-ion-ipod:before{content:""}.wfls-ion-jet:before{content:""}.wfls-ion-key:before{content:""}.wfls-ion-knife:before{content:""}.wfls-ion-laptop:before{content:""}.wfls-ion-leaf:before{content:""}.wfls-ion-levels:before{content:""}.wfls-ion-lightbulb:before{content:""}.wfls-ion-link:before{content:""}.wfls-ion-load-a:before{content:""}.wfls-ion-load-b:before{content:""}.wfls-ion-load-c:before{content:""}.wfls-ion-load-d:before{content:""}.wfls-ion-location:before{content:""}.wfls-ion-lock-combination:before{content:""}.wfls-ion-locked:before{content:""}.wfls-ion-log-in:before{content:""}.wfls-ion-log-out:before{content:""}.wfls-ion-loop:before{content:""}.wfls-ion-magnet:before{content:""}.wfls-ion-male:before{content:""}.wfls-ion-man:before{content:""}.wfls-ion-map:before{content:""}.wfls-ion-medkit:before{content:""}.wfls-ion-merge:before{content:""}.wfls-ion-mic-a:before{content:""}.wfls-ion-mic-b:before{content:""}.wfls-ion-mic-c:before{content:""}.wfls-ion-minus:before{content:""}.wfls-ion-minus-circled:before{content:""}.wfls-ion-minus-round:before{content:""}.wfls-ion-model-s:before{content:""}.wfls-ion-monitor:before{content:""}.wfls-ion-more:before{content:""}.wfls-ion-mouse:before{content:""}.wfls-ion-music-note:before{content:""}.wfls-ion-navicon:before{content:""}.wfls-ion-navicon-round:before{content:""}.wfls-ion-navigate:before{content:""}.wfls-ion-network:before{content:""}.wfls-ion-no-smoking:before{content:""}.wfls-ion-nuclear:before{content:""}.wfls-ion-outlet:before{content:""}.wfls-ion-paintbrush:before{content:""}.wfls-ion-paintbucket:before{content:""}.wfls-ion-paper-airplane:before{content:""}.wfls-ion-paperclip:before{content:""}.wfls-ion-pause:before{content:""}.wfls-ion-person:before{content:""}.wfls-ion-person-add:before{content:""}.wfls-ion-person-stalker:before{content:""}.wfls-ion-pie-graph:before{content:""}.wfls-ion-pin:before{content:""}.wfls-ion-pinpoint:before{content:""}.wfls-ion-pizza:before{content:""}.wfls-ion-plane:before{content:""}.wfls-ion-planet:before{content:""}.wfls-ion-play:before{content:""}.wfls-ion-playstation:before{content:""}.wfls-ion-plus:before{content:""}.wfls-ion-plus-circled:before{content:""}.wfls-ion-plus-round:before{content:""}.wfls-ion-podium:before{content:""}.wfls-ion-pound:before{content:""}.wfls-ion-power:before{content:""}.wfls-ion-pricetag:before{content:""}.wfls-ion-pricetags:before{content:""}.wfls-ion-printer:before{content:""}.wfls-ion-pull-request:before{content:""}.wfls-ion-qr-scanner:before{content:""}.wfls-ion-quote:before{content:""}.wfls-ion-radio-waves:before{content:""}.wfls-ion-record:before{content:""}.wfls-ion-refresh:before{content:""}.wfls-ion-reply:before{content:""}.wfls-ion-reply-all:before{content:""}.wfls-ion-ribbon-a:before{content:""}.wfls-ion-ribbon-b:before{content:""}.wfls-ion-sad:before{content:""}.wfls-ion-sad-outline:before{content:""}.wfls-ion-scissors:before{content:""}.wfls-ion-search:before{content:""}.wfls-ion-settings:before{content:""}.wfls-ion-share:before{content:""}.wfls-ion-shuffle:before{content:""}.wfls-ion-skip-backward:before{content:""}.wfls-ion-skip-forward:before{content:""}.wfls-ion-social-android:before{content:""}.wfls-ion-social-android-outline:before{content:""}.wfls-ion-social-angular:before{content:""}.wfls-ion-social-angular-outline:before{content:""}.wfls-ion-social-apple:before{content:""}.wfls-ion-social-apple-outline:before{content:""}.wfls-ion-social-bitcoin:before{content:""}.wfls-ion-social-bitcoin-outline:before{content:""}.wfls-ion-social-buffer:before{content:""}.wfls-ion-social-buffer-outline:before{content:""}.wfls-ion-social-chrome:before{content:""}.wfls-ion-social-chrome-outline:before{content:""}.wfls-ion-social-codepen:before{content:""}.wfls-ion-social-codepen-outline:before{content:""}.wfls-ion-social-css3:before{content:""}.wfls-ion-social-css3-outline:before{content:""}.wfls-ion-social-designernews:before{content:""}.wfls-ion-social-designernews-outline:before{content:""}.wfls-ion-social-dribbble:before{content:""}.wfls-ion-social-dribbble-outline:before{content:""}.wfls-ion-social-dropbox:before{content:""}.wfls-ion-social-dropbox-outline:before{content:""}.wfls-ion-social-euro:before{content:""}.wfls-ion-social-euro-outline:before{content:""}.wfls-ion-social-facebook:before{content:""}.wfls-ion-social-facebook-outline:before{content:""}.wfls-ion-social-foursquare:before{content:""}.wfls-ion-social-foursquare-outline:before{content:""}.wfls-ion-social-freebsd-devil:before{content:""}.wfls-ion-social-github:before{content:""}.wfls-ion-social-github-outline:before{content:""}.wfls-ion-social-google:before{content:""}.wfls-ion-social-google-outline:before{content:""}.wfls-ion-social-googleplus:before{content:""}.wfls-ion-social-googleplus-outline:before{content:""}.wfls-ion-social-hackernews:before{content:""}.wfls-ion-social-hackernews-outline:before{content:""}.wfls-ion-social-html5:before{content:""}.wfls-ion-social-html5-outline:before{content:""}.wfls-ion-social-instagram:before{content:""}.wfls-ion-social-instagram-outline:before{content:""}.wfls-ion-social-javascript:before{content:""}.wfls-ion-social-javascript-outline:before{content:""}.wfls-ion-social-linkedin:before{content:""}.wfls-ion-social-linkedin-outline:before{content:""}.wfls-ion-social-markdown:before{content:""}.wfls-ion-social-nodejs:before{content:""}.wfls-ion-social-octocat:before{content:""}.wfls-ion-social-pinterest:before{content:""}.wfls-ion-social-pinterest-outline:before{content:""}.wfls-ion-social-python:before{content:""}.wfls-ion-social-reddit:before{content:""}.wfls-ion-social-reddit-outline:before{content:""}.wfls-ion-social-rss:before{content:""}.wfls-ion-social-rss-outline:before{content:""}.wfls-ion-social-sass:before{content:""}.wfls-ion-social-skype:before{content:""}.wfls-ion-social-skype-outline:before{content:""}.wfls-ion-social-snapchat:before{content:""}.wfls-ion-social-snapchat-outline:before{content:""}.wfls-ion-social-tumblr:before{content:""}.wfls-ion-social-tumblr-outline:before{content:""}.wfls-ion-social-tux:before{content:""}.wfls-ion-social-twitch:before{content:""}.wfls-ion-social-twitch-outline:before{content:""}.wfls-ion-social-twitter:before{content:""}.wfls-ion-social-twitter-outline:before{content:""}.wfls-ion-social-usd:before{content:""}.wfls-ion-social-usd-outline:before{content:""}.wfls-ion-social-vimeo:before{content:""}.wfls-ion-social-vimeo-outline:before{content:""}.wfls-ion-social-whatsapp:before{content:""}.wfls-ion-social-whatsapp-outline:before{content:""}.wfls-ion-social-windows:before{content:""}.wfls-ion-social-windows-outline:before{content:""}.wfls-ion-social-wordpress:before{content:""}.wfls-ion-social-wordpress-outline:before{content:""}.wfls-ion-social-yahoo:before{content:""}.wfls-ion-social-yahoo-outline:before{content:""}.wfls-ion-social-yen:before{content:""}.wfls-ion-social-yen-outline:before{content:""}.wfls-ion-social-youtube:before{content:""}.wfls-ion-social-youtube-outline:before{content:""}.wfls-ion-soup-can:before{content:""}.wfls-ion-soup-can-outline:before{content:""}.wfls-ion-speakerphone:before{content:""}.wfls-ion-speedometer:before{content:""}.wfls-ion-spoon:before{content:""}.wfls-ion-star:before{content:""}.wfls-ion-stats-bars:before{content:""}.wfls-ion-steam:before{content:""}.wfls-ion-stop:before{content:""}.wfls-ion-thermometer:before{content:""}.wfls-ion-thumbsdown:before{content:""}.wfls-ion-thumbsup:before{content:""}.wfls-ion-toggle:before{content:""}.wfls-ion-toggle-filled:before{content:""}.wfls-ion-transgender:before{content:""}.wfls-ion-trash-a:before{content:""}.wfls-ion-trash-b:before{content:""}.wfls-ion-trophy:before{content:""}.wfls-ion-tshirt:before{content:""}.wfls-ion-tshirt-outline:before{content:""}.wfls-ion-umbrella:before{content:""}.wfls-ion-university:before{content:""}.wfls-ion-unlocked:before{content:""}.wfls-ion-upload:before{content:""}.wfls-ion-usb:before{content:""}.wfls-ion-videocamera:before{content:""}.wfls-ion-volume-high:before{content:""}.wfls-ion-volume-low:before{content:""}.wfls-ion-volume-medium:before{content:""}.wfls-ion-volume-mute:before{content:""}.wfls-ion-wand:before{content:""}.wfls-ion-waterdrop:before{content:""}.wfls-ion-wifi:before{content:""}.wfls-ion-wineglass:before{content:""}.wfls-ion-woman:before{content:""}.wfls-ion-wrench:before{content:""}.wfls-ion-xbox:before{content:""} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.min.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.min.1704213472.css deleted file mode 100644 index 921b4830..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.min.1704213472.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2018-06-29 -* http://jqueryui.com -* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px -* Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default !important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.structure.min.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.structure.min.1704213472.css deleted file mode 100644 index 4ac43b1c..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.structure.min.1704213472.css +++ /dev/null @@ -1,3 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2018-06-29 -* http://jqueryui.com -* Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default !important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.theme.min.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.theme.min.1704213472.css deleted file mode 100644 index 36f47674..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.theme.min.1704213472.css +++ /dev/null @@ -1,3 +0,0 @@ -/*! jQuery UI - v1.11.4 - 2018-06-29 -* http://jqueryui.com -* Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("../img/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("../img/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("../img/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("../img/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("../img/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("../img/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("../img/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/login.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/login.1704213472.css deleted file mode 100644 index 43cec9ca..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/login.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -#wfls-prompt-overlay{position:absolute;top:0px;right:0px;bottom:0px;left:0px;background-color:#fff;padding:26px 24px 46px;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:stretch;justify-content:stretch}.woocommerce #wfls-prompt-overlay{padding:0;display:block}#wfls-prompt-wrapper{-webkit-flex-grow:1;flex-grow:1;width:100%}.login form .wfls-textarea{font-size:1rem;width:100%;padding:3px;margin:2px 6px 16px 0;background:#fbfbfb;height:150px}.login form .wfls-remember-device-wrapper{font-weight:400;float:left;margin-bottom:0}.login form .wfls-remember-device-wrapper label{font-size:12px;line-height:19px}.wfls-2fa-code-help{text-decoration:none}.wfls-registration-captcha-contact{text-decoration:underline}.Zebra_Tooltip{background:0 0;position:absolute;z-index:8000}.Zebra_Tooltip .Zebra_Tooltip_Message{background:#000;border-radius:5px;box-shadow:0 0 6px rgba(0,0,0,0.6);color:#fff;font-size:12px;font-family:Tahoma,Arial,Helvetica,sans-serif;line-height:1.4;*margin-right:0;max-width:250px;padding:10px;position:relative;_width:expression(document.body.clientWidth > 250px ? '250px': 'auto');border:0 solid #000}.Zebra_Tooltip .Zebra_Tooltip_Message.Zebra_Tooltip_Has_Close{padding-right:23px}.Zebra_Tooltip .Zebra_Tooltip_Arrow{position:absolute;width:20px;height:10px;overflow:hidden}.Zebra_Tooltip .Zebra_Tooltip_Arrow.Zebra_Tooltip_Arrow_Bottom{bottom:0}.Zebra_Tooltip .Zebra_Tooltip_Arrow.Zebra_Tooltip_Arrow_Bottom div{top:0;border-color:#000 transparent transparent;_border-bottom-color:pink}.Zebra_Tooltip .Zebra_Tooltip_Arrow.Zebra_Tooltip_Arrow_Bottom div.Zebra_Tooltip_Arrow_Border{border-color:#000 transparent transparent}.Zebra_Tooltip .Zebra_Tooltip_Arrow.Zebra_Tooltip_Arrow_Top{top:0}.Zebra_Tooltip .Zebra_Tooltip_Arrow.Zebra_Tooltip_Arrow_Top div{bottom:0;border-color:transparent transparent #000;_border-top-color:pink}.Zebra_Tooltip .Zebra_Tooltip_Arrow.Zebra_Tooltip_Arrow_Top div.Zebra_Tooltip_Arrow_Border{border-color:transparent transparent #000}.Zebra_Tooltip .Zebra_Tooltip_Arrow div{position:absolute;border-style:solid;border-width:10px;width:0;height:0;left:0;_border-left-color:pink;_border-right-color:pink;_filter:chroma(color=pink)}.Zebra_Tooltip .Zebra_Tooltip_Arrow div.Zebra_Tooltip_Arrow_Border{border-width:10px;box-shadow:0 0 6px rgba(0,0,0,0.6);left:0}.Zebra_Tooltip .Zebra_Tooltip_Close{color:#fff;font-family:Arial,sans-serif;font-size:18px;line-height:1;padding:0 4px;position:absolute;right:2px;text-decoration:none;top:2px}.Zebra_Tooltip .Zebra_Tooltip_Close:hover{color:#000;background:#c2d076;border-radius:5px}.grecaptcha-badge{z-index:65535} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/css/woocommerce-account.1704213472.css b/wp/wp-content/plugins/wordfence/modules/login-security/css/woocommerce-account.1704213472.css deleted file mode 100644 index 00755bdc..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/css/woocommerce-account.1704213472.css +++ /dev/null @@ -1 +0,0 @@ -.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--wordfence-2fa a::before{background-color:currentColor;mask-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+Cjxzdmcgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDMyIDMyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zOnNlcmlmPSJodHRwOi8vd3d3LnNlcmlmLmNvbS8iIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTsiPgogICAgPGc+CiAgICAgICAgPHBhdGggZD0iTTE2LDguNTlMMTcuNTksMTIuMDhMMTcuNiwxMi4xMUwxNy4wNiwxMi4xMUwxNy4wNiwxMi4xMkMxNy4wNywxMi4xNyAxNy4wOCwxMi4yMiAxNy4wOCwxMi4yOEMxNy4wOCwxMi40NSAxNy4wNCwxMi42MSAxNi45NiwxMi43NUMxNi45MywxMi44MiAxNi44OCwxMi44OCAxNi44NCwxMi45M0MxNi44NCwxMi45MyAxNi43NywxMy42OSAxNi43OCwxNS4xMUMxNi43OCwxNS45NiAxNi44MywxNy4yMSAxNi45MywxOC41OEMxOC41OSwxOC42NyAyMC4xMywxOC44NiAyMS41NSwxOS4xMUwyMS41NSwxMy4xOUwyMS4xNCwxMy4xOUwyMi4yLDEwLjg3TDIzLjIyLDEzLjJMMjIuODEsMTMuMkwyMi44MSwxOS4zNUMyNC4zMiwxOS42NiAyNS42NiwyMC4wNCAyNi44MiwyMC40MkwyNi44MiwxNS4yN0wyNi40MSwxNS4yN0wyNy40NywxMi45NUwyOC40OSwxNS4yOEwyOC4wOCwxNS4yOEwyOC4wOCwyMC44NkMyOS40NSwyMS4zNyAzMC40OCwyMS44NSAzMS4xMSwyMi4xN0MzMS45LDE0LjcyIDMwLjI4LDguMjYgMzAuMjgsOC4yNkMyMi43MSw4LjAxIDE2LDQgMTYsNEwxNiw4LjU5WiIgc3R5bGU9ImZpbGw6cmdiKDMzLDE0MSwxOTMpO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgICAgIDxwYXRoIGQ9Ik0yOC4wNCwyMi4xOEwyOC4wNCwyOEwyOS44MSwyOEMzMC4wNiwyNy4xOSAzMC4yNywyNi4zNiAzMC40NSwyNS41NUMzMC42OCwyNC43NCAzMC44MSwyNC4wNyAzMC45LDIzLjU5QzMwLjksMjMuNTkgMzAuOSwyMy41NyAzMC45LDIzLjU2QzMwLjkxLDIzLjUzIDMwLjkxLDIzLjUgMzAuOTEsMjMuNDdDMzAuNDcsMjMuMjMgMjkuNDksMjIuNzMgMjguMDQsMjIuMThaIiBzdHlsZT0iZmlsbDpyZ2IoMzMsMTQxLDE5Myk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPHBhdGggZD0iTTIyLjc5LDIwLjYxTDIyLjc5LDI4TDI2LjgsMjhMMjYuOCwyMS43MkMyNS42NiwyMS4zMyAyNC4zMSwyMC45NCAyMi43OSwyMC42MVoiIHN0eWxlPSJmaWxsOnJnYigzMywxNDEsMTkzKTtmaWxsLXJ1bGU6bm9uemVybzsiLz4KICAgICAgICA8cGF0aCBkPSJNMjEuNTQsMjhMMjEuNTQsMjAuMzZDMjAuMTYsMjAuMTEgMTguNjQsMTkuOTEgMTcuMDIsMTkuODFDMTcuMDIsMTkuODIgMTcuMDIsMTkuODIgMTcuMDIsMTkuODNDMTcuMDIsMTkuODYgMTcuMTMsMjAuNjggMTcuMTQsMjAuODFDMTcuMzksMjIuNyAxNy45LDI1LjY3IDE4LjQzLDI3Ljk5TDE4LjQsMjcuOTlMMjEuNTQsMjcuOTlMMjEuNTQsMjhaIiBzdHlsZT0iZmlsbDpyZ2IoMzMsMTQxLDE5Myk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPHBhdGggZD0iTTEzLjU3LDI4QzE0LjA5LDI1LjY4IDE0LjYsMjIuNzEgMTQuODYsMjAuODJMMTQuODUsMjAuODJMMTQuODYsMjAuODJDMTQuODgsMjAuNjggMTQuOTgsMTkuODcgMTQuOTgsMTkuODRDMTQuOTgsMTkuODMgMTQuOTgsMTkuODMgMTQuOTgsMTkuODJDMTMuMzUsMTkuOTIgMTEuODMsMjAuMTIgMTAuNDYsMjAuMzdMMTAuNDYsMjhMMTMuNTksMjhMMTMuNTcsMjhaIiBzdHlsZT0iZmlsbDpyZ2IoMzMsMTQxLDE5Myk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPHBhdGggZD0iTTMuOTYsMjAuODZMMy45NiwxNS4yOEwzLjU1LDE1LjI4TDQuNTcsMTIuOTVMNS42MywxNS4yN0w1LjIyLDE1LjI3TDUuMjIsMjAuNDJDNi4zOCwyMC4wNCA3LjcyLDE5LjY3IDkuMjMsMTkuMzVMOS4yMywxMy4yTDguODIsMTMuMkw5Ljg0LDEwLjg3TDEwLjksMTMuMTlMMTAuNDksMTMuMTlMMTAuNDksMTkuMTFDMTEuOTEsMTguODYgMTMuNDUsMTguNjcgMTUuMTEsMTguNThDMTUuMjEsMTcuMjEgMTUuMjYsMTUuOTYgMTUuMjYsMTUuMTFDMTUuMjcsMTMuNyAxNS4yLDEyLjkzIDE1LjIsMTIuOTNDMTUuMTUsMTIuODcgMTUuMTEsMTIuODEgMTUuMDgsMTIuNzVDMTUsMTIuNjEgMTQuOTYsMTIuNDUgMTQuOTYsMTIuMjhDMTQuOTYsMTIuMjMgMTQuOTcsMTIuMTcgMTQuOTgsMTIuMTJMMTQuOTgsMTIuMTFMMTQuNDQsMTIuMTFMMTQuNDUsMTIuMDhMMTYsOC41OUwxNiw0QzE2LDQgOS4yOSw4LjAxIDEuNzUsOC4yNkMxLjc1LDguMjYgMC4xMywxNC43MiAwLjkyLDIyLjE3QzEuNTYsMjEuODUgMi41OCwyMS4zNiAzLjk2LDIwLjg2WiIgc3R5bGU9ImZpbGw6cmdiKDMzLDE0MSwxOTMpO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgICAgIDxwYXRoIGQ9Ik01LjIsMjEuNzJMNS4yLDI4TDkuMjEsMjhMOS4yMSwyMC42MUM3LjY0LDIwLjk1IDYuMjgsMjEuMzUgNS4yLDIxLjcyWiIgc3R5bGU9ImZpbGw6cmdiKDMzLDE0MSwxOTMpO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgICAgIDxwYXRoIGQ9Ik0xLjA5LDIzLjQ3QzEuMDgsMjMuNDcgMS4wOCwyMy40NyAxLjA5LDIzLjQ3QzEuMDksMjMuNSAxLjEsMjMuNTMgMS4xLDIzLjU2QzEuMSwyMy41NyAxLjEsMjMuNTggMS4xLDIzLjU5QzEuMTgsMjQuMDcgMS4zMiwyNC43NCAxLjU1LDI1LjU1QzEuNzMsMjYuMzYgMS45NSwyNy4xOSAyLjE5LDI4TDMuOTUsMjhMMy45NSwyMi4xN0MyLjUxLDIyLjczIDEuNTMsMjMuMjMgMS4wOSwyMy40N1oiIHN0eWxlPSJmaWxsOnJnYigzMywxNDEsMTkzKTtmaWxsLXJ1bGU6bm9uemVybzsiLz4KICAgIDwvZz4KPC9zdmc+Cg==");-webkit-mask-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+Cjxzdmcgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDMyIDMyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zOnNlcmlmPSJodHRwOi8vd3d3LnNlcmlmLmNvbS8iIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTsiPgogICAgPGc+CiAgICAgICAgPHBhdGggZD0iTTE2LDguNTlMMTcuNTksMTIuMDhMMTcuNiwxMi4xMUwxNy4wNiwxMi4xMUwxNy4wNiwxMi4xMkMxNy4wNywxMi4xNyAxNy4wOCwxMi4yMiAxNy4wOCwxMi4yOEMxNy4wOCwxMi40NSAxNy4wNCwxMi42MSAxNi45NiwxMi43NUMxNi45MywxMi44MiAxNi44OCwxMi44OCAxNi44NCwxMi45M0MxNi44NCwxMi45MyAxNi43NywxMy42OSAxNi43OCwxNS4xMUMxNi43OCwxNS45NiAxNi44MywxNy4yMSAxNi45MywxOC41OEMxOC41OSwxOC42NyAyMC4xMywxOC44NiAyMS41NSwxOS4xMUwyMS41NSwxMy4xOUwyMS4xNCwxMy4xOUwyMi4yLDEwLjg3TDIzLjIyLDEzLjJMMjIuODEsMTMuMkwyMi44MSwxOS4zNUMyNC4zMiwxOS42NiAyNS42NiwyMC4wNCAyNi44MiwyMC40MkwyNi44MiwxNS4yN0wyNi40MSwxNS4yN0wyNy40NywxMi45NUwyOC40OSwxNS4yOEwyOC4wOCwxNS4yOEwyOC4wOCwyMC44NkMyOS40NSwyMS4zNyAzMC40OCwyMS44NSAzMS4xMSwyMi4xN0MzMS45LDE0LjcyIDMwLjI4LDguMjYgMzAuMjgsOC4yNkMyMi43MSw4LjAxIDE2LDQgMTYsNEwxNiw4LjU5WiIgc3R5bGU9ImZpbGw6cmdiKDMzLDE0MSwxOTMpO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgICAgIDxwYXRoIGQ9Ik0yOC4wNCwyMi4xOEwyOC4wNCwyOEwyOS44MSwyOEMzMC4wNiwyNy4xOSAzMC4yNywyNi4zNiAzMC40NSwyNS41NUMzMC42OCwyNC43NCAzMC44MSwyNC4wNyAzMC45LDIzLjU5QzMwLjksMjMuNTkgMzAuOSwyMy41NyAzMC45LDIzLjU2QzMwLjkxLDIzLjUzIDMwLjkxLDIzLjUgMzAuOTEsMjMuNDdDMzAuNDcsMjMuMjMgMjkuNDksMjIuNzMgMjguMDQsMjIuMThaIiBzdHlsZT0iZmlsbDpyZ2IoMzMsMTQxLDE5Myk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPHBhdGggZD0iTTIyLjc5LDIwLjYxTDIyLjc5LDI4TDI2LjgsMjhMMjYuOCwyMS43MkMyNS42NiwyMS4zMyAyNC4zMSwyMC45NCAyMi43OSwyMC42MVoiIHN0eWxlPSJmaWxsOnJnYigzMywxNDEsMTkzKTtmaWxsLXJ1bGU6bm9uemVybzsiLz4KICAgICAgICA8cGF0aCBkPSJNMjEuNTQsMjhMMjEuNTQsMjAuMzZDMjAuMTYsMjAuMTEgMTguNjQsMTkuOTEgMTcuMDIsMTkuODFDMTcuMDIsMTkuODIgMTcuMDIsMTkuODIgMTcuMDIsMTkuODNDMTcuMDIsMTkuODYgMTcuMTMsMjAuNjggMTcuMTQsMjAuODFDMTcuMzksMjIuNyAxNy45LDI1LjY3IDE4LjQzLDI3Ljk5TDE4LjQsMjcuOTlMMjEuNTQsMjcuOTlMMjEuNTQsMjhaIiBzdHlsZT0iZmlsbDpyZ2IoMzMsMTQxLDE5Myk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPHBhdGggZD0iTTEzLjU3LDI4QzE0LjA5LDI1LjY4IDE0LjYsMjIuNzEgMTQuODYsMjAuODJMMTQuODUsMjAuODJMMTQuODYsMjAuODJDMTQuODgsMjAuNjggMTQuOTgsMTkuODcgMTQuOTgsMTkuODRDMTQuOTgsMTkuODMgMTQuOTgsMTkuODMgMTQuOTgsMTkuODJDMTMuMzUsMTkuOTIgMTEuODMsMjAuMTIgMTAuNDYsMjAuMzdMMTAuNDYsMjhMMTMuNTksMjhMMTMuNTcsMjhaIiBzdHlsZT0iZmlsbDpyZ2IoMzMsMTQxLDE5Myk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPHBhdGggZD0iTTMuOTYsMjAuODZMMy45NiwxNS4yOEwzLjU1LDE1LjI4TDQuNTcsMTIuOTVMNS42MywxNS4yN0w1LjIyLDE1LjI3TDUuMjIsMjAuNDJDNi4zOCwyMC4wNCA3LjcyLDE5LjY3IDkuMjMsMTkuMzVMOS4yMywxMy4yTDguODIsMTMuMkw5Ljg0LDEwLjg3TDEwLjksMTMuMTlMMTAuNDksMTMuMTlMMTAuNDksMTkuMTFDMTEuOTEsMTguODYgMTMuNDUsMTguNjcgMTUuMTEsMTguNThDMTUuMjEsMTcuMjEgMTUuMjYsMTUuOTYgMTUuMjYsMTUuMTFDMTUuMjcsMTMuNyAxNS4yLDEyLjkzIDE1LjIsMTIuOTNDMTUuMTUsMTIuODcgMTUuMTEsMTIuODEgMTUuMDgsMTIuNzVDMTUsMTIuNjEgMTQuOTYsMTIuNDUgMTQuOTYsMTIuMjhDMTQuOTYsMTIuMjMgMTQuOTcsMTIuMTcgMTQuOTgsMTIuMTJMMTQuOTgsMTIuMTFMMTQuNDQsMTIuMTFMMTQuNDUsMTIuMDhMMTYsOC41OUwxNiw0QzE2LDQgOS4yOSw4LjAxIDEuNzUsOC4yNkMxLjc1LDguMjYgMC4xMywxNC43MiAwLjkyLDIyLjE3QzEuNTYsMjEuODUgMi41OCwyMS4zNiAzLjk2LDIwLjg2WiIgc3R5bGU9ImZpbGw6cmdiKDMzLDE0MSwxOTMpO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgICAgIDxwYXRoIGQ9Ik01LjIsMjEuNzJMNS4yLDI4TDkuMjEsMjhMOS4yMSwyMC42MUM3LjY0LDIwLjk1IDYuMjgsMjEuMzUgNS4yLDIxLjcyWiIgc3R5bGU9ImZpbGw6cmdiKDMzLDE0MSwxOTMpO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgICAgIDxwYXRoIGQ9Ik0xLjA5LDIzLjQ3QzEuMDgsMjMuNDcgMS4wOCwyMy40NyAxLjA5LDIzLjQ3QzEuMDksMjMuNSAxLjEsMjMuNTMgMS4xLDIzLjU2QzEuMSwyMy41NyAxLjEsMjMuNTggMS4xLDIzLjU5QzEuMTgsMjQuMDcgMS4zMiwyNC43NCAxLjU1LDI1LjU1QzEuNzMsMjYuMzYgMS45NSwyNy4xOSAyLjE5LDI4TDMuOTUsMjhMMy45NSwyMi4xN0MyLjUxLDIyLjczIDEuNTMsMjMuMjMgMS4wOSwyMy40N1oiIHN0eWxlPSJmaWxsOnJnYigzMywxNDEsMTkzKTtmaWxsLXJ1bGU6bm9uemVybzsiLz4KICAgIDwvZz4KPC9zdmc+Cg==");mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat} diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/header.svg b/wp/wp-content/plugins/wordfence/modules/login-security/img/header.svg deleted file mode 100644 index 4e1fbb7d..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/img/header.svg +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"> - <g> - <path d="M16,8.59L17.59,12.08L17.6,12.11L17.06,12.11L17.06,12.12C17.07,12.17 17.08,12.22 17.08,12.28C17.08,12.45 17.04,12.61 16.96,12.75C16.93,12.82 16.88,12.88 16.84,12.93C16.84,12.93 16.77,13.69 16.78,15.11C16.78,15.96 16.83,17.21 16.93,18.58C18.59,18.67 20.13,18.86 21.55,19.11L21.55,13.19L21.14,13.19L22.2,10.87L23.22,13.2L22.81,13.2L22.81,19.35C24.32,19.66 25.66,20.04 26.82,20.42L26.82,15.27L26.41,15.27L27.47,12.95L28.49,15.28L28.08,15.28L28.08,20.86C29.45,21.37 30.48,21.85 31.11,22.17C31.9,14.72 30.28,8.26 30.28,8.26C22.71,8.01 16,4 16,4L16,8.59Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M28.04,22.18L28.04,28L29.81,28C30.06,27.19 30.27,26.36 30.45,25.55C30.68,24.74 30.81,24.07 30.9,23.59C30.9,23.59 30.9,23.57 30.9,23.56C30.91,23.53 30.91,23.5 30.91,23.47C30.47,23.23 29.49,22.73 28.04,22.18Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M22.79,20.61L22.79,28L26.8,28L26.8,21.72C25.66,21.33 24.31,20.94 22.79,20.61Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M21.54,28L21.54,20.36C20.16,20.11 18.64,19.91 17.02,19.81C17.02,19.82 17.02,19.82 17.02,19.83C17.02,19.86 17.13,20.68 17.14,20.81C17.39,22.7 17.9,25.67 18.43,27.99L18.4,27.99L21.54,27.99L21.54,28Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M13.57,28C14.09,25.68 14.6,22.71 14.86,20.82L14.85,20.82L14.86,20.82C14.88,20.68 14.98,19.87 14.98,19.84C14.98,19.83 14.98,19.83 14.98,19.82C13.35,19.92 11.83,20.12 10.46,20.37L10.46,28L13.59,28L13.57,28Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M3.96,20.86L3.96,15.28L3.55,15.28L4.57,12.95L5.63,15.27L5.22,15.27L5.22,20.42C6.38,20.04 7.72,19.67 9.23,19.35L9.23,13.2L8.82,13.2L9.84,10.87L10.9,13.19L10.49,13.19L10.49,19.11C11.91,18.86 13.45,18.67 15.11,18.58C15.21,17.21 15.26,15.96 15.26,15.11C15.27,13.7 15.2,12.93 15.2,12.93C15.15,12.87 15.11,12.81 15.08,12.75C15,12.61 14.96,12.45 14.96,12.28C14.96,12.23 14.97,12.17 14.98,12.12L14.98,12.11L14.44,12.11L14.45,12.08L16,8.59L16,4C16,4 9.29,8.01 1.75,8.26C1.75,8.26 0.13,14.72 0.92,22.17C1.56,21.85 2.58,21.36 3.96,20.86Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M5.2,21.72L5.2,28L9.21,28L9.21,20.61C7.64,20.95 6.28,21.35 5.2,21.72Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M1.09,23.47C1.08,23.47 1.08,23.47 1.09,23.47C1.09,23.5 1.1,23.53 1.1,23.56C1.1,23.57 1.1,23.58 1.1,23.59C1.18,24.07 1.32,24.74 1.55,25.55C1.73,26.36 1.95,27.19 2.19,28L3.95,28L3.95,22.17C2.51,22.73 1.53,23.23 1.09,23.47Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - </g> -</svg> diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/lightbox-controls.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/lightbox-controls.png deleted file mode 100644 index f1ee226e..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/lightbox-controls.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/loading.gif b/wp/wp-content/plugins/wordfence/modules/login-security/img/loading.gif deleted file mode 100644 index 53dd589f..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/loading.gif and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/loading_background.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/loading_background.png deleted file mode 100644 index 6ae83e69..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/loading_background.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/menu.svg b/wp/wp-content/plugins/wordfence/modules/login-security/img/menu.svg deleted file mode 100644 index 4e1fbb7d..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/img/menu.svg +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"> - <g> - <path d="M16,8.59L17.59,12.08L17.6,12.11L17.06,12.11L17.06,12.12C17.07,12.17 17.08,12.22 17.08,12.28C17.08,12.45 17.04,12.61 16.96,12.75C16.93,12.82 16.88,12.88 16.84,12.93C16.84,12.93 16.77,13.69 16.78,15.11C16.78,15.96 16.83,17.21 16.93,18.58C18.59,18.67 20.13,18.86 21.55,19.11L21.55,13.19L21.14,13.19L22.2,10.87L23.22,13.2L22.81,13.2L22.81,19.35C24.32,19.66 25.66,20.04 26.82,20.42L26.82,15.27L26.41,15.27L27.47,12.95L28.49,15.28L28.08,15.28L28.08,20.86C29.45,21.37 30.48,21.85 31.11,22.17C31.9,14.72 30.28,8.26 30.28,8.26C22.71,8.01 16,4 16,4L16,8.59Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M28.04,22.18L28.04,28L29.81,28C30.06,27.19 30.27,26.36 30.45,25.55C30.68,24.74 30.81,24.07 30.9,23.59C30.9,23.59 30.9,23.57 30.9,23.56C30.91,23.53 30.91,23.5 30.91,23.47C30.47,23.23 29.49,22.73 28.04,22.18Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M22.79,20.61L22.79,28L26.8,28L26.8,21.72C25.66,21.33 24.31,20.94 22.79,20.61Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M21.54,28L21.54,20.36C20.16,20.11 18.64,19.91 17.02,19.81C17.02,19.82 17.02,19.82 17.02,19.83C17.02,19.86 17.13,20.68 17.14,20.81C17.39,22.7 17.9,25.67 18.43,27.99L18.4,27.99L21.54,27.99L21.54,28Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M13.57,28C14.09,25.68 14.6,22.71 14.86,20.82L14.85,20.82L14.86,20.82C14.88,20.68 14.98,19.87 14.98,19.84C14.98,19.83 14.98,19.83 14.98,19.82C13.35,19.92 11.83,20.12 10.46,20.37L10.46,28L13.59,28L13.57,28Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M3.96,20.86L3.96,15.28L3.55,15.28L4.57,12.95L5.63,15.27L5.22,15.27L5.22,20.42C6.38,20.04 7.72,19.67 9.23,19.35L9.23,13.2L8.82,13.2L9.84,10.87L10.9,13.19L10.49,13.19L10.49,19.11C11.91,18.86 13.45,18.67 15.11,18.58C15.21,17.21 15.26,15.96 15.26,15.11C15.27,13.7 15.2,12.93 15.2,12.93C15.15,12.87 15.11,12.81 15.08,12.75C15,12.61 14.96,12.45 14.96,12.28C14.96,12.23 14.97,12.17 14.98,12.12L14.98,12.11L14.44,12.11L14.45,12.08L16,8.59L16,4C16,4 9.29,8.01 1.75,8.26C1.75,8.26 0.13,14.72 0.92,22.17C1.56,21.85 2.58,21.36 3.96,20.86Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M5.2,21.72L5.2,28L9.21,28L9.21,20.61C7.64,20.95 6.28,21.35 5.2,21.72Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - <path d="M1.09,23.47C1.08,23.47 1.08,23.47 1.09,23.47C1.09,23.5 1.1,23.53 1.1,23.56C1.1,23.57 1.1,23.58 1.1,23.59C1.18,24.07 1.32,24.74 1.55,25.55C1.73,26.36 1.95,27.19 2.19,28L3.95,28L3.95,22.17C2.51,22.73 1.53,23.23 1.09,23.47Z" style="fill:rgb(33,141,193);fill-rule:nonzero;"/> - </g> -</svg> diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_444444_256x240.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_444444_256x240.png deleted file mode 100644 index a802263b..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_444444_256x240.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_555555_256x240.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_555555_256x240.png deleted file mode 100644 index 7009bf75..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_555555_256x240.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_777620_256x240.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_777620_256x240.png deleted file mode 100644 index e0a1fdfd..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_777620_256x240.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_777777_256x240.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_777777_256x240.png deleted file mode 100644 index 8e26ee4f..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_777777_256x240.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_cc0000_256x240.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_cc0000_256x240.png deleted file mode 100644 index 28154300..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_cc0000_256x240.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_ffffff_256x240.png b/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_ffffff_256x240.png deleted file mode 100644 index 4d66f596..00000000 Binary files a/wp/wp-content/plugins/wordfence/modules/login-security/img/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/admin-global.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/admin-global.1704213472.js deleted file mode 100644 index 43eec751..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/admin-global.1704213472.js +++ /dev/null @@ -1,90 +0,0 @@ -(function($) { - window['GWFLS'] = { - init: function() { - this.register_create_user_events(); - - $('.wfls-persistent-notice').on('click', 'button', function() { - GWFLS.ajax( - 'wordfence_ls_dismiss_persistent_notice', - {notice_id: $(this).parent('.notice').attr('id')}, - ); - }); - }, - - /** - * Sends a WP AJAX call, automatically adding our nonce. - * - * @param string action - * @param string|array|object payload - * @param function successCallback - * @param function failureCallback - */ - ajax: function(action, payload, successCallback, failureCallback) { - if (typeof(payload) == 'string') { - if (payload.length > 0) { - payload += '&'; - } - payload += 'action=' + action + '&nonce=' + GWFLSVars.nonce; - } - else if (typeof(payload) == 'object' && payload instanceof Array) { - // jQuery serialized form data - payload.push({ - name: 'action', - value: action - }); - payload.push({ - name: 'nonce', - value: GWFLSVars.nonce - }); - } - else if (typeof(payload) == 'object') { - payload['action'] = action; - payload['nonce'] = GWFLSVars.nonce; - } - - - $.ajax({ - type: 'POST', - url: GWFLSVars.ajaxurl, - dataType: "json", - data: payload, - success: function(json) { - typeof successCallback == 'function' && successCallback(json); - }, - error: function() { - typeof failureCallback == 'function' && failureCallback(); - } - }); - }, - - dismiss_notice: function(nid) { - this.ajax('wordfence_ls_dismiss_notice', { - id: nid - }, - function(res) { $('.wfls-notice[data-notice-id="' + nid + '"]').fadeOut(); }, - function() { $('.wfls-notice[data-notice-id="' + nid + '"]').fadeOut(); } - ); - }, - - register_create_user_events: function() { - var container = $('#wfls-grace-period-toggle-container'); - if (container.length) { - var gracePeriodToggle = container.detach().find('tr'); - $('#createuser #role').on('change', function() { - var select = $(this); - gracePeriodToggle.detach(); - var role = select.val(); - var row = select.closest('tr'); - if (role === 'administrator') { - gracePeriodToggle.insertAfter(row); - } - }).trigger('change'); - } - } - }; - - $(function() { - GWFLS.init(); - }); -})(jQuery); - diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/admin.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/admin.1704213472.js deleted file mode 100644 index 8e0ffd13..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/admin.1704213472.js +++ /dev/null @@ -1,932 +0,0 @@ -(function($) { - function __(string) { - return WFLS_ADMIN_TRANSLATIONS[string] || string; - } - window['WFLS'] = { - panelIsOpen: false, - basePageName: '', - panelQueue: [], - pendingChanges: {}, - userIsActivating: false, - - //Screen sizes - SCREEN_XS: 'xs', - SCREEN_SM: 'sm', - SCREEN_MD: 'md', - SCREEN_LG: 'lg', - - init: function() { - this.basePageName = document.title; - - var tabs = $('.wfls-page-tabs').find('.wfls-tab a'); - if (tabs.length > 0) { - tabs.click(function() { - $('.wfls-page-tabs').find('.wfls-tab').removeClass('wfls-active'); - $('.wfls-tab-content').removeClass('wfls-active'); - - var tab = $(this).closest('.wfls-tab'); - tab.addClass('wfls-active'); - var content = $('#' + tab.data('target')); - content.addClass('wfls-active'); - document.title = tab.data('pageTitle') + " \u2039 " + WFLS.basePageName; - $(window).trigger('wfls-tab-change', [tab.data('target')]); - }); - if (window.location.hash) { - var hashes = WFLS.parseHashes(); - var hash = hashes[hashes.length - 1]; - for (var i = 0; i < tabs.length; i++) { - if (hash == $(tabs[i]).closest('.wfls-tab').data('target')) { - $(tabs[i]).trigger('click'); - } - } - } - else { - $(tabs[0]).trigger('click'); - } - $(window).on('hashchange', function () { - var hashes = WFLS.parseHashes(); - var hash = hashes[hashes.length - 1]; - for (var i = 0; i < tabs.length; i++) { - if (hash == $(tabs[i]).closest('.wfls-tab').data('target')) { - $(tabs[i]).trigger('click'); - } - } - }); - } - - //On/Off Option - $('.wfls-option.wfls-option-toggled .wfls-option-checkbox').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wfls-option'); - if (optionElement.hasClass('wfls-option-premium') || optionElement.hasClass('wfls-disabled')) { - return; - } - - var option = optionElement.data('option'); - var value = false; - var isActive = $(this).hasClass('wfls-checked'); - if (isActive) { - $(this).removeClass('wfls-checked').attr('aria-checked', 'false'); - value = optionElement.data('disabledValue'); - } - else { - $(this).addClass('wfls-checked').attr('aria-checked', 'true'); - value = optionElement.data('enabledValue'); - } - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - - $(this).parent().find('.wfls-option-title').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).parent().find('.wfls-option-checkbox').trigger('click'); - }).css('cursor', 'pointer'); - }); - - //On/Off Boolean Switch Option - $('.wfls-option.wfls-option-toggled-boolean-switch .wfls-boolean-switch').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - $(this).find('.wfls-boolean-switch-handle').trigger('click'); - }); - - $(this).find('.wfls-boolean-switch-handle').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wfls-option'); - if (optionElement.hasClass('wfls-option-premium') || optionElement.hasClass('wfls-disabled')) { - return; - } - - var switchElement = $(this).closest('.wfls-boolean-switch'); - var option = optionElement.data('option'); - var value = false; - var isActive = switchElement.hasClass('wfls-active'); - if (isActive) { - switchElement.removeClass('wfls-active').attr('aria-checked', 'false'); - value = optionElement.data('disabledValue'); - } - else { - switchElement.addClass('wfls-active').attr('aria-checked', 'true'); - value = optionElement.data('enabledValue'); - } - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - - $(this).parent().find('.wfls-option-title').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).parent().find('.wfls-boolean-switch-handle').trigger('click'); - }).css('cursor', 'pointer'); - }); - - //On/Off Segmented Option - $('.wfls-option.wfls-option-toggled-segmented [type=radio]').each(function() { - $(this).on('click', function(e) { - var optionElement = $(this).closest('.wfls-option'); - if (optionElement.hasClass('wfls-option-premium') || optionElement.hasClass('wfls-disabled')) { - return; - } - - var option = optionElement.data('option'); - var value = this.value; - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - }); - - //On/Off Multiple Option - $('.wfls-option.wfls-option-toggled-multiple .wfls-option-checkbox').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('.wfls-option'); - if (optionElement.hasClass('wfls-option-premium') || optionElement.hasClass('wfls-disabled') || $(this).hasClass('wfls-disabled')) { - return; - } - - var checkboxElement = $(this).closest('ul'); - var option = checkboxElement.data('option'); - var value = false; - var isActive = $(this).hasClass('wfls-checked'); - if (isActive) { - $(this).removeClass('wfls-checked').attr('aria-checked', 'false'); - value = checkboxElement.data('disabledValue'); - } - else { - $(this).addClass('wfls-checked').attr('aria-checked', 'true'); - value = checkboxElement.data('enabledValue'); - } - - var originalValue = checkboxElement.data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - - $(this).parent().find('.wfls-option-title').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).parent().find('.wfls-option-checkbox').trigger('click'); - }).css('cursor', 'pointer'); - }); - - //Text field option - $('.wfls-option.wfls-option-text > .wfls-option-content > ul > li.wfls-option-text input').on('change paste keyup', function() { - var e = this; - - setTimeout(function() { - var optionElement = $(e).closest('.wfls-option'); - var option = optionElement.data('textOption'); - - if (typeof option !== 'undefined') { - var value = $(e).val(); - - var originalValue = optionElement.data('originalTextValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - } - }, 4); - }); - - //Menu option - $('.wfls-option.wfls-option-toggled-select > .wfls-option-content > ul > li.wfls-option-select select, .wfls-option.wfls-option-select > .wfls-option-content > ul > li.wfls-option-select select, .wf-option.wfls-option-select > li.wfls-option-select select').each(function() { - if (!$.fn.wfselect2) { return; } - - var width = (WFLS.screenSize(500) ? '200px' : 'resolve'); - if ($(this).data('preferredWidth')) { - width = $(this).data('preferredWidth'); - } - - $(this).wfselect2({ - minimumResultsForSearch: -1, - width: width - }).on('change', function () { - var optionElement = $(this).closest('.wfls-option'); - var option = optionElement.data('selectOption'); - var value = $(this).val(); - - var originalValue = optionElement.data('originalSelectValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - }).triggerHandler('change'); - - //Text area option - $('.wfls-option.wfls-option-textarea > .wfls-option-content > ul > li.wfls-option-textarea textarea').on('change paste keyup', function() { - var e = this; - - setTimeout(function() { - var optionElement = $(e).closest('.wfls-option'); - var option = optionElement.data('textOption'); - var value = $(e).val(); - - var originalValue = optionElement.data('originalTextValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }, 4); - }); - - //Switch Option - $('.wfls-option.wfls-option-switch .wfls-switch > li').each(function(index, element) { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(element).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $(this).closest('ul.wfls-option-switch, div.wfls-option-switch'); - var optionName = optionElement.data('optionName'); - var originalValue = optionElement.data('originalValue'); - var value = $(this).data('optionValue'); - - var control = $(this).closest('.wfls-switch'); - control.find('li').each(function() { - $(this).toggleClass('wfls-active', value == $(this).data('optionValue')).attr('aria-checked', value == $(this).data('optionValue') ? 'true' : 'false'); - }); - - if (originalValue == value) { - delete WFLS.pendingChanges[optionName]; - } - else { - WFLS.pendingChanges[optionName] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - }); - - //Dropdown/Text Options - $('select.wfls-option-select, input.wfls-option-input').each(function() { - $(this).data('original', $(this).val()); - }).on('change input', function(e) { - var input = $(this); - var name = input.attr('name'); - var value = input.val(); - var original = input.data('original'); - if (value === original || (input.hasClass('wfls-option-input-required') && value === '')) { - delete WFLS.pendingChanges[name]; - } - else { - WFLS.pendingChanges[name] = value; - } - WFLS.updatePendingChanges(); - }); - - $('#wfls-save-changes').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - WFLS.saveOptions(function(res) { - WFLS.pendingChanges = {}; - WFLS.updatePendingChanges(); - - if (res.redirect) { - window.location.href = res.redirect; - } - else { - window.location.reload(true); - } - }); - }); - - $('#wfls-cancel-changes').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - //On/Off options - $('.wfls-option.wfls-option-toggled').each(function() { - var enabledValue = $(this).data('enabledValue'); - var disabledValue = $(this).data('disabledValue'); - var originalValue = $(this).data('originalValue'); - if (enabledValue == originalValue) { - $(this).find('.wfls-option-checkbox').addClass('wfls-checked').attr('aria-checked', 'true'); - } - else { - $(this).find('.wfls-option-checkbox').removeClass('wfls-checked').attr('aria-checked', 'false'); - } - $(this).trigger('change', [true]); - }); - - $('.wfls-option-toggled-boolean-switch').each(function() { - var enabledValue = $(this).data('enabledValue'); - var disabledValue = $(this).data('disabledValue'); - var originalValue = $(this).data('originalValue'); - if (enabledValue == originalValue) { - $(this).find('.wfls-boolean-switch').addClass('wfls-active').attr('aria-checked', 'true'); - } - else { - $(this).find('.wfls-boolean-switch').removeClass('wfls-active').attr('aria-checked', 'false'); - } - $(this).trigger('change', [true]); - }); - - $('.wfls-option.wfls-option-toggled-segmented').each(function() { - var originalValue = $(this).data('originalValue'); - $(this).find('[type=radio]').each(function() { - if (this.value == originalValue) { - this.checked = true; - return false; - } - }); - $(this).trigger('change', [true]); - }); - - //On/Off multiple options - $('.wfls-option.wfls-option-toggled-multiple').each(function() { - $(this).find('.wfls-option-checkboxes > ul').each(function() { - var enabledValue = $(this).data('enabledValue'); - var disabledValue = $(this).data('disabledValue'); - var originalValue = $(this).data('originalValue'); - if (enabledValue == originalValue) { - $(this).find('.wfls-option-checkbox').addClass('wfls-checked').attr('aria-checked', 'true'); - } - else { - $(this).find('.wfls-option-checkbox').removeClass('wfls-checked').attr('aria-checked', 'false'); - } - }); - $(this).trigger('change', [true]); - }); - - //On/Off options with menu - $('.wfls-option.wfls-option-toggled-select').each(function() { - var selectElement = $(this).find('.wfls-option-select select'); - var enabledToggleValue = $(this).data('enabledToggleValue'); - var disabledToggleValue = $(this).data('disabledToggleValue'); - var originalToggleValue = $(this).data('originalToggleValue'); - if (enabledToggleValue == originalToggleValue) { - $(this).find('.wfls-option-checkbox').addClass('wfls-checked').attr('aria-checked', 'true'); - selectElement.attr('disabled', false); - } - else { - $(this).find('.wfls-option-checkbox').removeClass('wfls-checked').attr('aria-checked', 'false'); - selectElement.attr('disabled', true); - } - - var originalSelectValue = $(this).data('originalSelectValue'); - $(this).find('.wfls-option-select select').val(originalSelectValue).trigger('change'); - $(this).trigger('change', [true]); - }); - - //Menu options - $('.wfls-option.wfls-option-select').each(function() { - var originalSelectValue = $(this).data('originalSelectValue'); - $(this).find('.wfls-option-select select').val(originalSelectValue).trigger('change'); - $(this).trigger('change', [true]); - }); - - //Text options - $('.wfls-option.wfls-option-text').each(function() { - var originalTextValue = $(this).data('originalTextValue'); - if (typeof originalTextValue !== 'undefined') { - $(this).find('.wfls-option-text input').val(originalTextValue); - } - $(this).trigger('change', [true]); - }); - - //Text area options - $('.wfls-option.wfls-option-textarea').each(function() { - var originalTextValue = $(this).data('originalTextValue'); - $(this).find('.wfls-option-textarea textarea').val(originalTextValue); - $(this).trigger('change', [true]); - }); - - //Token options - $('.wfls-option.wfls-option-token').each(function() { - var originalTokenValue = $(this).data('originalTokenValue'); - $(this).find('select').val(originalTokenValue).trigger('change'); - $(this).trigger('change', [true]); - }); - - //Switch options - $('.wfls-option.wfls-option-switch').each(function() { - var originalValue = $(this).data('originalValue'); - $(this).find('.wfls-switch > li').each(function() { - $(this).toggleClass('wfls-active', originalValue == $(this).data('optionValue')).attr('aria-checked', originalValue == $(this).data('optionValue') ? 'true' : 'false'); - }); - $(this).trigger('change', [true]); - }); - - //Other options - $(window).trigger('wflsOptionsReset'); - - WFLS.pendingChanges = {}; - WFLS.updatePendingChanges(); - }); - }, - - updatePendingChanges: function() { - $(window).off('beforeunload', WFLS._unsavedOptionsHandler); - if (Object.keys(WFLS.pendingChanges).length) { - $('#wfls-cancel-changes').removeClass('wfls-disabled'); - $('#wfls-save-changes').removeClass('wfls-disabled'); - $(window).on('beforeunload', WFLS._unsavedOptionsHandler); - } - else { - $('#wfls-cancel-changes').addClass('wfls-disabled'); - $('#wfls-save-changes').addClass('wfls-disabled'); - } - }, - - _unsavedOptionsHandler: function(e) { - var message = __("You have unsaved changes to your options. If you leave this page, those changes will be lost."); //Only shows on older browsers, newer browsers don't allow message customization - e = e || window.event; - if (e) { - e.returnValue = message; //IE and Firefox - } - return message; //Others - }, - - setOptions: function(options, successCallback, failureCallback) { - if (!Object.keys(options).length) { - return; - } - - this.ajax('wordfence_ls_save_options', {changes: JSON.stringify(options)}, function(res) { - if (res.success) { - typeof successCallback == 'function' && successCallback(res); - } - else { - if (res.hasOwnProperty('html') && res.html) { - WFLS.panelModalHTML((WFLS.screenSize(500) ? '300px' : '400px'), 'Error Saving Options', res.error); - } - else { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), 'Error Saving Options', res.error); - } - - typeof failureCallback == 'function' && failureCallback - } - }); - }, - - saveOptions: function(successCallback, failureCallback) { - this.setOptions(WFLS.pendingChanges, successCallback, failureCallback); - }, - - updateIPPreview: function(value, successCallback) { - this.ajax('wordfence_ls_update_ip_preview', value, function(response) { - if (successCallback) { - successCallback(response); - } - }); - }, - - /** - * Sends a WP AJAX call, automatically adding our nonce. - * - * @param string action - * @param string|array|object payload - * @param function successCallback - * @param function failureCallback - */ - ajax: function(action, payload, successCallback, failureCallback) { - if (typeof(payload) == 'string') { - if (payload.length > 0) { - payload += '&'; - } - payload += 'action=' + action + '&nonce=' + WFLSVars.nonce; - } - else if (typeof(payload) == 'object' && payload instanceof Array) { - // jQuery serialized form data - payload.push({ - name: 'action', - value: action - }); - payload.push({ - name: 'nonce', - value: WFLSVars.nonce - }); - } - else if (typeof(payload) == 'object') { - payload['action'] = action; - payload['nonce'] = WFLSVars.nonce; - } - - - $.ajax({ - type: 'POST', - url: WFLSVars.ajaxurl, - dataType: "json", - data: payload, - success: function(json) { - typeof successCallback == 'function' && successCallback(json); - }, - error: function() { - typeof failureCallback == 'function' && failureCallback(); - } - }); - }, - - /** - * Displays a generic panel. - * - * @param @param string width A width string in the format '100px' - * @param string heading - * @param string body - * @param object settings - */ - panel: function(width, heading, body, settings) { - if (typeof settings === 'undefined') { - settings = {}; - } - WFLS.panelQueue.push([width, "<h3>" + heading + "</h3><p>" + body + "</p>", settings]); - WFLS._panelServiceQueue(); - }, - - /** - * Displays a modal panel with fixed HTML content. - * - * @param @param string width A width string in the format '100px' - * @param string heading - * @param string body - * @param object settings - */ - panelModalHTML: function(width, heading, body, settings) { - if (typeof settings === 'undefined') { - settings = {}; - } - - var prompt = $.tmpl(WFLSVars.modalHTMLTemplate, {title: heading, message: body}); - var promptHTML = $("<div />").append(prompt).html(); - var callback = settings.onComplete; - settings.overlayClose = false; - settings.closeButton = false; - settings.className = 'wfls-modal'; - settings.onComplete = function() { - $('#wfls-generic-modal-close').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - WFLS.panelClose(); - }); - - typeof callback === 'function' && callback(); - }; - WFLS.panelHTML(width, promptHTML, settings) - }, - - /** - * Displays a modal panel, automatically escaping the content. - * - * @param @param string width A width string in the format '100px' - * @param string heading - * @param string body - * @param object settings - */ - panelModal: function(width, heading, body, settings) { - if (typeof settings === 'undefined') { - settings = {}; - } - - if (width === null) - width = WFLS.screenSize(500) ? '300px' : '400px'; - - var includeDefaultButtons = typeof settings.includeDefaultButtons === 'undefined' ? false : settings.includeDefaultButtons; - var prompt = $.tmpl(WFLSVars[includeDefaultButtons ? 'modalTemplate' : 'modalNoButtonsTemplate'], {title: heading, message: body}); - - if (typeof settings.additional_buttons !== 'undefined') { - var buttonSection = prompt.find('.wfls-modal-footer > ul'); - for(index in settings.additional_buttons) { - var buttonSettings = settings.additional_buttons[index]; - var button = $('<button>').text(buttonSettings.label) - .addClass('wfls-btn wfls-btn-callout-subtle wfls-additional-button') - .attr('id', buttonSettings.id); - var buttonType = typeof buttonSettings.type === 'undefined' ? 'default' : buttonSettings.type; - button.addClass('wfls-btn-' + buttonType); - buttonSection.prepend($("<li>").addClass('wfls-padding-add-left-small').append(button)); - } - } - - var promptHTML = $("<div />").append(prompt).html(); - var callback = settings.onComplete; - settings.overlayClose = false; - settings.closeButton = false; - settings.className = 'wfls-modal'; - settings.onComplete = function() { - $('#wfls-generic-modal-close').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - WFLS.panelClose(); - }); - - typeof callback === 'function' && callback(); - }; - WFLS.panelHTML(width, promptHTML, settings) - }, - - /** - * Displays a modal with the given title and message text. - * - * @param string title the modal title - * @param string message the message (this will be treated as text, not HTML) - * @param array buttons the buttons to include in the modal footer - * Each item in the array should be an object with the following properties: - * - label: The button text - * - id: An ID for the button - * - type: The type of button for styling purposes - i.e. default, primary (default: 'default') - * @param object settings - * - * @see WFLS.panelModal - */ - displayModalMessage: function(title, message, buttons, settings) { - if (typeof settings !== 'object') - settings = {}; - var width = typeof settings.width === 'undefined' ? null : settings.width; - settings.includeDefaultButtons = false; - settings.additional_buttons = buttons; - WFLS.panelModal(width, title, message, settings); - }, - - /** - * Displays a modal panel with the error formatting. - * - * @param string errorMsg - * @param bool isTokenError Whether or not this error is an expired nonce error. - */ - panelError: function(errorMsg, isTokenError) { - var callback = false; - if (isTokenError) { - if (WFLS.tokenErrorShowing) { - return; - } - - callback = function() { - setTimeout(function() { - WFLS.tokenErrorShowing = false; - }, 30000); - }; - - WFLS.tokenErrorShowing = true; - } - - var prompt = $.tmpl(WFLSVars.tokenInvalidTemplate, {title: 'An error occurred', message: errorMsg}); - var promptHTML = $("<div />").append(prompt).html(); - var settings = {}; - settings.overlayClose = false; - settings.closeButton = false; - settings.className = 'wfls-modal'; - settings.onComplete = function() { - $('#wfls-token-invalid-modal-reload').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - window.location.reload(true); - }); - - typeof callback === 'function' && callback(); - }; - WFLS.panelHTML((WFLS.screenSize(500) ? '300px' : '400px'), promptHTML, settings); - }, - - /** - * Displays a panel with fixed HTML content. - * - * @param string width A width string in the format '100px' - * @param string html - * @param object settings - */ - panelHTML: function(width, html, settings) { - if (typeof settings === 'undefined') { - settings = {}; - } - WFLS.panelQueue.push([width, html, settings]); - WFLS._panelServiceQueue(); - }, - - /** - * Displays the next panel in the queue. - */ - _panelServiceQueue: function() { - if (WFLS.panelIsOpen) { - return; - } - if (WFLS.panelQueue.length < 1) { - return; - } - var elem = WFLS.panelQueue.shift(); - WFLS._panelOpen(elem[0], elem[1], elem[2]); - }, - - /** - * Does the actual function call to display the panel. - * - * @param string width A width string in the format '100px' - * @param string html - * @param object settings - */ - _panelOpen: function(width, html, settings) { - this.panelIsOpen = true; - $.extend(settings, { - width: width, - html: html, - onClosed: function() { - WFLS.panelClose(); - } - }); - $.wflscolorbox(settings); - }, - - /** - * Closes the current panel. - */ - panelClose: function() { - WFLS.panelIsOpen = false; - if (WFLS.panelQueue.length < 1) { - $.wflscolorbox.close(); - } - else { - WFLS._panelServiceQueue(); - } - }, - - /** - * Parses and returns the hash portion of a URL, working around user agents that URL-encode the # character. - * - * @returns {Array} - */ - parseHashes: function() { - var hashes = window.location.hash.replace('%23', '#'); - var splitHashes = hashes.split('#'); - var result = []; - for (var i = 0; i < splitHashes.length; i++) { - if (splitHashes[i].length > 0) { - result.push(splitHashes[i]); - } - } - return result; - }, - - /** - * Returns whether or not the screen size is within the size given. This may be a numerical value - * or one of the WFLS_SCREEN_ constants. - * - * @param size - * @returns {boolean} - */ - screenSize: function(size) { - switch (size) { - case WFLS.SCREEN_XS: - return window.matchMedia("only screen and (max-width: 767px)").matches; - case WFLS.SCREEN_SM: - return window.matchMedia("only screen and (max-width: 991px)").matches; - case WFLS.SCREEN_MD: - return window.matchMedia("only screen and (max-width: 1199px)").matches; - case WFLS.SCREEN_LG: - return window.matchMedia("only screen and (max-width: 32767px)").matches; - } - - var parsed = parseInt(size); - if (isNaN(parsed)) { - return false; - } - return window.matchMedia("only screen and (max-width: " + parsed + "px)").matches; - }, - }; - - $(function() { - WFLS.init(); - }); - - $.fn.crossfade = function(incoming, duration, complete) { - duration = duration || 400; - complete = complete || function() { }; - - return this.each(function() { - $(this).fadeOut(duration, function() { - $(incoming).fadeIn(duration, complete); - }); - }); - }; -})(jQuery); - -/*! @source https://github.com/eligrey/FileSaver.js/blob/master/dist/FileSaver.min.js */ -(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)}); diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/chart.umd.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/chart.umd.1704213472.js deleted file mode 100644 index 0c02717b..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/chart.umd.1704213472.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * Chart.js v4.2.1 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";var t=Object.freeze({__proto__:null,get Colors(){return jo},get Decimation(){return Uo},get Filler(){return ha},get Legend(){return fa},get SubTitle(){return ba},get Title(){return pa},get Tooltip(){return La}});function e(){}const i=(()=>{let t=0;return()=>t++})();function s(t){return null==t}function n(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function o(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function r(t,e){return a(t)?t:e}function l(t,e){return void 0===t?e:t}const h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,c=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function d(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function u(t,e,i,s){let a,r,l;if(n(t))if(r=t.length,s)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<r;a++)e.call(i,t[a],a);else if(o(t))for(l=Object.keys(t),r=l.length,a=0;a<r;a++)e.call(i,t[l[a]],l[a])}function f(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function g(t){if(n(t))return t.map(g);if(o(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=g(t[i[n]]);return e}return t}function p(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function m(t,e,i,s){if(!p(t))return;const n=e[t],a=i[t];o(n)&&o(a)?b(n,a,s):e[t]=g(a)}function b(t,e,i){const s=n(e)?e:[e],a=s.length;if(!o(t))return t;const r=(i=i||{}).merger||m;let l;for(let e=0;e<a;++e){if(l=s[e],!o(l))continue;const n=Object.keys(l);for(let e=0,s=n.length;e<s;++e)r(n[e],t,l,i)}return t}function x(t,e){return b(t,e,{merger:_})}function _(t,e,i){if(!p(t))return;const s=e[t],n=i[t];o(s)&&o(n)?x(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=g(n))}const y={"":t=>t,x:t=>t.x,y:t=>t.y};function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function M(t,e){const i=y[e]||(y[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}const k=t=>void 0!==t,S=t=>"function"==typeof t,P=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function D(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const C=Math.PI,O=2*C,A=O+C,T=Number.POSITIVE_INFINITY,L=C/180,E=C/2,R=C/4,I=2*C/3,z=Math.log10,F=Math.sign;function V(t,e,i){return Math.abs(t-e)<i}function B(t){const e=Math.round(t);t=V(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(z(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function N(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function W(t){return!isNaN(parseFloat(t))&&isFinite(t)}function H(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function j(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function $(t){return t*(C/180)}function Y(t){return t*(180/C)}function U(t){if(!a(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function X(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*C&&(o+=O),{angle:o,distance:n}}function q(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function K(t,e){return(t-e+A)%O-C}function G(t){return(t%O+O)%O}function Z(t,e,i,s){const n=G(t),o=G(e),a=G(i),r=G(o-n),l=G(a-n),h=G(n-o),c=G(n-a);return n===o||n===a||s&&o===a||r>l&&h<c}function J(t,e,i){return Math.max(e,Math.min(i,t))}function Q(t){return J(t,-32768,32767)}function tt(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function et(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const it=(t,e,i,s)=>et(t,i,s?s=>{const n=t[s][e];return n<i||n===i&&t[s+1][e]===i}:s=>t[s][e]<i),st=(t,e,i)=>et(t,i,(s=>t[s][e]>=i));function nt(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const ot=["push","pop","shift","splice","unshift"];function at(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ot.forEach((e=>{const i="_onData"+w(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function rt(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(ot.forEach((e=>{delete t[e]})),delete t._chartjs)}function lt(t){const e=new Set;let i,s;for(i=0,s=t.length;i<s;++i)e.add(t[i]);return e.size===s?t:Array.from(e)}const ht="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function ct(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,ht.call(window,(()=>{s=!1,t.apply(e,i)})))}}function dt(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}const ut=t=>"start"===t?"left":"end"===t?"right":"center",ft=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,gt=(t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e;function pt(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:h,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=J(Math.min(it(r,a.axis,h).lo,i?s:it(e,l,a.getPixelForValue(h)).lo),0,s-1)),o=u?J(Math.max(it(r,a.axis,c,!0).hi+1,i?0:it(e,l,a.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function mt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}class bt{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=ht.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var xt=new bt; -/*! - * @kurkle/color v0.3.0 - * https://github.com/kurkle/color#readme - * (c) 2022 Jukka Kurkela - * Released under the MIT License - */function _t(t){return t+.5|0}const yt=(t,e,i)=>Math.max(Math.min(t,i),e);function vt(t){return yt(_t(2.55*t),0,255)}function Mt(t){return yt(_t(255*t),0,255)}function wt(t){return yt(_t(t/2.55)/100,0,1)}function kt(t){return yt(_t(100*t),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Pt=[..."0123456789ABCDEF"],Dt=t=>Pt[15&t],Ct=t=>Pt[(240&t)>>4]+Pt[15&t],Ot=t=>(240&t)>>4==(15&t);function At(t){var e=(t=>Ot(t.r)&&Ot(t.g)&&Ot(t.b)&&Ot(t.a))(t)?Dt:Ct;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Tt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Et(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Rt(t,e,i){const s=Lt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function It(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,h,n),r=60*r+.5),[0|r,l||0,a]}function zt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(Mt)}function Ft(t,e,i){return zt(Lt,t,e,i)}function Vt(t){return(t%360+360)%360}function Bt(t){const e=Tt.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?vt(+e[5]):Mt(+e[5]));const n=Vt(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return zt(Rt,t,e,i)}(n,o,a):"hsv"===e[1]?function(t,e,i){return zt(Et,t,e,i)}(n,o,a):Ft(n,o,a),{r:i[0],g:i[1],b:i[2],a:s}}const Nt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Wt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ht;function jt(t){Ht||(Ht=function(){const t={},e=Object.keys(Wt),i=Object.keys(Nt);let s,n,o,a,r;for(s=0;s<e.length;s++){for(a=r=e[s],n=0;n<i.length;n++)o=i[n],r=r.replace(o,Nt[o]);o=parseInt(Wt[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const $t=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Yt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Ut=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Xt(t,e,i){if(t){let s=It(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=Ft(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function qt(t,e){return t?Object.assign(e||{},t):t}function Kt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Mt(t[3]))):(e=qt(t,{r:0,g:0,b:0,a:1})).a=Mt(e.a),e}function Gt(t){return"r"===t.charAt(0)?function(t){const e=$t.exec(t);let i,s,n,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?vt(t):yt(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?vt(i):yt(i,0,255)),s=255&(e[4]?vt(s):yt(s,0,255)),n=255&(e[6]?vt(n):yt(n,0,255)),{r:i,g:s,b:n,a:o}}}(t):Bt(t)}class Zt{constructor(t){if(t instanceof Zt)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=Kt(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*St[s[1]],g:255&17*St[s[2]],b:255&17*St[s[3]],a:5===o?17*St[s[4]]:255}:7!==o&&9!==o||(n={r:St[s[1]]<<4|St[s[2]],g:St[s[3]]<<4|St[s[4]],b:St[s[5]]<<4|St[s[6]],a:9===o?St[s[7]]<<4|St[s[8]]:255})),i=n||jt(t)||Gt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=qt(this._rgb);return t&&(t.a=wt(t.a)),t}set rgb(t){this._rgb=Kt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${wt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?At(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=It(t),i=e[0],s=kt(e[1]),n=kt(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${wt(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,l=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-l,i.r=255&l*i.r+n*s.r+.5,i.g=255&l*i.g+n*s.g+.5,i.b=255&l*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=Ut(wt(t.r)),n=Ut(wt(t.g)),o=Ut(wt(t.b));return{r:Mt(Yt(s+i*(Ut(wt(e.r))-s))),g:Mt(Yt(n+i*(Ut(wt(e.g))-n))),b:Mt(Yt(o+i*(Ut(wt(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Zt(this.rgb)}alpha(t){return this._rgb.a=Mt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Xt(this._rgb,2,t),this}darken(t){return Xt(this._rgb,2,-t),this}saturate(t){return Xt(this._rgb,1,t),this}desaturate(t){return Xt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=It(t);i[0]=Vt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Jt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Qt(t){return Jt(t)?t:new Zt(t)}function te(t){return Jt(t)?t:new Zt(t).saturate(.5).darken(.1).hexString()}const ee=["x","y","borderWidth","radius","tension"],ie=["color","borderColor","backgroundColor"];const se=new Map;function ne(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=se.get(i);return s||(s=new Intl.NumberFormat(t,e),se.set(i,s)),s}(e,i).format(t)}const oe={values:t=>n(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=z(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ne(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(z(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?oe.numeric.call(this,t,e,i):""}};var ae={formatters:oe};const re=Object.create(null),le=Object.create(null);function he(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;e<s;++e){const s=i[e];t=t[s]||(t[s]=Object.create(null))}return t}function ce(t,e,i){return"string"==typeof e?b(he(t,e),i):b(he(t,""),e)}class de{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>te(e.backgroundColor),this.hoverBorderColor=(t,e)=>te(e.borderColor),this.hoverColor=(t,e)=>te(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ce(this,t,e)}get(t){return he(this,t)}describe(t,e){return ce(le,t,e)}override(t,e){return ce(re,t,e)}route(t,e,i,s){const n=he(this,t),a=he(this,i),r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=a[s];return o(t)?Object.assign({},e,t):l(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ue=new de({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:ie},numbers:{type:"number",properties:ee}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ae.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function fe(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ge(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function pe(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const me=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function be(t,e){return me(t).getPropertyValue(e)}const xe=["top","right","bottom","left"];function _e(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=xe[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function ye(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=me(i),o="border-box"===n.boxSizing,a=_e(n,"padding"),r=_e(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,l=!0}return{x:a,y:r,box:l}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/s),y:Math.round((h-u)/g*i.height/s)}}const ve=t=>Math.round(10*t)/10;function Me(t,e,i,s){const n=me(t),o=_e(n,"margin"),a=pe(n.maxWidth,t,"clientWidth")||T,r=pe(n.maxHeight,t,"clientHeight")||T,l=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=ge(t);if(o){const t=o.getBoundingClientRect(),a=me(o),r=_e(a,"border","width"),l=_e(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,s=pe(a.maxWidth,o,"clientWidth"),n=pe(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||T,maxHeight:n||T}}(t,e,i);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=_e(n,"border","width"),e=_e(n,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-o.width),c=Math.max(0,s?h/s:c-o.height),h=ve(Math.min(h,a,l.maxWidth)),c=ve(Math.min(c,r,l.maxHeight)),h&&!c&&(c=ve(h/2));return(void 0!==e||void 0!==i)&&s&&l.height&&c>l.height&&(c=l.height,h=ve(Math.floor(c*s))),{width:h,height:c}}function we(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const ke=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Se(t,e){const i=be(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Pe(t){return!t||s(t.size)||s(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function De(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function Ce(t,e,i,s){let o=(s=s||{}).data=s.data||{},a=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(o=s.data={},a=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0;const l=i.length;let h,c,d,u,f;for(h=0;h<l;h++)if(u=i[h],null!=u&&!0!==n(u))r=De(t,o,a,r,u);else if(n(u))for(c=0,d=u.length;c<d;c++)f=u[c],null==f||n(f)||(r=De(t,o,a,r,f));t.restore();const g=a.length/2;if(g>i.length){for(h=0;h<g;h++)delete o[a[h]];a.splice(0,g)}return r}function Oe(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function Ae(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Te(t,e,i,s){Le(t,e,i,s,null)}function Le(t,e,i,s,n){let o,a,r,l,h,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let m=(g||0)*L;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,p,0,0,O):t.arc(i,s,p,0,O),t.closePath();break;case"triangle":c=n?n/2:p,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=I,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=I,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":h=.516*p,l=p-h,a=Math.cos(m+R)*l,d=Math.cos(m+R)*(n?n/2-h:l),r=Math.sin(m+R)*l,u=Math.sin(m+R)*(n?n/2-h:l),t.arc(i-d,s-r,h,m-C,m-E),t.arc(i+u,s-a,h,m-E,m),t.arc(i+d,s+r,h,m,m+E),t.arc(i-u,s+a,h,m+E,m+C),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,c=n?n/2:l,t.rect(i-c,s-l,2*c,2*l);break}m+=R;case"rectRot":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+u,s-a),t.lineTo(i+d,s+r),t.lineTo(i-u,s+a),t.closePath();break;case"crossRot":m+=R;case"cross":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"star":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a),m+=R,d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"line":a=n?n/2:Math.cos(m)*p,r=Math.sin(m)*p,t.moveTo(i-a,s-r),t.lineTo(i+a,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Ee(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Re(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ie(t){t.restore()}function ze(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Fe(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function Ve(t,e,i,o,a,r={}){const l=n(e)?e:[e],h=r.strokeWidth>0&&""!==r.strokeColor;let c,d;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);s(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),c=0;c<l.length;++c)d=l[c],r.backdrop&&Ne(t,r.backdrop),h&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),s(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(d,i,o,r.maxWidth)),t.fillText(d,i,o,r.maxWidth),Be(t,i,o,d,r),o+=a.lineHeight;t.restore()}function Be(t,e,i,s,n){if(n.strikethrough||n.underline){const o=t.measureText(s),a=e-o.actualBoundingBoxLeft,r=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,h=i+o.actualBoundingBoxDescent,c=n.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(a,c),t.lineTo(r,c),t.stroke()}}function Ne(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function We(t,e){const{x:i,y:s,w:n,h:o,radius:a}=e;t.arc(i+a.topLeft,s+a.topLeft,a.topLeft,-E,C,!0),t.lineTo(i,s+o-a.bottomLeft),t.arc(i+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,C,E,!0),t.lineTo(i+n-a.bottomRight,s+o),t.arc(i+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,E,0,!0),t.lineTo(i+n,s+a.topRight),t.arc(i+n-a.topRight,s+a.topRight,a.topRight,0,-E,!0),t.lineTo(i+a.topLeft,s)}function He(t,e=[""],i=t,s,n=(()=>t[0])){k(s)||(s=Qe("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:n,override:n=>He([n,...t],e,i,s)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Xe(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=Qe(Ye(o,t),i),k(n))return Ue(t,n)?Ze(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ti(t).includes(e),ownKeys:t=>ti(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function je(t,e,i,s){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:$e(t,s),setContext:e=>je(t,e,i,s),override:n=>je(t.override(n),e,i,s)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Xe(t,e,(()=>function(t,e,i){const{_proxy:s,_context:a,_subProxy:r,_descriptors:l}=t;let h=s[e];S(h)&&l.isScriptable(e)&&(h=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(o,a||s),r.delete(t),Ue(t,e)&&(e=Ze(n._scopes,n,t,e));return e}(e,h,t,i));n(h)&&h.length&&(h=function(t,e,i,s){const{_proxy:n,_context:a,_subProxy:r,_descriptors:l}=i;if(k(a.index)&&s(t))e=e[a.index%e.length];else if(o(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const o of i){const i=Ze(s,n,t,o);e.push(je(i,a,r&&r[t],l))}}return e}(e,h,t,l.isIndexable));Ue(e,h)&&(h=je(h,a,r&&r[e],l));return h}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function $e(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:S(i)?i:()=>i,isIndexable:S(s)?s:()=>s}}const Ye=(t,e)=>t?t+w(e):e,Ue=(t,e)=>o(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Xe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function qe(t,e,i){return S(t)?t(e,i):t}const Ke=(t,e)=>!0===t?e:"string"==typeof t?M(e,t):void 0;function Ge(t,e,i,s,n){for(const o of e){const e=Ke(i,o);if(e){t.add(e);const o=qe(e._fallback,i,n);if(k(o)&&o!==i&&o!==s)return o}else if(!1===e&&k(s)&&i!==s)return null}return!1}function Ze(t,e,i,s){const a=e._rootScopes,r=qe(e._fallback,i,s),l=[...t,...a],h=new Set;h.add(s);let c=Je(h,l,i,r||i,s);return null!==c&&((!k(r)||r===i||(c=Je(h,l,r,c,s),null!==c))&&He(Array.from(h),[""],a,r,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const a=s[e];if(n(a)&&o(i))return i;return a||{}}(e,i,s))))}function Je(t,e,i,s,n){for(;i;)i=Ge(t,e,i,s,n);return i}function Qe(t,e){for(const i of e){if(!i)continue;const e=i[t];if(k(e))return e}}function ti(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function ei(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,l,h,c;for(r=0,l=s;r<l;++r)h=r+i,c=e[h],a[r]={r:n.parse(M(c,o),h)};return a}const ii=Number.EPSILON||1e-14,si=(t,e)=>e<t.length&&!t[e].skip&&t[e],ni=t=>"x"===t?"y":"x";function oi(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=q(o,n),l=q(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=s*h,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function ai(t,e="x"){const i=ni(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,l,h=si(t,0);for(a=0;a<s;++a)if(r=l,l=h,h=si(t,a+1),l){if(h){const t=h[e]-l[e];n[a]=0!==t?(h[i]-l[i])/t:0}o[a]=r?h?F(n[a-1])!==F(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}!function(t,e,i){const s=t.length;let n,o,a,r,l,h=si(t,0);for(let c=0;c<s-1;++c)l=h,h=si(t,c+1),l&&h&&(V(e[c],0,ii)?i[c]=i[c+1]=0:(n=i[c]/e[c],o=i[c+1]/e[c],r=Math.pow(n,2)+Math.pow(o,2),r<=9||(a=3/Math.sqrt(r),i[c]=n*a*e[c],i[c+1]=o*a*e[c])))}(t,n,o),function(t,e,i="x"){const s=ni(i),n=t.length;let o,a,r,l=si(t,0);for(let h=0;h<n;++h){if(a=r,r=l,l=si(t,h+1),!r)continue;const n=r[i],c=r[s];a&&(o=(n-a[i])/3,r[`cp1${i}`]=n-o,r[`cp1${s}`]=c-o*e[h]),l&&(o=(l[i]-n)/3,r[`cp2${i}`]=n+o,r[`cp2${s}`]=c+o*e[h])}}(t,o,e)}function ri(t,e,i){return Math.max(Math.min(t,i),e)}function li(t,e,i,s,n){let o,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)ai(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)r=t[o],l=oi(i,r,t[Math.min(o+1,a-(s?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,s,n,o,a,r=Ee(t[0],e);for(i=0,s=t.length;i<s;++i)a=o,o=r,r=i<s-1&&Ee(t[i+1],e),o&&(n=t[i],a&&(n.cp1x=ri(n.cp1x,e.left,e.right),n.cp1y=ri(n.cp1y,e.top,e.bottom)),r&&(n.cp2x=ri(n.cp2x,e.left,e.right),n.cp2y=ri(n.cp2y,e.top,e.bottom)))}(t,i)}const hi=t=>0===t||1===t,ci=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*O/i),di=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*O/i)+1,ui={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*E),easeOutSine:t=>Math.sin(t*E),easeInOutSine:t=>-.5*(Math.cos(C*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>hi(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>hi(t)?t:ci(t,.075,.3),easeOutElastic:t=>hi(t)?t:di(t,.075,.3),easeInOutElastic(t){const e=.1125;return hi(t)?t:t<.5?.5*ci(2*t,e,.45):.5+.5*di(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ui.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ui.easeInBounce(2*t):.5*ui.easeOutBounce(2*t-1)+.5};function fi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function gi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function pi(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=fi(t,n,i),r=fi(n,o,i),l=fi(o,e,i),h=fi(a,r,i),c=fi(r,l,i);return fi(h,c,i)}const mi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,bi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function xi(t,e){const i=(""+t).match(mi);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function _i(t,e){const i={},s=o(e),n=s?Object.keys(e):e,a=o(t)?s?i=>l(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=+a(t)||0;return i}function yi(t){return _i(t,{top:"y",right:"x",bottom:"y",left:"x"})}function vi(t){return _i(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Mi(t){const e=yi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function wi(t,e){t=t||{},e=e||ue.font;let i=l(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=l(t.style,e.style);s&&!(""+s).match(bi)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:l(t.family,e.family),lineHeight:xi(l(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:l(t.weight,e.weight),string:""};return n.string=Pe(n),n}function ki(t,e,i,s){let o,a,r,l=!0;for(o=0,a=t.length;o<a;++o)if(r=t[o],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),l=!1),void 0!==i&&n(r)&&(r=r[i%r.length],l=!1),void 0!==r))return s&&!l&&(s.cacheable=!1),r}function Si(t,e,i){const{min:s,max:n}=t,o=c(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Pi(t,e){return Object.assign(Object.create(t),e)}function Di(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ci(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Oi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ai(t){return"angle"===t?{between:Z,compare:K,normalize:G}:{between:tt,compare:(t,e)=>t-e,normalize:t=>t}}function Ti({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function Li(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:l,normalize:h}=Ai(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=Ai(s),l=e.length;let h,c,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,h=0,c=l;h<c&&a(r(e[d%l][s]),n,o);++h)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,b,x=!1,_=null;const y=()=>x||l(n,b,p)&&0!==r(n,b),v=()=>!x||0===r(o,p)||l(o,b,p);for(let t=c,i=c;t<=d;++t)m=e[t%a],m.skip||(p=h(m[s]),p!==b&&(x=l(p,n,o),null===_&&y()&&(_=0===r(p,n)?t:i),null!==_&&v()&&(g.push(Ti({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,b=p));return null!==_&&g.push(Ti({start:_,end:d,loop:u,count:a,style:f})),g}function Ei(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const o=Li(s[n],t.points,e);o.length&&i.push(...o)}return i}function Ri(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(o+=n);o>n&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);if(!0===s)return Ii(t,[{start:a,end:r,loop:o}],i,e);return Ii(t,function(t,e,i,s){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r<a?r+n:r,!!t._fullLoop&&0===a&&r===n-1),i,e)}function Ii(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){const n=t._chart.getContext(),o=zi(t.options),{_datasetIndex:a,options:{spanGaps:r}}=t,l=i.length,h=[];let c=o,d=e[0].start,u=d;function f(t,e,s,n){const o=r?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:s,style:n}),c=n,d=e%l)}}for(const t of e){d=r?d:t.start;let e,o=i[d%l];for(u=d+1;u<=t.end;u++){const r=i[u%l];e=zi(s.setContext(Pi(n,{type:"segment",p0:o,p1:r,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Fi(e,c)&&f(d,u-1,t.loop,c),o=r,c=e}d<u-1&&f(d,u-1,t.loop,c)}return h}(t,e,i,s):e}function zi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Fi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Vi=Object.freeze({__proto__:null,easingEffects:ui,isPatternOrGradient:Jt,color:Qt,getHoverColor:te,noop:e,uid:i,isNullOrUndef:s,isArray:n,isObject:o,isFinite:a,finiteOrDefault:r,valueOrDefault:l,toPercentage:h,toDimension:c,callback:d,each:u,_elementsEqual:f,clone:g,_merger:m,merge:b,mergeIf:x,_mergerIf:_,_deprecated:function(t,e,i,s){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+s+'" instead')},_splitKey:v,resolveObjectKey:M,_capitalize:w,defined:k,isFunction:S,setsEqual:P,_isClickEvent:D,toFontString:Pe,_measureText:De,_longestText:Ce,_alignPixel:Oe,clearCanvas:Ae,drawPoint:Te,drawPointLegend:Le,_isPointInArea:Ee,clipArea:Re,unclipArea:Ie,_steppedLineTo:ze,_bezierCurveTo:Fe,renderText:Ve,addRoundedRectPath:We,_lookup:et,_lookupByKey:it,_rlookupByKey:st,_filterBetween:nt,listenArrayEvents:at,unlistenArrayEvents:rt,_arrayUnique:lt,_createResolver:He,_attachContext:je,_descriptors:$e,_parseObjectDataRadialScale:ei,splineCurve:oi,splineCurveMonotone:ai,_updateBezierControlPoints:li,_isDomSupported:fe,_getParentNode:ge,getStyle:be,getRelativePosition:ye,getMaximumSize:Me,retinaScale:we,supportsEventListenerOptions:ke,readUsedSize:Se,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:ht,throttled:ct,debounce:dt,_toLeftRightCenter:ut,_alignStartEnd:ft,_textX:gt,_getStartAndCountOfVisiblePoints:pt,_scaleRangesChanged:mt,_pointInLine:fi,_steppedInterpolation:gi,_bezierInterpolation:pi,formatNumber:ne,toLineHeight:xi,_readValueToProps:_i,toTRBL:yi,toTRBLCorners:vi,toPadding:Mi,toFont:wi,resolve:ki,_addGrace:Si,createContext:Pi,PI:C,TAU:O,PITAU:A,INFINITY:T,RAD_PER_DEG:L,HALF_PI:E,QUARTER_PI:R,TWO_THIRDS_PI:I,log10:z,sign:F,almostEquals:V,niceNum:B,_factorize:N,isNumber:W,almostWhole:H,_setMinAndMaxByKey:j,toRadians:$,toDegrees:Y,_decimalPlaces:U,getAngleFromPoint:X,distanceBetweenPoints:q,_angleDiff:K,_normalizeAngle:G,_angleBetween:Z,_limitValue:J,_int16Range:Q,_isBetween:tt,getRtlAdapter:Di,overrideTextDirection:Ci,restoreTextDirection:Oi,_boundSegment:Li,_boundSegments:Ei,_computeSegments:Ri});function Bi(t,e,i,s){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const t=r._reversePixels?st:it;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),a=t(o,e,i+n);return{lo:s.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function Ni(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:r}=o[t],{lo:l,hi:h}=Bi(o[t],e,a,n);for(let t=l;t<=h;++t){const e=r[t];e.skip||s(e,i,t)}}}function Wi(t,e,i,s,n){const o=[];if(!n&&!t.isPointInArea(e))return o;return Ni(t,i,e,(function(i,a,r){(n||Ee(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&o.push({element:i,datasetIndex:a,index:r})}),!0),o}function Hi(t,e,i,s,n,o){let a=[];const r=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,o=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return Ni(t,i,e,(function(i,h,c){const d=i.inRange(e.x,e.y,n);if(s&&!d)return;const u=i.getCenterPoint(n);if(!(!!o||t.isPointInArea(u))&&!d)return;const f=r(e,u);f<l?(a=[{element:i,datasetIndex:h,index:c}],l=f):f===l&&a.push({element:i,datasetIndex:h,index:c})})),a}function ji(t,e,i,s,n,o){return o||t.isPointInArea(e)?"r"!==i||s?Hi(t,e,i,s,n,o):function(t,e,i,s){let n=[];return Ni(t,i,e,(function(t,i,o){const{startAngle:a,endAngle:r}=t.getProps(["startAngle","endAngle"],s),{angle:l}=X(t,{x:e.x,y:e.y});Z(l,a,r)&&n.push({element:t,datasetIndex:i,index:o})})),n}(t,e,i,n):[]}function $i(t,e,i,s,n){const o=[],a="x"===i?"inXRange":"inYRange";let r=!1;return Ni(t,i,e,((t,s,l)=>{t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var Yi={evaluateInteractionItems:Ni,modes:{index(t,e,i,s){const n=ye(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?Wi(t,n,o,s,a):ji(t,n,o,!1,s,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=ye(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?Wi(t,n,o,s,a):ji(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t<i.length;++t)r.push({element:i[t],datasetIndex:e,index:t})}return r},point:(t,e,i,s)=>Wi(t,ye(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=ye(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return ji(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>$i(t,ye(e,t),"x",i.intersect,s),y:(t,e,i,s)=>$i(t,ye(e,t),"y",i.intersect,s)}};const Ui=["left","top","right","bottom"];function Xi(t,e){return t.filter((t=>t.pos===e))}function qi(t,e){return t.filter((t=>-1===Ui.indexOf(t.pos)&&t.box.axis===e))}function Ki(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function Gi(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Ui.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o<a;++o){r=t[o];const{fullSize:a}=r.box,l=i[r.stack],h=l&&r.stackWeight/l.weight;r.horizontal?(r.width=h?h*s:a&&e.availableWidth,r.height=n):(r.width=s,r.height=h?h*n:a&&e.availableHeight)}return i}function Zi(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function Ji(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Qi(t,e,i,s){const{pos:n,box:a}=i,r=t.maxPadding;if(!o(n)){i.size&&(t[n]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?a.height:a.width),i.size=e.size/e.count,t[n]+=i.size}a.getPadding&&Ji(r,a.getPadding());const l=Math.max(0,e.outerWidth-Zi(r,t,"left","right")),h=Math.max(0,e.outerHeight-Zi(r,t,"top","bottom")),c=l!==t.w,d=h!==t.h;return t.w=l,t.h=h,i.horizontal?{same:c,other:d}:{same:d,other:c}}function ts(t,e){const i=e.maxPadding;function s(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function es(t,e,i,s){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;o<a;++o){r=t[o],l=r.box,l.update(r.width||e.w,r.height||e.h,ts(r.horizontal,e));const{same:a,other:d}=Qi(e,i,r,s);h|=a&&n.length,c=c||d,l.fullSize||n.push(r)}return h&&es(n,e,i,s)||c}function is(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function ss(t,e,i,s){const n=i.padding;let{x:o,y:a}=e;for(const r of t){const t=r.box,l=s[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/l.weight||1;if(r.horizontal){const s=e.w*h,o=l.size||t.height;k(l.start)&&(a=l.start),t.fullSize?is(t,n.left,a,i.outerWidth-n.right-n.left,o):is(t,e.left+l.placed,a,s,o),l.start=a,l.placed+=s,a=t.bottom}else{const s=e.h*h,a=l.size||t.width;k(l.start)&&(o=l.start),t.fullSize?is(t,o,n.top,a,i.outerHeight-n.bottom-n.top):is(t,o,e.top+l.placed,a,s),l.start=o,l.placed+=s,o=t.right}}e.x=o,e.y=a}var ns={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const n=Mi(t.options.layout.padding),o=Math.max(e-n.width,0),a=Math.max(i-n.height,0),r=function(t){const e=function(t){const e=[];let i,s,n,o,a,r;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],({position:o,options:{stack:a,stackWeight:r=1}}=n),e.push({index:i,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return e}(t),i=Ki(e.filter((t=>t.box.fullSize)),!0),s=Ki(Xi(e,"left"),!0),n=Ki(Xi(e,"right")),o=Ki(Xi(e,"top"),!0),a=Ki(Xi(e,"bottom")),r=qi(e,"x"),l=qi(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Xi(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;u(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),f=Object.assign({},n);Ji(f,Mi(s));const g=Object.assign({maxPadding:f,w:o,h:a,x:n.left,y:n.top},n),p=Gi(l.concat(h),d);es(r.fullSize,g,d,p),es(l,g,d,p),es(h,g,d,p)&&es(l,g,d,p),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),ss(r.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,ss(r.rightAndBottom,g,d,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},u(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class os{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class as extends os{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const rs={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ls=t=>null===t||""===t;const hs=!!ke&&{passive:!0};function cs(t,e,i){t.canvas.removeEventListener(e,i,hs)}function ds(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function us(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||ds(i.addedNodes,s),e=e&&!ds(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function fs(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||ds(i.removedNodes,s),e=e&&!ds(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const gs=new Map;let ps=0;function ms(){const t=window.devicePixelRatio;t!==ps&&(ps=t,gs.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function bs(t,e,i){const s=t.canvas,n=s&&ge(s);if(!n)return;const o=ct(((t,e)=>{const s=n.clientWidth;i(t,e),s<n.clientWidth&&i()}),window),a=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){gs.size||window.addEventListener("resize",ms),gs.set(t,e)}(t,o),a}function xs(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){gs.delete(t),gs.size||window.removeEventListener("resize",ms)}(t)}function _s(t,e,i){const s=t.canvas,n=ct((e=>{null!==t.ctx&&i(function(t,e){const i=rs[t.type]||t.type,{x:s,y:n}=ye(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t.addEventListener(e,i,hs)}(s,e,n),n}class ys extends os{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ls(n)){const e=Se(t,"width");void 0!==e&&(t.width=e)}if(ls(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Se(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];s(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:us,detach:fs,resize:bs}[e]||_s;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:xs,detach:xs,resize:xs}[e]||cs)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Me(t,e,i,s)}isAttached(t){const e=ge(t);return!(!e||!e.isConnected)}}function vs(t){return!fe()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?as:ys}var Ms=Object.freeze({__proto__:null,_detectPlatform:vs,BasePlatform:os,BasicPlatform:as,DomPlatform:ys});const ws="transparent",ks={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Qt(t||ws),n=s.valid&&Qt(e||ws);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ss{constructor(t,e,i,s){const n=e[i];s=ki([t.to,s,n,t.from]);const o=ki([t.from,n,s]);this._active=!0,this._fn=t.fn||ks[t.type||typeof o],this._easing=ui[t.easing]||ui.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=ki([t.to,e,s,t.from]),this._from=ki([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e<i),!this._active)return this._target[s]=a,void this._notify(!0);e<0?this._target[s]=n:(r=e/i%2,r=o&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class Ps{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!o(t))return;const e=Object.keys(ue.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((s=>{const a=t[s];if(!o(a))return;const r={};for(const t of e)r[t]=a[t];(n(a.properties)&&a.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){const n=t[s[e]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new Ss(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(xt.add(this._chart,i),!0):void 0}}function Ds(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Cs(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n<o;++n)i.push(s[n].index);return i}function Os(t,e,i,s={}){const n=t.keys,o="single"===s.mode;let r,l,h,c;if(null!==e){for(r=0,l=n.length;r<l;++r){if(h=+n[r],h===i){if(s.all)continue;break}c=t.values[h],a(c)&&(o||0===e||F(e)===F(c))&&(e+=c)}return e}}function As(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ts(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function Ls(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function Es(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:o,[h]:d}=i;u=(i._stacks||(i._stacks={}))[h]=Ts(n,c,o),u[r]=d,u._top=Ls(u,a,!0,s.type),u._bottom=Ls(u,a,!1,s.type);(u._visualValues||(u._visualValues={}))[r]=d}}function Rs(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Is(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const zs=t=>"reset"===t||"none"===t,Fs=(t,e)=>e?t:Object.assign({},t);class Vs{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=As(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Is(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=l(i.xAxisID,Rs(t,"x")),o=e.yAxisID=l(i.yAxisID,Rs(t,"y")),a=e.rAxisID=l(i.rAxisID,Rs(t,"r")),r=e.indexAxis,h=e.iAxisID=s(r,n,o,a),c=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&rt(this._data,this),t._stacked&&Is(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(o(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,n,o;for(s=0,n=e.length;s<n;++s)o=e[s],i[s]={x:o,y:t[o]};return i}(e);else if(i!==e){if(i){rt(i,this);const t=this._cachedMeta;Is(t),t._parsed=[]}e&&Object.isExtensible(e)&&at(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=As(e.vScale,e),e.stack!==i.stack&&(s=!0,Is(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&Es(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:a,_stacked:r}=i,l=a.axis;let h,c,d,u=0===t&&e===s.length||i._sorted,f=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,d=s;else{d=n(s[t])?this.parseArrayData(i,s,t,e):o(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const a=()=>null===c[l]||f&&c[l]<f[l];for(h=0;h<e;++h)i._parsed[h+t]=c=d[h],u&&(a()&&(u=!1),f=c);i._sorted=u}r&&Es(this,d)}parsePrimitiveData(t,e,i,s){const{iScale:n,vScale:o}=t,a=n.axis,r=o.axis,l=n.getLabels(),h=n===o,c=new Array(s);let d,u,f;for(d=0,u=s;d<u;++d)f=d+i,c[d]={[a]:h||n.parse(l[f],f),[r]:o.parse(e[f],f)};return c}parseArrayData(t,e,i,s){const{xScale:n,yScale:o}=t,a=new Array(s);let r,l,h,c;for(r=0,l=s;r<l;++r)h=r+i,c=e[h],a[r]={x:n.parse(c[0],h),y:o.parse(c[1],h)};return a}parseObjectData(t,e,i,s){const{xScale:n,yScale:o}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(s);let h,c,d,u;for(h=0,c=s;h<c;++h)d=h+i,u=e[d],l[h]={x:n.parse(M(u,a),d),y:o.parse(M(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,n=this._cachedMeta,o=e[t.axis];return Os({keys:Cs(s,!0),values:e._stacks[t.axis]._visualValues},o,n.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const n=i[e.axis];let o=null===n?NaN:n;const a=s&&i._stacks[e.axis];s&&a&&(s.values=a,o=Os(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,n=i._sorted&&t===i.iScale,o=s.length,r=this._getOtherScale(t),l=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Cs(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let u,f;function g(){f=s[u];const e=f[r.axis];return!a(f[t.axis])||c>e||d<e}for(u=0;u<o&&(g()||(this.updateRangeFromParsed(h,t,f,l),!n));++u);if(n)for(u=o-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s<n;++s)o=e[s][t.axis],a(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,n;return o(t)?(e=t.top,i=t.right,s=t.bottom,n=t.left):e=i=s=n=t,{top:e,right:i,bottom:s,left:n,disabled:!1===t}}(l(this.options.clip,function(t,e,i){if(!1===i)return!1;const s=Ds(t,i),n=Ds(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],n=e.chartArea,o=[],a=this._drawStart||0,r=this._drawCount||s.length-a,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,n,a,r),h=a;h<a+r;++h){const e=s[h];e.hidden||(e.active&&l?o.push(e):e.draw(t,n))}for(h=0;h<o.length;++h)o[h].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,i){return Pi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=s.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return Pi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=s,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,n=this._cachedDataOpts,o=t+"-"+e,a=n[o],r=this.enableOptionSharing&&k(i);if(a)return Fs(a,r);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=s?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),u=Object.keys(ue.elements[t]),f=l.resolveNamedOptions(d,u,(()=>this.getContext(i,s,e)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Fs(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const l=new Ps(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zs(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){zs(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!zs(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,e,i=!0){const s=this._cachedMeta,n=s.data,o=t+e;let a;const r=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;a<o;++a)n[a]=new this.dataElementType;this._parsing&&r(s._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Is(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class Bs{static defaults={};static defaultRoutes=void 0;active=!1;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return W(this.x)&&W(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function Ns(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),o=Math.min(i.maxTicksLimit||n,n),a=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(e):[],r=a.length,l=a[0],h=a[r-1],c=[];if(r>o)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===a&&(e.push(t[n]),o++,a=i[o*s])}(e,c,a,r/o),c;const d=function(t,e,i){const s=function(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),n=e.length/i;if(!s)return Math.max(n,1);const o=N(s);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>n)return e}return Math.max(n,1)}(a,e,o);if(r>0){let t,i;const n=r>1?Math.round((h-l)/(r-1)):null;for(Ws(e,c,d,s(n)?0:l-n,l),t=0,i=r-1;t<i;t++)Ws(e,c,d,a[t],a[t+1]);return Ws(e,c,d,h,s(n)?e.length:h+n),c}return Ws(e,c,d),c}function Ws(t,e,i,s,n){const o=l(s,0),a=Math.min(l(n,t.length),t.length);let r,h,c,d=0;for(i=Math.ceil(i),n&&(r=n-s,i=r/Math.floor(r/i)),c=o;c<0;)d++,c=Math.round(o+d*i);for(h=Math.max(o,0);h<a;h++)h===c&&(e.push(t[h]),d++,c=Math.round(o+d*i))}const Hs=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,js=(t,e)=>Math.min(e||t,t);function $s(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;o<n;o+=s)i.push(t[Math.floor(o)]);return i}function Ys(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),o=t._startPixel,a=t._endPixel,r=1e-6;let l,h=t.getPixelForTick(n);if(!(i&&(l=1===s?Math.max(h-o,a-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(n-1))/2,h+=n<e?l:-l,h<o-r||h>a+r)))return h}function Us(t){return t.drawTicks?t.tickLength:0}function Xs(t,e){if(!t.display)return 0;const i=wi(t.font,e),s=Mi(t.padding);return(n(t.text)?t.text.length:1)*i.lineHeight+s.height}function qs(t,e,i){let s=ut(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class Ks extends Bs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=r(t,Number.POSITIVE_INFINITY),e=r(e,Number.NEGATIVE_INFINITY),i=r(i,Number.POSITIVE_INFINITY),s=r(s,Number.NEGATIVE_INFINITY),{min:r(t,i),max:r(e,s),minDefined:a(t),maxDefined:a(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;r<l;++r)e=a[r].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),o||(s=Math.max(s,e.max));return i=o&&i>s?s:i,s=n&&i>s?i:s,{min:r(i,r(s,i)),max:r(s,r(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){d(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Si(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a<this.ticks.length;this._convertTicksToLabels(r?$s(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=Ns(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){d(this.options.afterUpdate,[this])}beforeSetDimensions(){d(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){d(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),d(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){d(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,n;for(i=0,s=t.length;i<s;i++)n=t[i],n.label=d(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){d(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){d(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=js(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,n=e.maxRotation;let o,a,r,l=s;if(!this._isVisible()||!e.display||s>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=J(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-Us(t.grid)-e.padding-Xs(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Y(Math.min(Math.asin(J((h.highest.height+6)/o,-1,1)),Math.asin(J(a/r,-1,1))-Math.asin(J(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){d(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){d(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Xs(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Us(n)+o):(t.height=this.maxHeight,t.width=Us(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,l=$(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){d(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)s(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=$s(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:o,_longestTextCache:a}=this,r=[],l=[],h=Math.floor(e/js(e,i));let c,d,f,g,p,m,b,x,_,y,v,M=0,w=0;for(c=0;c<e;c+=h){if(g=t[c].label,p=this._resolveTickFontOptions(c),o.font=m=p.string,b=a[m]=a[m]||{data:{},gc:[]},x=p.lineHeight,_=y=0,s(g)||n(g)){if(n(g))for(d=0,f=g.length;d<f;++d)v=g[d],s(v)||n(v)||(_=De(o,b.data,b.gc,_,v),y+=x)}else _=De(o,b.data,b.gc,_,g),y=x;r.push(_),l.push(y),M=Math.max(_,M),w=Math.max(y,w)}!function(t,e){u(t,(t=>{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n<s;++n)delete t.data[i[n]];i.splice(0,s)}}))}(a,e);const k=r.indexOf(M),S=l.indexOf(w),P=t=>({width:r[t]||0,height:l[t]||0});return{first:P(0),last:P(e-1),widest:P(k),highest:P(S),widths:r,heights:l}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Q(this._alignToPixels?Oe(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Pi(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Pi(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=$(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),n=this._getLabelSizes(),o=t.autoSkipPadding||0,a=n?n.widest.width+o:0,r=n?n.highest.height+o:0;return this.isHorizontal()?r*i>a*s?a/i:r/s:r*s<a*i?r/i:a/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:a,border:r}=s,h=n.offset,c=this.isHorizontal(),d=this.ticks.length+(h?1:0),u=Us(n),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(t){return Oe(i,t,p)};let x,_,y,v,M,w,k,S,P,D,C,O;if("top"===a)x=b(this.bottom),w=this.bottom-u,S=x-m,D=b(t.top)+m,O=t.bottom;else if("bottom"===a)x=b(this.top),D=t.top,O=b(t.bottom)-m,w=x+m,S=this.top+u;else if("left"===a)x=b(this.right),M=this.right-u,k=x-m,P=b(t.left)+m,C=t.right;else if("right"===a)x=b(this.left),P=t.left,C=b(t.right)-m,M=x+m,k=this.left+u;else if("x"===e){if("center"===a)x=b((t.top+t.bottom)/2+.5);else if(o(a)){const t=Object.keys(a)[0],e=a[t];x=b(this.chart.scales[t].getPixelForValue(e))}D=t.top,O=t.bottom,w=x+m,S=w+u}else if("y"===e){if("center"===a)x=b((t.left+t.right)/2);else if(o(a)){const t=Object.keys(a)[0],e=a[t];x=b(this.chart.scales[t].getPixelForValue(e))}M=x-m,k=M-u,P=t.left,C=t.right}const A=l(s.ticks.maxTicksLimit,d),T=Math.max(1,Math.ceil(d/A));for(_=0;_<d;_+=T){const t=this.getContext(_),e=n.setContext(t),s=r.setContext(t),o=e.lineWidth,a=e.color,l=s.dash||[],d=s.dashOffset,u=e.tickWidth,g=e.tickColor,p=e.tickBorderDash||[],m=e.tickBorderDashOffset;y=Ys(this,_,h),void 0!==y&&(v=Oe(i,y,o),c?M=k=P=C=v:w=S=D=O=v,f.push({tx1:M,ty1:w,tx2:k,ty2:S,x1:P,y1:D,x2:C,y2:O,width:o,color:a,borderDash:l,borderDashOffset:d,tickWidth:u,tickColor:g,tickBorderDash:p,tickBorderDashOffset:m}))}return this._ticksLength=d,this._borderValue=x,f}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:a}=i,r=this.isHorizontal(),l=this.ticks,{align:h,crossAlign:c,padding:d,mirror:u}=a,f=Us(i.grid),g=f+d,p=u?-d:g,m=-$(this.labelRotation),b=[];let x,_,y,v,M,w,k,S,P,D,C,O,A="middle";if("top"===s)w=this.bottom-p,k=this._getXAxisLabelAlignment();else if("bottom"===s)w=this.top+p,k=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(f);k=t.textAlign,M=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(f);k=t.textAlign,M=t.x}else if("x"===e){if("center"===s)w=(t.top+t.bottom)/2+g;else if(o(s)){const t=Object.keys(s)[0],e=s[t];w=this.chart.scales[t].getPixelForValue(e)+g}k=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)M=(t.left+t.right)/2-g;else if(o(s)){const t=Object.keys(s)[0],e=s[t];M=this.chart.scales[t].getPixelForValue(e)}k=this._getYAxisLabelAlignment(f).textAlign}"y"===e&&("start"===h?A="top":"end"===h&&(A="bottom"));const T=this._getLabelSizes();for(x=0,_=l.length;x<_;++x){y=l[x],v=y.label;const t=a.setContext(this.getContext(x));S=this.getPixelForTick(x)+a.labelOffset,P=this._resolveTickFontOptions(x),D=P.lineHeight,C=n(v)?v.length:1;const e=C/2,i=t.color,o=t.textStrokeColor,h=t.textStrokeWidth;let d,f=k;if(r?(M=S,"inner"===k&&(f=x===_-1?this.options.reverse?"left":"right":0===x?this.options.reverse?"right":"left":"center"),O="top"===s?"near"===c||0!==m?-C*D+D/2:"center"===c?-T.highest.height/2-e*D+D:-T.highest.height+D/2:"near"===c||0!==m?D/2:"center"===c?T.highest.height/2-e*D:T.highest.height-C*D,u&&(O*=-1),0===m||t.showLabelBackdrop||(M+=D/2*Math.sin(m))):(w=S,O=(1-C)*D/2),t.showLabelBackdrop){const e=Mi(t.backdropPadding),i=T.heights[x],s=T.widths[x];let n=O-e.top,o=0-e.left;switch(A){case"middle":n-=i/2;break;case"bottom":n-=i}switch(k){case"center":o-=s/2;break;case"right":o-=s}d={left:o,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}b.push({label:v,font:P,textOffset:O,options:{rotation:m,color:i,strokeColor:o,strokeWidth:h,textAlign:f,textBaseline:A,translation:[M,w],backdrop:d}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-$(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,o=t+n,a=this._getLabelSizes().widest.width;let r,l;return"left"===e?s?(l=this.right+n,"near"===i?r="left":"center"===i?(r="center",l+=a/2):(r="right",l+=a)):(l=this.right-o,"near"===i?r="right":"center"===i?(r="center",l-=a/2):(r="left",l=this.left)):"right"===e?s?(l=this.left+n,"near"===i?r="right":"center"===i?(r="center",l-=a/2):(r="left",l-=a)):(l=this.left+o,"near"===i?r="left":"center"===i?(r="center",l+=a/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n<o;++n){const t=s[n];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,n=i.setContext(this.getContext()),o=i.display?n.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,h,c,d;this.isHorizontal()?(l=Oe(t,this.left,o)-o/2,h=Oe(t,this.right,a)+a/2,c=d=r):(c=Oe(t,this.top,o)-o/2,d=Oe(t,this.bottom,a)+a/2,l=h=r),e.save(),e.lineWidth=n.width,e.strokeStyle=n.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Re(e,i);const s=this.getLabelItems(t);for(const t of s){const i=t.options,s=t.font;Ve(e,t.label,0,t.textOffset,s,i)}i&&Ie(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const a=wi(i.font),r=Mi(i.padding),l=i.align;let h=a.lineHeight/2;"bottom"===e||"center"===e||o(e)?(h+=r.bottom,n(i.text)&&(h+=a.lineHeight*(i.text.length-1))):h+=r.top;const{titleX:c,titleY:d,maxWidth:u,rotation:f}=function(t,e,i,s){const{top:n,left:a,bottom:r,right:l,chart:h}=t,{chartArea:c,scales:d}=h;let u,f,g,p=0;const m=r-n,b=l-a;if(t.isHorizontal()){if(f=ft(s,a,l),o(i)){const t=Object.keys(i)[0],s=i[t];g=d[t].getPixelForValue(s)+m-e}else g="center"===i?(c.bottom+c.top)/2+m-e:Hs(t,i,e);u=l-a}else{if(o(i)){const t=Object.keys(i)[0],s=i[t];f=d[t].getPixelForValue(s)-b+e}else f="center"===i?(c.left+c.right)/2-b+e:Hs(t,i,e);g=ft(s,r,n),p="left"===i?-E:E}return{titleX:f,titleY:g,maxWidth:u,rotation:p}}(this,h,e,l);Ve(t,i.text,0,0,a,{color:i.color,maxWidth:u,rotation:f,textAlign:qs(l,e,s),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=l(t.grid&&t.grid.z,-1),s=l(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Ks.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];o[i]!==this.id||t&&o.type!==t||s.push(o)}return s}_resolveTickFontOptions(t){return wi(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Gs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const s=this.items,n=t.id,o=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in s||(s[n]=t,function(t,e,i){const s=b(Object.create(null),[i?ue.get(i):{},ue.get(e),t.defaults]);ue.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");ue.route(o,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&ue.describe(e,t.descriptors)}(t,o,i),this.override&&ue.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ue[s]&&(delete ue[s][i],this.override&&delete re[i])}}class Zs{constructor(){this.controllers=new Gs(Vs,"datasets",!0),this.elements=new Gs(Bs,"elements"),this.plugins=new Gs(Object,"plugins"),this.scales=new Gs(Ks,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):u(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=w(t);d(i["before"+s],[],i),e[t](i),d(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var Js=new Zs;class Qs{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===d(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){s(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=l(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(Js.plugins.items);for(let t=0;t<s.length;t++)i.push(Js.getPlugin(s[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const s=n[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,{plugins:e,localIds:i},s,n){const o=[],a=t.getContext();for(const r of e){const e=r.id,l=tn(s[e],n);null!==l&&o.push({plugin:r,options:en(t.config,{plugin:r,local:i[e]},l,a)})}return o}(t,n,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function tn(t,e){return e||!1!==t?!0===t?{}:t:null}function en(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sn(t,e){const i=ue.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function nn(t,e){if("x"===t||"y"===t||"r"===t)return t;var i;if(t=e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&nn(t[0].toLowerCase(),e))return t;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function on(t){const e=t.options||(t.options={});e.plugins=l(e.plugins,{}),e.scales=function(t,e){const i=re[t.type]||{scales:{}},s=e.scales||{},n=sn(t.type,e),a=Object.create(null);return Object.keys(s).forEach((t=>{const e=s[t];if(!o(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const r=nn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),h=i.scales||{};a[t]=x(Object.create(null),[{axis:r},e,h[r],h[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,o=i.indexAxis||sn(n,e),r=(re[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),n=i[e+"AxisID"]||e;a[n]=a[n]||Object.create(null),x(a[n],[{axis:e},s[n],r[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];x(e,[ue.scales[e.type],ue.scale])})),a}(t,e)}function an(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const rn=new Map,ln=new Set;function hn(t,e){let i=rn.get(t);return i||(i=e(),rn.set(t,i),ln.add(i)),i}const cn=(t,e,i)=>{const s=M(e,i);void 0!==s&&t.add(s)};class dn{constructor(t){this._config=function(t){return(t=t||{}).data=an(t.data),on(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=an(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),on(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return hn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return hn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return hn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return hn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>cn(r,t,e)))),e.forEach((t=>cn(r,s,t))),e.forEach((t=>cn(r,re[n]||{},t))),e.forEach((t=>cn(r,ue,t))),e.forEach((t=>cn(r,le,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),ln.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,re[e]||{},ue.datasets[e]||{},{type:e},ue,le]}resolveNamedOptions(t,e,i,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=un(this._resolverCache,t,s);let l=a;if(function(t,e){const{isScriptable:i,isIndexable:s}=$e(t);for(const o of e){const e=i(o),a=s(o),r=(a||e)&&t[o];if(e&&(S(r)||fn(r))||a&&n(r))return!0}return!1}(a,e)){o.$shared=!1;l=je(a,i=S(i)?i():i,this.createResolver(t,i,r))}for(const t of e)o[t]=l[t];return o}createResolver(t,e,i=[""],s){const{resolver:n}=un(this._resolverCache,t,i);return o(e)?je(n,e,void 0,s):n}}function un(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:He(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const fn=t=>o(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||S(t[i])),!1);const gn=["top","bottom","left","right","chartArea"];function pn(t,e){return"top"===t||"bottom"===t||-1===gn.indexOf(t)&&"x"===e}function mn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function bn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),d(i&&i.onComplete,[t],e)}function xn(t){const e=t.chart,i=e.options.animation;d(i&&i.onProgress,[t],e)}function _n(t){return fe()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const yn={},vn=t=>{const e=_n(t);return Object.values(yn).filter((t=>t.canvas===e)).pop()};function Mn(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}class wn{static defaults=ue;static instances=yn;static overrides=re;static registry=Js;static version="4.2.1";static getChart=vn;static register(...t){Js.add(...t),kn()}static unregister(...t){Js.remove(...t),kn()}constructor(t,e){const s=this.config=new dn(e),n=_n(t),o=vn(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||vs(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,h=l&&l.height,c=l&&l.width;this.id=i(),this.ctx=r,this.canvas=l,this.width=c,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Qs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=dt((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],yn[this.id]=this,r&&l?(xt.listen(this,"complete",bn),xt.listen(this,"progress",xn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return s(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Js}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():we(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ae(this.canvas,this.ctx),this}stop(){return xt.stop(this),this}resize(t,e){xt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,we(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),d(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){u(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=nn(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),u(n,(e=>{const n=e.options,o=n.id,a=nn(o,n),r=l(n.type,e.dtype);void 0!==n.position&&pn(n.position,a)===pn(e.dposition)||(n.position=e.dposition),s[o]=!0;let h=null;if(o in i&&i[o].type===r)h=i[o];else{h=new(Js.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(n,t)})),u(s,((t,e)=>{t||delete i[e]})),u(i,(t=>{ns.configure(this,t,t.options),ns.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(mn("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let n=this.getDatasetMeta(i);const o=s.type||this.config.type;if(n.type&&n.type!==o&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=o,n.indexAxis=s.indexAxis||sn(o,this.options),n.order=s.order||0,n.index=i,n.label=""+s.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=Js.getController(o),{datasetElementType:s,dataElementType:a}=ue.datasets[o];Object.assign(e,{dataElementType:Js.getElement(a),datasetElementType:s&&Js.getElement(s)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){u(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!s&&-1===n.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||u(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(mn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){u(this.scales,(t=>{ns.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);P(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){Mn(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;t<e;t++)if(!P(s,i(t)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ns.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],u(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,S(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(xt.has(this)?this.attached&&!xt.running(this)&&xt.start(this):(this.draw(),bn({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,n;for(s=0,n=e.length;s<n;++s){const n=e[s];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=function(t){const{xScale:e,yScale:i}=t;if(e&&i)return{left:e.left,right:e.right,top:i.top,bottom:i.bottom}}(t)||this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&Re(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&Ie(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Ee(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Yi.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Pi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);k(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),xt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ae(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete yn[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};u(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){u(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},u(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){o=t[a];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!f(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=D(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,d(n.onHover,[t,a,this],this),r&&d(n.onClick,[t,a,this],this));const h=!f(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function kn(){return u(wn.instances,(t=>t._plugins.invalidate()))}function Sn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Pn{static override(t){Object.assign(Pn.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return Sn()}parse(){return Sn()}format(){return Sn()}add(){return Sn()}diff(){return Sn()}startOf(){return Sn()}endOf(){return Sn()}}var Dn={_date:Pn};function Cn(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=lt(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const l=()=>{32767!==o&&-32768!==o&&(k(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;s<n;++s)o=e.getPixelForValue(i[s]),l();for(a=void 0,s=0,n=e.ticks.length;s<n;++s)o=e.getPixelForTick(s),l();return r}function On(t,e,i,s){return n(t)?function(t,e,i,s){const n=i.parse(t[0],s),o=i.parse(t[1],s),a=Math.min(n,o),r=Math.max(n,o);let l=a,h=r;Math.abs(a)>Math.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function An(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;h<c;++h)u=e[h],d={},d[n.axis]=r||n.parse(a[h],h),l.push(On(u,d,o,h));return l}function Tn(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Ln(t,e,i,s){let n=e.borderSkipped;const o={};if(!n)return void(t.borderSkipped=o);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:r,reverse:l,top:h,bottom:c}=function(t){let e,i,s,n,o;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",o="start"):(n="start",o="end"),{start:i,end:s,reverse:e,top:n,bottom:o}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=h:(i._bottom||0)===s?n=c:(o[En(c,a,r,l)]=!0,n=h)),o[En(n,a,r,l)]=!0,t.borderSkipped=o}function En(t,e,i,s){var n,o,a;return s?(a=i,t=Rn(t=(n=t)===(o=e)?a:n===a?o:n,i,e)):t=Rn(t,e,i),t}function Rn(t,e,i){return"start"===t?e:"end"===t?i:t}function In(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class zn extends Vs{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,a,r=t=>+i[t];if(o(i[t])){const{key:t="value"}=this._parsing;r=e=>+M(i[e],t)}for(n=t,a=t+e;n<a;++n)s._parsed[n]=r(n)}}_getRotation(){return $(this.options.rotation-90)}_getCircumference(){return $(this.options.circumference)}_getRotationExtents(){let t=O,e=-O;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,n=s._getRotation(),o=s._getCircumference();t=Math.min(t,n),e=Math.max(e,n+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,n=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-o)/2,0),r=Math.min(h(this.options.cutout,a),1),l=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:g,offsetX:p,offsetY:m}=function(t,e,i){let s=1,n=1,o=0,a=0;if(e<O){const r=t,l=r+e,h=Math.cos(r),c=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,s)=>Z(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>Z(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,h,d),m=f(E,c,u),b=g(C,h,d),x=g(C+E,c,u);s=(p-b)/2,n=(m-x)/2,o=-(p+b)/2,a=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),b=(i.width-o)/f,x=(i.height-o)/g,_=Math.max(Math.min(b,x)/2,0),y=c(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*l,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/O)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p<e;++p)m+=this._circumference(p,n);for(p=e;p<e+i;++p){const e=this._circumference(p,n),i=t[p],o={x:l+this.offsetX,y:h+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};g&&(o.options=f||this.resolveDataElementOptions(p,i.active?"active":s)),m+=e,this.updateElement(i,p,o,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?O*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ne(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s<n;++s)if(i.isDatasetVisible(s)){o=i.getDatasetMeta(s),t=o.data,a=o.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)r=a.resolveDataElementOptions(s),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(l(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Fn extends Vs{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ne(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return ei.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*C;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d<e;++d)u+=this._computeAngle(d,s,f);for(d=e;d<e+i;d++){const e=t[d];let i=u,g=u+this._computeAngle(d,s,f),p=o.getDataVisibility(d)?r.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=g,n&&(a.animateScale&&(p=0),a.animateRotate&&(i=g=c));const m={x:l,y:h,innerRadius:0,outerRadius:p,startAngle:i,endAngle:g,options:this.resolveDataElementOptions(d,e.active?"active":s)};this.updateElement(e,d,m,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?$(this.resolveDataElementOptions(t,e).angle||i):0}}var Vn=Object.freeze({__proto__:null,BarController:class extends Vs{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return An(t,e,i,s)}parseArrayData(t,e,i,s){return An(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:n,vScale:o}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===n.axis?a:r,h="x"===o.axis?a:r,c=[];let d,u,f,g;for(d=i,u=i+s;d<u;++d)g=e[d],f={},f[n.axis]=n.parse(M(g,l),d),c.push(On(M(g,h),f,o,d));return c}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,n=this.getParsed(t),o=n._custom,a=Tn(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o="reset"===n,{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),h=r.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+i;f++){const e=this.getParsed(f),i=o||s(e[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),g=this._calculateBarIndexPixels(f,c),p=(e._stacks||{})[r.axis],m={horizontal:h,base:i.base,enableBorderRadius:!p||Tn(e._custom)||a===p._top||a===p._bottom,x:h?i.head:g.center,y:h?g.center:i.head,height:h?g.size:Math.abs(i.size),width:h?Math.abs(i.size):g.size};u&&(m.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const b=m.options||t[f].options;Ln(m,b,p,a),In(m,b,c.ratio),this.updateElement(t[f],f,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,a=[],r=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(s(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!r(i))&&((!1===o||-1===a.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&a.push(i.stack),i.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n<o;++n)s.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const a=t.barThickness;return{min:a||Cn(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),h=l._custom,c=Tn(h);let d,u,f=l[e.axis],g=0,p=i?this.applyStack(e,l,i):f;p!==f&&(g=p-f,p=f),c&&(f=h.barStart,p=h.barEnd-h.barStart,0!==f&&F(f)!==F(h.barEnd)&&(g=0),g+=f);const m=s(o)||c?g:o;let b=e.getPixelForValue(m);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(g+p):b,u=d-b,Math.abs(u)<a){u=function(t,e,i){return 0!==t?F(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,r)*a,f===r&&(b-=u/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),o=Math.min(t,s),h=Math.max(t,s);b=Math.max(Math.min(b,h),o),d=b+u,i&&!c&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(d)-e.getValueForPixel(b))}if(b===e.getPixelForValue(r)){const t=F(u)*e.getLineWidthForValue(r)/2;b+=t,u-=t}return{size:u,base:b,head:d,center:d+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,a=l(n.maxBarThickness,1/0);let r,h;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t<n.length-1?n[t+1]:null;const l=i.categoryPercentage;null===a&&(a=o-(null===r?e.end-e.start:r-o)),null===r&&(r=o+o-a);const h=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/s,ratio:i.barPercentage,start:h}}(t,e,n,i):function(t,e,i,n){const o=i.barThickness;let a,r;return s(o)?(a=e.min*i.categoryPercentage,r=i.barPercentage):(a=o*n,r=1),{chunk:a/n,ratio:r,start:e.pixels[t]-a/2}}(t,e,n,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=l.start+l.chunk*c+l.chunk/2,h=Math.min(a,l.chunk*l.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),h=Math.min(a,e.min*e.ratio);return{base:r-h/2,head:r+h/2,center:r,size:h}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let n=0;for(;n<s;++n)null!==this.getParsed(n)[e.axis]&&i[n].draw(this._ctx)}},BubbleController:class extends Vs{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const n=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<n.length;t++)n[t]._custom=this.resolveDataElementOptions(t+i).radius;return n}parseArrayData(t,e,i,s){const n=super.parseArrayData(t,e,i,s);for(let t=0;t<n.length;t++){const s=e[i+t];n[t]._custom=l(s[2],this.resolveDataElementOptions(t+i).radius)}return n}parseObjectData(t,e,i,s){const n=super.parseObjectData(t,e,i,s);for(let t=0;t<n.length;t++){const s=e[i+t];n[t]._custom=l(s&&s.r&&+s.r,this.resolveDataElementOptions(t+i).radius)}return n}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=a.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!n&&this.getParsed(d),u={},f=u[h]=n?o.getPixelForDecimal(.5):o.getPixelForValue(i[h]),g=u[c]=n?a.getBasePixel():a.getPixelForValue(i[c]);u.skip=isNaN(f)||isNaN(g),l&&(u.options=r||this.resolveDataElementOptions(d,e.active?"active":s),n&&(u.options.radius=0)),this.updateElement(e,d,u,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const n=s.radius;return"active"!==e&&(s.radius=0),s.radius+=l(i&&i._custom,n),s}},DoughnutController:zn,LineController:class extends Vs{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=pt(e,s,o);this._drawStart=a,this._drawCount=r,mt(e)&&(a=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(s,a,r,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=W(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n,x=e+i,_=t.length;let y=e>0&&this.getParsed(e-1);for(let i=0;i<_;++i){const g=t[i],_=b?g:{};if(i<e||i>=x){_.skip=!0;continue}const v=this.getParsed(i),M=s(v[f]),w=_[u]=a.getPixelForValue(v[u],i),k=_[f]=o||M?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,v,l):v[f],i);_.skip=isNaN(w)||isNaN(k)||M,_.stop=i>0&&Math.abs(v[u]-y[u])>m,p&&(_.parsed=v,_.raw=h.data[i]),d&&(_.options=c||this.resolveDataElementOptions(i,g.active?"active":n)),b||this.updateElement(g,i,_,n),y=v}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PolarAreaController:Fn,PieController:class extends zn{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},RadarController:class extends Vs{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return ei.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a<e+i;a++){const e=t[a],i=this.resolveDataElementOptions(a,e.active?"active":s),r=n.getPointPositionForValue(a,this.getParsed(a).r),l=o?n.xCenter:r.x,h=o?n.yCenter:r.y,c={x:l,y:h,angle:r.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,a,c,s)}}},ScatterController:class extends Vs{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y);return{label:i[t]||"",value:"("+a+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:n,count:o}=pt(e,i,s);if(this._drawStart=n,this._drawCount=o,mt(e)&&(n=0,o=i.length),this.options.showLine){const{dataset:n,_dataset:o}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:a},t)}this.updateElements(i,n,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const o="reset"===n,{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(c),u=this.includeOptions(n,d),f=a.axis,g=r.axis,{spanGaps:p,segment:m}=this.options,b=W(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||"none"===n;let _=e>0&&this.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=this.getParsed(c),p=x?e:{},y=s(i[g]),v=p[f]=a.getPixelForValue(i[f],c),M=p[g]=o||y?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,i,l):i[g],c);p.skip=isNaN(v)||isNaN(M)||y,p.stop=c>0&&Math.abs(i[f]-_[f])>b,m&&(p.parsed=i,p.raw=h.data[c]),u&&(p.options=d||this.resolveDataElementOptions(c,e.active?"active":n)),x||this.updateElement(e,c,p,n),_=i}this.updateSharedOptions(d,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}});function Bn(t,e,i,s){const n=_i(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return J(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:J(n.innerStart,0,a),innerEnd:J(n.innerEnd,0,a)}}function Nn(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Wn(t,e,i,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let f=0;const g=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/C)/d)/2,m=l+p+f,b=n-p-f,{outerStart:x,outerEnd:_,innerStart:y,innerEnd:v}=Bn(e,u,d,b-m),M=d-x,w=d-_,k=m+x/M,S=b-_/w,P=u+y,D=u+v,O=m+y/P,A=b-v/D;if(t.beginPath(),o){const e=(k+S)/2;if(t.arc(a,r,d,k,e),t.arc(a,r,d,e,S),_>0){const e=Nn(w,S,a,r);t.arc(e.x,e.y,_,S,b+E)}const i=Nn(D,b,a,r);if(t.lineTo(i.x,i.y),v>0){const e=Nn(D,A,a,r);t.arc(e.x,e.y,v,b+E,A+Math.PI)}const s=(b-v/u+(m+y/u))/2;if(t.arc(a,r,u,b-v/u,s,!0),t.arc(a,r,u,s,m+y/u,!0),y>0){const e=Nn(P,O,a,r);t.arc(e.x,e.y,y,O+Math.PI,m-E)}const n=Nn(M,m,a,r);if(t.lineTo(n.x,n.y),x>0){const e=Nn(M,k,a,r);t.arc(e.x,e.y,x,m-E,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function Hn(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r,options:l}=e,{borderWidth:h,borderJoinStyle:c}=l,d="inner"===l.borderAlign;if(!h)return;d?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let u=e.endAngle;if(o){Wn(t,e,i,s,u,n);for(let e=0;e<o;++e)t.stroke();isNaN(r)||(u=a+(r%O||O))}d&&function(t,e,i){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=e;let h=n/r;t.beginPath(),t.arc(o,a,r,s-h,i+h),l>n?(h=n/l,t.arc(o,a,l,i+h,s-h,!0)):t.arc(o,a,n,i+E,s-E),t.closePath(),t.clip()}(t,e,u),o||(Wn(t,e,i,s,u,n),t.stroke())}function jn(t,e,i=e){t.lineCap=l(i.borderCapStyle,e.borderCapStyle),t.setLineDash(l(i.borderDash,e.borderDash)),t.lineDashOffset=l(i.borderDashOffset,e.borderDashOffset),t.lineJoin=l(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=l(i.borderWidth,e.borderWidth),t.strokeStyle=l(i.borderColor,e.borderColor)}function $n(t,e,i){t.lineTo(i.x,i.y)}function Yn(t,e,i={}){const s=t.length,{start:n=0,end:o=s-1}=i,{start:a,end:r}=e,l=Math.max(n,a),h=Math.min(o,r),c=n<a&&o<a||n>r&&o>r;return{count:s,start:l,loop:e.loop,ilen:h<l&&!c?s+h-l:h-l}}function Un(t,e,i,s){const{points:n,options:o}=e,{count:a,start:r,loop:l,ilen:h}=Yn(n,i,s),c=function(t){return t.stepped?ze:t.tension||"monotone"===t.cubicInterpolationMode?Fe:$n}(o);let d,u,f,{move:g=!0,reverse:p}=s||{};for(d=0;d<=h;++d)u=n[(r+(p?h-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):c(t,f,u,p,o.stepped),f=u);return l&&(u=n[(r+(p?h:0))%a],c(t,f,u,p,o.stepped)),!!l}function Xn(t,e,i,s){const n=e.points,{count:o,start:a,ilen:r}=Yn(n,i,s),{move:l=!0,reverse:h}=s||{};let c,d,u,f,g,p,m=0,b=0;const x=t=>(a+(h?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(i<f?f=i:i>g&&(g=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),u=s,b=0,f=g=i),p=i}_()}function qn(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Xn:Un}const Kn="function"==typeof Path2D;function Gn(t,e,i,s){Kn&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),jn(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=qn(e);for(const r of n)jn(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class Zn extends Bs{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;li(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ri(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],n=this.points,o=Ei(this,{property:e,start:s,end:s});if(!o.length)return;const a=[],r=function(t){return t.stepped?gi:t.tension||"monotone"===t.cubicInterpolationMode?pi:fi}(i);let l,h;for(l=0,h=o.length;l<h;++l){const{start:h,end:c}=o[l],d=n[h],u=n[c];if(d===u){a.push(d);continue}const f=r(d,u,Math.abs((s-d[e])/(u[e]-d[e])),i.stepped);f[e]=t[e],a.push(f)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return qn(this)(t,this,e,i)}path(t,e,i){const s=this.segments,n=qn(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const a of s)o&=n(t,this,a,{start:e,end:e+i-1});return!!o}draw(t,e,i,s){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),Gn(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Jn(t,e,i,s){const n=t.options,{[i]:o}=t.getProps([i],s);return Math.abs(e-o)<n.radius+n.hitRadius}function Qn(t,e){const{x:i,y:s,base:n,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,h,c,d;return t.horizontal?(d=a/2,r=Math.min(i,n),l=Math.max(i,n),h=s-d,c=s+d):(d=o/2,r=i-d,l=i+d,h=Math.min(s,n),c=Math.max(s,n)),{left:r,top:h,right:l,bottom:c}}function to(t,e,i,s){return t?0:J(e,i,s)}function eo(t){const e=Qn(t),i=e.right-e.left,s=e.bottom-e.top,n=function(t,e,i){const s=t.options.borderWidth,n=t.borderSkipped,o=yi(s);return{t:to(n.top,o.top,0,i),r:to(n.right,o.right,0,e),b:to(n.bottom,o.bottom,0,i),l:to(n.left,o.left,0,e)}}(t,i/2,s/2),a=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,a=vi(n),r=Math.min(e,i),l=t.borderSkipped,h=s||o(n);return{topLeft:to(!h||l.top||l.left,a.topLeft,0,r),topRight:to(!h||l.top||l.right,a.topRight,0,r),bottomLeft:to(!h||l.bottom||l.left,a.bottomLeft,0,r),bottomRight:to(!h||l.bottom||l.right,a.bottomRight,0,r)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:a},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,a.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(n.b,n.r))}}}}function io(t,e,i,s){const n=null===e,o=null===i,a=t&&!(n&&o)&&Qn(t,s);return a&&(n||tt(e,a.left,a.right))&&(o||tt(i,a.top,a.bottom))}function so(t,e){t.rect(e.x,e.y,e.w,e.h)}function no(t,e,i={}){const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-s,a=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+o,h:t.h+a,radius:t.radius}}var oo=Object.freeze({__proto__:null,ArcElement:class extends Bs{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=X(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:h,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,f=l(d,r-a)>=O||Z(n,a,r),g=tt(o,h+u,c+u);return f&&g}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,h=(s+n)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>O?Math.floor(i/O):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const r=s*(1-Math.sin(Math.min(C,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let l=e.endAngle;if(o){Wn(t,e,i,s,l,n);for(let e=0;e<o;++e)t.fill();isNaN(r)||(l=a+(r%O||O))}Wn(t,e,i,s,l,n),t.fill()}(t,this,r,n,o),Hn(t,this,r,n,o),t.restore()}},LineElement:Zn,PointElement:class extends Bs{static id="point";static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return Jn(this,t,"x",e)}inYRange(t,e){return Jn(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Ee(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Te(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}},BarElement:class extends Bs{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:n,outer:o}=eo(this),a=(r=o.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?We:so;var r;t.save(),o.w===n.w&&o.h===n.h||(t.beginPath(),a(t,no(o,e,n)),t.clip(),a(t,no(n,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,no(n,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return io(this,t,e,i)}inXRange(t,e){return io(this,t,null,e)}inYRange(t,e){return io(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+s)/2:e,y:n?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}});function ao(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}function ro(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function lo(t,e,{horizontal:i,minRotation:s}){const n=$(s),o=(i?Math.sin(n):Math.cos(n))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class ho extends Ks{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return s(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const o=t=>s=e?s:t,a=t=>n=i?n:t;if(t){const t=F(s),e=F(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=0===n?1:Math.abs(.05*n);a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:o,min:a,max:r,precision:l,count:h,maxTicks:c,maxDigits:d,includeBounds:u}=t,f=o||1,g=c-1,{min:p,max:m}=e,b=!s(a),x=!s(r),_=!s(h),y=(m-p)/(d+1);let v,M,w,k,S=B((m-p)/g/f)*f;if(S<1e-14&&!b&&!x)return[{value:p},{value:m}];k=Math.ceil(m/S)-Math.floor(p/S),k>g&&(S=B(k*S/g/f)*f),s(l)||(v=Math.pow(10,l),S=Math.ceil(S*v)/v),"ticks"===n?(M=Math.floor(p/S)*S,w=Math.ceil(m/S)*S):(M=p,w=m),b&&x&&o&&H((r-a)/o,S/1e3)?(k=Math.round(Math.min((r-a)/S,c)),S=(r-a)/k,M=a,w=r):_?(M=b?a:M,w=x?r:w,k=h-1,S=(w-M)/k):(k=(w-M)/S,k=V(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const P=Math.max(U(S),U(M));v=Math.pow(10,s(l)?P:l),M=Math.round(M*v)/v,w=Math.round(w*v)/v;let D=0;for(b&&(u&&M!==a?(i.push({value:a}),M<a&&D++,V(Math.round((M+D*S)*v)/v,a,lo(a,y,t))&&D++):M<a&&D++);D<k;++D)i.push({value:Math.round((M+D*S)*v)/v});return x&&u&&w!==r?i.length&&V(i[i.length-1].value,r,lo(r,y,t))?i[i.length-1].value=r:i.push({value:r}):x&&w!==r||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&j(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ne(t,this.chart.options.locale,this.options.ticks.format)}}class co extends ho{static id="linear";static defaults={ticks:{callback:ae.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=a(t)?t:0,this.max=a(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=$(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const uo=t=>Math.floor(z(t)),fo=(t,e)=>Math.pow(10,uo(t)+e);function go(t){return 1===t/Math.pow(10,uo(t))}function po(t,e,i){const s=Math.pow(10,i),n=Math.floor(t/s);return Math.ceil(e/s)-n}function mo(t,{min:e,max:i}){e=r(t.min,e);const s=[],n=uo(e);let o=function(t,e){let i=uo(e-t);for(;po(t,e,i)>10;)i++;for(;po(t,e,i)<10;)i--;return Math.min(i,uo(t))}(e,i),a=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),h=n>o?Math.pow(10,n):0,c=Math.round((e-h)*a)/a,d=Math.floor((e-h)/l/10)*l*10;let u=Math.floor((c-d)/Math.pow(10,o)),f=r(t.min,Math.round((h+d+u*Math.pow(10,o))*a)/a);for(;f<i;)s.push({value:f,major:go(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,a=o>=0?1:a),f=Math.round((h+d+u*Math.pow(10,o))*a)/a;const g=r(t.max,f);return s.push({value:g,major:go(g),significand:u}),s}class bo extends Ks{static id="logarithmic";static defaults={ticks:{callback:ae.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ho.prototype.parse.apply(this,[t,e]);if(0!==i)return a(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=a(t)?Math.max(0,t):null,this.max=a(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!a(this._userMin)&&(this.min=t===fo(this.min,0)?fo(this.min,-1):fo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t;i===s&&(i<=0?(n(1),o(10)):(n(fo(i,-1)),o(fo(s,1)))),i<=0&&n(fo(s,-1)),s<=0&&o(fo(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=mo({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&j(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":ne(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=z(t),this._valueRange=z(this.max)-z(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(z(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function xo(t){const e=t.ticks;if(e.display&&t.display){const t=Mi(e.backdropPadding);return l(e.font&&e.font.size,ue.font.size)+t.height}return 0}function _o(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:t<s||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function yo(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],o=[],a=t._pointLabels.length,r=t.options.pointLabels,l=r.centerPointLabels?C/a:0;for(let u=0;u<a;u++){const a=r.setContext(t.getPointLabelContext(u));o[u]=a.padding;const f=t.getPointPosition(u,t.drawingArea+o[u],l),g=wi(a.font),p=(h=t.ctx,c=g,d=n(d=t._pointLabels[u])?d:[d],{w:Ce(h,c.string,d),h:d.length*c.lineHeight});s[u]=p;const m=G(t.getIndexAngle(u)+l),b=Math.round(Y(m));vo(i,e,m,_o(b,f.x,p.w,0,180),_o(b,f.y,p.h,90,270))}var h,c,d;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const s=[],n=t._pointLabels.length,o=t.options,a=xo(o)/2,r=t.drawingArea,l=o.pointLabels.centerPointLabels?C/n:0;for(let o=0;o<n;o++){const n=t.getPointPosition(o,r+a+i[o],l),h=Math.round(Y(G(n.angle+E))),c=e[o],d=ko(n.y,c.h,h),u=Mo(h),f=wo(n.x,c.w,u);s.push({x:n.x,y:d,textAlign:u,left:f,top:d,right:f+c.w,bottom:d+c.h})}return s}(t,s,o)}function vo(t,e,i,s,n){const o=Math.abs(Math.sin(i)),a=Math.abs(Math.cos(i));let r=0,l=0;s.start<e.l?(r=(e.l-s.start)/o,t.l=Math.min(t.l,e.l-r)):s.end>e.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.start<e.t?(l=(e.t-n.start)/a,t.t=Math.min(t.t,e.t-l)):n.end>e.b&&(l=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Mo(t){return 0===t||180===t?"center":t<180?"left":"right"}function wo(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ko(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function So(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,O);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;o<s;o++)i=t.getPointPosition(o,e),n.lineTo(i.x,i.y)}}class Po extends ho{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ae.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Mi(xo(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=a(t)&&!isNaN(t)?t:0,this.max=a(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/xo(this.options))}generateTickLabels(t){ho.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=d(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?yo(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return G(t*(O/(this._pointLabels.length||1))+$(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(s(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(s(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return Pi(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-E+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:n}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),So(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:o}=e,a=this._pointLabels.length;let r,l,h;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getPointLabelContext(o)),a=wi(e.font),{x:r,y:l,textAlign:h,left:c,top:d,right:u,bottom:f}=t._pointLabelItems[o],{backdropColor:g}=e;if(!s(g)){const t=vi(e.borderRadius),s=Mi(e.backdropPadding);i.fillStyle=g;const n=c-s.left,o=d-s.top,a=u-c+s.width,r=f-d+s.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),We(i,{x:n,y:o,w:a,h:r,radius:t}),i.fill()):i.fillRect(n,o,a,r)}Ve(i,t._pointLabels[o],r,l+a.lineHeight/2,a,{color:e.color,textAlign:h,textBaseline:"middle"})}}(this,a),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){l=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),s=n.setContext(i),r=o.setContext(i);!function(t,e,i,s,n){const o=t.ctx,a=e.circular,{color:r,lineWidth:l}=e;!a&&!s||!r||!l||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(n.dash),o.lineDashOffset=n.dashOffset,o.beginPath(),So(t,i,a,s),o.closePath(),o.stroke(),o.restore())}(this,s,l,a,r)}})),i.display){for(t.save(),r=a-1;r>=0;r--){const s=i.setContext(this.getPointLabelContext(r)),{color:n,lineWidth:o}=s;o&&n&&(t.lineWidth=o,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),h=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(h.x,h.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=wi(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=Mi(r.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}Ve(t,s.label,0,-n,l,{color:r.color})})),t.restore()}drawTitle(){}}const Do={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Co=Object.keys(Do);function Oo(t,e){return t-e}function Ao(t,e){if(s(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:r}=t._parseOpts;let l=e;return"function"==typeof n&&(l=n(l)),a(l)||(l="string"==typeof n?i.parse(l,n):i.parse(l)),null===l?null:(o&&(l="week"!==o||!W(r)&&!0!==r?i.startOf(l,o):i.startOf(l,"isoWeek",r)),+l)}function To(t,e,i,s){const n=Co.length;for(let o=Co.indexOf(t);o<n-1;++o){const t=Do[Co[o]],n=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(n*t.size))<=s)return Co[o]}return Co[n-1]}function Lo(t,e,i){if(i){if(i.length){const{lo:s,hi:n}=et(i,e);t[i[s]>=e?i[s]:i[n]]=!0}}else t[e]=!0}function Eo(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a<o;++a)r=e[a],n[r]=a,s.push({value:r,major:!1});return 0!==o&&i?function(t,e,i,s){const n=t._adapter,o=+n.startOf(e[0].value,s),a=e[e.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=i[r],l>=0&&(e[l].major=!0);return e}(t,s,n,i):s}class Ro extends Ks{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new Dn._date(t.adapters.date);s.init(e),x(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Ao(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();function l(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}o&&r||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),s=a(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=a(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=nt(s,n,this.max);return this._unit=e.unit||(i.autoSkip?To(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,i,s,n){for(let o=Co.length-1;o>=Co.indexOf(i);o--){const i=Co[o];if(Do[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return Co[i?Co.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Co.indexOf(t)+1,i=Co.length;e<i;++e)if(Do[Co[e]].common)return Co[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&o.reverse(),Eo(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=J(s,0,o),n=J(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||To(n.minUnit,e,i,this._getLabelCapacity(e)),a=l(s.ticks.stepSize,1),r="week"===o&&n.isoWeekday,h=W(r)||!0===r,c={};let d,u,f=e;if(h&&(f=+t.startOf(f,"isoWeek",r)),f=+t.startOf(f,h?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const g="data"===s.ticks.source&&this.getDataTimestamps();for(d=f,u=0;d<i;d=+t.add(d,a,o),u++)Lo(c,d,g);return d!==i&&"ticks"!==s.bounds&&1!==u||Lo(c,d,g),Object.keys(c).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,s=this._unit,n=e||i[s];return this._adapter.format(t,n)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.ticks.callback;if(o)return d(o,[t,e,i],this);const a=n.time.displayFormats,r=this._unit,l=this._majorUnit,h=r&&a[r],c=l&&a[l],u=i[e],f=l&&c&&u&&u.major;return this._adapter.format(t,s||(f?c:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=$(this.isHorizontal()?e.maxRotation:e.minRotation),n=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*n+a*o,h:i*o+a*n}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,n=this._tickFormatFunction(t,0,Eo(this,[t],this._majorUnit),s),o=this._getLabelSize(n),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Ao(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return lt(t.sort(Oo))}}function Io(t,e,i){let s,n,o,a,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=it(t,"pos",e)),({pos:s,time:o}=t[r]),({pos:n,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=it(t,"time",e)),({time:s,pos:o}=t[r]),({time:n,pos:a}=t[l]));const h=n-s;return h?o+(a-o)*(e-s)/h:o}var zo=Object.freeze({__proto__:null,CategoryScale:class extends Ks{static id="category";static defaults={ticks:{callback:ro}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(s(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:J(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:ao(i,t,l(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return ro.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:co,LogarithmicScale:bo,RadialLinearScale:Po,TimeScale:Ro,TimeSeriesScale:class extends Ro{static id="timeseries";static defaults=Ro.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Io(e,this.min),this._tableRange=Io(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,l,h;for(o=0,a=t.length;o<a;++o)l=t[o],l>=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;o<a;++o)h=s[o+1],r=s[o-1],l=s[o],Math.round((h+r)/2)!==l&&n.push({time:l,pos:o/(a-1)});return n}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Io(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Io(this._table,i*this._tableRange+this._minPos,!0)}}});const Fo=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Vo=Fo.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Bo(t){return Fo[t%Fo.length]}function No(t){return Vo[t%Vo.length]}function Wo(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof zn?e=function(t,e){return t.backgroundColor=t.data.map((()=>Bo(e++))),e}(i,e):n instanceof Fn?e=function(t,e){return t.backgroundColor=t.data.map((()=>No(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Bo(e),t.backgroundColor=No(e),++e}(i,e))}}function Ho(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var jo={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:o}=n;if(!i.forceOverride&&(Ho(s)||(a=n)&&(a.borderColor||a.backgroundColor)||o&&Ho(o)))return;var a;const r=Wo(t);s.forEach(r)}};function $o(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Yo(t){t.data.datasets.forEach((t=>{$o(t)}))}var Uo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Yo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:a,indexAxis:r}=e,l=t.getDatasetMeta(o),h=a||e.data;if("y"===ki([r,t.options.indexAxis]))return;if(!l.controller.supportsDecimation)return;const c=t.scales[l.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:u}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=J(it(e,o.axis,a).lo,0,i-1)),s=h?J(it(e,o.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(l,h);if(u<=(i.threshold||4*n))return void $o(e);let f;switch(s(a)&&(e._data=h,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":f=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,f,g,p=e;for(a[l++]=t[p],c=0;c<o-2;c++){let s,n=0,o=0;const h=Math.floor((c+1)*r)+1+e,m=Math.min(Math.floor((c+2)*r)+1,i)+e,b=m-h;for(s=h;s<m;s++)n+=t[s].x,o+=t[s].y;n/=b,o/=b;const x=Math.floor(c*r)+1+e,_=Math.min(Math.floor((c+1)*r)+1,i)+e,{x:y,y:v}=t[p];for(u=f=-1,s=x;s<_;s++)f=.5*Math.abs((y-n)*(t[s].y-v)-(y-t[s].x)*(o-v)),f>u&&(u=f,d=t[s],g=s);a[l++]=d,p=g}return a[l++]=t[h],a}(h,d,u,n,i);break;case"min-max":f=function(t,e,i,n){let o,a,r,l,h,c,d,u,f,g,p=0,m=0;const b=[],x=e+i-1,_=t[e].x,y=t[x].x-_;for(o=e;o<e+i;++o){a=t[o],r=(a.x-_)/y*n,l=a.y;const e=0|r;if(e===h)l<f?(f=l,c=o):l>g&&(g=l,d=o),p=(m*p+a.x)/++m;else{const i=o-1;if(!s(c)&&!s(d)){const e=Math.min(c,d),s=Math.max(c,d);e!==u&&e!==i&&b.push({...t[e],x:p}),s!==u&&s!==i&&b.push({...t[s],x:p})}o>0&&i!==u&&b.push(t[i]),b.push(a),h=e,m=0,f=g=l,c=d=u=o}}return b}(h,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=f}))},destroy(t){Yo(t)}};function Xo(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=G(n),o=G(o)),{property:t,start:n,end:o}}function qo(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ko(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function Go(t,e){let i=[],s=!1;return n(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=qo(t,e,n);const a=n[t],r=n[e];null!==s?(o.push({x:a.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}(t,e),i.length?new Zn({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function Zo(t){return t&&!1!==t.fill}function Jo(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!a(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function Qo(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=l(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(o(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return a(n)&&Math.floor(n)===n?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function ta(t,e,i){const s=[];for(let n=0;n<i.length;n++){const o=i[n],{first:a,last:r,point:l}=ea(o,e,"x");if(!(!l||a&&r))if(a)s.unshift(l);else if(t.push(l),!r)break}t.push(...s)}function ea(t,e,i){const s=t.interpolate(e,i);if(!s)return{};const n=s[i],o=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],s=a[e.start][i],h=a[e.end][i];if(tt(n,s,h)){r=n===s,l=n===h;break}}return{first:r,last:l,point:s}}class ia{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:n,radius:o}=this;return e=e||{start:0,end:O},t.arc(s,n,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,n=t.angle;return{x:e+Math.cos(n)*s,y:i+Math.sin(n)*s,angle:n}}}function sa(t){const{chart:e,fill:i,line:s}=t;if(a(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:s}=t,n=[],o=s.segments,a=s.points,r=function(t,e){const i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){const n=s[t];if(n.index===e)break;n.hidden||i.unshift(n.dataset)}return i}(e,i);r.push(Go({x:null,y:e.bottom},s));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)ta(n,a[t],r)}return new Zn({points:n,options:{}})}(t);if("shape"===i)return!0;const n=function(t){if((t.scale||{}).getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,s=e.options,n=e.getLabels().length,a=s.reverse?e.max:e.min,r=function(t,e,i){let s;return s="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:o(t)?t.value:e.getBaseValue(),s}(i,e,a),l=[];if(s.grid.circular){const t=e.getPointPositionForValue(0,a);return new ia({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<n;++t)l.push(e.getPointPositionForValue(t,r));return l}(t);return function(t){const{scale:e={},fill:i}=t,s=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:o(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(a(s)){const t=e.isHorizontal();return{x:t?s:null,y:t?null:s}}return null}(t)}(t);return n instanceof ia?n:Go(n,s)}function na(t,e,i){const s=sa(e),{line:n,scale:o,axis:a}=e,r=n.options,l=r.fill,h=r.backgroundColor,{above:c=h,below:d=h}=l||{};s&&n.points.length&&(Re(t,i),function(t,e){const{line:i,target:s,above:n,below:o,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==n&&(oa(t,s,a.top),aa(t,{line:i,target:s,color:n,scale:r,property:l}),t.restore(),t.save(),oa(t,s,a.bottom));aa(t,{line:i,target:s,color:o,scale:r,property:l}),t.restore()}(t,{line:n,target:s,above:c,below:d,area:i,scale:o,axis:a}),Ie(t))}function oa(t,e,i){const{segments:s,points:n}=e;let o=!0,a=!1;t.beginPath();for(const r of s){const{start:s,end:l}=r,h=n[s],c=n[qo(s,l,n)];o?(t.moveTo(h.x,h.y),o=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),a=!!e.pathSegment(t,r,{move:a}),a?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function aa(t,e){const{line:i,target:s,property:n,color:o,scale:a}=e,r=function(t,e,i){const s=t.segments,n=t.points,o=e.points,a=[];for(const t of s){let{start:s,end:r}=t;r=qo(s,r,n);const l=Xo(i,n[s],n[r],t.loop);if(!e.segments){a.push({source:t,target:l,start:n[s],end:n[r]});continue}const h=Ei(e,l);for(const e of h){const s=Xo(i,o[e.start],o[e.end],e.loop),r=Li(t,n,s);for(const t of r)a.push({source:t,target:e,start:{[i]:Ko(l,s,"start",Math.max)},end:{[i]:Ko(l,s,"end",Math.min)}})}}return a}(i,s,n);for(const{source:e,target:l,start:h,end:c}of r){const{style:{backgroundColor:r=o}={}}=e,d=!0!==s;t.save(),t.fillStyle=r,ra(t,a,d&&Xo(n,h,c)),t.beginPath();const u=!!i.pathSegment(t,e);let f;if(d){u?t.closePath():la(t,s,c,n);const e=!!s.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||la(t,s,h,n)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function ra(t,e,i){const{top:s,bottom:n}=e.chart.chartArea,{property:o,start:a,end:r}=i||{};"x"===o&&(t.beginPath(),t.rect(a,s,r-a,n-s),t.clip())}function la(t,e,i,s){const n=e.interpolate(i,s);n&&t.lineTo(n.x,n.y)}var ha={id:"filler",afterDatasetsUpdate(t,e,i){const s=(t.data.datasets||[]).length,n=[];let o,a,r,l;for(a=0;a<s;++a)o=t.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Zn&&(l={visible:t.isDatasetVisible(a),index:a,fill:Qo(r,a,s),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<s;++a)l=n[a],l&&!1!==l.fill&&(l.fill=Jo(n,a,i.propagate))},beforeDraw(t,e,i){const s="beforeDraw"===i.drawTime,n=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),s&&i.fill&&na(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;Zo(i)&&na(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;Zo(s)&&"beforeDatasetDraw"===i.drawTime&&na(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ca=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class da extends Bs{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=d(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=wi(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=ca(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,a,r)+10):(h=this.maxHeight,l=this._fitCols(o,s,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),r[f]={left:0,top:u,row:d,width:g,height:s},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:p,itemHeight:m}=function(t,e,i,s,n){const o=function(t,e,i,s){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+s.measureText(n).width}(s,t,e,i),a=function(t,e,i){let s=t;"string"!=typeof e.text&&(s=ua(e,i));return s}(n,s,e.lineHeight);return{itemWidth:o,itemHeight:a}}(i,e,n,t,s);o>0&&u+m+2*a>h&&(c+=d+a,l.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:m},d=Math.max(d,p),u+=m+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=Di(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=ft(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=ft(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=ft(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=ft(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Re(t,this),this._draw(),Ie(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ue.color,r=Di(t.rtl,this.left,this.width),h=wi(o.font),{padding:c}=o,d=h.size,u=d/2;let f;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=ca(o,d),b=this.isHorizontal(),x=this._computeTitleHeight();f=b?{x:ft(n,this.left+c,this.right-i[0]),y:this.top+c+x,line:0}:{x:this.left+c,y:ft(n,this.top+x+c,this.bottom-e[0].height),line:0},Ci(this.ctx,t.textDirection);const _=m+c;this.legendItems.forEach(((y,v)=>{s.strokeStyle=y.fontColor,s.fillStyle=y.fontColor;const M=s.measureText(y.text).width,w=r.textAlign(y.textAlign||(y.textAlign=o.textAlign)),k=g+u+M;let S=f.x,P=f.y;r.setWidth(this.width),b?v>0&&S+k+c>this.right&&(P=f.y+=_,f.line++,S=f.x=ft(n,this.left+c,this.right-i[f.line])):v>0&&P+_>this.bottom&&(S=f.x=S+e[f.line].width+c,f.line++,P=f.y=ft(n,this.top+x+c,this.bottom-e[f.line].height));if(function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const n=l(i.lineWidth,1);if(s.fillStyle=l(i.fillStyle,a),s.lineCap=l(i.lineCap,"butt"),s.lineDashOffset=l(i.lineDashOffset,0),s.lineJoin=l(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=l(i.strokeStyle,a),s.setLineDash(l(i.lineDash,[])),o.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,g/2);Le(s,a,l,e+u,o.pointStyleWidth&&g)}else{const o=e+Math.max((d-p)/2,0),a=r.leftForLtr(t,g),l=vi(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?We(s,{x:a,y:o,w:g,h:p,radius:l}):s.rect(a,o,g,p),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(S),P,y),S=gt(w,S+g+u,b?S+k:this.right,t.rtl),function(t,e,i){Ve(s,i.text,t,e+m/2,h,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),P,y),b)f.x+=k+c;else if("string"!=typeof y.text){const t=h.lineHeight;f.y+=ua(y,t)}else f.y+=_})),Oi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=wi(e.font),s=Mi(e.padding);if(!e.display)return;const n=Di(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=ft(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+ft(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=ft(a,c,c+d);o.textAlign=n.textAlign(ut(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Ve(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=wi(t.font),i=Mi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(tt(t,this.left,this.right)&&tt(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(s=n[i],tt(t,s.left,s.left+s.width)&&tt(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,a=(n=i,null!==(s=o)&&null!==n&&s.datasetIndex===n.datasetIndex&&s.index===n.index);o&&!a&&d(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!a&&d(e.onHover,[t,i,this],this)}else i&&d(e.onClick,[t,i,this],this);var s,n}}function ua(t,e){return e*(t.text?t.text.length+.5:0)}var fa={id:"legend",_element:da,start(t,e,i){const s=t.legend=new da({ctx:t.ctx,options:i,chart:t});ns.configure(t,s,i),ns.addBox(t,s)},stop(t){ns.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;ns.configure(t,s,i),s.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const s=e.datasetIndex,n=i.chart;n.isDatasetVisible(s)?(n.hide(s),e.hidden=!0):(n.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),h=Mi(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:s||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:a&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ga extends Bs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=n(i.text)?i.text.length:1;this._padding=Mi(i.padding);const o=s*wi(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,l,h,c=0;return this.isHorizontal()?(l=ft(a,i,n),h=e+t,r=n-i):("left"===o.position?(l=i+t,h=ft(a,s,e),c=-.5*C):(l=n-t,h=ft(a,e,s),c=.5*C),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=wi(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);Ve(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:ut(e.align),textBaseline:"middle",translation:[n,o]})}}var pa={id:"title",_element:ga,start(t,e,i){!function(t,e){const i=new ga({ctx:t.ctx,options:e,chart:t});ns.configure(t,i,e),ns.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ns.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;ns.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ma=new WeakMap;var ba={id:"subtitle",start(t,e,i){const s=new ga({ctx:t.ctx,options:i,chart:t});ns.configure(t,s,i),ns.addBox(t,s),ma.set(t,s)},stop(t){ns.removeBox(t,ma.get(t)),ma.delete(t)},beforeUpdate(t,e,i){const s=ma.get(t);ns.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const xa={average(t){if(!t.length)return!1;let e,i,s=0,n=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s+=t.x,n+=t.y,++o}}return{x:s/o,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,s,n,o=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=q(e,s.getCenterPoint());t<r&&(r=t,n=s)}}if(n){const t=n.tooltipPosition();o=t.x,a=t.y}return{x:o,y:a}}};function _a(t,e){return e&&(n(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ya(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function va(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Ma(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,l=wi(e.bodyFont),h=wi(e.titleFont),c=wi(e.footerFont),d=o.length,f=n.length,g=s.length,p=Mi(e.padding);let m=p.height,b=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){m+=g*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-g)*l.lineHeight+(x-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){b=Math.max(b,i.measureText(t).width+_)};return i.save(),i.font=h.string,u(t.title,y),i.font=l.string,u(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?a+2+e.boxPadding:0,u(s,(t=>{u(t.before,y),u(t.lines,y),u(t.after,y)})),_=0,i.font=c.string,u(t.footer,y),i.restore(),b+=p.width,{width:b,height:m}}function wa(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function ka(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||wa(t,e,i,s),yAlign:s}}function Sa(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=vi(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===r?g+=h:"right"===r&&(g-=h):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:J(g,0,s.width-e.width),y:J(p,0,s.height-e.height)}}function Pa(t,e,i){const s=Mi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function Da(t){return _a([],ya(t))}function Ca(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Oa={beforeTitle:e,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:e,beforeBody:e,beforeLabel:e,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return s(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:e,afterBody:e,beforeFooter:e,footer:e,afterFooter:e};function Aa(t,e,i,s){const n=t[e].call(i,s);return void 0===n?Oa[e].call(i,s):n}class Ta extends Bs{static positioners=xa;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new Ps(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Pi(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=Aa(i,"beforeTitle",this,t),n=Aa(i,"title",this,t),o=Aa(i,"afterTitle",this,t);let a=[];return a=_a(a,ya(s)),a=_a(a,ya(n)),a=_a(a,ya(o)),a}getBeforeBody(t,e){return Da(Aa(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return u(t,(t=>{const e={before:[],lines:[],after:[]},n=Ca(i,t);_a(e.before,ya(Aa(n,"beforeLabel",this,t))),_a(e.lines,Aa(n,"label",this,t)),_a(e.after,ya(Aa(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return Da(Aa(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=Aa(i,"beforeFooter",this,t),n=Aa(i,"footer",this,t),o=Aa(i,"afterFooter",this,t);let a=[];return a=_a(a,ya(s)),a=_a(a,ya(n)),a=_a(a,ya(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,l=[];for(a=0,r=e.length;a<r;++a)l.push(va(this.chart,e[a]));return t.filter&&(l=l.filter(((e,s,n)=>t.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),u(l,(e=>{const i=Ca(t.callbacks,e);s.push(Aa(i,"labelColor",this,e)),n.push(Aa(i,"labelPointStyle",this,e)),o.push(Aa(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=xa[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Ma(this,i),a=Object.assign({},t,e),r=ka(this.chart,i,a),l=Sa(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=vi(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,b,x,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,x=_+o,y=_-o):(p=d+f,m=p+o,x=_-o,y=_+o),b=p):(m="left"===s?d+Math.max(r,h)+o:"right"===s?d+f-Math.max(l,c)-o:this.caretX,"top"===n?(x=u,_=x-o,p=m-o,b=m+o):(x=u+g,_=x+o,p=m+o,b=m-o),y=x),{x1:p,x2:m,x3:b,y1:x,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const l=Di(i.rtl,this.x,this.width);for(t.x=Pa(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=wi(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r<n;++r)e.fillText(s[r],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,r+1===n&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,n){const a=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:l,boxWidth:h,boxPadding:c}=n,d=wi(n.bodyFont),u=Pa(this,"left",n),f=s.x(u),g=l<d.lineHeight?(d.lineHeight-l)/2:0,p=e.y+g;if(n.usePointStyle){const e={radius:Math.min(h,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=s.leftForLtr(f,h)+h/2,o=p+l/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,Te(t,e,i,o),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Te(t,e,i,o)}else{t.lineWidth=o(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=s.leftForLtr(f,h-c),i=s.leftForLtr(s.xPlus(f,1),h-c-2),r=vi(a.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,We(t,{x:e,y:p,w:h,h:l,radius:r}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),We(t,{x:i,y:p+1,w:h-2,h:l-2,radius:r}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,p,h,l),t.strokeRect(e,p,h,l),t.fillStyle=a.backgroundColor,t.fillRect(i,p+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=wi(i.bodyFont);let d=c.lineHeight,f=0;const g=Di(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+d/2),t.y+=d+n},m=g.textAlign(o);let b,x,_,y,v,M,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Pa(this,m,i),e.fillStyle=i.bodyColor,u(this.beforeBody,p),f=a&&"right"!==m?"center"===o?l/2+h:l+2+h:0,y=0,M=s.length;y<M;++y){for(b=s[y],x=this.labelTextColors[y],e.fillStyle=x,u(b.before,p),_=b.lines,a&&_.length&&(this._drawColorBox(e,t,y,g,i),d=Math.max(c.lineHeight,r)),v=0,w=_.length;v<w;++v)p(_[v]),d=c.lineHeight;u(b.after,p)}f=0,d=c.lineHeight,u(this.afterBody,p),t.y-=n}drawFooter(t,e,i){const s=this.footer,n=s.length;let o,a;if(n){const r=Di(i.rtl,this.x,this.width);for(t.x=Pa(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",o=wi(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,a=0;a<n;++a)e.fillText(s[a],r.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:n,yAlign:o}=this,{x:a,y:r}=t,{width:l,height:h}=i,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=vi(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+c,r),"top"===o&&this.drawCaret(t,e,i,s),e.lineTo(a+l-d,r),e.quadraticCurveTo(a+l,r,a+l,r+d),"center"===o&&"right"===n&&this.drawCaret(t,e,i,s),e.lineTo(a+l,r+h-f),e.quadraticCurveTo(a+l,r+h,a+l-f,r+h),"bottom"===o&&this.drawCaret(t,e,i,s),e.lineTo(a+u,r+h),e.quadraticCurveTo(a,r+h,a,r+h-u),"center"===o&&"left"===n&&this.drawCaret(t,e,i,s),e.lineTo(a,r+c),e.quadraticCurveTo(a,r,a+c,r),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=xa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Ma(this,t),a=Object.assign({},i,this._size),r=ka(e,t,a),l=Sa(t,a,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Mi(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),Ci(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Oi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!f(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!f(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=xa[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}var La={id:"tooltip",_element:Ta,positioners:xa,afterInit(t,e,i){i&&(t.tooltip=new Ta({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Oa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};return wn.register(Vn,zo,oo,t),wn.helpers={...Vi},wn._adapters=Dn,wn.Animation=Ss,wn.Animations=Ps,wn.animator=xt,wn.controllers=Js.controllers.items,wn.DatasetController=Vs,wn.Element=Bs,wn.elements=oo,wn.Interaction=Yi,wn.layouts=ns,wn.platforms=Ms,wn.Scale=Ks,wn.Ticks=ae,Object.assign(wn,Vn,zo,oo,t,Ms),wn.Chart=wn,"undefined"!=typeof window&&(window.Chart=wn),wn})); -//# sourceMappingURL=chart.umd.js.map diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.1704213472.js deleted file mode 100644 index ef6dc4aa..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.1704213472.js +++ /dev/null @@ -1,1105 +0,0 @@ -/*! - Colorbox 1.6.4 - license: MIT - http://www.jacklmoore.com/colorbox -*/ -(function ($, document, window) { - var - // Default settings object. - // See http://jacklmoore.com/colorbox for details. - defaults = { - // data sources - html: false, - photo: false, - iframe: false, - inline: false, - - // behavior and appearance - transition: "elastic", - speed: 300, - fadeOut: 300, - width: false, - initialWidth: "600", - innerWidth: false, - maxWidth: false, - height: false, - initialHeight: "450", - innerHeight: false, - maxHeight: false, - scalePhotos: true, - scrolling: true, - opacity: 0.9, - preloading: true, - className: false, - overlayClose: true, - escKey: true, - arrowKey: true, - top: false, - bottom: false, - left: false, - right: false, - fixed: false, - data: undefined, - closeButton: true, - fastIframe: true, - open: false, - reposition: true, - loop: true, - slideshow: false, - slideshowAuto: true, - slideshowSpeed: 2500, - slideshowStart: "start slideshow", - slideshowStop: "stop slideshow", - photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i, - - // alternate image paths for high-res displays - retinaImage: false, - retinaUrl: false, - retinaSuffix: '@2x.$1', - - // internationalization - current: "image {current} of {total}", - previous: "previous", - next: "next", - close: "close", - xhrError: "This content failed to load.", - imgError: "This image failed to load.", - - // accessbility - returnFocus: true, - trapFocus: true, - - // callbacks - onOpen: false, - onLoad: false, - onComplete: false, - onCleanup: false, - onClosed: false, - - rel: function() { - return this.rel; - }, - href: function() { - // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container') - return $(this).attr('href'); - }, - title: function() { - return this.title; - }, - createImg: function() { - var img = new Image(); - var attrs = $(this).data('cbox-img-attrs'); - - if (typeof attrs === 'object') { - $.each(attrs, function(key, val){ - img[key] = val; - }); - } - - return img; - }, - createIframe: function() { - var iframe = document.createElement('iframe'); - var attrs = $(this).data('cbox-iframe-attrs'); - - if (typeof attrs === 'object') { - $.each(attrs, function(key, val){ - iframe[key] = val; - }); - } - - if ('frameBorder' in iframe) { - iframe.frameBorder = 0; - } - if ('allowTransparency' in iframe) { - iframe.allowTransparency = "true"; - } - iframe.name = (new Date()).getTime(); // give the iframe a unique name to prevent caching - iframe.allowFullscreen = true; - - return iframe; - } - }, - - // Abstracting the HTML and event identifiers for easy rebranding - colorbox = 'wflscolorbox', - prefix = 'wflscbox', - boxElement = prefix + 'Element', - - // Events - event_open = prefix + '_open', - event_load = prefix + '_load', - event_complete = prefix + '_complete', - event_cleanup = prefix + '_cleanup', - event_closed = prefix + '_closed', - event_purge = prefix + '_purge', - - // Cached jQuery Object Variables - $overlay, - $box, - $wrap, - $content, - $topBorder, - $leftBorder, - $rightBorder, - $bottomBorder, - $related, - $window, - $loaded, - $loadingBay, - $loadingOverlay, - $title, - $current, - $slideshow, - $next, - $prev, - $close, - $groupControls, - $events = $('<a/>'), // $({}) would be preferred, but there is an issue with jQuery 1.4.2 - - // Variables for cached values or use across multiple functions - settings, - interfaceHeight, - interfaceWidth, - loadedHeight, - loadedWidth, - index, - photo, - open, - active, - closing, - loadingTimer, - publicMethod, - div = "div", - requests = 0, - previousCSS = {}, - init; - - // **************** - // HELPER FUNCTIONS - // **************** - - // Convenience function for creating new jQuery objects - function $tag(tag, id, css) { - var element = document.createElement(tag); - - if (id) { - element.id = prefix + id; - } - - if (css) { - element.style.cssText = css; - } - - return $(element); - } - - // Get the window height using innerHeight when available to avoid an issue with iOS - // http://bugs.jquery.com/ticket/6724 - function winheight() { - return window.innerHeight ? window.innerHeight : $(window).height(); - } - - function Settings(element, options) { - if (options !== Object(options)) { - options = {}; - } - - this.cache = {}; - this.el = element; - - this.value = function(key) { - var dataAttr; - - if (this.cache[key] === undefined) { - dataAttr = $(this.el).attr('data-cbox-'+key); - - if (dataAttr !== undefined) { - this.cache[key] = dataAttr; - } else if (options[key] !== undefined) { - this.cache[key] = options[key]; - } else if (defaults[key] !== undefined) { - this.cache[key] = defaults[key]; - } - } - - return this.cache[key]; - }; - - this.get = function(key) { - var value = this.value(key); - return $.isFunction(value) ? value.call(this.el, this) : value; - }; - } - - // Determine the next and previous members in a group. - function getIndex(increment) { - var - max = $related.length, - newIndex = (index + increment) % max; - - return (newIndex < 0) ? max + newIndex : newIndex; - } - - // Convert '%' and 'px' values to integers - function setSize(size, dimension) { - return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10)); - } - - // Checks an href to see if it is a photo. - // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex. - function isImage(settings, url) { - return settings.get('photo') || settings.get('photoRegex').test(url); - } - - function retinaUrl(settings, url) { - return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url; - } - - function trapFocus(e) { - if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) { - e.stopPropagation(); - $box.focus(); - } - } - - function setClass(str) { - if (setClass.str !== str) { - $box.add($overlay).removeClass(setClass.str).addClass(str); - setClass.str = str; - } - } - - function getRelated(rel) { - index = 0; - - if (rel && rel !== false && rel !== 'nofollow') { - $related = $('.' + boxElement).filter(function () { - var options = $.data(this, colorbox); - var settings = new Settings(this, options); - return (settings.get('rel') === rel); - }); - index = $related.index(settings.el); - - // Check direct calls to Colorbox. - if (index === -1) { - $related = $related.add(settings.el); - index = $related.length - 1; - } - } else { - $related = $(settings.el); - } - } - - function trigger(event) { - // for external use - $(document).trigger(event); - // for internal use - $events.triggerHandler(event); - } - - var slideshow = (function(){ - var active, - className = prefix + "Slideshow_", - click = "click." + prefix, - timeOut; - - function clear () { - clearTimeout(timeOut); - } - - function set() { - if (settings.get('loop') || $related[index + 1]) { - clear(); - timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed')); - } - } - - function start() { - $slideshow - .html(settings.get('slideshowStop')) - .unbind(click) - .one(click, stop); - - $events - .bind(event_complete, set) - .bind(event_load, clear); - - $box.removeClass(className + "off").addClass(className + "on"); - } - - function stop() { - clear(); - - $events - .unbind(event_complete, set) - .unbind(event_load, clear); - - $slideshow - .html(settings.get('slideshowStart')) - .unbind(click) - .one(click, function () { - publicMethod.next(); - start(); - }); - - $box.removeClass(className + "on").addClass(className + "off"); - } - - function reset() { - active = false; - $slideshow.hide(); - clear(); - $events - .unbind(event_complete, set) - .unbind(event_load, clear); - $box.removeClass(className + "off " + className + "on"); - } - - return function(){ - if (active) { - if (!settings.get('slideshow')) { - $events.unbind(event_cleanup, reset); - reset(); - } - } else { - if (settings.get('slideshow') && $related[1]) { - active = true; - $events.one(event_cleanup, reset); - if (settings.get('slideshowAuto')) { - start(); - } else { - stop(); - } - $slideshow.show(); - } - } - }; - - }()); - - - function launch(element) { - var options; - - if (!closing) { - - options = $(element).data(colorbox); - - settings = new Settings(element, options); - - getRelated(settings.get('rel')); - - if (!open) { - open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. - - setClass(settings.get('className')); - - // Show colorbox so the sizes can be calculated in older versions of jQuery - $box.css({visibility:'hidden', display:'block', opacity:''}); - - $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden'); - $content.css({width:'', height:''}).append($loaded); - - // Cache values needed for size calculations - interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height(); - interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); - loadedHeight = $loaded.outerHeight(true); - loadedWidth = $loaded.outerWidth(true); - - // Opens inital empty Colorbox prior to content being loaded. - var initialWidth = setSize(settings.get('initialWidth'), 'x'); - var initialHeight = setSize(settings.get('initialHeight'), 'y'); - var maxWidth = settings.get('maxWidth'); - var maxHeight = settings.get('maxHeight'); - - settings.w = Math.max((maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth, 0); - settings.h = Math.max((maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight, 0); - - $loaded.css({width:'', height:settings.h}); - publicMethod.position(); - - trigger(event_open); - settings.get('onOpen'); - - $groupControls.add($title).hide(); - - $box.focus(); - - if (settings.get('trapFocus')) { - // Confine focus to the modal - // Uses event capturing that is not supported in IE8- - if (document.addEventListener) { - - document.addEventListener('focus', trapFocus, true); - - $events.one(event_closed, function () { - document.removeEventListener('focus', trapFocus, true); - }); - } - } - - // Return focus on closing - if (settings.get('returnFocus')) { - $events.one(event_closed, function () { - $(settings.el).focus(); - }); - } - } - - var opacity = parseFloat(settings.get('opacity')); - $overlay.css({ - opacity: opacity === opacity ? opacity : '', - cursor: settings.get('overlayClose') ? 'pointer' : '', - visibility: 'visible' - }).show(); - - if (settings.get('closeButton')) { - $close.html(settings.get('close')).appendTo($content); - } else { - $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4 - } - - load(); - } - } - - // Colorbox's markup needs to be added to the DOM prior to being called - // so that the browser will go ahead and load the CSS background images. - function appendHTML() { - if (!$box) { - init = false; - $window = $(window); - $box = $tag(div).attr({ - id: colorbox, - 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS. - role: 'dialog', - tabindex: '-1' - }).hide(); - $overlay = $tag(div, "Overlay").hide(); - $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]); - $wrap = $tag(div, "Wrapper"); - $content = $tag(div, "Content").append( - $title = $tag(div, "Title"), - $current = $tag(div, "Current"), - $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}), - $next = $('<button type="button"/>').attr({id:prefix+'Next'}), - $slideshow = $('<button type="button"/>').attr({id:prefix+'Slideshow'}), - $loadingOverlay - ); - - $close = $('<button type="button"/>').attr({id:prefix+'Close'}); - - $wrap.append( // The 3x3 Grid that makes up Colorbox - $tag(div).append( - $tag(div, "TopLeft"), - $topBorder = $tag(div, "TopCenter"), - $tag(div, "TopRight") - ), - $tag(div, false, 'clear:left').append( - $leftBorder = $tag(div, "MiddleLeft"), - $content, - $rightBorder = $tag(div, "MiddleRight") - ), - $tag(div, false, 'clear:left').append( - $tag(div, "BottomLeft"), - $bottomBorder = $tag(div, "BottomCenter"), - $tag(div, "BottomRight") - ) - ).find('div div').css({'float': 'left'}); - - $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;'); - - $groupControls = $next.add($prev).add($current).add($slideshow); - } - if (document.body && !$box.parent().length) { - $(document.body).append($overlay, $box.append($wrap, $loadingBay)); - } - } - - // Add Colorbox's event bindings - function addBindings() { - function clickHandler(e) { - // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. - // See: http://jacklmoore.com/notes/click-events/ - if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) { - e.preventDefault(); - launch(this); - } - } - - if ($box) { - if (!init) { - init = true; - - // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. - $next.click(function () { - publicMethod.next(); - }); - $prev.click(function () { - publicMethod.prev(); - }); - $close.click(function () { - publicMethod.close(); - }); - $overlay.click(function () { - if (settings.get('overlayClose')) { - publicMethod.close(); - } - }); - - // Key Bindings - $(document).bind('keydown.' + prefix, function (e) { - var key = e.keyCode; - if (open && settings.get('escKey') && key === 27) { - e.preventDefault(); - publicMethod.close(); - } - if (open && settings.get('arrowKey') && $related[1] && !e.altKey) { - if (key === 37) { - e.preventDefault(); - $prev.click(); - } else if (key === 39) { - e.preventDefault(); - $next.click(); - } - } - }); - - if ($.isFunction($.fn.on)) { - // For jQuery 1.7+ - $(document).on('click.'+prefix, '.'+boxElement, clickHandler); - } else { - // For jQuery 1.3.x -> 1.6.x - // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed. - // This is not here for jQuery 1.9, it's here for legacy users. - $('.'+boxElement).live('click.'+prefix, clickHandler); - } - } - return true; - } - return false; - } - - // Don't do anything if Colorbox already exists. - if ($[colorbox]) { - return; - } - - // Append the HTML when the DOM loads - $(appendHTML); - - - // **************** - // PUBLIC FUNCTIONS - // Usage format: $.colorbox.close(); - // Usage from within an iframe: parent.jQuery.colorbox.close(); - // **************** - - publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { - var settings; - var $obj = this; - - options = options || {}; - - if ($.isFunction($obj)) { // assume a call to $.colorbox - $obj = $('<a/>'); - options.open = true; - } - - if (!$obj[0]) { // colorbox being applied to empty collection - return $obj; - } - - appendHTML(); - - if (addBindings()) { - - if (callback) { - options.onComplete = callback; - } - - $obj.each(function () { - var old = $.data(this, colorbox) || {}; - $.data(this, colorbox, $.extend(old, options)); - }).addClass(boxElement); - - settings = new Settings($obj[0], options); - - if (settings.get('open')) { - launch($obj[0]); - } - } - - return $obj; - }; - - publicMethod.position = function (speed, loadedCallback) { - var - css, - top = 0, - left = 0, - offset = $box.offset(), - scrollTop, - scrollLeft; - - $window.unbind('resize.' + prefix); - - // remove the modal so that it doesn't influence the document width/height - $box.css({top: -9e4, left: -9e4}); - - scrollTop = $window.scrollTop(); - scrollLeft = $window.scrollLeft(); - - if (settings.get('fixed')) { - offset.top -= scrollTop; - offset.left -= scrollLeft; - $box.css({position: 'fixed'}); - } else { - top = scrollTop; - left = scrollLeft; - $box.css({position: 'absolute'}); - } - - // keeps the top and left positions within the browser's viewport. - if (settings.get('right') !== false) { - left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0); - } else if (settings.get('left') !== false) { - left += setSize(settings.get('left'), 'x'); - } else { - left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2); - } - - if (settings.get('bottom') !== false) { - top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0); - } else if (settings.get('top') !== false) { - top += setSize(settings.get('top'), 'y'); - } else { - top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2); - } - - $box.css({top: offset.top, left: offset.left, visibility:'visible'}); - - // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, - // but it has to be shrank down around the size of div#colorbox when it's done. If not, - // it can invoke an obscure IE bug when using iframes. - $wrap[0].style.width = $wrap[0].style.height = "9999px"; - - function modalDimensions() { - $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px'; - $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px'; - } - - css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left}; - - // setting the speed to 0 if the content hasn't changed size or position - if (speed) { - var tempSpeed = 0; - $.each(css, function(i){ - if (css[i] !== previousCSS[i]) { - tempSpeed = speed; - return; - } - }); - speed = tempSpeed; - } - - previousCSS = css; - - if (!speed) { - $box.css(css); - } - - $box.dequeue().animate(css, { - duration: speed || 0, - complete: function () { - modalDimensions(); - - active = false; - - // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. - $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; - $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; - - if (settings.get('reposition')) { - setTimeout(function () { // small delay before binding onresize due to an IE8 bug. - $window.bind('resize.' + prefix, publicMethod.position); - }, 1); - } - - if ($.isFunction(loadedCallback)) { - loadedCallback(); - } - }, - step: modalDimensions - }); - }; - - publicMethod.resize = function (options) { - var scrolltop; - - if (open) { - options = options || {}; - - if (options.width) { - settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; - } - - if (options.innerWidth) { - settings.w = setSize(options.innerWidth, 'x'); - } - - $loaded.css({width: settings.w}); - - if (options.height) { - settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; - } - - if (options.innerHeight) { - settings.h = setSize(options.innerHeight, 'y'); - } - - if (!options.innerHeight && !options.height) { - scrolltop = $loaded.scrollTop(); - $loaded.css({height: "auto"}); - settings.h = $loaded.height(); - } - - $loaded.css({height: settings.h}); - - if(scrolltop) { - $loaded.scrollTop(scrolltop); - } - - publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed')); - } - }; - - publicMethod.prep = function (object) { - if (!open) { - return; - } - - var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed'); - - $loaded.remove(); - - $loaded = $tag(div, 'LoadedContent').append(object); - - function getWidth() { - settings.w = settings.w || $loaded.width(); - settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; - return settings.w; - } - function getHeight() { - settings.h = settings.h || $loaded.height(); - settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; - return settings.h; - } - - $loaded.hide() - .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. - .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'}) - .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. - .prependTo($content); - - $loadingBay.hide(); - - // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. - - $(photo).css({'float': 'none'}); - - setClass(settings.get('className')); - - callback = function () { - var total = $related.length, - iframe, - complete; - - if (!open) { - return; - } - - function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2 - if ($.support.opacity === false) { - $box[0].style.removeAttribute('filter'); - } - } - - complete = function () { - clearTimeout(loadingTimer); - $loadingOverlay.hide(); - trigger(event_complete); - settings.get('onComplete'); - }; - - - $title.html(settings.get('title')).show(); - $loaded.show(); - - if (total > 1) { // handle grouping - if (typeof settings.get('current') === "string") { - $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show(); - } - - $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next')); - $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous')); - - slideshow(); - - // Preloads images within a rel group - if (settings.get('preloading')) { - $.each([getIndex(-1), getIndex(1)], function(){ - var img, - i = $related[this], - settings = new Settings(i, $.data(i, colorbox)), - src = settings.get('href'); - - if (src && isImage(settings, src)) { - src = retinaUrl(settings, src); - img = document.createElement('img'); - img.src = src; - } - }); - } - } else { - $groupControls.hide(); - } - - if (settings.get('iframe')) { - - iframe = settings.get('createIframe'); - - if (!settings.get('scrolling')) { - iframe.scrolling = "no"; - } - - $(iframe) - .attr({ - src: settings.get('href'), - 'class': prefix + 'Iframe' - }) - .one('load', complete) - .appendTo($loaded); - - $events.one(event_purge, function () { - iframe.src = "//about:blank"; - }); - - if (settings.get('fastIframe')) { - $(iframe).trigger('load'); - } - } else { - complete(); - } - - if (settings.get('transition') === 'fade') { - $box.fadeTo(speed, 1, removeFilter); - } else { - removeFilter(); - } - }; - - if (settings.get('transition') === 'fade') { - $box.fadeTo(speed, 0, function () { - publicMethod.position(0, callback); - }); - } else { - publicMethod.position(speed, callback); - } - }; - - function load () { - var href, setResize, prep = publicMethod.prep, $inline, request = ++requests; - - active = true; - - photo = false; - - trigger(event_purge); - trigger(event_load); - settings.get('onLoad'); - - settings.h = settings.get('height') ? - setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight : - settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y'); - - settings.w = settings.get('width') ? - setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth : - settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x'); - - // Sets the minimum dimensions for use in image scaling - settings.mw = settings.w; - settings.mh = settings.h; - - // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. - // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. - if (settings.get('maxWidth')) { - settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth; - settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; - } - if (settings.get('maxHeight')) { - settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight; - settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; - } - - href = settings.get('href'); - - loadingTimer = setTimeout(function () { - $loadingOverlay.show(); - }, 100); - - if (settings.get('inline')) { - var $target = $(href).eq(0); - // Inserts an empty placeholder where inline content is being pulled from. - // An event is bound to put inline content back when Colorbox closes or loads new content. - $inline = $('<div>').hide().insertBefore($target); - - $events.one(event_purge, function () { - $inline.replaceWith($target); - }); - - prep($target); - } else if (settings.get('iframe')) { - // IFrame element won't be added to the DOM until it is ready to be displayed, - // to avoid problems with DOM-ready JS that might be trying to run in that iframe. - prep(" "); - } else if (settings.get('html')) { - prep(settings.get('html')); - } else if (isImage(settings, href)) { - - href = retinaUrl(settings, href); - - photo = settings.get('createImg'); - - $(photo) - .addClass(prefix + 'Photo') - .bind('error.'+prefix,function () { - prep($tag(div, 'Error').html(settings.get('imgError'))); - }) - .one('load', function () { - if (request !== requests) { - return; - } - - // A small pause because some browsers will occasionally report a - // img.width and img.height of zero immediately after the img.onload fires - setTimeout(function(){ - var percent; - - if (settings.get('retinaImage') && window.devicePixelRatio > 1) { - photo.height = photo.height / window.devicePixelRatio; - photo.width = photo.width / window.devicePixelRatio; - } - - if (settings.get('scalePhotos')) { - setResize = function () { - photo.height -= photo.height * percent; - photo.width -= photo.width * percent; - }; - if (settings.mw && photo.width > settings.mw) { - percent = (photo.width - settings.mw) / photo.width; - setResize(); - } - if (settings.mh && photo.height > settings.mh) { - percent = (photo.height - settings.mh) / photo.height; - setResize(); - } - } - - if (settings.h) { - photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px'; - } - - if ($related[1] && (settings.get('loop') || $related[index + 1])) { - photo.style.cursor = 'pointer'; - - $(photo).bind('click.'+prefix, function () { - publicMethod.next(); - }); - } - - photo.style.width = photo.width + 'px'; - photo.style.height = photo.height + 'px'; - prep(photo); - }, 1); - }); - - photo.src = href; - - } else if (href) { - $loadingBay.load(href, settings.get('data'), function (data, status) { - if (request === requests) { - prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents()); - } - }); - } - } - - // Navigates to the next page/image in a set. - publicMethod.next = function () { - if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) { - index = getIndex(1); - launch($related[index]); - } - }; - - publicMethod.prev = function () { - if (!active && $related[1] && (settings.get('loop') || index)) { - index = getIndex(-1); - launch($related[index]); - } - }; - - // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close(); - publicMethod.close = function () { - if (open && !closing) { - - closing = true; - open = false; - trigger(event_cleanup); - settings.get('onCleanup'); - $window.unbind('.' + prefix); - $overlay.fadeTo(settings.get('fadeOut') || 0, 0); - - $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () { - $box.hide(); - $overlay.hide(); - trigger(event_purge); - $loaded.remove(); - - setTimeout(function () { - closing = false; - trigger(event_closed); - settings.get('onClosed'); - }, 1); - }); - } - }; - - // Removes changes Colorbox made to the document, but does not remove the plugin. - publicMethod.remove = function () { - if (!$box) { return; } - - $box.stop(); - $[colorbox].close(); - $box.stop(false, true).remove(); - $overlay.remove(); - closing = false; - $box = null; - $('.' + boxElement) - .removeData(colorbox) - .removeClass(boxElement); - - $(document).unbind('click.'+prefix).unbind('keydown.'+prefix); - }; - - // A method for fetching the current element Colorbox is referencing. - // returns a jQuery object. - publicMethod.element = function () { - return $(settings.el); - }; - - publicMethod.settings = defaults; - -}(jQuery, document, window)); diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.min.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.min.1704213472.js deleted file mode 100644 index 7e07959d..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.min.1704213472.js +++ /dev/null @@ -1 +0,0 @@ -!function(d,s,l){var c,g,u,f,p,m,w,v,x,y,b,T,C,H,h,k,r,a,W,E,I,M,L,F,R,S,K,P,B,O,_,j,n,o={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return d(this).attr("href")},title:function(){return this.title},createImg:function(){var i=new Image,t=d(this).data("cbox-img-attrs");return"object"==typeof t&&d.each(t,function(t,e){i[t]=e}),i},createIframe:function(){var i=s.createElement("iframe"),t=d(this).data("cbox-iframe-attrs");return"object"==typeof t&&d.each(t,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},D="wflscolorbox",N="wflscbox",z=N+"Element",A=N+"_open",q=N+"_load",U=N+"_complete",$=N+"_cleanup",G=N+"_closed",Q=N+"_purge",J=d("<a/>"),V="div",X=0,Y={};function Z(t,e,i){var n=s.createElement(t);return e&&(n.id=N+e),i&&(n.style.cssText=i),d(n)}function tt(){return l.innerHeight?l.innerHeight:d(l).height()}function et(t,i){i!==Object(i)&&(i={}),this.cache={},this.el=t,this.value=function(t){var e;return void 0===this.cache[t]&&(void 0!==(e=d(this.el).attr("data-cbox-"+t))?this.cache[t]=e:void 0!==i[t]?this.cache[t]=i[t]:void 0!==o[t]&&(this.cache[t]=o[t])),this.cache[t]},this.get=function(t){var e=this.value(t);return d.isFunction(e)?e.call(this.el,this):e}}function it(t){var e=x.length,i=(S+t)%e;return i<0?e+i:i}function nt(t,e){return Math.round((/%/.test(t)?("x"===e?y.width():tt())/100:1)*parseInt(t,10))}function ot(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function ht(t,e){return t.get("retinaUrl")&&1<l.devicePixelRatio?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function rt(t){"contains"in g[0]&&!g[0].contains(t.target)&&t.target!==c[0]&&(t.stopPropagation(),g.focus())}function at(t){at.str!==t&&(g.add(c).removeClass(at.str).addClass(t),at.str=t)}function st(t){d(s).trigger(t),J.triggerHandler(t)}var lt=function(){var t,e,i=N+"Slideshow_",n="click."+N;function o(){clearTimeout(e)}function h(){(I.get("loop")||x[S+1])&&(o(),e=setTimeout(j.next,I.get("slideshowSpeed")))}function r(){k.html(I.get("slideshowStop")).unbind(n).one(n,a),J.bind(U,h).bind(q,o),g.removeClass(i+"off").addClass(i+"on")}function a(){o(),J.unbind(U,h).unbind(q,o),k.html(I.get("slideshowStart")).unbind(n).one(n,function(){j.next(),r()}),g.removeClass(i+"on").addClass(i+"off")}function s(){t=!1,k.hide(),o(),J.unbind(U,h).unbind(q,o),g.removeClass(i+"off "+i+"on")}return function(){t?I.get("slideshow")||(J.unbind($,s),s()):I.get("slideshow")&&x[1]&&(t=!0,J.one($,s),I.get("slideshowAuto")?r():a(),k.show())}}();function dt(t){var e,i;if(!O){if(e=d(t).data(D),I=new et(t,e),i=I.get("rel"),S=0,i&&!1!==i&&"nofollow"!==i?(x=d("."+z).filter(function(){return new et(this,d.data(this,D)).get("rel")===i}),-1===(S=x.index(I.el))&&(x=x.add(I.el),S=x.length-1)):x=d(I.el),!P){P=B=!0,at(I.get("className")),g.css({visibility:"hidden",display:"block",opacity:""}),b=Z(V,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),f.css({width:"",height:""}).append(b),M=p.height()+v.height()+f.outerHeight(!0)-f.height(),L=m.width()+w.width()+f.outerWidth(!0)-f.width(),F=b.outerHeight(!0),R=b.outerWidth(!0);var n=nt(I.get("initialWidth"),"x"),o=nt(I.get("initialHeight"),"y"),h=I.get("maxWidth"),r=I.get("maxHeight");I.w=Math.max((!1!==h?Math.min(n,nt(h,"x")):n)-R-L,0),I.h=Math.max((!1!==r?Math.min(o,nt(r,"y")):o)-F-M,0),b.css({width:"",height:I.h}),j.position(),st(A),I.get("onOpen"),E.add(H).hide(),g.focus(),I.get("trapFocus")&&s.addEventListener&&(s.addEventListener("focus",rt,!0),J.one(G,function(){s.removeEventListener("focus",rt,!0)})),I.get("returnFocus")&&J.one(G,function(){d(I.el).focus()})}var a=parseFloat(I.get("opacity"));c.css({opacity:a==a?a:"",cursor:I.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),I.get("closeButton")?W.html(I.get("close")).appendTo(f):W.appendTo("<div/>"),function(){var t,e,i,n=j.prep,o=++X;K=!(B=!0),st(Q),st(q),I.get("onLoad"),I.h=I.get("height")?nt(I.get("height"),"y")-F-M:I.get("innerHeight")&&nt(I.get("innerHeight"),"y"),I.w=I.get("width")?nt(I.get("width"),"x")-R-L:I.get("innerWidth")&&nt(I.get("innerWidth"),"x"),I.mw=I.w,I.mh=I.h,I.get("maxWidth")&&(I.mw=nt(I.get("maxWidth"),"x")-R-L,I.mw=I.w&&I.w<I.mw?I.w:I.mw);I.get("maxHeight")&&(I.mh=nt(I.get("maxHeight"),"y")-F-M,I.mh=I.h&&I.h<I.mh?I.h:I.mh);if(t=I.get("href"),_=setTimeout(function(){C.show()},100),I.get("inline")){var h=d(t).eq(0);i=d("<div>").hide().insertBefore(h),J.one(Q,function(){i.replaceWith(h)}),n(h)}else I.get("iframe")?n(" "):I.get("html")?n(I.get("html")):ot(I,t)?(t=ht(I,t),K=I.get("createImg"),d(K).addClass(N+"Photo").bind("error."+N,function(){n(Z(V,"Error").html(I.get("imgError")))}).one("load",function(){o===X&&setTimeout(function(){var t;I.get("retinaImage")&&1<l.devicePixelRatio&&(K.height=K.height/l.devicePixelRatio,K.width=K.width/l.devicePixelRatio),I.get("scalePhotos")&&(e=function(){K.height-=K.height*t,K.width-=K.width*t},I.mw&&K.width>I.mw&&(t=(K.width-I.mw)/K.width,e()),I.mh&&K.height>I.mh&&(t=(K.height-I.mh)/K.height,e())),I.h&&(K.style.marginTop=Math.max(I.mh-K.height,0)/2+"px"),x[1]&&(I.get("loop")||x[S+1])&&(K.style.cursor="pointer",d(K).bind("click."+N,function(){j.next()})),K.style.width=K.width+"px",K.style.height=K.height+"px",n(K)},1)}),K.src=t):t&&T.load(t,I.get("data"),function(t,e){o===X&&n("error"===e?Z(V,"Error").html(I.get("xhrError")):d(this).contents())})}()}}function ct(){g||(n=!1,y=d(l),g=Z(V).attr({id:D,class:!1===d.support.opacity?N+"IE":"",role:"dialog",tabindex:"-1"}).hide(),c=Z(V,"Overlay").hide(),C=d([Z(V,"LoadingOverlay")[0],Z(V,"LoadingGraphic")[0]]),u=Z(V,"Wrapper"),f=Z(V,"Content").append(H=Z(V,"Title"),h=Z(V,"Current"),a=d('<button type="button"/>').attr({id:N+"Previous"}),r=d('<button type="button"/>').attr({id:N+"Next"}),k=d('<button type="button"/>').attr({id:N+"Slideshow"}),C),W=d('<button type="button"/>').attr({id:N+"Close"}),u.append(Z(V).append(Z(V,"TopLeft"),p=Z(V,"TopCenter"),Z(V,"TopRight")),Z(V,!1,"clear:left").append(m=Z(V,"MiddleLeft"),f,w=Z(V,"MiddleRight")),Z(V,!1,"clear:left").append(Z(V,"BottomLeft"),v=Z(V,"BottomCenter"),Z(V,"BottomRight"))).find("div div").css({float:"left"}),T=Z(V,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),E=r.add(a).add(h).add(k)),s.body&&!g.parent().length&&d(s.body).append(c,g.append(u,T))}d[D]||(d(ct),(j=d.fn[D]=d[D]=function(e,t){var i=this;return e=e||{},d.isFunction(i)&&(i=d("<a/>"),e.open=!0),i[0]&&(ct(),function(){function t(t){1<t.which||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),dt(this))}return!!g&&(n||(n=!0,r.click(function(){j.next()}),a.click(function(){j.prev()}),W.click(function(){j.close()}),c.click(function(){I.get("overlayClose")&&j.close()}),d(s).bind("keydown."+N,function(t){var e=t.keyCode;P&&I.get("escKey")&&27===e&&(t.preventDefault(),j.close()),P&&I.get("arrowKey")&&x[1]&&!t.altKey&&(37===e?(t.preventDefault(),a.click()):39===e&&(t.preventDefault(),r.click()))}),d.isFunction(d.fn.on)?d(s).on("click."+N,"."+z,t):d("."+z).live("click."+N,t)),!0)}()&&(t&&(e.onComplete=t),i.each(function(){var t=d.data(this,D)||{};d.data(this,D,d.extend(t,e))}).addClass(z),new et(i[0],e).get("open")&&dt(i[0]))),i}).position=function(e,t){var i,n,o,h=0,r=0,a=g.offset();function s(){p[0].style.width=v[0].style.width=f[0].style.width=parseInt(g[0].style.width,10)-L+"px",f[0].style.height=m[0].style.height=w[0].style.height=parseInt(g[0].style.height,10)-M+"px"}if(y.unbind("resize."+N),g.css({top:-9e4,left:-9e4}),n=y.scrollTop(),o=y.scrollLeft(),I.get("fixed")?(a.top-=n,a.left-=o,g.css({position:"fixed"})):(h=n,r=o,g.css({position:"absolute"})),!1!==I.get("right")?r+=Math.max(y.width()-I.w-R-L-nt(I.get("right"),"x"),0):!1!==I.get("left")?r+=nt(I.get("left"),"x"):r+=Math.round(Math.max(y.width()-I.w-R-L,0)/2),!1!==I.get("bottom")?h+=Math.max(tt()-I.h-F-M-nt(I.get("bottom"),"y"),0):!1!==I.get("top")?h+=nt(I.get("top"),"y"):h+=Math.round(Math.max(tt()-I.h-F-M,0)/2),g.css({top:a.top,left:a.left,visibility:"visible"}),u[0].style.width=u[0].style.height="9999px",i={width:I.w+R+L,height:I.h+F+M,top:h,left:r},e){var l=0;d.each(i,function(t){i[t]===Y[t]||(l=e)}),e=l}Y=i,e||g.css(i),g.dequeue().animate(i,{duration:e||0,complete:function(){s(),B=!1,u[0].style.width=I.w+R+L+"px",u[0].style.height=I.h+F+M+"px",I.get("reposition")&&setTimeout(function(){y.bind("resize."+N,j.position)},1),d.isFunction(t)&&t()},step:s})},j.resize=function(t){var e;P&&((t=t||{}).width&&(I.w=nt(t.width,"x")-R-L),t.innerWidth&&(I.w=nt(t.innerWidth,"x")),b.css({width:I.w}),t.height&&(I.h=nt(t.height,"y")-F-M),t.innerHeight&&(I.h=nt(t.innerHeight,"y")),t.innerHeight||t.height||(e=b.scrollTop(),b.css({height:"auto"}),I.h=b.height()),b.css({height:I.h}),e&&b.scrollTop(e),j.position("none"===I.get("transition")?0:I.get("speed")))},j.prep=function(t){if(P){var e,o="none"===I.get("transition")?0:I.get("speed");b.remove(),(b=Z(V,"LoadedContent").append(t)).hide().appendTo(T.show()).css({width:(I.w=I.w||b.width(),I.w=I.mw&&I.mw<I.w?I.mw:I.w,I.w),overflow:I.get("scrolling")?"auto":"hidden"}).css({height:(I.h=I.h||b.height(),I.h=I.mh&&I.mh<I.h?I.mh:I.h,I.h)}).prependTo(f),T.hide(),d(K).css({float:"none"}),at(I.get("className")),e=function(){var t,e,i=x.length;function n(){!1===d.support.opacity&&g[0].style.removeAttribute("filter")}P&&(e=function(){clearTimeout(_),C.hide(),st(U),I.get("onComplete")},H.html(I.get("title")).show(),b.show(),1<i?("string"==typeof I.get("current")&&h.html(I.get("current").replace("{current}",S+1).replace("{total}",i)).show(),r[I.get("loop")||S<i-1?"show":"hide"]().html(I.get("next")),a[I.get("loop")||S?"show":"hide"]().html(I.get("previous")),lt(),I.get("preloading")&&d.each([it(-1),it(1)],function(){var t=x[this],e=new et(t,d.data(t,D)),i=e.get("href");i&&ot(e,i)&&(i=ht(e,i),s.createElement("img").src=i)})):E.hide(),I.get("iframe")?(t=I.get("createIframe"),I.get("scrolling")||(t.scrolling="no"),d(t).attr({src:I.get("href"),class:N+"Iframe"}).one("load",e).appendTo(b),J.one(Q,function(){t.src="//about:blank"}),I.get("fastIframe")&&d(t).trigger("load")):e(),"fade"===I.get("transition")?g.fadeTo(o,1,n):n())},"fade"===I.get("transition")?g.fadeTo(o,0,function(){j.position(0,e)}):j.position(o,e)}},j.next=function(){!B&&x[1]&&(I.get("loop")||x[S+1])&&(S=it(1),dt(x[S]))},j.prev=function(){!B&&x[1]&&(I.get("loop")||S)&&(S=it(-1),dt(x[S]))},j.close=function(){P&&!O&&(P=!(O=!0),st($),I.get("onCleanup"),y.unbind("."+N),c.fadeTo(I.get("fadeOut")||0,0),g.stop().fadeTo(I.get("fadeOut")||0,0,function(){g.hide(),c.hide(),st(Q),b.remove(),setTimeout(function(){O=!1,st(G),I.get("onClosed")},1)}))},j.remove=function(){g&&(g.stop(),d[D].close(),g.stop(!1,!0).remove(),c.remove(),O=!1,g=null,d("."+z).removeData(D).removeClass(z),d(s).unbind("click."+N).unbind("keydown."+N))},j.element=function(){return d(I.el)},j.settings=o)}(jQuery,document,window); \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.qrcode.min.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.qrcode.min.1704213472.js deleted file mode 100644 index fe9680e6..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.qrcode.min.1704213472.js +++ /dev/null @@ -1,28 +0,0 @@ -(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length}, -write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount; -for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount- -7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]= -0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a}, -setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c= -j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount- -b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a, -c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d= -0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&& -(d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52, -78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)- -j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+ -a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+ -a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+ -2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256), -LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0> -this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27], -[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146, -116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15, -43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45, -3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19, -55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10, -45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4* -(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1, -correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b), -j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width", -d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery); diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.tmpl.min.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.tmpl.min.1704213472.js deleted file mode 100644 index 7438b2ca..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.tmpl.min.1704213472.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * jQuery Templates Plugin 1.0.0pre - * http://github.com/jquery/jquery-tmpl - * Requires jQuery 1.4.2 - * - * Copyright Software Freedom Conservancy, Inc. - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - */ -(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery); \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/js/login.1704213472.js b/wp/wp-content/plugins/wordfence/modules/login-security/js/login.1704213472.js deleted file mode 100644 index 1cd5730f..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/js/login.1704213472.js +++ /dev/null @@ -1,492 +0,0 @@ -(function($) { - function __(string) { - return WFLS_LOGIN_TRANSLATIONS[string] || string; - } - !function(Z){"use strict";Z.Zebra_Tooltips=function(t,l){var u,T,b,v,n={animation_speed:250,animation_offset:20,close_on_click:!0,content:!(this.version="2.1.0"),hide_delay:100,keep_visible:!0,max_width:250,opacity:".95",position:"center",prerender:!1,show_delay:100,vertical_alignment:"above",vertical_offset:0,onBeforeHide:null,onHide:null,onBeforeShow:null,onShow:null},r=this,_=function(e){var t,o,i,a,l,n,r,_,s,p,d,h,c,f,w=e.data("Zebra_Tooltip"),m=Z(window);return w.tooltip||(t=Z("<div>",{"class":"Zebra_Tooltip",css:{opacity:0,display:"block"}}),o=Z("<div>",{"class":"Zebra_Tooltip_Message",css:{maxWidth:w.max_width}}).html(w.content).appendTo(t),i=Z("<div>",{"class":"Zebra_Tooltip_Arrow"}).appendTo(t),a=Z("<div>").addClass("Zebra_Tooltip_Arrow_Border").appendTo(i),Z("<div>").appendTo(i),w.keep_visible&&(t.on("mouseleave"+(w.close_on_click?" click":""),function(){y(e)}),t.on("mouseenter",function(){g(e)})),t.appendTo("body"),w.sticky&&o.addClass("Zebra_Tooltip_Has_Close"),l=t.outerWidth(),n=t.outerHeight(),r=a.outerWidth(),_=a.outerHeight(),s=o.outerWidth(),p=o.outerHeight(),w={tooltip:t,tooltip_width:l,tooltip_height:n+_/2,message:o,arrow_container:i,arrow_width:r,arrow_height:_,arrow:a},t.css({width:w.tooltip_width,height:w.tooltip_height}),w.tooltip_width=w.tooltip_width+(o.outerWidth()-s),w.tooltip_height=w.tooltip_height+(o.outerHeight()-p),t.css({width:w.tooltip_width,height:w.tooltip_height,display:"none"}),w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w)),w.sticky&&!w.close&&(Z("<a>",{"class":"Zebra_Tooltip_Close",href:"javascript:void(0)"}).html("×").on("click",function(t){t.preventDefault();var o=e.data("Zebra_Tooltip");o.sticky=!1,e.data("Zebra_Tooltip",o),y(e)}).appendTo(w.message),w.close=!0,w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w)),u=m.width(),T=m.height(),d=e.offset(),Z.extend(w,{element_left:d.left,element_top:d.top,element_width:e.outerWidth(),element_height:e.outerHeight()}),v=m.scrollTop(),b=m.scrollLeft(),h="left"===w.position?w.element_left-w.tooltip_width+w.arrow_width:"right"===w.position?w.element_left+w.element_width-w.arrow_width:w.element_left+(w.element_width-w.tooltip_width)/2,c=w.element_top-w.tooltip_height,f="left"===w.position?w.tooltip_width-w.arrow_width-w.arrow_width/2:"right"===w.position?w.arrow_width/2:(w.tooltip_width-w.arrow_width)/2,h+w.tooltip_width>u+b&&(f-=u+b-(h+w.tooltip_width)-6,h=u+b-w.tooltip_width-6,f+w.arrow_width>w.tooltip_width-6&&(f=w.tooltip_width-6-w.arrow_width),h+f+w.arrow_width/2<w.element_left&&(f=-1e4)),h<b&&(f-=b-h,h=b+2,f<0&&(f=w.arrow_width/2),h+f+w.arrow_width/2>w.element_left+w.element_width&&(f=-1e4)),w.message.css("margin-top",""),w.arrow_container.removeClass("Zebra_Tooltip_Arrow_Top").addClass("Zebra_Tooltip_Arrow_Bottom"),c<v||"below"===w.vertical_alignment&&w.element_top+w.element_height+w.vertical_offset+w.tooltip_height+w.animation_offset<T+v?(c=w.element_top+w.element_height-w.vertical_offset,w.animation_offset=Math.abs(w.animation_offset),w.message.css("margin-top",w.arrow_height/2),w.arrow_container.removeClass("Zebra_Tooltip_Arrow_Bottom").addClass("Zebra_Tooltip_Arrow_Top")):(w.animation_offset=-Math.abs(w.animation_offset),c+=w.vertical_offset),w.arrow_container.css("left",f),w.tooltip.css({left:h,top:c}),Z.extend(w,{tooltip_left:h,tooltip_top:c,arrow_left:f}),w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w),w},g=function(t){var o=t.data("Zebra_Tooltip");clearTimeout(o.show_timeout),o.muted||(clearTimeout(o.hide_timeout),o.show_timeout=setTimeout(function(){(o=_(t)).onBeforeShow&&"function"==typeof o.onBeforeShow&&!1===o.onBeforeShow(t,o.tooltip)||("block"!==o.tooltip.css("display")&&o.tooltip.css({top:o.tooltip_top+o.animation_offset}),o.tooltip.css("display","block"),o.tooltip.stop(),o.tooltip.animate({top:o.tooltip_top,opacity:o.opacity},o.animation_speed,function(){o.onShow&&"function"==typeof o.onShow&&o.onShow(t,o.tooltip)}))},o.show_delay))},y=function(t){var o=t.data("Zebra_Tooltip");clearTimeout(o.hide_timeout),o.sticky||(clearTimeout(o.show_timeout),o.hide_timeout=setTimeout(function(){if(o.tooltip){if(o.onBeforeHide&&"function"==typeof o.onBeforeHide&&!1===o.onBeforeHide(t,o.tooltip))return;o.close=!1,o.destroy&&(o.muted=!0),t.data("Zebra_Tooltip",o),Z("a.Zebra_Tooltip_Close",o.tooltip).remove(),o.tooltip.stop(),o.tooltip.animate({opacity:0,top:o.tooltip_top+o.animation_offset},o.animation_speed,function(){Z(this).css("display","none"),o.onHide&&"function"==typeof o.onHide&&o.onHide(t,o.tooltip)})}},o.hide_delay))};r.hide=function(t,e){t.each(function(){var t=Z(this),o=t.data("Zebra_Tooltip");o&&(o.sticky=!1,e&&(o.destroy=!0),t.data("Zebra_Tooltip",o),y(t))})},r.show=function(t,e){t.each(function(){var t=Z(this),o=t.data("Zebra_Tooltip");o&&(o.sticky=!0,o.muted=!1,e&&(o.destroy=!0),t.data("Zebra_Tooltip",o),g(t))})},t.each(function(){var t,o=Z(this),e=o.attr("title"),i=o.data(),a={};for(t in i)0===t.indexOf("ztt_")&&(t=t.replace(/^ztt\_/,""),void 0!==n[t]&&(a[t]=i["ztt_"+t]));a=Z.extend(n,r.settings,l,a),e&&(a.content=o.attr("title")),void 0!==a.content&&""!==a.content.trim()&&(o.on({mouseenter:function(){e&&Z(this).attr("title",""),g(o)},mouseleave:function(){y(o),e&&Z(this).attr("title",e)}}),o.data("Zebra_Tooltip",Z.extend({tooltip:null,show_timeout:null,hide_timeout:null,sticky:!1,destroy:!1,muted:!1},a)),a.prerender&&_(o))})}}($); - - function selectorSearch(selectors) { - var input = null; - return function() { - if (input !== null) - return input; - for (var i = 0; i < selectors.length; i++) { - input = $(selectors[i]); - if (input.length === 1) - return input; - } - input = null; - return input; - } - }; - function FormElementLocator(inputSelectors, extraSelectors) { - var self = this; - - if (typeof extraSelectors == 'undefined') - extraSelectors = {}; - - var found = false; - var input = null, form = null, extra = {}; - - var findInput = selectorSearch(inputSelectors); - var search = function() { - input = findInput(); - if (input === null) - return false; - form = input.closest('form'); - if (form.length !== 1) { - form = null; - return false; - } - for (var key in extraSelectors) { - var match = form.find(extraSelectors[key]); - if (match.length === 1) { - extra[key] = match; - } - else { - return false; - } - } - return true; - }; - this.locate = function() { - if (!found) - found = search(); - return found; - }; - this.getInput = function() { - return found ? input : null; - }; - this.getForm = function() { - return found ? form : null; - }; - this.getExtra = function(key) { - if (key in extra) - return extra[key]; - return null; - } - } - var loginLocator = new FormElementLocator( - [ - 'input[name=log]', - 'input[name=username]', - 'input#username[name=username]', - '.woocommerce-form-login input[name=username]', - '.login input[name=username]' - ], - { - password: 'input[name="pwd"],input[name=password]' - } - ); - var registrationLocator = new FormElementLocator([ - 'input[name=user_login]', - '#reg_email', - '.woocommerce-form-register input[name=email]', - '.register input[name=email]' - ]); - var locators = [ - loginLocator, - registrationLocator - ]; - function getRelevantInputs() { - var inputs = $(); - for (var i = 0; i < locators.length; i++) { - if (locators[i].locate()) - inputs = inputs.add(locators[i].getInput()); - } - return inputs; - } - - var wfls_init_captcha = function(actionCallback, log) { - if (typeof log === 'undefined') - log = getRelevantInputs(); - if (typeof grecaptcha === 'object') { - grecaptcha.ready(function() { - grecaptcha.execute(WFLSVars.recaptchasitekey, {action: 'login'}).then(function(token) { - var tokenField = $('#wfls-captcha-token'); - if (tokenField.length) { - tokenField.val(token); - } - else { - if (log.length) { - tokenField = $('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />'); - tokenField.val(token); - log.parent().append(tokenField); - } - } - - typeof actionCallback === 'function' && actionCallback(true); - }); - }); - } - else { - var tokenField = $('#wfls-captcha-token'); - if (tokenField.length) { - tokenField.val('grecaptcha-missing'); - } - else { - if (log.length) { - tokenField = $('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />'); - tokenField.val('grecaptcha-missing'); - log.parent().append(tokenField); - } - } - - typeof actionCallback === 'function' && actionCallback(true); - } - }; - - function showLoginMessage(messageHtml, type) { - var heading = $('#login > h1'); - if (heading.length > 0) { - var dom = (type === 'error' ? $('<div id="login_error">') : $('<p class="message">')); - dom.addClass('wfls-login-message'); - dom.addClass('notice'); - if (type === 'error') { - dom.addClass('notice-error'); - } - dom.html(messageHtml); - heading.after(dom); - dom.get(0).scrollIntoView(); - return; - } - else if ($('.woocommerce').length > 0){ - var content = $('<div class="woocommerce wfls-login-message">'); - var errorList = $('<ul role="alert">') - .addClass(type === 'error' ? 'woocommerce-error' : 'woocommerce-info'); - content.append(errorList); - errorList.append($('<li>').html(messageHtml)); - var containerSearch = selectorSearch([ - '#primary', - '.content-area', - '#main', - '.site-main', - 'main' - ]); - var container = containerSearch(); - if (container === null) { - container = loginLocator.getForm(); - } - if (container !== null) { - container.before(content); - content.get(0).scrollIntoView(); - return; - } - } - var messageModal = $('<div>') - .attr('id', 'wfls-login-modal') - .css({ - position: 'fixed', - top: 0, - right: 0, - bottom: 0, - left: 0, - 'background-color': 'rgba(0,0,0,0.5)', - 'z-index': 9999, - display: 'flex', - 'align-items': 'center', - 'justify-content': 'center', - padding: '16px' - }) - .appendTo($('body')); - messageModal.append( - $('<div>') - .css({ - 'background-color': '#FFF', - 'border-radius': '4px', - padding: '16px', - 'text-align': 'center' - }) - .append( - $('<p>').html(messageHtml) - ) - .append( - $('<button>').text('Dismiss') - .on('click', function() { - messageModal.remove(); - }) - ) - ); - } - - - var wfls_init_captcha_contact = function() { - $('.wfls-registration-captcha-contact').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - if (registrationLocator.locate()) { - $('#wfls-prompt-overlay').remove(); - var overlay = $('<div id="wfls-prompt-overlay"></div>'); - var wrapper = $('<div id="wfls-prompt-wrapper"></div>'); - var field = $('<p><label for="wfls-message"></label><br/><textarea name="wfls-message" id="wfls-message" class="wfls-textarea"></textarea></p>'); - field.find('label[for=wfls-message]').text(__('Message to Support')); - var nonce = $('<input type="hidden" name="wfls-message-nonce" id="wfls-message-nonce"/>'); - var button = $('<p class="submit"><input type="submit" name="wfls-support-submit" id="wfls-support-submit" class="button button-primary button-large"/></p>'); - button.find('input[type=submit]').val(__('Send')); - wrapper.append(field).append(nonce).append(button); - overlay.append(wrapper); - registrationLocator.getForm().css('position', 'relative').append(overlay); - - $('#wfls-message-nonce').val($(this).data('token')); - - $('#wfls-support-submit').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - $('#login_error, p.message').remove(); - - var data = registrationLocator.getForm().serialize(); - data += '&action=wordfence_ls_register_support'; - - $.ajax({ - type: 'POST', - url: WFLSVars.ajaxurl, - dataType: 'json', - data: data, - success: function(json) { - if (json.hasOwnProperty('error')) { - showLoginMessage(json.error, 'error'); - var dom = $('<div id="login_error">' + json.error + '</div>'); - $('#login > h1').after(dom); - } - else if (json.hasOwnProperty('message')) { //Success - showLoginMessage(json.message, 'message'); - var dom = $('<p class="message">' + json.message + '</p>'); - $('#login > h1').after(dom); - $('#wfls-support-submit, #wfls-message').attr('disabled', true); - } - }, - error: function(err) { - showLoginMessage(__('An error was encountered while trying to send the message. Please try again.'), 'error'); - var dom = $('<div id="login_error"></div>'); - dom.html(__('<strong>ERROR</strong>: An error was encountered while trying to send the message. Please try again.')); - $('#login > h1').after(dom); - } - }); - }); - - field.find("#wfls-message").focus(); - } - }); - }; - - function FormBlocker(form, buttonSelector, clickOnSubmit) { - - var self = this; - var blocked = false; - var released = false; - clickOnSubmit = clickOnSubmit || false; - var clickSubmitInProgress = false; - - this.getButtons = function() { - return form.find(buttonSelector); - } - - this.block = function() { - if (blocked) - return false; - blocked = true; - this.getButtons().addClass('disabled').prop('disabled', true); - return true; - } - - this.unblock = function() { - this.getButtons().removeClass('disabled').prop('disabled', false); - blocked = false; - } - - this.release = function() { - released = true; - } - - this.clickSubmit = function() { - this.unblock(); - var submitButton = this.getButtons().first(); - setTimeout(function() { - submitButton.trigger('click'); - }, 1); - } - - this.initialize = function(callback) { - form.on('submit', function(event) { - if (released && (!clickOnSubmit || clickSubmitInProgress)) { - if (clickSubmitInProgress) - clickSubmitInProgress = false; - return; - } - event.preventDefault(); - event.stopPropagation(); - if (released) { - clickSubmitInProgress = true; - self.clickSubmit(); - return; - } - if (self.block()) { - callback(); - } - }); - } - - } - - var wfls_query_ajax = function(blocker) { - $('.wfls-login-message').remove(); - - if (!loginLocator.locate()) { - console.error('Required login elements not found'); - return; - } - var form = loginLocator.getForm(); - var log = loginLocator.getInput(); - var pwd = loginLocator.getExtra('password'); - - var data = $(form).serialize(); - data += '&action=wordfence_ls_authenticate'; - - $.ajax({ - type: 'POST', - url: WFLSVars.ajaxurl, - dataType: 'json', - data: data, - success: function(json) { - if (json.hasOwnProperty('reset') && json.reset) { - $('#wfls-prompt-overlay').remove(); - } - - if (json.hasOwnProperty('error')) { - showLoginMessage(json.error, 'error'); - $('#wfls-token').val(''); - - if (parseInt(WFLSVars.useCAPTCHA)) { - wfls_init_captcha(); - } - } - else if (json.hasOwnProperty('message')) { - showLoginMessage(json.message, 'message'); - $('#wfls-token').val(''); - - if (parseInt(WFLSVars.useCAPTCHA)) { - wfls_init_captcha(); - } - } - else if (json.hasOwnProperty('login')) { - if (json.hasOwnProperty('captcha')) { - var captchaField = $('#wfls-captcha-jwt'); - if (!captchaField.length) { - captchaField = $('<input type="hidden" name="wfls-captcha-jwt" id="wfls-captcha-jwt" value=""/>'); - form.append(captchaField); - } - - $('#wfls-captcha-jwt').val(json.captcha); - } - - if (parseInt(WFLSVars.useCAPTCHA)) { - wfls_init_captcha(); - wfls_init_captcha_contact(); - } - - blocker.release(); - if (json.hasOwnProperty('two_factor_required') && json.two_factor_required) { - if ($('#wfls-prompt-overlay').length === 0) { - var overlay = $('<div id="wfls-prompt-overlay"></div>'); - var wrapper = $('<div id="wfls-prompt-wrapper"></div>'); - var label = $('<label for="wfls-token">'); - label.text(__('Wordfence 2FA Code') + ' '); - label.append($('<a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger"><i class="dashicons dashicons-editor-help"></i></a>').attr('title', __('The Wordfence 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes.'))); - label = $('<p>').append(label); - var field = $('<p><input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="one-time-code"/></p>'); - var remember = $('<p class="wfls-remember-device-wrapper"><label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" value="1" /> </label></p>'); - remember.find('label').append(__('Remember for 30 days')); - var button = $('<p class="submit"><input type="submit" name="wfls-token-submit" id="wfls-token-submit" class="button button-primary button-large"/></p>'); - button.find('input[type=submit]').val(__('Log In')); - wrapper.append(label); - wrapper.append(field); - if (parseInt(WFLSVars.allowremember)) { - wrapper.append(remember); - } - wrapper.append(button); - overlay.append(wrapper); - form.css('position', 'relative').append(overlay); - form.on('submit', function() { - $('#wfls-token-submit').prop('disabled', true).addClass('disabled'); - }); - $('#wfls-token').focus(); - - new $.Zebra_Tooltips($('.wfls-tooltip-trigger')); - } - } - else { //Unexpected response, skip AJAX and process via the regular login flow - blocker.clickSubmit(); - } - } - blocker.unblock(); - }, - error: function(err) { - if (err.status == 503 || err.status == 403) { - if ($('.woocommerce').length > 0) { - if (err.status == 503) { - showLoginMessage(__('<strong>ERROR</strong>: Login failed with status code 503. Please contact the site administrator.'), 'error'); - } - else if (err.status == 403) { - showLoginMessage(__('<strong>ERROR</strong>: Login failed with status code 403. Please contact the site administrator.'), 'error'); - } - blocker.unblock(); - } - else { - window.location.reload(true); - } - - return; - } - showLoginMessage(__('<strong>ERROR</strong>: An error was encountered while trying to authenticate. Please try again.'), 'error'); - blocker.unblock(); - } - }); - }; - - $(function() { - //Login - if (loginLocator.locate()) { - var loginBlocker = new FormBlocker(loginLocator.getForm(), '#wp-submit,[type=submit][name=login]', true); - loginBlocker.initialize(function() { - if (parseInt(WFLSVars.useCAPTCHA)) { - wfls_init_captcha(function() { wfls_query_ajax(loginBlocker); }); - } - else { - wfls_query_ajax(loginBlocker); - } - }); - } - - //Registration - if (registrationLocator.locate() && parseInt(WFLSVars.useCAPTCHA)) { - var registrationBlocker = new FormBlocker(registrationLocator.getForm(), '[type=submit]'); - registrationBlocker.initialize(function() { - wfls_init_captcha( - function() { - registrationBlocker.release(); - registrationBlocker.clickSubmit(); - }, - registrationLocator.getInput() - ); - }); - } - - var verificationField = $('#wfls-email-verification'); - if (verificationField.length) { - verificationField.val(WFLSVars.verification || ''); - } - else { - var log = getRelevantInputs(); - if (log.length) { - verificationField = $('<input type="hidden" name="wfls-email-verification" id="wfls-email-verification" />'); - verificationField.val(WFLSVars.verification); - log.parent().append(verificationField); - } - } - - if (parseInt(WFLSVars.useCAPTCHA)) { - wfls_init_captcha_contact(); - } - }); -})(jQuery); diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/.htaccess b/wp/wp-content/plugins/wordfence/modules/login-security/views/.htaccess deleted file mode 100644 index d16a02be..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/.htaccess +++ /dev/null @@ -1,16 +0,0 @@ -<IfModule mod_rewrite.c> - RewriteEngine On - RewriteCond %{REQUEST_URI} \.php$ - RewriteRule .* - [F,L,NC] -</IfModule> -<IfModule !mod_rewrite.c> - <FilesMatch "\.php$"> - <IfModule mod_authz_core.c> - Require all denied - </IfModule> - <IfModule !mod_authz_core.c> - Order deny,allow - Deny from all - </IfModule> - </FilesMatch> -</IfModule> diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/common/modal-prompt.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/common/modal-prompt.php deleted file mode 100644 index 17a4e90d..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/common/modal-prompt.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a modal prompt. - * - * @var string|\WordfenceLS\Text\Model_HTML $title The title for the prompt. Required. - * @var string|\WordfenceLS\Text\Model_HTML $message The message for the prompt. Required. - * @var array $primaryButton The parameters for the primary button. The array is in the format array('id' => <element id>, 'label' => <button text>, 'link' => <href value>). Optional. - * @var array $secondaryButtons The parameters for any secondary buttons. It is an array of arrays in the format array('id' => <element id>, 'label' => <button text>, 'link' => <href value>). The ordering of entries is the right-to-left order the buttons will be displayed. Optional. - */ - -$titleHTML = \WordfenceLS\Text\Model_HTML::esc_html($title); -$messageHTML = \WordfenceLS\Text\Model_HTML::esc_html($message); -$embedded = isset($embedded) ? $embedded : false; - -if (!isset($secondaryButtons)) { - $secondaryButtons = array(); -} -$secondaryButtons = array_reverse($secondaryButtons); -?> -<div class="wfls-modal"> - <div class="wfls-modal-header"> - <div class="wfls-modal-header-content"> - <div class="wfls-modal-title"> - <strong><?php echo $titleHTML; ?></strong> - </div> - </div> - <div class="wfls-modal-header-action"> - <div class="wfls-padding-add-left-small wfls-modal-header-action-close"><a href="#" onclick="WFLS.panelClose(); return false"><i class="<?php echo (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-times-circle' : 'wfls-fa wfls-fa-times-circle'); ?>" aria-hidden="true"></i></a></div> - </div> - </div> - <div class="wfls-modal-content"> - <?php echo $messageHTML; ?> - </div> - <div class="wfls-modal-footer"> - <ul class="wfls-flex-horizontal wfls-flex-align-right wfls-full-width"> - <?php foreach ($secondaryButtons as $button): ?> - <li class="wfls-padding-add-left-small"><a href="<?php echo esc_url($button['link']); ?>" class="wfls-btn <?php echo isset($button['type']) ? $button['type'] : 'wfls-btn-default'; ?> wfls-btn-callout-subtle" id="<?php echo esc_attr($button['id']); ?>"><?php echo isset($button['labelHTML']) ? $button['labelHTML'] : esc_html($button['label']); ?></a></li> - <?php endforeach; ?> - <?php if (isset($primaryButton) && is_array($primaryButton)): ?> - <li class="wfls-padding-add-left-small"><a href="<?php echo esc_url($primaryButton['link']); ?>" class="wfls-btn <?php echo isset($primaryButton['type']) ? $primaryButton['type'] : 'wfls-btn-primary'; ?> wfls-btn-callout-subtle" id="<?php echo esc_attr($primaryButton['id']); ?>"><?php echo isset($primaryButton['labelHTML']) ? $primaryButton['labelHTML'] : esc_html($primaryButton['label']); ?></a></li> - <?php endif ?> - </ul> - </div> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/common/reset-grace-period.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/common/reset-grace-period.php deleted file mode 100644 index d965250d..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/common/reset-grace-period.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -if (!isset($defaultGracePeriod)) - $defaultGracePeriod = \WordfenceLS\Controller_Settings::shared()->get_user_2fa_grace_period(); -$defaultGracePeriod = max($defaultGracePeriod, 1); -$errorMessage = $gracePeriod === null ? __('Unable to Activate Grace Period', 'wordfence') : __('Unable to Reset Grace Period', 'wordfence'); -?> -<div class="wfls-add-top wfls-add-bottom wfls-grace-period-container"> - <div class="wfls-grace-period-input-container"> - <label for="wfls-user-grace-period-override" style="display: none"><?php esc_html_e('Grace Period Override', 'wordfence') ?></label> - <input type="text" id="wfls-user-grace-period-override" maxlength="2" pattern="[0-9]+" value="<?php echo (int) $defaultGracePeriod ?>"> - <label for="wfls-user-grace-period-override"><?php esc_html_e('days', 'wordfence') ?></label> - </div> - <div class="wfls-grace-period-button-container"> - <button class="wfls-btn wfls-btn-default" id="wfls-reset-grace-period"> - <?php echo $gracePeriod === null ? esc_html__('Activate Grace Period', 'wordfence') : esc_html__('Reset Grace Period', 'wordfence') ?> - </button> - - </div> -</div> -<div> - <p id="wfls-reset-grace-period-failed" style="display: none"><strong><?php echo esc_html($errorMessage) ?></strong></p> -</div> -<script type="application/javascript"> - (function($) { - $(function() { - var failureMessage = $('#wfls-reset-grace-period-failed'); - var overrideInput = $('#wfls-user-grace-period-override'); - var button = $('#wfls-reset-grace-period'); - function reset2faGracePeriod(userId, gracePeriodOverride, success, failure) { - var ajaxContext = (typeof WFLS === 'undefined' ? GWFLS : WFLS); - ajaxContext.ajax( - 'wordfence_ls_reset_2fa_grace_period', - { - user_id: userId, - grace_period_override: gracePeriodOverride - }, - success, - failure - ); - } - function handleError() { - if (typeof WFLS === 'object') { - WFLS.panelModal( - (WFLS.screenSize(500) ? '300px' : '400px'), - <?php echo json_encode($errorMessage) ?>, - <?php echo json_encode($gracePeriod === null ? __('An unexpected error occurred while attempting to activate the grace period.', 'wordfence') : __('An unexpected error occurred while attempting to reset the grace period.', 'wordfence')) ?> - ); - } - else { - failureMessage.show(); - } - button.prop('disabled', false); - overrideInput.prop('disabled', false); - } - button.on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - button.prop('disabled', true); - overrideInput.prop('disabled', true); - failureMessage.hide(); - reset2faGracePeriod( - <?php echo json_encode($user->ID, true) ?>, - overrideInput.val(), - function(data) { - if ('error' in data) { - handleError(); - return; - } - if (typeof WFLS === 'undefined') - window.location.href = '#wfls-user-settings'; - window.location.reload(); - }, - handleError - ); - }); - overrideInput.on('input', function(e) { - var value = $(this).val(); - value = value.replace(/[^0-9]/g, ''); - value = parseInt(value); - if (isNaN(value) || value === 0) - value = ''; - button.prop('disabled', value < 1); - $(this).val(value); - }).trigger('input'); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/common/revoke-grace-period.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/common/revoke-grace-period.php deleted file mode 100644 index ea97dcd0..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/common/revoke-grace-period.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -$errorMessage = __('Unable to Revoke Grace Period', 'wordfence'); -?> -<div class="wfls-add-top wfls-add-bottom wfls-grace-period-container"> - <div class="wfls-grace-period-button-container"> - <button class="wfls-btn wfls-btn-default" id="wfls-revoke-grace-period"> - <?php esc_html_e('Revoke Grace Period', 'wordfence') ?> - </button> - - </div> -</div> -<div> - <p id="wfls-revoke-grace-period-failed" style="display: none"><strong><?php echo esc_html($errorMessage) ?></strong></p> -</div> -<script type="application/javascript"> - (function($) { - $(function() { - var failureMessage = $('#wfls-revoke-grace-period-failed'); - var button = $('#wfls-revoke-grace-period'); - function revoke2faGracePeriod(userId, success, failure) { - var ajaxContext = (typeof WFLS === 'undefined' ? GWFLS : WFLS); - ajaxContext.ajax( - 'wordfence_ls_revoke_2fa_grace_period', - { - user_id: userId - }, - success, - failure - ); - } - function handleError() { - if (typeof WFLS === 'object') { - WFLS.panelModal( - (WFLS.screenSize(500) ? '300px' : '400px'), - <?php echo json_encode($errorMessage) ?>, - <?php echo json_encode(__('An unexpected error occurred while attempting to revoke the grace period.', 'wordfence')) ?> - ); - } - else { - failureMessage.show(); - } - button.prop('disabled', false); - } - button.on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - button.prop('disabled', true); - failureMessage.hide(); - revoke2faGracePeriod( - <?php echo json_encode($user->ID, true) ?>, - function(data) { - if ('error' in data) { - handleError(); - return; - } - if (typeof WFLS === 'undefined') - window.location.href = '#wfls-user-settings'; - window.location.reload(); - }, - handleError - ); - }); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/email/login-verification.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/email/login-verification.php deleted file mode 100644 index ac58a3ea..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/email/login-verification.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var string $ip The requesting IP. Required. - * @var string $siteName The site name. Required. - * @var string $siteURL The site URL. Required. - * @var string $verificationURL The verification URL. Required. - * @var bool $canEnable2FA Whether or not the user this is being sent to can enable 2FA. Optional - */ -?> -<strong><?php echo wp_kses(sprintf(__('Please verify a login attempt for your account on <a href="%s"><strong>%s</strong></a>.', 'wordfence'), esc_url($siteURL), $siteName), array('a'=>array('href'=>array()), 'strong'=>array())); ?></strong> -<br><br> -<?php echo '<strong>' . esc_html__('Request Time:', 'wordfence') . '</strong> ' . esc_html(\WordfenceLS\Controller_Time::format_local_time('F j, Y h:i:s A')); ?><br> -<?php echo '<strong>' . esc_html__('IP:', 'wordfence') . '</strong> ' . esc_html($ip); ?> -<br><br> -<?php echo wp_kses(__('The request was flagged as suspicious, and we need verification that you attempted to log in to allow it to proceed. This verification link <b>will be valid for 15 minutes</b> from the time it was sent. If you did not attempt this login, please change your password immediately.', 'wordfence'), array('b'=>array())); ?> -<br><br> -<?php if (isset($canEnable2FA) && $canEnable2FA): ?> -<?php esc_html_e('You may bypass this verification step permanently by enabling two-factor authentication on your account.', 'wordfence'); ?> -<br><br> -<?php endif; ?> -<?php echo wp_kses(sprintf(__('<a href="%s"><b>Verify and Log In</b></a>', 'wordfence'), esc_url($verificationURL)), array('a'=>array('href'=>array()), 'b'=>array())); ?> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/activate.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/activate.php deleted file mode 100644 index e40c7e64..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/activate.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var \WordfenceLS\Model_2faInitializationData $initializationData The initialization data for setting up 2FA for a specific user. Required. - */ -$user = $initializationData->get_user(); -$recovery = $initializationData->get_recovery_codes(); -?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <strong><?php esc_html_e('2. Enter Code from Authenticator App', 'wordfence'); ?></strong> - </div> - </div> - </div> - <div class="wfls-block-content wfls-padding-add-bottom"> - <p><?php esc_html_e('Download Recovery Codes', 'wordfence'); ?> <em class="wfls-text-small"><?php esc_html_e('Optional', 'wordfence'); ?></em></p> - <p><?php echo esc_html(sprintf(__('Use one of these %d codes to log in if you lose access to your authenticator device. Codes are %d characters long plus optional spaces. Each one may be used only once.', 'wordfence'), count($recovery), \WordfenceLS\Model_Crypto::strlen($recovery[0]) * 2)); ?></p> - <ul class="wfls-recovery-codes"> - <?php - $recoveryCodeFileContents = sprintf(__('Two-Factor Authentication Recovery Codes - %s (%s)', 'wordfence'), home_url(), $user->user_login) . "\r\n"; - $recoveryCodeFileContents .= "\r\n" . sprintf(__('Each line of %d letters and numbers is a single recovery code, with optional spaces for readability. To use a recovery code, after entering your username and password, enter the code like "1234 5678 90AB CDEF" at the 2FA prompt. If your site has a custom login prompt and does not show a 2FA prompt, you can use the single-step method by entering your password and the code together in the Password field, like "mypassword1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence'), \WordfenceLS\Model_Crypto::strlen($recovery[0]) * 2) . "\r\n\r\n"; - foreach ($recovery as $c) { - $hex = bin2hex($c); - $blocks = str_split($hex, 4); - echo '<li>' . implode(' ', $blocks) . '</li>'; - $recoveryCodeFileContents .= implode(' ', $blocks) . "\r\n"; - } - ?> - </ul> - <p class="wfls-center"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-recovery-download" target="_blank" rel="noopener noreferrer"><i class="dashicons dashicons-download"></i> <?php esc_html_e('Download', 'wordfence'); ?></a></p> - - <hr class="wfls-half"> - - <p><?php esc_html_e('Enter the code from your authenticator app below to verify and activate two-factor authentication for this account.', 'wordfence'); ?></p> - <p><input type="text" id="wfls-activate-field" value="" size="6" maxlength="6" placeholder="123456" autocomplete="off"></p> - </div> - <div class="wfls-block-footer"> - <div class="wfls-block-footer-content"> - <div class="wfls-block-title" id="wfls-activation-help-link-container"> - <a href="<?php echo \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('For help on setting up an app, visit our help article.', 'wordfence'); ?></a> - </div> - <div class="wfls-block-footer-action"><a href="#" id="wfls-activate" class="wfls-btn wfls-btn-default wfls-disabled"><?php esc_html_e('Activate', 'wordfence'); ?></a></div> - </div> - </div> -</div> -<script type="application/javascript"> - (function($) { - $(function() { - $('#wfls-activate-field').on('keyup', function(e) { - $('#wfls-activate').toggleClass('wfls-disabled', $('#wfls-activate-field').val().length != 6); - - if (e.keyCode == 13) { - $('#wfls-activate').trigger('click'); - } - }); - - $('#wfls-recovery-download').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - saveAs(new Blob(["<?php echo str_replace("\n", "\\n", str_replace("\r", "\\r", addslashes($recoveryCodeFileContents))); ?>"], {type: "text/plain;charset=" + document.characterSet}), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(preg_replace('~^https?://~i', '', home_url())) . '_' . \WordfenceLS\Text\Model_JavaScript::esc_js($user->user_login) . '_recoverycodes.txt'; ?>'); - WFLS.savedRecoveryCodes = true; - }); - - $('#wfls-activate').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - if (WFLS.userIsActivating) { //Likely a double-click - return; - } - - WFLS.userIsActivating = true; - - var payload = { - secret: '<?php echo bin2hex($initializationData->get_raw_secret()); ?>', - recovery: ['<?php echo implode('\', \'', array_map(function($c) { return bin2hex($c); }, $recovery)); ?>'], - code: $('#wfls-activate-field').val(), - user: <?php echo $user->ID; ?>, - }; - - WFLS.ajax( - 'wordfence_ls_activate', - payload, - function(response) { - if (response.error) { - WFLS.userIsActivating = false; - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Activating 2FA', 'wordfence')); ?>', response.error, {includeDefaultButtons: true}); - } - else { - $('#wfls-activation-controls').crossfade($('#wfls-deactivation-controls')); - $('#wfls-recovery-code-count').text(response.text); - $('#wfls-activate-field').val(''); - - $('.wfls-notice[data-notice-type="wfls-will-be-required"]').find('.wfls-dismiss-link').trigger('click'); - - if (!WFLS.savedRecoveryCodes) { - var prompt = $('#wfls-tmpl-recovery-skipped-prompt').tmpl({}); - var promptHTML = $("<div />").append(prompt).html(); - WFLS.panelHTML((WFLS.screenSize(500) ? '300px' : '400px'), promptHTML, { fixed: true, overlayClose: false, closeButton: false, className: 'wfls-modal', onComplete: function() { - $('#wfls-recovery-skipped-download').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - saveAs(new Blob(["<?php echo str_replace("\n", "\\n", str_replace("\r", "\\r", addslashes($recoveryCodeFileContents))); ?>"], {type: "text/plain;charset=" + document.characterSet}), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(preg_replace('~^https?://~i', '', home_url())) . '_' . \WordfenceLS\Text\Model_JavaScript::esc_js($user->user_login) . '_recoverycodes.txt'; ?>'); - WFLS.panelClose(); - }); - $('#wfls-recovery-skipped-skip').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - WFLS.panelClose(); - }); - }}); - } - WFLS.savedRecoveryCodes = false; - WFLS.userIsActivating = false; - } - }, - function(error) { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Activating 2FA', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to activate two-factor authentication. Please try again.', 'wordfence')); ?>', {includeDefaultButtons: true}); - WFLS.userIsActivating = false; - } - ); - }); - }); - })(jQuery); -</script> -<script type="text/x-jquery-template" id="wfls-tmpl-recovery-skipped-prompt"> - <?php - echo \WordfenceLS\Model_View::create('common/modal-prompt', array( - 'title' => __('Download Recovery Codes', 'wordfence'), - 'message' => __('Reminder: If you lose access to your authenticator device, you can use recovery codes to log in. If you have not saved a copy of your recovery codes, we recommend downloading them now.', 'wordfence'), - 'primaryButton' => array('id' => 'wfls-recovery-skipped-download', 'label' => __('Download', 'wordfence'), 'link' => '#'), - 'secondaryButtons' => array(array('id' => 'wfls-recovery-skipped-skip', 'label' => __('Skip', 'wordfence'), 'link' => '#')), - ))->render(); - ?> -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/code.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/code.php deleted file mode 100644 index 7b24cdeb..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/code.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var \WordfenceLS\Model_2faInitializationData $initializationData The initialization data for setting up 2FA for a specific user. Required. - */ -?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <strong><?php esc_html_e('1. Scan Code or Enter Key', 'wordfence'); ?></strong> - </div> - </div> - </div> - <div class="wfls-block-content wfls-padding-add-bottom"> - <p><?php esc_html_e('Scan the code below with your authenticator app to add this account. Some authenticator apps also allow you to type in the text version instead.', 'wordfence') ?></p> - <div id="wfls-qr-code"></div> - <p class="wfls-center wfls-no-bottom"><input id="wfls-qr-code-text" class="wfls-center" type="text" value="<?php echo esc_attr($initializationData->get_base32_secret()); ?>" onclick="this.select();" size="32" readonly></p> - </div> -</div> -<script type="application/javascript"> - (function($) { - $(function() { - var narrowPreviously = null; - function renderQrCode() { - var narrow = WFLS.screenSize(500); - if (narrow !== narrowPreviously) { - $('#wfls-qr-code').empty().qrcode({text: '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js($initializationData->get_otp_url()); ?>', width: (narrow ? 175 : 256), height: (narrow ? 175 : 256)}); - $('#wfls-qr-code-text').css('font-family', narrow ? '' : 'monospace'); - } - narrowPreviously = narrow; - } - $(window).on('resize', renderQrCode); - renderQrCode(); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/deactivate.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/deactivate.php deleted file mode 100644 index 8e9d872f..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/deactivate.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var \WP_User $user The user being edited. Required. - */ - -$ownAccount = false; -$ownUser = wp_get_current_user(); -if ($ownUser->ID == $user->ID) { - $ownAccount = true; -} -?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <strong><?php esc_html_e('Wordfence 2FA Active', 'wordfence'); ?></strong> - </div> - </div> - </div> - <div class="wfls-block-content wfls-padding-add-bottom"> - <p><?php if ($ownAccount) { esc_html_e('Wordfence two-factor authentication is currently active on your account. You may deactivate it by clicking the button below.', 'wordfence'); } else { echo wp_kses(sprintf(__('Wordfence two-factor authentication is currently active on the account <strong>%s</strong>. You may deactivate it by clicking the button below.', 'wordfence'), esc_html($user->user_login)), array('strong'=>array())); } ?></p> - <p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-deactivate" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Deactivate', 'wordfence'); ?></a></p> - </div> -</div> -<script type="text/x-jquery-template" id="wfls-tmpl-deactivate-prompt"> - <?php - echo \WordfenceLS\Model_View::create('common/modal-prompt', array( - 'title' => __('Deactivate 2FA', 'wordfence'), - 'message' => __('Are you sure you want to deactivate two-factor authentication?', 'wordfence'), - 'primaryButton' => array('id' => 'wfls-deactivate-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'), - 'secondaryButtons' => array(array('id' => 'wfls-deactivate-prompt-confirm', 'label' => __('Deactivate', 'wordfence'), 'link' => '#')), - ))->render(); - ?> -</script> -<script type="application/javascript"> - (function($) { - $(function() { - $('#wfls-deactivate').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var prompt = $('#wfls-tmpl-deactivate-prompt').tmpl({}); - var promptHTML = $("<div />").append(prompt).html(); - WFLS.panelHTML((WFLS.screenSize(500) ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wfls-modal', onComplete: function() { - $('#wfls-deactivate-prompt-cancel').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - WFLS.panelClose(); - }); - - $('#wfls-deactivate-prompt-confirm').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var payload = { - user: <?php echo (int) $user->ID; ?>, - }; - - WFLS.ajax( - 'wordfence_ls_deactivate', - payload, - function(response) { - if (response.error) { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence')); ?>', response.error); - } - else { - $('#wfls-deactivation-controls').crossfade($('#wfls-activation-controls')); - } - - WFLS.panelClose(); //The prompt - }, - function(error) { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to deactivate two-factor authentication. Please try again.', 'wordfence')); ?>'); - WFLS.panelClose(); //The prompt - } - ); - }); - }}); - }); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/grace-period.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/grace-period.php deleted file mode 100644 index b7aa8584..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/grace-period.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var \WP_User $user The user being edited. Required. - * @var bool $inGracePeriod - * @var bool $lockedOut - * @var int $requiredAt - */ - -$ownAccount = false; -$ownUser = wp_get_current_user(); -if ($ownUser->ID == $user->ID) { - $ownAccount = true; -} -$defaultGracePeriod = \WordfenceLS\Controller_Settings::shared()->get_user_2fa_grace_period(); -$hasGracePeriod = $defaultGracePeriod > 0; -?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <strong><?php echo $gracePeriod ? esc_html__('Grace Period', 'wordfence') : esc_html__('Locked Out', 'wordfence') ?></strong> - </div> - </div> - </div> - <div class="wfls-block-content"> - <?php if ($gracePeriod): ?> - <p><?php - $requiredDateFormatted = \WordfenceLS\Controller_Time::format_local_time('F j, Y g:i A', $requiredAt); - echo $ownAccount ? - sprintf(wp_kses(__('Two-factor authentication will be required for your account beginning <strong>%s</strong>', 'wordfence'), array('strong'=>array())), $requiredDateFormatted) : - sprintf(wp_kses(__('Two-factor authentication will be required for user <strong>%s</strong> beginning <strong>%s</strong>.', 'wordfence'), array('strong'=>array())), esc_html($user->user_login), $requiredDateFormatted) - ?></p> - <?php if (\WordfenceLS\Controller_Users::shared()->has_revokable_grace_period($user)): ?> - <?php echo \WordfenceLS\Model_View::create( - 'common/revoke-grace-period', - array( - 'user' => $user - ))->render() ?> - <?php endif ?> - <?php else: ?> - <p> - <?php echo $ownAccount ? - esc_html__('Two-factor authentication is required for your account, but has not been configured.', 'wordfence') : - esc_html__('Two-factor authentication is required for this account, but has not been configured.', 'wordfence') ?> - </p> - <?php echo \WordfenceLS\Model_View::create( - 'common/reset-grace-period', - array( - 'user' => $user, - 'gracePeriod' => $gracePeriod, - 'defaultGracePeriod' => $defaultGracePeriod - ))->render() ?> - <?php endif ?> - </div> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/regenerate.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/regenerate.php deleted file mode 100644 index b54647a9..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/manage/regenerate.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var \WP_User $user The user being edited. Required. - * @var int $remaining The number of unused recovery codes. Required. - */ -?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <strong><?php esc_html_e('Recovery Codes', 'wordfence'); ?></strong> - </div> - </div> - </div> - <div class="wfls-block-content wfls-padding-add-bottom"> - <p id="wfls-recovery-code-count"><?php echo esc_html(sprintf($remaining == 1 ? __('%d unused recovery code remains. You may generate a new set by clicking below.', 'wordfence') : __('%d unused recovery codes remain. You may generate a new set by clicking below.', 'wordfence'), $remaining)); ?></p> - <p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-recovery" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Generate New Codes', 'wordfence'); ?></a></p> - </div> -</div> -<script type="text/x-jquery-template" id="wfls-tmpl-recovery-prompt"> - <?php - echo \WordfenceLS\Model_View::create('common/modal-prompt', array( - 'title' => __('Generate New Recovery Codes', 'wordfence'), - 'message' => __('Are you sure you want to generate new recovery codes? Any remaining unused codes will be disabled.', 'wordfence'), - 'primaryButton' => array('id' => 'wfls-recovery-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'), - 'secondaryButtons' => array(array('id' => 'wfls-recovery-prompt-confirm', 'label' => __('Generate', 'wordfence'), 'link' => '#')), - ))->render(); - ?> -</script> -<script type="application/javascript"> - (function($) { - $(function() { - $('#wfls-recovery').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var prompt = $('#wfls-tmpl-recovery-prompt').tmpl({}); - var promptHTML = $("<div />").append(prompt).html(); - WFLS.panelHTML((WFLS.screenSize(500) ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wfls-modal', onComplete: function() { - $('#wfls-recovery-prompt-cancel').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - WFLS.panelClose(); - }); - - $('#wfls-recovery-prompt-confirm').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var payload = { - user: <?php echo (int) $user->ID; ?>, - }; - - WFLS.ajax( - 'wordfence_ls_regenerate', - payload, - function(response) { - if (response.error) { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo esc_js(__('Error Generating New Codes', 'wordfence')); ?>', response.error); - } - else if (response.recovery) { - $('#wfls-recovery-code-count').text(response.text); - - var message = '<p><?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Use one of these %d codes to log in if you lose access to your authenticator device. Codes are %d characters long plus optional spaces. Each one may be used only once.', 'wordfence'), \WordfenceLS\Controller_Users::RECOVERY_CODE_COUNT, \WordfenceLS\Controller_Users::RECOVERY_CODE_SIZE * 2)); ?></p><ul class="wfls-recovery-codes">'; - - var recoveryCodeFileContents = '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Two-Factor Authentication Recovery Codes - %s (%s)', 'wordfence'), preg_replace('~^https?://~i', '', home_url()), $user->user_login)); ?>' + "\r\n"; - recoveryCodeFileContents = recoveryCodeFileContents + "\r\n" + '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Each line of %d letters and numbers is a single recovery code, with optional spaces for readability. To use a recovery code, after entering your username and password, enter the code like "1234 5678 90AB CDEF" at the 2FA prompt. If your site has a custom login prompt and does not show a 2FA prompt, you can use the single-step method by entering your password and the code together in the Password field, like "mypassword1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence'), \WordfenceLS\Controller_Users::RECOVERY_CODE_SIZE * 2)); ?>' + "\r\n\r\n"; - for (var i = 0; i < response.recovery.length; i++) { - message = message + '<li>' + response.recovery[i] + '</li>'; - recoveryCodeFileContents = recoveryCodeFileContents + response.recovery[i] + "\r\n"; - } - - message = message + "</ul>"; - - message = message + "<p class=\"wfls-center\"><a href=\"#\" class=\"wfls-btn wfls-btn-default\" id=\"wfls-recovery-new-download\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"dashicons dashicons-download\"></i> <?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Download', 'wordfence')); ?></a></p>"; - - - WFLS.panelModalHTML((WFLS.screenSize(500) ? '300px' : '400px'), "<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('New Recovery Codes', 'wordfence')); ?>", message, {onComplete: function() { - $('#wfls-recovery-new-download').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - saveAs(new Blob([recoveryCodeFileContents], {type: "text/plain;charset=" + document.characterSet}), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(preg_replace('~^https?://~i', '', home_url()) . '_' . $user->user_login . '_recoverycodes.txt'); ?>'); - }); - }}); - } - - WFLS.panelClose(); //The prompt - }, - function(error) { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Generating New Codes', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to generate new recovery codes. Please try again.', 'wordfence')); ?>'); - WFLS.panelClose(); //The prompt - } - ); - }); - }}); - }); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/onboarding/standalone-header.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/onboarding/standalone-header.php deleted file mode 100644 index 41afe6e1..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/onboarding/standalone-header.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents the fresh install plugin header for standalone installations. - */ -?> -<div id="wfls-onboarding-standalone-modal"> - <div id="wfls-onboarding-standalone-modal-header"> - <div id="wfls-onboarding-standalone-modal-header-title"><?php esc_html_e('Wordfence Login Security Installed', 'wordfence'); ?></div> - <div id="wfls-onboarding-standalone-modal-header-accessory"><a href="#" id="wfls-onboarding-standalone-modal-dismiss">×</a></div> - </div> - <div id="wfls-onboarding-standalone-modal-content"> - <p><?php esc_html_e('You have just installed the Wordfence Login Security plugin. It contains a subset of the functionality found in the full Wordfence plugin: Two-factor Authentication, XML-RPC Protection and Login Page CAPTCHA.', 'wordfence'); ?></p> - <p><?php printf(__('If you\'re looking for a more comprehensive solution, the <a href="%s" target="_blank" rel="noopener noreferrer">full Wordfence plugin</a> includes all of the features in this plugin as well as a full-featured WordPress firewall, a security scanner, live traffic, and more. The standard installation includes a robust set of free features that can be upgraded via a Premium license key.', 'wordfence'), 'https://wordpress.org/plugins/wordfence/'); ?></p> - </div> -</div> -<script type="application/javascript"> - (function($) { - $(function() { - $('#wfls-onboarding-standalone-modal-dismiss').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - $('#wfls-onboarding-standalone-modal').slideUp(400, function() { - $('#wfls-onboarding-standalone-modal').remove(); - }); - - WFLS.setOptions({'dismissed-fresh-install-modal': true}); - }); - }); - })(jQuery); -</script> diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-captcha-threshold.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-captcha-threshold.php deleted file mode 100644 index e0c6fe3e..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-captcha-threshold.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -$optionName = \WordfenceLS\Controller_Settings::OPTION_RECAPTCHA_THRESHOLD; -$currentValue = \WordfenceLS\Controller_Settings::shared()->get_float($optionName, 0.5); -$selectOptions = array( - array('label' => __('1.0 (definitely a human)', 'wordfence'), 'value' => 1.0), - array('label' => __('0.9', 'wordfence'), 'value' => 0.9), - array('label' => __('0.8', 'wordfence'), 'value' => 0.8), - array('label' => __('0.7', 'wordfence'), 'value' => 0.7), - array('label' => __('0.6', 'wordfence'), 'value' => 0.6), - array('label' => __('0.5 (probably a human)', 'wordfence'), 'value' => 0.5), - array('label' => __('0.4', 'wordfence'), 'value' => 0.4), - array('label' => __('0.3', 'wordfence'), 'value' => 0.3), - array('label' => __('0.2', 'wordfence'), 'value' => 0.2), - array('label' => __('0.1', 'wordfence'), 'value' => 0.1), - array('label' => __('0.0 (definitely a bot)', 'wordfence'), 'value' => 0.0), -); -?> -<ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <ul id="wfls-option-recaptcha-threshold" class="wfls-option wfls-option-select" data-select-option="<?php echo esc_attr($optionName); ?>" data-original-select-value="<?php echo esc_attr($currentValue); ?>"> - <li class="wfls-option-spacer"></li> - <li class="wfls-option-content"> - <ul> - <li class="wfls-option-title"> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li><span id="wfls-option-recaptcha-threshold-label"><strong><?php esc_html_e('reCAPTCHA human/bot threshold score', 'wordfence'); ?></strong></span></li> - <li class="wfls-option-subtitle"><?php esc_html_e('A reCAPTCHA score equal to or higher than this value will be considered human. Anything lower will be treated as a bot and require additional verification for login and registration.', 'wordfence'); ?></li> - </ul> - </li> - <li class="wfls-option-select wfls-padding-add-top-xs-small"> - <select aria-labelledby="wfls-option-recaptcha-threshold-label"> - <?php foreach ($selectOptions as $o): ?> - <option class="wfls-option-select-option" value="<?php echo esc_attr($o['value']); ?>"<?php if (((int) ($o['value'] * 10)) == ((int) ($currentValue * 10))) { echo ' selected'; } ?>><?php echo esc_html($o['label']); ?></option> - <?php endforeach; ?> - </select> - </li> - </ul> - </li> - </ul> - </li> - <li> - <ul class="wfls-option"> - <li class="wfls-option-spacer"></li> - <li class="wfls-recaptcha-score-history"> - <div class="wfls-recaptcha-chart-container"> - <canvas id="wfls-recaptcha-score-history"></canvas> - </div> - <div class="wfls-center"> - <a href="#" id="wfls-reset-recaptcha-score-stats" class="wfls-text-small"><?php esc_html_e('Reset Score Statistics', 'wordfence'); ?></a> - </div> - </li> - </ul> - </li> -</ul> -<script type="application/javascript"> - <?php - $stats = \WordfenceLS\Controller_Settings::shared()->get_array(\WordfenceLS\Controller_Settings::OPTION_CAPTCHA_STATS); - ?> - (function($) { - $(function() { - $('#wfls-reset-recaptcha-score-stats').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - WFLS.ajax('wordfence_ls_reset_recaptcha_stats', {}, function(res) { - if (res.success) { - window.location.reload(true); - } - else { - if (res.hasOwnProperty('html') && res.html) { - WFLS.panelModalHTML((WFLS.screenSize(500) ? '300px' : '400px'), 'Error Resetting reCAPTCHA Statistics', res.error); - } - else { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), 'Error Resetting reCAPTCHA Statistics', res.error); - } - } - }); - }); - }); - - $(window).on('wfls-tab-change.recaptcha-score-history', function(e, target) { - if (target == 'settings') { - var barChartData = { - labels: ['0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0'], - datasets: [{ - label: '<?php esc_attr_e('Requests', 'wordfence'); ?>', - backgroundColor: 'rgba(75,192,192,0.4)', - borderColor: 'rgba(75,192,192,1.0)', - borderWidth: 1, - data: <?php echo json_encode($stats['counts']) ?> - }] - }; - - new Chart($('#wfls-recaptcha-score-history'), { - type: 'bar', - data: barChartData, - options: { - responsive: true, - legend: { - display: false, - }, - title: { - display: true, - text: '<?php esc_attr_e('reCAPTCHA Score History', 'wordfence'); ?>' - }, - scales: { - y: { - display: true, - title: { - display: true, - text: '<?php esc_attr_e('Count', 'wordfence'); ?>' - }, - ticks: { - min: 0, - precision: 0, - stepSize: <?php echo max(10, pow(10, floor(log10(array_sum($stats['counts']) / 5)))); ?> - } - } - } - } - }); - $(window).off('wfls-tab-change.recaptcha-score-history'); - } - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-captcha.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-captcha.php deleted file mode 100644 index 2631c4b6..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-captcha.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -$enableOptionName = \WordfenceLS\Controller_Settings::OPTION_ENABLE_AUTH_CAPTCHA; -$currentEnableValue = \WordfenceLS\Controller_Settings::shared()->get_bool($enableOptionName); - -$siteKeyOptionName = \WordfenceLS\Controller_Settings::OPTION_RECAPTCHA_SITE_KEY; -$siteKeyValue = \WordfenceLS\Controller_Settings::shared()->get($siteKeyOptionName); - -$secretOptionName = \WordfenceLS\Controller_Settings::OPTION_RECAPTCHA_SECRET; -$secretValue = \WordfenceLS\Controller_Settings::shared()->get($secretOptionName); -?> -<ul id="wfls-option-enable-auth-captcha" data-option="<?php echo esc_attr($enableOptionName); ?>" data-enabled-value="1" data-disabled-value="0" data-original-value="<?php echo $currentEnableValue ? '1' : '0'; ?>"> - <li> - <ul class="wfls-option wfls-padding-add-bottom-small"> - <li id="wfls-enable-auth-captcha" class="wfls-option-checkbox<?php echo ($currentEnableValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($currentEnableValue ? 'true' : 'false'); ?>" tabindex="0"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true" aria-labelledby="wfls-enable-auth-captcha-label"></i></li> - <li class="wfls-option-title"> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <strong id="wfls-enable-auth-captcha-label"><?php esc_html_e('Enable reCAPTCHA on the login and user registration pages', 'wordfence'); ?></strong> - </li> - <li class="wfls-option-subtitle"><?php printf(__('reCAPTCHA v3 does not make users solve puzzles or click a checkbox like previous versions. The only visible part is the reCAPTCHA logo. If a visitor\'s browser fails the CAPTCHA, Wordfence will send an email to the user\'s address with a link they can click to verify that they are a user of your site. You can read further details <a href="%s" target="_blank" rel="noopener noreferrer">in our documentation</a>.', 'wordfence'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_CAPTCHA)); ?></li> - </ul> - </li> - </ul> - </li> - <li> - <ul class="wfls-option wfls-padding-no-top"> - <li class="wfls-option-spacer"></li> - <li> - <table> - <tr class="wfls-option wfls-option-text" data-original-value="<?php echo esc_attr($siteKeyValue); ?>" data-text-option="<?php echo esc_attr($siteKeyOptionName); ?>"> - <th id="wfls-enable-captcha-site-key-label" class="wfls-padding-add-bottom"><?php esc_html_e('reCAPTCHA v3 Site Key', 'wordfence'); ?></th> - <td class="wfls-option-text wfls-padding-add-bottom"><input type="text" name="recaptchaSiteKey" id="input-recaptchaSiteKey" class="wfls-form-control" value="<?php echo esc_attr($siteKeyValue); ?>"<?php if (!$currentEnableValue) { echo ' disabled'; } ?>></td> - </tr> - <tr class="wfls-option wfls-option-text" data-original-value="<?php echo esc_attr($secretValue); ?>" data-text-option="<?php echo esc_attr($secretOptionName); ?>"> - <th id="wfls-enable-captcha-secret-label"><?php esc_html_e('reCAPTCHA v3 Secret', 'wordfence'); ?></th> - <td class="wfls-option-text"><input type="text" name="recaptchaSecret" id="input-recaptchaSecret" class="wfls-form-control" value="<?php echo esc_attr($secretValue); ?>"<?php if (!$currentEnableValue) { echo ' disabled'; } ?>></td> - </tr> - </table> - </li> - </ul> - <ul class="wfls-option wfls-padding-no-top"> - <li class="wfls-option-spacer"></li> - <li class="wfls-option-title"> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li class="wfls-option-subtitle"><?php echo wp_kses(__('Note: This feature requires a free site key and secret for the <a href="https://www.google.com/recaptcha/about/" target="_blank" rel="noopener noreferrer">Google reCAPTCHA v3 Service</a>. To set up new reCAPTCHA keys, log into your Google account and go to the <a href="https://www.google.com/recaptcha/admin" target="_blank" rel="noopener noreferrer">reCAPTCHA admin page</a>.', 'wordfence'), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></li> - </ul> - </li> - </ul> - </li> -</ul> -<script type="application/javascript"> - (function($) { - $(function() { - $('#wfls-enable-auth-captcha').on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $('#wfls-enable-auth-captcha').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var optionElement = $('#wfls-option-enable-auth-captcha'); - if (optionElement.hasClass('wfls-disabled')) { - return; - } - - var option = optionElement.data('option'); - var value = false; - var isActive = $(this).hasClass('wfls-checked'); - if (isActive) { - $(this).removeClass('wfls-checked').attr('aria-checked', 'false'); - $('#input-recaptchaSiteKey, #input-recaptchaSecret').attr('disabled', true); - value = optionElement.data('disabledValue'); - } - else { - $(this).addClass('wfls-checked').attr('aria-checked', 'true'); - $('#input-recaptchaSiteKey, #input-recaptchaSecret').attr('disabled', false); - value = optionElement.data('enabledValue'); - } - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - }); - - $('#wfls-enable-auth-captcha-label').on('click', function(e) { - var links = $(this).find('a'); - var buffer = 10; - for (var i = 0; i < links.length; i++) { - var t = $(links[i]).offset().top; - var l = $(links[i]).offset().left; - var b = t + $(links[i]).height(); - var r = l + $(links[i]).width(); - - if (e.pageX > l - buffer && e.pageX < r + buffer && e.pageY > t - buffer && e.pageY < b + buffer) { - return; - } - } - $(this).closest('.wfls-option').find('.wfls-option-checkbox').trigger('click'); - }).css('cursor', 'pointer'); - - $('#input-recaptchaSiteKey, #input-recaptchaSecret').on('change paste keyup', function() { - var e = this; - - setTimeout(function() { - var optionElement = $(e).closest('.wfls-option'); - var option = optionElement.data('textOption'); - - if (typeof option !== 'undefined') { - var value = $(e).val(); - - var originalValue = $(optionElement).data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - $(optionElement).trigger('change', [false]); - WFLS.updatePendingChanges(); - } - }, 4); - }); - - $(window).on('wflsOptionsReset', function() { - $('#wfls-enable-auth-captcha').each(function() { - var enabledValue = $(this).data('enabledValue'); - var disabledValue = $(this).data('disabledValue'); - var originalValue = $(this).data('originalValue'); - if (enabledValue == originalValue) { - $(this).find('#wfls-enable-auth-captcha.wfls-option-checkbox').addClass('wfls-checked').attr('aria-checked', 'true'); - } - else { - $(this).find('#wfls-enable-auth-captcha.wfls-option-checkbox').removeClass('wfls-checked').attr('aria-checked', 'false'); - } - $(this).trigger('change', [true]); - }); - $('#input-recaptchaSiteKey, #input-recaptchaSecret').each(function() { - $(this).val($(this).data('originalValue')); - $(this).attr('disabled', !$('#wfls-enable-auth-captcha.wfls-option-checkbox').hasClass('wfls-checked')); - }); - }); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-ip-source.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-ip-source.php deleted file mode 100644 index db361c3c..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-ip-source.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents the global option OPTION_IP_SOURCE with a value select menu and text area (hidden by default) for trusted proxies. - */ - -$selectOptions = array( - array('value' => \WordfenceLS\Model_Request::IP_SOURCE_AUTOMATIC, 'label' => esc_html__('Use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites.', 'wordfence') . ' <strong>' . esc_html__('(Recommended)', 'wordfence') . '</strong>'), - array('value' => \WordfenceLS\Model_Request::IP_SOURCE_REMOTE_ADDR, 'label' => esc_html__('Use PHP\'s built in REMOTE_ADDR and don\'t use anything else. Very secure if this is compatible with your site.', 'wordfence')), - array('value' => \WordfenceLS\Model_Request::IP_SOURCE_X_FORWARDED_FOR, 'label' => esc_html__('Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'wordfence')), - array('value' => \WordfenceLS\Model_Request::IP_SOURCE_X_REAL_IP, 'label' => esc_html__('Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'wordfence')), -); -?> -<ul class="wfls-flex-vertical wfls-flex-full-width"> - <li> - <ul id="wfls-option-ip-source" class="wfls-option wfls-option-ip-source" data-option="<?php echo esc_attr(\WordfenceLS\Controller_Settings::OPTION_IP_SOURCE); ?>" data-original-value="<?php echo esc_attr(\WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_SOURCE)); ?>" data-text-area-option="<?php echo esc_attr(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES); ?>" data-original-text-area-value="<?php echo esc_attr(\WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES)); ?>"> - <li class="wfls-option-content wfls-no-right"> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li class="wfls-option-title"><strong><?php esc_html_e('How to get IPs', 'wordfence'); ?></strong></li> - <li> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li class="wfls-padding-add-left"> - <ul class="wfls-flex-vertical wfls-flex-align-left" role="radiogroup"> - <?php foreach ($selectOptions as $o): ?> - <li class="wfls-padding-add-top-small"><input type="radio" class="wfls-option-radio" name="wfls-ip-source" value="<?php echo esc_attr($o['value']); ?>" id="wfls-ip-source-<?php echo esc_attr(preg_replace('/[^a-z0-9]/i', '-', $o['value'])); ?>"<?php if ($o['value'] == \WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_SOURCE)) { echo ' checked'; } ?>><label for="wfls-ip-source-<?php echo esc_attr(preg_replace('/[^a-z0-9]/i', '-', $o['value'])); ?>">  </label><?php echo $o['label']; ?></li> - <?php endforeach; ?> - </ul> - </li> - <li class="wfls-option-ip-source-details wfls-padding-add-top"> - <div class="wfls-left">Detected IP(s): <span id="wfls-ip-source-preview-all"><?php echo \WordfenceLS\Model_Request::current()->detected_ip_preview(); ?></span></div> - <div class="wfls-left">Your IP with this setting: <span id="wfls-ip-source-preview-single"><?php echo esc_html(\WordfenceLS\Model_Request::current()->ip()); ?></span></div> - <div class="wfls-left"><a href="#" id="wfls-ip-source-trusted-proxies-show">+ Edit trusted proxies</a></div> - </li> - </ul> - </li> - </ul> - </li> - </ul> - </li> - <li id="wfls-ip-source-trusted-proxies"> - <ul id="wfls-option-ip-source-trusted-proxies" class="wfls-option wfls-option-textarea" data-text-option="<?php echo esc_attr(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES); ?>" data-original-text-value="<?php echo esc_attr(\WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES)); ?>"> - <li class="wfls-option-spacer"></li> - <li class="wfls-option-content wfls-no-right"> - <ul> - <li class="wfls-option-title"> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li><?php esc_html_e('Trusted Proxies', 'wordfence'); ?></li> - <li class="wfls-option-subtitle"><?php esc_html_e('These IPs (or CIDR ranges) will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header. Enter one IP or CIDR range per line.', 'wordfence'); ?></li> - </ul> - </li> - <li class="wfls-option-textarea"> - <textarea spellcheck="false" autocapitalize="none" autocomplete="off" name="howGetIPs_trusted_proxies"><?php echo esc_html(\WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES)); ?></textarea> - </li> - </ul> - </li> - </ul> - </li> -</ul> -<script type="application/javascript"> - (function($) { - $(function() { - var updateIPPreview = function() { - WFLS.updateIPPreview({ip_source: $('input[name="wfls-ip-source"]:checked').val(), ip_source_trusted_proxies: $('#wfls-ip-source-trusted-proxies textarea').val()}, function(ret) { - if (ret && ret.ip) { - $('#wfls-ip-source-preview-all').html(ret.preview); - $('#wfls-ip-source-preview-single').html(ret.ip); - } - }); - }; - - $('input[name="wfls-ip-source"]').on('change', function() { - var optionElement = $(this).closest('.wfls-option.wfls-option-ip-source'); - var option = optionElement.data('option'); - var value = $('input[name="wfls-ip-source"]:checked').val(); - - var originalValue = optionElement.data('originalValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - WFLS.updatePendingChanges(); - - updateIPPreview(); - }); - - var coalescingUpdateTimer; - $('#wfls-ip-source-trusted-proxies textarea').on('change paste keyup', function() { - var e = this; - - setTimeout(function() { - clearTimeout(coalescingUpdateTimer); - coalescingUpdateTimer = setTimeout(updateIPPreview, 1000); - - var optionElement = $(e).closest('.wfls-option.wfls-option-textarea'); - var option = optionElement.data('textOption'); - var value = $(e).val(); - - var originalValue = optionElement.data('originalTextValue'); - if (originalValue == value) { - delete WFLS.pendingChanges[option]; - } - else { - WFLS.pendingChanges[option] = value; - } - - WFLS.updatePendingChanges(); - }, 4); - }); - - $(window).on('wflsOptionsReset', function() { - $('input[name="wfls-ip-source"]').each(function() { - var optionElement = $(this).closest('.wfls-option.wfls-option-ip-source'); - var option = optionElement.data('option'); - var originalValue = optionElement.data('originalValue'); - - $(this).prop('checked', originalValue == $(this).attr('value')); - }); - - $('#wfls-ip-source-trusted-proxies textarea').each(function() { - var optionElement = $(this).closest('.wfls-option.wfls-option-textarea'); - var originalValue = optionElement.data('originalTextAreaValue'); - $(this).val(originalValue); - }); - - updateIPPreview(); - }); - - $('#wfls-ip-source-trusted-proxies-show').each(function() { - $(this).on('keydown', function(e) { - if (e.keyCode == 32) { - e.preventDefault(); - e.stopPropagation(); - - $(this).trigger('click'); - } - }); - - $(this).on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - var isActive = $('#wfls-ip-source-trusted-proxies').hasClass('wfls-active'); - if (isActive) { - $('#wfls-ip-source-trusted-proxies').slideUp({ - always: function() { - $('#wfls-ip-source-trusted-proxies').removeClass('wfls-active'); - } - }); - } - else { - $(this).parent().slideUp(); - $('#wfls-ip-source-trusted-proxies').slideDown({ - always: function() { - $('#wfls-ip-source-trusted-proxies').addClass('wfls-active'); - } - }); - } - }); - }); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-label.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-label.php deleted file mode 100644 index da28d24a..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-label.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents an option-styled text value. - * - * Expects $title (or $titleHTML) to be defined. $helpLink may also be defined. - * - * @var string $title The title shown for the option. - * @var string $titleHTML The raw HTML title shown for the option. This supersedes $title. - * @var string $helpLink If defined, the link to the corresponding external help page. - */ - -if (!isset($titleHTML)) { - $titleHTML = esc_html($title); -} -?> -<ul class="wfls-option wfls-option-label"> - <?php if (!isset($noSpacer) || !$noSpacer): ?> - <li class="wfls-option-spacer"></li> - <?php endif; ?> - <li class="wfls-option-content"> - <ul> - <li class="wfls-option-title"> - <?php if (isset($subtitle)): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <?php echo $titleHTML; ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitle)): ?> - </li> - <li class="wfls-option-subtitle"><?php echo esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-ntp.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-ntp.php deleted file mode 100644 index 120a3dde..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-ntp.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -$maxFailures = (int) \WordfenceLS\Controller_Time::FAILURE_LIMIT; -$cronDisabled = \WordfenceLS\Controller_Settings::shared()->is_ntp_cron_disabled($failureCount); -$id = 'wfls-option-ntp'; -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-flex-vertical wfls-flex-align-left"> - <li class="wfls-option-title"><strong><?php esc_html_e('NTP', 'wordfence') ?></strong></li> - <li class="wfls-option-content"> - <p><?php esc_html_e('NTP is a protocol that allows for remote time synchronization. Wordfence Login Security uses this protocol to ensure that it has the most accurate time which is necessary for TOTP-based two-factor authentication.', 'wordfence') ?></p> - <?php if (\WordfenceLS\Controller_Settings::shared()->is_ntp_disabled_via_constant()): ?> - <p><?php esc_html_e('The constant WORDFENCE_LS_DISABLE_NTP is defined which disables NTP entirely. Remove this constant or set it to a falsy value to enable NTP.', 'wordfence') ?></p> - <?php elseif ($cronDisabled): ?> - <?php if ($failureCount > 0): ?> - <p><strong><?php echo sprintf(esc_html__('NTP is currently disabled as %d subsequent attempts have failed.', 'wordfence'), $maxFailures) ?></strong></p> - <?php else: ?> - <p><?php esc_html_e('NTP was manually disabled.', 'wordfence') ?></p> - <?php endif ?> - <button id="wfls-reset-ntp-failure-count" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Reset', 'wordfence') ?></button> - <?php else: ?> - <p><?php echo wp_kses(__('NTP is currently <strong>enabled</strong>.', 'wordfence'), array('strong'=>array())); ?></p> - <?php if ($failureCount > 0): ?> - <?php $remainingAttempts = $maxFailures - $failureCount; ?> - <p> - <strong><?php esc_html_e('NTP updates are currently failing.', 'wordfence') ?></strong> - <?php echo $remainingAttempts > 0 ? sprintf(esc_html__('NTP will be automatically disabled after %d more attempts.', 'wordfence'), $remainingAttempts) : esc_html__('NTP will be automatically disabled after 1 more attempt.', 'wordfence') ?> - </p> - <?php endif ?> - <button id="wfls-disable-ntp" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Disable', 'wordfence') ?></button> - <?php endif ?> - </li> -</ul> -<script> - (function($) { - $(function() { - $('#wfls-reset-ntp-failure-count').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - function handleError(message) { - WFLS.panelModal( - (WFLS.screenSize(500) ? '300px' : '400px'), - '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Resetting NTP', 'wordfence')); ?>', - typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to reset the NTP state. Please try again.', 'wordfence')); ?>' : message - ); - } - - WFLS.ajax('wordfence_ls_reset_ntp_failure_count', [], - function(response) { - if (response.error) { - handleError(response.error); - } - else { - window.location.reload(); - } - }, - function (error) { - handleError(); - }); - }); - $('#wfls-disable-ntp').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - function handleError(message) { - WFLS.panelModal( - (WFLS.screenSize(500) ? '300px' : '400px'), - '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Disabling NTP', 'wordfence')); ?>', - typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to disable NTP. Please try again.', 'wordfence')); ?>' : message - ); - } - - WFLS.ajax('wordfence_ls_disable_ntp', [], - function(response) { - if (response.error) { - handleError(response.error); - } - else { - window.location.reload(); - } - }, - function (error) { - handleError(); - }); - }); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-roles.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-roles.php deleted file mode 100644 index ad061d52..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-roles.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -use WordfenceLS\Controller_Settings; -use WordfenceLS\Text\Model_JavaScript; - -$states = array( - Controller_Settings::STATE_2FA_DISABLED => __('Disabled', 'wordfence'), - Controller_Settings::STATE_2FA_OPTIONAL => __('Optional', 'wordfence'), - Controller_Settings::STATE_2FA_REQUIRED => __('Required', 'wordfence') -); - -$gracePeriod = Controller_Settings::shared()->get_int(Controller_Settings::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD, Controller_Settings::DEFAULT_REQUIRE_2FA_USER_GRACE_PERIOD); -$woocommerceIntegrationEnabled = Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION); - -$requiredRoles = array(); -foreach ($options as $option) { - if ($option['state'] === Controller_Settings::STATE_2FA_REQUIRED) { - $requiredRoles[$option['role']] = $option['title']; - } -} - -$customerRoleWarning = __('Requiring 2FA for customers is not recommended as some customers may experience difficulties setting up or using two-factor authentication. Instead, using the "Optional" mode for users with the customer role is recommended which will allow customers to enable 2FA, but will not require them to do so.', 'wordfence'); - -?> -<ul class="wfls-option wfls-option-2fa-roles"> - <li class="wfls-option-title"> - <label><?php esc_html_e('2FA Roles', 'wordfence') ?></label> - </li> - <li class="wfls-option-content"> - <ul> - <?php foreach ($options as $option): ?> - <?php $selectId = 'wfls-2fa-role-' . $option['name']; ?> - <li> - <label for="<?php echo esc_attr($selectId) ?>"><?php echo esc_html($option['title']) ?></label> - <select id="<?php echo esc_attr($selectId) ?>" name="<?php echo esc_attr($option['name']) ?>" class="wfls-option-select"> - <?php foreach ($states as $key => $label): ?> - <?php if (!$option['allow_disabling'] && $key === Controller_Settings::STATE_2FA_DISABLED) continue; ?> - <option - value="<?php echo esc_attr($key); ?>" - <?php if($option['state'] === $key): ?> selected<?php endif ?> - <?php if(!$option['editable']): ?> disabled<?php endif ?> - > - <?php echo esc_html($label) ?> - </option> - <?php endforeach ?> - </select> - </li> - <?php endforeach ?> - </ul> - <p id="wfls-customer-2fa-required-warning" class="wfls-notice" style="display: none;"><?php echo esc_html($customerRoleWarning) ?></p> - <?php if ($hasWoocommerce && !$woocommerceIntegrationEnabled): ?> - <p class="wfls-woocommerce-customer-integration-message"><small><?php esc_html_e('In order to use 2FA with the WooCommerce customer role, you must either enable the "WooCommerce integration" option or use the "wordfence_2fa_management" shortcode to provide customers with access to the 2FA management interface. The default interface is only available through WordPress admin pages which are not accessible to users in the customer role.', 'wordfence') ?></small></p> - <?php endif ?> - </li> - <li class="wfls-2fa-grace-period-container"> - <label for="wfls-2fa-grace-period" class="wfls-primary-label"><?php esc_html_e('Grace Period', 'wordfence') ?></label> - <input id="wfls-2fa-grace-period" type="text" pattern="[0-9]+" value="<?php echo (int)$gracePeriod; ?>" class="wfls-option-input wfls-option-input-required" name="<?php echo esc_html(Controller_Settings::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD) ?>" maxlength="2"> - <label for="wfls-2fa-grace-period"><?php esc_html_e('days', 'wordfence') ?></label> - <div id="wfls-grace-period-zero-warning" style="display: none;"> - <strong><?php esc_html_e('Setting the grace period to 0 will prevent users in roles where 2FA is required, including newly created users, from logging in if they have not already enabled two-factor authentication.', 'wordfence') ?></strong> - <a href="<?php echo esc_attr(\WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_ROLES)) ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence') ?></a> - </div> - <small><?php esc_html_e('For roles that require 2FA, users will have this many days to set up 2FA. Failure to set up 2FA during this period will result in the user losing account access. This grace period will apply to new users from the time of account creation. For existing users, this grace period will apply relative to the time at which the requirement is implemented. This grace period will not automatically apply to admins and must be manually enabled for each admin user.', 'wordfence') ?></small> - </li> - <?php if (!empty($requiredRoles)): ?> - <li class="wfls-2fa-notification-action"> - <h4><?php esc_html_e('2FA Notifications', 'wordfence') ?></h4> - <p> - <small><?php esc_html_e('Send an email to users with the selected role to notify them of the grace period for enabling 2FA. Select the desired role and optionally specify the URL to be sent in the email to setup 2FA. If left blank, the URL defaults to the standard wordpress login and Wordfence’s Two-Factor Authentication plugin page. For example, if using WooCommerce, input the relative URL of the account page.', 'wordfence') ?></small> - <a href="<?php echo \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA_NOTIFICATIONS) ?>" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="<?php echo \WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o'; ?>" aria-hidden="true"></i></a> - </p> - <div> - <label><?php esc_html_e('2FA Role', 'wordfence') ?></label> - <select id="wfls-grace-period-notification-role"> - <?php foreach ($requiredRoles as $role => $label): ?> - <option value="<?php echo esc_attr($role) ?>"><?php echo esc_html($label) ?></option> - <?php endforeach ?> - </select> - </div> - <div> - <label><?php esc_html_e('2FA Relative URL (optional)', 'wordfence') ?></label> - <input id="wfls-grace-period-notification-url" type="text" placeholder="ex: /my-account/"> - </div> - <button class="wfls-btn wfls-btn-default wfls-btn-sm" id="wfls-send-grace-period-notification"><?php esc_html_e('Notify', 'wordfence') ?></button> - </li> - <?php endif ?> -</ul> -<script> - (function($) { - function sendGracePeriodNotification(notifyAll) { - var request = { - role: $('#wfls-grace-period-notification-role').val(), - url: $('#wfls-grace-period-notification-url').val(), - }; - if (typeof notifyAll !== "undefined" && notifyAll) - request.notify_all = true; - WFLS.ajax('wordfence_ls_send_grace_period_notification', request, - function(response) { - if (response.error) { - var settings = { - additional_buttons: [] - }; - if (response.limit_exceeded) { - settings.additional_buttons.push({ - label: '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Send Anyway', 'wordfence')); ?>', - id: 'wfls-send-grace-period-notification-over-limit' - }); - } - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Sending Notification', 'wordfence')); ?>', response.error, settings); - } - else { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Notification Sent', 'wordfence')); ?>', response.confirmation); - } - if (request.notify_all) { - WFLS.panelClose(); - } - }, - function (error) { - WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Sending Notification', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to send the notification. Please try again.', 'wordfence')); ?>'); - if (request.notify_all) { - WFLS.panelClose(); - } - }); - } - $('#wfls-send-grace-period-notification').on('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - sendGracePeriodNotification(); - }); - $(document).on('click', '#wfls-send-grace-period-notification-over-limit', function() { - sendGracePeriodNotification(true); - $(this).prop("disabled", true); - }); - $('#wfls-2fa-grace-period').on('input', function(e) { - var value = $(this).val(); - value = value.replace(/[^0-9]/g, ''); - value = parseInt(value); - if (isNaN(value)) - value = ''; - if (value === 0) { - $("#wfls-grace-period-zero-warning").show(); - } - else { - $("#wfls-grace-period-zero-warning").hide(); - } - $(this).val(value); - }).trigger('input'); - var customerRoleInput = $('#wfls-2fa-role-enabled-roles\\.customer'); - function isCustomerRoleRequired() { - return customerRoleInput.val() === 'required'; - } - function toggleCustomerRoleWarning() { - $("#wfls-customer-2fa-required-warning").toggle(isCustomerRoleRequired()); - } - toggleCustomerRoleWarning(); - customerRoleInput.on('change', function(e) { - toggleCustomerRoleWarning(); - if (isCustomerRoleRequired()) { - WFLS.displayModalMessage( - <?php Model_JavaScript::echo_string_literal(__('Not Recommended', 'wordfence')) ?>, - <?php Model_JavaScript::echo_string_literal($customerRoleWarning) ?>, - [ - { - label: <?php Model_JavaScript::echo_string_literal(__('Make Optional', 'wordfence')) ?>, - id: 'wfls-customer-role-warning-revert', - type: 'primary' - }, - { - label: <?php Model_JavaScript::echo_string_literal(__('Proceed', 'wordfence')) ?>, - id: 'wfls-generic-modal-close', - type: 'danger' - } - ] - ); - } - }); - $('body').on('click', '#wfls-customer-role-warning-revert', function() { - customerRoleInput.val('optional').trigger('change'); - $('#wfls-generic-modal-close').trigger('click'); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-select.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-select.php deleted file mode 100644 index 763baf49..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-select.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents an option with a popup menu for detailed value selection. - * - * Expects $selectOptionName, $selectOptions, $selectValue, and $title to be defined. $helpLink may also be defined. - * - * @var string $selectOptionName The option name for the select portion. - * @var array $selectOptions An array of the possible values for $selectOptionName. The array is of the format array(array('value' => <the internal value>, 'label' => <a display label>), ...) - * @var string $selectValue The current value of $selectOptionName. - * @var string $title The title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $selectOptionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-select<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-select-option="<?php echo esc_attr($selectOptionName); ?>" data-original-select-value="<?php echo esc_attr($selectValue); ?>"> - <li class="wfls-option-spacer"></li> - <li class="wfls-option-content"> - <ul> - <li class="wfls-option-title"><span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li> - <li class="wfls-option-select wfls-padding-add-top-xs-small"> - <select<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($id); ?>-label"> - <?php foreach ($selectOptions as $o): ?> - <option class="wfls-option-select-option" value="<?php echo esc_attr($o['value']); ?>"<?php if ($o['value'] == $selectValue) { echo ' selected'; } ?>><?php echo esc_html($o['label']); ?></option> - <?php endforeach; ?> - </select> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-switch.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-switch.php deleted file mode 100644 index 1e37303e..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-switch.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a switch option. - * - * @var string $optionName The option name for the switch. Required. - * @var string $value The current value of $optionName. Required. - * @var string|\WordfenceLS\Text\Model_HTML $title The title shown for the option. Required. - * @var array $states An array of the possible states for the switch. The array matches the format array('value' => <value>, 'label' => <label>) Required. - * @var string $helpLink If defined, the link to the corresponding external help page. Optional. - * @var string $alignment If defined, controls the alignment of the switch control. Optional. - */ - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-switch" data-option-name="<?php echo esc_attr($optionName); ?>" data-original-value="<?php echo esc_attr($value); ?>"> - <?php if (!isset($noSpacer) || !$noSpacer): ?> - <li class="wfls-option-spacer"></li> - <?php endif; ?> - <li class="wfls-option-content wfls-no-right"> - <ul> - <li class="wfls-option-title"> - <?php if (isset($subtitle)): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($title); ?></span><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitle)): ?> - </li> - <li class="wfls-option-subtitle"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </li> - <li class="wfls-option-switch<?php if (isset($alignment)) { echo ' ' . $alignment; } ?> wfls-padding-add-top-xs-small"> - <ul class="wfls-switch" role="radiogroup" aria-labelledby="<?php echo esc_attr($id); ?>-label"> - <?php foreach ($states as $s): ?> - <li<?php if ($s['value'] == $value) { echo ' class="wfls-active"'; } ?> data-option-value="<?php echo esc_attr($s['value']); ?>" role="radio" aria-checked="<?php echo ($s['value'] == $value ? 'true' : 'false'); ?>" tabindex="0"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($s['label']); ?></li> - <?php endforeach; ?> - </ul> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-text.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-text.php deleted file mode 100644 index cd549226..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-text.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a text field option. - * - * Expects $textOptionName, $textValue, and $title to be defined. $placeholder and $helpLink may also be defined. - * - * @var string $textOptionName The option name for the text field. - * @var string $textValue The current value of $textOptionName. - * @var string $title The title shown for the option. - * @var string $placeholder If defined, the placeholder for the text field. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -if (!isset($placeholder)) { - $placeholder = ''; -} -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $textOptionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-text<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-text-option="<?php echo esc_attr($textOptionName); ?>" data-original-text-value="<?php echo esc_attr($textValue); ?>"> - <li class="wfls-option-spacer"></li> - <li class="wfls-option-content"> - <ul> - <li class="wfls-option-title"> - <?php if (isset($subtitle)): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitle)): ?> - </li> - <li class="wfls-option-subtitle"><?php echo esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </li> - <li class="wfls-option-text"> - <input type="text" value="<?php echo esc_attr($textValue); ?>" placeholder="<?php echo esc_attr($placeholder); ?>"<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($id); ?>-label"> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-textarea.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-textarea.php deleted file mode 100644 index c05032d7..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-textarea.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a text area option. - * - * Expects $textOptionName, $textValue, and $title to be defined. $helpLink, $premium, and $noSpacer may also be defined. - * - * @var string $textOptionName The option name for the text field. Required. - * @var string $textValue The current value of $textOptionName. Required. - * @var string|\WordfenceLS\Text\Model_HTML $title The title shown for the option. Required. - * @var string|\WordfenceLS\Text\Model_HTML $subtitle The title shown for the option. Optional. - * @var string $subtitlePosition The position for the subtitle: 'value' for below the value, 'title' for below the title. Optional. - * @var string $helpLink If defined, the link to the corresponding external help page. Optional. - * @var bool $noSpacer If defined and truthy, the spacer will be omitted. Optional. - */ - -if (!isset($subtitlePosition)) { //May be 'title' to appear below the title or 'value' to appear below the field - $subtitlePosition = 'title'; -} - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $textOptionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-textarea" data-text-option="<?php echo esc_attr($textOptionName); ?>" data-original-text-value="<?php echo esc_attr($textValue); ?>"> - <?php if (!isset($noSpacer) || !$noSpacer): ?> - <li class="wfls-option-spacer"></li> - <?php endif; ?> - <li class="wfls-option-content wfls-no-right"> - <ul> - <li class="wfls-option-title<?php if (isset($alignTitle)) { echo $alignTitle == 'top' ? ' wfls-option-title-top' : ($alignTitle == 'bottom' ? 'wfls-option-title-bottom' : ''); } ?>"> - <?php if (isset($subtitleHTML) && $subtitlePosition == 'title'): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($title); ?></span><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitle) && $subtitlePosition == 'title'): ?> - </li> - <li class="wfls-option-subtitle"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </li> - <li class="wfls-option-textarea"> - <?php if (isset($subtitle) && $subtitlePosition == 'value'): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left wfls-flex-full-width"> - <li> - <?php endif; ?> - <textarea aria-labelledby="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($textValue); ?></textarea> - <?php if (isset($subtitle) && $subtitlePosition == 'value'): ?> - </li> - <li class="wfls-option-subtitle"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-boolean-switch.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-boolean-switch.php deleted file mode 100644 index 36272405..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-boolean-switch.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a boolean option with a switch toggle control. - * - * Expects $optionName, $enabledValue, $disabledValue, $value, and $title to be defined. $helpLink may also be defined. - * - * @var string $optionName The option name. - * @var string $enabledValue The value to save in $option if the toggle is enabled. - * @var string $disabledValue The value to save in $option if the toggle is disabled. - * @var string $value The current value of $optionName. - * @var string $title The title shown for the option. - * @var string $htmlTitle The unescaped title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - * @var bool $disabled If defined and truthy, the option will start out disabled. - */ - -if (isset($subtitle) && !isset($subtitleHTML)) { - $subtitleHTML = esc_html($subtitle); -} - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-toggled-boolean-switch<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?><?php if (isset($disabled) && $disabled) { echo ' wfls-disabled'; } ?>" data-option="<?php echo esc_attr($optionName); ?>" data-enabled-value="<?php echo esc_attr($enabledValue); ?>" data-disabled-value="<?php echo esc_attr($disabledValue); ?>" data-original-value="<?php echo esc_attr($value == $enabledValue ? $enabledValue : $disabledValue); ?>"> - <li class="wfls-boolean-switch<?php echo ($value == $enabledValue ? ' wfls-active' : ''); ?>" role="checkbox" aria-checked="<?php echo ($value == $enabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($id); ?>-label"><a href="#" class="wfls-boolean-switch-handle"></a></li> - <li class="wfls-option-title"> - <?php if (isset($subtitleHTML)): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo (!empty($title)) ? esc_html($title) : ''; echo (!empty($htmlTitle)) ? wp_kses($htmlTitle, 'post') : ''; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitleHTML)): ?> - </li> - <li class="wfls-option-subtitle"><?php echo $subtitleHTML; ?></li> - </ul> - <?php endif; ?> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-multiple.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-multiple.php deleted file mode 100644 index 9dad9811..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-multiple.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents multiple boolean options under a single heading with a checkbox toggle control for each. - * - * @var array $options The options shown. The structure is defined below. Required. - * @var string|\WordfenceLS\Text\Model_HTML $title The overall title shown for the options. Required. - * @var string $helpLink The link to the corresponding external help page. Optional. - * @var bool $wrap Whether or not the options should be allowed to wrap. Optional, defaults to false. - * - * $options is an array of - * array( - * 'name' => string <option name>, - * 'enabledValue' => string <value saved if the toggle is enabled>, - * 'disabledValue' => string <value saved if the toggle is disabled>, - * 'value' => string <current value of the option>, - * 'title' => string|\Wordfence2FA\Text\Model_HTML <title displayed to label the checkbox>, - * 'editable' => bool Whether or not the option can be edited, defaults to true. - * ) - */ -?> -<ul class="wfls-option wfls-option-toggled-multiple"> - <li class="wfls-option-title"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($title); ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li> - <li class="wfls-option-checkboxes<?php if (isset($wrap) && $wrap) { echo ' wfls-option-checkboxes-wrap'; } ?>"> - <?php - foreach ($options as $o): - $id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $o['name']); - ?> - <ul id="<?php echo esc_attr($id); ?>" data-option="<?php echo esc_attr($o['name']); ?>" data-enabled-value="<?php echo esc_attr($o['enabledValue']); ?>" data-disabled-value="<?php echo esc_attr($o['disabledValue']); ?>" data-original-value="<?php echo esc_attr($o['value'] == $o['enabledValue'] ? $o['enabledValue'] : $o['disabledValue']); ?>"> - <li class="wfls-option-checkbox<?php echo ($o['value'] == $o['enabledValue'] ? ' wfls-checked' : ''); ?><?php echo (isset($o['editable']) && !$o['editable'] ? ' wfls-disabled' : ''); ?>" role="checkbox" aria-checked="<?php echo ($o['value'] == $o['enabledValue'] ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($id); ?>-label"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li> - <li id="<?php echo esc_attr($id); ?>-label" class="wfls-option-title"><?php echo esc_html($o['title']); ?></li> - </ul> - <?php endforeach; ?> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-segmented.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-segmented.php deleted file mode 100644 index d3ead436..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-segmented.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a boolean option with a checkbox toggle control. - * - * Expects $optionName, $enabledValue, $disabledValue, $value, and $title to be defined. $helpLink may also be defined. - * - * @var string $optionName The option name. - * @var string $enabledValue The value to save in $option if the toggle is enabled. - * @var string $disabledValue The value to save in $option if the toggle is disabled. - * @var string $value The current value of $optionName. - * @var string $title The title shown for the option. - * @var string $htmlTitle The unescaped title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-toggled-segmented<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-option="<?php echo esc_attr($optionName); ?>" data-enabled-value="<?php echo esc_attr($enabledValue); ?>" data-disabled-value="<?php echo esc_attr($disabledValue); ?>" data-original-value="<?php echo esc_attr($value == $enabledValue ? $enabledValue : $disabledValue); ?>"> - <li class="wfls-option-title"><?php echo (!empty($title)) ? esc_html($title) : ''; echo (!empty($htmlTitle)) ? wp_kses($htmlTitle, 'post') : ''; ?><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li> - <li class="wfls-option-segments"> - <?php - $onId = sanitize_key('wfls-segment-' . $optionName . '-on'); - $offId = sanitize_key('wfls-segment-' . $optionName . '-off'); - ?> - <input id="<?php echo esc_attr($onId) ?>" type="radio" name="<?php echo esc_attr($optionName) ?>" value="<?php echo esc_attr($enabledValue) ?>"<?php echo ($value == $enabledValue ? ' checked' : ''); ?><?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?>> - <label class="wfls-segment-first" for="<?php echo esc_attr($onId) ?>">On</label> - - <input id="<?php echo esc_attr($offId) ?>" type="radio" name="<?php echo esc_attr($optionName) ?>" value="<?php echo esc_attr($disabledValue) ?>"<?php echo ($value == $disabledValue ? ' checked' : ''); ?><?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?>> - <label class="wfls-segment-last" for="<?php echo esc_attr($offId) ?>">Off</label> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-select.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-select.php deleted file mode 100644 index 1c2bc814..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-select.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents an option with a boolean on/off toggle checkbox and popup menu for detailed value selection. - * - * Expects $toggleOptionName, $enabledToggleValue, $disabledToggleValue, $toggleValue, $selectOptionName, $selectOptions, $selectValue, and $title to be defined. $helpLink may also be defined. - * - * @var string $toggleOptionName The option name for the toggle portion. - * @var string $enabledToggleValue The value to save in $toggleOption if the toggle is enabled. - * @var string $disabledToggleValue The value to save in $toggleOption if the toggle is disabled. - * @var string $toggleValue The current value of $toggleOptionName. - * @var string $selectOptionName The option name for the select portion. - * @var array $selectOptions An array of the possible values for $selectOptionName. The array is of the format array(array('value' => <the internal value>, 'label' => <a display label>), ...) - * @var string $selectValue The current value of $selectOptionName. - * @var string $title The title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -$toggleID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $toggleOptionName); -$selectID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $selectOptionName); -?> -<ul class="wfls-option wfls-option-toggled-select<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-toggle-option="<?php echo esc_attr($toggleOptionName); ?>" data-enabled-toggle-value="<?php echo esc_attr($enabledToggleValue); ?>" data-disabled-toggle-value="<?php echo esc_attr($disabledToggleValue); ?>" data-original-toggle-value="<?php echo esc_attr($toggleValue == $enabledToggleValue ? $enabledToggleValue : $disabledToggleValue); ?>" data-select-option="<?php echo esc_attr($selectOptionName); ?>" data-original-select-value="<?php echo esc_attr($selectValue); ?>"> - <li id="<?php echo esc_attr($toggleID); ?>" class="wfls-option-checkbox<?php echo ($toggleValue == $enabledToggleValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($toggleValue == $enabledToggleValue ? 'true' : 'false'); ?>" tabindex="0"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li> - <li class="wfls-option-content"> - <ul id="<?php echo esc_attr($selectID); ?>"> - <li class="wfls-option-title"><span id="<?php echo esc_attr($selectID); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li> - <li class="wfls-option-select wfls-padding-add-top-xs-small"> - <select<?php echo ($toggleValue == $enabledToggleValue && !(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($selectID); ?>-label"> - <?php foreach ($selectOptions as $o): ?> - <option class="wfls-option-select-option" value="<?php echo esc_attr($o['value']); ?>"<?php if ($o['value'] == $selectValue) { echo ' selected'; } ?>><?php echo esc_html($o['label']); ?></option> - <?php endforeach; ?> - </select> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-sub.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-sub.php deleted file mode 100644 index 82355ef1..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-sub.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a boolean option with a checkbox toggle control and a sub-option toggle. - * - * Expects $optionName, $enabledValue, $disabledValue, $value, and $title to be defined for the primary option. $helpLink may also be defined. - * Expects $subOptionName, $subEnabledValue, $subDisabledValue, $subValue, and $subTitle to be defined for the sub-option. $subHelpLink may also be defined. - * - * @var string $optionName The option name. - * @var string $enabledValue The value to save in $optionName if the toggle is enabled. - * @var string $disabledValue The value to save in $optionName if the toggle is disabled. - * @var string $value The current value of $optionName. - * @var string $title The title shown for the option. - * @var string $htmlTitle The unescaped title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - * - * @var string $subOptionName The sub-option name. - * @var string $subEnabledValue The value to save in $subOptionName if the toggle is enabled. - * @var string $subDisabledValue The value to save in $subOptionName if the toggle is disabled. - * @var string $subValue The current value of $subOptionName. - * @var string $subTitle The title shown for the sub-option. - * @var string $subHtmlTitle The unescaped title shown for the sub-option. - * @var string $subHelpLink If defined, the link to the corresponding external help page for the sub-option. - * @var bool $subPremium If defined, the sub-option will be tagged as premium only and not allow its value to change for free users. - */ - -if (isset($title) && !isset($htmlTitle)) { - $htmlTitle = esc_html($title); -} - -if (isset($subTitle) && !isset($subHtmlTitle)) { - $subHtmlTitle = esc_html($subTitle); -} - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName); -$subID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $subOptionName); -?> -<ul class="wfls-flex-vertical wfls-flex-full-width"> - <li> - <ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-toggled<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-option="<?php echo esc_attr($optionName); ?>" data-enabled-value="<?php echo esc_attr($enabledValue); ?>" data-disabled-value="<?php echo esc_attr($disabledValue); ?>" data-original-value="<?php echo esc_attr($value == $enabledValue ? $enabledValue : $disabledValue); ?>"> - <li class="wfls-option-checkbox<?php echo ($value == $enabledValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($value == $enabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($id); ?>-label"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li> - <li class="wfls-option-title"> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo $htmlTitle; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - </li> - </ul> - </li> - <li class="wfls-option-sub"> - <ul id="<?php echo esc_attr($subID); ?>" class="wfls-option wfls-option-toggled<?php if (!wfConfig::p() && isset($subPremium) && $subPremium) { echo ' wfls-option-premium'; } ?>" data-option="<?php echo esc_attr($subOptionName); ?>" data-enabled-value="<?php echo esc_attr($subEnabledValue); ?>" data-disabled-value="<?php echo esc_attr($subDisabledValue); ?>" data-original-value="<?php echo esc_attr($subValue == $subEnabledValue ? $subEnabledValue : $subDisabledValue); ?>"> - <li class="wfls-option-checkbox<?php echo ($subValue == $subEnabledValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($subValue == $subEnabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($subID); ?>-label"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li> - <li class="wfls-option-title"> - <span id="<?php echo esc_attr($subID); ?>-label"><?php echo $subHtmlTitle; ?></span><?php if (!wfConfig::p() && isset($subPremium) && $subPremium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($subHelpLink)) { echo ' <a href="' . esc_attr($subHelpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - </li> - </ul> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-textarea.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-textarea.php deleted file mode 100644 index d4528ec1..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled-textarea.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents an option with a boolean on/off toggle checkbox and text area for detailed value entry. - * - * Expects $toggleOptionName, $enabledToggleValue, $disabledToggleValue, $toggleValue, $textAreaOptionName, $textAreaValue, and $title to be defined. $helpLink may also be defined. - * - * @var string $toggleOptionName The option name for the toggle portion. - * @var string $enabledToggleValue The value to save in $toggleOption if the toggle is enabled. - * @var string $disabledToggleValue The value to save in $toggleOption if the toggle is disabled. - * @var string $toggleValue The current value of $toggleOptionName. - * @var string $textAreaOptionName The option name for the text area portion. - * @var string $textAreaValue The current value of $textAreaOptionName. - * @var string $title The title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -$toggleID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $toggleOptionName); -$textAreaID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $textAreaOptionName); -?> -<ul class="wfls-option wfls-option-toggled-textarea<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-toggle-option="<?php echo esc_attr($toggleOptionName); ?>" data-enabled-toggle-value="<?php echo esc_attr($enabledToggleValue); ?>" data-disabled-toggle-value="<?php echo esc_attr($disabledToggleValue); ?>" data-original-toggle-value="<?php echo esc_attr($toggleValue == $enabledToggleValue ? $enabledToggleValue : $disabledToggleValue); ?>" data-text-area-option="<?php echo esc_attr($textAreaOptionName); ?>" data-original-text-area-value="<?php echo esc_attr($textAreaValue); ?>"> - <li id="<?php echo esc_attr($toggleID); ?>" class="wfls-option-checkbox<?php echo ($toggleValue == $enabledToggleValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($toggleValue == $enabledToggleValue ? 'true' : 'false'); ?>" tabindex="0"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true" aria-labelledby="<?php echo esc_attr($toggleID); ?>-label"></i></li> - <li class="wfls-option-title"><span id="<?php echo esc_attr($toggleID); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li> - <li id="<?php echo esc_attr($textAreaID); ?>" class="wfls-option-textarea"> - <select<?php echo ($toggleValue == $enabledToggleValue && !(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($toggleID); ?>-label"> - <textarea<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?>><?php echo esc_html($textAreaValue); ?></textarea> - </select> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled.php deleted file mode 100644 index abeedfcd..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-toggled.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents a boolean option with a checkbox toggle control. - * - * @var string $optionName The option name. Required. - * @var string $enabledValue The value to save in $option if the toggle is enabled. Required. - * @var string $disabledValue The value to save in $option if the toggle is disabled. Required. - * @var string $value The current value of $optionName. Required. - * @var string|\WordfenceLS\Text\Model_HTML $title The title shown for the option. Required. - * @var string|\WordfenceLS\Text\Model_HTML $subtitle The title shown for the option. Optional. - * @var string $helpLink If defined, the link to the corresponding external help page. Optional. - * @var bool $disabled If defined and truthy, the option will start out disabled. Optional. - * @var bool $child If true, this option will be rendered ar a child option. Optional. - */ - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-toggled<?php if (isset($disabled) && $disabled) { echo ' wfls-disabled'; } if (isset($child) && $child) { echo ' wfls-child-option'; }?>" data-option="<?php echo esc_attr($optionName); ?>" data-enabled-value="<?php echo esc_attr($enabledValue); ?>" data-disabled-value="<?php echo esc_attr($disabledValue); ?>" data-original-value="<?php echo esc_attr($value == $enabledValue ? $enabledValue : $disabledValue); ?>"> - <li class="wfls-option-checkbox<?php echo ($value == $enabledValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($value == $enabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($id); ?>-label"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li> - <li class="wfls-option-title"> - <?php if (isset($subtitle)): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($title); ?></span><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitle)): ?> - </li> - <li class="wfls-option-subtitle"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-token.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-token.php deleted file mode 100644 index d44e2800..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/options/option-token.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * Presents an option with a token field for value entry. - * - * Expects $tokenOptionName, $tokenValue, and $title to be defined. $helpLink may also be defined. - * - * @var string $tokenOptionName The option name. - * @var array $tokenValue The current value of $tokenOptionName. It will be JSON-encoded as an array of strings. - * @var string $title The title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $tokenOptionName); -?> -<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-token<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-token-option="<?php echo esc_attr($tokenOptionName); ?>" data-original-token-value="<?php echo esc_attr(json_encode($tokenValue)); ?>"> - <li class="wfls-option-spacer"></li> - <li class="wfls-flex-vertical wfls-flex-align-left"> - <div class="wfls-option-title"> - <?php if (isset($subtitle)): ?> - <ul class="wfls-flex-vertical wfls-flex-align-left"> - <li> - <?php endif; ?> - <span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?> - <?php if (isset($subtitle)): ?> - </li> - <li class="wfls-option-subtitle"><?php echo esc_html($subtitle); ?></li> - </ul> - <?php endif; ?> - </div> - <select multiple<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($id); ?>-label"> - <?php foreach ($tokenValue as $o): ?> - <option value="<?php echo esc_attr($o); ?>" selected><?php echo esc_html($o); ?></option> - <?php endforeach; ?> - </select> - <div class="wfls-option-token-tags"></div> - </li> -</ul> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/manage-embedded.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/manage-embedded.php deleted file mode 100644 index dfd9130e..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/manage-embedded.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -$assets = isset($assets) ? $assets : array(); -$scriptData = isset($scriptData) ? $scriptData : array(); - -$enabled = \WordfenceLS\Controller_Users::shared()->has_2fa_active($user); -$requires2fa = \WordfenceLS\Controller_Users::shared()->requires_2fa($user, $inGracePeriod, $requiredAt); -$lockedOut = $requires2fa && !$enabled; - -$containerClasses = 'wfls-flex-row ' . ($stacked ? 'wfls-flex-row-wrapped' : 'wfls-flex-row-wrappable wfls-flex-row-equal-heights'); -$columnClasses = 'wfls-flex-row wfls-flex-item-xs-100 ' . ($stacked ? '' : 'wfls-flex-row-equal-heights'); - -?> -<?php if (!empty($scriptData)): ?> - <script type="text/javascript"> - <?php foreach ($scriptData as $key => $data): ?> - var <?php echo $key ?> = <?php echo wp_json_encode($data); ?>; - <?php endforeach ?> - </script> -<?php endif ?> -<?php foreach ($assets as $asset): ?> - <?php $asset->renderInlineIfNotEnqueued(); ?> -<?php endforeach ?> -<div id="wfls-management-embedded"<?php if ($stacked): ?> class="stacked" <?php endif ?>> - <p><?php echo wp_kses(sprintf(__('Two-Factor Authentication, or 2FA, significantly improves login security for your account. Wordfence 2FA works with a number of TOTP-based apps like Google Authenticator, FreeOTP, and Authy. For a full list of tested TOTP-based apps, <a href="%s" target="_blank" rel="noopener noreferrer">click here</a>.', 'wordfence'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></p> - <div id="wfls-deactivation-controls" class="<?php echo $containerClasses ?>"<?php if (!$enabled) { echo ' style="display: none;"'; } ?>> - <!-- begin status content --> - <div class="<?php echo $columnClasses ?>"> - <?php - echo \WordfenceLS\Model_View::create('manage/deactivate', array( - 'user' => $user, - ))->render(); - ?> - </div> - <!-- end status content --> - <!-- begin regenerate codes --> - <div class="<?php echo $columnClasses ?>"> - <?php - echo \WordfenceLS\Model_View::create('manage/regenerate', array( - 'user' => $user, - 'remaining' => \WordfenceLS\Controller_Users::shared()->recovery_code_count($user), - ))->render(); - ?> - </div> - <!-- end regenerate codes --> - </div> - <div id="wfls-activation-controls" class="<?php echo $containerClasses ?><?php if (!$stacked): ?> wfls-no-bottom-column-margin<?php endif ?>"<?php if ($enabled) { echo ' style="display: none;"'; } ?>> - <?php - $initializationData = new \WordfenceLS\Model_2faInitializationData($user); - ?> - <!-- begin qr code --> - <div class="<?php echo $columnClasses ?><?php if (!$stacked): ?> wfls-col-sm-half-padding-right wfls-flex-item-sm-50<?php endif ?>"> - <?php - echo \WordfenceLS\Model_View::create('manage/code', array( - 'initializationData' => $initializationData - ))->render(); - ?> - </div> - <!-- end qr code --> - <!-- begin activation --> - <div class="<?php echo $columnClasses ?><?php if (!$stacked): ?> wfls-col-sm-half-padding-left wfls-flex-item-sm-50<?php endif ?>"> - <?php - echo \WordfenceLS\Model_View::create('manage/activate', array( - 'initializationData' => $initializationData - ))->render(); - ?> - </div> - <!-- end activation --> - </div> - <div id="wfls-grace-period-controls" class="<?php echo $containerClasses ?>"<?php if ($enabled || !($lockedOut || $inGracePeriod)) { echo ' style="display: none;"'; } ?>> - <div class="<?php echo $columnClasses ?> wfls-add-top"> - <?php - echo \WordfenceLS\Model_View::create('manage/grace-period', array( - 'user' => $user, - 'lockedOut' => $lockedOut, - 'gracePeriod' => $inGracePeriod, - 'requiredAt' => $requiredAt - ))->render(); - ?> - </div> - </div> - <?php - /** - * Fires after the main content of the activation page has been output. - */ - do_action('wfls_activation_page_footer'); - ?> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/manage.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/manage.php deleted file mode 100644 index daba48c9..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/manage.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -/** - * @var \WP_User $user The user being edited. Required. - * @var bool $canEditUsers Whether or not the viewer of the page can edit other users. Optional, defaults to false. - */ - -if (!isset($canEditUsers)) { - $canEditUsers = false; -} - -$ownAccount = false; -$ownUser = wp_get_current_user(); -if ($ownUser->ID == $user->ID) { - $ownAccount = true; -} - -$enabled = \WordfenceLS\Controller_Users::shared()->has_2fa_active($user); -$requires2fa = \WordfenceLS\Controller_Users::shared()->requires_2fa($user, $inGracePeriod, $requiredAt); -$lockedOut = $requires2fa && !$enabled; - -?> -<p><?php echo wp_kses(sprintf(__('Two-Factor Authentication, or 2FA, significantly improves login security for your website. Wordfence 2FA works with a number of TOTP-based apps like Google Authenticator, FreeOTP, and Authy. For a full list of tested TOTP-based apps, <a href="%s" target="_blank" rel="noopener noreferrer">click here</a>.', 'wordfence'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></p> -<?php if ($canEditUsers): ?> -<div id="wfls-editing-display" class="wfls-flex-row wfls-flex-row-xs-wrappable wfls-flex-row-equal-heights"> - <div class="wfls-block wfls-always-active wfls-flex-item-full-width wfls-add-bottom"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <strong><?php echo wp_kses(sprintf(__('Editing User:  %s <span class="wfls-text-plain">%s</span>', 'wordfence'), get_avatar($user->ID, 16, '', $user->user_login), \WordfenceLS\Text\Model_HTML::esc_html($user->user_login) . ($ownAccount ? ' ' . __('(you)', 'wordfence') : '')), array('span'=>array('class'=>array()))); ?></strong> - </div> - </div> - </div> - </div> -</div> -<?php endif; ?> -<div id="wfls-deactivation-controls" class="wfls-flex-row wfls-flex-row-wrappable wfls-flex-row-equal-heights"<?php if (!$enabled) { echo ' style="display: none;"'; } ?>> - <!-- begin status content --> - <div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <?php - echo \WordfenceLS\Model_View::create('manage/deactivate', array( - 'user' => $user, - ))->render(); - ?> - </div> - <!-- end status content --> - <!-- begin regenerate codes --> - <div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <?php - echo \WordfenceLS\Model_View::create('manage/regenerate', array( - 'user' => $user, - 'remaining' => \WordfenceLS\Controller_Users::shared()->recovery_code_count($user), - ))->render(); - ?> - </div> - <!-- end regenerate codes --> -</div> -<div id="wfls-activation-controls" class="wfls-flex-row wfls-flex-row-xs-wrappable wfls-flex-row-equal-heights"<?php if ($enabled) { echo ' style="display: none;"'; } ?>> - <?php - $initializationData = new \WordfenceLS\Model_2faInitializationData($user); - ?> - <!-- begin qr code --> - <div class="wfls-flex-row wfls-flex-row-equal-heights wfls-col-sm-half-padding-right wfls-flex-item-xs-100 wfls-flex-item-sm-50"> - <?php - echo \WordfenceLS\Model_View::create('manage/code', array( - 'initializationData' => $initializationData - ))->render(); - ?> - </div> - <!-- end qr code --> - <!-- begin activation --> - <div class="wfls-flex-row wfls-flex-row-equal-heights wfls-col-sm-half-padding-left wfls-flex-item-xs-100 wfls-flex-item-sm-50"> - <?php - echo \WordfenceLS\Model_View::create('manage/activate', array( - 'initializationData' => $initializationData - ))->render(); - ?> - </div> - <!-- end activation --> -</div> -<div id="wfls-grace-period-controls" class="wfls-flex-row wfls-flex-row-xs-wrappable wfls-flex-row-equal-heights"<?php if ($enabled || !($lockedOut || $inGracePeriod)) { echo ' style="display: none;"'; } ?>> - <div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100 wfls-add-top"> - <?php - echo \WordfenceLS\Model_View::create('manage/grace-period', array( - 'user' => $user, - 'lockedOut' => $lockedOut, - 'gracePeriod' => $inGracePeriod, - 'requiredAt' => $requiredAt - ))->render(); - ?> - </div> -</div> -<?php -/** - * Fires after the main content of the activation page has been output. - */ -do_action('wfls_activation_page_footer'); -$time = time(); -$correctedTime = \WordfenceLS\Controller_Time::time($time); -$tz = get_option('timezone_string'); -if (empty($tz)) { - $offset = get_option('gmt_offset'); - $tz = 'UTC' . ($offset >= 0 ? '+' . $offset : $offset); -} -?> -<?php if (\WordfenceLS\Controller_Permissions::shared()->can_manage_settings()): ?> -<p><?php esc_html_e('Server Time:', 'wordfence'); ?> <?php echo date('Y-m-d H:i:s', $time); ?> UTC (<?php echo \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $time) . ' ' . $tz; ?>)<br> - <?php esc_html_e('Browser Time:', 'wordfence'); ?> <script type="application/javascript">var date = new Date(); document.write(date.toUTCString() + ' (' + date.toString() + ')');</script><br> -<?php -if (\WordfenceLS\Controller_Settings::shared()->is_ntp_enabled()) { - echo esc_html__('Corrected Time (NTP):', 'wordfence') . ' ' . date('Y-m-d H:i:s', $correctedTime) . ' UTC (' . \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $correctedTime) . ' ' . $tz . ')<br>'; -} -else if (WORDFENCE_LS_FROM_CORE && $correctedTime != $time) { - echo esc_html__('Corrected Time (WF):', 'wordfence') . ' ' . date('Y-m-d H:i:s', $correctedTime) . ' UTC (' . \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $correctedTime) . ' ' . $tz . ')<br>'; -} -?> -<?php esc_html_e('Detected IP:', 'wordfence'); ?> <?php echo \WordfenceLS\Text\Model_HTML::esc_html(\WordfenceLS\Model_Request::current()->ip()); if (\WordfenceLS\Controller_Whitelist::shared()->is_whitelisted(\WordfenceLS\Model_Request::current()->ip())) { echo ' (' . esc_html__('allowlisted', 'wordfence') . ')'; } ?></p> -<?php endif; ?> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/page.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/page.php deleted file mode 100644 index bfe5c7ff..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/page.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -/** - * @var array $sections The content tabs, each element is an array of the syntax array('tab' => Model_Tab instance, 'title' => Title instance, 'content' => HTML content). Required. - */ -?> -<?php do_action('wfls_activation_page_header'); ?> -<div class="wrap wordfence-ls"> - <?php - if (\WordfenceLS\Controller_Permissions::shared()->can_manage_settings() && !\WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_DISMISSED_FRESH_INSTALL_MODAL) && !WORDFENCE_LS_FROM_CORE) { - echo \WordfenceLS\Model_View::create('onboarding/standalone-header')->render(); - } - ?> - <div class="wfls-container-fluid"> - <?php - $tabs = array_map(function($t) { return $t['tab']; }, $sections); - echo \WordfenceLS\Model_View::create('page/tabbar', array( - 'tabs' => $tabs, - ))->render(); - ?> - <div class="wfls-row"> - <div class="wfls-col-xs-12"> - <?php foreach ($sections as $s): ?> - <div id="<?php echo esc_attr($s['tab']->id); ?>" class="wfls-tab-content" data-title="<?php echo esc_attr($s['tab']->pageTitle); ?>"> - <?php - echo \WordfenceLS\Model_View::create('page/section-title', array( - 'title' => $s['title'], - ))->render(); - echo $s['content']; - ?> - </div> <!-- end <?php echo \WordfenceLS\Text\Model_HTML::esc_html($s['tab']->id); ?> block --> - <?php endforeach; ?> - </div> <!-- end content block --> - </div> <!-- end row --> - </div> <!-- end container --> -</div> diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/permission-denied.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/permission-denied.php deleted file mode 100644 index 34c98a5f..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/permission-denied.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -?> -<div> - <h2><?php esc_html_e('Permission Denied', 'wordfence') ?></h2> - <p><?php esc_html_e('You do not have permission to manage 2FA settings for your account.', 'wordfence') ?></p> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/role.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/role.php deleted file mode 100644 index bd62c4fe..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/role.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -?> -<?php if (is_multisite()): ?> - <p><em>(<?php esc_html_e('This page only shows users and roles on the main site of this network', 'wordfence') ?>)</em></p> -<?php endif ?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width wfls-add-bottom"> - <?php if ($requiredAt === false): ?> - <div class="wfls-block-content"> - <p><?php echo esc_html(sprintf(__('2FA is not required for the %s role', 'wordfence'), $roleTitle)) ?></p> - </div> - <?php elseif (empty($users)): ?> - <div class="wfls-block-content"> - <p> - <?php if ($page == 1): ?> - <?php echo esc_html(sprintf(__('No users found in the %s state for the %s role', 'wordfence'), $stateTitle, $roleTitle)) ?> - <?php else: ?> - <?php echo esc_html(sprintf(__('Page %d is out of range', 'wordfence'), $page)) ?> - <?php endif ?> - </p> - </div> - <?php else: ?> - <table class="wfls-table wfls-table-striped wfls-table-header-separators wfls-table-expanded wfls-no-bottom"> - <tr> - <th>User</th> - <th>Required Date</th> - </tr> - <?php foreach ($users as $user): ?> - <tr> - <th scope="row"><a href="<?php echo esc_attr(get_edit_user_link($user->user_id)) ?>#wfls-user-settings"><?php echo esc_html($user->user_login) ?></a></td> - <td> - <?php if ($user->required_at): ?> - <?php echo esc_html(\WordfenceLS\Controller_Time::format_local_time('F j, Y g:i A', $user->required_at)) ?> - <?php else: ?> - <?php esc_html_e('N/A', 'wordfence'); ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - <?php if ($page != 1 || !$lastPage): ?> - <tr> - <td colspan="2" class="wfls-center"> - <?php if ($page > 1): ?> - <a href="<?php echo esc_attr(add_query_arg($pageKey, $page-1) . "#$stateKey") ?>"><span class="dashicons dashicons-arrow-left-alt2"></span></a> - <?php endif ?> - <strong class="wfls-page-indicator"><?php esc_html_e('Page ', 'wordfence') ?><?php echo (int) $page ?></strong> - <?php if (!$lastPage): ?> - <a href="<?php echo esc_attr(add_query_arg($pageKey, $page+1) . "#$stateKey") ?>"><span class="dashicons dashicons-arrow-right-alt2"></span></a> - <?php endif ?> - </td> - </tr> - <?php endif ?> - </table> - <?php endif ?> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/section-title.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/section-title.php deleted file mode 100644 index a98f5dbf..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/section-title.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var \WordfenceLS\Page\Model_Title $title The page title parameters. - * @var bool $showIcon Whether or not to show the header icon. Optional, defaults to false. - */ -?> -<div class="wfls-section-title"> - <?php if (isset($showIcon) && $showIcon): ?> - <div class="wfls-header-icon wfls-hidden-xs"></div> - <?php endif; ?> - <h2 class="wfls-center-xs" id="section-title-<?php echo esc_attr($title->id); ?>"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($title->title); ?></h2> - <?php if ($title->helpURL !== null && $title->helpLink !== null): ?> - <span class="wfls-hidden-xs"><a href="<?php echo esc_url($title->helpURL); ?>" target="_blank" rel="noopener noreferrer" class="wfls-help-link"><?php echo \WordfenceLS\Text\Model_HTML::esc_html($title->helpLink); ?> <i class="<?php echo (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-external-link' : 'wfls-fa wfls-fa-external-link'); ?>" aria-hidden="true"></i></a></span> - <?php endif; ?> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/settings.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/settings.php deleted file mode 100644 index 411f6191..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/settings.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -?> -<div class="wfls-save-banner wfls-nowrap wfls-padding-add-right-responsive"> - <a href="#" id="wfls-cancel-changes" class="wfls-btn wfls-btn-sm wfls-btn-default wfls-disabled"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Changes" */ __('Cancel<span class="wfls-visible-sm-inline"> Changes</span>', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>  <a href="#" id="wfls-save-changes" class="wfls-btn wfls-btn-sm wfls-btn-primary wfls-disabled"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Changes" */ __('Save<span class="wfls-visible-sm-inline"> Changes</span>', 'wordfence'), array('span'=>array('class'=>array()))); ?></a> -</div> -<div id="wfls-settings" class="wfls-flex-row wfls-flex-row-wrappable wfls-flex-row-equal-heights"> - <!-- begin status content --> - <div id="wfls-user-stats" class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <?php - echo \WordfenceLS\Model_View::create('settings/user-stats', array( - 'counts' => \WordfenceLS\Controller_Users::shared()->get_detailed_user_counts_if_enabled(), - ))->render(); - ?> - </div> - <!-- end status content --> - <!-- begin options content --> - <div id="wfls-options"> - <?php - echo \WordfenceLS\Model_View::create('settings/options', array( - 'hasWoocommerce' => $hasWoocommerce - ))->render(); - ?> - </div> - <!-- end options content --> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/tabbar.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/page/tabbar.php deleted file mode 100644 index 471a6cf1..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/page/tabbar.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var array $tabs An array of Tab instances. Required. - */ -?> -<div class="wfls-row wfls-tab-container"> - <div class="wfls-col-xs-12"> - <div class="wp-header-end"></div> - <ul class="wfls-page-tabs"> - <li class="wfls-header-icon"></li> - <?php foreach ($tabs as $t): ?> - <?php - $a = $t->a; - if (!preg_match('/^https?:\/\//i', $a)) { - $a = '#top#' . urlencode($a); - } - ?> - <li class="wfls-tab" id="wfls-tab-<?php echo esc_attr($t->id); ?>" data-target="<?php echo esc_attr($t->id); ?>" data-page-title="<?php echo esc_attr($t->pageTitle); ?>"><a href="<?php echo esc_url($a); ?>"><?php echo esc_html($t->tabTitle); ?></a></li> - <?php endforeach; ?> - </ul> - </div> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/settings/options.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/settings/options.php deleted file mode 100644 index 0c3547d1..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/settings/options.php +++ /dev/null @@ -1,270 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -?> -<div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <h3><?php esc_html_e('2FA', 'wordfence'); ?></h3> - </div> - </div> - </div> - <div class="wfls-block-content"> - <ul class="wfls-block-list"> - <li> - <?php - $roles = new \WP_Roles(); - $options = array(); - if (is_multisite()) { - $options[] = array( - 'role' => 'super-admin', - 'name' => 'enabled-roles.super-admin', - 'title' => __('Super Administrator', 'wordfence'), - 'editable' => true, - 'allow_disabling' => false, - 'state' => \WordfenceLS\Controller_Settings::shared()->get_required_2fa_role_activation_time('super-admin') !== false ? 'required' : 'optional' - ); - } - - foreach ($roles->role_objects as $name => $r) { - /** @var \WP_Role $r */ - $options[] = array( - 'role' => $name, - 'name' => 'enabled-roles.' . $name, - 'title' => $roles->role_names[$name], - 'editable' => true, - 'allow_disabling' => (!is_multisite() && $name == 'administrator' ? false : true), - 'state' => \WordfenceLS\Controller_Settings::shared()->get_required_2fa_role_activation_time($name) !== false ? 'required' : ($r->has_cap(\WordfenceLS\Controller_Permissions::CAP_ACTIVATE_2FA_SELF) ? 'optional' : 'disabled') - ); - } - echo \WordfenceLS\Model_View::create('options/option-roles', array('options' => $options, 'hasWoocommerce' => $hasWoocommerce))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Allow remembering device for 30 days', 'wordfence') . '</strong>'), - 'subtitle' => __('If enabled, users with 2FA enabled may choose to be prompted for a code only once every 30 days per device.', 'wordfence'), - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-switch', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_XMLRPC_ENABLED, - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_XMLRPC_ENABLED) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Require 2FA for XML-RPC call authentication', 'wordfence') . '</strong>'), - 'subtitle' => __('If enabled, XML-RPC calls that require authentication will also require a valid 2FA code to be appended to the password. You must choose the "Skipped" option if you use the WordPress app, the Jetpack plugin, or other services that require XML-RPC.', 'wordfence'), - 'states' => array( - array('value' => '0', 'label' => __('Skipped', 'wordfence')), - array('value' => '1', 'label' => __('Required', 'wordfence')), - ), - 'noSpacer' => true, - 'alignment' => 'wfls-right', - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_ALLOW_XML_RPC, - 'enabledValue' => '0', - 'disabledValue' => '1', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ALLOW_XML_RPC) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Disable XML-RPC authentication', 'wordfence') . '</strong>'), - 'subtitle' => __('If disabled, XML-RPC requests that attempt authentication will be rejected, whether the user has 2FA enabled or not.', 'wordfence'), - ))->render(); - ?> - </li> - </ul> - </div> - </div> -</div> - -<div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <h3><?php esc_html_e('WooCommerce & Custom Integrations', 'wordfence'); ?></h3> - </div> - </div> - </div> - <div class="wfls-block-content"> - <ul class="wfls-block-list"> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('WooCommerce integration', 'wordfence') . '</strong>'), - 'subtitle' => __('When enabled, reCAPTCHA and 2FA prompt support will be added to WooCommerce login and registration forms in addition to the default WordPress forms. Testing WooCommerce forms after enabling this feature is recommended to ensure plugin compatibility.', 'wordfence'), - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Show Wordfence 2FA menu on WooCommerce Account page', 'wordfence') . '</strong>'), - 'subtitle' => __('When enabled, a Wordfence 2FA tab will be added to the WooCommerce account menu which will provide access for users to manage 2FA settings outside of the WordPress admin area. Testing the WooCommerce account interface after enabling this feature is recommended to ensure theme compatibility.', 'wordfence'), - 'helpLink' => \WordfenceLS\Controller_Support::supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_OPTION_WOOCOMMERCE_ACCOUNT_INTEGRATION), - 'disabled' => !\WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION), - 'child' => true - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_ENABLE_SHORTCODE, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_SHORTCODE) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('2FA management shortcode', 'wordfence') . '</strong>'), - 'subtitle' => __('When enabled, the "wordfence_2fa_management" shortcode may be used to provide access for users to manage 2FA settings on custom pages.', 'wordfence'), - 'helpLink' => \WordfenceLS\Controller_Support::supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_OPTION_SHORTCODE) - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_STACK_UI_COLUMNS, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->should_stack_ui_columns() ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Use single-column layout for WooCommerce/shortcode 2FA management interface', 'wordfence') . '</strong>'), - 'subtitle' => __('When enabled, the 2FA management interface embedded through the WooCommerce integration or via a shortcode will use a vertical stacked layout as opposed to horizontal columns. Adjust this setting as appropriate to match your theme. This may be overridden using the "stacked" attribute for individual shortcodes.', 'wordfence'), - 'helpLink' => \WordfenceLS\Controller_Support::supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_OPTION_STACK_UI_COLUMNS) - ))->render(); - ?> - </li> - </ul> - </div> - </div> -</div> - -<div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <h3><?php esc_html_e('reCAPTCHA', 'wordfence'); ?></h3> - </div> - </div> - </div> - <div class="wfls-block-content"> - <ul class="wfls-block-list"> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-captcha', array( - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-captcha-threshold', array( - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_CAPTCHA_TEST_MODE, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_CAPTCHA_TEST_MODE) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Run reCAPTCHA in test mode', 'wordfence') . '</strong>'), - 'subtitle' => __('While in test mode, reCAPTCHA will score login and registration requests but not actually block them. The scores will be recorded and can be used to select a human/bot threshold value.', 'wordfence'), - ))->render(); - ?> - </li> - </ul> - </div> - </div> -</div> - -<div class="wfls-flex-row wfls-flex-row-equal-heights wfls-flex-item-xs-100"> - <div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <h3><?php esc_html_e('General', 'wordfence'); ?></h3> - </div> - </div> - </div> - <div class="wfls-block-content"> - <ul class="wfls-block-list"> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-textarea', array( - 'textOptionName' => \WordfenceLS\Controller_Settings::OPTION_2FA_WHITELISTED, - 'textValue' => implode("\n", \WordfenceLS\Controller_Settings::shared()->whitelisted_ips()), - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Allowlisted IP addresses that bypass 2FA and reCAPTCHA', 'wordfence') . '</strong>'), - 'alignTitle' => 'top', - 'subtitle' => __('Allowlisted IPs must be placed on separate lines. You can specify ranges using the following formats: 127.0.0.1/24, 127.0.0.[1-100], or 127.0.0.1-127.0.1.100.', 'wordfence'), - 'subtitlePosition' => 'value', - 'noSpacer' => true, - ))->render(); - ?> - </li> - <?php if (!WORDFENCE_LS_FROM_CORE): ?> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-ip-source', array())->render(); - ?> - </li> - <?php endif; ?> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-ntp', array( - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_ENABLE_LOGIN_HISTORY_COLUMNS, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->are_login_history_columns_enabled() ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Show last login column on WP Users page', 'wordfence') . '</strong>'), - 'subtitle' => __('When enabled, the last login timestamp will be displayed for each user on the WP Users page. When used in conjunction with reCAPTCHA, the most recent score will also be displayed for each user.', 'wordfence'), - ))->render(); - ?> - </li> - <li> - <?php - echo \WordfenceLS\Model_View::create('options/option-toggled', array( - 'optionName' => \WordfenceLS\Controller_Settings::OPTION_DELETE_ON_DEACTIVATION, - 'enabledValue' => '1', - 'disabledValue' => '0', - 'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_DELETE_ON_DEACTIVATION) ? '1': '0', - 'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Delete Login Security tables and data on deactivation', 'wordfence') . '</strong>'), - 'subtitle' => __('If enabled, all settings and 2FA records will be deleted on deactivation. If later reactivated, all users that previously had 2FA active will need to set it up again.', 'wordfence'), - ))->render(); - ?> - </li> - </ul> - </div> - </div> -</div> - -<script type="text/javascript"> - (function($) { - $('#wfls-option-enable-woocommerce-integration').on('change', function() { - $('#wfls-option-enable-woocommerce-account-integration').toggleClass('wfls-disabled', !$(this).find('.wfls-option-checkbox').hasClass('wfls-checked')); - }); - })(jQuery); -</script> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/settings/user-stats.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/settings/user-stats.php deleted file mode 100644 index e1e32387..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/settings/user-stats.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } -/** - * @var ?array $counts The counts to display or null to hide user counts. - */ -?> -<div class="wfls-block wfls-always-active wfls-flex-item-full-width"> - <div class="wfls-block-header wfls-block-header-border-bottom"> - <div class="wfls-block-header-content"> - <div class="wfls-block-title"> - <h3><?php esc_html_e('User Summary', 'wordfence'); ?></h3> - </div> - </div> - <div class="wfls-block-header-action wfls-block-header-action-text wfls-nowrap wfls-padding-add-right-responsive"> - <a href="users.php"><?php esc_html_e('Manage Users', 'wordfence'); ?></a> - </div> - </div> - <?php if (is_array($counts)) : ?> - <div class="wfls-block-content wfls-padding-no-left wfls-padding-no-right"> - <table class="wfls-table wfls-table-striped wfls-table-header-separators wfls-table-expanded wfls-no-bottom"> - <thead> - <tr> - <th><?php esc_html_e('Role', 'wordfence'); ?></th> - <th class="wfls-center"><?php esc_html_e('Total Users', 'wordfence'); ?></th> - <th class="wfls-center"><?php esc_html_e('2FA Active', 'wordfence'); ?></th> - <th class="wfls-center"><?php esc_html_e('2FA Inactive', 'wordfence'); ?></th> - </tr> - </thead> - <tbody> - <?php - $roles = new WP_Roles(); - $roleNames = $roles->get_names(); - $roleNames['super-admin'] = __('Super Administrator', 'wordfence'); - $roleNames[\WordfenceLS\Controller_Users::TRUNCATED_ROLE_KEY] = __('Custom Capabilities / Multiple Roles', 'wordfence'); - foreach ($counts['avail_roles'] as $roleTag => $count): - $activeCount = (isset($counts['active_avail_roles'][$roleTag]) ? $counts['active_avail_roles'][$roleTag] : 0); - $inactiveCount = $count - $activeCount; - if ($activeCount === 0 && $inactiveCount === 0) - continue; - $roleName = $roleNames[$roleTag]; - $requiredAt = \WordfenceLS\Controller_Settings::shared()->get_required_2fa_role_activation_time($roleTag); - $inactive = $inactiveCount > 0 && $requiredAt !== false; - $viewUsersBaseUrl = 'admin.php?' . http_build_query(array('page' => 'WFLS', 'role'=> $roleTag)); - ?> - <tr> - <td><?php echo \WordfenceLS\Text\Model_HTML::esc_html(translate_user_role($roleName)); ?></td> - <td class="wfls-center"><?php echo number_format($count); ?></td> - <td class="wfls-center"><?php echo number_format($activeCount); ?></td> - <td class="wfls-center"> - <?php if ($inactive): ?><a href="<?php echo esc_attr(is_multisite() ? network_admin_url($viewUsersBaseUrl) : admin_url($viewUsersBaseUrl)); ?>"><?php endif ?> - <?php echo number_format($inactiveCount); ?> - <?php if ($inactive): ?> (<?php esc_html_e('View users', 'wordfence') ?>)</a><?php endif ?> - </td> - </tr> - <?php endforeach; ?> - </tbody> - <tfoot> - <tr> - <th><?php esc_html_e('Total', 'wordfence'); ?></th> - <th class="wfls-center"><?php echo number_format($counts['total_users']); ?></th> - <th class="wfls-center"><?php echo number_format($counts['active_total_users']); ?></th> - <th class="wfls-center"><?php echo number_format($counts['total_users'] - $counts['active_total_users']); ?></th> - </tr> - <?php if (is_multisite()): ?> - <tr> - <td colspan="4" class="wfls-text-small"><?php esc_html_e('* User counts currently only reflect the main site on multisite installations.', 'wordfence'); ?></td> - </tr> - <?php endif; ?> - </tfoot> - </table> - </div> - <?php else: ?> - <div class="wfls-block-content wfls-padding-add-bottom"> - <p><?php $counts === null ? esc_html_e('User counts are hidden by default on sites with large numbers of users in order to improve performance.', 'wordfence') : esc_html_e('User counts are currently disabled as the most recent attempt to count users failed to complete successfully.', 'wordfence') ?></p> - <a href="<?php echo esc_attr(add_query_arg('wfls-show-user-counts', 'true') . '#top#settings') ?>" class="wfls-btn wfls-btn-sm wfls-btn-primary"<?php if (\WordfenceLS\Controller_Users::shared()->should_force_user_counts()): ?> onclick="window.location.reload()"<?php endif ?>><?php $counts === null ? esc_html_e('Show User Counts', 'wordfence') : esc_html_e('Try Again', 'wordfence') ?></a> - </div> - <?php endif ?> -</div> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/views/user/grace-period-toggle.php b/wp/wp-content/plugins/wordfence/modules/login-security/views/user/grace-period-toggle.php deleted file mode 100644 index 5c5a903c..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/views/user/grace-period-toggle.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -if (!defined('WORDFENCE_LS_VERSION')) { exit; } - -?> -<table id="wfls-grace-period-toggle-container" style="display: none"> - <tr> - <th scope="row"><label for="wfls-grace-period-toggle"><?php esc_html_e('2FA Grace Period', 'wordfence') ?></label></th> - <td> - <input id="wfls-grace-period-toggle" name="wfls-grace-period-toggle" type="checkbox"> - <label for="wfls-grace-period-toggle"><?php esc_html_e('Allow a grace period for this user prior to requiring Wordfence 2FA', 'wordfence') ?></label> - </td> - </tr> -</table> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/modules/login-security/wordfence-login-security.php b/wp/wp-content/plugins/wordfence/modules/login-security/wordfence-login-security.php deleted file mode 100644 index f8089091..00000000 --- a/wp/wp-content/plugins/wordfence/modules/login-security/wordfence-login-security.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -if (defined('WP_INSTALLING') && WP_INSTALLING) { return; } -if (!defined('ABSPATH')) { exit; } - -$wfCoreActive = false; -$plugins = (array) get_option('active_plugins', array()); //Used in lieu of is_plugin_active since that's not loaded until admin_init -if (is_multisite()) { - $sitePlugins = array_keys((array) get_site_option('active_sitewide_plugins', array())); - $plugins = array_merge($plugins, $sitePlugins); -} - -$wfVersion = ((is_multisite() && function_exists('get_network_option')) ? get_network_option(null, 'wordfence_version', false) : get_option('wordfence_version', false)); -if (version_compare($wfVersion, '7.3.1', '>=')) { - foreach ($plugins as $p) { - if (preg_match('~^wordfence[^/]*/wordfence\.php$~i', $p)) { - $wfCoreActive = true; - break; - } - } -} - -if ($wfCoreActive && !(isset($wfCoreLoading) && $wfCoreLoading)) { - return; //Wordfence core will load this, prevent the standalone one from also loading if active -} -else { - define('WORDFENCE_LS_FROM_CORE', ($wfCoreActive && isset($wfCoreLoading) && $wfCoreLoading)); - - define('WORDFENCE_LS_VERSION', '1.1.8'); - define('WORDFENCE_LS_BUILD_NUMBER', '1704213472'); - - define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__)); - - if (!defined('WORDFENCE_LS_EMAIL_VALIDITY_DURATION_MINUTES')) { define('WORDFENCE_LS_EMAIL_VALIDITY_DURATION_MINUTES', 15); } - - if (!WORDFENCE_LS_FROM_CORE) { - global $wp_plugin_paths; - foreach ($wp_plugin_paths as $dir => $realdir) { - if (strpos(__FILE__, $realdir) === 0) { - define('WORDFENCE_LS_FCPATH', $dir . '/' . basename(__FILE__)); - define('WORDFENCE_LS_PATH', trailingslashit($dir)); - break; - } - } - } - - if (!defined('WORDFENCE_LS_FCPATH')) { - /** @noinspection PhpConstantReassignmentInspection */ - define('WORDFENCE_LS_FCPATH', __FILE__); - /** @noinspection PhpConstantReassignmentInspection */ - define('WORDFENCE_LS_PATH', trailingslashit(dirname(WORDFENCE_LS_FCPATH))); - } - - if (!function_exists('wordfence_ls_autoload')) { - function wordfence_ls_autoload($class) { - $class = str_replace('\\', '/', $class); - $class = str_replace('\\\\', '/', $class); - $components = explode('/', $class); - if (count($components) < 2) { - return false; - } - - if ($components[0] != 'WordfenceLS') { - return false; - } - - $path = ''; - for ($i = 1; $i < count($components) - 1; $i++) { - $path .= '/' . strtolower($components[$i]); - } - - if (preg_match('/^(Controller|Model|Utility)_([a-z0-9]+)$/i', $components[count($components) - 1], $matches)) { - $path = dirname(__FILE__) . '/classes/' . strtolower($matches[1]) . $path . '/' . strtolower($matches[2]) . '.php'; - if (file_exists($path)) { - require_once($path); - return true; - } - } - - return false; - } - } - - if (!defined('WORDFENCE_LS_AUTOLOADER_REGISTERED')) { - define('WORDFENCE_LS_AUTOLOADER_REGISTERED', true); - spl_autoload_register('wordfence_ls_autoload'); - } - - if (!defined('WORDFENCE_LS_VERSIONONLY_MODE') && (!defined('WORDFENCE_USE_LEGACY_2FA') || (defined('WORDFENCE_USE_LEGACY_2FA') && !WORDFENCE_USE_LEGACY_2FA))) { //Used to get version from file - \WordfenceLS\Controller_WordfenceLS::shared()->init(); - } -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/readme.txt b/wp/wp-content/plugins/wordfence/readme.txt deleted file mode 100644 index e4d4f179..00000000 --- a/wp/wp-content/plugins/wordfence/readme.txt +++ /dev/null @@ -1,1425 +0,0 @@ -=== Wordfence Security - Firewall, Malware Scan, and Login Security === -Contributors: mmaunder, wfryan, wfmatt, wfmattr -Tags: security, waf, malware, 2fa, two factor, login security, firewall, brute force, scanner, scan, web application firewall, protection, stop hackers, prevent hacks, secure wordpress, wordpress security -Requires at least: 3.9 -Requires PHP: 5.5 -Tested up to: 6.4 -Stable tag: 7.11.1 -License: GPLv3 -License URI: https://www.gnu.org/licenses/gpl-3.0.html - -Firewall, Malware Scanner, Two Factor Auth and Comprehensive Security Features, powered by our 24 hour team. Make security a priority with Wordfence. - -== Description == - -### THE MOST POPULAR WORDPRESS FIREWALL & SECURITY SCANNER - -WordPress security requires a team of dedicated analysts researching the latest malware variants and WordPress exploits, turning them into firewall rules and malware signatures, and releasing those to customers in real-time. Wordfence is widely acknowledged as the number one WordPress security research team in the World. Our plugin provides a comprehensive suite of security features, and our team's research is what powers our plugin and provides the level of security that we are known for. - -At Wordfence, WordPress security isn't a division of our business - WordPress security is all we do. We employ a global 24 hour dedicated incident response team that provides our priority customers with a 1 hour response time for any security incident. The sun never sets on our global security team and we run a sophisticated threat intelligence platform to aggregate, analyze and produce ground breaking security research on the newest security threats. - -Wordfence Security includes an endpoint firewall, malware scanner, robust login security features, live traffic views, and more. Our Threat Defense Feed arms Wordfence with the newest firewall rules, malware signatures and malicious IP addresses it needs to keep your website safe. Rounded out by 2FA and a suite of additional features, Wordfence is the most comprehensive WordPress security solution available. - -#### WORDPRESS FIREWALL -* Web Application Firewall identifies and blocks malicious traffic. Built and maintained by a large team focused 100% on WordPress security. -* [Premium] Real-time firewall rule and malware signature updates via the Threat Defense Feed (free version is delayed by 30 days). -* [Premium] Real-time IP Blocklist blocks all requests from the most malicious IPs, protecting your site while reducing load. -* Protects your site at the endpoint, enabling deep integration with WordPress. Unlike cloud alternatives does not break encryption, cannot be bypassed and cannot leak data. -* Integrated malware scanner blocks requests that include malicious code or content. -* Protection from brute force attacks by limiting login attempts. - -#### WORDPRESS SECURITY SCANNER -* Malware scanner checks core files, themes and plugins for malware, bad URLs, backdoors, SEO spam, malicious redirects and code injections. -* [Premium] Real-time malware signature updates via the Threat Defense Feed (free version is delayed by 30 days). -* Compares your core files, themes and plugins with what is in the WordPress.org repository, checking their integrity and reporting any changes to you. -* Repair files that have changed by overwriting them with a pristine, original version. Delete any files that don’t belong easily within the Wordfence interface. -* Checks your site for known security vulnerabilities and alerts you to any issues. Also alerts you to potential security issues when a plugin has been closed or abandoned. -* Checks your content safety by scanning file contents, posts and comments for dangerous URLs and suspicious content. -* [Premium] Checks to see if your site or IP have been blocklisted for malicious activity, generating spam or other security issue. - -#### LOGIN SECURITY -* Two-factor authentication (2FA), one of the most secure forms of remote system authentication available via any TOTP-based authenticator app or service. -* Login Page CAPTCHA stops bots from logging in. -* Disable or add 2FA to XML-RPC. -* Block logins for administrators using known compromised passwords. - -#### WORDFENCE CENTRAL -* Wordfence Central is a powerful and efficient way to manage the security for multiple sites in one place. -* Efficiently assess the security status of all your websites in one view. View detailed security findings without leaving Wordfence Central. -* Powerful templates make configuring Wordfence a breeze. -* Highly configurable alerts can be delivered via email, SMS or Slack. Improve the signal to noise ratio by leveraging severity level options and a daily digest option. -* Track and alert on important security events including administrator logins, breached password usage and surges in attack activity. -* Free to use for unlimited sites. - -#### SECURITY TOOLS -* With Live Traffic, monitor visits and hack attempts not shown in other analytics packages in real time; including origin, their IP address, the time of day and time spent on your site. -* Block attackers by IP or build advanced rules based on IP Range, Hostname, User Agent and Referrer. -* Country blocking available with Wordfence Premium. - -== Installation == - -Secure your website using the following steps to install Wordfence: - -1. Install Wordfence automatically or by uploading the ZIP file. -2. Activate the Wordfence through the 'Plugins' menu in WordPress. Wordfence is now activated. -3. Go to the scan menu and start your first scan. Scheduled scanning will also be enabled. -4. Once your first scan has completed, a list of threats will appear. Go through them one by one to secure your site. -5. Visit the Wordfence options page to enter your email address so that you can receive email security alerts. -6. Optionally, change your security level or adjust the advanced options to set individual scanning and protection options for your site. -7. Click the "Live Traffic" menu option to watch your site activity in real-time. Situational awareness is an important part of website security. - -To install Wordfence on WordPress Multi-Site installations: - -1. Install Wordfence via the plugin directory or by uploading the ZIP file. -2. Network Activate Wordfence. This step is important because until you network activate it, your sites will see the plugin option on their plugins menu. Once activated that option disappears. -3. Now that Wordfence is network activated it will appear on your Network Admin menu. Wordfence will not appear on any individual site's menu. -4. Go to the "Scan" menu and start your first scan. -5. Wordfence will do a scan of all files in your WordPress installation including those in the blogs.dir directory of your individual sites. -6. Live Traffic will appear for ALL sites in your network. If you have a heavily trafficked system you may want to disable live traffic which will stop logging to the DB. -7. Firewall rules and login rules apply to the WHOLE system. So if you fail a login on site1.example.com and site2.example.com it counts as 2 failures. Crawler traffic is counted between blogs, so if you hit three sites in the network, all the hits are totalled and that counts as the rate you're accessing the system. - -== Frequently Asked Questions == - -[Visit our website to access our official documentation which includes security feature descriptions, common solutions and comprehensive help.](https://wordfence.com/help/) - -= How does Wordfence Security protect sites from attackers? = - -The WordPress security plugin provides the best protection available for your website. Powered by the constantly updated Threat Defense Feed, Wordfence Firewall stops you from getting hacked. Wordfence Scan leverages the same proprietary feed, alerting you quickly about security issues or if your site is compromised. The Live Traffic view gives you real-time visibility into traffic and hack attempts on your website. A deep set of additional tools round out the most comprehensive WordPress security solution available. - -= What features does Wordfence Premium enable? = - -We offer a Premium API key that gives you real-time updates to the Threat Defense Feed which includes a real-time IP blocklist, firewall rules, and malware signatures. Premium support, country blocking, more frequent scans, and spam and spamvertising checks are also included. [Click here to sign-up for Wordfence Premium now](http://www.wordfence.com/) or simply install Wordfence free and start protecting your website. - -= How does the Wordfence WordPress Firewall protect websites? = - -* Web Application Firewall stops you from getting hacked by identifying malicious traffic, blocking attackers before they can access your website. -* Threat Defense Feed automatically updates firewall rules that protect you from the latest threats. Premium members receive the real-time version. -* Block common WordPress security threats like fake Googlebots, malicious scans from hackers and botnets. - -= What checks does the Wordfence Security Scanner perform? = - -* Scans core files, themes and plugins against WordPress.org repository versions to check their integrity. Verify security of your source. -* See how files have changed. Optionally repair changed files that are security threats. -* Scans for signatures of over 44,000 known malware variants that are known WordPress security threats. -* Scans for many known backdoors that create security holes including C99, R57, RootShell, Crystal Shell, Matamu, Cybershell, W4cking, Sniper, Predator, Jackal, Phantasma, GFS, Dive, Dx and many more. -* Continuously scans for malware and phishing URL’s including all URLs on the Google Safe Browsing List in all your comments, posts and files that are security threats. -* Scans for heuristics of backdoors, trojans, suspicious code and other security issues. - -= What security monitoring features does Wordfence include? = - -* See all your traffic in real-time, including robots, humans, 404 errors, logins and logouts and who is consuming most of your content. Enhances your situational awareness of which security threats your site is facing. -* A real-time view of all traffic including automated bots that often constitute security threats that Javascript analytics packages never show you. -* Real-time traffic includes reverse DNS and city-level geolocation. Know which geographic area security threats originate from. -* Monitors disk space which is related to security because many DDoS attacks attempt to consume all disk space to create denial of service. - -= What login security features are included = - -* See all your traffic in real-time, including robots, humans, 404 errors, logins and logouts and who is consuming most of your content. Enhances your situational awareness of which security threats your site is facing. -* A real-time view of all traffic including automated bots that often constitute security threats that Javascript analytics packages never show you. -* Real-time traffic includes reverse DNS and city-level geolocation. Know which geographic area security threats originate from. -* Monitors disk space which is related to security because many DDoS attacks attempt to consume all disk space to create denial of service. - -= How will I be alerted if my site has a security problem? = - -Wordfence sends security alerts via email. Once you install Wordfence, you will configure a list of email addresses where security alerts will be sent. When you receive a security alert, make sure you deal with it promptly to ensure your site stays secure. - -= Do I need a security plugin like Wordfence if I’m using a cloud based firewall (WAF)? = - -Wordfence provides true endpoint security for your WordPress website. Unlike cloud based firewalls, Wordfence executes within the WordPress environment, giving it knowledge like whether the user is signed in, their identity and what access level they have. Wordfence uses the user’s access level in more than 80% of the firewall rules it uses to protect WordPress websites. Learn more about the [Cloud WAF identity problem here](https://www.wordfence.com/blog/2016/10/endpoint-vs-cloud-security-cloud-waf-user-identity-problem/). Additionally, cloud based firewalls can be bypassed, leaving your site exposed to attackers. Because Wordfence is an integral part of the endpoint (your WordPress website), it can’t be bypassed. Learn more about the [Cloud WAF bypass problem here](https://www.wordfence.com/blog/2016/10/endpoint-vs-cloud-security-cloud-waf-bypass-problem/). To fully protect the investment you’ve made in your website you need to employ a defense in depth approach to security. Wordfence takes this approach. - -= What blocking features does Wordfence include? = - -* Real-time blocking of known attackers. If another site using Wordfence is attacked and blocks the attacker, your site is automatically protected. -* Block entire malicious networks. Includes advanced IP and Domain WHOIS to report malicious IP’s or networks and block entire networks using the firewall. Report WordPress security threats to network owner. -* Rate limit or block WordPress security threats like aggressive crawlers, scrapers and bots doing security scans for vulnerabilities in your site. -* Choose whether you want to block or throttle users and robots who break your WordPress security rules. -* Premium users can also block countries and schedule scans for specific times and a higher frequency. - -= What differentiates Wordfence from other WordPress Security plugins? = - -* Wordfence Security provides a WordPress Firewall developed specifically for WordPress and blocks attackers looking for vulnerabilities on your site. The Firewall is powered by our Threat Defense Feed which is continually updated as new threats emerge. Premium customers receive updates in real-time. -* Wordfence verifies your website source code integrity against the official WordPress repository and shows you the changes. -* Wordfence scans check all your files, comments and posts for URLs in Google's Safe Browsing list. We are the only plugin to offer this very important security enhancement. -* Wordfence scans do not consume large amounts of your bandwidth because all security scans happen on your web server which makes them very fast. -* Wordfence fully supports WordPress Multi-Site which means you can security scan every blog in your Multi-Site installation with one click. -* Wordfence includes Two-Factor authentication, the most secure way to stop brute force attackers in their tracks. -* Wordfence fully supports IPv6 including giving you the ability to look up the location of IPv6 addresses, block IPv6 ranges, detect IPv6 country and do a whois lookup on IPv6 addresses and more. - -= Will Wordfence slow down my website? = - -No. Wordfence Security is extremely fast and uses techniques like caching its own configuration data to avoid database lookups and blocking malicious attacks that would slow down your site. - -= What if my site has already been hacked? = - -Wordfence Security is able to repair core files, themes and plugins on sites where security is already compromised. You can follow this guide on [how to clean a hacked website using Wordfence](https://www.wordfence.com/docs/how-to-clean-a-hacked-wordpress-site-using-wordfence/). If you are cleaning your own site after a hack, note that site security cannot be assured unless you do a full reinstall if your site has been hacked. We recommend you only use Wordfence Security to get your site into a running state in order to recover the data you need to do a full reinstall. If you need help with a security issue, check out [Wordfence Care](https://www.wordfence.com/products/wordfence-care/), which offers hands-on support from our team, including dealing with a hacked site. For mission-critical sites, check out [Wordfence Response](https://www.wordfence.com/products/wordfence-response/). - -= Does Wordfence Security support IPv6? = - -Yes. We fully support IPv6 with all security functions including country blocking, range blocking, city lookup, whois lookup and all other security functions. If you are not running IPv6, Wordfence will work great on your site too. We are fully compatible with both IPv4 and IPv6 whether you run both or only one addressing scheme. - -= Does Wordfence Security support Multi-Site installations? = - -Yes. WordPress Multi-Site is fully supported. Using Wordfence you can scan every blog in your network for malware with one click. If one of your customers posts a page or post with a known malware URL that threatens your whole domain with being blocklisted by Google, we will alert you in the next scan. - -= What support options are available for Wordfence users? = - -Providing excellent customer service is very important to us. Our free users receive volunteer-level support in our [support forums](https://wordpress.org/support/plugin/wordfence). [Wordfence Premium](https://www.wordfence.com/products/wordfence-premium/) customers get paid ticket-based support. [Wordfence Care](https://www.wordfence.com/products/wordfence-care/) customers receive hands-on support including help with security incidents and a yearly security audit. [Wordfence Response](https://www.wordfence.com/products/wordfence-response/) customers get 24/7/365 support from our incident response team, with a 1 hour response time, and a maximum of 24 hours to resolve a security issue. - -= Where can I learn more about WordPress security? = - -Designed for every skill level, [The WordPress Security Learning Center](https://www.wordfence.com/learn/) is dedicated to deepening users’ understanding of security best practices by providing free access to entry-level articles, in-depth articles, videos, industry survey results, graphics and more. - -= Where can I find the Wordfence Terms of Service and Privacy Policy? = - -These are available on our website: [Terms of Service](https://www.wordfence.com/terms-of-service/) and [Privacy Policy](https://www.wordfence.com/privacy-policy/) - -== Screenshots == - -Secure your website with Wordfence. - -1. The dashboard gives you an overview of your site's security including notifications, attack statistics and Wordfence feature status. -2. The firewall protects your site from common types of attacks and known security vulnerabilities. -3. The Wordfence Security Scanner lets you know if your site has been compromised and alerts you to other security issues that need to be addressed. -4. Wordfence is highly configurable, with a deep set of options available for each feature. High level scan options are shown above. -5. Brute Force Protection features protect you from password guessing attacks. -6. Block attackers by IP, Country, IP range, Hostname, Browser or Referrer. -7. The Wordfence Live Traffic view shows you real-time activity on your site including bot traffic and exploit attempts. -8. Take login security to the next level with Two-Factor Authentication. -9. Logging in is easy with Wordfence 2FA. - -== Changelog == - -= 7.11.1 - January 2, 2024 = -* Improvement: Added ".env" to the files checked for "Scan for publicly accessible configuration, backup, or log files" -* Improvement: Provided better descriptive text for the option "Block IPs who send POST requests with blank User-Agent and Referer" -* Improvement: The diagnostics page now displays the contents of any `auto_prepend_file` .htaccess/.user.ini block for troubleshooting -* Fix: Fixed an issue where a login lockout on a WooCommerce login form could fail silently -* Fix: The scan result for abandoned plugins no longer states it has been removed from wordpress.org if it is still listed -* Fix: Addressed an exception parsing date information in non-repo plugins that have a bad `last_updated` value -* Fix: The URL scanner no longer generates a log warning when matching a potential URL fragment that ends up not being a valid URL - -= 7.11.0 - November 28, 2023 = -* Improvement: Added new functionality for trusted proxy presets to support proxies such as Amazon CloudFront, Ezoic, and Quic.cloud -* Improvement: WAF rule and malware signature updates are now signed with SHA-256 as well for hosts that no longer build SHA1 support -* Improvement: Updated the bundled trusted CA certificates -* Change: The WAF will no longer attempt to fetch rule or blocklist updates when run via WP-CLI -* Fix: Removed uses of SQL_CALC_FOUND_ROWS, which is deprecated as of MySQL 8.0.17 -* Fix: Fixed an issue where final scan summary counts in some instances were not sent to Central -* Fix: Fixed a deprecation notice for get_class in PHP 8.3.0 -* Fix: Corrected an output error in the connectivity section of Diagnostics in text mode - -= 7.10.7 - November 6, 2023 = -* Fix: Compatibility fix for WordPress 6.4 on the login page styling - -= 7.10.6 - October 30, 2023 = -* Fix: Addressed an issue with multisite installations when the wp_options tables had different encodings/collations - -= 7.10.5 - October 23, 2023 = -* Improvement: Updated the bundled GeoIP database -* Improvement: Added detection for Cloudflare reverse proxies blocking callbacks to the site -* Change: Files are no longer excluded from future scans if a previous scan stopped during their processing -* Fix: Added handling for the pending WordPress 6.4 change that removes $wpdb->use_mysqli -* Fix: The WAF MySQLi storage engine will now work correctly when either DB_COLLATE or DB_CHARSET are not defined -* Fix: Added additional error handling to Central calls to better handle request failures or conflicts -* Fix: Addressed a warning that would occur if a non-repo plugin update hook did not provide a last updated date -* Fix: Fixed an error in PHP 8 that could occur if the time correction offset was not numeric -* Fix: 2FA AJAX calls now use an absolute path rather than a full URL to avoid CORS issues on sites that do not canonicalize www and non-www requests -* Fix: Addressed a race condition where multiple concurrent hits on multisite could trigger overlapping role sync tasks -* Fix: Improved performance when viewing the user list on large multisites -* Fix: Fixed a UI bug where an invalid code on 2FA activation would leave the activate button disabled -* Fix: Reverted a change on error modals to bring back the additional close button for better accessibility - -= 7.10.4 - September 25, 2023 = -* Improvement: "Admin created outside of WordPress" scan results may now be reviewed and approved -* Improvement: The WAF storage engine may now be specified by setting the environmental variable "WFWAF_STORAGE_ENGINE" -* Improvement: Detect when a plugin or theme with a custom update handler is broken and blocking update version checks -* Change: Deprecated support for WordPress versions lower than 4.7.0 -* Change: Exclude parse errors of a damaged compiled rules file from reporting -* Fix: Suppress PHP notices related to rule loading when running WP-CLI -* Fix: Fixed an issue with the scan monitor cron that could leave it running unnecessarily - -= 7.10.3 - July 31, 2023 = -* Improvement: Updated GeoIP database -* Fix: Added missing text domain to translation function call -* Fix: Corrected inconsistent styling of switch controls -* Change: Made MySQLi storage engine the default for Flywheel hosted sites - -= 7.10.2 - July 17, 2023 = -* Fix: Prevented bundled sodium_compat library from conflicting with versions included with older WordPress versions - -= 7.10.1 - July 12, 2023 = -* Improvement: Added support for processing arrays of files in the WAF -* Improvement: Refactored security event processing to send events in bulk -* Improvement: Updated bundled sodium_compat and random_compat libraries -* Fix: Prevented deprecation warning caused by dynamic property creation -* Fix: Added translation support for additional strings -* Change: Adjusted Wordfence registration UI - -= 7.10.0 - June 21, 2023 = -* Improvement: Added translation support for strings from login security plugin -* Improvement: Added translator notes regarding word order and hidden text -* Improvement: Added translation support for additional strings -* Improvement: Prevented scans from failing if unreadable directories are encountered -* Improvement: Added help link to IPv4 scan option -* Improvement: Updated scan result text to clarify meaning of plugins removed from wordpress.org -* Improvement: Made "Increased Attack Rate" emails actionable -* Improvement: Updated GeoIP database -* Improvement: Updated JavaScript libraries -* Fix: Corrected IPv6 address expansion -* Fix: Ensured long request payloads for malicious requests are recorded in live traffic -* Fix: Prevented "commands out of sync" database error messages when the database connection has failed -* Fix: Prevented rare JSON encoding issues from breaking free license registration -* Fix: Prevented PHP notice from being logged when request parameter is missing -* Fix: Prevented deprecation warning in PHP 8.1 -* Change: Moved detection for old TimThumb files to malware signature -* Change: Moved translation file from .po to .pot -* Change: Renamed "Macedonia" to "North Macedonia, Republic of" - -= 7.9.3 - May 31, 2023 = -* Improvement: Added exception handling to prevent WAF errors from being fatal -* Fix: Corrected error caused by method call on null in WAF -* Change: Deprecated support for PHP 5.5 and 5.6, ended support for PHP 5.3 and 5.4 -* Change: Specified WAF version parameter when requesting firewall rules - -= 7.9.2 - March 27, 2023 = -* Improvement: The vulnerability severity score (CVSS) is now shown with any vulnerability findings from the scanner -* Improvement: Changed several links during initial setup to open in a new window/tab so it doesn't interrupt installation -* Change: Removed the non-https callback test to the Wordfence servers -* Fix: Fixed an error on PHP 8 that could occur when checking for plugin updates and another plugin has a broken hook -* Fix: Added a check for disabled functions when generating support diagnostics to avoid an error on PHP 8 -* Fix: Prevent double-clicking when activating 2FA to avoid an "already set up" error - -= 7.9.1 - March 1, 2023 = -* Improvement: Further improved performance when viewing 2FA settings and hid user counts by default on sites with many users -* Fix: Adjusted style inclusion and usage to prevent missing icons -* Fix: Avoided using the ctype extension as it may not be enabled -* Fix: Prevented fatal errors caused by malformed Central keys - -= 7.9.0 - February 14, 2023 = -* Improvement: Added 2FA management shortcode and WooCommerce account integration -* Improvement: Improved performance when viewing 2FA settings on sites with many users -* Improvement: Updated GeoIP database -* Fix: Ensured Captcha and 2FA scripts load on WooCommerce when activated on a sub-site in multisite -* Fix: Prevented reCAPTCHA logo from being obscured by some themes -* Fix: Enabled wfls_registration_blocked_message filter support for WooCommerce integration - -= 7.8.2 - December 13, 2022 = -* Fix: Releasing same changes as 7.8.1, due to wordpress.org error - -= 7.8.1 - December 13, 2022 = -* Improvement: Added more granualar data deletion options to deactivation prompt -* Improvement: Allowed accessing diagnostics prior to completing registration -* Fix: Prevented installation prompt from displaying when a license key is already installed but the alert email address has been removed - -= 7.8.0 - November 28, 2022 = -* Improvement: Added feedback when login form is submitted with 2FA -* Fix: Restored click support on login button when using 2FA with WooCommerce -* Fix: Corrected display issue with reCAPTCHA score history graph -* Fix: Prevented errors on PHP caused by corrupted login timestamps -* Fix: Prevented deprecation notices on PHP 8.2 related to dynamic properties -* Change: Updated Wordfence registration workflow - -= 7.7.1 - October 4, 2022 = -* Fix: Prevented scan resume attempts from repeating indefinitely when the initial scan stage fails - -= 7.7.0 - October 3, 2022 = -* Improvement: Added configurable scan resume functionality to prevent scan failures on sites with intermittent connectivity issues -* Improvement: Added new scan result for vulnerabilities found in plugins that do not have patched versions available via WordPress.org -* Improvement: Implemented stand-alone MMDB reader for IP address lookups to prevent plugin conflicts and support additional PHP versions -* Improvement: Added option to disable looking up IP address locations via the Wordfence API -* Improvement: Prevented successful logins from resetting brute force counters -* Improvement: Clarified IPv6 diagnostic -* Improvement: Included maximum number of days in live traffic option text -* Fix: Made timezones consistent on firewall page -* Fix: Added "Use only IPv4 to start scans" option to search -* Fix: Prevented deprecation notices on PHP 8.1 when emailing the activity log -* Fix: Prevented warning on PHP 8 related to process owner diagnostic -* Fix: Prevented PHP Code Sniffer false positive related to T_BAD_CHARACTER -* Fix: Removed unsupported beta feed option - -= 7.6.2 - September 19, 2022 = -* Improvement: Hardened 2FA login flow to reduce exposure in cases where an attacker is able to obtain privileged information from the database - -= 7.6.1 - September 6, 2022 = -* Fix: Prevented XSS that would have required admin privileges to exploit (CVE-2022-3144) - -= 7.6.0 - July 28, 2022 = -* Improvement: Added option to start scans using only IPv4 -* Improvement: Added diagnostic for internal IPv6 connectivity to site -* Improvement: Added AUTOMATIC_UPDATER_DISABLED diagnostic -* Improvement: Updated password strength check -* Improvement: Added support for scanning plugin/theme files in when using the WP_CONTENT_DIR/WP_PLUGIN_DIR constants -* Improvement: Updated GeoIP database -* Improvement: Made DISABLE_WP_CRON diagnostic more clear -* Improvement: Added "Hostname" to Live Traffic message displayed for hostname blocking -* Improvement: Improved compatibility with Flywheel hosting -* Improvement: Adopted semantic versioning -* Improvement: Added support for dynamic cookie redaction patterns when logging requests -* Fix: Prevented scanned paths from being displayed as skipped in rare cases -* Fix: Corrected indexed files count in scan messages -* Fix: Prevented overlapping AJAX requests when viewing Live Traffic on slower servers -* Fix: Corrected WP_DEBUG_DISPLAY diagnostic -* Fix: Prevented extraneous warnings caused by DNS resolution failures -* Fix: Corrected display issue with Save/Cancel buttons on All Options page -* Fix: Prevented errors caused by WHOIS searches for invalid values - -= 7.5.11 - June 14, 2022 = -* Improvement: Added option to toggle display of last login column on WP Users page -* Improvement: Improved autocomplete support for 2FA code on Apple devices -* Improvement: Prevented Batcache from caching block pages -* Improvement: Updated GeoIP database -* Fix: Prevented extraneous scan results when non-existent paths are configured using UPLOADS and related constants -* Fix: Corrected issue that prevented reCAPTCHA scores from being recorded -* Fix: Prevented invalid JSON setting values from triggering fatal errors -* Fix: Made text domains consistent for translation support -* Fix: Clarified that allowlisted IP addresses also bypass reCAPTCHA - -= 7.5.10 - May 17, 2022 = -* Improvement: Improved scan support for sites with non-standard directory structures -* Improvement: Increased accuracy of executable PHP upload detection -* Improvement: Addressed various deprecation notices with PHP 8.1 -* Improvement: Improved handling of invalidated license keys -* Fix: Corrected lost password redirect URL when used with WooCommerce -* Fix: Prevented errors when live traffic data exceeds database column length -* Fix: Prevented bulk password resets from locking out admins -* Fix: Corrected issue that prevented saving country blocking settings in certain cases -* Change: Updated copyright information - -= 7.5.9 - March 22, 2022 = -* Improvement: Updated GeoIP database -* Improvement: Removed blocking data update logic in order to reduce timeouts -* Improvement: Increased timeout value for API calls in order to reduce timeouts -* Improvement: Clarified notification count on Wordfence menu -* Improvement: Improved scan compatibility with WooCommerce -* Improvement: Added messaging when application passwords are disabled -* Fix: Prevented warnings and errors when constants are defined based on the value of other constants in wp-config.php -* Fix: Corrected redundant escaping that prevented viewing or repairing files in scan results - -= 7.5.8 - February 1, 2022 = -* Launch of Wordfence Care and Wordfence Response - -= 7.5.7 - November 22, 2021 = -* Improvement: Made preliminary changes for compatibility with PHP 8.1 -* Change: Added GPLv3 license and updated EULA - -= 7.5.6 - October 18, 2021 = -* Fix: Prevented login errors with WooCommerce integration when manual username entry is enabled on the WooCommerce registration form -* Fix: Corrected theme incompatibilities with WooCommerce integration - -= 7.5.5 - August 16, 2021 = -* Improvement: Enhanced accessibility -* Improvement: Replaced regex in scan log with signature ID -* Improvement: Updated Knockout JS dependency to version 3.5.1 -* Improvement: Removed PHP 8 compatibility notice -* Improvement: Added NTP status for Login Security to Diagnostics -* Improvement: Updated plugin headers for compatibility with WordPress 5.8 -* Improvement: Updated Nginx documentation links to HTTPS -* Improvement: Updated IP address geolocation database -* Improvement: Expanded WAF SQL syntax support -* Improvement: Added optional constants to configure WAF database connection -* Improvement: Added support for matching punycode domain names -* Improvement: Updated Wordfence install count -* Improvement: Deprecated support for WordPress versions older than 4.4.0 -* Improvement: Added warning messages when blocking U.S. -* Improvement: Added MYSQLI_CLIENT_SSL support to WAF database connection -* Improvement: Added 2FA and reCAPTCHA support for WooCommerce login and registration forms -* Improvement: Added option to require 2FA for any role -* Improvement: Added logic to automatically disable NTP after repeated failures and option to manually disable NTP -* Improvement: Updated reCAPTCHA setup note -* Fix: Prevented issue where country blocking changes are not saved -* Fix: Corrected string placeholder -* Fix: Added missing text domain to translation calls -* Fix: Corrected warning about sprintf arguments on Central setup page -* Fix: Prevented lost password functionality from revealing valid logins - -= 7.5.4 - June 7, 2021 = - -* Fix: Resolve conflict with woocommerce-gateway-amazon-payments-advanced plugin - -= 7.5.3 - May 10, 2021 = - -* Improvement: Expanded WAF capabilities including better JSON and user permission handling -* Improvement: Switched to relative paths in WAF auto_prepend file to increase portability -* Improvement: Eliminated unnecessary calls to Wordfence servers -* Fix: Prevented errors on PHP 8.0 when disk_free_space and/or disk_total_space are included in disabled_functions -* Fix: Fixed PHP notices caused by unexpected plugin version data -* Fix: Gracefully handle unexpected responses from Wordfence servers -* Fix: Time field now displays correctly on "See Recent Traffic" overlay -* Fix: Corrected typo on Diagnostics page -* Fix: Corrected IP counts on activity report -* Fix: Added missing line break in scan result emails -* Fix: Sending test activity report now provides success/failure response -* Fix: Reduced SQLi false positives caused by comma-separated strings -* Fix: Fixed JS error when resolving last scan result - -= 7.5.2 - March 24, 2021 = - -* Fix: Fixed fatal error on single-sites running WordPress <4.9. - -= 7.5.1 - March 24, 2021 = - -* Fix: Fixed fatal error when viewing the Login Security settings page from an allowlisted IP. - -= 7.5.0 - March 24, 2021 = - -* Improvement: Translation-readiness: All user-facing strings are now run through WordPress's i18n functions. -* Improvement: Remove legacy admin functions no longer used within the UI. -* Improvement: Local GeoIP database update. -* Improvement: Remove Lynwood IP range from allowlist, and add new AWS IP range. -* Fix: Fixed bug with unlocking a locked out IP without correctly resetting its failure counters. -* Fix: Sites using deleted premium licenses correctly revert to free license behavior. -* Fix: When enabled, cookies are now set for the correct roles on previously used devices. -* Fix: WAF cron jobs are now skipped when running on the CLI. -* Fix: PHP 8.0 compatibility - prevent syntax error when linting files. -* Fix: Fixed issue where PHP 8 notice sometimes cannot be dismissed. - -= 7.4.14 - December 3, 2020 = - -* Improvement: Added option to disable application passwords. -* Improvement: Updated site cleaning callout with 1-year guarantee. -* Improvement: Upgraded sodium_compat library to 1.13.0. -* Improvement: Replaced the terms whitelist and blacklist with allowlist and blocklist. -* Improvement: Made a number of WordPress 5.6 and jQuery 3.x compatibility improvements. -* Improvement: Made a number of PHP8 compatilibility improvements. -* Improvement: Added dismissable notice informing users of possible PHP8 compatibility issues. - -= 7.4.12 - October 21, 2020 = - -* Improvement: Initial integration of i18n in Wordfence. -* Improvement: Prevent Wordfence from loading under <PHP 5.3. -* Improvement: Updated GeoIP database. -* Improvement: Prevented wildcard from running/saving for scan's excluded files pattern. -* Improvement: Included Wordfence Login Security tables in diagnostics missing table list. -* Fix: Removed new scan issues when WordPress update occurs mid-scan. -* Fix: Specified category when saving `whitelistedServiceIPs` to WAF storage engine. -* Fix: Removed localhost IP for auto-update email alerts. -* Fix: Fixed broken message in Live Traffic with MySQLi storage engine for blocklisted hits. -* Fix: Removed optional parameter values for PHP 8 compatibility. - -= 7.4.11 - August 27, 2020 = - -* Improvement: Added diagnostic debug button to clear Wordfence Central connection data from the database. -* Improvement: Added help documentation links to modified plugin/theme file scan results. -* Fix: Prevent file system scan from following symlinks to root. -* Fix: Cleared pending plugin/theme update scan results and notification when a plugin/theme is auto-updated. -* Fix: Added check for when site is disconnected on Central's end, but not in the plugin. - -= 7.4.10 - August 5, 2020 = - -* Improvement: Prevent author sitemap from leaking usernames in WordPress >= 5.5.0. -* Fix: Prevent Wordfence auto-update from running if the user has enabled auto-update through WordPress. -* Fix: Added default `permission_callback` params to Wordfence Central REST routes. -* Fix: Fixed missing styling on WAF optimization admin notice. - -= 7.4.9 - July 8, 2020 = - -* Improvement: Added list of known malicious usernames to suspicious administrator scan. -* Improvement: Added ability for the WAF to determine if a given plugin/theme/core version is installed. -* Improvement: Added a feature to export a diagnostics report. -* Improvement: Add php_errorlog to the list of downloadable logs in diagnostics. -* Improvement: Added a prompt to allow user to download a backup prior to repairing files. -* Improvement: Prevent scan from failing when the home URL has changed and the key is no longer valid. -* Improvement: Deprecated PHP 5.3, and ended PHP 5.2 support by prevent auto-update from running on older versions. -* Fix: Fixed issue where WAF mysqli storage engine cannot find credentials if wflogs/ does not exist. -* Fix: Changed capability checked to read WP REST API users endpoint when "Prevent discovery of usernames through ..." is enabled. -* Fix: Prevented duplicate queries for wordfenceCentralConnected wfconfig value. -* Fix: Prevented custom wp-content or other directories from appearing in "skipped paths" scan result, even when scanned. -* Fix: Login Attempts dashboard widget "Show more" link is not visible when long usernames and IPs cause wrapping. -* Fix: Fix typo in the readme. - -= 7.4.8 - June 16, 2020 = -* Fix: Fixed issue with fatal errors encountered during activation under certain conditions. - -= 7.4.7 - April 23, 2020 = -* Improvement: Updated bundled GeoIP database. -* Improvement: Better messaging when selecting restrictive rate limits. -* Improvement: Scan result emails now include the count of issues that were found again. -* Improvement: Resolved scan issues will now email again if they reoccur. -* Improvement: Added the state/province name when applicable to geolocation displays in Live Traffic. -* Improvement: New blocking page design to better inform blocked visitors on how to resolve the block. -* Improvement: Custom WP_CONTENT_DIR, WP_PLUGIN_DIR, and UPLOADS path constants will now get scanned correctly. -* Improvement: Added TLS connection failure detection to brute force reporting and checking and a corresponding backoff period. -* Fix: Fixed an issue where a bad cron record could interfere with automatic WAF rule updates. -* Fix: Fixed a PHP warning that could occur if a bad response was received while updating an IP list. -* Fix: The new user tour and onboarding flow will now work correctly on the 2FA page. - -= 7.4.6 - February 12, 2020 = -* Improvement: Enhanced the detection ability of the WAF for SQLi attacks. -* Improvement: Updated the bundled GeoIP database. -* Improvement: Modified some country names in the block configuration to align with those shown in Live Traffic. -* Change: Moved the skipped files scan check to the Server State category. -* Fix: Fixed an issue where after scrolling on the Live Traffic page, updates would no longer automatically load. -* Fix: Modified the number of login records kept to align better with Live Traffic so they're trimmed around the same time. - -= 7.4.5 - January 15, 2020 = -* Improvement: Improved WAF coverage for an Infinite WP authentication bypass vulnerability. - -= 7.4.4 - January 14, 2020 = -* Fix: Fixed a UI issue where the scan summary status marker for malware didn't always match the findings. - -= 7.4.3 - January 13, 2020 = -* Improvement: Added WAF coverage for an Infinite WP authentication bypass vulnerability. -* Improvement: The malicious URL scan now includes protocol-relative URLs (e.g., //example.com) -* Improvement: Malware signatures are now better applied to large files read in multiple passes. -* Improvement: Added a scan issue that will appear when one or more paths are skipped due to scan settings excluding them. -* Changed: AJAX endpoints now send the application/json Content-Type header. -* Changed: Updated text on scan issues for plugins removed from wordpress.org to better indicate possible reasons. -* Changed: Added compatibility messaging for reCAPTCHA when WooCommerce is active. -* Fixed: Added missing $wp_query->set_404() call when outputting a 404 page on a custom action. -* Fixed: Fixed the logout username display in Live Traffic broken by a change in WordPress 5.3. -* Fixed: Improved the response callback used for the WAF status check during extended protection installation. -* Fixed: The "Require 2FA for all administrators" notice is now automatically dismissed if an administrator sets up 2FA. - -= 7.4.2 - December 3, 2019 = -* Improvement: Increased performance of IP CIDR range comparisons. -* Improvement: Added parameter signature to remote scanning for better validation during forking. -* Change: Removed duplicate browser label in Live Traffic. -* Fix: Added compensation for PHP 7.4 deprecation notice with get_magic_quotes_gpc. -* Fix: Fixed potential notice in dashboard widget when no updates are found. -* Fix: Updated JS hashing library to compensate for a variable name collision that could occur. -* Fix: Fixed an issue where certain symlinks could cause a scan to erroneously skip files. -* Fix: Fixed PHP memory test for newer PHP versions whose optimizations prevented it from allocating memory as desired. - -= 7.4.1 - November 6, 2019 = -* Improvement: Updated the bundled GeoIP database. -* Improvement: Minor changes to ensure compatibility with PHP 7.4. -* Improvement: Updated the WHOIS lookup for better reliability. -* Improvement: Added better diagnostic data when the WAF MySQL storage engine is active. -* Improvement: Improved the messaging when switching between premium and free licenses. -* Change: Deprecated DNS changes scan. -* Change: The plugin will no longer email alerts when Central is managing them. -* Fix: Added error suppression to ignore_user_abort calls to silence it on hosts with it disabled. -* Fix: Improved path generation to better avoid outputting extra slashes in URLs. -* Fix: Applied a length limit to malware reporting to avoid failures due to large content size. - -= 7.4.0 - August 22, 2019 = -* Improvement: Added a MySQL-based configuration and data storage for the WAF to expand the number of hosting environments supported. For more detail, see: https://www.wordfence.com/help/firewall/mysqli-storage-engine/ -* Improvement: Updated bundled GeoIP database. -* Fix: Fixed several console notices when running via the CLI. - -= 7.3.6 - July 31, 2019 = -* Improvement: Multiple "php.ini file in core directory" issues are now consolidated into a single issue for clearer scan results. -* Improvement: The AJAX error detection for false positive WAF blocks now better detects and processes the response for presenting the allowlisting prompt. -* Improvement: Added overdue cron detection and highlighting to diagnostics to help identify issues. -* Improvement: Added the necessary directives to exclude backwards compatibility code from creating warnings with phpcs for future compatibility with WP Tide. -* Improvement: Normalized all PHP require/include calls to use full paths for better code quality. -* Change: Removed deprecated high sensitivity scan option since current signatures are more accurate. -* Fix: Fixed the status circle tooltips not showing. -* Fix: IP detection at the WAF level better mirrors the main plugin exactly when using the automatic setting. -* Fix: Fixed a currently-unused code path in email address verification for the strict check. - -= 7.3.5 - July 16, 2019 = -* Improvement: Improved tagging of the login endpoint for brute force protection. -* Improvement: Added additional information about reCAPTCHA to its setting control. -* Improvement: Added a constant that may be overridden to customize the expiration time of login verification email links. -* Improvement: reCAPTCHA keys are now tested on saving to prevent accidentally inputting a v2 key. -* Improvement: Added a setting to control the reCAPTCHA human/bot threshold. -* Improvement: Added a separate option to trigger removal of Login Security tables and data on deactivation. -* Improvement: Reworked the reCAPTCHA implementation to trigger the token check on login/registration form submission to avoid the token expiring. -* Fix: Widened the reCAPTCHA key fields to allow the full keys to be visible. -* Fix: Fixed encoding of the ellipsis character when reporting malware finds. -* Fix: Disabling the IP blocklist once again correctly clears the block cache. -* Fix: Addressed an issue when outbound UDP connections are blocked where the NTP check could log an error. -* Fix: Added handling for reCAPTCHA's JavaScript failing to load, which previously blocked logging in. -* Fix: Fixed the functionality of the button to send 2FA grace period notifications. -* Fix: Fixed a missing icon for some help links when running in standalone mode. - -= 7.3.4 - June 17, 2019 = -* Improvement: Added security events and alerting features built into Wordfence Central. - -= 7.3.3 - June 11, 2019 = -* Improvement: Added support for managing the login security settings to Wordfence Central. -* Improvement: Updated the bundled root CA certificate store. -* Improvement: Added a check and update flow for mod_php hosts with only the PHP5 directive set for the WAF's extended protection mode. -* Improvement: Added additional values to Diagnostics for debugging time-related issues, the new fatal error handler settings, and updated the PHP version check to reflect the new 5.6.20 requirement of WordPress. -* Change: Changed the autoloader for our copy of sodium_compat to always load after WordPress core does. -* Fix: Fixed the "removed from wordpress.org" detection for plugin, which was broken due to an API change. -* Fix: Fixed the bulk repair function in the scan results when it included core files. - -= 7.3.2 - May 16, 2019 = -* Improvement: Updated sodium_compat to address an incompatibility that may occur with the pending WordPress 5.2.1 update. -* Improvement: Clarified text around the reCAPTCHA setting to indicate v3 keys must be used. -* Improvement: Added detection for Jetpack and a notice when XML-RPC authentication is disabled. -* Fix: Suppressed error messages on the NTP time check to compensate for hosts with UDP connections disabled. - -= 7.3.1 - May 14, 2019 = -* Improvement: Two-factor authentication is new and improved, now available on all Premium and Free installations. -* Improvement: Added Google reCAPTCHA v3 support to the login and registration forms. -* Improvement: XML-RPC authentication may now be disabled or forced to require 2FA. -* Improvement: Reduced size of SVG assets. -* Improvement: Clarified text on "Maximum execution time for each scan stage" option. -* Improvement: Added detection for an additional config file that may be created and publicly visible on some hosts. -* Improvement: Improved detection for malformed malware scanning signatures. -* Change: Long-deprecated database tables will be removed. -* Change: Removed old performance logging code that's no longer used. -* Fix: Addressed a log notice when using the See Recent Traffic feature in Live Traffic. -* Fix: WAF attack data now correctly includes JSON payloads when appropriate. -* Fix: Fixed the text for Live Traffic entries that include a redirection message. -* Fix: Fixed an issue with synchronizing scan issues to Wordfence Central that prevented stale issues from being cleared. - -= 7.2.5 - April 18, 2019 = -* Improvement: Added additional data breach records to the breached password check. -* Improvement: Added the Accept-Encoding compression header to WAF-related requests for better performance during rule updates. -* Improvement: Updated to the current GeoIP database. -* Improvement: Added additional controls to the Wordfence Central connection page to better reflect the current connection state. -* Change: Updated the text on the option to alert for scan results of a certain severity. - -= 7.2.4 - March 26, 2019 = -* Improvement: Updated vulnerability database integration. -* Improvement: Better messaging when a WAF rule update fails to better indicate the cause. -* Fix: Removed a double slash that could occur in an image path. -* Fix: Adjusted timeouts to improve reliability of WAF rule updates on slower servers. -* Fix: Improved connection process with Wordfence Central for better reliability on servers with non-standard paths. -* Fix: Switched to autoloader with fastMult enabled on sodum_compat to minimize connection issues. - -= 7.2.3 - February 28, 2019 = -* Improvement: Country names are now shown instead of two letter codes where appropriate. -* Improvement: Updated the service allowlist to reflect additions to the Facebook IP ranges. -* Improvement: Added alerting for when the WAF is disabled for any reason. -* Improvement: Additional alerting and troubleshooting steps for WAF configuration issues. -* Change: Live Traffic human/bot status will additionally be based on the browscap record in security-only mode. -* Change: Added dismissible prompt to switch Live Traffic to security-only mode. -* Fix: The scan issues alerting option is now set correctly for new installations. -* Fix: Fixed a transparency issue with flags for Switzerland and Nepal. -* Fix: Fixed the malware link image rendering in scan issue emails and switched to always use https. -* Fix: WAF-related scheduled tasks are now more resilient to connection timeouts or memory issues. -* Fix: Fixed Wordfence Central connection flow within the first time experience. - -= 7.2.2 - February 14, 2019 = -* Improvement: Updated GeoIP database. -* Fix: Syncing requests from Wordfence Central no longer appear in Live Traffic. -* Fix: Addressed some display issues with the Wordfence Central panel on the Wordfence Dashboard. - -= 7.2.1 - February 5, 2019 = -* Improvement: Integrated Wordfence with Wordfence Central, a new service allowing you to manage multiple Wordfence installations from a single interface. -* Improvement: Added a help link to the mode display when a host disabling Live Traffic is active. -* Improvement: Added an option for allowlisting ManageWP in "Allowlisted Services". -* Fix: Enqueued fonts used in admin notices on all admin pages. -* Fix: Change false positive user-reports link to use https. -* Fix: Fix reference to non-existent function when registering menus. - -= 7.1.20 - January 8, 2019 = -* Fix: Fixed a commit error with 7.1.19 - -= 7.1.19 - January 8, 2019 = -* Improvement: Speed optimizations for WAF rule compilation. -* Improvement: Added Kosovo to country blocking. -* Improvement: Additional flexibility for allowlist rules. -* Fix: Added compensation for really long file lists in the "Exclude files from scan" setting. -* Fix: Fixed an issue where the GeoIP database update check would never get marked as completed. -* Fix: Login credentials passed as arrays no longer trigger a PHP notice from our filters. -* Fix: Text fixes to the WAF nginx help text. - -= 7.1.18 - December 4, 2018 = -* Improvement: Removed unused font glyph ranges to reduce file count and size. -* Improvement: Switched flags to use a CSS sprite to reduce file count and size. -* Improvement: Added dates to each release in the changelog. -* Change: Live Traffic now defaults to only logging security events on new installations. -* Change: Added an upper limit to the maximum scan stage execution time if not explicitly overridden. -* Fix: Changed WAF file handling to skip some file actions if running via the CLI. -* Fix: Fixed an issue that could prevent files beginning with a period from working with the file restore function. -* Fix: Improved layout of options page controls on small screens. -* Fix: Fixed a typo in the htaccess update panel. -* Fix: Added compensation for Windows path separators in the WAF config handling. -* Fix: Fixed handling of case-insensitive tables in the Diagnostics table check. -* Fix: Better messaging by the status circles when the WAF config is inaccessible or corrupt. -* Fix: REST API hits now correctly follow the "Don't log signed-in users with publishing access" option. - -= 7.1.17 - November 6, 2018 = -* Improvement: Increased frequency of filesystem permission check and update of the WAF config files. -* Improvement: More complete data removal when deactivating with remove tables and files checked. -* Improvement: Better diagnostics logging for GeoIP conflicts. -* Fix: Text fix in invalid username lockout message. -* Fix: PHP 7.3 syntax compatibility fixes. - -= 7.1.16 - October 16, 2018 = -* Improvement: Service allowlisting can now be selectively toggled on or off per service. -* Improvement: Updated bundled GeoIP database. -* Change: Removed the "Disable Wordfence Cookies" option as we've removed all cookies it affected. -* Change: Updates that refresh country statistics are more efficient and now only affect the most recent records. -* Change: Changed the title of the Wordfence Dashboard so it's easier to identify when many tabs are open. -* Fix: Fixed an issue with country blocking and XML-RPC requests containing credentials. - -= 7.1.15 - October 1, 2018 = -* Fix: Addressed a plugin conflict with the composer autoloader. - -= 7.1.14 - October 1, 2018 = -* Improvement: Reduced queries and potential table size for rate limiting-related data. -* Improvement: Updated the internal browscap database. -* Improvement: Better error reporting for scan failures due to connectivity issues. -* Improvement: WAF-related file permissions will now lock down further when possible. -* Improvement: Hardening for sites on servers with insecure configuration, which should not be enabled on publicly accessible servers. Thanks Janek Vind. -* Change: Switched the minimum PHP version to 5.3. -* Fix: Prevent bypass of author enumeration prevention by using invalid parameters. Thanks Janek Vind. -* Fix: Wordfence crons will now automatically reschedule if missing for any reason. -* Fix: Fixed an issue where the block counts and total IPs blocked values on the dashboard might not agree. -* Fix: Corrected the message shown on Live Traffic when a country blocking bypass URL is used. -* Fix: Removed extra spacing in the example ranges for "Allowlisted IP addresses that bypass all rules" - -= 7.1.12 - September 12, 2018 = -* Improvement: Updated bundled GeoIP database. -* Improvement: Restructured the WAF configuration storage to be more resilient on hosts with no file locking support. -* Change: Moved the settings import/export to the Tools page. -* Change: New installations will now use lowercase table names to avoid issues with some backup plugins and Windows-based sites. -* Fix: The notice and repair link for an unreadable WAF configuration now work correctly. -* Fix: Improved appearance of some stat components on smaller screens. -* Fix: Fixed duplicate entries with different status codes appearing in detailed live traffic. -* Fix: Added better caching for the breached password check to compensate for sites that prevent the cache from expiring correctly. -* Fix: Changing the frequency of the activity summary email now reschedules it. - -= 7.1.11 - August 21, 2018 = -* Improvement: Added a custom message field that will show on all block pages. -* Improvement: Improved the standard appearance for block pages. -* Improvement: Live Traffic now better displays failed logins. -* Improvement: Added a constant to prevent direct MySQLi use for hosts with unsupported DB configurations. -* Improvement: Malware scan results have been modified to include both a public identifier and description. -* Change: Description updated on the Live Traffic page. -* Fix: Removed an empty file hash from the old Wordpress core file detection. -* Fix: Update locking now works on multisites that have removed the original site. - -= 7.1.10 - July 31, 2018 = -* Improvement: Better labeling in Live Traffic for 301 and 302 redirects. -* Improvement: Login timestamps are now displayed in the site's configured time zone rather than UTC. -* Improvement: Added detection and a workaround for hosts with a non-functional MySQLi interface. -* Improvement: The prevent admin registration setting now works with WooCommerce's registration flow. -* Improvement: For hosts with varying URL values (e.g., AWS instances), notification and alert links now correctly use the canonical admin URL. -* Fix: Fixed a layout problem with the live traffic disabled notice. -* Fix: The scan stage that checks "How does Wordfence get IPs?" no longer shows a warning if the call fails. - -= 7.1.9 - July 12, 2018 = -* Improvement: Added an "unsubscribe" link to plugin-generated alerts. -* Improvement: Added some additional flags. -* Change: Removed some unnecessary files from the bundled GeoIP library. -* Change: Updated wording in the Terms of Use/Privacy Policy agreement UI. -* Change: The minimum "Lock out after how many login failures" is now 2. -* Change: The diagnostics report now includes the scan issues for easier debugging. -* Fix: Multiple improvements to automatic updating to avoid broken updates on sites with low resources or slow file systems. -* Fix: Better text wrapping in the top failed logins widget. -* Fix: Onboarding CSS/JS is now correctly enqueued for multisite installations. -* Fix: Fixed a missing asset with the bundled jQueryUI library. -* Fix: Fixed memory calculation when using PHP's supported shorthand syntax. -* Fix: Better wrapping behavior on the reason column in the blocks table. -* Fix: Fixed an issue with an internal data structure to prevent error log entries when using mbstring functions. -* Fix: Improved bot detection when no user agent is sent. - -= 7.1.8 - June 26, 2018 = -* Improvement: Better detection of removal status when uninstalling the WAF's auto-prepend file. -* Improvement: Switched optional mailing list signup to go directly through our servers rather than a third party. -* Fix: Fixed the dashboard erroneously showing the payment method as missing for some payment methods. -* Fix: If a premium license is deleted from wordfence.com, the plugin will now automatically downgrade rather than get stuck in an intermediate state. -* Fix: Changed some wording to consistently use "License" or "License Key". - -= 7.1.7 - June 5, 2018 = -* Improvement: Added better support for keyboard navigation of options. -* Improvement: staging. and dev. subdomains are now supported for sharing premium licenses. -* Improvement: Bundled our interface font to avoid loading from a remote source and reduced the pages some assets were loaded on. -* Improvement: Added option to trim Live Traffic records after a specific number of days. -* Improvement: Updated to the current GeoIP2 database. -* Improvement: Extended the automatic redaction applied to attack data that may include sensitive information. -* Change: Removed a no-longer-used API call. -* Fix: Fixed a few options that couldn't be searched for on the all options page. -* Fix: Activity Report emails now detect and avoid symlink loops. - -= 7.1.6 - May 22, 2018 = -* Fix: Added a workaround for sites with inaccessible WAF config files when reading php://input - -= 7.1.5 - May 22, 2018 = -* Improvement: GDPR compliance updates. -* Improvement: The list of blocks now shows the most recently-added blocks at the top by default. -* Improvement: Added better table status display to Diagnostics to help with debugging. -* Improvement: Added deferred loading to Live Traffic avatars to improve performance with some plugins. -* Improvement: The server's own IP is now automatically allowlisted for known safe requests. -* Fix: Added a workaround to Live Traffic human/bot detection to compensate for other scripts that modify our event handlers. -* Fix: Fixed an error with Live Traffic human/bot detection when plugins change the load order. -* Fix: Fixed auto-enabling of some controls when pasting values. -* Fix: Fixed an instance where http links could be generated for emails rather than https. - -= 7.1.4 - May 2, 2018 = -* Improvement: Added additional XSS detection capabilities. -* Change: Initial preparation for GDPR compliance. Additional changes will be included in an upcoming release to meet the GDPR deadline. -* Change: Reworked Live Traffic/Rate Limiting human and bot detection to function without cookies. -* Change: Removed the wfvt_ cookie as it was no longer necessary. -* Change: Better debug messaging for scan forking. -* Fix: PHP deprecation notices no longer suppress those of old OpenSSL or WordPress. -* Fix: Fixes to the deprecated OpenSSL version detection and alerting to handle non-patch version numbers. -* Fix: Added detection for and fixed a very large pcre.backtrack_limit setting that could cause scans to fail, when modified by other plugins. -* Fix: Scan issue alert emails no longer incorrectly show high sensitivity was enabled. -* Fix: Fixed wrapping of long strings on the Diagnostics page. - -= 7.1.3 - April 18, 2018 = -* Improvement: Improved the performance of our config table status check. -* Improvement: The IP address of the user activating Wordfence is now used by the breached password check until an admin successfully logs in. -* Improvement: Added several new error displays for scan failures to help diagnose and fix issues. -* Improvement: Added the block duration to alerts generated when an IP is blocked. -* Improvement: A text version of scan results is now included in the activity log email. -* Improvement: The WAF install/uninstall process no longer asks to backup files that do not exist. -* Change: Began a phased rollout of moving brute force queries to be https-only. -* Change: Added the initial deprecation notice for PHP 5.2. -* Change: Suppressed a script tag on the diagnostics page from being output in the email version. -* Fix: Addressed an issue where plugins that return a null user during authentication would cause a PHP notice to be logged. -* Fix: Fixed an issue where plugins that use non-standard version formatting could end up with a inaccurate vulnerability status. -* Fix: Added a workaround for web email clients that erroneously encode some URL characters (e.g., #). - -= 7.1.2 - April 4, 2018 = -* Improvement: Added support for filtering the blocks list. -* Improvement: Added a flow for generating the WAF autoprepend file and retrieving the path for manual installations. -* Improvement: Added a variety of new data values to the Diagnostics page to aid in debugging issues. -* Improvement: SVG files now have the JavaScript-based malware signatures run against them. -* Improvement: More descriptive text for the scan issue email when there's an unknown WordPress core version. -* Improvement: Added a dedicated error display that will show when a scan is detected as failed. -* Improvement: readme.html and wp-config-sample.php are no longer scanned for changes due to differences between languages (malware signatures still run). -* Improvement: When the license status changes, it now triggers a fresh pull of the WAF rules. -* Improvement: Added dedicated messaging for leftover WordPress core files that were not fully removed during upgrade. -* Improvement: Improved labeling in Live Traffic for hits blocked by the real-time IP blocklist. -* Improvement: Added forced wrapping to the file paths in the activity report email to avoid scroll bar overlap making them unreadable. -* Improvement: Updated the bundled GeoIP database. -* Improvement: Updated the bundled browscap database. -* Improvement: All emailed alerts now include a link to the generating site. -* Change: Minor text change to unify some terminology. -* Fix: Removed a remaining reference to the CDN version of Font Awesome. -* Fix: Removed an old reference to the pre-Wordfence 7.1 lockouts table. -* Fix: Scan results for malware detections in posts are no longer clickable. -* Fix: We now verify that there's a valid email address defined before attempting to send an alert and filter out any invalid ones. -* Fix: Added a workaround for GoDaddy/Limit Login Attempts suppressing the 2FA prompting. - -= 7.1.1 - March 20, 2018 = -* Improvement: Added the ability to sort the blocks table. -* Improvement: Added short-term caching of breach check results. -* Improvement: The check for passwords leaked in breaches now allows a login if the user has previously logged in from the same IP successfully and displays an admin notice suggesting changing the password. -* Improvement: Switched the bundled select2 library to use to prefixed version to work around other plugins including older versions on our pages. -* Improvement: The scan page now displays when beta signatures are enabled since they can produce false positives. -* Improvement: Improved positioning of the "Wordfence is Working" message. -* Improvement: Added a character limit to the reason on blocks and forced wrapping to avoid the layout stretching too much. -* Fix: Fixed an issue with some table prefixing where multisite installations with rare configurations could result in unknown table warnings. -* Fix: Removed an older behavior with live traffic buttons that could allow them to open in a new tab and show nothing. -* Fix: Added a check for sites with inaccurate disk space function results to avoid showing an issue. -* Fix: Added a secondary check to the email summary cron to avoid repeated sending if the cron list is corrupted. -* Fix: Fixed a typo on the Advanced Comment Spam Filter page. - -= 7.1.0 - March 1, 2018 = -* Improvement: Added a new feature to prevent attackers from successfully logging in to admin accounts whose passwords have been in data breaches. -* Improvement: Added pagination support to the scan issues. -* Improvement: Improved time zone handling for the WAF's learning mode. -* Improvement: Improved messaging on file-related scan issues when the file is wp-config.php. -* Improvement: Modified the appearance of the "How does Wordfence get IPs" option to be more clear. -* Improvement: Better messaging about the scan options that need to be enabled for free installations to achieve 100%. -* Improvement: The country blocking selection drawer behavior has been changed to now allow saving directly from it. -* Improvement: Increased the textarea size for the advanced firewall options to make editing easier. -* Improvement: The URL blocklist check now includes additional variants in some checks to more accurately match. -* Change: Adjusted messaging when blocks are loading. -* Change: Wording change for the option "Maximum execution time for each stage". -* Change: Permanent blocks now display "Permanent" rather than "Indefinite" for the expiration for consistency. -* Fix: Fixed the initial status code recorded for lockouts and blocks. -* Fix: Fixed PHP notices that could occur when using the bulk delete/repair scan tools. -* Fix: Improved the state updating for the scan bulk action buttons. -* Fix: Usernames in live traffic now correctly link to the corresponding profile page. -* Fix: Addressed a PHP warning that could occur if wordpress.org returned a certain format for the abandoned plugin check. -* Fix: Fixed a possible PHP notice when syncing attack data records without metadata attached. -* Fix: Modified the behavior of the disk space check to avoid a scan warning showing without an issue generated. -* Fix: Fixed a CSS glitch where the top controls could have extra space at the top when sites have long navigation menus. -* Fix: Updated some wording in the All Options search box. -* Fix: Removed an old link for "See Recent Traffic" on Live Traffic that went nowhere. - -= 7.0.4 - February 12, 2018 = -* Change: Live Traffic records are no longer created for hits initiated by WP-CLI (e.g., manually running cron). -* Fix: Fixed an issue where the human/bot detection wasn't functioning. - -= 7.0.4 = -* Fix: Re-added missing file to fix commit excluding it. - -= 7.0.3 - February 12, 2018 = -* Improvement: Added an "All Options" page to enable developers and others to more rapidly configure Wordfence. -* Improvement: Improved messaging for when a page has been open for more than a day and the security token expires. -* Improvement: Relocated the "Always display expanded Live Traffic records" option to be more accessible. -* Improvement: Improved appearance and behavior of option checkboxes. -* Improvement: For plugins with incomplete header information, they're now shown with a fallback title in scan results as appropriate. -* Improvement: The country block rule in the blocks table now shows a count rather than a potentially large list of countries. -* Change: Modified behavior of the advanced country blocking options to always show. -* Fix: Fixed the "Make Permanent" button behavior for blocks created from Live Traffic. -* Fix: Better synchronization of block records to the WAF config to avoid duplicate queries. -* Fix: The diff viewer now forces wrapping to prevent long lines of text from stretching the layout. -* Fix: Fixed an issue where the scanned plugin count could be inaccurate due to forking during the plugin scan. -* Fix: Adjusted sizing on the country blocking options to prevent placeholder text from being cut off at some screen sizes. -* Fix: Block/Unblock now works correctly when viewing Live Traffic with it grouped by IP. -* Fix: Fixed an issue where the count of URLs checked was incorrect. - -= 7.0.2 - January 31, 2018 = -* Improvement: Added CSS/JS filename versioning to address caching plugins not refreshing for plugin updates. -* Improvement: The premium key is no longer prompted for during installation if already present from an earlier version. -* Improvement: Added a check and corresponding notice if the WAF config is unreadable or invalid. -* Improvement: Improved live traffic sizing on smaller screens. -* Improvement: Added tour coverage for live traffic. -* Change: IPs blocked via live traffic now use the configurable how long is an IP blocked setting to match previous behavior. -* Change: Changed the option to enable live traffic to match the wording and style of other options. -* Change: Changed styling on the unknown country display in live traffic to match the common coloring. -* Change: Statistics that do not depend on the WAF for their data now display when it is in learning mode. -* Change: Scan issues that are indicative of a compromised site are moved to the top of the list. -* Change: Changed styling on unselected checkboxes. -* Fix: Quick scans no longer run daily if automatic scheduled scans are disabled. -* Fix: The update check in a quick scan no longer runs if the update check has been turned off for regular scans. -* Fix: Fixed the quick navigation letters in the country picker not scrolling. -* Fix: Fixed editing the country block configuration when there are a large number of other blocks. -* Fix: Addressed an issue where having the country block or a pattern block selected when clicking Make Permanent could break them. -* Fix: Live traffic entries with long user agents no longer cause the table to stretch. -* Fix: Fixed an issue where live traffic would stop loading new records if always display expanded records was on. -* Fix: Suppressed warnings on IP conversion functions when processing potentially incomplete data. -* Fix: Added a check in REST API hooks to avoid defining a constant twice. - -= 7.0.1 - January 24, 2018 = -* Comprehensive UI refresh. -* Improvement: Updated bundled GeoIP database. - -= 6.3.22 - November 30, 2017 = -* Fix: Addressed a warning that could occur on PHP 7.1 when reading php.ini size values. -* Fix: Fixed a warning by adjusting a query to remove old-style variable references. - -= 6.3.21 - November 1, 2017 = -* Improvement: Updated bundled GeoIP database. -* Fix: Fixed a log warning that could occur during the scan for plugins not in the wordpress.org repository. - -= 6.3.20 - October 12, 2017 = -* Improvement: The scan will now alert for a publicly visible .user.ini file. -* Fix: Fixed status code and human/bot tagging of block hit entries for live traffic and the Wordfence Security Network. -* Fix: Added internal throttling to ensure the daily cron does not run too frequently on some hosts. - -= 6.3.19 - September 20, 2017 = -* Emergency Fix: Updated wpdb::prepare calls using %.6f since it is no longer supported. - -= 6.3.18 - September 7, 2017 = -* Improvement: Reduced size of some JavaScript for faster loading. -* Improvement: Better block counting for advanced comment filtering. -* Improvement: Increased logging in debug mode for plugin updates to help resolve issues. -* Fix: Reduced the minimum duration of a scan stage to improve reliability on some hosts. - -= 6.3.17 - August 24, 2017 = -* Improvement: Prepared code for upcoming scan improvement which will greatly increase scan performance by optimizing malware signatures. -* Improvement: Updated the bundled GeoIP database. -* Improvement: Better scan messaging when a publicly-reachable searchreplacedb2.php utility is found. -* Improvement: The no-cache constant for database caching is now set for W3TC for plugin updates and scans. -* Improvement: Added an additional home/siteurl resolution check for WPML installations. - -= 6.3.16 - August 8, 2017 = -* Improvement: Introduced a new scan stage to check for malicious URLs and content within WordPress core, plugin, and theme options. -* Improvement: New scan stage includes a new check for TrafficTrade malware. -* Improvement: Reduced net memory usage during forked scan stages by up to 50%. -* Improvement: Reduced the number of queries executed for some configuration options. -* Improvement: Modified the default allowlisting to include the new core AJAX action in WordPress 4.8.1. -* Fix: Synchronized the scan option names between the main options page and smaller scan options page. -* Fix: Fixed CSS positioning issue for dashboard metabox with IPv6. -* Fix: Fixed a compatibility issue with determining the site's home_url when WPML is installed. - -= 6.3.15 - July 24, 2017 = -* Improvement: Reduced memory usage on scan forking and during the known files scan stage. -* Improvement: Added additional scan options to allow for disabling the blocklist checks while still allowing malware scanning to be enabled. -* Improvement: Added a Wordfence Application Firewall code block for the lsapi variant of LiteSpeed. -* Improvement: Updated the bundled GeoIP database. -* Fix: Added a validation check to IP range allowlisting to avoid log warnings if they're malformed. - -= 6.3.14 - July 17, 2017 = -* Improvement: Introduced smart scan distribution. Scan times are now distributed intelligently across servers to provide consistent server performance. -* Improvement: Introduced light-weight scan that runs frequently to perform checks that do not use any server resources. -* Improvement: If unable to successfully look up the status of an IP claiming to be Googlebot, the hit is now allowed. -* Improvement: Scan issue results for abandoned plugins and unpatched vulnerabilities include more info. -* Fix: Suppressed PHP notice with time formatting when a microtimestamp is passed. -* Fix: Improved binary data to HTML entity conversion to avoid wpdb stripping out-of-range UTF-8 sequences. -* Fix: Added better detection to SSL status, particularly for IIS. -* Fix: Fixed PHP notice in the diff renderer. -* Fix: Fixed typo in lockout alert. - -= 6.3.12 - June 28, 2017 = -* Improvement: Adjusted the password audit to use a better cryptographic padding option. -* Improvement: Improved the option value entry process for the modified files exclusion list. -* Improvement: Added rel="noopener noreferrer" to all external links from the plugin for better interoperability with other scanners. -* Improvement: Added support to the WAF for validating URLs for future use in rules. -* Fix: Time formatting will now correctly handle :30 and :45 time zone offsets. -* Fix: Hosts using mod_lsapi will now be detected as Litespeed for WAF optimization. -* Fix: Added an option to allow automatic updates to function on Litespeed servers that have the global noabort set rather than site-local. -* Fix: Fixed a PHP notice that could occur when running a scan immediately after removing a plugin. - -= 6.3.11 - June 15, 2017 = -* Improvement: The scan will alert for plugins that have not been updated in 2+ years or have been removed from the wordpress.org directory. It will also indicate if there is a known vulnerability. -* Improvement: Added a self-check to the scan to detect if it has stalled. -* Improvement: If WordPress auto-updates while a scan is running, the scan will self-abort and reschedule itself to try again later. -* Improvement: IP-based filtering in Live Traffic can now use wildcards. -* Improvement: Updated the bundled GeoIP database. -* Improvement: Added an anti-crawler feature to the lockout page to avoid crawlers erroneously following the unlock link. -* Improvement: The live traffic "Group By" options now dynamically show the results in a more useful format depending on the option selected. -* Improvement: Improved the unknown core files check to include all extra files in core locations regardless of whether or not the "Scan images, binary, and other files as if they were executable" option is on. -* Improvement: Better wording for the allowlisting IP range error message. -* Fix: Addressed a performance issue on databases with tens of thousands of tables when trying to load the diagnostics page. -* Fix: All dashboard and activity report email times are now displayed in the time zone configured for the WordPress installation. - -= 6.3.10 - June 1, 2017 = -* Improvement: Reduction in overall memory usage and peak memory usage for the scanner. -* Improvement: Support for exporting a list of all blocked and locked out IP addresses. -* Improvement: Updated the WAF's CA certificate bundle. -* Improvement: Updated the browscap database. -* Improvement: Suppressed the automatic HTTP referer added by WordPress for API calls to reduce overall bandwidth usage. -* Improvement: When all issues for a scan stage have been previously ignored, the results now indicate this rather than saying problems were found. -* Fix: Worked around an issue with WordPress caching to allow password audits to succeed on sites with tens of thousands of users. -* Fix: Fixed an IPv6 detection issue with one form of IPv6 address. -* Fix: An empty ignored IP list for WAF alerts no longer creates a PHP notice. -* Fix: Better detection for when to use secure cookies. -* Fix: Fixed a couple issue types that were not able to be permanently ignored. -* Fix: Adjusted the changelog link in the scan results email to work for the new wordpress.org repository. -* Fix: Fixed some broken links in the activity summary email. -* Fix: Fixed a typo in the scan summary text. -* Fix: The increased attack rate emails now correctly identify blocklist blocks. -* Fix: Fixed an issue with the dashboard where it could show the last scan failed when one has never ran. -* Fix: Brute force records are now coalesced when possible prior to sending. - -= 6.3.9 - May 17, 2017 = -* Improvement: Malware signature checking has been better optimized to improve overall speed. -* Improvement: Updated the bundled GeoIP database. -* Improvement: The memory tester now tests up to the configured scan limit rather than a fixed value. -* Improvement: Added a test to the diagnostics page that verifies permissions to the WAF config location. -* Improvement: The diagnostics page now contains a callback test for the server itself. -* Improvement: Updated the styling of dashboard notifications for better separation. -* Improvement: Added additional constants to the diagnostics page. -* Change: Wordfence now enters a read-only mode with its configuration files when run via the 'cli' PHP SAPI on a misconfigured web server to avoid file ownership changing. -* Change: Changed how administrator accounts are detected to compensate for managed WordPress sites that do not have the standard permissions. -* Change: The table list on the diagnostics page is now limited in length to avoid being exceedingly large on big multisite installations. -* Fix: Improved updating of WAF config values to minimize writing to disk. -* Fix: The blocklist's blocked IP records are now correctly trimmed when expired. -* Fix: Added error suppression to the WAF attack data functions to prevent corrupt records from breaking the no-cache headers. -* Fix: Fixed some incorrect documentation links on the diagnostics page. -* Fix: Fixed a typo in a constant on the diagnostics page. - -= 6.3.8 - May 2, 2017 = -* Fix: Addressed an issue that could cause scans to time out on sites with tens of thousands of potential URLs in files, comments, and posts. - -= 6.3.7 - April 25, 2017 = -* Improvement: All URLs are now checked against the Wordfence Domain Blocklist in addition to Google's. -* Improvement: Better page load performance for multisite installations with thousands of tables. -* Improvement: Updated the bundled GeoIP database. -* Improvement: Integrated blocklist blocking statistics into the dashboard for Premium users. -* Fix: Added locking to the automatic update process to ensure non-standard crons don't break Wordfence. -* Fix: Fixed an activation error on multisite installations on very old WordPress versions. -* Fix: Adjusted the behavior of the blocklist toggle for Free users. - -= 6.3.6 - April 5, 2017 = -* Improvement: Optimized the malware signature scan to reduce memory usage. -* Improvement: Optimized the overall scan to make fewer network calls. -* Improvement: Running an update now automatically dismisses the corresponding scan issue if present. -* Improvement: Added a time limit to the live activity status so only current messages are shown. -* Improvement: WAF configuration files are now excluded by default from the recently modified files list in the activity report. -* Improvement: Background pausing for live activity and traffic may now be disabled. -* Improvement: Added additional WAF support to allow us to more easily address false positives. -* Improvement: Blocking pages presented by Wordfence now indicate the source and contain information to help diagnose caching problems. -* Fix: All external URLs in the tour are now https. -* Fix: Corrected a typo in the unlock email template. -* Fix: Fixed the target of a label on the options page. - -= 6.3.5 - March 23, 2017 = -* Improvement: Sites can now specify a list of trusted proxies when using X-Forwarded-For for IP resolution. -* Improvement: Added options to customize which dashboard notifications are shown. -* Improvement: Improvements to the scanner's malware stage to avoid timing out on larger files. -* Improvement: Provided additional no-caching indicators for caches that erroneously save pages with HTTP error status codes. -* Improvement: Updated the bundled GeoIP database. -* Improvement: Optimized the country update process in the upgrade handler so it only updates changed records. -* Improvement: Added our own prefixed version of jQuery.DataTables to avoid conflicts with other plugins. -* Improvement: Changes to readme.txt and readme.md are now ignored by the scanner unless high sensitivity is on. -* Fix: Addressed an issue with multisite installations where they would execute the upgrade handler for each subsite. -* Fix: Added additional error handling to the blocked IP list to avoid outputting notices when another plugin resets the error handler. -* Fix: Made the description in the summary email for blocks resulting from the blocklist more descriptive. -* Fix: Updated the copyright date on several pages. -* Fix: Fixed incorrect wrapping of the Group by field on the live traffic page. - -= 6.3.4 - March 13, 2017 = -* Improvement: Added a path for people blocked by the IP blocklist (Premium Feature) to report false positives. - -= 6.3.3 - March 9, 2017 = -* New: Malicious IPs are now preemptively blocked by a regularly-updated blocklist. [Premium Feature] -* Improvement: Better layout and display for mobile screen sizes. -* Improvement: Dashboard chart data is now updated more frequently. -* Fix: Fixed database errors on notifications page on multisite installations. -* Fix: Fixed site URL detection for multisite installations. -* Fix: Fixed tour popup positioning on multisite. -* Fix: Increased the z-index of the AJAX error watcher alert. -* Fix: Addressed an additional way to enumerate authors with the REST JSON API. - -= 6.3.2 - February 23, 2017 = -* Improvement: Improved the WAF's ability to inspect POST bodies. -* Improvement: Dashboard now shows up to 100 each of failed/successful logins. -* Improvement: Updated internal GeoIP database. -* Improvement: Updated internal browscap database. -* Improvement: Better documentation on Country Blocking regarding Google AdWords -* Advanced: Added constant "WORDFENCE_DISABLE_FILE_VIEWER" to prohibit file-viewing actions from Wordfence. -* Advanced: Added constant "WORDFENCE_DISABLE_LIVE_TRAFFIC" to prohibit live traffic from capturing regular site visits. -* Fix: Fixed a few links that didn't open the correct configuration pages. -* Fix: Unknown countries in the dashboard now show "Unknown" rather than empty. - -= 6.3.1 - February 7, 2017 = -* Improvement: Locked out IPs are now enforced at the WAF level to reduce server load. -* Improvement: Added a "Show more" link to the IP block list and login attempts list. -* Improvement: Added network data for the top countries blocked list. -* Improvement: Added a notification when a premium key is installed on one site but registered for another URL. -* Improvement: Switching tabs in the various pages now updates the page title as well. -* Improvement: Various styling consistency improvements. -* Change: Separated the various blocking-related pages out from the Firewall top-level menu into "Blocking". -* Fix: Improved compatibility with our GeoIP interface. -* Fix: The updates available notification is refreshed after updates are installed. -* Fix: The scan notification is refreshed when issues are resolved or ignored. - -= 6.3.0 - January 26, 2017 = -* Enhancement: Added Wordfence Dashboard for quick overview of security activity. -* Improvement: Simplified the UI by revamping menu structure and styling. -* Fix: Fixed minor issue with REST API user enumeration blocking. -* Fix: Fixed undefined index notices on password audit page. - -= 6.2.10 - January 12, 2017 = -* Improvement: Better reporting for failed brute force login attempts. -* Change: Reworded setting for ignored IPs in the WAF alert email. -* Change: Updated support link on scan page. -* Fix: When a key is in place on multiple sites, it's now possible to downgrade the ones not registered for it. -* Fix: Addressed an issue where the increased attack rate emails would send repeatedly if the threshold value was missing. -* Fix: Typo fix in firewall rule 11 name. - -= 6.2.9 - December 27, 2016 = -* Improvement: Updated internal GeoIP database. -* Improvement: Better error handling when a site is unreachable publicly. -* Fix: Fixed a URL in alert emails that did not correctly detect when sent from a multisite installation. -* Fix: Addressed an issue where the scan did not alert about a new WordPress version. - -= 6.2.8 - December 12, 2016 = -* Improvement: Added support for hiding the username information revealed by the WordPress 4.7 REST API. Thanks Vladimir Smitka. -* Improvement: Added vulnerability scanning for themes. -* Improvement: Reduced memory usage by up to 90% when scanning comments. -* Improvement: Performance improvements for the dashboard widget. -* Improvement: Added progressive loading of addresses on the blocked IP list. -* Improvement: The diagnostics page now displays a config reading/writing test. -* Change: Support for the Falcon cache has been removed. -* Fix: Better messaging when the WAF rules are manually updated. -* Fix: The proxy detection check frequency has been reduced and no longer alerts if the server is unreachable. -* Fix: Adjusted the behavior of parsing the X-Forwarded-For header for better accuracy. Thanks Jason Woods. -* Fix: Typo fix on the options page. -* Fix: Scan issue for known core file now shows the correct links. -* Fix: Links in "unlock" emails now work for IPv6 and IPv4-mapped-IPv6 addresses. -* Fix: Restricted caching of responses from the Wordfence Security Network. -* Fix: Fixed a recording issue with Wordfence Security Network statistics. - -= 6.2.7 - December 1, 2016 = -* Improvement: WordPress 4.7 improvements for the Web Application Firewall. -* Improvement: Updated signatures for hash-based malware detection. -* Improvement: Automatically attempt to detect when a site is behind a proxy and has IP information in a different field. -* Improvement: Added additional contextual help links. -* Improvement: Significant performance improvement for determining the connecting IP. -* Improvement: Better messaging for two-factor recovery codes. -* Fix: Adjusted message when trying to block an IP in the allowlist. -* Fix: Error log download links now work on Windows servers. -* Fix: Avoid running out of memory when viewing very large activity logs. -* Fix: Fixed warning that could be logged when following an unlock email link. -* Fix: Tour popups on options page now scroll into view correctly. - -= 6.2.6 - November 17, 2016 = -* Improvement: Improved formatting of attack data when it contains binary characters. -* Improvement: Updated internal GeoIP database. -* Improvement: Improved the ordering of rules in the malware scan so more specific rules are checked first. -* Fix: Country blocking redirects are no longer allowed to be cached. -* Fix: Fixed an issue with 2FA on multisite where the site could report URLs with different schemes depending on the state of plugin loading. - -= 6.2.5 - November 9, 2016 = -* Fix: Fixed an issue that could occur on older WordPress versions when processing login attempts - -= 6.2.4 - November 9, 2016 = -* Improvement: Scan times for very large sites with huge numbers of files are greatly improved. -* Improvement: Added a configurable time limit for scans to help reduce overall server load and identify configuration problems. -* Improvement: Email-based logins are now covered by "Don't let WordPress reveal valid users in login errors". -* Improvement: Extended rate limiting support to the login page. -* Fix: Fixed a case where files in the site root with issues could have them added multiple times. -* Fix: Improved IP detection in the WAF when using an IP detection method that can have multiple values. -* Fix: Added a safety check for when the database fails to return its max_allowed_packet value. -* Fix: Added safety checks for when the configuration table migration has failed. -* Fix: Added a couple rare failed login error codes to brute force detection. -* Fix: Fixed a sequencing problem when adding detection for bot/human that led to it being called on every request. -* Fix: Suppressed errors if a file is removed between the start of a scan and later scan stages. -* Fix: Addressed a problem where the scan exclusions list was not checked correctly in some situations. - -= 6.2.3 - October 26, 2016 = -* Improvement: Reworked blocking for IP ranges, country blocking, and direct IP blocking to minimize server impact when under attack. -* Improvement: Live traffic better indicates the action taken by country blocking when it redirects a visitor. -* Improvement: Added support for finding server logs to the Diagnostics page to help with troubleshooting. -* Improvement: Allowlisted StatusCake IP addresses. -* Improvement: Updated GeoIP database. -* Improvement: Disabling Wordfence now sends an alert. -* Improvement: Improved detection for uploaded PHP content in the firewall. -* Fix: Eliminated memory-related errors resulting from the scan on sites with very large numbers of issues and low memory. -* Fix: Fixed admin page layout for sites using RTL languages. -* Fix: Reduced overhead of the dashboard widget. -* Fix: Improved performance of checking for Allowlisted IPs. -* Fix: Changes to the default plugin hello.php are now detected correctly in scans. -* Fix: Fixed IPv6 warning in the dashboard widget. - -= 6.2.2 - October 12, 2016 = -* Fix: Replaced a slow query in the dashboard widget that could affect sites with very large numbers of users. - -= 6.2.1 - October 11, 2016 = -* Improvement: Now performing scanning for PHP code in all uploaded files in real-time. -* Improvement: Improved handling of bad characters and IPv6 ranges in Advanced Blocking. -* Improvement: Live traffic and scanning activity now display a paused notice when real-time updates are suspended while in the background. -* Improvement: The file system scan alerts for files flagged by antivirus software with a '.suspected' extension. -* Improvement: New alert option to get notified only when logins are from a new location/device. -* Change: First phase for removing the Falcon cache in place, which will add a notice of its pending removal. -* Fix: Included country flags for Kosovo and Curaçao. -* Fix: Fixed the .htaccess directives used to hide files found by the scanner. -* Fix: Dashboard widget shows correct status for failed logins by deleted users. -* Fix: Removed duplicate issues for modified files in the scan results. -* Fix: Suppressed warning from reverse lookup on IPv6 addresses without valid DNS records. -* Fix: Fixed file inclusion error with themes lacking a 404 page. -* Fix: CSS fixes for activity report email. - -= 6.2.0 - September 27, 2016 = -* Improvement: Massive performance boost in file system scan. -* Improvement: Added low resource usage scan option for shared hosts. -* Improvement: Aggregated login attempts when checking the Wordfence Security Network for brute force attackers to reduce total requests. -* Improvement: Now displaying scan time in a more readable format rather than total seconds. -* Improvement: Added PHP7 compatible .htaccess directives to disable code execution within uploads directory. -* Fix: Added throttling to sync the WAF attack data. -* Fix: Removed unnecessary single quote in copy containing "IP's". -* Fix: Fixed rare, edge case where cron key does not match the key in the database. -* Fix: Fixed bug with regex matching carriage returns in the .htaccess based IP block list. -* Fix: Fixed scans failing in subdirectory sites when updating malware signatures. -* Fix: Fixed infinite loop in scan caused by symlinks. -* Fix: Remove extra slash from "File restored OK" message in scan results. - -= 6.1.17 - September 9, 2016 = -* Fix: Replaced calls to json_decode with our own implentation for hosts without the JSON extension enabled. - -= 6.1.16 - September 8, 2016 = -* Improvement: Now performing malware scanning on all uploaded files in real-time. -* Improvement: Added Web Application Firewall activity to Wordfence summary email. -* Fix: Now using 503 response code in the page displayed when an IP is locked out. -* Fix: `wflogs` directory is now correctly removed on uninstall. -* Fix: Fixed recently introduced bug which caused the Allowlisted 404 URLs feature to no longer work. -* Fix: Added try/catch to uncaught exception thrown when pinging the API key. -* Improvement: Improved performance of the Live Traffic page in Firefox. -* Improvement: Updated GeoIP database. - -= 6.1.15 - August 25, 2016 = -* Improvement: Removed file-based config caching, added support for caching via WordPress's object cache. -* Improvement: Allowlisted Uptime Robot's IP range. -* Fix: Notify users if suPHP_ConfigPath is in their WAF setup, and prompt to update Extended Protection. -* Fix: Fixed bug with allowing logins on admin accounts that are not fully activated with invalid 2FA codes when 2FA is required for all admins. -* Fix: Removed usage of `wp_get_sites()` which was deprecated in WordPress 4.6. -* Fix: Fixed PHP notice from `Undefined index: url` with custom/premium plugins. -* Improvement: Converted the banned URLs input to a textarea. - -= 6.1.14 - August 11, 2016 = -* Improvement: Support downloading a file of 2FA recovery codes. -* Fix: Fixed PHP Notice: Undefined index: coreUnknown during scans. -* Improvement: Add note to options page that login security is necessary for 2FA to work. -* Fix: Fixed WAF false positives introduced with WordPress 4.6. -* Improvement: Update Geo IP database. - -= 6.1.12 - July 26, 2016 = -* Fix: Fixed fatal error on sites running Wordfence 6.1.11 in subdirectory and 6.1.10 or lower in parent directory. -* Fix: Added a few common files to be excluded from unknown WordPress core file scan. - -= 6.1.11 - July 25, 2016 = -* Improvement: Alert on added files to wp-admin, wp-includes. -* Improvement: 2FA is now available via any authenticator program that accepts TOTP secrets. -* Fix: Fixed bug with specific Advanced Blocking user-agent patterns causing 500 errors. -* Improvement: Plugin updates are now only a critical issue if there is a security related fix, and a warning otherwise. A link to the changelog is included. -* Fix: Added group writable permissions to Firewall's configuration files. -* Improvement: Changed allowlist entry area to textbox on options page. -* Fix: Move flags and logo served from wordfence.com over to locally hosted files. -* Fix: Fixed issues with scan in WordPress 4.6 beta. -* Fix: Fixed bug where Firewall rules could be missing on some sites running IIS. -* Improvement: Added browser-based malware signatures for .js, .html files in the malware scan. -* Fix: Added error suppression to `dns_get_record`. - -= 6.1.10 - June 22, 2016 = -* Fix: Fixed fatal error in the event wflogs is not writable. - -= 6.1.9 - June 21, 2016 = -* Fix: Using WP-CLI causes error Undefined index: SERVER_NAME. -* Improvement: Hooked up restore/delete file scan tools to Filesystem API. -* Fix: Reworked country blocking authentication check for access to XMLRPC. -* Improvement: Added option to require cellphone sign-in on all admin accounts. -* Improvement: Updated IPv6 GeoIP lite data. -* Fix: Removed suPHP_ConfigPath from WAF installation process. -* Fix: Prevent author names from being found through /wp-json/oembed. -* Improvement: Added better solutions for fixing wordfence-waf.php, .user.ini, or .htaccess in scan. -* Improvement: Added a method to view which files are currently used for WAF and to remove without reinstalling Wordfence. -* Improvement: Changed rule compilation to use atomic writes. -* Improvement: Removed security levels from Options page. -* Improvement: Added option to disable ajaxwatcher (for allowlisting only for Admins) on the front end. - -= 6.1.8 - May 26, 2016 = -* Fix: Change wfConfig::set_ser to split large objects into multiple queries. -* Fix: Fixed bug in multisite with "You do not have sufficient permissions to access this page" error after logging in. -* Improvement: Update Geo IP database. -* Fix: Fixed deadlock when NFS is used for WAF file storage, in wfWAFAttackDataStorageFileEngine::addRow(). -* Fix: Added third param to http_build_query for hosts with arg_separator.output set. -* Improvement: Show admin notice if WAF blocks an admin (mainly needed for ajax requests). -* Improvement: Clarify error message "Error reading config data, configuration file could be corrupted." -* Improvement: Added better crawler detection. -* Improvement: Add currentUserIsNot('administrator') to any generic firewall rules that are not XSS based. -* Improvement: Update URLs in Wordfence for documentation about LiteSpeed and lockouts. -* Improvement: Show message on scan results when a result is caused by enabling "Scan images and binary files as if they were executable" or... -* Fix: Suppressed warning: dns_get_record(): DNS Query failed. -* Fix: Suppressed warning gzinflate() error in scan logs. -* Fix: On WAF roadblock page: Warning: urlencode() expects parameter 1 to be string, array given ... -* Fix: Scheduled update for WAF rules doesn't decrease from 7 days, to 12 hours, when upgrading to a premium account. -* Improvement: Better message for dashboard widget when no failed logins. - -= 6.1.7 - May 10, 2016 = -* Security Fix: Fixed reflected XSS vulnerability: CVSS 6.1 (Medium). Thanks Kacper Szurek. - -= 6.1.6 - May 9, 2016 = -* Fix: Fixed bug with 2FA not properly handling email address login. -* Fix: Show logins/logouts when Live Traffic is disabled. -* Fix: Fixed bug with PCRE versions < 7.0 (repeated subpattern is too long). -* Fix: Now able to delete allowlisted URL/params containing ampersands and non-UTF8 characters. -* Improvement: Reduced 2FA activation code to expire after 30 days. -* Improvement: Live Traffic now only shows verified Googlebot under Google Crawler filter for new visits. -* Improvement: Adjusted permissions on Firewall log/config files to be 0640. -* Fix: Fixed false positive from Maldet in the wfConfig table during the scan. - -= 6.1.5 - April 28, 2016 = -* Fix: WordPress language files no longer flagged as changed. -* Improvement: Accept wildcards in "Immediately block IP's that access these URLs." -* Fix: Fixed bug when multiple authors have published posts, /?author=N scans show an author archive page. -* Fix: Fixed issue with IPv6 mapped IPv4 addresses not being treated as IPv4. -* Improvement: Added WordPress version and various constants to Diagnostics report. -* Fix: Fixed bug with Windows users unable to save Firewall config. -* Improvement: Include option for IIS on Windows in Firewall config process, and recommend manual php.ini change only. -* Fix: Made the 'administrator email address' admin notice dismissable. - -= 6.1.4 - April 20, 2016 = -* Fix: Fixed potential bug with 'stored data not found after a fork. Got type: boolean'. -* Improvement: Added bulk actions and filters to WAF allowlist table. -* Improvement: Added a check while in learning mode to verify the response is not 404 before whitelising. -* Fix: Added index to attackLogTime. wfHits trimmed on runInstall now. -* Fix: Fixed attack data sync for hosts that cannot use wp-cron. -* Improvement: Use wftest@wordfence.com as the Diagnostics page default email address. -* Improvement: When WFWAF_ENABLED is set to false to disable the firewall, show this on the Firewall page. -* Fix: Prevent warnings when $_SERVER is empty. -* Fix: Bug fix for illegal string offset. -* Fix: Hooked up multibyte string functions to binary safe equivalents. -* Fix: Hooked up reverse IP lookup in Live Traffic. -* Fix: Add the user the web server (or PHP) is currently running as to Diagnostics page. -* Improvement: Pause Live Traffic after scrolling past the first entry. -* Improvement: Move "Permanently block all temporarily blocked IP addresses" button to top of blocked IP list. -* Fix: Added JSON fallback for PHP installations that don't have JSON enabled. - -= 6.1.3 - April 14, 2016 = -* Improvement: Added dismiss button to the Wordfence WAF setup admin notice. -* Fix: Removed .htaccess and .user.ini from publicly accessible config and backup file scan. -* Fix: Removed the disallow file mods for admins created outside of WordPress. -* Fix: Fixed bug with 'Hide WordPress version' causing issues with reCAPTCHA. -* Improvement: Added instructions for NGINX users to restrict access to .user.ini during Firewall configuration. -* Fix: Fixed bug with multiple API calls to 'get_known_files'. - -= 6.1.2 - April 12, 2016 = -* Fix: Fixed fatal error when using a allowlisted IPv6 range and connecting with an IPv6 address. - -= 6.1.1 - April 12, 2016 = -* Enhancement: Added Web Application Firewall -* Enhancement: Added Diagnostics page -* Enhancement: Added new scans: - * Admins created outside of WordPress - * Publicly accessible common (database or wp-config.php) backup files -* Improvement: Updated Live Traffic with filters and to include blocked requests in the feed. - -You can find a [complete changelog](https://www.wordfence.com/help/advanced/changelog/) on our documentation site. diff --git a/wp/wp-content/plugins/wordfence/tmp/.htaccess b/wp/wp-content/plugins/wordfence/tmp/.htaccess deleted file mode 100644 index c9c4d1b9..00000000 --- a/wp/wp-content/plugins/wordfence/tmp/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -deny from all - diff --git a/wp/wp-content/plugins/wordfence/vendor/.htaccess b/wp/wp-content/plugins/wordfence/vendor/.htaccess deleted file mode 100644 index 1fc312f9..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/.htaccess +++ /dev/null @@ -1,16 +0,0 @@ -<IfModule mod_rewrite.c> - RewriteEngine On - RewriteCond %{REQUEST_URI} \.php$ - RewriteRule .* - [F,L,NC] -</IfModule> -<IfModule !mod_rewrite.c> - <FilesMatch "\.php$"> - <IfModule mod_authz_core.c> - Require all denied - </IfModule> - <IfModule !mod_authz_core.c> - Order deny,allow - Deny from all - </IfModule> - </FilesMatch> -</IfModule> \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/autoload.php b/wp/wp-content/plugins/wordfence/vendor/autoload.php deleted file mode 100644 index ad89da87..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/autoload.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -// autoload.php @generated by Composer - -if (!class_exists('ComposerAutoloaderInit736008d0fa54169b3444ae0f3fc20155')) { - require_once __DIR__ . '/composer/autoload_real.php'; -} - -return ComposerAutoloaderInit736008d0fa54169b3444ae0f3fc20155::getLoader(); diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/ClassLoader.php b/wp/wp-content/plugins/wordfence/vendor/composer/ClassLoader.php deleted file mode 100644 index 6d0c3f2d..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/ClassLoader.php +++ /dev/null @@ -1,481 +0,0 @@ -<?php - -/* - * This file is part of Composer. - * - * (c) Nils Adermann <naderman@naderman.de> - * Jordi Boggiano <j.boggiano@seld.be> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Jordi Boggiano <j.boggiano@seld.be> - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - private $vendorDir; - - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - private static $registeredLoaders = array(); - - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/InstalledVersions.php b/wp/wp-content/plugins/wordfence/vendor/composer/InstalledVersions.php deleted file mode 100644 index b3a4e161..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,337 +0,0 @@ -<?php - -/* - * This file is part of Composer. - * - * (c) Nils Adermann <naderman@naderman.de> - * Jordi Boggiano <j.boggiano@seld.be> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require it's presence, you can require `composer-runtime-api ^2.0` - */ -class InstalledVersions -{ - private static $installed; - private static $canGetVendors; - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list<string> - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list<string> - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints($constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - $installed[] = self::$installed; - - return $installed; - } -} diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/LICENSE b/wp/wp-content/plugins/wordfence/vendor/composer/LICENSE deleted file mode 100644 index f27399a0..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_classmap.php b/wp/wp-content/plugins/wordfence/vendor/composer/autoload_classmap.php deleted file mode 100644 index b26f1b13..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -// autoload_classmap.php @generated by Composer - -$vendorDir = dirname(dirname(__FILE__)); -$baseDir = dirname($vendorDir); - -return array( - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', -); diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_namespaces.php b/wp/wp-content/plugins/wordfence/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc0125..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -// autoload_namespaces.php @generated by Composer - -$vendorDir = dirname(dirname(__FILE__)); -$baseDir = dirname($vendorDir); - -return array( -); diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_psr4.php b/wp/wp-content/plugins/wordfence/vendor/composer/autoload_psr4.php deleted file mode 100644 index 7897445b..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -// autoload_psr4.php @generated by Composer - -$vendorDir = dirname(dirname(__FILE__)); -$baseDir = dirname($vendorDir); - -return array( - 'Wordfence\\MmdbReader\\' => array($vendorDir . '/wordfence/mmdb-reader/src'), -); diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_real.php b/wp/wp-content/plugins/wordfence/vendor/composer/autoload_real.php deleted file mode 100644 index b5ae020b..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_real.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -// autoload_real.php @generated by Composer - -class ComposerAutoloaderInit736008d0fa54169b3444ae0f3fc20155 -{ - private static $loader; - - public static function loadClassLoader($class) - { - if ('Composer\Autoload\ClassLoader' === $class) { - require __DIR__ . '/ClassLoader.php'; - } - } - - /** - * @return \Composer\Autoload\ClassLoader - */ - public static function getLoader() - { - if (null !== self::$loader) { - return self::$loader; - } - - spl_autoload_register(array('ComposerAutoloaderInit736008d0fa54169b3444ae0f3fc20155', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit736008d0fa54169b3444ae0f3fc20155', 'loadClassLoader')); - - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit736008d0fa54169b3444ae0f3fc20155::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_static.php b/wp/wp-content/plugins/wordfence/vendor/composer/autoload_static.php deleted file mode 100644 index 8a9c362e..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/autoload_static.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -// autoload_static.php @generated by Composer - -namespace Composer\Autoload; - -class ComposerStaticInit736008d0fa54169b3444ae0f3fc20155 -{ - public static $prefixLengthsPsr4 = array ( - 'W' => - array ( - 'Wordfence\\MmdbReader\\' => 21, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Wordfence\\MmdbReader\\' => - array ( - 0 => __DIR__ . '/..' . '/wordfence/mmdb-reader/src', - ), - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit736008d0fa54169b3444ae0f3fc20155::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit736008d0fa54169b3444ae0f3fc20155::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit736008d0fa54169b3444ae0f3fc20155::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/installed.json b/wp/wp-content/plugins/wordfence/vendor/composer/installed.json deleted file mode 100644 index 6e4f23b0..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/installed.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "packages": [ - { - "name": "wordfence/mmdb-reader", - "version": "v1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "git@github.com:wordfence/mmdb-reader.git", - "reference": "f72435e75f6654da08c2f0983e527cb207ef1f2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wordfence/mmdb-reader/zipball/f72435e75f6654da08c2f0983e527cb207ef1f2a", - "reference": "f72435e75f6654da08c2f0983e527cb207ef1f2a", - "shasum": "" - }, - "time": "2022-09-23T20:02:31+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Wordfence\\MmdbReader\\": "src/" - } - }, - "license": [ - "proprietary" - ], - "authors": [ - { - "name": "Alex Kenion", - "email": "alexk@wordfence.com" - } - ], - "description": "A MaxMind DB (MMDB) reader with no external dependencies that provides support for a wider range of PHP versions than the official library", - "support": { - "source": "https://github.com/wordfence/mmdb-reader/tree/v1.0.0", - "issues": "https://github.com/wordfence/mmdb-reader/issues" - }, - "install-path": "../wordfence/mmdb-reader" - }, - { - "name": "wordfence/wf-waf", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/wordfence/wf-waf.git", - "reference": "origin/master" - }, - "dist": { - "type": "zip", - "url": "https://github.com/wordfence/wf-waf/zipball/master", - "reference": "origin/master" - }, - "type": "library", - "installation-source": "source", - "install-path": "../wordfence/wf-waf" - } - ], - "dev": true, - "dev-package-names": [] -} diff --git a/wp/wp-content/plugins/wordfence/vendor/composer/installed.php b/wp/wp-content/plugins/wordfence/vendor/composer/installed.php deleted file mode 100644 index d637ae0e..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/composer/installed.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php return array( - 'root' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => 'f7e640f16c0caa9077e4eaf4f42a42c9d1c76a05', - 'name' => '__root__', - 'dev' => true, - ), - 'versions' => array( - '__root__' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'type' => 'library', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => 'f7e640f16c0caa9077e4eaf4f42a42c9d1c76a05', - 'dev_requirement' => false, - ), - 'wordfence/mmdb-reader' => array( - 'pretty_version' => 'v1.0.0', - 'version' => '1.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../wordfence/mmdb-reader', - 'aliases' => array(), - 'reference' => 'f72435e75f6654da08c2f0983e527cb207ef1f2a', - 'dev_requirement' => false, - ), - 'wordfence/wf-waf' => array( - 'pretty_version' => '1.0.0', - 'version' => '1.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../wordfence/wf-waf', - 'aliases' => array(), - 'reference' => 'origin/master', - 'dev_requirement' => false, - ), - ), -); diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/ControlByte.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/ControlByte.php deleted file mode 100644 index 9dd69bc9..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/ControlByte.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -class ControlByte { - - const TYPE_EXTENDED = 0; - const TYPE_POINTER = 1; - const TYPE_UTF8_STRING = 2; - const TYPE_DOUBLE = 3; - const TYPE_BYTES = 4; - const TYPE_UINT16 = 5; - const TYPE_UINT32 = 6; - const TYPE_MAP = 7; - const TYPE_INT32 = 8; - const TYPE_UINT64 = 9; - const TYPE_UINT128 = 10; - const TYPE_ARRAY = 11; - const TYPE_CONTAINER = 12; - const TYPE_END_MARKER = 13; - const TYPE_BOOLEAN = 14; - const TYPE_FLOAT = 15; - - const EXTENSION_OFFSET = 7; - const SIZE_MASK = 31; - const MAX_SINGLE_BYTE_SIZE = 28; - - private $type; - private $size; - - public function __construct($type, $size) { - $this->type = $type; - $this->size = $size; - } - - public function getType() { - return $this->type; - } - - public function getTypeName() { - return self::mapTypeName($this->getType()); - } - - public function getSize() { - return $this->size; - } - - public function is($type) { - return $this->type === $type; - } - - public static function consume($handle) { - $byte = $handle->readByte(); - $type = $byte >> 5; - if ($type === self::TYPE_EXTENDED) - $type = $handle->readByte() + self::EXTENSION_OFFSET; - $size = $byte & self::SIZE_MASK; - if ($size > self::MAX_SINGLE_BYTE_SIZE) { - $bytes = $size - self::MAX_SINGLE_BYTE_SIZE; - switch ($size) { - case 30: - $size = 285; - break; - case 31: - $size = 65821; - break; - default: - break; - } - $size += IntegerParser::parseUnsigned($handle, $bytes); - } - return new self($type, $size); - } - - public static function mapTypeName($type) { - switch ($type) { - case self::TYPE_EXTENDED: - return 'TYPE_EXTENDED'; - case self::TYPE_POINTER: - return 'TYPE_POINTER'; - case self::TYPE_UTF8_STRING: - return 'TYPE_UTF8_STRING'; - case self::TYPE_DOUBLE: - return 'TYPE_DOUBLE'; - case self::TYPE_BYTES: - return 'TYPE_BYTES'; - case self::TYPE_UINT16: - return 'TYPE_UINT16'; - case self::TYPE_UINT32: - return 'TYPE_UINT32'; - case self::TYPE_MAP: - return 'TYPE_MAP'; - case self::TYPE_INT32: - return 'TYPE_INT32'; - case self::TYPE_UINT64: - return 'TYPE_UINT64'; - case self::TYPE_UINT128: - return 'TYPE_UINT128'; - case self::TYPE_ARRAY: - return 'TYPE_ARRAY'; - case self::TYPE_CONTAINER: - return 'TYPE_CONTAINER'; - case self::TYPE_END_MARKER: - return 'TYPE_END_MARKER'; - case self::TYPE_BOOLEAN: - return 'TYPE_BOOLEAN'; - case self::TYPE_FLOAT: - return 'TYPE_FLOAT'; - default: - return 'UNKNOWN'; - } - } - - public function __toString() { - return sprintf('%s(%d) of size %d', $this->getTypeName(), $this->getType(), $this->getSize()); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/DataFieldParser.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/DataFieldParser.php deleted file mode 100644 index 2f0c8471..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/DataFieldParser.php +++ /dev/null @@ -1,167 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -use Wordfence\MmdbReader\Exception\FormatException; -use Wordfence\MmdbReader\Exception\InvalidArgumentException; - -class DataFieldParser { - - private $handle; - private $sectionOffset; - - public function __construct($handle, $sectionOffset = null) { - $this->handle = $handle; - $this->sectionOffset = $sectionOffset === null ? $this->handle->getPosition() : $sectionOffset; - } - - public function processControlByte() { - return ControlByte::consume($this->handle); - } - - private function readStandardField($controlByte) { - $size = $controlByte->getSize(); - if ($size === 0) - return ''; - return $this->handle->read($size); - } - - private function parseUtf8String($controlByte) { - return $this->readStandardField($controlByte); - } - - private function parseUnsignedInteger($controlByte) { - //TODO: Does this handle large-enough values gracefully? - return IntegerParser::parseUnsigned($this->handle, $controlByte->getSize()); - } - - private function parseMap($controlByte) { - $map = array(); - for ($i = 0; $i < $controlByte->getSize(); $i++) { - $keyByte = $this->processControlByte(); - $key = $this->parseField($keyByte); - if (!is_string($key)) - throw new FormatException('Map keys must be strings, received ' . $keyByte . ' / ' . print_r($key, true) . ', map: ' . print_r($map, true)); - $value = $this->parseField(); - $map[$key] = $value; - } - return $map; - } - - private function parseArray($controlByte) { - $array = array(); - for ($i = 0; $i < $controlByte->getSize(); $i++) { - $array[$i] = $this->parseField(); - } - return $array; - } - - private function parseBoolean($controlByte) { - return (bool) $controlByte->getSize(); - } - - private static function unpackSingleValue($format, $data, $controlByte) { - $values = unpack($format, $data); - if ($values === false) - throw new FormatException("Unpacking field failed for {$controlByte}"); - return reset($values); - } - - private static function getPackedLength($formatCharacter) { - switch ($formatCharacter) { - case 'E': - return 8; - case 'G': - case 'l': - return 4; - } - throw new InvalidArgumentException("Unsupported format character: {$formatCharacter}"); - } - - private static function usesSystemByteOrder($formatCharacter) { - switch ($formatCharacter) { - case 'l': - return true; - default: - return false; - } - } - - private function parseByUnpacking($controlByte, $format) { - //TODO: Is this reliable for float/double types, considering that the size for unpack is platform dependent? - $data = $this->readStandardField($controlByte); - $data = str_pad($data, self::getPackedLength($format), "\0", STR_PAD_LEFT); - if (self::usesSystemByteOrder($format)) - $data = Endianness::convert($data, Endianness::BIG); - return $this->unpackSingleValue($format, $data, $controlByte); - } - - private function parsePointer($controlByte) { - $data = $controlByte->getSize(); - $size = $data >> 3; - $address = $data & 7; - if ($size === 3) - $address = 0; - for ($i = 0; $i < $size + 1; $i++) { - $address = ($address << 8) + $this->handle->readByte(); - } - switch ($size) { - case 1: - $address += 2048; - break; - case 2: - $address += 526336; - break; - } - $previous = $this->handle->getPosition(); - $this->handle->seek($this->sectionOffset + $address, SEEK_SET); - $referenceControlByte = $this->processControlByte(); - if ($referenceControlByte->getType() === ControlByte::TYPE_POINTER) - throw new FormatException('Per the MMDB specification, pointers may not point to other pointers. This database does not comply with the specification.'); - $value = $this->parseField($referenceControlByte); - $this->handle->seek($previous, SEEK_SET); - return $value; - } - - private function parseSignedInteger($controlByte, $format) { - if ($controlByte->getSize() === 0) - return 0; - return $this->parseByUnpacking($controlByte, $format); - } - - public function parseField(&$controlByte = null) { - if ($controlByte === null) - $controlByte = $this->processControlByte(); - switch ($controlByte->getType()) { - case ControlByte::TYPE_POINTER: - return $this->parsePointer($controlByte); - case ControlByte::TYPE_UTF8_STRING: - return $this->parseUtf8String($controlByte); - case ControlByte::TYPE_DOUBLE: - $this->parseByUnpacking($controlByte, 'E'); - case ControlByte::TYPE_BYTES: - case ControlByte::TYPE_CONTAINER: - return $this->readStandardField($controlByte); - case ControlByte::TYPE_UINT16: - case ControlByte::TYPE_UINT32: - case ControlByte::TYPE_UINT64: - case ControlByte::TYPE_UINT128: - return $this->parseUnsignedInteger($controlByte); - case ControlByte::TYPE_INT32: - return $this->parseSignedInteger($controlByte, 'l'); - case ControlByte::TYPE_MAP: - return $this->parseMap($controlByte); - case ControlByte::TYPE_ARRAY: - return $this->parseArray($controlByte); - case ControlByte::TYPE_END_MARKER: - return null; - case ControlByte::TYPE_BOOLEAN: - return $this->parseBoolean($controlByte); - case ControlByte::TYPE_FLOAT: - $this->parseByUnpacking($controlByte, 'G'); - default: - throw new FormatException("Unable to parse data field for {$controlByte}"); - } - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Database.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Database.php deleted file mode 100644 index e1f11ab1..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Database.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -use Wordfence\MmdbReader\Exception\FormatException; -use Wordfence\MmdbReader\Exception\IncompatibleIpVersionException; -use Wordfence\MmdbReader\Exception\IncompatibleVersionException; -use Wordfence\MmdbReader\Exception\InvalidIpAddressException; -use Wordfence\MmdbReader\Exception\IoException; -use Wordfence\MmdbReader\Io\FileHandle; - -class Database { - - const SUPPORTED_MAJOR_VERSION = 2; - const DELIMITER_METADATA = "\xab\xcd\xefMaxMind.com"; - - private $handle; - private $metadata; - private $nodeSize; - private $nodeReader; - private $dataSectionParser; - private $startingNodes = array(); - - /** - * Bind to a MaxMind database using the provided handle - * @param resource $resource a valid stream resource that can be used to read the database - * @param bool $closeAutomtically if true, the provided resource will be closed automatically - * @throws MmdbThrowable if an error occurs while interacting with the database - */ - protected function __construct($resource, $closeAutomatically) { - $this->handle = new FileHandle($resource, $closeAutomatically); - $this->initialize(); - } - - private function initialize() { - $this->loadMetadata(); - } - - private function loadMetadata() { - $this->handle->seek(0, SEEK_END); - $position = $this->handle->locateString(self::DELIMITER_METADATA, FileHandle::DIRECTION_REVERSE, DatabaseMetadata::MAX_LENGTH, true); - if ($position === null) - throw new FormatException("Unable to locate metadata in MMDB file"); - $this->metadata = DatabaseMetadata::parse($this->handle); - if ($this->metadata->getMajorVersion() !== self::SUPPORTED_MAJOR_VERSION) - throw new IncompatibleVersionException(sprintf('This library only supports parsing version %d of the MMDB format, a version %d database was provided', self::SUPPORTED_MAJOR_VERSION, $this->metadata->getMajorVersion())); - } - - private function computeNodeSize() { - $nodeSize = ($this->metadata->getRecordSize() * 2) / 8; - if (!is_int($nodeSize)) - throw new FormatException("Node size must be an even number of bytes, computed {$this->nodeSize}"); - return $nodeSize; - } - - private function getNodeReader() { - if ($this->nodeReader === null) - $this->nodeReader = new NodeReader($this->handle, $this->computeNodeSize(), $this->metadata->getNodeCount()); - return $this->nodeReader; - } - - private function getDataSectionParser() { - if ($this->dataSectionParser === null) { - $offset = $this->getNodeReader()->getSearchTreeSectionSize() + 16; //16 null bytes separate the two sections - $this->dataSectionParser = new DataFieldParser($this->handle, $offset); - } - return $this->dataSectionParser; - } - - /** - * Retrieve the metadata for this database - * @return DatabaseMetadata - */ - public function getMetadata() { - return $this->metadata; - } - - /** - * Search the database for the given IP address - * @param IpAddressInterface|string $ip the IP address for which to search - * A human readable (as accepted by inet_pton) or binary (as accepted by inet_ntop) string may be provided or an instance of IpAddressInterface - * @return array|null the matched record or null if no record was found - * @throws InvalidIpAddressException if $ip is a string that cannot be parsed as a valid IP address - * @throws IncompatibleVersionException if the database IP version and the version of the provided IP address are incompatible (specifically, if an IPv6 address is passed and the database only supports IPv4) - */ - public function search($ip) { - if (is_string($ip)) { - $ip = IpAddress::createFromString($ip); - } - elseif (!$ip instanceof IpAddressInterface) { - throw new InvalidIpAddressException('IP address must be either a human readable string (presentation format), a binary string (network format), or an instance of Wordfence\MmdbReader\IpAddressInterface, received: ' . print_r($ip, true)); - } - if ($this->metadata->getIpVersion() === IpAddress::TYPE_IPV4 && $ip->getType() === IpAddress::TYPE_IPV6) - throw new IncompatibleIpVersionException('This database only support IPv4 addresses, but the provided address is an IPv6 address'); - return $this->searchNodes($ip); - } - - private function resolveStartingNode($type) { - $node = $this->getNodeReader()->read(0); - if ($type === IpAddress::TYPE_IPV4 && $this->metadata->getIpVersion() === IpAddress::TYPE_IPV6) { - $skippedBits = (IpAddress::LENGTH_IPV6 - IpAddress::LENGTH_IPV4) * 8; - while ($skippedBits-- > 0) { - $record = $node->getLeft(); - if ($record->isNodePointer()) { - $node = $record->getNextNode(); - } - else { - return $record; - } - } - } - return $node; - } - - private function getStartingNode($type) { - if (!array_key_exists($type, $this->startingNodes)) { - $this->startingNodes[$type] = $this->resolveStartingNode($type); - } - return $this->startingNodes[$type]; - } - - private function searchNodes($ip) { - $key = $ip->getBinary(); - $byteCount = strlen($key); - $nodeReader = $this->getNodeReader(); - $node = $this->getStartingNode($ip->getType()); - $bits = ''; - $record = null; - if ($node instanceof Node) { - for ($byteIndex = 0; $byteIndex < $byteCount; $byteIndex++) { - $byte = ord($key[$byteIndex]); - for ($bitOffset = 7; $bitOffset >= 0; $bitOffset--) { - $bit = ($byte >> $bitOffset) & 1; - $record = $node->getRecord($bit); - if ($record->isNodePointer()) { - $node = $record->getNextNode(); - } - else { - break 2; - } - } - } - } - else { - $record = $node; - } - if ($record->isNullPointer()) { - return null; - } - elseif ($record->isDataPointer()) { - $this->handle->seek($record->getDataAddress(), SEEK_SET); - $data = $this->getDataSectionParser()->parseField(); - return $data; - } - else { - return null; - } - } - - /** - * Open the MMDB file at the given path - * @param string $path the path of an MMDB file - * @throws IoException if unable to open the file at the provided path - * @throws MmdbThrowable if an error occurs while initializing the database - */ - public static function open($path) { - $handle = fopen($path, 'rb'); - if ($handle === false) - throw new IoException("Unable to open MMDB file at {$path}"); - return new self($handle, true); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/DatabaseMetadata.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/DatabaseMetadata.php deleted file mode 100644 index d48ab43a..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/DatabaseMetadata.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -use Wordfence\MmdbReader\Exception\FormatException; - -class DatabaseMetadata { - - const MAX_LENGTH = 131072; //128 * 1024; - - const FIELD_MAJOR_VERSION = 'binary_format_major_version'; - const FIELD_NODE_COUNT = 'node_count'; - const FIELD_RECORD_SIZE = 'record_size'; - const FIELD_IP_VERSION = 'ip_version'; - const FIELD_BUILD_EPOCH = 'build_epoch'; - - private $data; - - public function __construct($data) { - $this->data = $data; - } - - private function getField($key, $default = null, &$exists = null) { - if (!array_key_exists($key, $this->data)) { - $exists = false; - return $default; - } - $exists = true; - return $this->data[$key]; - } - - private function requireField($key) { - $value = $this->getField($key, null, $exists); - if (!$exists) - throw new FormatException("Metadata field {$key} is missing"); - return $value; - } - - public function requireInteger($key) { - $value = $this->requireField($key); - if (!is_int($value)) - throw new FormatException("Field {$key} should be an integer, received: " . print_r($value, true)); - return $value; - } - - public function getMajorVersion() { - return $this->requireInteger(self::FIELD_MAJOR_VERSION); - } - - public function getNodeCount() { - return $this->requireInteger(self::FIELD_NODE_COUNT); - } - - public function getRecordSize() { - return $this->requireInteger(self::FIELD_RECORD_SIZE); - } - - public function getIpVersion() { - return $this->requireInteger(self::FIELD_IP_VERSION); - } - - public function getBuildEpoch() { - return $this->requireInteger(self::FIELD_BUILD_EPOCH); - } - - public static function parse($handle) { - $offset = $handle->getPosition(); - $parser = new DataFieldParser($handle, $offset); - $value = $parser->parseField(); - if (!is_array($value)) - throw new FormatException('Unexpected field type found when metadata map was expected: ' . print_r($value, true)); - return new self($value); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Endianness.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Endianness.php deleted file mode 100644 index 2f5199f1..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Endianness.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -class Endianness { - - const BIG = 0; - const LITTLE = 1; - - private static $SYSTEM = null; - - private static function detect() { - $test = unpack('S', "\x00\x01"); - return $test[1] >> 8; - } - - public static function get() { - if (self::$SYSTEM === null) - self::$SYSTEM = self::detect(); - return self::$SYSTEM; - } - - public static function isBig() { - return self::get() === self::BIG; - } - - public static function isLittle() { - return self::get() === self::LITTLE; - } - - public static function convert($value, $source, $target = null) { - if ($target === null) - $target = self::get(); - if ($target === $source) - return $value; - return strrev($value); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/FormatException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/FormatException.php deleted file mode 100644 index 6e72af43..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/FormatException.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class FormatException extends RuntimeMmdbException { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IncompatibleIpVersionException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IncompatibleIpVersionException.php deleted file mode 100644 index 5133385b..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IncompatibleIpVersionException.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class IncompatibleIpVersionException extends MmdbException { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IncompatibleVersionException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IncompatibleVersionException.php deleted file mode 100644 index dccc8d93..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IncompatibleVersionException.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class IncompatibleVersionException extends RuntimeMmdbException { - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidArgumentException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidArgumentException.php deleted file mode 100644 index 301ada38..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class InvalidArgumentException extends MmdbException { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidIpAddressException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidIpAddressException.php deleted file mode 100644 index 9ba5f4d4..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidIpAddressException.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class InvalidIpAddressException extends MmdbException { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidOperationException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidOperationException.php deleted file mode 100644 index 3452ea0b..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/InvalidOperationException.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class InvalidOperationException extends MmdbException { - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IoException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IoException.php deleted file mode 100644 index 1fc68c09..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/IoException.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -class IoException extends RuntimeMmdbException { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/MmdbException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/MmdbException.php deleted file mode 100644 index 68144919..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/MmdbException.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -use Exception; -use Throwable; - -class MmdbException extends Exception implements MmdbThrowable { - - /** - * @param string $message - * @param ?Throwable $previous - */ - public function __construct($message, $previous = null) { - parent::__construct($message, 0, $previous); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/MmdbThrowable.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/MmdbThrowable.php deleted file mode 100644 index f487e7af..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/MmdbThrowable.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -use Throwable; - -interface MmdbThrowable extends Throwable { -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/RuntimeMmdbException.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/RuntimeMmdbException.php deleted file mode 100644 index 031e10a3..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Exception/RuntimeMmdbException.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Exception; - -use RuntimeException; -use Throwable; - -class RuntimeMmdbException extends RuntimeException implements MmdbThrowable { - - /** - * @param string $message - * @param ?Throwable $previous - */ - public function __construct($message, $previous = null) { - parent::__construct($message, 0, $previous); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IntegerParser.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IntegerParser.php deleted file mode 100644 index f9367ddf..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IntegerParser.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -class IntegerParser { - - public static function parseUnsigned($handle, $length) { - $value = 0; - for ($i = 0; $i < $length; $i++) { - $byte = $handle->readByte(); - $value = ($value << 8) + $byte; - } - return $value; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Io/FileHandle.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Io/FileHandle.php deleted file mode 100644 index 0b4024b6..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Io/FileHandle.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader\Io; - -use Wordfence\MmdbReader\Exception\IoException; - -class FileHandle { - - const POSITION_START = 0; - - const DIRECTION_FORWARD = 1; - const DIRECTION_REVERSE = -1; - - const CHUNK_SIZE_DEFAULT = 1024; - - private $resource; - private $close; - - public function __construct($resource, $close = true) { - $this->resource = $resource; - $this->close = $close; - } - - public function __destruct() { - if ($this->close) - fclose($this->resource); - } - - public function seek($offset, $whence = SEEK_SET) { - if (fseek($this->resource, $offset, $whence) !== 0) - throw new IoException("Seeking file to offset {$offset} failed"); - } - - public function getPosition() { - $position = ftell($this->resource); - if ($position === false) - throw new IoException('Retrieving current position in file failed'); - return $position; - } - - public function isAtStart() { - return $this->getPosition() === self::POSITION_START; - } - - public function isAtEnd() { - return feof($this->resource); - } - - public function read($length) { - $read = fread($this->resource, $length); - if ($read === false) - throw new IoException("Reading {$length} byte(s) from file failed"); - return $read; - } - - public function readByte() { - return ord($this->read(1)); - } - - public function readAll($chunkSize = self::CHUNK_SIZE_DEFAULT) { - $data = ''; - do { - $chunk = $this->read($chunkSize); - if (empty($chunk)) - break; - $data .= $chunk; - } while (true); - return $data; - } - - public function locateString($string, $direction, $limit = null, $after = false) { - $searchStart = $limit === null ? null : $this->getPosition(); - $length = strlen($string); - $position = $searchStart; - if ($direction === self::DIRECTION_REVERSE) - $position -= $length; - do { - try { - $this->seek($position, SEEK_SET); - } - catch (IoException $e) { - //This assumes that a seek failure means that the target position is out of range (and hence the search just needs to stop rather than throwing an exception) - break; - } - $test = $this->read($length); - if ($test === $string) { - return $position + ($after ? $length : 0); - } - $position += $direction; - } while ($limit === null || abs($position - $searchStart) < $limit); - return null; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IpAddress.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IpAddress.php deleted file mode 100644 index 9ce5fe11..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IpAddress.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -use Wordfence\MmdbReader\Exception\InvalidIpAddressException; - -class IpAddress implements IpAddressInterface { - - const TYPE_IPV4 = 4; - const TYPE_IPV6 = 6; - - const LENGTH_IPV4 = 4; - const LENGTH_IPV6 = 16; - - const SEPARATOR_IPV4 = '.'; - const SEPARATOR_IPV6 = ':'; - - private static $SEPARATORS = array( - self::SEPARATOR_IPV4, - self::SEPARATOR_IPV6 - ); - - private $humanReadable; - private $binary; - private $type; - - protected function __construct($humanReadable, $binary) { - $this->humanReadable = $humanReadable; - $this->binary = $binary; - $this->type = self::resolveType($binary); - } - - public function getHumanReadable() { - return $this->humanReadable; - } - - public function getBinary() { - return $this->binary; - } - - public function getType() { - return $this->type; - } - - private static function resolveType($binary) { - return strlen($binary) === self::LENGTH_IPV6 ? self::TYPE_IPV6 : self::TYPE_IPV4; - } - - /** - * Create an IpAddress instance from a human-readable string - * @param string $humanReadable a human readable IP address - * @return IpAddress - * @throws InvalidIpAddressException if $humanReadable is not a valid human-readable IP address - */ - public static function createFromHumanReadable($humanReadable) { - $binary = inet_pton($humanReadable); - if ($binary === false) - throw new InvalidIpAddressException("IP address \"{$humanReadable}\" is malformed"); - return new self($humanReadable, $binary); - } - - /** - * Create an IpAddress instance from a binary string - * @param string $binary a binary IP address - * @return IpAddress - * @throws InvalidIpAddressException if $binary is not a valid binary IP address - */ - public static function createFromBinary($binary) { - $humanReadable = inet_ntop($binary); - if ($humanReadable === false) - throw new InvalidIpAddressException("Binary IP address data is invalid: " . bin2hex($binary)); - return new self($humanReadable, $binary); - } - - /** - * Create an IpAddress instance from an unknown string representation - * @param string $string either a human-readable or binary IP address - * @return IpAddress - * @throws InvalidIpAddressException if $string cannot be parsed as a valid IP address - */ - public static function createFromString($string) { - foreach (self::$SEPARATORS as $separator) { - if (strpos($string, $separator) !== false) { - try { - return self::createFromHumanReadable($string); - } - catch (InvalidIpAddressException $e) { - break; - } - } - } - return self::createFromBinary($string); - } - - public function __toString() { - return $this->getHumanReadable(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IpAddressInterface.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IpAddressInterface.php deleted file mode 100644 index 9d6a8d11..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/IpAddressInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -interface IpAddressInterface { - - /** - * Get the human-readable (presentation format) version of the address - * @return string - * @see inet_ntop - */ - public function getHumanReadable(); - - /** - * Get the binary (network format) version of the address - * @return string - * @see inet_pton - */ - public function getBinary(); - - /** - * Get the type of the address (IPv4 or IPv6) - * @return int 4 for IPv4 and 6 for IPv6 - */ - public function getType(); - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Node.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Node.php deleted file mode 100644 index d1573e69..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/Node.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -class Node { - - const SIDE_LEFT = 0; - const SIDE_RIGHT = 1; - - private $reader; - private $data; - private $left, $right; - - public function __construct($reader, $data) { - $this->reader = $reader; - $this->data = $data; - } - - public function getRecord($side) { - $value = $this->reader->extractRecord($this->data, $side); - return new NodeRecord($this->reader, $value); - } - - public function getLeft() { - return $this->getRecord(self::SIDE_LEFT); - } - - public function getRight() { - return $this->getRecord(self::SIDE_RIGHT); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/NodeReader.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/NodeReader.php deleted file mode 100644 index 96701633..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/NodeReader.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -class NodeReader { - - const SHARED_MASK_LEFT = 240; //0b11110000 - const SHARED_MASK_RIGHT = 15; //0b00001111 - - private $handle; - private $nodeSize, $nodeCount; - private $searchTreeSectionSize; - private $recordWholeBytes, $recordBits; - private $sharedByteOffset; - - public function __construct($handle, $nodeSize, $nodeCount) { - $this->handle = $handle; - $this->nodeSize = $nodeSize; - $this->nodeCount = $nodeCount; - $this->searchTreeSectionSize = $nodeSize * $nodeCount; - $this->computeRecordSizes(); - } - - private function computeRecordSizes() { - $this->recordWholeBytes = (int) ($this->nodeSize / 2); - $this->recordBits = $this->nodeSize % 2; - if ($this->recordBits > 0) - $this->sharedByteOffset = $this->recordWholeBytes + 1; - } - - public function read($position = 0) { - if ($position > $this->nodeCount) - throw new InvalidOperationException("Read requested for node at {$position}, but only {$this->nodeCount} nodes are present"); - $offset = $position * $this->nodeSize; - $this->handle->seek($offset, SEEK_SET); - $data = $this->handle->read($this->nodeSize); - return new Node($this, $data); - } - - private function hasSharedByte() { - return $this->sharedByteOffset !== null; - } - - private function getWholeByteOffset($side) { - return $side === Node::SIDE_LEFT ? 0 : ($this->hasSharedByte() ? $this->sharedByteOffset : $this->recordWholeBytes); - } - - public function extractRecord($nodeData, $side) { - if ($this->hasSharedByte()) { - $sharedByte = ord($nodeData[$this->sharedByteOffset]); - if ($side === Node::SIDE_LEFT) { - $value = $sharedByte >> 4; - } - else { - $value = $sharedByte & self::SHARED_MASK_RIGHT; - } - } - else { - $value = 0; - } - $offset = $this->getWholeByteOffset($side); - $end = $offset + $this->recordWholeBytes; - for ($i = $offset; $i < $end; $i++) { - $byte = ord($nodeData[$i]); - $value = ($value << 8) | $byte; - } - return $value; - } - - public function getNodeCount() { - return $this->nodeCount; - } - - public function getSearchTreeSectionSize() { - return $this->searchTreeSectionSize; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/NodeRecord.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/NodeRecord.php deleted file mode 100644 index 433c724d..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/mmdb-reader/src/NodeRecord.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Wordfence\MmdbReader; - -use Wordfence\MmdbReader\Exception\InvalidOperationException; - -class NodeRecord { - - private $reader; - private $value; - - public function __construct($reader, $value) { - $this->reader = $reader; - $this->value = $value; - } - - public function getValue() { - return $this->value; - } - - public function isNodePointer() { - return $this->value < $this->reader->getNodeCount(); - } - - public function getNextNode() { - if (!$this->isNodePointer()) - throw new InvalidOperationException('The next node was requested for a record that is not a node pointer'); - try { - return $this->reader->read($this->getValue()); - } - catch (InvalidOperationException $e) { - throw new FormatException('Invalid node pointer found in database', $e); - } - } - - public function isNullPointer() { - return $this->value === $this->reader->getNodeCount(); - } - - public function isDataPointer() { - return $this->value > $this->reader->getNodeCount(); - } - - public function getDataAddress() { - if (!$this->isDataPointer()) - throw new InvalidOperationException('The data address was requested for a record that is not a data pointer'); - return $this->value - $this->reader->getNodeCount() + $this->reader->getSearchTreeSectionSize(); - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/cacert.pem b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/cacert.pem deleted file mode 100644 index 9551dfd8..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/cacert.pem +++ /dev/null @@ -1,3451 +0,0 @@ -## -## Bundle of CA Root Certificates -## -## Certificate data from Mozilla as of: Tue Aug 22 03:12:04 2023 GMT -## -## This is a bundle of X.509 certificates of public Certificate Authorities -## (CA). These were automatically extracted from Mozilla's root certificates -## file (certdata.txt). This file can be found in the mozilla source tree: -## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt -## -## It contains the certificates in PEM format and therefore -## can be directly used with curl / libcurl / php_curl, or with -## an Apache+mod_ssl webserver for SSL client authentication. -## Just configure this file as the SSLCACertificateFile. -## -## Conversion done with mk-ca-bundle.pl version 1.29. -## SHA256: 0ff137babc6a5561a9cfbe9f29558972e5b528202681b7d3803d03a3e82922bd -## - - -GlobalSign Root CA -================== ------BEGIN CERTIFICATE----- -MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx -GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds -b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV -BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD -VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa -DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc -THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb -Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP -c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX -gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV -HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF -AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj -Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG -j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH -hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC -X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- - -Entrust.net Premium 2048 Secure Server CA -========================================= ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u -ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp -bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV -BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx -NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 -d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl -MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u -ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL -Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr -hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW -nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi -VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ -KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy -T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf -zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT -J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e -nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= ------END CERTIFICATE----- - -Baltimore CyberTrust Root -========================= ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE -ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li -ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC -SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs -dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME -uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB -UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C -G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 -XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr -l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI -VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB -BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh -cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 -hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa -Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H -RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp ------END CERTIFICATE----- - -Entrust Root Certification Authority -==================================== ------BEGIN CERTIFICATE----- -MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV -BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw -b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG -A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 -MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu -MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu -Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v -dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz -A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww -Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 -j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN -rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 -MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH -hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA -A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM -Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa -v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS -W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 -tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 ------END CERTIFICATE----- - -Comodo AAA Services root -======================== ------BEGIN CERTIFICATE----- -MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS -R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg -TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw -MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl -c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV -BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG -C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs -i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW -Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH -Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK -Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f -BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl -cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz -LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm -7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz -Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z -8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C -12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- - -QuoVadis Root CA 2 -================== ------BEGIN CERTIFICATE----- -MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT -EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx -ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM -aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 -XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk -lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB -lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy -lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt -66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn -wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh -D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy -BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie -J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud -DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU -a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT -ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv -Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 -UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm -VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK -+JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW -IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 -WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X -f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II -4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 -VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u ------END CERTIFICATE----- - -QuoVadis Root CA 3 -================== ------BEGIN CERTIFICATE----- -MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT -EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx -OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM -aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg -DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij -KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K -DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv -BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp -p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 -nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX -MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM -Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz -uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT -BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj -YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 -aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB -BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD -VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 -ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE -AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV -qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s -hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z -POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 -Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp -8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC -bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu -g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p -vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr -qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= ------END CERTIFICATE----- - -Security Communication Root CA -============================== ------BEGIN CERTIFICATE----- -MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP -U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw -HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP -U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw -8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM -DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX -5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd -DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 -JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g -0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a -mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ -s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ -6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi -FL39vmwLAw== ------END CERTIFICATE----- - -XRamp Global CA Root -==================== ------BEGIN CERTIFICATE----- -MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE -BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj -dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx -HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg -U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu -IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx -foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE -zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs -AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry -xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap -oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC -AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc -/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt -qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n -nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz -8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= ------END CERTIFICATE----- - -Go Daddy Class 2 CA -=================== ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY -VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG -A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g -RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD -ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv -2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 -qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j -YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY -vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O -BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o -atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu -MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG -A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim -PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt -I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI -Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b -vZ8= ------END CERTIFICATE----- - -Starfield Class 2 CA -==================== ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc -U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo -MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG -A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG -SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY -bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ -JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm -epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN -F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF -MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f -hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo -bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g -QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs -afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM -PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD -KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 -QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- - -DigiCert Assured ID Root CA -=========================== ------BEGIN CERTIFICATE----- -MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw -IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx -MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL -ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO -9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy -UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW -/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy -oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf -GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF -66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq -hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc -EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn -SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i -8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe -+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== ------END CERTIFICATE----- - -DigiCert Global Root CA -======================= ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw -HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw -MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 -dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn -TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 -BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H -4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y -7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB -o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm -8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF -BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr -EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt -tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 -UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- - -DigiCert High Assurance EV Root CA -================================== ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw -KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw -MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ -MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu -Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t -Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS -OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 -MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ -NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe -h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB -Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY -JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ -V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp -myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK -mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K ------END CERTIFICATE----- - -SwissSign Gold CA - G2 -====================== ------BEGIN CERTIFICATE----- -MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw -EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN -MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp -c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq -t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C -jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg -vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF -ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR -AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend -jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO -peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR -7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi -GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw -AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 -OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov -L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm -5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr -44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf -Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m -Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp -mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk -vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf -KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br -NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj -viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ ------END CERTIFICATE----- - -SwissSign Silver CA - G2 -======================== ------BEGIN CERTIFICATE----- -MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT -BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X -DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 -aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG -9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 -N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm -+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH -6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu -MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h -qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 -FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs -ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc -celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X -CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ -BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB -tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 -cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P -4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F -kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L -3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx -/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa -DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP -e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu -WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ -DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub -DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u ------END CERTIFICATE----- - -SecureTrust CA -============== ------BEGIN CERTIFICATE----- -MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy -dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe -BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX -OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t -DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH -GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b -01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH -ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ -BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj -aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ -KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu -SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf -mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ -nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR -3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= ------END CERTIFICATE----- - -Secure Global CA -================ ------BEGIN CERTIFICATE----- -MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH -bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg -MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg -Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx -YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ -bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g -8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV -HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi -0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn -oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA -MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ -OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn -CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 -3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc -f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW ------END CERTIFICATE----- - -COMODO Certification Authority -============================== ------BEGIN CERTIFICATE----- -MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE -BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG -A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb -MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD -T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH -+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww -xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV -4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA -1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI -rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k -b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC -AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP -OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ -RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc -IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN -+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== ------END CERTIFICATE----- - -COMODO ECC Certification Authority -================================== ------BEGIN CERTIFICATE----- -MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC -R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE -ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix -GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR -Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo -b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X -4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni -wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG -FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA -U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= ------END CERTIFICATE----- - -Certigna -======== ------BEGIN CERTIFICATE----- -MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw -EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 -MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI -Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q -XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH -GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p -ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg -DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf -Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ -tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ -BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J -SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA -hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ -ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu -PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY -1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw -WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== ------END CERTIFICATE----- - -ePKI Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG -EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg -Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx -MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq -MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs -IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi -lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv -qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX -12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O -WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ -ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao -lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ -vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi -Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi -MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH -ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 -1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq -KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV -xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP -NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r -GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE -xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx -gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy -sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD -BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= ------END CERTIFICATE----- - -certSIGN ROOT CA -================ ------BEGIN CERTIFICATE----- -MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD -VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa -Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE -CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I -JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH -rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 -ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD -0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 -AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B -Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB -AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 -SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 -x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt -vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz -TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD ------END CERTIFICATE----- - -NetLock Arany (Class Gold) Főtanúsítvány -======================================== ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G -A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 -dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB -cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx -MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO -ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv -biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 -c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu -0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw -/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk -H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw -fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 -neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB -BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW -qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta -YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC -bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna -NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu -dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= ------END CERTIFICATE----- - -SecureSign RootCA11 -=================== ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi -SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS -b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw -KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 -cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL -TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO -wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq -g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP -O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA -bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX -t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh -OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r -bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ -Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 -y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 -lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= ------END CERTIFICATE----- - -Microsec e-Szigno Root CA 2009 -============================== ------BEGIN CERTIFICATE----- -MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER -MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv -c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o -dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE -BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt -U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA -fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG -0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA -pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm -1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC -AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf -QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE -FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o -lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX -I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 -tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 -yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi -LXpUq3DDfSJlgnCW ------END CERTIFICATE----- - -GlobalSign Root CA - R3 -======================= ------BEGIN CERTIFICATE----- -MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv -YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh -bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT -aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln -bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt -iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ -0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 -rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl -OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 -xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE -FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 -lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 -EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E -bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 -YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r -kpeDMdmztcpHWD9f ------END CERTIFICATE----- - -Autoridad de Certificacion Firmaprofesional CIF A62634068 -========================================================= ------BEGIN CERTIFICATE----- -MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA -BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 -MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw -QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB -NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD -Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P -B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY -7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH -ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI -plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX -MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX -LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK -bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU -vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud -EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH -DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp -cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA -bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx -ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx -51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk -R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP -T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f -Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl -osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR -crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR -saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD -KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi -6Et8Vcad+qMUu2WFbm5PEn4KPJ2V ------END CERTIFICATE----- - -Izenpe.com -========== ------BEGIN CERTIFICATE----- -MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG -EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz -MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu -QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ -03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK -ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU -+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC -PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT -OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK -F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK -0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ -0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB -leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID -AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ -SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG -NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx -MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O -BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l -Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga -kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q -hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs -g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 -aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 -nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC -ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo -Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z -WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== ------END CERTIFICATE----- - -Go Daddy Root Certificate Authority - G2 -======================================== ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu -MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 -MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 -b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G -A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq -9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD -+qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd -fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl -NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 -BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac -vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r -5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV -N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO -LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 ------END CERTIFICATE----- - -Starfield Root Certificate Authority - G2 -========================================= ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s -b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 -eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw -DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg -VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB -dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv -W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs -bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk -N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf -ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU -JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol -TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx -4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw -F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K -pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ -c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 ------END CERTIFICATE----- - -Starfield Services Root Certificate Authority - G2 -================================================== ------BEGIN CERTIFICATE----- -MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s -b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl -IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV -BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT -dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg -Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 -h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa -hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP -LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB -rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG -SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP -E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy -xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd -iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza -YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 ------END CERTIFICATE----- - -AffirmTrust Commercial -====================== ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw -MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly -bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb -DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV -C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 -BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww -MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV -HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG -hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi -qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv -0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh -sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= ------END CERTIFICATE----- - -AffirmTrust Networking -====================== ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw -MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly -bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE -Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI -dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 -/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb -h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV -HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu -UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 -12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 -WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 -/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= ------END CERTIFICATE----- - -AffirmTrust Premium -=================== ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy -OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy -dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn -BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV -5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs -+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd -GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R -p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI -S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 -6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 -/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo -+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB -/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv -MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg -Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC -6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S -L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK -+4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV -BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg -IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 -g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb -zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== ------END CERTIFICATE----- - -AffirmTrust Premium ECC -======================= ------BEGIN CERTIFICATE----- -MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV -BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx -MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U -cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA -IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ -N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW -BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK -BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X -57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM -eQ== ------END CERTIFICATE----- - -Certum Trusted Network CA -========================= ------BEGIN CERTIFICATE----- -MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK -ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy -MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU -ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC -l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J -J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 -fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 -cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB -Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw -DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj -jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 -mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj -Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI -03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= ------END CERTIFICATE----- - -TWCA Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ -VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG -EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB -IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK -AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx -QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC -oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP -4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r -y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB -BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG -9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC -mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW -QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY -T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny -Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== ------END CERTIFICATE----- - -Security Communication RootCA2 -============================== ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc -U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh -dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC -SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy -aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ -+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R -3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV -spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K -EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 -QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB -CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj -u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk -3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q -tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 -mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 ------END CERTIFICATE----- - -Actalis Authentication Root CA -============================== ------BEGIN CERTIFICATE----- -MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM -BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE -AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky -MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz -IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ -wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa -by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 -zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f -YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2 -oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l -EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7 -hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8 -EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5 -jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY -iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt -ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI -WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 -JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx -K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ -Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC -4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo -2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz -lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem -OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 -vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== ------END CERTIFICATE----- - -Buypass Class 2 Root CA -======================= ------BEGIN CERTIFICATE----- -MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X -DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 -eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 -g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn -9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b -/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU -CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff -awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI -zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn -Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX -Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs -M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF -AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s -A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI -osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S -aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd -DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD -LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 -oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC -wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS -CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN -rJgWVqA= ------END CERTIFICATE----- - -Buypass Class 3 Root CA -======================= ------BEGIN CERTIFICATE----- -MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X -DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 -eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH -sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR -5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh -7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ -ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH -2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV -/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ -RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA -Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq -j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF -AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV -cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G -uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG -Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 -ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 -KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz -6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug -UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe -eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi -Cp/HuZc= ------END CERTIFICATE----- - -T-TeleSec GlobalRoot Class 3 -============================ ------BEGIN CERTIFICATE----- -MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM -IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU -cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx -MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz -dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD -ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK -9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU -NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF -iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W -0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr -AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb -fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT -ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h -P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml -e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== ------END CERTIFICATE----- - -D-TRUST Root Class 3 CA 2 2009 -============================== ------BEGIN CERTIFICATE----- -MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK -DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe -Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE -LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD -ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA -BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv -KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z -p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC -AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ -4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y -eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw -MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G -PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw -OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm -2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 -o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV -dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph -X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= ------END CERTIFICATE----- - -D-TRUST Root Class 3 CA 2 EV 2009 -================================= ------BEGIN CERTIFICATE----- -MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK -DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw -OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK -DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw -OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS -egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh -zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T -7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 -sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 -11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv -cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v -ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El -MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp -b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh -c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ -PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 -nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX -ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA -NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv -w9y4AyHqnxbxLFS1 ------END CERTIFICATE----- - -CA Disig Root R2 -================ ------BEGIN CERTIFICATE----- -MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw -EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp -ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx -EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp -c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC -w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia -xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 -A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S -GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV -g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa -5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE -koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A -Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i -Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV -HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u -Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM -tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV -sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je -dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 -1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx -mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 -utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 -sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg -UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV -7+ZtsH8tZ/3zbBt1RqPlShfppNcL ------END CERTIFICATE----- - -ACCVRAIZ1 -========= ------BEGIN CERTIFICATE----- -MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB -SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 -MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH -UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM -jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 -RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD -aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ -0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG -WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 -8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR -5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J -9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK -Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw -Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu -Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 -VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM -Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA -QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh -AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA -YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj -AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA -IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk -aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 -dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 -MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI -hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E -R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN -YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 -nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ -TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 -sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h -I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg -Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd -3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p -EfbRD0tVNEYqi4Y7 ------END CERTIFICATE----- - -TWCA Global Root CA -=================== ------BEGIN CERTIFICATE----- -MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT -CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD -QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK -EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg -Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C -nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV -r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR -Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV -tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W -KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 -sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p -yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn -kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI -zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g -cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn -LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M -8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg -/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg -lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP -A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m -i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 -EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 -zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= ------END CERTIFICATE----- - -TeliaSonera Root CA v1 -====================== ------BEGIN CERTIFICATE----- -MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE -CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 -MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW -VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ -6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA -3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k -B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn -Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH -oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 -F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ -oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 -gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc -TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB -AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW -DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm -zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx -0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW -pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV -G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc -c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT -JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 -qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 -Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems -WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= ------END CERTIFICATE----- - -T-TeleSec GlobalRoot Class 2 -============================ ------BEGIN CERTIFICATE----- -MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM -IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU -cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx -MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz -dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD -ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ -SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F -vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 -2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV -WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy -YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 -r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf -vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR -3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN -9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== ------END CERTIFICATE----- - -Atos TrustedRoot 2011 -===================== ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU -cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 -MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG -A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV -hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr -54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ -DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 -HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR -z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R -l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ -bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB -CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h -k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh -TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 -61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G -3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed ------END CERTIFICATE----- - -QuoVadis Root CA 1 G3 -===================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG -A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv -b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN -MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg -RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE -PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm -PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 -Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN -ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l -g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV -7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX -9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f -iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg -t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI -hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC -MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 -GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct -Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP -+V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh -3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa -wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 -O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 -FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV -hMJKzRwuJIczYOXD ------END CERTIFICATE----- - -QuoVadis Root CA 2 G3 -===================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG -A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv -b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN -MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg -RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh -ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY -NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t -oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o -MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l -V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo -L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ -sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD -6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh -lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI -hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 -AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K -pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 -x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz -dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X -U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw -mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD -zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN -JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr -O3jtZsSOeWmD3n+M ------END CERTIFICATE----- - -QuoVadis Root CA 3 G3 -===================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG -A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv -b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN -MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg -RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 -IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL -Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe -6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 -I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U -VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 -5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi -Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM -dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt -rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI -hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px -KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS -t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ -TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du -DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib -Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD -hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX -0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW -dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 -PpxxVJkES/1Y+Zj0 ------END CERTIFICATE----- - -DigiCert Assured ID Root G2 -=========================== ------BEGIN CERTIFICATE----- -MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw -IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw -MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL -ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH -35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq -bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw -VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP -YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn -lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO -w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv -0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz -d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW -hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M -jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo -IhNzbM8m9Yop5w== ------END CERTIFICATE----- - -DigiCert Assured ID Root G3 -=========================== ------BEGIN CERTIFICATE----- -MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV -UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD -VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 -MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ -BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb -RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs -KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF -UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy -YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy -1vUhZscv6pZjamVFkpUBtA== ------END CERTIFICATE----- - -DigiCert Global Root G2 -======================= ------BEGIN CERTIFICATE----- -MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw -HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx -MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 -dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ -kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO -3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV -BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM -UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB -o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu -5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr -F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U -WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH -QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ -iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl -MrY= ------END CERTIFICATE----- - -DigiCert Global Root G3 -======================= ------BEGIN CERTIFICATE----- -MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV -UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD -VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw -MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k -aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C -AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O -YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP -BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp -Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y -3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 -VOKa5Vt8sycX ------END CERTIFICATE----- - -DigiCert Trusted Root G4 -======================== ------BEGIN CERTIFICATE----- -MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw -HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 -MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G -CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp -pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o -k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa -vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY -QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 -MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm -mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 -f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH -dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 -oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud -DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD -ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY -ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr -yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy -7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah -ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN -5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb -/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa -5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK -G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP -82Z+ ------END CERTIFICATE----- - -COMODO RSA Certification Authority -================================== ------BEGIN CERTIFICATE----- -MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE -BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG -A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC -R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE -ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn -dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ -FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ -5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG -x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX -2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL -OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 -sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C -GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 -WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E -FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt -rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ -nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg -tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW -sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp -pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA -zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq -ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 -7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I -LaZRfyHBNVOFBkpdn627G190 ------END CERTIFICATE----- - -USERTrust RSA Certification Authority -===================================== ------BEGIN CERTIFICATE----- -MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE -BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK -ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE -BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK -ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz -0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j -Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn -RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O -+T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq -/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE -Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM -lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 -yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ -eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd -BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF -MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW -FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ -7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ -Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM -8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi -FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi -yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c -J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw -sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx -Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 ------END CERTIFICATE----- - -USERTrust ECC Certification Authority -===================================== ------BEGIN CERTIFICATE----- -MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC -VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU -aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC -VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU -aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 -0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez -nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV -HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB -HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu -9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= ------END CERTIFICATE----- - -GlobalSign ECC Root CA - R5 -=========================== ------BEGIN CERTIFICATE----- -MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 -SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS -h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd -BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx -uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 -yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 ------END CERTIFICATE----- - -IdenTrust Commercial Root CA 1 -============================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG -EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS -b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES -MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB -IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld -hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ -mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi -1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C -XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl -3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy -NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV -WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg -xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix -uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI -hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH -6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg -ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt -ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV -YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX -feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro -kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe -2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz -Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R -cGzM7vRX+Bi6hG6H ------END CERTIFICATE----- - -IdenTrust Public Sector Root CA 1 -================================= ------BEGIN CERTIFICATE----- -MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG -EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv -ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV -UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS -b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy -P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 -Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI -rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf -qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS -mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn -ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh -LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v -iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL -4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B -Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw -DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj -t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A -mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt -GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt -m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx -NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 -Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI -ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC -ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ -3Wl9af0AVqW3rLatt8o+Ae+c ------END CERTIFICATE----- - -Entrust Root Certification Authority - G2 -========================================= ------BEGIN CERTIFICATE----- -MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV -BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy -bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug -b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw -HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT -DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx -OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s -eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi -MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP -/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz -HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU -s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y -TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx -AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 -0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z -iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ -Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi -nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ -vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO -e4pIb4tF9g== ------END CERTIFICATE----- - -Entrust Root Certification Authority - EC1 -========================================== ------BEGIN CERTIFICATE----- -MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx -FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn -YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl -ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw -FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs -LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg -dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt -IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy -AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef -9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE -FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h -vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 -kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G ------END CERTIFICATE----- - -CFCA EV ROOT -============ ------BEGIN CERTIFICATE----- -MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE -CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB -IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw -MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD -DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV -BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD -7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN -uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW -ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 -xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f -py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K -gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol -hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ -tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf -BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB -/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB -ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q -ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua -4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG -E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX -BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn -aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy -PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX -kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C -ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su ------END CERTIFICATE----- - -OISTE WISeKey Global Root GB CA -=============================== ------BEGIN CERTIFICATE----- -MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG -EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl -ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw -MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD -VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds -b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX -scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP -rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk -9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o -Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg -GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB -/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI -hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD -dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 -VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui -HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic -Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= ------END CERTIFICATE----- - -SZAFIR ROOT CA2 -=============== ------BEGIN CERTIFICATE----- -MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG -A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV -BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ -BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD -VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q -qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK -DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE -2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ -ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi -ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P -AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC -AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5 -O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67 -oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul -4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6 -+/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== ------END CERTIFICATE----- - -Certum Trusted Network CA 2 -=========================== ------BEGIN CERTIFICATE----- -MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE -BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 -bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y -ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ -TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl -cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB -IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 -7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o -CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b -Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p -uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 -GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ -9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB -Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye -hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM -BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI -hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW -Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA -L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo -clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM -pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb -w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo -J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm -ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX -is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7 -zAYspsbiDrW5viSP ------END CERTIFICATE----- - -Hellenic Academic and Research Institutions RootCA 2015 -======================================================= ------BEGIN CERTIFICATE----- -MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT -BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 -aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl -YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx -MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg -QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV -BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw -MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv -bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh -iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ -6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd -FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr -i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F -GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2 -fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu -iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc -Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI -hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+ -D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM -d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y -d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn -82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb -davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F -Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt -J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa -JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q -p/UsQu0yrbYhnr68 ------END CERTIFICATE----- - -Hellenic Academic and Research Institutions ECC RootCA 2015 -=========================================================== ------BEGIN CERTIFICATE----- -MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 -aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u -cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj -aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw -MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj -IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD -VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 -Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP -dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK -Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O -BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA -GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn -dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR ------END CERTIFICATE----- - -ISRG Root X1 -============ ------BEGIN CERTIFICATE----- -MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE -BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD -EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG -EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT -DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r -Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1 -3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K -b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN -Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ -4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf -1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu -hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH -usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r -OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G -A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY -9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL -ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV -0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt -hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw -TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx -e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA -JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD -YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n -JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ -m+kXQ99b21/+jh5Xos1AnX5iItreGCc= ------END CERTIFICATE----- - -AC RAIZ FNMT-RCM -================ ------BEGIN CERTIFICATE----- -MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT -AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw -MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD -TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf -qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr -btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL -j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou -08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw -WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT -tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ -47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC -ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa -i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE -FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o -dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD -nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s -D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ -j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT -Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW -+YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 -Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d -8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm -5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG -rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= ------END CERTIFICATE----- - -Amazon Root CA 1 -================ ------BEGIN CERTIFICATE----- -MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD -VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 -MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv -bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH -FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ -gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t -dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce -VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB -/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 -DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM -CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy -8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa -2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 -xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 ------END CERTIFICATE----- - -Amazon Root CA 2 -================ ------BEGIN CERTIFICATE----- -MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD -VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 -MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv -bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 -kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp -N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 -AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd -fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx -kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS -btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 -Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN -c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ -3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw -DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA -A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY -+gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE -YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW -xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ -gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW -aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV -Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 -KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi -JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= ------END CERTIFICATE----- - -Amazon Root CA 3 -================ ------BEGIN CERTIFICATE----- -MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG -EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy -NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ -MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB -f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr -Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 -rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc -eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== ------END CERTIFICATE----- - -Amazon Root CA 4 -================ ------BEGIN CERTIFICATE----- -MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG -EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy -NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ -MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN -/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri -83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV -HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA -MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 -AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== ------END CERTIFICATE----- - -TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 -============================================= ------BEGIN CERTIFICATE----- -MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT -D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr -IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g -TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp -ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD -VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt -c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth -bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 -IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 -6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc -wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 -3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 -WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU -ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ -KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh -AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc -lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R -e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j -q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= ------END CERTIFICATE----- - -GDCA TrustAUTH R5 ROOT -====================== ------BEGIN CERTIFICATE----- -MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw -BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD -DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow -YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ -IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs -AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p -OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr -pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ -9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ -xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM -R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ -D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 -oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx -9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg -p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 -H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 -6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd -+PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ -HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD -F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ -8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv -/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT -aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== ------END CERTIFICATE----- - -SSL.com Root Certification Authority RSA -======================================== ------BEGIN CERTIFICATE----- -MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM -BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x -MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw -MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx -EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM -LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C -Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 -P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge -oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp -k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z -fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ -gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 -UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 -1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s -bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV -HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE -AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr -dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf -ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl -u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq -erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj -MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ -vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI -Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y -wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI -WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= ------END CERTIFICATE----- - -SSL.com Root Certification Authority ECC -======================================== ------BEGIN CERTIFICATE----- -MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV -BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv -BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy -MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO -BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv -bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA -BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ -8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR -hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT -jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW -e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z -5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl ------END CERTIFICATE----- - -SSL.com EV Root Certification Authority RSA R2 -============================================== ------BEGIN CERTIFICATE----- -MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w -DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u -MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy -MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI -DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD -VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN -BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh -hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w -cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO -Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ -B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh -CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim -9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto -RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm -JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 -+qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV -HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp -qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 -++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx -Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G -guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz -OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 -CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq -lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR -rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 -hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX -9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== ------END CERTIFICATE----- - -SSL.com EV Root Certification Authority ECC -=========================================== ------BEGIN CERTIFICATE----- -MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV -BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy -BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw -MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx -EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM -LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB -BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy -3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O -BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe -5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ -N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm -m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== ------END CERTIFICATE----- - -GlobalSign Root CA - R6 -======================= ------BEGIN CERTIFICATE----- -MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX -R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds -b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i -YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs -U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss -grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE -3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF -vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM -PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+ -azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O -WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy -CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP -0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN -b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV -HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN -nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0 -lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY -BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym -Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr -3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1 -0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T -uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK -oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t -JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= ------END CERTIFICATE----- - -OISTE WISeKey Global Root GC CA -=============================== ------BEGIN CERTIFICATE----- -MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD -SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo -MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa -Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL -ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh -bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr -VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab -NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd -BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E -AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk -AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 ------END CERTIFICATE----- - -UCA Global G2 Root -================== ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG -EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x -NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU -cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT -oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV -8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS -h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o -LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ -R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe -KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa -4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc -OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 -8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O -BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo -5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 -1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A -Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 -yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX -c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo -jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk -bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x -ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn -RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== ------END CERTIFICATE----- - -UCA Extended Validation Root -============================ ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG -EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u -IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G -A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs -iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF -Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu -eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR -59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH -0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR -el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv -B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth -WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS -NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS -3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL -BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR -ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM -aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 -dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb -+7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW -F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi -GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc -GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi -djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr -dhh2n1ax ------END CERTIFICATE----- - -Certigna Root CA -================ ------BEGIN CERTIFICATE----- -MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE -BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ -MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda -MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz -MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX -stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz -KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 -JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 -XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq -4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej -wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ -lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI -jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ -/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw -HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of -1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy -dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h -LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl -cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt -OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP -TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq -7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 -4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd -8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS -6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY -tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS -aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde -E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= ------END CERTIFICATE----- - -emSign Root CA - G1 -=================== ------BEGIN CERTIFICATE----- -MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET -MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl -ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx -ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk -aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN -LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1 -cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW -DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ -6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH -hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG -MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2 -vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q -NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q -+Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih -U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx -iN66zB+Afko= ------END CERTIFICATE----- - -emSign ECC Root CA - G3 -======================= ------BEGIN CERTIFICATE----- -MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG -A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg -MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4 -MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11 -ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g -RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc -58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr -MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D -CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7 -jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj ------END CERTIFICATE----- - -emSign Root CA - C1 -=================== ------BEGIN CERTIFICATE----- -MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx -EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp -Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE -BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD -ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up -ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/ -Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX -OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V -I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms -lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+ -XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD -ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp -/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1 -NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9 -wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ -BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI= ------END CERTIFICATE----- - -emSign ECC Root CA - C3 -======================= ------BEGIN CERTIFICATE----- -MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG -A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF -Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE -BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD -ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd -6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9 -SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA -B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA -MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU -ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== ------END CERTIFICATE----- - -Hongkong Post Root CA 3 -======================= ------BEGIN CERTIFICATE----- -MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG -A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK -Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2 -MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv -bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX -SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz -iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf -jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim -5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe -sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj -0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/ -JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u -y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h -+bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG -xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID -AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e -i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN -AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw -W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld -y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov -+BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc -eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw -9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7 -nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY -hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB -60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq -dBb9HxEGmpv0 ------END CERTIFICATE----- - -Entrust Root Certification Authority - G4 -========================================= ------BEGIN CERTIFICATE----- -MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV -BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu -bmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1 -dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT -AlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 -L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D -umSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV -3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds -8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ -e9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7 -ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X -xNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV -7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8 -dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW -Hv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n -MA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q -jbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht -7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK -YvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt -jqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+ -m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW -RGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA -JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G -+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT -kcpG2om3PVODLAgfi49T3f+sHw== ------END CERTIFICATE----- - -Microsoft ECC Root Certificate Authority 2017 -============================================= ------BEGIN CERTIFICATE----- -MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV -UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND -IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4 -MjMxNjA0WjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw -NAYDVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQ -BgcqhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZRogPZnZH6 -thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYbhGBKia/teQ87zvH2RPUB -eMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIy5lycFIM -+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlf -Xu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR -eNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M= ------END CERTIFICATE----- - -Microsoft RSA Root Certificate Authority 2017 -============================================= ------BEGIN CERTIFICATE----- -MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG -EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg -UlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIw -NzE4MjMwMDIzWjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u -MTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcw -ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZNt9GkMml -7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0ZdDMbRnMlfl7rEqUrQ7e -S0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw7 -1VdyvD/IybLeS2v4I2wDwAW9lcfNcztmgGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+ -dkC0zVJhUXAoP8XFWvLJjEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49F -yGcohJUcaDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaGYaRS -MLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6W6IYZVcSn2i51BVr -lMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4KUGsTuqwPN1q3ErWQgR5WrlcihtnJ -0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJ -ClTUFLkqqNfs+avNJVgyeY+QW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYw -DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC -NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZCLgLNFgVZJ8og -6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OCgMNPOsduET/m4xaRhPtthH80 -dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk -+ONVFT24bcMKpBLBaYVu32TxU5nhSnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex -/2kskZGT4d9Mozd2TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDy -AmH3pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGRxpl/j8nW -ZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiAppGWSZI1b7rCoucL5mxAyE -7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKT -c0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D -5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E ------END CERTIFICATE----- - -e-Szigno Root CA 2017 -===================== ------BEGIN CERTIFICATE----- -MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw -DwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt -MjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJvb3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZa -Fw00MjA4MjIxMjA3MDZaMHExCzAJBgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UE -CgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3pp -Z25vIFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtvxie+RJCx -s1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+HWyx7xf58etqjYzBhMA8G -A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSHERUI0arBeAyxr87GyZDv -vzAEwDAfBgNVHSMEGDAWgBSHERUI0arBeAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEA -tVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO -svxyqltZ+efcMQ== ------END CERTIFICATE----- - -certSIGN Root CA G2 -=================== ------BEGIN CERTIFICATE----- -MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw -EgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy -MDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJBgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lH -TiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBAMDFdRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05 -N0IwvlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZuIt4Imfk -abBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhpn+Sc8CnTXPnGFiWeI8Mg -wT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKscpc/I1mbySKEwQdPzH/iV8oScLumZfNp -dWO9lfsbl83kqK/20U6o2YpxJM02PbyWxPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91Qqh -ngLjYl/rNUssuHLoPj1PrCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732 -jcZZroiFDsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fxDTvf -95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgyLcsUDFDYg2WD7rlc -z8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6CeWRgKRM+o/1Pcmqr4tTluCRVLERL -iohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1Ud -DgQWBBSCIS1mxteg4BXrzkwJd8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOB -ywaK8SJJ6ejqkX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC -b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQlqiCA2ClV9+BB -/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0OJD7uNGzcgbJceaBxXntC6Z5 -8hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+cNywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5 -BiKDUyUM/FHE5r7iOZULJK2v0ZXkltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklW -atKcsWMy5WHgUyIOpwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tU -Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M -NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N -0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc= ------END CERTIFICATE----- - -Trustwave Global Certification Authority -======================================== ------BEGIN CERTIFICATE----- -MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV -UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 -ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u -IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV -UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 -ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u -IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29 -zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf -LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq -stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o -WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+ -OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40 -Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE -uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm -+9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj -ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB -BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H -PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H -ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla -4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R -vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd -zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O -856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH -Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu -3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP -29FpHOTKyeC2nOnOcXHebD8WpHk= ------END CERTIFICATE----- - -Trustwave Global ECC P256 Certification Authority -================================================= ------BEGIN CERTIFICATE----- -MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER -MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI -b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD -VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy -dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1 -NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj -43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm -P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt -0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz -RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 ------END CERTIFICATE----- - -Trustwave Global ECC P384 Certification Authority -================================================= ------BEGIN CERTIFICATE----- -MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER -MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI -b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD -VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy -dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4 -NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH -Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr -/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV -HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn -ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl -CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw== ------END CERTIFICATE----- - -NAVER Global Root Certification Authority -========================================= ------BEGIN CERTIFICATE----- -MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG -A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD -DClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4 -NDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT -UyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb -UGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW -+j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7 -XNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2 -aacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4 -Yb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z -VHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B -A0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai -cdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy -YhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV -HQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB -Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK -21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB -jCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx -hYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg -E34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH -D8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ -A76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY -qqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG -I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg -kpzNNIaRkPpkUZ3+/uul9XXeifdy ------END CERTIFICATE----- - -AC RAIZ FNMT-RCM SERVIDORES SEGUROS -=================================== ------BEGIN CERTIFICATE----- -MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF -UzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy -NjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1SQ00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4 -MTIyMDA5MzczM1oXDTQzMTIyMDA5MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQt -UkNNMQ4wDAYDVQQLDAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNB -QyBSQUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuBBAAiA2IA -BPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LHsbI6GA60XYyzZl2hNPk2 -LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oKUm8BA06Oi6NCMEAwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqG -SM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD -zBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c= ------END CERTIFICATE----- - -GlobalSign Root R46 -=================== ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV -BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv -b3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAX -BgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08Es -CVeJOaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQGvGIFAha/ -r6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud316HCkD7rRlr+/fKYIje -2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo0q3v84RLHIf8E6M6cqJaESvWJ3En7YEt -bWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSEy132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvj -K8Cd+RTyG/FWaha/LIWFzXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD4 -12lPFzYE+cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCNI/on -ccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzsx2sZy/N78CsHpdls -eVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqaByFrgY/bxFn63iLABJzjqls2k+g9 -vXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEM -BQADggIBAHx47PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg -JuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti2kM3S+LGteWy -gxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIkpnnpHs6i58FZFZ8d4kuaPp92 -CC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRFFRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZm -OUdkLG5NrmJ7v2B0GbhWrJKsFjLtrWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qq -JZ4d16GLuc1CLgSkZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwye -qiv5u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP4vkYxboz -nxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6N3ec592kD3ZDZopD8p/7 -DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3 -QEUxeCp6 ------END CERTIFICATE----- - -GlobalSign Root E46 -=================== ------BEGIN CERTIFICATE----- -MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT -AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg -RTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNV -BAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcq -hkjOPQIBBgUrgQQAIgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkB -jtjqR+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGddyXqBPCCj -QjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQxCpCPtsad0kRL -gLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk -vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+ -CAezNIm8BZ/3Hobui3A= ------END CERTIFICATE----- - -GLOBALTRUST 2020 -================ ------BEGIN CERTIFICATE----- -MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx -IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT -VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh -BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy -MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi -D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO -VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM -CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm -fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA -A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR -JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG -DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU -clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ -mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud -IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA -VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw -4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9 -iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS -8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2 -HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS -vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918 -oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF -YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl -gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg== ------END CERTIFICATE----- - -ANF Secure Server Root CA -========================= ------BEGIN CERTIFICATE----- -MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4 -NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv -bjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg -Q0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw -MQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw -EgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC -AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz -BE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv -T1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv -B2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse -zx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM -VwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j -7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z -JTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe -8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO -Hj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj -o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E -BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ -UqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx -j6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt -dD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM -5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb -5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54 -EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H -hk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy -g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3 -r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= ------END CERTIFICATE----- - -Certum EC-384 CA -================ ------BEGIN CERTIFICATE----- -MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ -TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy -dGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2 -MDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh -dGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx -GTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq -vm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn -iBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo -ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0 -QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= ------END CERTIFICATE----- - -Certum Trusted Root CA -====================== ------BEGIN CERTIFICATE----- -MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG -EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew -HhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY -QXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB -AQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p -fktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52 -HO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2 -fJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt -g/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4 -NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk -fVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ -P/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY -njYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK -HRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1 -vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL -LtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s -ALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K -h2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8 -CYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA -4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo -WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj -6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT -OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck -bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb ------END CERTIFICATE----- - -TunTrust Root CA -================ ------BEGIN CERTIFICATE----- -MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG -A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj -dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw -NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD -ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz -2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b -bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7 -NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd -gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW -VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f -Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ -juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas -DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS -VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI -04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0 -90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl -0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd -Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY -YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp -adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x -xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP -jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM -MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z -ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r -AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o= ------END CERTIFICATE----- - -HARICA TLS RSA Root CA 2021 -=========================== ------BEGIN CERTIFICATE----- -MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG -EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u -cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz -OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl -bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB -IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN -JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu -a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y -Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K -5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv -dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR -0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH -GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm -haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ -CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G -A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE -AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU -EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq -QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD -QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR -j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5 -vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0 -qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6 -Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/ -PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn -kf3/W9b3raYvAwtt41dU63ZTGI0RmLo= ------END CERTIFICATE----- - -HARICA TLS ECC Root CA 2021 -=========================== ------BEGIN CERTIFICATE----- -MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH -UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD -QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX -DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj -IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv -b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l -AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b -ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW -0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi -rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw -CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps ------END CERTIFICATE----- - -Autoridad de Certificacion Firmaprofesional CIF A62634068 -========================================================= ------BEGIN CERTIFICATE----- -MIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCRVMxQjBA -BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 -MjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIw -QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB -NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD -Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P -B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY -7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH -ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI -plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX -MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX -LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK -bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU -vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1Ud -DgQWBBRlzeurNR4APn7VdMActHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4w -gZswgZgGBFUdIAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j -b20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABCAG8AbgBhAG4A -bwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAwADEANzAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9miWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL -4QjbEwj4KKE1soCzC1HA01aajTNFSa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDb -LIpgD7dvlAceHabJhfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1il -I45PVf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZEEAEeiGaP -cjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV1aUsIC+nmCjuRfzxuIgA -LI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2tCsvMo2ebKHTEm9caPARYpoKdrcd7b/+A -lun4jWq9GJAd/0kakFI3ky88Al2CdgtR5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH -9IBk9W6VULgRfhVwOEqwf9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpf -NIbnYrX9ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNKGbqE -ZycPvEJdvSRUDewdcAZfpLz6IHxV ------END CERTIFICATE----- - -vTrus ECC Root CA -================= ------BEGIN CERTIFICATE----- -MIICDzCCAZWgAwIBAgIUbmq8WapTvpg5Z6LSa6Q75m0c1towCgYIKoZIzj0EAwMwRzELMAkGA1UE -BhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBS -b290IENBMB4XDTE4MDczMTA3MjY0NFoXDTQzMDczMTA3MjY0NFowRzELMAkGA1UEBhMCQ04xHDAa -BgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBSb290IENBMHYw -EAYHKoZIzj0CAQYFK4EEACIDYgAEZVBKrox5lkqqHAjDo6LN/llWQXf9JpRCux3NCNtzslt188+c -ToL0v/hhJoVs1oVbcnDS/dtitN9Ti72xRFhiQgnH+n9bEOf+QP3A2MMrMudwpremIFUde4BdS49n -TPEQo0IwQDAdBgNVHQ4EFgQUmDnNvtiyjPeyq+GtJK97fKHbH88wDwYDVR0TAQH/BAUwAwEB/zAO -BgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIwV53dVvHH4+m4SVBrm2nDb+zDfSXkV5UT -QJtS0zvzQBm8JsctBp61ezaf9SXUY2sAAjEA6dPGnlaaKsyh2j/IZivTWJwghfqrkYpwcBE4YGQL -YgmRWAD5Tfs0aNoJrSEGGJTO ------END CERTIFICATE----- - -vTrus Root CA -============= ------BEGIN CERTIFICATE----- -MIIFVjCCAz6gAwIBAgIUQ+NxE9izWRRdt86M/TX9b7wFjUUwDQYJKoZIhvcNAQELBQAwQzELMAkG -A1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xFjAUBgNVBAMTDXZUcnVzIFJv -b3QgQ0EwHhcNMTgwNzMxMDcyNDA1WhcNNDMwNzMxMDcyNDA1WjBDMQswCQYDVQQGEwJDTjEcMBoG -A1UEChMTaVRydXNDaGluYSBDby4sTHRkLjEWMBQGA1UEAxMNdlRydXMgUm9vdCBDQTCCAiIwDQYJ -KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL1VfGHTuB0EYgWgrmy3cLRB6ksDXhA/kFocizuwZots -SKYcIrrVQJLuM7IjWcmOvFjai57QGfIvWcaMY1q6n6MLsLOaXLoRuBLpDLvPbmyAhykUAyyNJJrI -ZIO1aqwTLDPxn9wsYTwaP3BVm60AUn/PBLn+NvqcwBauYv6WTEN+VRS+GrPSbcKvdmaVayqwlHeF -XgQPYh1jdfdr58tbmnDsPmcF8P4HCIDPKNsFxhQnL4Z98Cfe/+Z+M0jnCx5Y0ScrUw5XSmXX+6KA -YPxMvDVTAWqXcoKv8R1w6Jz1717CbMdHflqUhSZNO7rrTOiwCcJlwp2dCZtOtZcFrPUGoPc2BX70 -kLJrxLT5ZOrpGgrIDajtJ8nU57O5q4IikCc9Kuh8kO+8T/3iCiSn3mUkpF3qwHYw03dQ+A0Em5Q2 -AXPKBlim0zvc+gRGE1WKyURHuFE5Gi7oNOJ5y1lKCn+8pu8fA2dqWSslYpPZUxlmPCdiKYZNpGvu -/9ROutW04o5IWgAZCfEF2c6Rsffr6TlP9m8EQ5pV9T4FFL2/s1m02I4zhKOQUqqzApVg+QxMaPnu -1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHWOXSuTEGC2/KmSNGzm/MzqvOmwMVO -9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMBAAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYg -scasGrz2iTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOC -AgEAKbqSSaet8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd -nxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1jbhd47F18iMjr -jld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvMKar5CKXiNxTKsbhm7xqC5PD4 -8acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIivTDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJn -xDHO2zTlJQNgJXtxmOTAGytfdELSS8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554Wg -icEFOwE30z9J4nfrI8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4 -sEb9b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNBUvupLnKW -nyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1PTi07NEPhmg4NpGaXutIc -SkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929vensBxXVsFy6K2ir40zSbofitzmdHxghm+H -l3s= ------END CERTIFICATE----- - -ISRG Root X2 -============ ------BEGIN CERTIFICATE----- -MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQswCQYDVQQGEwJV -UzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElT -UkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVT -MSkwJwYDVQQKEyBJbnRlcm5ldCBTZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNS -RyBSb290IFgyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0H -ttwW+1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9ItgKbppb -d9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV -HQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZIzj0EAwMDaAAwZQIwe3lORlCEwkSHRhtF -cP9Ymd70/aTSVaYgLXTWNLxBo1BfASdWtL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5 -U6VR5CmD1/iQMVtCnwr1/q4AaOeMSQ+2b1tbFfLn ------END CERTIFICATE----- - -HiPKI Root CA - G1 -================== ------BEGIN CERTIFICATE----- -MIIFajCCA1KgAwIBAgIQLd2szmKXlKFD6LDNdmpeYDANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQG -EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xGzAZBgNVBAMMEkhpUEtJ -IFJvb3QgQ0EgLSBHMTAeFw0xOTAyMjIwOTQ2MDRaFw0zNzEyMzExNTU5NTlaME8xCzAJBgNVBAYT -AlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQS0kg -Um9vdCBDQSAtIEcxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9B5/UnMyDHPkvRN0 -o9QwqNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh8Ge6zCFovkRTv4354twvVcg3Px+k -wJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux55199QmQ5eiY29yTw1S+6lZgRZq2XNdZ1AYDgr/SE -YYwNHl98h5ZeQa/rh+r4XfEuiAU+TCK72h8q3VJGZDnzQs7ZngyzsHeXZJzA9KMuH5UHsBffMNsA -GJZMoYFL3QRtU6M9/Aes1MU3guvklQgZKILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfd -hSi8MEyr48KxRURHH+CKFgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXTT3OUM3ECoWqj -1jOXTyFjHluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK9p/7qxj3ccC2HTHsOyDry+K4 -9a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8b3ti6RZsR1pl8w4Rm0bZ/W3c1pzAtH2lsN0/ -Vm+h+fbkEkj9Bn8SV7apI09bA8PgcSojt/ewsTu8mL3WmKgMa/aOEmem8rJY5AIJEzypuxC00jBF -8ez3ABHfZfjcK0NVvxaXxA/VLGGEqnKG/uY6fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaNCMEAwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ncX+l6o/vY9cdVouslGDDjYr7AwDgYDVR0PAQH/BAQD -AgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBQUfB13HAE4/+qddRxosuej6ip0691x1TPOhwEmSKsxBHi -7zNKpiMdDg1H2DfHb680f0+BazVP6XKlMeJ45/dOlBhbQH3PayFUhuaVevvGyuqcSE5XCV0vrPSl -tJczWNWseanMX/mF+lLFjfiRFOs6DRfQUsJ748JzjkZ4Bjgs6FzaZsT0pPBWGTMpWmWSBUdGSquE -wx4noR8RkpkndZMPvDY7l1ePJlsMu5wP1G4wB9TcXzZoZjmDlicmisjEOf6aIW/Vcobpf2Lll07Q -JNBAsNB1CI69aO4I1258EHBGG3zgiLKecoaZAeO/n0kZtCW+VmWuF2PlHt/o/0elv+EmBYTksMCv -5wiZqAxeJoBF1PhoL5aPruJKHJwWDBNvOIf2u8g0X5IDUXlwpt/L9ZlNec1OvFefQ05rLisY+Gpz -jLrFNe85akEez3GoorKGB1s6yeHvP2UEgEcyRHCVTjFnanRbEEV16rCf0OY1/k6fi8wrkkVbbiVg -hUbN0aqwdmaTd5a+g744tiROJgvM7XpWGuDpWsZkrUx6AEhEL7lAuxM+vhV4nYWBSipX3tUZQ9rb -yltHhoMLP7YNdnhzeSJesYAfz77RP1YQmCuVh6EfnWQUYDksswBVLuT1sw5XxJFBAJw/6KXf6vb/ -yPCtbVKoF6ubYfwSUTXkJf2vqmqGOQ== ------END CERTIFICATE----- - -GlobalSign ECC Root CA - R4 -=========================== ------BEGIN CERTIFICATE----- -MIIB3DCCAYOgAwIBAgINAgPlfvU/k/2lCSGypjAKBggqhkjOPQQDAjBQMSQwIgYDVQQLExtHbG9i -YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds -b2JhbFNpZ24wHhcNMTIxMTEzMDAwMDAwWhcNMzgwMTE5MDMxNDA3WjBQMSQwIgYDVQQLExtHbG9i -YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds -b2JhbFNpZ24wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4xnnTj2wlDp8uORkcA6SumuU5BwkW -ymOxuYb4ilfBV85C+nOh92VC/x7BALJucw7/xyHlGKSq2XE/qNS5zowdo0IwQDAOBgNVHQ8BAf8E -BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVLB7rUW44kB/+wpu+74zyTyjhNUwCgYI -KoZIzj0EAwIDRwAwRAIgIk90crlgr/HmnKAWBVBfw147bmF0774BxL4YSFlhgjICICadVGNA3jdg -UM/I2O2dgq43mLyjj0xMqTQrbO/7lZsm ------END CERTIFICATE----- - -GTS Root R1 -=========== ------BEGIN CERTIFICATE----- -MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV -UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg -UjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE -ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G -CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM -f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0 -xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w -B7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXW -nOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk -9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zq -kUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92wO1A -K/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om3xPX -V2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDW -cfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T -AQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQAD -ggIBAJ+qQibbC5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe -QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuyh6f88/qBVRRi -ClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM47HLwEXWdyzRSjeZ2axfG34ar -J45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8JZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYci -NuaCp+0KueIHoI17eko8cdLiA6EfMgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5me -LMFrUKTX5hgUvYU/Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJF -fbdT6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ0E6yove+ -7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm2tIMPNuzjsmhDYAPexZ3 -FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bbbP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3 -gm3c ------END CERTIFICATE----- - -GTS Root R2 -=========== ------BEGIN CERTIFICATE----- -MIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV -UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg -UjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE -ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0G -CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3Lv -CvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo7JUl -e3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWIm8Wb -a96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5GmdFrS -+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7M -kogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJG -r61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RWIr9q -S34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73VululycslaVNV -J1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy5okL -dWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T -AQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQAD -ggIBAB/Kzt3HvqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8 -0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyCB19m3H0Q/gxh -swWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2uNmSRXbBoGOqKYcl3qJfEycel -/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMgyALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVn -jWQye+mew4K6Ki3pHrTgSAai/GevHyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y5 -9PYjJbigapordwj6xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M -7YNRTOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924SgJPFI/2R8 -0L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV7LXTWtiBmelDGDfrs7vR -WGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjW -HYbL ------END CERTIFICATE----- - -GTS Root R3 -=========== ------BEGIN CERTIFICATE----- -MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi -MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMw -HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ -R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjO -PQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout -736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24CejQjBA -MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP0/Eq -Er24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azT -L818+FsuVbu/3ZL3pAzcMeGiAjEA/JdmZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV -11RZt+cRLInUue4X ------END CERTIFICATE----- - -GTS Root R4 -=========== ------BEGIN CERTIFICATE----- -MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi -MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQw -HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ -R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjO -PQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzu -hXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqjQjBA -MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV2Py1 -PsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/C -r8deVl5c1RxYIigL9zC2L7F8AjEA8GE8p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh -4rsUecrNIdSUtUlD ------END CERTIFICATE----- - -Telia Root CA v2 -================ ------BEGIN CERTIFICATE----- -MIIFdDCCA1ygAwIBAgIPAWdfJ9b+euPkrL4JWwWeMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNVBAYT -AkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2 -MjAeFw0xODExMjkxMTU1NTRaFw00MzExMjkxMTU1NTRaMEQxCzAJBgNVBAYTAkZJMRowGAYDVQQK -DBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2MjCCAiIwDQYJKoZI -hvcNAQEBBQADggIPADCCAgoCggIBALLQPwe84nvQa5n44ndp586dpAO8gm2h/oFlH0wnrI4AuhZ7 -6zBqAMCzdGh+sq/H1WKzej9Qyow2RCRj0jbpDIX2Q3bVTKFgcmfiKDOlyzG4OiIjNLh9vVYiQJ3q -9HsDrWj8soFPmNB06o3lfc1jw6P23pLCWBnglrvFxKk9pXSW/q/5iaq9lRdU2HhE8Qx3FZLgmEKn -pNaqIJLNwaCzlrI6hEKNfdWV5Nbb6WLEWLN5xYzTNTODn3WhUidhOPFZPY5Q4L15POdslv5e2QJl -tI5c0BE0312/UqeBAMN/mUWZFdUXyApT7GPzmX3MaRKGwhfwAZ6/hLzRUssbkmbOpFPlob/E2wnW -5olWK8jjfN7j/4nlNW4o6GwLI1GpJQXrSPjdscr6bAhR77cYbETKJuFzxokGgeWKrLDiKca5JLNr -RBH0pUPCTEPlcDaMtjNXepUugqD0XBCzYYP2AgWGLnwtbNwDRm41k9V6lS/eINhbfpSQBGq6WT0E -BXWdN6IOLj3rwaRSg/7Qa9RmjtzG6RJOHSpXqhC8fF6CfaamyfItufUXJ63RDolUK5X6wK0dmBR4 -M0KGCqlztft0DbcbMBnEWg4cJ7faGND/isgFuvGqHKI3t+ZIpEYslOqodmJHixBTB0hXbOKSTbau -BcvcwUpej6w9GU7C7WB1K9vBykLVAgMBAAGjYzBhMB8GA1UdIwQYMBaAFHKs5DN5qkWH9v2sHZ7W -xy+G2CQ5MB0GA1UdDgQWBBRyrOQzeapFh/b9rB2e1scvhtgkOTAOBgNVHQ8BAf8EBAMCAQYwDwYD -VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAoDtZpwmUPjaE0n4vOaWWl/oRrfxn83EJ -8rKJhGdEr7nv7ZbsnGTbMjBvZ5qsfl+yqwE2foH65IRe0qw24GtixX1LDoJt0nZi0f6X+J8wfBj5 -tFJ3gh1229MdqfDBmgC9bXXYfef6xzijnHDoRnkDry5023X4blMMA8iZGok1GTzTyVR8qPAs5m4H -eW9q4ebqkYJpCh3DflminmtGFZhb069GHWLIzoBSSRE/yQQSwxN8PzuKlts8oB4KtItUsiRnDe+C -y748fdHif64W1lZYudogsYMVoe+KTTJvQS8TUoKU1xrBeKJR3Stwbbca+few4GeXVtt8YVMJAygC -QMez2P2ccGrGKMOF6eLtGpOg3kuYooQ+BXcBlj37tCAPnHICehIv1aO6UXivKitEZU61/Qrowc15 -h2Er3oBXRb9n8ZuRXqWk7FlIEA04x7D6w0RtBPV4UBySllva9bguulvP5fBqnUsvWHMtTy3EHD70 -sz+rFQ47GUGKpMFXEmZxTPpT41frYpUJnlTd0cI8Vzy9OK2YZLe4A5pTVmBds9hCG1xLEooc6+t9 -xnppxyd/pPiL8uSUZodL6ZQHCRJ5irLrdATczvREWeAWysUsWNc8e89ihmpQfTU2Zqf7N+cox9jQ -raVplI/owd8k+BsHMYeB2F326CjYSlKArBPuUBQemMc= ------END CERTIFICATE----- - -D-TRUST BR Root CA 1 2020 -========================= ------BEGIN CERTIFICATE----- -MIIC2zCCAmCgAwIBAgIQfMmPK4TX3+oPyWWa00tNljAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE -RTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEJSIFJvb3QgQ0EgMSAy -MDIwMB4XDTIwMDIxMTA5NDUwMFoXDTM1MDIxMTA5NDQ1OVowSDELMAkGA1UEBhMCREUxFTATBgNV -BAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDEgMjAyMDB2MBAG -ByqGSM49AgEGBSuBBAAiA2IABMbLxyjR+4T1mu9CFCDhQ2tuda38KwOE1HaTJddZO0Flax7mNCq7 -dPYSzuht56vkPE4/RAiLzRZxy7+SmfSk1zxQVFKQhYN4lGdnoxwJGT11NIXe7WB9xwy0QVK5buXu -QqOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHOREKv/VbNafAkl1bK6CKBrqx9t -MA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu -bmV0L2NybC9kLXRydXN0X2JyX3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj -dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwQlIlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP -PUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD -AwNpADBmAjEAlJAtE/rhY/hhY+ithXhUkZy4kzg+GkHaQBZTQgjKL47xPoFWwKrY7RjEsK70Pvom -AjEA8yjixtsrmfu3Ubgko6SUeho/5jbiA1czijDLgsfWFBHVdWNbFJWcHwHP2NVypw87 ------END CERTIFICATE----- - -D-TRUST EV Root CA 1 2020 -========================= ------BEGIN CERTIFICATE----- -MIIC2zCCAmCgAwIBAgIQXwJB13qHfEwDo6yWjfv/0DAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE -RTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEVWIFJvb3QgQ0EgMSAy -MDIwMB4XDTIwMDIxMTEwMDAwMFoXDTM1MDIxMTA5NTk1OVowSDELMAkGA1UEBhMCREUxFTATBgNV -BAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBFViBSb290IENBIDEgMjAyMDB2MBAG -ByqGSM49AgEGBSuBBAAiA2IABPEL3YZDIBnfl4XoIkqbz52Yv7QFJsnL46bSj8WeeHsxiamJrSc8 -ZRCC/N/DnU7wMyPE0jL1HLDfMxddxfCxivnvubcUyilKwg+pf3VlSSowZ/Rk99Yad9rDwpdhQntJ -raOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFH8QARY3OqQo5FD4pPfsazK2/umL -MA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu -bmV0L2NybC9kLXRydXN0X2V2X3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj -dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwRVYlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP -PUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD -AwNpADBmAjEAyjzGKnXCXnViOTYAYFqLwZOZzNnbQTs7h5kXO9XMT8oi96CAy/m0sRtW9XLS/BnR -AjEAkfcwkz8QRitxpNA7RJvAKQIFskF3UfN5Wp6OFKBOQtJbgfM0agPnIjhQW+0ZT0MW ------END CERTIFICATE----- - -DigiCert TLS ECC P384 Root G5 -============================= ------BEGIN CERTIFICATE----- -MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURpZ2lDZXJ0IFRMUyBFQ0MgUDM4 -NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDkRpZ2lDZXJ0LCBJbmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQg -Um9vdCBHNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1Tzvd -lHJS7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp0zVozptj -n4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICISB4CIfBFqMA4GA1UdDwEB -/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQCJao1H5+z8blUD2Wds -Jk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQLgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIx -AJSdYsiJvRmEFOml+wG4DXZDjC5Ty3zfDBeWUA== ------END CERTIFICATE----- - -DigiCert TLS RSA4096 Root G5 -============================ ------BEGIN CERTIFICATE----- -MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBNMQswCQYDVQQG -EwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0 -MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2 -IFJvb3QgRzUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS8 -7IE+ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG02C+JFvuU -AT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgpwgscONyfMXdcvyej/Ces -tyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZMpG2T6T867jp8nVid9E6P/DsjyG244gXa -zOvswzH016cpVIDPRFtMbzCe88zdH5RDnU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnV -DdXifBBiqmvwPXbzP6PosMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9q -TXeXAaDxZre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cdLvvy -z6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvXKyY//SovcfXWJL5/ -MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNeXoVPzthwiHvOAbWWl9fNff2C+MIk -wcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPLtgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4E -FgQUUTMc7TZArxfTJc1paPKvTiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw -GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7HPNtQOa27PShN -lnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLFO4uJ+DQtpBflF+aZfTCIITfN -MBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQREtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/ -u4cnYiWB39yhL/btp/96j1EuMPikAdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9G -OUrYU9DzLjtxpdRv/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh -47a+p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilwMUc/dNAU -FvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WFqUITVuwhd4GTWgzqltlJ -yqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCKovfepEWFJqgejF0pW8hL2JpqA15w8oVP -bEtoL8pU9ozaMv7Da4M/OMZ+ ------END CERTIFICATE----- - -Certainly Root R1 -================= ------BEGIN CERTIFICATE----- -MIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAwPTELMAkGA1UE -BhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2VydGFpbmx5IFJvb3QgUjEwHhcN -MjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2Vy -dGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBANA21B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O -5MQTvqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbedaFySpvXl -8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b01C7jcvk2xusVtyWMOvwl -DbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGI -XsXwClTNSaa/ApzSRKft43jvRl5tcdF5cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkN -KPl6I7ENPT2a/Z2B7yyQwHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQ -AjeZjOVJ6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA2Cnb -rlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyHWyf5QBGenDPBt+U1 -VwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMReiFPCyEQtkA6qyI6BJyLm4SGcprS -p6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud -DgQWBBTgqj8ljZ9EXME66C6ud0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAsz -HQNTVfSVcOQrPbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d -8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi1wrykXprOQ4v -MMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrdrRT90+7iIgXr0PK3aBLXWopB -GsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9ditaY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+ -gjwN/KUD+nsa2UUeYNrEjvn8K8l7lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgH -JBu6haEaBQmAupVjyTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7 -fpYnKx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLyyCwzk5Iw -x06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5nwXARPbv0+Em34yaXOp/S -X3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6OV+KmalBWQewLK8= ------END CERTIFICATE----- - -Certainly Root E1 -================= ------BEGIN CERTIFICATE----- -MIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQswCQYDVQQGEwJV -UzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBFMTAeFw0yMTA0 -MDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJBgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlu -bHkxGjAYBgNVBAMTEUNlcnRhaW5seSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4 -fxzf7flHh4axpMCK+IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9 -YBk2QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4hevIIgcwCgYIKoZIzj0E -AwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozmut6Dacpps6kFtZaSF4fC0urQe87YQVt8 -rgIwRt7qy12a7DLCZRawTDBcMPPaTnOGBtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR ------END CERTIFICATE----- - -Security Communication RootCA3 -============================== ------BEGIN CERTIFICATE----- -MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQMSUw -IwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1cml0eSBD -b21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQsw -CQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UE -AxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4rCmDvu20r -hvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzAlrenfna84xtSGc4RHwsE -NPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MGTfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2 -/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF79+qMHIjH7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGm -npjKIG58u4iFW/vAEGK78vknR+/RiTlDxN/e4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtY -XLVqAvO4g160a75BflcJdURQVc1aEWEhCmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3weGVPK -p7FKFSBWFHA9K4IsD50VHUeAR/94mQ4xr28+j+2GaR57GIgUssL8gjMunEst+3A7caoreyYn8xrC -3PsXuKHqy6C0rtOUfnrQq8PsOC0RLoi/1D+tEjtCrI8Cbn3M0V9hvqG8OmpI6iZVIhZdXw3/JzOf -GAN0iltSIEdrRU0id4xVJ/CvHozJgyJUt5rQT9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0Vcw -CBEF/VfR2ccCAwEAAaNCMEAwHQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB -/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybS -YpOnpSNyByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PAFNr0Y/Dq9HHu -Tofjcan0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd9XbXv8S2gVj/yP9kaWJ5rW4O -H3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQIUYWg9by0F1jqClx6vWPGOi//lkkZhOpn2ASx -YfQAW0q3nHE3GYV5v4GwxxMOdnE+OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQDdwj98ClZ -XSEIx2C/pHF7uNkegr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO0QR4ynKudtml -+LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUVnuiZIesn -KwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD2NCcnWXL0CsnMQMeNuE9 -dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm -6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR16/9M51NZg== ------END CERTIFICATE----- - -Security Communication ECC RootCA1 -================================== ------BEGIN CERTIFICATE----- -MIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYTAkpQMSUwIwYD -VQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMSswKQYDVQQDEyJTZWN1cml0eSBDb21t -dW5pY2F0aW9uIEVDQyBSb290Q0ExMB4XDTE2MDYxNjA1MTUyOFoXDTM4MDExODA1MTUyOFowYTEL -MAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKzApBgNV -BAMTIlNlY3VyaXR5IENvbW11bmljYXRpb24gRUNDIFJvb3RDQTEwdjAQBgcqhkjOPQIBBgUrgQQA -IgNiAASkpW9gAwPDvTH00xecK4R1rOX9PVdu12O/5gSJko6BnOPpR27KkBLIE+CnnfdldB9sELLo -5OnvbYUymUSxXv3MdhDYW72ixvnWQuRXdtyQwjWpS4g8EkdtXP9JTxpKULGjQjBAMB0GA1UdDgQW -BBSGHOf+LaVKiwj+KBH6vqNm+GBZLzAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAK -BggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3L -snNdo4gIxwwCMQDAqy0Obe0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70e -N9k= ------END CERTIFICATE----- - -BJCA Global Root CA1 -==================== ------BEGIN CERTIFICATE----- -MIIFdDCCA1ygAwIBAgIQVW9l47TZkGobCdFsPsBsIDANBgkqhkiG9w0BAQsFADBUMQswCQYDVQQG -EwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJK -Q0EgR2xvYmFsIFJvb3QgQ0ExMB4XDTE5MTIxOTAzMTYxN1oXDTQ0MTIxMjAzMTYxN1owVDELMAkG -A1UEBhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQD -DBRCSkNBIEdsb2JhbCBSb290IENBMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPFm -CL3ZxRVhy4QEQaVpN3cdwbB7+sN3SJATcmTRuHyQNZ0YeYjjlwE8R4HyDqKYDZ4/N+AZspDyRhyS -sTphzvq3Rp4Dhtczbu33RYx2N95ulpH3134rhxfVizXuhJFyV9xgw8O558dnJCNPYwpj9mZ9S1Wn -P3hkSWkSl+BMDdMJoDIwOvqfwPKcxRIqLhy1BDPapDgRat7GGPZHOiJBhyL8xIkoVNiMpTAK+BcW -yqw3/XmnkRd4OJmtWO2y3syJfQOcs4ll5+M7sSKGjwZteAf9kRJ/sGsciQ35uMt0WwfCyPQ10WRj -eulumijWML3mG90Vr4TqnMfK9Q7q8l0ph49pczm+LiRvRSGsxdRpJQaDrXpIhRMsDQa4bHlW/KNn -MoH1V6XKV0Jp6VwkYe/iMBhORJhVb3rCk9gZtt58R4oRTklH2yiUAguUSiz5EtBP6DF+bHq/pj+b -OT0CFqMYs2esWz8sgytnOYFcuX6U1WTdno9uruh8W7TXakdI136z1C2OVnZOz2nxbkRs1CTqjSSh -GL+9V/6pmTW12xB3uD1IutbB5/EjPtffhZ0nPNRAvQoMvfXnjSXWgXSHRtQpdaJCbPdzied9v3pK -H9MiyRVVz99vfFXQpIsHETdfg6YmV6YBW37+WGgHqel62bno/1Afq8K0wM7o6v0PvY1NuLxxAgMB -AAGjQjBAMB0GA1UdDgQWBBTF7+3M2I0hxkjk49cULqcWk+WYATAPBgNVHRMBAf8EBTADAQH/MA4G -A1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAUoKsITQfI/Ki2Pm4rzc2IInRNwPWaZ+4 -YRC6ojGYWUfo0Q0lHhVBDOAqVdVXUsv45Mdpox1NcQJeXyFFYEhcCY5JEMEE3KliawLwQ8hOnThJ -dMkycFRtwUf8jrQ2ntScvd0g1lPJGKm1Vrl2i5VnZu69mP6u775u+2D2/VnGKhs/I0qUJDAnyIm8 -60Qkmss9vk/Ves6OF8tiwdneHg56/0OGNFK8YT88X7vZdrRTvJez/opMEi4r89fO4aL/3Xtw+zuh -TaRjAv04l5U/BXCga99igUOLtFkNSoxUnMW7gZ/NfaXvCyUeOiDbHPwfmGcCCtRzRBPbUYQaVQNW -4AB+dAb/OMRyHdOoP2gxXdMJxy6MW2Pg6Nwe0uxhHvLe5e/2mXZgLR6UcnHGCyoyx5JO1UbXHfmp -GQrI+pXObSOYqgs4rZpWDW+N8TEAiMEXnM0ZNjX+VVOg4DwzX5Ze4jLp3zO7Bkqp2IRzznfSxqxx -4VyjHQy7Ct9f4qNx2No3WqB4K/TUfet27fJhcKVlmtOJNBir+3I+17Q9eVzYH6Eze9mCUAyTF6ps -3MKCuwJXNq+YJyo5UOGwifUll35HaBC07HPKs5fRJNz2YqAo07WjuGS3iGJCz51TzZm+ZGiPTx4S -SPfSKcOYKMryMguTjClPPGAyzQWWYezyr/6zcCwupvI= ------END CERTIFICATE----- - -BJCA Global Root CA2 -==================== ------BEGIN CERTIFICATE----- -MIICJTCCAaugAwIBAgIQLBcIfWQqwP6FGFkGz7RK6zAKBggqhkjOPQQDAzBUMQswCQYDVQQGEwJD -TjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJKQ0Eg -R2xvYmFsIFJvb3QgQ0EyMB4XDTE5MTIxOTAzMTgyMVoXDTQ0MTIxMjAzMTgyMVowVDELMAkGA1UE -BhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRC -SkNBIEdsb2JhbCBSb290IENBMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABJ3LgJGNU2e1uVCxA/jl -SR9BIgmwUVJY1is0j8USRhTFiy8shP8sbqjV8QnjAyEUxEM9fMEsxEtqSs3ph+B99iK++kpRuDCK -/eHeGBIK9ke35xe/J4rUQUyWPGCWwf0VHKNCMEAwHQYDVR0OBBYEFNJKsVF/BvDRgh9Obl+rg/xI -1LCRMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2gAMGUCMBq8 -W9f+qdJUDkpd0m2xQNz0Q9XSSpkZElaA94M04TVOSG0ED1cxMDAtsaqdAzjbBgIxAMvMh1PLet8g -UXOQwKhbYdDFUDn9hf7B43j4ptZLvZuHjw/l1lOWqzzIQNph91Oj9w== ------END CERTIFICATE----- - -Sectigo Public Server Authentication Root E46 -============================================= ------BEGIN CERTIFICATE----- -MIICOjCCAcGgAwIBAgIQQvLM2htpN0RfFf51KBC49DAKBggqhkjOPQQDAzBfMQswCQYDVQQGEwJH -QjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBTZXJ2 -ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1OTU5 -WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0 -aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUr -gQQAIgNiAAR2+pmpbiDt+dd34wc7qNs9Xzjoq1WmVk/WSOrsfy2qw7LFeeyZYX8QeccCWvkEN/U0 -NSt3zn8gj1KjAIns1aeibVvjS5KToID1AZTc8GgHHs3u/iVStSBDHBv+6xnOQ6OjQjBAMB0GA1Ud -DgQWBBTRItpMWfFLXyY4qp3W7usNw/upYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB -/zAKBggqhkjOPQQDAwNnADBkAjAn7qRaqCG76UeXlImldCBteU/IvZNeWBj7LRoAasm4PdCkT0RH -lAFWovgzJQxC36oCMB3q4S6ILuH5px0CMk7yn2xVdOOurvulGu7t0vzCAxHrRVxgED1cf5kDW21U -SAGKcw== ------END CERTIFICATE----- - -Sectigo Public Server Authentication Root R46 -============================================= ------BEGIN CERTIFICATE----- -MIIFijCCA3KgAwIBAgIQdY39i658BwD6qSWn4cetFDANBgkqhkiG9w0BAQwFADBfMQswCQYDVQQG -EwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBT -ZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1 -OTU5WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1T -ZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwggIiMA0GCSqGSIb3 -DQEBAQUAA4ICDwAwggIKAoICAQCTvtU2UnXYASOgHEdCSe5jtrch/cSV1UgrJnwUUxDaef0rty2k -1Cz66jLdScK5vQ9IPXtamFSvnl0xdE8H/FAh3aTPaE8bEmNtJZlMKpnzSDBh+oF8HqcIStw+Kxwf -GExxqjWMrfhu6DtK2eWUAtaJhBOqbchPM8xQljeSM9xfiOefVNlI8JhD1mb9nxc4Q8UBUQvX4yMP -FF1bFOdLvt30yNoDN9HWOaEhUTCDsG3XME6WW5HwcCSrv0WBZEMNvSE6Lzzpng3LILVCJ8zab5vu -ZDCQOc2TZYEhMbUjUDM3IuM47fgxMMxF/mL50V0yeUKH32rMVhlATc6qu/m1dkmU8Sf4kaWD5Qaz -Yw6A3OASVYCmO2a0OYctyPDQ0RTp5A1NDvZdV3LFOxxHVp3i1fuBYYzMTYCQNFu31xR13NgESJ/A -wSiItOkcyqex8Va3e0lMWeUgFaiEAin6OJRpmkkGj80feRQXEgyDet4fsZfu+Zd4KKTIRJLpfSYF -plhym3kT2BFfrsU4YjRosoYwjviQYZ4ybPUHNs2iTG7sijbt8uaZFURww3y8nDnAtOFr94MlI1fZ -EoDlSfB1D++N6xybVCi0ITz8fAr/73trdf+LHaAZBav6+CuBQug4urv7qv094PPK306Xlynt8xhW -6aWWrL3DkJiy4Pmi1KZHQ3xtzwIDAQABo0IwQDAdBgNVHQ4EFgQUVnNYZJX5khqwEioEYnmhQBWI -IUkwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAC9c -mTz8Bl6MlC5w6tIyMY208FHVvArzZJ8HXtXBc2hkeqK5Duj5XYUtqDdFqij0lgVQYKlJfp/imTYp -E0RHap1VIDzYm/EDMrraQKFz6oOht0SmDpkBm+S8f74TlH7Kph52gDY9hAaLMyZlbcp+nv4fjFg4 -exqDsQ+8FxG75gbMY/qB8oFM2gsQa6H61SilzwZAFv97fRheORKkU55+MkIQpiGRqRxOF3yEvJ+M -0ejf5lG5Nkc/kLnHvALcWxxPDkjBJYOcCj+esQMzEhonrPcibCTRAUH4WAP+JWgiH5paPHxsnnVI -84HxZmduTILA7rpXDhjvLpr3Etiga+kFpaHpaPi8TD8SHkXoUsCjvxInebnMMTzD9joiFgOgyY9m -pFuiTdaBJQbpdqQACj7LzTWb4OE4y2BThihCQRxEV+ioratF4yUQvNs+ZUH7G6aXD+u5dHn5Hrwd -Vw1Hr8Mvn4dGp+smWg9WY7ViYG4A++MnESLn/pmPNPW56MORcr3Ywx65LvKRRFHQV80MNNVIIb/b -E/FmJUNS0nAiNs2fxBx1IK1jcmMGDw4nztJqDby1ORrp0XZ60Vzk50lJLVU3aPAaOpg+VBeHVOmm -J1CJeyAvP/+/oYtKR5j/K3tJPsMpRmAYQqszKbrAKbkTidOIijlBO8n9pu0f9GBj39ItVQGL ------END CERTIFICATE----- - -SSL.com TLS RSA Root CA 2022 -============================ ------BEGIN CERTIFICATE----- -MIIFiTCCA3GgAwIBAgIQb77arXO9CEDii02+1PdbkTANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQG -EwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBSU0Eg -Um9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2MzQyMloXDTQ2MDgxOTE2MzQyMVowTjELMAkGA1UEBhMC -VVMxGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgUlNBIFJv -b3QgQ0EgMjAyMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANCkCXJPQIgSYT41I57u -9nTPL3tYPc48DRAokC+X94xI2KDYJbFMsBFMF3NQ0CJKY7uB0ylu1bUJPiYYf7ISf5OYt6/wNr/y -7hienDtSxUcZXXTzZGbVXcdotL8bHAajvI9AI7YexoS9UcQbOcGV0insS657Lb85/bRi3pZ7Qcac -oOAGcvvwB5cJOYF0r/c0WRFXCsJbwST0MXMwgsadugL3PnxEX4MN8/HdIGkWCVDi1FW24IBydm5M -R7d1VVm0U3TZlMZBrViKMWYPHqIbKUBOL9975hYsLfy/7PO0+r4Y9ptJ1O4Fbtk085zx7AGL0SDG -D6C1vBdOSHtRwvzpXGk3R2azaPgVKPC506QVzFpPulJwoxJF3ca6TvvC0PeoUidtbnm1jPx7jMEW -TO6Af77wdr5BUxIzrlo4QqvXDz5BjXYHMtWrifZOZ9mxQnUjbvPNQrL8VfVThxc7wDNY8VLS+YCk -8OjwO4s4zKTGkH8PnP2L0aPP2oOnaclQNtVcBdIKQXTbYxE3waWglksejBYSd66UNHsef8JmAOSq -g+qKkK3ONkRN0VHpvB/zagX9wHQfJRlAUW7qglFA35u5CCoGAtUjHBPW6dvbxrB6y3snm/vg1UYk -7RBLY0ulBY+6uB0rpvqR4pJSvezrZ5dtmi2fgTIFZzL7SAg/2SW4BCUvAgMBAAGjYzBhMA8GA1Ud -EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU+y437uOEeicuzRk1sTN8/9REQrkwHQYDVR0OBBYEFPsu -N+7jhHonLs0ZNbEzfP/UREK5MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAjYlt -hEUY8U+zoO9opMAdrDC8Z2awms22qyIZZtM7QbUQnRC6cm4pJCAcAZli05bg4vsMQtfhWsSWTVTN -j8pDU/0quOr4ZcoBwq1gaAafORpR2eCNJvkLTqVTJXojpBzOCBvfR4iyrT7gJ4eLSYwfqUdYe5by -iB0YrrPRpgqU+tvT5TgKa3kSM/tKWTcWQA673vWJDPFs0/dRa1419dvAJuoSc06pkZCmF8NsLzjU -o3KUQyxi4U5cMj29TH0ZR6LDSeeWP4+a0zvkEdiLA9z2tmBVGKaBUfPhqBVq6+AL8BQx1rmMRTqo -ENjwuSfr98t67wVylrXEj5ZzxOhWc5y8aVFjvO9nHEMaX3cZHxj4HCUp+UmZKbaSPaKDN7Egkaib -MOlqbLQjk2UEqxHzDh1TJElTHaE/nUiSEeJ9DU/1172iWD54nR4fK/4huxoTtrEoZP2wAgDHbICi -vRZQIA9ygV/MlP+7mea6kMvq+cYMwq7FGc4zoWtcu358NFcXrfA/rs3qr5nsLFR+jM4uElZI7xc7 -P0peYNLcdDa8pUNjyw9bowJWCZ4kLOGGgYz+qxcs+sjiMho6/4UIyYOf8kpIEFR3N+2ivEC+5BB0 -9+Rbu7nzifmPQdjH5FCQNYA+HLhNkNPU98OwoX6EyneSMSy4kLGCenROmxMmtNVQZlR4rmA= ------END CERTIFICATE----- - -SSL.com TLS ECC Root CA 2022 -============================ ------BEGIN CERTIFICATE----- -MIICOjCCAcCgAwIBAgIQFAP1q/s3ixdAW+JDsqXRxDAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV -UzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBFQ0MgUm9v -dCBDQSAyMDIyMB4XDTIyMDgyNTE2MzM0OFoXDTQ2MDgxOTE2MzM0N1owTjELMAkGA1UEBhMCVVMx -GDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgRUNDIFJvb3Qg -Q0EgMjAyMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABEUpNXP6wrgjzhR9qLFNoFs27iosU8NgCTWy -JGYmacCzldZdkkAZDsalE3D07xJRKF3nzL35PIXBz5SQySvOkkJYWWf9lCcQZIxPBLFNSeR7T5v1 -5wj4A4j3p8OSSxlUgaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBSJjy+j6CugFFR7 -81a4Jl9nOAuc0DAdBgNVHQ4EFgQUiY8vo+groBRUe/NWuCZfZzgLnNAwDgYDVR0PAQH/BAQDAgGG -MAoGCCqGSM49BAMDA2gAMGUCMFXjIlbp15IkWE8elDIPDAI2wv2sdDJO4fscgIijzPvX6yv/N33w -7deedWo1dlJF4AIxAMeNb0Igj762TVntd00pxCAgRWSGOlDGxK0tk/UYfXLtqc/ErFc2KAhl3zx5 -Zn6g6g== ------END CERTIFICATE----- - -Atos TrustedRoot Root CA ECC TLS 2021 -===================================== ------BEGIN CERTIFICATE----- -MIICFTCCAZugAwIBAgIQPZg7pmY9kGP3fiZXOATvADAKBggqhkjOPQQDAzBMMS4wLAYDVQQDDCVB -dG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgRUNDIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQswCQYD -VQQGEwJERTAeFw0yMTA0MjIwOTI2MjNaFw00MTA0MTcwOTI2MjJaMEwxLjAsBgNVBAMMJUF0b3Mg -VHJ1c3RlZFJvb3QgUm9vdCBDQSBFQ0MgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNVBAYT -AkRFMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEloZYKDcKZ9Cg3iQZGeHkBQcfl+3oZIK59sRxUM6K -DP/XtXa7oWyTbIOiaG6l2b4siJVBzV3dscqDY4PMwL502eCdpO5KTlbgmClBk1IQ1SQ4AjJn8ZQS -b+/Xxd4u/RmAo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR2KCXWfeBmmnoJsmo7jjPX -NtNPojAOBgNVHQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIwW5kp85wxtolrbNa9d+F851F+ -uDrNozZffPc8dz7kUK2o59JZDCaOMDtuCCrCp1rIAjEAmeMM56PDr9NJLkaCI2ZdyQAUEv049OGY -a3cpetskz2VAv9LcjBHo9H1/IISpQuQo ------END CERTIFICATE----- - -Atos TrustedRoot Root CA RSA TLS 2021 -===================================== ------BEGIN CERTIFICATE----- -MIIFZDCCA0ygAwIBAgIQU9XP5hmTC/srBRLYwiqipDANBgkqhkiG9w0BAQwFADBMMS4wLAYDVQQD -DCVBdG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgUlNBIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQsw -CQYDVQQGEwJERTAeFw0yMTA0MjIwOTIxMTBaFw00MTA0MTcwOTIxMDlaMEwxLjAsBgNVBAMMJUF0 -b3MgVHJ1c3RlZFJvb3QgUm9vdCBDQSBSU0EgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNV -BAYTAkRFMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtoAOxHm9BYx9sKOdTSJNy/BB -l01Z4NH+VoyX8te9j2y3I49f1cTYQcvyAh5x5en2XssIKl4w8i1mx4QbZFc4nXUtVsYvYe+W/CBG -vevUez8/fEc4BKkbqlLfEzfTFRVOvV98r61jx3ncCHvVoOX3W3WsgFWZkmGbzSoXfduP9LVq6hdK -ZChmFSlsAvFr1bqjM9xaZ6cF4r9lthawEO3NUDPJcFDsGY6wx/J0W2tExn2WuZgIWWbeKQGb9Cpt -0xU6kGpn8bRrZtkh68rZYnxGEFzedUlnnkL5/nWpo63/dgpnQOPF943HhZpZnmKaau1Fh5hnstVK -PNe0OwANwI8f4UDErmwh3El+fsqyjW22v5MvoVw+j8rtgI5Y4dtXz4U2OLJxpAmMkokIiEjxQGMY -sluMWuPD0xeqqxmjLBvk1cbiZnrXghmmOxYsL3GHX0WelXOTwkKBIROW1527k2gV+p2kHYzygeBY -Br3JtuP2iV2J+axEoctr+hbxx1A9JNr3w+SH1VbxT5Aw+kUJWdo0zuATHAR8ANSbhqRAvNncTFd+ -rrcztl524WWLZt+NyteYr842mIycg5kDcPOvdO3GDjbnvezBc6eUWsuSZIKmAMFwoW4sKeFYV+xa -fJlrJaSQOoD0IJ2azsct+bJLKZWD6TWNp0lIpw9MGZHQ9b8Q4HECAwEAAaNCMEAwDwYDVR0TAQH/ -BAUwAwEB/zAdBgNVHQ4EFgQUdEmZ0f+0emhFdcN+tNzMzjkz2ggwDgYDVR0PAQH/BAQDAgGGMA0G -CSqGSIb3DQEBDAUAA4ICAQAjQ1MkYlxt/T7Cz1UAbMVWiLkO3TriJQ2VSpfKgInuKs1l+NsW4AmS -4BjHeJi78+xCUvuppILXTdiK/ORO/auQxDh1MoSf/7OwKwIzNsAQkG8dnK/haZPso0UvFJ/1TCpl -Q3IM98P4lYsU84UgYt1UU90s3BiVaU+DR3BAM1h3Egyi61IxHkzJqM7F78PRreBrAwA0JrRUITWX -AdxfG/F851X6LWh3e9NpzNMOa7pNdkTWwhWaJuywxfW70Xp0wmzNxbVe9kzmWy2B27O3Opee7c9G -slA9hGCZcbUztVdF5kJHdWoOsAgMrr3e97sPWD2PAzHoPYJQyi9eDF20l74gNAf0xBLh7tew2Vkt -afcxBPTy+av5EzH4AXcOPUIjJsyacmdRIXrMPIWo6iFqO9taPKU0nprALN+AnCng33eU0aKAQv9q -TFsR0PXNor6uzFFcw9VUewyu1rkGd4Di7wcaaMxZUa1+XGdrudviB0JbuAEFWDlN5LuYo7Ey7Nmj -1m+UI/87tyll5gfp77YZ6ufCOB0yiJA8EytuzO+rdwY0d4RPcuSBhPm5dDTedk+SKlOxJTnbPP/l -PqYO5Wue/9vsL3SD3460s6neFE3/MaNFcyT6lSnMEpcEoji2jbDwN/zIIX8/syQbPYtuzE2wFg2W -HYMfRsCbvUOZ58SWLs5fyQ== ------END CERTIFICATE----- diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/falsepositive.key b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/falsepositive.key deleted file mode 100644 index 22ef7117..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/falsepositive.key +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFI0faZb9T1jloaRMw4g -G/tW2CnYwYTpmXuQCphIrM6rYvjptYtlJBzy370sQovLIzHBiqAYc3Rv5FJBDQ0F -mTR/iF3Tm8YmxjqSuHECn8Q6KSPvaZyQFSM8vUmFjwVtTKgEjo4rFVrne8OOvQ4S -FRvWbeBvxoO6SfLArLK+hJAZSMRyzzfsNL1q5okZqLHQhdtkiFfPWJkXIEhL+vUK -U5SLZoFIh9hVImmJuXHBQ0qXRnTCQlpb80GrMD1CBYFFeHx8IOCZwWZ2ifIPL5n+ -vxjZ30zH3DDhcwhQv3y2hJsedJ7w+7I7gs/jmECUG36rbGbpaXrQnwhaiGBdRoiv -awIDAQAB ------END PUBLIC KEY----- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/init.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/init.php deleted file mode 100644 index a801e3f5..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/init.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -if (defined('WFWAF_VERSION')) { exit(); } - -define('WFWAF_VERSION', '1.1.0'); -define('WFWAF_PATH', dirname(__FILE__) . '/'); -define('WFWAF_LIB_PATH', WFWAF_PATH . 'lib/'); -define('WFWAF_VIEW_PATH', WFWAF_PATH . 'views/'); -define('WFWAF_API_URL_SEC', 'https://noc4.wordfence.com/v1.11/'); -if (!defined('WFWAF_DEBUG')) { - define('WFWAF_DEBUG', false); -} -if (!defined('WFWAF_ENABLED')) { - define('WFWAF_ENABLED', true); -} - -define('WFWAF_IS_WINDOWS', strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'); - -require_once WFWAF_LIB_PATH . 'waf.php'; -require_once WFWAF_LIB_PATH . 'utils.php'; -require_once WFWAF_LIB_PATH . 'i18n.php'; -require_once WFWAF_LIB_PATH . 'xmlrpc.php'; -require_once WFWAF_LIB_PATH . 'shutdown.php'; - -require_once WFWAF_LIB_PATH . 'storage.php'; -require_once WFWAF_LIB_PATH . 'storage/file.php'; -require_once WFWAF_LIB_PATH . 'storage/mysql.php'; - -require_once WFWAF_LIB_PATH . 'config.php'; - -require_once WFWAF_LIB_PATH . 'rules.php'; -require_once WFWAF_LIB_PATH . 'parser/lexer.php'; -require_once WFWAF_LIB_PATH . 'parser/parser.php'; -require_once WFWAF_LIB_PATH . 'parser/sqli.php'; - -require_once WFWAF_LIB_PATH . 'request.php'; -require_once WFWAF_LIB_PATH . 'http.php'; -require_once WFWAF_LIB_PATH . 'view.php'; \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/api.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/api.php deleted file mode 100644 index 93b82302..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/api.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -class wfWafApiException extends Exception { -} - -class wfWafMissingApiKeyException extends wfWafApiException { -} - -class wfWafApi { - - private $waf; - private $apiKey; - - public function __construct($waf) { - $this->waf = $waf; - $this->apiKey = $this->getConfig('apiKey'); - if (empty($this->apiKey)) - throw new wfWafMissingApiKeyException('No API key is available'); - } - - private function getConfig($key) { - return $this->waf->getStorageEngine()->getConfig($key, null, 'synced'); - } - - private function guessSiteUrl() { - return sprintf('%s://%s/', $this->waf->getRequest()->getProtocol(), $this->waf->getRequest()->getHost()); - } - - private function guessSiteUrlIfNecessary($configKey) { - $url = $this->getConfig($configKey); - if (!$url) - $url = $this->guessSiteUrl(); - return $url; - } - - private function getSiteUrl() { - return $this->guessSiteUrlIfNecessary('siteURL'); - } - - private function getHomeUrl() { - return $this->guessSiteUrlIfNecessary('homeURL'); - } - - private function buildQueryString($additionalParameters = array()) { - $parameters = array( - 'k' => $this->apiKey, - 's' => $this->getSiteUrl(), - 'h' => $this->getHomeUrl(), - 't' => microtime(true), - 'lang' => $this->getConfig('WPLANG') - ); - $parameters = array_merge($parameters, $additionalParameters); - return http_build_query($parameters, '', '&'); - } - - private function buildUrl($queryParameters, $path = '') { - return WFWAF_API_URL_SEC . $path . '?' . $this->buildQueryString($queryParameters); - } - - public function actionGet($action, $parameters = array()) { - $parameters['action'] = $action; - $url = $this->buildUrl($parameters); - $response = wfWAFHTTP::get($url); - if ($response === false) - throw new wfWafApiException('Request failed'); - return $response; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/config.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/config.php deleted file mode 100644 index c14b89af..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/config.php +++ /dev/null @@ -1,88 +0,0 @@ -<?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; - } -} -} diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php deleted file mode 100644 index 91ecf96b..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php +++ /dev/null @@ -1,473 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -class wfWAFHTTP { - - private $url; - private $auth; - private $body; - private $cookies; -// private $fileNames; -// private $files; - private $headers; - private $method; - private $queryString; - - /** - * @var wfWAFHTTPTransport - */ - private $transport; - - /** - * @param string $url - * @param wfWAFHTTP $request - * @return wfWAFHTTPResponse|bool - * @throws wfWAFHTTPTransportException - */ - public static function get($url, $request = null, $timeout = 5, $connectTimeout = null) { - if (!$request) { - $request = new self(); - } - $request->setUrl($url); - $request->setMethod('GET'); - $transport = wfWAFHTTPTransport::getInstance(); - $transport->setConnectTimeout($connectTimeout); - $transport->setTimeout($timeout); - $request->setTransport($transport); - // $request->setCookies("XDEBUG_SESSION=netbeans-xdebug"); - return $request->send(); - } - - /** - * @param string $url - * @param array $post - * @param wfWAFHTTP $request - * @return wfWAFHTTPResponse|bool - * @throws wfWAFHTTPTransportException - */ - public static function post($url, $post = array(), $request = null, $timeout = 5, $connectTimeout = null) { - if (!$request) { - $request = new self(); - } - $request->setUrl($url); - $request->setMethod('POST'); - $request->setBody($post); - $transport = wfWAFHTTPTransport::getInstance(); - $transport->setConnectTimeout($connectTimeout); - $transport->setTimeout($timeout); - $request->setTransport($transport); - return $request->send(); - } - - /** - * @return wfWAFHTTPResponse|bool - * @throws wfWAFHTTPTransportException - */ - public function send() { - if (!$this->getTransport()) { - throw new wfWAFHTTPTransportException('Need to provide a valid HTTP transport before calling ' . __METHOD__); - } - return $this->getTransport()->send($this); - } - - /** - * @return mixed - */ - public function getUrl() { - return $this->url; - } - - /** - * @param mixed $url - */ - public function setUrl($url) { - $this->url = $url; - } - - /** - * @return mixed - */ - public function getAuth() { - return $this->auth; - } - - /** - * @param mixed $auth - */ - public function setAuth($auth) { - $this->auth = $auth; - } - - /** - * @return mixed - */ - public function getBody() { - return $this->body; - } - - /** - * @param mixed $body - */ - public function setBody($body) { - $this->body = $body; - } - - /** - * @return mixed - */ - public function getCookies() { - return $this->cookies; - } - - /** - * @param mixed $cookies - */ - public function setCookies($cookies) { - $this->cookies = $cookies; - } - - /** - * @return mixed - */ - public function getHeaders() { - return $this->headers; - } - - /** - * @param mixed $headers - */ - public function setHeaders($headers) { - $this->headers = $headers; - } - - /** - * @return mixed - */ - public function getMethod() { - return $this->method; - } - - /** - * @param mixed $method - */ - public function setMethod($method) { - $this->method = $method; - } - - /** - * @return mixed - */ - public function getQueryString() { - return $this->queryString; - } - - /** - * @param mixed $queryString - */ - public function setQueryString($queryString) { - $this->queryString = $queryString; - } - - /** - * @return wfWAFHTTPTransport - */ - public function getTransport() { - return $this->transport; - } - - /** - * @param wfWAFHTTPTransport $transport - */ - public function setTransport($transport) { - $this->transport = $transport; - } -} - -class wfWAFHTTPResponse { - - private $body; - private $headers; - private $statusCode; - - /** - * @return mixed - */ - public function getBody() { - return $this->body; - } - - /** - * @param mixed $body - */ - public function setBody($body) { - $this->body = $body; - } - - /** - * @return mixed - */ - public function getHeaders() { - return $this->headers; - } - - /** - * @param mixed $headers - */ - public function setHeaders($headers) { - $this->headers = $headers; - } - - /** - * @return mixed - */ - public function getStatusCode() { - return $this->statusCode; - } - - /** - * @param mixed $statusCode - */ - public function setStatusCode($statusCode) { - $this->statusCode = $statusCode; - } -} - -abstract class wfWAFHTTPTransport { - private static $instance; - - private $_connectTimeout = null; - private $_timeout = 5; - - /** - * @return wfWAFHTTPTransport - * @throws wfWAFHTTPTransportException - */ - public static function getInstance() { - if (!self::$instance) { - self::$instance = self::getFirstTransport(); - } - return self::$instance; - } - - /** - * @param mixed $instance - */ - public static function setInstance($instance) { - self::$instance = $instance; - } - - /** - * @return wfWAFHTTPTransport - * @throws wfWAFHTTPTransportException - */ - public static function getFirstTransport() { - if (function_exists('curl_init')) { - return new wfWAFHTTPTransportCurl(); - } else if (function_exists('file_get_contents')) { - return new wfWAFHTTPTransportStreams(); - } - throw new wfWAFHTTPTransportException('No valid HTTP transport found.'); - } - - /** - * @param array $cookieArray - * @return string - */ - public static function buildCookieString($cookieArray) { - $cookies = ''; - foreach ($cookieArray as $cookieName => $value) { - $cookies .= "$cookieName=" . urlencode($value) . '; '; - } - $cookies = rtrim($cookies); - return $cookies; - } - - /** - * @param wfWAFHTTP $request - * @return wfWAFHTTPResponse|bool - */ - abstract public function send($request); - - public function setConnectTimeout($connectTimeout) { - $this->_connectTimeout = $connectTimeout; - } - public function getConnectTimeout() { - return $this->_connectTimeout; - } - - public function setTimeout($timeout) { - $this->_timeout = $timeout; - } - public function getTimeout() { - return $this->_timeout; - } -} - -class wfWAFHTTPTransportCurl extends wfWAFHTTPTransport { - - /** - * @todo Proxy settings - * @param wfWAFHTTP $request - * @return wfWAFHTTPResponse|bool - */ - public function send($request) { - $url = $request->getUrl(); - if ($queryString = $request->getQueryString()) { - if (is_array($queryString)) { - $queryString = http_build_query($queryString, '', '&'); - } - $url .= (wfWAFUtils::strpos($url, '?') !== false ? '&' : '?') . $queryString; - } - - $ch = curl_init($url); - switch (wfWAFUtils::strtolower($request->getMethod())) { - case 'post': - curl_setopt($ch, CURLOPT_POST, 1); - break; - } - if ($body = $request->getBody()) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $body); - } - if ($auth = $request->getAuth()) { - curl_setopt($ch, CURLOPT_USERPWD, $auth['user'] . ':' . $auth['password']); - } - if ($cookies = $request->getCookies()) { - if (is_array($cookies)) { - $cookies = self::buildCookieString($cookies); - } - curl_setopt($ch, CURLOPT_COOKIE, $cookies); - } - if ($headers = $request->getHeaders()) { - if (is_array($headers)) { - $_headers = array(); - foreach ($headers as $header => $value) { - $_headers[] = $header . ': ' . $value; - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $_headers); - } - } - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - if ($this->getConnectTimeout() !== null) { curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->getConnectTimeout()); } - curl_setopt($ch, CURLOPT_TIMEOUT, $this->getTimeout()); - if (defined('CURLOPT_ACCEPT_ENCODING')) { - curl_setopt($ch, CURLOPT_ACCEPT_ENCODING, ''); //The empty string is a magic value that means "send all supported encodings" - } - else if (defined('CURLOPT_ENCODING')) { - curl_setopt($ch, CURLOPT_ENCODING, ''); - } - curl_setopt($ch, CURLOPT_HEADER, 1); - curl_setopt($ch, CURLOPT_CAINFO, WFWAF_PATH . 'cacert.pem'); //On some systems curl uses an outdated root certificate chain file - $curlResponse = curl_exec($ch); - - if ($curlResponse !== false) { - $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE); - $header = wfWAFUtils::substr($curlResponse, 0, $headerSize); - $body = wfWAFUtils::substr($curlResponse, $headerSize); - - $response = new wfWAFHTTPResponse(); - $response->setBody($body); - $response->setHeaders($header); - $response->setStatusCode(curl_getinfo($ch, CURLINFO_HTTP_CODE)); - return $response; - } - return false; - } -} - -class wfWAFHTTPTransportStreams extends wfWAFHTTPTransport { - - /** - * @todo Implement wfWAFHTTPTransportStreams::send. - * @param wfWAFHTTP $request - * @return mixed - * @throws wfWAFHTTPTransportException - */ - public function send($request) { - $timeout = $this->getTimeout(); - - $url = $request->getUrl(); - if ($queryString = $request->getQueryString()) { - if (is_array($queryString)) { - $queryString = http_build_query($queryString, '', '&'); - } - $url .= (wfWAFUtils::strpos($url, '?') !== false ? '&' : '?') . $queryString; - } - - $urlParsed = parse_url($request->getUrl()); - - $headers = "Host: $urlParsed[host]\r\n"; - if ($auth = $request->getAuth()) { - $headers .= 'Authorization: Basic ' . base64_encode($auth['user'] . ':' . $auth['password']) . "\r\n"; - } - if ($cookies = $request->getCookies()) { - if (is_array($cookies)) { - $cookies = self::buildCookieString($cookies); - } - $headers .= "Cookie: $cookies\r\n"; - } - $hasUA = false; - if ($_headers = $request->getHeaders()) { - if (is_array($_headers)) { - foreach ($_headers as $header => $value) { - if (trim(wfWAFUtils::strtolower($header)) === 'user-agent') { - $hasUA = true; - } - $headers .= $header . ': ' . $value . "\r\n"; - } - } - } - if (!$hasUA) { - $headers .= "User-Agent: Wordfence Streams UA\r\n"; - } - - $httpOptions = array( - 'method' => $request->getMethod(), - 'ignore_errors' => true, - 'timeout' => $timeout, - 'follow_location' => 1, - 'max_redirects' => 5, - ); - if (wfWAFUtils::strlen($request->getBody()) > 0) { - $httpOptions['content'] = $request->getBody(); - $headers .= 'Content-Length: ' . wfWAFUtils::strlen($httpOptions['content']) . "\r\n"; - } - $httpOptions['header'] = $headers; - - $options = array( - wfWAFUtils::strtolower($urlParsed['scheme']) => $httpOptions, - ); - - $context = stream_context_create($options); - $stream = fopen($request->getUrl(), 'r', false, $context); - if (!is_resource($stream)) { - return false; - } - - $metaData = stream_get_meta_data($stream); - - // Get the HTTP response code - $httpResponse = array_shift($metaData['wrapper_data']); - - if (preg_match_all('/(\w+\/\d\.\d) (\d{3})/', $httpResponse, $matches) !== false) { - // $protocol = $matches[1][0]; - $status = (int) $matches[2][0]; - } else { - // $protocol = null; - $status = null; - } - - $responseObj = new wfWAFHTTPResponse(); - $responseObj->setHeaders(join("\r\n", $metaData['wrapper_data'])); - $responseObj->setBody(stream_get_contents($stream)); - $responseObj->setStatusCode($status); - - // Close the stream after use - fclose($stream); - - return $responseObj; - } -} - -class wfWAFHTTPTransportException extends wfWAFException { -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/i18n.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/i18n.php deleted file mode 100644 index 7c55b4c9..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/i18n.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -class wfWAFI18n { - - /** - * @var self - */ - protected static $instance; - - /** - * @param string $text - * @return string - */ - public static function __($text) { - return self::getInstance()->getI18nEngine()->__($text); - } - - public static function esc_html__($text) { - return htmlentities(self::__($text), ENT_QUOTES, 'UTF-8'); - } - - public static function esc_html_e($text) { - echo self::esc_html__($text); - } - - /** - * @return self - */ - public static function getInstance() { - if (!self::$instance) { - self::$instance = new self(new wfWAFI18nEngineDefault()); - } - return self::$instance; - } - - /** - * @param self $i18nEngine - */ - public static function setInstance($i18nEngine) { - self::$instance = $i18nEngine; - } - - /** @var wfWAFI18nEngine */ - private $i18nEngine; - - /** - * @param wfWAFI18nEngine $i18nEngine - */ - public function __construct($i18nEngine) { - $this->i18nEngine = $i18nEngine; - } - - /** - * @return wfWAFI18nEngine - */ - public function getI18nEngine() { - return $this->i18nEngine; - } - - /** - * @param wfWAFI18nEngine $i18nEngine - */ - public function setI18nEngine($i18nEngine) { - $this->i18nEngine = $i18nEngine; - } -} - -class wfWAFI18nEngineDefault implements wfWAFI18nEngine { - - /** - * @param string $text - * @return string - */ - public function __($text) { - return $text; - } -} - -interface wfWAFI18nEngine { - - /** - * @param string $text - * @return string - */ - public function __($text); - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/json.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/json.php deleted file mode 100644 index 63ea1933..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/json.php +++ /dev/null @@ -1,960 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ -/** - * Converts to and from JSON format. - * - * JSON (JavaScript Object Notation) is a lightweight data-interchange - * format. It is easy for humans to read and write. It is easy for machines - * to parse and generate. It is based on a subset of the JavaScript - * Programming Language, Standard ECMA-262 3rd Edition - December 1999. - * This feature can also be found in Python. JSON is a text format that is - * completely language independent but uses conventions that are familiar - * to programmers of the C-family of languages, including C, C++, C#, Java, - * JavaScript, Perl, TCL, and many others. These properties make JSON an - * ideal data-interchange language. - * - * This package provides a simple encoder and decoder for JSON notation. It - * is intended for use with client-side Javascript applications that make - * use of HTTPRequest to perform server communication functions - data can - * be encoded into JSON notation for use in a client-side javascript, or - * decoded from incoming Javascript requests. JSON format is native to - * Javascript, and can be directly eval()'ed with no further parsing - * overhead - * - * All strings should be in ASCII or UTF-8 format! - * - * LICENSE: Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: Redistributions of source code must retain the - * above copyright notice, this list of conditions and the following - * disclaimer. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * @category - * @package Services_JSON - * @author Michal Migurski <mike-json@teczno.com> - * @author Matt Knapp <mdknapp[at]gmail[dot]com> - * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> - * @copyright 2005 Michal Migurski - * @version CVS: $Id: JSON.php 305040 2010-11-02 23:19:03Z alan_k $ - * @license http://www.opensource.org/licenses/bsd-license.php - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 - */ - -/** - * Marker constant for Services_JSON::decode(), used to flag stack state - */ -define('WF_SERVICES_JSON_SLICE', 1); - -/** - * Marker constant for Services_JSON::decode(), used to flag stack state - */ -define('WF_SERVICES_JSON_IN_STR', 2); - -/** - * Marker constant for Services_JSON::decode(), used to flag stack state - */ -define('WF_SERVICES_JSON_IN_ARR', 3); - -/** - * Marker constant for Services_JSON::decode(), used to flag stack state - */ -define('WF_SERVICES_JSON_IN_OBJ', 4); - -/** - * Marker constant for Services_JSON::decode(), used to flag stack state - */ -define('WF_SERVICES_JSON_IN_CMT', 5); - -/** - * Behavior switch for Services_JSON::decode() - */ -define('WF_SERVICES_JSON_LOOSE_TYPE', 16); - -/** - * Behavior switch for Services_JSON::decode() - */ -define('WF_SERVICES_JSON_SUPPRESS_ERRORS', 32); - -/** - * Behavior switch for Services_JSON::decode() - */ -define('WF_SERVICES_JSON_USE_TO_JSON', 64); - -/** - * Converts to and from JSON format. - * - * Brief example of use: - * - * <code> - * // create a new instance of Services_JSON - * $json = new Services_JSON(); - * - * // convert a complexe value to JSON notation, and send it to the browser - * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); - * $output = $json->encode($value); - * - * print($output); - * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] - * - * // accept incoming POST data, assumed to be in JSON notation - * $input = file_get_contents('php://input', 1000000); - * $value = $json->decode($input); - * </code> - */ -class wfServices_JSON -{ - /** - * constructs a new JSON instance - * - * @param int $use object behavior flags; combine with boolean-OR - * - * possible values: - * - SERVICES_JSON_LOOSE_TYPE: loose typing. - * "{...}" syntax creates associative arrays - * instead of objects in decode(). - * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression. - * Values which can't be encoded (e.g. resources) - * appear as NULL instead of throwing errors. - * By default, a deeply-nested resource will - * bubble up with an error, so all return values - * from encode() should be checked with isError() - * - SERVICES_JSON_USE_TO_JSON: call toJSON when serializing objects - * It serializes the return value from the toJSON call rather - * than the object itself, toJSON can return associative arrays, - * strings or numbers, if you return an object, make sure it does - * not have a toJSON method, otherwise an error will occur. - */ - function __construct( $use = 0 ) - { - $this->use = $use; - $this->_mb_strlen = function_exists('mb_strlen'); - $this->_mb_convert_encoding = function_exists('mb_convert_encoding'); - $this->_mb_substr = function_exists('mb_substr'); - } - - /** - * PHP4 constructor. - */ - public function wfServices_JSON( $use = 0 ) { - self::__construct( $use ); - } - // private - cache the mbstring lookup results.. - var $_mb_strlen = false; - var $_mb_substr = false; - var $_mb_convert_encoding = false; - - /** - * convert a string from one UTF-16 char to one UTF-8 char - * - * Normally should be handled by mb_convert_encoding, but - * provides a slower PHP-only method for installations - * that lack the multibye string extension. - * - * @param string $utf16 UTF-16 character - * @return string UTF-8 character - * @access private - */ - function utf162utf8($utf16) - { - // oh please oh please oh please oh please oh please - if($this->_mb_convert_encoding) { - return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); - } - - $bytes = (ord($utf16[0]) << 8) | ord($utf16[1]); - - switch(true) { - case ((0x7F & $bytes) == $bytes): - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x7F & $bytes); - - case (0x07FF & $bytes) == $bytes: - // return a 2-byte UTF-8 character - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0xC0 | (($bytes >> 6) & 0x1F)) - . chr(0x80 | ($bytes & 0x3F)); - - case (0xFFFF & $bytes) == $bytes: - // return a 3-byte UTF-8 character - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0xE0 | (($bytes >> 12) & 0x0F)) - . chr(0x80 | (($bytes >> 6) & 0x3F)) - . chr(0x80 | ($bytes & 0x3F)); - } - - // ignoring UTF-32 for now, sorry - return ''; - } - - /** - * convert a string from one UTF-8 char to one UTF-16 char - * - * Normally should be handled by mb_convert_encoding, but - * provides a slower PHP-only method for installations - * that lack the multibye string extension. - * - * @param string $utf8 UTF-8 character - * @return string UTF-16 character - * @access private - */ - function utf82utf16($utf8) - { - // oh please oh please oh please oh please oh please - if($this->_mb_convert_encoding) { - return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); - } - - switch($this->strlen8($utf8)) { - case 1: - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return $utf8; - - case 2: - // return a UTF-16 character from a 2-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x07 & (ord($utf8[0]) >> 2)) - . chr((0xC0 & (ord($utf8[0]) << 6)) - | (0x3F & ord($utf8[1]))); - - case 3: - // return a UTF-16 character from a 3-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr((0xF0 & (ord($utf8[0]) << 4)) - | (0x0F & (ord($utf8[1]) >> 2))) - . chr((0xC0 & (ord($utf8[1]) << 6)) - | (0x7F & ord($utf8[2]))); - } - - // ignoring UTF-32 for now, sorry - return ''; - } - - /** - * encodes an arbitrary variable into JSON format (and sends JSON Header) - * - * @param mixed $var any number, boolean, string, array, or object to be encoded. - * see argument 1 to Services_JSON() above for array-parsing behavior. - * if var is a strng, note that encode() always expects it - * to be in ASCII or UTF-8 format! - * - * @return mixed JSON string representation of input var or an error if a problem occurs - * @access public - */ - function encode($var) - { - header('Content-type: application/json'); - return $this->encodeUnsafe($var); - } - /** - * encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!) - * - * @param mixed $var any number, boolean, string, array, or object to be encoded. - * see argument 1 to Services_JSON() above for array-parsing behavior. - * if var is a strng, note that encode() always expects it - * to be in ASCII or UTF-8 format! - * - * @return mixed JSON string representation of input var or an error if a problem occurs - * @access public - */ - function encodeUnsafe($var) - { - // see bug #16908 - regarding numeric locale printing - $lc = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, 'C'); - $ret = $this->_encode($var); - setlocale(LC_NUMERIC, $lc); - return $ret; - - } - /** - * PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format - * - * @param mixed $var any number, boolean, string, array, or object to be encoded. - * see argument 1 to Services_JSON() above for array-parsing behavior. - * if var is a strng, note that encode() always expects it - * to be in ASCII or UTF-8 format! - * - * @return mixed JSON string representation of input var or an error if a problem occurs - * @access public - */ - function _encode($var) - { - - switch (gettype($var)) { - case 'boolean': - return $var ? 'true' : 'false'; - - case 'NULL': - return 'null'; - - case 'integer': - return (int) $var; - - case 'double': - case 'float': - return (float) $var; - - case 'string': - // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT - $ascii = ''; - $strlen_var = $this->strlen8($var); - - /* - * Iterate over every character in the string, - * escaping with a slash or encoding to UTF-8 where necessary - */ - for ($c = 0; $c < $strlen_var; ++$c) { - - $ord_var_c = ord($var[$c]); - - switch (true) { - case $ord_var_c == 0x08: - $ascii .= '\b'; - break; - case $ord_var_c == 0x09: - $ascii .= '\t'; - break; - case $ord_var_c == 0x0A: - $ascii .= '\n'; - break; - case $ord_var_c == 0x0C: - $ascii .= '\f'; - break; - case $ord_var_c == 0x0D: - $ascii .= '\r'; - break; - - case $ord_var_c == 0x22: - case $ord_var_c == 0x2F: - case $ord_var_c == 0x5C: - // double quote, slash, slosh - $ascii .= '\\'.$var[$c]; - break; - - case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): - // characters U-00000000 - U-0000007F (same as ASCII) - $ascii .= $var[$c]; - break; - - case (($ord_var_c & 0xE0) == 0xC0): - // characters U-00000080 - U-000007FF, mask 110XXXXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - if ($c+1 >= $strlen_var) { - $c += 1; - $ascii .= '?'; - break; - } - - $char = pack('C*', $ord_var_c, ord($var[$c + 1])); - $c += 1; - $utf16 = $this->utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xF0) == 0xE0): - if ($c+2 >= $strlen_var) { - $c += 2; - $ascii .= '?'; - break; - } - // characters U-00000800 - U-0000FFFF, mask 1110XXXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - @ord($var[$c + 1]), - @ord($var[$c + 2])); - $c += 2; - $utf16 = $this->utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xF8) == 0xF0): - if ($c+3 >= $strlen_var) { - $c += 3; - $ascii .= '?'; - break; - } - // characters U-00010000 - U-001FFFFF, mask 11110XXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - ord($var[$c + 1]), - ord($var[$c + 2]), - ord($var[$c + 3])); - $c += 3; - $utf16 = $this->utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xFC) == 0xF8): - // characters U-00200000 - U-03FFFFFF, mask 111110XX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - if ($c+4 >= $strlen_var) { - $c += 4; - $ascii .= '?'; - break; - } - $char = pack('C*', $ord_var_c, - ord($var[$c + 1]), - ord($var[$c + 2]), - ord($var[$c + 3]), - ord($var[$c + 4])); - $c += 4; - $utf16 = $this->utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - - case (($ord_var_c & 0xFE) == 0xFC): - if ($c+5 >= $strlen_var) { - $c += 5; - $ascii .= '?'; - break; - } - // characters U-04000000 - U-7FFFFFFF, mask 1111110X - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, - ord($var[$c + 1]), - ord($var[$c + 2]), - ord($var[$c + 3]), - ord($var[$c + 4]), - ord($var[$c + 5])); - $c += 5; - $utf16 = $this->utf82utf16($char); - $ascii .= sprintf('\u%04s', bin2hex($utf16)); - break; - } - } - return '"'.$ascii.'"'; - - case 'array': - /* - * As per JSON spec if any array key is not an integer - * we must treat the whole array as an object. We - * also try to catch a sparsely populated associative - * array with numeric keys here because some JS engines - * will create an array with empty indexes up to - * max_index which can cause memory issues and because - * the keys, which may be relevant, will be remapped - * otherwise. - * - * As per the ECMA and JSON specification an object may - * have any string as a property. Unfortunately due to - * a hole in the ECMA specification if the key is a - * ECMA reserved word or starts with a digit the - * parameter is only accessible using ECMAScript's - * bracket notation. - */ - - // treat as a JSON object - if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { - $properties = array_map(array($this, 'name_value'), - array_keys($var), - array_values($var)); - - foreach($properties as $property) { - if(wfServices_JSON::isError($property)) { - return $property; - } - } - - return '{' . join(',', $properties) . '}'; - } - - // treat it like a regular array - $elements = array_map(array($this, '_encode'), $var); - - foreach($elements as $element) { - if(wfServices_JSON::isError($element)) { - return $element; - } - } - - return '[' . join(',', $elements) . ']'; - - case 'object': - - // support toJSON methods. - if (($this->use & WF_SERVICES_JSON_USE_TO_JSON) && method_exists($var, 'toJSON')) { - // this may end up allowing unlimited recursion - // so we check the return value to make sure it's not got the same method. - $recode = $var->toJSON(); - - if (method_exists($recode, 'toJSON')) { - - return ($this->use & WF_SERVICES_JSON_SUPPRESS_ERRORS) - ? 'null' - : new wfServices_JSON_Error(get_class($var). - " toJSON returned an object with a toJSON method."); - - } - - return $this->_encode( $recode ); - } - - $vars = get_object_vars($var); - - $properties = array_map(array($this, 'name_value'), - array_keys($vars), - array_values($vars)); - - foreach($properties as $property) { - if(wfServices_JSON::isError($property)) { - return $property; - } - } - - return '{' . join(',', $properties) . '}'; - - default: - return ($this->use & WF_SERVICES_JSON_SUPPRESS_ERRORS) - ? 'null' - : new wfServices_JSON_Error(gettype($var)." can not be encoded as JSON string"); - } - } - - /** - * array-walking function for use in generating JSON-formatted name-value pairs - * - * @param string $name name of key to use - * @param mixed $value reference to an array element to be encoded - * - * @return string JSON-formatted name-value pair, like '"name":value' - * @access private - */ - function name_value($name, $value) - { - $encoded_value = $this->_encode($value); - - if(wfServices_JSON::isError($encoded_value)) { - return $encoded_value; - } - - return $this->_encode(strval($name)) . ':' . $encoded_value; - } - - /** - * reduce a string by removing leading and trailing comments and whitespace - * - * @param $str string string value to strip of comments and whitespace - * - * @return string string value stripped of comments and whitespace - * @access private - */ - function reduce_string($str) - { - $str = preg_replace(array( - - // eliminate single line comments in '// ...' form - '#^\s*//(.+)$#m', - - // eliminate multi-line comments in '/* ... */' form, at start of string - '#^\s*/\*(.+)\*/#Us', - - // eliminate multi-line comments in '/* ... */' form, at end of string - '#/\*(.+)\*/\s*$#Us' - - ), '', $str); - - // eliminate extraneous space - return trim($str); - } - - /** - * decodes a JSON string into appropriate variable - * - * @param string $str JSON-formatted string - * - * @return mixed number, boolean, string, array, or object - * corresponding to given JSON input string. - * See argument 1 to Services_JSON() above for object-output behavior. - * Note that decode() always returns strings - * in ASCII or UTF-8 format! - * @access public - */ - function decode($str) - { - $str = $this->reduce_string($str); - - switch (strtolower($str)) { - case 'true': - return true; - - case 'false': - return false; - - case 'null': - return null; - - default: - $m = array(); - - if (is_numeric($str)) { - // Lookie-loo, it's a number - - // This would work on its own, but I'm trying to be - // good about returning integers where appropriate: - // return (float)$str; - - // Return float or int, as appropriate - return ((float)$str == (integer)$str) - ? (integer)$str - : (float)$str; - - } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { - // STRINGS RETURNED IN UTF-8 FORMAT - $delim = $this->substr8($str, 0, 1); - $chrs = $this->substr8($str, 1, -1); - $utf8 = ''; - $strlen_chrs = $this->strlen8($chrs); - - for ($c = 0; $c < $strlen_chrs; ++$c) { - - $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); - $ord_chrs_c = ord($chrs[$c]); - - switch (true) { - case $substr_chrs_c_2 == '\b': - $utf8 .= chr(0x08); - ++$c; - break; - case $substr_chrs_c_2 == '\t': - $utf8 .= chr(0x09); - ++$c; - break; - case $substr_chrs_c_2 == '\n': - $utf8 .= chr(0x0A); - ++$c; - break; - case $substr_chrs_c_2 == '\f': - $utf8 .= chr(0x0C); - ++$c; - break; - case $substr_chrs_c_2 == '\r': - $utf8 .= chr(0x0D); - ++$c; - break; - - case $substr_chrs_c_2 == '\\"': - case $substr_chrs_c_2 == '\\\'': - case $substr_chrs_c_2 == '\\\\': - case $substr_chrs_c_2 == '\\/': - if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || - ($delim == "'" && $substr_chrs_c_2 != '\\"')) { - $utf8 .= $chrs[++$c]; - } - break; - - case preg_match('/\\\u[0-9A-F]{4}/i', $this->substr8($chrs, $c, 6)): - // single, escaped unicode character - $utf16 = chr(hexdec($this->substr8($chrs, ($c + 2), 2))) - . chr(hexdec($this->substr8($chrs, ($c + 4), 2))); - $utf8 .= $this->utf162utf8($utf16); - $c += 5; - break; - - case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): - $utf8 .= $chrs[$c]; - break; - - case ($ord_chrs_c & 0xE0) == 0xC0: - // characters U-00000080 - U-000007FF, mask 110XXXXX - //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $utf8 .= $this->substr8($chrs, $c, 2); - ++$c; - break; - - case ($ord_chrs_c & 0xF0) == 0xE0: - // characters U-00000800 - U-0000FFFF, mask 1110XXXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $utf8 .= $this->substr8($chrs, $c, 3); - $c += 2; - break; - - case ($ord_chrs_c & 0xF8) == 0xF0: - // characters U-00010000 - U-001FFFFF, mask 11110XXX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $utf8 .= $this->substr8($chrs, $c, 4); - $c += 3; - break; - - case ($ord_chrs_c & 0xFC) == 0xF8: - // characters U-00200000 - U-03FFFFFF, mask 111110XX - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $utf8 .= $this->substr8($chrs, $c, 5); - $c += 4; - break; - - case ($ord_chrs_c & 0xFE) == 0xFC: - // characters U-04000000 - U-7FFFFFFF, mask 1111110X - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $utf8 .= $this->substr8($chrs, $c, 6); - $c += 5; - break; - - } - - } - - return $utf8; - - } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { - // array, or object notation - - if ($str[0] == '[') { - $stk = array(WF_SERVICES_JSON_IN_ARR); - $arr = array(); - } else { - if ($this->use & WF_SERVICES_JSON_LOOSE_TYPE) { - $stk = array(WF_SERVICES_JSON_IN_OBJ); - $obj = array(); - } else { - $stk = array(WF_SERVICES_JSON_IN_OBJ); - $obj = new stdClass(); - } - } - - array_push($stk, array('what' => WF_SERVICES_JSON_SLICE, - 'where' => 0, - 'delim' => false)); - - $chrs = $this->substr8($str, 1, -1); - $chrs = $this->reduce_string($chrs); - - if ($chrs == '') { - if (reset($stk) == WF_SERVICES_JSON_IN_ARR) { - return $arr; - - } else { - return $obj; - - } - } - - //print("\nparsing {$chrs}\n"); - - $strlen_chrs = $this->strlen8($chrs); - - for ($c = 0; $c <= $strlen_chrs; ++$c) { - - $top = end($stk); - $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); - - if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == WF_SERVICES_JSON_SLICE))) { - // found a comma that is not inside a string, array, etc., - // OR we've reached the end of the character list - $slice = $this->substr8($chrs, $top['where'], ($c - $top['where'])); - array_push($stk, array('what' => WF_SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); - //print("Found split at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - - if (reset($stk) == WF_SERVICES_JSON_IN_ARR) { - // we are in an array, so just push an element onto the stack - array_push($arr, $this->decode($slice)); - - } elseif (reset($stk) == WF_SERVICES_JSON_IN_OBJ) { - // we are in an object, so figure - // out the property name and set an - // element in an associative array, - // for now - $parts = array(); - - if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:/Uis', $slice, $parts)) { - // "name":value pair - $key = $this->decode($parts[1]); - $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); - if ($this->use & WF_SERVICES_JSON_LOOSE_TYPE) { - $obj[$key] = $val; - } else { - $obj->$key = $val; - } - } elseif (preg_match('/^\s*(\w+)\s*:/Uis', $slice, $parts)) { - // name:value pair, where name is unquoted - $key = $parts[1]; - $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); - - if ($this->use & WF_SERVICES_JSON_LOOSE_TYPE) { - $obj[$key] = $val; - } else { - $obj->$key = $val; - } - } - - } - - } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != WF_SERVICES_JSON_IN_STR)) { - // found a quote, and we are not inside a string - array_push($stk, array('what' => WF_SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c])); - //print("Found start of string at {$c}\n"); - - } elseif (($chrs[$c] == $top['delim']) && - ($top['what'] == WF_SERVICES_JSON_IN_STR) && - (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) { - // found a quote, we're in a string, and it's not escaped - // we know that it's not escaped becase there is _not_ an - // odd number of backslashes at the end of the string so far - array_pop($stk); - //print("Found end of string at {$c}: ".$this->substr8($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); - - } elseif (($chrs[$c] == '[') && - in_array($top['what'], array(WF_SERVICES_JSON_SLICE, WF_SERVICES_JSON_IN_ARR, WF_SERVICES_JSON_IN_OBJ))) { - // found a left-bracket, and we are in an array, object, or slice - array_push($stk, array('what' => WF_SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); - //print("Found start of array at {$c}\n"); - - } elseif (($chrs[$c] == ']') && ($top['what'] == WF_SERVICES_JSON_IN_ARR)) { - // found a right-bracket, and we're in an array - array_pop($stk); - //print("Found end of array at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - - } elseif (($chrs[$c] == '{') && - in_array($top['what'], array(WF_SERVICES_JSON_SLICE, WF_SERVICES_JSON_IN_ARR, WF_SERVICES_JSON_IN_OBJ))) { - // found a left-brace, and we are in an array, object, or slice - array_push($stk, array('what' => WF_SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); - //print("Found start of object at {$c}\n"); - - } elseif (($chrs[$c] == '}') && ($top['what'] == WF_SERVICES_JSON_IN_OBJ)) { - // found a right-brace, and we're in an object - array_pop($stk); - //print("Found end of object at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - - } elseif (($substr_chrs_c_2 == '/*') && - in_array($top['what'], array(WF_SERVICES_JSON_SLICE, WF_SERVICES_JSON_IN_ARR, WF_SERVICES_JSON_IN_OBJ))) { - // found a comment start, and we are in an array, object, or slice - array_push($stk, array('what' => WF_SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); - $c++; - //print("Found start of comment at {$c}\n"); - - } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == WF_SERVICES_JSON_IN_CMT)) { - // found a comment end, and we're in one now - array_pop($stk); - $c++; - - for ($i = $top['where']; $i <= $c; ++$i) - $chrs = substr_replace($chrs, ' ', $i, 1); - - //print("Found end of comment at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - - } - - } - - if (reset($stk) == WF_SERVICES_JSON_IN_ARR) { - return $arr; - - } elseif (reset($stk) == WF_SERVICES_JSON_IN_OBJ) { - return $obj; - - } - - } - } - } - - /** - * @todo Ultimately, this should just call PEAR::isError() - */ - function isError($data, $code = null) - { - if (class_exists('pear')) { - return PEAR::isError($data, $code); - } elseif (is_object($data) && (get_class($data) == 'wfservices_json_error' || - is_subclass_of($data, 'wfServices_JSON_Error'))) { - return true; - } - - return false; - } - - /** - * Calculates length of string in bytes - * @param string - * @return integer length - */ - function strlen8( $str ) - { - if ( $this->_mb_strlen ) { - return mb_strlen( $str, "8bit" ); - } - return strlen( $str ); - } - - /** - * Returns part of a string, interpreting $start and $length as number of bytes. - * @param string - * @param integer start - * @param integer length - * @return integer length - */ - function substr8( $string, $start, $length=false ) - { - if ( $length === false ) { - $length = $this->strlen8( $string ) - $start; - } - if ( $this->_mb_substr ) { - return mb_substr( $string, $start, $length, "8bit" ); - } - return substr( $string, $start, $length ); - } - -} - -if (class_exists('PEAR_Error')) { - - class wfServices_JSON_Error extends PEAR_Error - { - function __construct($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) - { - parent::PEAR_Error($message, $code, $mode, $options, $userinfo); - } - - public function wfServices_JSON_Error($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) { - self::__construct($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null); - } - } - -} else { - - /** - * @todo Ultimately, this class shall be descended from PEAR_Error - */ - class wfServices_JSON_Error - { - /** - * PHP5 constructor. - */ - function __construct( $message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null ) - { - - } - - /** - * PHP4 constructor. - */ - public function wfServices_JSON_Error( $message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null ) { - self::__construct( $message, $code, $mode, $options, $userinfo ); - } - } - -} -} diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/lexer.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/lexer.php deleted file mode 100644 index 86e091e2..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/lexer.php +++ /dev/null @@ -1,700 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -interface wfWAFLexerInterface { - - public function nextToken(); - -} - -class wfWAFRuleLexer implements wfWAFLexerInterface { - - const MATCH_IDENTIFIER = '/[a-zA-Z_][\\w_]*/'; - const MATCH_SINGLE_STRING_LITERAL = '/\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As'; - const MATCH_DOUBLE_STRING_LITERAL = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"/As'; - const MATCH_NUMBER_LITERAL = '/-?\d+(\.\d+)?/'; - const MATCH_DOT = '/\./'; - const MATCH_AND_COMPARISON_OPERATOR = '/&&/'; - const MATCH_OR_COMPARISON_OPERATOR = '/\|\|/'; - const MATCH_OPEN_PARENTHESIS = '/\(/'; - const MATCH_CLOSE_PARENTHESIS = '/\)/'; - const MATCH_COMMA = '/,/'; - const MATCH_RULE_COMPARISON_END = '/:/'; - const MATCH_ASSIGNMENT = '/=/'; - const MATCH_SINGLE_LINE_COMMENT = '/(?:#|\/\/)[^\n]*/'; - const MATCH_MULTIPLE_LINE_COMMENT = '/\/\*.*?\*\//s'; - const MATCH_OPEN_BRACKET = '/\[/'; - const MATCH_CLOSE_BRACKET = '/\]/'; - - const T_RULE_START = 'T_RULE_START'; - const T_IDENTIFIER = 'T_IDENTIFIER'; - const T_SINGLE_STRING_LITERAL = 'T_SINGLE_STRING_LITERAL'; - const T_DOUBLE_STRING_LITERAL = 'T_DOUBLE_STRING_LITERAL'; - const T_NUMBER_LITERAL = 'T_NUMBER_LITERAL'; - const T_DOT = 'T_DOT'; - const T_COMPARISON_OPERATOR = 'T_COMPARISON_OPERATOR'; - const T_OPEN_PARENTHESIS = 'T_OPEN_PARENTHESIS'; - const T_CLOSE_PARENTHESIS = 'T_CLOSE_PARENTHESIS'; - const T_COMMA = 'T_COMMA'; - const T_RULE_COMPARISON_END = 'T_RULE_COMPARISON_END'; - const T_ASSIGNMENT = 'T_ASSIGNMENT'; - const T_SINGLE_LINE_COMMENT = 'T_SINGLE_LINE_COMMENT'; - const T_MULTIPLE_LINE_COMMENT = 'T_MULTIPLE_LINE_COMMENT'; - const T_OPEN_BRACKET = 'T_OPEN_BRACKET'; - const T_CLOSE_BRACKET = 'T_CLOSE_BRACKET'; - - - /** - * @var string - */ - private $rules; - - /** - * @var wfWAFStringScanner - */ - private $scanner; - - /** - * wfWAFRuleLexer constructor. - * @param $rules - */ - public function __construct($rules) { - $this->setRules($rules); - $this->scanner = new wfWAFStringScanner($rules); - } - - /** - * @return array - * @throws wfWAFParserSyntaxError - */ - public function tokenize() { - $tokens = array(); - while ($token = $this->nextToken()) { - $tokens[] = $token; - } - return $tokens; - } - - /** - * @return bool|wfWAFLexerToken - * @throws wfWAFParserSyntaxError - */ - public function nextToken() { - if (!$this->scanner->eos()) { - $this->scanner->skip('/\s+/s'); - if ($this->scanner->eos()) { - return false; - } - if (($match = $this->scanner->scan(self::MATCH_IDENTIFIER)) !== null) - switch (wfWAFUtils::strtolower($match)) { - case 'if': - return $this->createToken(self::T_RULE_START, $match); - case 'and': - case 'or': - case 'xor': - return $this->createToken(self::T_COMPARISON_OPERATOR, $match); - default: - return $this->createToken(self::T_IDENTIFIER, $match); - } - else if (($match = $this->scanner->scan(self::MATCH_SINGLE_STRING_LITERAL)) !== null) return $this->createToken(self::T_SINGLE_STRING_LITERAL, $match); - else if (($match = $this->scanner->scan(self::MATCH_DOUBLE_STRING_LITERAL)) !== null) return $this->createToken(self::T_DOUBLE_STRING_LITERAL, $match); - else if (($match = $this->scanner->scan(self::MATCH_NUMBER_LITERAL)) !== null) return $this->createToken(self::T_NUMBER_LITERAL, $match); - else if (($match = $this->scanner->scan(self::MATCH_DOT)) !== null) return $this->createToken(self::T_DOT, $match); - else if (($match = $this->scanner->scan(self::MATCH_AND_COMPARISON_OPERATOR)) !== null) return $this->createToken(self::T_COMPARISON_OPERATOR, $match); - else if (($match = $this->scanner->scan(self::MATCH_OR_COMPARISON_OPERATOR)) !== null) return $this->createToken(self::T_COMPARISON_OPERATOR, $match); - else if (($match = $this->scanner->scan(self::MATCH_OPEN_PARENTHESIS)) !== null) return $this->createToken(self::T_OPEN_PARENTHESIS, $match); - else if (($match = $this->scanner->scan(self::MATCH_CLOSE_PARENTHESIS)) !== null) return $this->createToken(self::T_CLOSE_PARENTHESIS, $match); - else if (($match = $this->scanner->scan(self::MATCH_COMMA)) !== null) return $this->createToken(self::T_COMMA, $match); - else if (($match = $this->scanner->scan(self::MATCH_RULE_COMPARISON_END)) !== null) return $this->createToken(self::T_RULE_COMPARISON_END, $match); - else if (($match = $this->scanner->scan(self::MATCH_ASSIGNMENT)) !== null) return $this->createToken(self::T_ASSIGNMENT, $match); - else if (($match = $this->scanner->scan(self::MATCH_OPEN_BRACKET)) !== null) return $this->createToken(self::T_OPEN_BRACKET, $match); - else if (($match = $this->scanner->scan(self::MATCH_CLOSE_BRACKET)) !== null) return $this->createToken(self::T_CLOSE_BRACKET, $match); - else if (($match = $this->scanner->scan(self::MATCH_SINGLE_LINE_COMMENT)) !== null) return $this->createToken(self::T_SINGLE_LINE_COMMENT, $match); - else if (($match = $this->scanner->scan(self::MATCH_MULTIPLE_LINE_COMMENT)) !== null) return $this->createToken(self::T_MULTIPLE_LINE_COMMENT, $match); - else { - $e = new wfWAFParserSyntaxError(sprintf('Invalid character "%s" found on line %d, column %d', - $this->scanner->scanChar(), $this->scanner->getLine(), $this->scanner->getColumn())); - $e->setParseLine($this->scanner->getLine()); - $e->setParseColumn($this->scanner->getColumn()); - throw $e; - } - } - return false; - } - - /** - * @param $type - * @param $value - * @return wfWAFLexerToken - */ - protected function createToken($type, $value) { - return new wfWAFLexerToken($type, $value, $this->scanner->getLine(), $this->scanner->getColumn()); - } - - /** - * @return string - */ - public function getRules() { - return $this->rules; - } - - /** - * @param string $rules - */ - public function setRules($rules) { - $this->rules = rtrim($rules); - } -} - -/** - * - */ -class wfWAFLexerToken { - - private $type; - private $value; - private $line; - private $column; - - /** - * wfWAFRuleToken constructor. - * - * @param $type - * @param $value - * @param $line - * @param $column - */ - public function __construct($type, $value, $line, $column) { - $this->setType($type); - $this->setValue($value); - $this->setLine($line); - $this->setColumn($column); - } - - /** - * @return string - */ - public function getLowerCaseValue() { - return wfWAFUtils::strtolower($this->getValue()); - } - - /** - * @return string - */ - public function getUpperCaseValue() { - return wfWAFUtils::strtoupper($this->getValue()); - } - - /** - * @return mixed - */ - public function getType() { - return $this->type; - } - - /** - * @param mixed $type - */ - public function setType($type) { - $this->type = $type; - } - - /** - * @return mixed - */ - public function getValue() { - return $this->value; - } - - /** - * @param mixed $value - */ - public function setValue($value) { - $this->value = $value; - } - - /** - * @return mixed - */ - public function getLine() { - return $this->line; - } - - /** - * @param mixed $line - */ - public function setLine($line) { - $this->line = $line; - } - - /** - * @return mixed - */ - public function getColumn() { - return $this->column; - } - - /** - * @param mixed $column - */ - public function setColumn($column) { - $this->column = $column; - } -} - - -class wfWAFParserSyntaxError extends wfWAFException { - - private $parseLine; - private $parseColumn; - private $token; - - /** - * @return mixed - */ - public function getToken() { - return $this->token; - } - - /** - * @param mixed $token - */ - public function setToken($token) { - $this->token = $token; - } - - /** - * @return mixed - */ - public function getParseLine() { - return $this->parseLine; - } - - /** - * @param mixed $parseLine - */ - public function setParseLine($parseLine) { - $this->parseLine = $parseLine; - } - - /** - * @return mixed - */ - public function getParseColumn() { - return $this->parseColumn; - } - - /** - * @param mixed $parseColumn - */ - public function setParseColumn($parseColumn) { - $this->parseColumn = $parseColumn; - } - -} - -class wfWAFBaseParser { - - protected $tokens; - protected $index; - /** @var wfWAFLexerInterface */ - protected $lexer; - protected $checkpoint=0; - - public function __construct($lexer) { - $this->lexer = $lexer; - } - - /** - * @param wfWAFLexerToken $token - * @param mixed $type - * @return bool - */ - protected function isTokenOfType($token, $type) { - if (is_array($type)) { - return $token && in_array($token->getType(), $type); - } - return $token && $token->getType() === $type; - } - - /** - * @param wfWAFLexerToken $token - * @param int $type - * @param string $message - * @throws wfWAFParserSyntaxError - */ - protected function expectTokenTypeEquals($token, $type, $message = 'Wordfence WAF Syntax Error: Unexpected %s found on line %d, column %d. Expected %s.') { - if ($token->getType() !== $type) { - $this->triggerSyntaxError($token, sprintf($message, $token->getType(), - $token->getLine(), $token->getColumn(), $type)); - } - } - - /** - * @param wfWAFLexerToken $token - * @param array $types - * @param string $message - * @throws wfWAFParserSyntaxError - */ - protected function expectTokenTypeInArray($token, $types, $message = 'Wordfence WAF Syntax Error: Unexpected %s found on line %d, column %d') { - if (!in_array($token->getType(), $types)) { - $this->triggerSyntaxError($token, sprintf($message, $token->getType(), - $token->getLine(), $token->getColumn())); - } - } - - /** - * @param wfWAFLexerToken $token - * @param string $message - * @throws wfWAFParserSyntaxError - */ - protected function triggerSyntaxError($token, $message = 'Wordfence WAF Syntax Error: Unexpected %s %s found on line %d, column %d') { - $e = new wfWAFParserSyntaxError(sprintf($message, $token->getType(), $token->getValue(), - $token->getLine(), $token->getColumn())); - $e->setToken($token); - $e->setParseLine($token->getLine()); - $e->setParseColumn($token->getColumn()); - throw $e; - } - - /** - * @return wfWAFLexerToken - */ - protected function currentToken() { - return $this->getToken($this->index); - } - - /** - * @return bool|wfWAFLexerToken - */ - protected function nextToken() { - $this->index++; - return $this->getToken($this->index); - } - - /** - * @param string $message - * @return wfWAFLexerToken - * @throws wfWAFParserSyntaxError - */ - protected function expectNextToken($message = 'Expected statement') { - $this->index++; - if ($token = $this->getToken($this->index)) { - return $token; - } - throw new wfWAFParserSyntaxError($message); - } - - /** - * @param int $index - * @return mixed - */ - protected function getToken($index) { - if (is_array($this->tokens) && array_key_exists($index, $this->tokens)) { - return $this->tokens[$index]; - } - if ($token = $this->getLexer()->nextToken()) { - $this->tokens[$index] = $token; - return $this->tokens[$index]; - } - return false; - } - - /** - * @return wfWAFLexerInterface - */ - public function getLexer() { - return $this->lexer; - } - - /** - * @param wfWAFLexerInterface $lexer - */ - public function setLexer($lexer) { - $this->lexer = $lexer; - } - - /** - * @return mixed - */ - public function getTokens() { - return $this->tokens; - } - - /** - * @param mixed $tokens - */ - public function setTokens($tokens) { - $this->tokens = $tokens; - } - - protected function setCheckpoint() { - $this->checkpoint=$this->index; - } - - protected function reset() { - $this->index=$this->checkpoint; - } - -} - -/** - * - */ -class wfWAFStringScanner { - - private $string; - private $remainingStringCache; - private $length; - private $pointer; - private $remainingStringCachePointer; - private $prevPointer; - private $match; - private $captures; - - /** - * wfWAFStringScanner constructor. - * @param $string - */ - public function __construct($string = null) { - if (is_string($string)) { - $this->setString($string); - } - } - - /** - * @param $regex - * @return mixed - */ - public function scan($regex) { - $remaining = $this->getRemainingString(); - if ($this->regexMatch($regex, $remaining, $matches)) { - $matchLen = wfWAFUtils::strlen($matches[0]); - if ($matchLen > 0 && wfWAFUtils::strpos($remaining, $matches[0]) === 0) { - return $this->setState($matches, $this->getPointer() + $matchLen, $this->getPointer()); - } - } - return $this->setState(); - } - - /** - * @param $regex - * @return int|null - */ - public function skip($regex) { - return $this->scan($regex) ? wfWAFUtils::strlen($this->getMatch()) : null; - } - - /** - * @return mixed - */ - public function scanChar() { - return $this->scan('/./s'); - } - - /** - * @param string $regex - * @return mixed - */ - public function check($regex) { - $remaining = $this->getRemainingString(); - if ($this->regexMatch($regex, $remaining, $matches)) { - $matchLen = wfWAFUtils::strlen($matches[0]); - if ($matchLen > 0 && wfWAFUtils::strpos($remaining, $matches[0]) === 0) { - return $this->setState($matches); - } - } - return $this->setState(); - } - - /** - * @param string $regex - * @param string $remaining - * @param $matches - * @return int - */ - public function regexMatch($regex, $remaining, &$matches) { -// $startTime = microtime(true); - $result = preg_match($regex, $remaining, $matches); -// printf("%s took %f seconds\n", $regex, microtime(true) - $startTime); - return $result; - } - - /** - * @return bool - */ - public function eos() { - return $this->getPointer() === $this->getLength(); - } - - /** - * @return string - */ - public function getRemainingString() { - $pointer = $this->getPointer(); - if ($pointer === $this->remainingStringCachePointer && is_string($this->remainingStringCache)) { - return $this->remainingStringCache; - } - $this->remainingStringCache = wfWAFUtils::substr($this->getString(), $pointer); - $this->remainingStringCachePointer = $pointer; - return $this->remainingStringCache; - } - - /** - * @return $this - */ - public function reset() { - $this->remainingStringCache = false; - $this->setState(array(), 0, 0); - return $this; - } - - /** - * The current line of the scanned string. - * - * @return int - */ - public function getLine() { - if ($this->getPointer() + 1 > $this->getLength()) { - return wfWAFUtils::substr_count($this->getString(), "\n") + 1; - } - return wfWAFUtils::substr_count($this->getString(), "\n", 0, $this->getPointer() + 1) + 1; - } - - /** - * The current column of the line of the scanned string. - * - * @return int - */ - public function getColumn() { - return $this->getPointer() - ((int) wfWAFUtils::strrpos(wfWAFUtils::substr($this->getString(), 0, $this->getPointer() + 1), "\n")) + 1; - } - - /** - * @param array $matches - * @param int|null $pointer - * @param int|null $prevPointer - * @return mixed - */ - protected function setState($matches = array(), $pointer = null, $prevPointer = null) { - if ($pointer !== null) { - $this->setPointer($pointer); - } - if ($prevPointer !== null) { - $this->setPrevPointer($prevPointer); - } - if (is_array($matches)) { - $this->setCaptures(array_slice($matches, 1)); - if (count($matches) > 0) { - $this->setMatch($matches[0]); - } else { - $this->setMatch(null); - } - } else { - $this->setMatch(null); - } - return $this->getMatch(); - } - - /** - * @return string - */ - public function getString() { - return $this->string; - } - - /** - * @param string $string - * @throws InvalidArgumentException - */ - public function setString($string) { - if (!is_string($string)) { - throw new InvalidArgumentException(sprintf('String expected, got [%s]', gettype($string))); - } - $this->setLength(wfWAFUtils::strlen($string)); - $this->string = $string; - $this->reset(); - } - - /** - * @return int - */ - public function getLength() { - return $this->length; - } - - /** - * @param int $length - */ - protected function setLength($length) { - $this->length = $length; - } - - /** - * @param int $length - */ - public function advancePointer($length) { - $this->setPointer($this->getPointer() + $length); - } - - /** - * @return int - */ - public function getPointer() { - return $this->pointer; - } - - /** - * @param int $pointer - */ - protected function setPointer($pointer) { - $this->pointer = $pointer; - } - - /** - * @return int - */ - public function getPrevPointer() { - return $this->prevPointer; - } - - /** - * @param int $prevPointer - */ - protected function setPrevPointer($prevPointer) { - $this->prevPointer = $prevPointer; - } - - /** - * @return mixed - */ - public function getMatch() { - return $this->match; - } - - /** - * @param mixed $match - */ - protected function setMatch($match) { - $this->match = $match; - } - - /** - * @param null $index - * @return mixed - */ - public function getCaptures($index = null) { - if (is_numeric($index)) { - return isset($this->captures[$index]) ? $this->captures[$index] : null; - } - return $this->captures; - } - - /** - * @param mixed $captures - */ - protected function setCaptures($captures) { - $this->captures = $captures; - } -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/parser.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/parser.php deleted file mode 100644 index 963a0ac0..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/parser.php +++ /dev/null @@ -1,923 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -require_once dirname(__FILE__) . '/lexer.php'; - -class wfWAFRuleParser extends wfWAFBaseParser { - - /** - * @var wfWAF - */ - private $waf; - private $parenCount = 0; - - /** - * wfWAFRuleParser constructor. - * @param $lexer - * @param wfWAF $waf - */ - public function __construct($lexer, $waf) { - parent::__construct($lexer); - $this->setWAF($waf); - } - - /** - * @return array - * @throws wfWAFParserSyntaxError - * @throws wfWAFRuleParserSyntaxError - */ - public function parse() { - $rules = array(); - $scores = array(); - $blacklistedParams = array(); - $whitelistedParams = array(); - $variables = array(); - $this->index = -1; - while ($token = $this->nextToken()) { - - // Rule parsing - if ($token->getType() == wfWAFRuleLexer::T_RULE_START) { - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_OPEN_PARENTHESIS); - - $comparisonGroup = $this->parseConditional(); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_CLOSE_PARENTHESIS); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_RULE_COMPARISON_END); - $action = $this->parseAction(); - - $rules[] = new wfWAFRule( - $this->getWAF(), - $action->getRuleID(), - $action->getType(), - $action->getCategory(), - $action->getScore(), - $action->getDescription(), - $action->getWhitelist(), - $action->getAction(), - $comparisonGroup - ); - } - - // Score/config parsing - if ($token->getType() == wfWAFRuleLexer::T_IDENTIFIER) { - switch ($token->getValue()) { - case 'scores': - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_DOT); - $scoreCategoryToken = $this->expectNextToken(); - $this->expectTokenTypeEquals($scoreCategoryToken, wfWAFRuleLexer::T_IDENTIFIER); - - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_ASSIGNMENT); - - $scoreToken = $this->expectNextToken(); - $this->expectTokenTypeEquals($scoreToken, wfWAFRuleLexer::T_NUMBER_LITERAL); - $scores[$scoreCategoryToken->getValue()] = $scoreToken->getValue(); - break; - - case 'blacklistParam': - $blacklistedParams[] = $this->parseURLParams(); - break; - - case 'whitelistParam': - $whitelistedParams[] = $this->parseURLParams(); - break; - - default: - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_ASSIGNMENT); - $valueToken = $this->expectNextToken(); - $this->expectTokenTypeInArray($valueToken, array( - wfWAFRuleLexer::T_SINGLE_STRING_LITERAL, - wfWAFRuleLexer::T_DOUBLE_STRING_LITERAL, - wfWAFRuleLexer::T_NUMBER_LITERAL, - )); - if ($valueToken->getType() === wfWAFRuleLexer::T_SINGLE_STRING_LITERAL) { - $value = wfWAFUtils::substr($valueToken->getValue(), 1, -1); - $value = str_replace("\\'", "'", $value); - } else if ($valueToken->getType() === wfWAFRuleLexer::T_DOUBLE_STRING_LITERAL) { - $value = wfWAFUtils::substr($valueToken->getValue(), 1, -1); - $value = str_replace('\\"', '"', $value); - } else { - $value = $valueToken->getValue(); - } - $variables[$token->getValue()] = new wfWAFRuleVariable($this->getWAF(), $token->getValue(), $value); - break; - } - } - } - - return array( - 'scores' => $scores, - 'blacklistedParams' => $blacklistedParams, - 'whitelistedParams' => $whitelistedParams, - 'variables' => $variables, - 'rules' => $rules, - ); - } - - /** - * @param array $vars - * @return string - */ - public function renderRules($vars) { - $rules = ''; - if (array_key_exists('scores', $vars)) { - foreach ($vars['scores'] as $category => $score) { - // scores.sqli = 100 - $rules .= sprintf("scores.%s = %d\n", $category, $score); - } - $rules .= "\n"; - } - - $params = array( - 'blacklistParam' => 'blacklistedParams', - 'whitelistParam' => 'whitelistedParams', - ); - foreach ($params as $action => $key) { - if (array_key_exists($key, $vars)) { - /** @var wfWAFRuleParserURLParam $urlParam */ - foreach ($vars[$key] as $urlParam) { - $rules .= $urlParam->renderRule($action) . "\n"; - } - $rules .= "\n"; - } - } - - if (array_key_exists('variables', $vars)) { - /** @var wfWAFRuleVariable $variable */ - foreach ($vars['variables'] as $variableName => $variable) { - $rules .= sprintf("%s = %s\n", $variable->renderRule(), $variable->renderValue()); - } - $rules .= "\n"; - } - - if (array_key_exists('rules', $vars)) { - /** @var wfWAFRule $rule */ - foreach ($vars['rules'] as $rule) { - $rules .= $rule->renderRule() . "\n"; - } - $rules .= "\n"; - } - return $rules; - } - - /** - * @param int $index - * @return mixed - */ - public function getToken($index) { - if (is_array($this->tokens) && array_key_exists($index, $this->tokens)) { - return $this->tokens[$index]; - } - if ($token = $this->getLexer()->nextToken()) { - $this->tokens[$index] = $token; - return $this->tokens[$index]; - } - return false; - } - - /** - * @return wfWAFRuleComparisonGroup - */ - private function parseConditional() { - $comparisonGroup = new wfWAFRuleComparisonGroup(); - while ($token = $this->nextToken()) { - switch ($token->getType()) { - case wfWAFRuleLexer::T_IDENTIFIER: - $comparisonGroup->add($this->parseComparison()); - break; - - case wfWAFRuleLexer::T_COMPARISON_OPERATOR: - $comparisonGroup->add(new wfWAFRuleLogicalOperator($token->getValue())); - break; - - case wfWAFRuleLexer::T_OPEN_PARENTHESIS: - $this->parenCount++; - $comparisonGroup->add($this->parseConditional()); - break; - - case wfWAFRuleLexer::T_CLOSE_PARENTHESIS: - if ($this->parenCount === 0) { - $this->index--; - return $comparisonGroup; - } - $this->parenCount--; - return $comparisonGroup; - } - - } - return $comparisonGroup; - } - - private function parseComparison($expectLiteral = true) { - /** - * @var wfWAFLexerToken $actionToken - * @var wfWAFLexerToken $expectedToken - */ - $this->setCheckpoint(); - $actionToken = $this->currentToken(); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_OPEN_PARENTHESIS); - $value=null; - if($expectLiteral) { - try { - $value = $this->expectLiteral(array(wfWAFRuleLexer::T_CLOSE_PARENTHESIS)); - if ($value === null && $expectLiteral) { - $this->index--; - } - } - catch(wfWAFParserSyntaxError $e) { - if($expectLiteral) { - $this->reset(); - return $this->parseComparison(false); - } - throw $e; - } - } - - $subjects = array(); - $nextToken = $this->nextToken(); - if ($value!==null||!$expectLiteral) { - while (true) { - if ($nextToken && $nextToken->getType() === wfWAFRuleLexer::T_CLOSE_PARENTHESIS) { - break; - } - if (!($nextToken && $nextToken->getType() === wfWAFRuleLexer::T_COMMA)) { - if(empty($subjects) && $expectLiteral) { - $this->reset(); - return $this->parseComparison(false); - } - $this->index--; - if(!empty($subjects)) - break; - } - list($filters, $subject) = $this->parseFilters(); - $current = new wfWAFRuleComparisonSubject($this->getWAF(), $subject, $filters); - $nextToken = $this->expectNextToken(); - if (in_array($nextToken->getType(), array(wfWAFRuleLexer::T_DOT, wfWAFRuleLexer::T_OPEN_BRACKET))) { - $this->index--; - $childSubject = $this->parseSubject(false); - if (!is_array($childSubject) ) - $childSubject = array($childSubject); - array_unshift($childSubject, $current); - $current = new wfWAFRuleComparisonSubject($this->getWAF(), $childSubject, array()); - $nextToken = $this->expectNextToken(); - } - $subjects[] = $current; - } - $this->expectTokenTypeEquals($nextToken, wfWAFRuleLexer::T_CLOSE_PARENTHESIS); - } - - $comparison = new wfWAFRuleComparison($this->getWAF(), $actionToken->getValue(), $value, $subjects); - return $comparison; - } - - /** - * @return wfWAFRuleParserAction - */ - private function parseAction() { - $action = new wfWAFRuleParserAction(); - - $actionToken = $this->expectNextToken(); - $this->expectTokenTypeEquals($actionToken, wfWAFRuleLexer::T_IDENTIFIER); - $action->setAction($actionToken->getValue()); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_OPEN_PARENTHESIS); - - while (true) { - $token = $this->expectNextToken(); - switch ($token->getType()) { - case wfWAFRuleLexer::T_IDENTIFIER: - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_ASSIGNMENT); - $valueToken = $this->expectNextToken(); - $this->expectTokenTypeInArray($valueToken, array( - wfWAFRuleLexer::T_SINGLE_STRING_LITERAL, - wfWAFRuleLexer::T_DOUBLE_STRING_LITERAL, - wfWAFRuleLexer::T_NUMBER_LITERAL, - )); - $action->set($token->getValue(), $valueToken->getValue()); - break; - - case wfWAFRuleLexer::T_COMMA: - break; - - case wfWAFRuleLexer::T_CLOSE_PARENTHESIS: - break 2; - - default: - $this->triggerSyntaxError($token, sprintf('Wordfence WAF Rules Syntax Error: Unexpected %s found on line %d, column %d', - $token->getType(), $token->getLine(), $token->getColumn())); - } - } - return $action; - } - - private function parseFilters() { - $filters = array(); - $subject = null; - do { - $globalToken = $this->expectNextToken(); - $this->expectTokenTypeEquals($globalToken, wfWAFRuleLexer::T_IDENTIFIER); - $parenToken = $this->expectNextToken(); - switch ($parenToken->getType()) { - case wfWAFRuleLexer::T_DOT: - $this->index -= 2; - $subject = $this->parseSubject(); - break 2; - - case wfWAFRuleLexer::T_OPEN_PARENTHESIS: - array_unshift($filters, array($globalToken->getValue())); - break; - - default: - $this->triggerSyntaxError($parenToken, - sprintf('Wordfence WAF Rules Syntax Error: Unexpected %s found on line %d, column %d.', - $parenToken->getType(), $parenToken->getLine(), $parenToken->getColumn())); - } - } while (true); - if ($subject === null) { - throw new wfWAFParserSyntaxError('No subject supplied to filter'); - } - for ($i = 0; $i < count($filters); $i++) { - do { - $next = $this->expectNextToken(); - $this->expectTokenTypeInArray($next, array(wfWAFRuleLexer::T_CLOSE_PARENTHESIS, wfWAFRuleLexer::T_COMMA)); - if ($next->getType() === wfWAFRuleLexer::T_COMMA) { - $filters[$i][] = $this->expectLiteral(); - } - else { - break; - } - } while(true); - } - return array($filters, $subject); - } - - /** - * @throws wfWAFParserSyntaxError - */ - private function parseSubject($global = true) { - if ($global) { - $globalToken = $this->expectNextToken(); - $this->expectTokenTypeEquals($globalToken, wfWAFRuleLexer::T_IDENTIFIER); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_DOT); - $globalToken2 = $this->expectNextToken(); - $this->expectTokenTypeEquals($globalToken2, wfWAFRuleLexer::T_IDENTIFIER); - $subject = array( - $globalToken->getValue() . '.' . $globalToken2->getValue(), - ); - } - else { - $subject = array(); - } - $savePoint = $this->index; - while (($property = $this->parsePropertyAccessor()) !== false) { - $subject[] = $property; - $savePoint = $this->index; - } - $this->index = $savePoint; - if (count($subject) === 1) { - list($subject) = $subject; - } - return $subject; - } - - /** - * @return bool|mixed|string - * @throws wfWAFParserSyntaxError - */ - private function parsePropertyAccessor() { - $savePoint = $this->index; - $nextToken = $this->nextToken(); - if ($this->isTokenOfType($nextToken, wfWAFRuleLexer::T_DOT)) { - $property = $this->expectNextToken(); - $this->expectTokenTypeEquals($property, wfWAFRuleLexer::T_IDENTIFIER); - return $property->getValue(); - } else if ($this->isTokenOfType($nextToken, wfWAFRuleLexer::T_OPEN_BRACKET)) { - $property = $this->expectLiteral(); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_CLOSE_BRACKET); - return $property; - } - $this->index = $savePoint; - return false; - } - - /** - * @return wfWAFRuleParserURLParam - * @throws wfWAFParserSyntaxError - */ - private function parseURLParams() { - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_OPEN_PARENTHESIS); - - $urlParam = new wfWAFRuleParserURLParam(); - while (true) { - $token = $this->expectNextToken(); - switch ($token->getType()) { - case wfWAFRuleLexer::T_IDENTIFIER: - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_ASSIGNMENT); - if ($token->getValue() === 'url') { - $url = $this->expectLiteral(); - $urlParam->setUrl($url); - } else if ($token->getValue() === 'param') { - $subject = $this->parseSubject(); - $urlParam->setParam(wfWAFRuleComparison::getSubjectKey($subject)); - } else if ($token->getValue() === 'rules') { - $rules = $this->expectLiteral(); - $urlParam->setRules($rules); - } else if ($token->getValue() === 'conditional') { - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_OPEN_PARENTHESIS); - $conditional = $this->parseConditional(); - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFRuleLexer::T_CLOSE_PARENTHESIS); - $urlParam->setConditional($conditional); - } else if ($token->getValue() === 'minVersion') { - $minVersion = $this->expectLiteral(); - $urlParam->setMinVersion($minVersion); - } - - break; - - case wfWAFRuleLexer::T_COMMA: - break; - - case wfWAFRuleLexer::T_CLOSE_PARENTHESIS: - break 2; - - default: - $this->triggerSyntaxError($token, sprintf('Wordfence WAF Rules Syntax Error: Unexpected %s found on line %d, column %d', - $token->getType(), $token->getLine(), $token->getColumn())); - } - } - return $urlParam; - } - - /** - * @return mixed|string - * @throws wfWAFRuleParserSyntaxError - */ - private function expectLiteral($allowExtra = array()) { - $expectedToken = $this->expectNextToken(); - $this->expectTokenTypeInArray($expectedToken, array_merge(array( - wfWAFRuleLexer::T_SINGLE_STRING_LITERAL, - wfWAFRuleLexer::T_DOUBLE_STRING_LITERAL, - wfWAFRuleLexer::T_IDENTIFIER, - wfWAFRuleLexer::T_NUMBER_LITERAL, - wfWAFRuleLexer::T_OPEN_BRACKET, - ), $allowExtra)); - if ($expectedToken->getType() === wfWAFRuleLexer::T_SINGLE_STRING_LITERAL) { - // Remove quotes, strip slashes - $value = wfWAFUtils::substr($expectedToken->getValue(), 1, -1); - $value = str_replace("\\'", "'", $value); - } else if ($expectedToken->getType() === wfWAFRuleLexer::T_DOUBLE_STRING_LITERAL) { - // Remove quotes, strip slashes - $value = wfWAFUtils::substr($expectedToken->getValue(), 1, -1); - $value = str_replace('\\"', '"', $value); - } else if ($expectedToken->getType() === wfWAFRuleLexer::T_IDENTIFIER) { - // Remove quotes, strip slashes - $value = new wfWAFRuleVariable($this->getWAF(), $expectedToken->getValue()); - } else if ($expectedToken->getType() === wfWAFRuleLexer::T_OPEN_BRACKET) { - $value = array(); - while (true) { - $nextToken = $this->expectNextToken(); - if ($nextToken->getType() === wfWAFRuleLexer::T_CLOSE_BRACKET) { - break; - } - if ($nextToken->getType() === wfWAFRuleLexer::T_COMMA) { - continue; - } - $this->index--; - $value[] = $this->expectLiteral(); - } - } else if (in_array($expectedToken->getType(), $allowExtra)) { - return null; - } else { - $value = $expectedToken->getValue(); - } - return $value; - } - - /** - * @param wfWAFLexerToken $token - * @param string|array $value - * @return bool - */ - private function isIdentifierWithValue($token, $value) { - return $token && $token->getType() === wfWAFRuleLexer::T_IDENTIFIER && - (is_array($value) ? in_array($token->getLowerCaseValue(), array_map('strtolower', $value)) : - $token->getLowerCaseValue() === strtolower($value)); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - protected function isCommentToken($token) { - return $token->getType() === wfWAFRuleLexer::T_MULTIPLE_LINE_COMMENT || $token->getType() === wfWAFRuleLexer::T_SINGLE_LINE_COMMENT; - } - - /** - * @return wfWAF - */ - public function getWAF() { - return $this->waf; - } - - /** - * @param wfWAF $waf - */ - public function setWAF($waf) { - $this->waf = $waf; - } -} - -class wfWAFRuleParserAction { - - private $ruleID; - private $type; - private $category; - private $score; - private $description; - private $whitelist = 1; - private $action; - - /** - * @param string $param - * @param mixed $value - */ - public function set($param, $value) { - $propLinkTable = array( - 'id' => 'ruleID', - ); - if (array_key_exists($param, $propLinkTable)) { - $param = $propLinkTable[$param]; - } - if (property_exists($this, $param)) { - $this->$param = trim($value, '\'"'); - } - } - - /** - * @return mixed - */ - public function getRuleID() { - return $this->ruleID; - } - - /** - * @param mixed $ruleID - */ - public function setRuleID($ruleID) { - $this->ruleID = $ruleID; - } - - /** - * @return mixed - */ - public function getType() { - return $this->type; - } - - /** - * @param mixed $type - */ - public function setType($type) { - $this->type = $type; - } - - /** - * @return mixed - */ - public function getCategory() { - return $this->category; - } - - /** - * @param mixed $category - */ - public function setCategory($category) { - $this->category = $category; - } - - /** - * @return mixed - */ - public function getScore() { - return $this->score; - } - - /** - * @param mixed $score - */ - public function setScore($score) { - $this->score = $score; - } - - /** - * @return mixed - */ - public function getDescription() { - return $this->description; - } - - /** - * @param mixed $description - */ - public function setDescription($description) { - $this->description = $description; - } - - /** - * @return mixed - */ - public function getWhitelist() { - return $this->whitelist; - } - - /** - * @param mixed $whitelist - */ - public function setWhitelist($whitelist) { - $this->whitelist = $whitelist; - } - - /** - * @return mixed - */ - public function getAction() { - return $this->action; - } - - /** - * @param mixed $action - */ - public function setAction($action) { - $this->action = $action; - } -} - - -class wfWAFRuleParserURLParam { - /** - * @var string - */ - private $url; - /** - * @var string - */ - private $param; - /** - * @var null - */ - private $rules; - /** - * @var null - */ - private $conditional; - /** - * @var float - */ - private $minVersion; - - /** - * @param string $param - * @param mixed $value - */ - public function set($param, $value) { - if (property_exists($this, $param)) { - $this->$param = trim($value, '\'"'); - } - } - - /** - * @param string $url - * @param string $param - * @param null $rules - */ - public function __construct($url = null, $param = null, $rules = null, $conditional = null, $minVersion = null) { - $this->url = $url; - $this->param = $param; - $this->rules = $rules; - $this->conditional = $conditional; - $this->minVersion = $minVersion; - } - - /** - * Return format: - * blacklistParam(url='/\/uploadify\.php$/i', param=request.fileNames.Filedata, rules=[3, 14], conditional=(match('1', request.body.field))) - * - * @param string $action - * @return string - */ - public function renderRule($action) { - return sprintf('%s(url=%s, param=%s%s%s)', $action, - wfWAFRule::exportString($this->getUrl()), - $this->renderParam($this->getParam()), - $this->getRules() ? ', rules=[' . join(', ', array_map('intval', $this->getRules())) . ']' : '', - $this->getConditional() ? ', conditional=(' . $this->getConditional()->renderRule() . ')' : ''); - //minVersion not included in re-rendering - } - - /** - * @param string $param - * @return mixed - */ - private function renderParam($param) { - if (preg_match('/([a-zA-Z_][\\w_]*?\\.[a-zA-Z_][\\w_]*)(.*)/', $param, $matches)) { - list(, $global, $params) = $matches; - if (strlen($params) > 0) { - if (preg_match_all('/\\[([^\\]]*?)\\]/', $params, $matches)) { - $rendered = $global; - foreach ($matches[1] as $prop) { - $single = "'" . str_replace(array("'", '\\'), array("\\'", "\\\\"), $prop) . "'"; - $double = '"' . str_replace(array('"', '\\'), array('\\"', "\\\\"), $prop) . '"'; - $rendered .= sprintf('[%s]', strlen($single) <= strlen($double) ? $single : $double); - } - return $rendered; - } - } - } - return $param; - } - - /** - * @return string - */ - public function getUrl() { - return $this->url; - } - - /** - * @param string $url - */ - public function setUrl($url) { - $this->url = $url; - } - - /** - * @return string - */ - public function getParam() { - return $this->param; - } - - /** - * @param string $param - */ - public function setParam($param) { - $this->param = $param; - } - - /** - * @return null - */ - public function getRules() { - return $this->rules; - } - - /** - * @param null $rules - */ - public function setRules($rules) { - $this->rules = $rules; - } - - /** - * @return null - */ - public function getConditional() { - return $this->conditional; - } - - /** - * @param null $conditional - */ - public function setConditional($conditional) { - $this->conditional = $conditional; - } - - /** - * @return float|null - */ - public function getMinVersion() { - return $this->minVersion; - } - - /** - * @param float $minVersion - */ - public function setMinVersion($minVersion) { - $this->minVersion = $minVersion; - } -} - -class wfWAFRuleParserSyntaxError extends wfWAFParserSyntaxError { - - private $token; - - /** - * @return mixed - */ - public function getToken() { - return $this->token; - } - - /** - * @param mixed $token - */ - public function setToken($token) { - $this->token = $token; - } -} - -class wfWAFRuleVariable { - /** - * @var string - */ - private $name; - /** - * @var mixed|null - */ - private $value; - /** - * @var wfWAF - */ - private $waf; - - - /** - * wfWAFRuleVariable constructor. - * @param wfWAF $waf - * @param string $name - * @param mixed $value - */ - public function __construct($waf, $name, $value = null) { - $this->waf = $waf; - $this->name = $name; - $this->value = $value; - } - - public function __sleep() { - return array( - 'name', - 'value', - ); - } - - public function render() { - return sprintf('new %s($this, %s, %s)', get_class($this), - var_export($this->getName(), true), var_export($this->getValue(), true)); - } - - public function renderRule() { - return sprintf('%s', $this->getName()); - } - - public function renderValue() { - return wfWAFRule::exportString($this); - } - - public function __toString() { - $value = $this->getValue(); - if (is_string($value)) { - return $value; - } - return (string) $this->getWAF()->getVariable($this->getName()); - } - - /** - * @return string - */ - public function getName() { - return $this->name; - } - - /** - * @param string $name - */ - public function setName($name) { - $this->name = $name; - } - - /** - * @return mixed|null - */ - public function getValue() { - return $this->value; - } - - /** - * @param mixed|null $value - */ - public function setValue($value) { - $this->value = $value; - } - - /** - * @return wfWAF - */ - public function getWAF() { - return $this->waf; - } - - /** - * @param wfWAF $waf - */ - public function setWAF($waf) { - $this->waf = $waf; - } -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/sqli.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/sqli.php deleted file mode 100644 index 79f07c6e..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/sqli.php +++ /dev/null @@ -1,3769 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -require_once dirname(__FILE__) . '/lexer.php'; - -class wfWAFSQLiParser extends wfWAFBaseParser { - - const FLAG_PARSE_MYSQL_PORTABLE_COMMENTS = wfWAFSQLiLexer::FLAG_TOKENIZE_MYSQL_PORTABLE_COMMENTS; - - /** - * @param string $param - * @return bool - */ - public static function testForSQLi($param) { - static $instance; - static $tests; - if (!$instance) { - $instance = new self(new wfWAFSQLiLexer()); - } - if (!$tests) { - // SQL statement and token count for lexer - $tests = array( - array('%s', 1), - array('SELECT * FROM t WHERE i = %s ', 7), - array("SELECT * FROM t WHERE i = '%s' ", 7), - array('SELECT * FROM t WHERE i = "%s" ', 7), - array('SELECT * FROM t WHERE i = (%s) ', 9), - array("SELECT * FROM t WHERE i = ('%s') ", 9), - array('SELECT * FROM t WHERE i = ("%s") ', 9), - array('SELECT * FROM t WHERE i = ((%s)) ', 11), - array("SELECT * FROM t WHERE i = (('%s')) ", 11), - array('SELECT * FROM t WHERE i = (("%s")) ', 11), - array('SELECT * FROM t WHERE i = (((%s))) ', 13), - array("SELECT * FROM t WHERE i = ((('%s'))) ", 13), - array('SELECT * FROM t WHERE i = ((("%s"))) ', 13), - - array('SELECT * FROM t WHERE i = %s and j = (1 -) ', 12), - array("SELECT * FROM t WHERE i = '%s' and j = (1 -) ", 12), - array('SELECT * FROM t WHERE i = "%s" and j = (1 -) ', 12), - - array('SELECT MATCH(t) AGAINST (%s) from t ', 10), - array("SELECT MATCH(t) AGAINST ('%s') from t ", 10), - array('SELECT MATCH(t) AGAINST ("%s") from t ', 10), - -// array('SELECT CASE WHEN %s THEN 1 ELSE 0 END from t ', 8), -// array("SELECT CASE WHEN '%s' THEN 1 ELSE 0 END from t ", 8), -// array('SELECT CASE WHEN "%s" THEN 1 ELSE 0 END from t ', 8), -// -// array('SELECT (CASE WHEN (%s) THEN 1 ELSE 0 END) from t ', 12), -// array("SELECT (CASE WHEN ('%s') THEN 1 ELSE 0 END) from t ", 12), -// array('SELECT (CASE WHEN ("%s") THEN 1 ELSE 0 END) from t ', 12), - - array('SELECT * FROM (select %s) ', 6), - array("SELECT * FROM (select '%s') ", 6), - array('SELECT * FROM (select "%s") ', 6), - array('SELECT * FROM (select (%s)) ', 8), - array("SELECT * FROM (select ('%s')) ", 8), - array('SELECT * FROM (select ("%s")) ', 8), - array('SELECT * FROM (select ((%s))) ', 10), - array("SELECT * FROM (select (('%s'))) ", 10), - array('SELECT * FROM (select (("%s"))) ', 10), -// -// array('SELECT * FROM t JOIN t2 on i = %s ', 9), -// array("SELECT * FROM t JOIN t2 on i = '%s' ", 9), -// array('SELECT * FROM t JOIN t2 on i = "%s" ', 9), -// array('SELECT * FROM t JOIN t2 on i = (%s) ', 11), -// array("SELECT * FROM t JOIN t2 on i = ('%s') ", 11), -// array('SELECT * FROM t JOIN t2 on i = ("%s") ', 11), -// array('SELECT * FROM t JOIN t2 on i = ((%s)) ', 13), -// array("SELECT * FROM t JOIN t2 on i = (('%s')) ", 13), -// array('SELECT * FROM t JOIN t2 on i = (("%s")) ', 13), -// array('SELECT * FROM t JOIN t2 on i = (((%s))) ', 15), -// array("SELECT * FROM t JOIN t2 on i = ((('%s'))) ", 15), -// array('SELECT * FROM t JOIN t2 on i = ((("%s"))) ', 15), - - array('SELECT * FROM %s ', 3), - array('INSERT INTO t (col) VALUES (%s) ', 9), - array("INSERT INTO t (col) VALUES ('%s') ", 9), - array('INSERT INTO t (col) VALUES ("%s") ', 9), - array('UPDATE t1 SET col1 = %s ', 5), - array('UPDATE t1 SET col1 = \'%s\' ', 5), - ); - } - $lexerFlags = array(0, wfWAFSQLiLexer::FLAG_TOKENIZE_MYSQL_PORTABLE_COMMENTS); - foreach ($lexerFlags as $flags) { - foreach ($tests as $test) { -// $startTime = microtime(true); - list($sql, $expectedTokenCount) = $test; - try { - $instance->setFlags($flags); - $instance->setSubject(sprintf($sql, $param)); - if (($instance->hasMoreThanNumTokens($expectedTokenCount) && $instance->evaluate()) - || $instance->hasMultiplePortableCommentVersions()) { -// printf("%s took %f seconds\n", $sql, microtime(true) - $startTime); - return true; - } -// printf("%s took %f seconds\n", $sql, microtime(true) - $startTime); - } catch (wfWAFParserSyntaxError $e) { - - } - } - } - return false; - } - - private $subject; - - /** - * @var int - */ - private $flags; - /** @var wfWAFSQLiLexer */ - protected $lexer; - private $portableCommentVersions = array(); - - private $intervalUnits = array( - 'SECOND', - 'MINUTE', - 'HOUR', - 'DAY_SYM', - 'WEEK', - 'MONTH', - 'QUARTER', - 'YEAR', - 'SECOND_MICROSECOND', - 'MINUTE_MICROSECOND', - 'MINUTE_SECOND', - 'HOUR_MICROSECOND', - 'HOUR_SECOND', - 'HOUR_MINUTE', - 'DAY_MICROSECOND', - 'DAY_SECOND', - 'DAY_MINUTE', - 'DAY_HOUR', - 'YEAR_MONTH', - ); - - private $reservedWords = array( - "_FILENAME", - "ACCESSIBLE", - "ADD", - "ALL", - "ALTER", - "ANALYZE", - "AND", - "AS", - "ASC", - "ASENSITIVE", - "BEFORE", - "BETWEEN", - "BIGINT", - "BINARY", - "BLOB", - "BOTH", - "BY", - "CALL", - "CASCADE", - "CASE", - "CHANGE", - "CHAR", - "CHARACTER", - "CHECK", - "COLLATE", - "COLUMN", - "CONDITION", - "CONSTRAINT", - "CONTINUE", - "CONVERT", - "CREATE", - "CROSS", - "CURRENT_DATE", - "CURRENT_TIME", - "CURRENT_TIMESTAMP", - "CURRENT_USER", - "CURSOR", - "DATABASE", - "DATABASES", - "DAY_HOUR", - "DAY_MICROSECOND", - "DAY_MINUTE", - "DAY_SECOND", - "DEC", - "DECIMAL", - "DECLARE", - "DEFAULT", - "DELAYED", - "DELETE", - "DESC", - "DESCRIBE", - "DETERMINISTIC", - "DISTINCT", - "DISTINCTROW", - "DIV", - "DOUBLE", - "DROP", -// "DUAL", // works as a table name ??? - "EACH", - "ELSE", - "ELSEIF", - "ENCLOSED", - "ESCAPED", - "EXISTS", - "EXIT", - "EXPLAIN", - "FALSE", - "FETCH", - "FLOAT", - "FLOAT4", - "FLOAT8", - "FOR", - "FORCE", - "FOREIGN", - "FROM", - "FULLTEXT", - "GRANT", - "GROUP", - "HAVING", - "HIGH_PRIORITY", - "HOUR_MICROSECOND", - "HOUR_MINUTE", - "HOUR_SECOND", - "IF", - "IGNORE", - "IN", - "INDEX", - "INFILE", - "INNER", - "INOUT", - "INSENSITIVE", - "INSERT", - "INT", - "INT1", - "INT2", - "INT3", - "INT4", - "INT8", - "INTEGER", - "INTERVAL", - "INTO", - "IS", - "ITERATE", - "JOIN", - "KEY", - "KEYS", - "KILL", - "LEADING", - "LEAVE", - "LEFT", - "LIKE", - "LIMIT", - "LINEAR", - "LINES", - "LOAD", - "LOCALTIME", - "LOCALTIMESTAMP", - "LOCK", - "LONG", - "LONGBLOB", - "LONGTEXT", - "LOOP", - "LOW_PRIORITY", - "MASTER_SSL_VERIFY_SERVER_CERT", - "MATCH", - "MAXVALUE", - "MEDIUMBLOB", - "MEDIUMINT", - "MEDIUMTEXT", - "MIDDLEINT", - "MINUTE_MICROSECOND", - "MINUTE_SECOND", - "MOD", - "MODIFIES", - "NATURAL", - "NOT", - "NO_WRITE_TO_BINLOG", - "NULL", - "NUMERIC", - "ON", - "OPTIMIZE", - "OPTION", - "OPTIONALLY", - "OR", - "ORDER", - "OUT", - "OUTER", - "OUTFILE", - "PRECISION", - "PRIMARY", - "PROCEDURE", - "PURGE", - "RANGE", - "READ", - "READS", - "READ_WRITE", - "REAL", - "REFERENCES", - "REGEXP", - "RELEASE", - "RENAME", - "REPEAT", - "REPLACE", - "REQUIRE", - "RESIGNAL", - "RESTRICT", - "RETURN", - "REVOKE", - "RIGHT", - "RLIKE", - "SCHEMA", - "SCHEMAS", - "SECOND_MICROSECOND", - "SELECT", - "SENSITIVE", - "SEPARATOR", - "SET", - "SHOW", - "SIGNAL", - "SMALLINT", - "SPATIAL", - "SPECIFIC", - "SQL", - "SQLEXCEPTION", - "SQLSTATE", - "SQLWARNING", - "SQL_BIG_RESULT", - "SQL_CALC_FOUND_ROWS", - "SQL_SMALL_RESULT", - "SSL", - "STARTING", - "STRAIGHT_JOIN", - "TABLE", - "TERMINATED", - "THEN", - "TINYBLOB", - "TINYINT", - "TINYTEXT", - "TO", - "TRAILING", - "TRIGGER", - "TRUE", - "UNDO", - "UNION", - "UNIQUE", - "UNLOCK", - "UNSIGNED", - "UPDATE", - "USAGE", - "USE", - "USING", - "UTC_DATE", - "UTC_TIME", - "UTC_TIMESTAMP", - "VALUES", - "VARBINARY", - "VARCHAR", - "VARCHARACTER", - "VARYING", - "WHEN", - "WHERE", - "WHILE", - "WITH", - "WRITE", - "XOR", - "YEAR_MONTH", - "ZEROFILL", - ); - private $keywords = array( - "ACCESSIBLE", - "ACTION", - "ADD", - "AFTER", - "AGAINST", - "AGGREGATE", - "ALGORITHM", - "ALL", - "ALTER", - "ANALYZE", - "AND", - "ANY", - "AS", - "ASC", - "ASCII", - "ASENSITIVE", - "AT", - "AUTHORS", - "AUTOEXTEND_SIZE", - "AUTO_INCREMENT", - "AVG", - "AVG_ROW_LENGTH", - "BACKUP", - "BEFORE", - "BEGIN", - "BETWEEN", - "BIGINT", - "BINARY", - "BINLOG", - "BIT", - "BLOB", - "BLOCK", - "BOOL", - "BOOLEAN", - "BOTH", - "BTREE", - "BY", - "BYTE", - "CACHE", - "CALL", - "CASCADE", - "CASCADED", - "CASE", - "CATALOG_NAME", - "CHAIN", - "CHANGE", - "CHANGED", - "CHAR", - "CHARACTER", - "CHARSET", - "CHECK", - "CHECKSUM", - "CIPHER", - "CLASS_ORIGIN", - "CLIENT", - "CLOSE", - "COALESCE", - "CODE", - "COLLATE", - "COLLATION", - "COLUMN", - "COLUMNS", - "COLUMN_NAME", - "COMMENT", - "COMMIT", - "COMMITTED", - "COMPACT", - "COMPLETION", - "COMPRESSED", - "CONCURRENT", - "CONDITION", - "CONNECTION", - "CONSISTENT", - "CONSTRAINT", - "CONSTRAINT_CATALOG", - "CONSTRAINT_NAME", - "CONSTRAINT_SCHEMA", - "CONTAINS", - "CONTEXT", - "CONTINUE", - "CONTRIBUTORS", - "CONVERT", - "CPU", - "CREATE", - "CROSS", - "CUBE", - "CURRENT_DATE", - "CURRENT_TIME", - "CURRENT_TIMESTAMP", - "CURRENT_USER", - "CURSOR", - "CURSOR_NAME", - "DATA", - "DATABASE", - "DATABASES", - "DATAFILE", - "DATE", - "DATETIME", - "DAY", - "DAY_HOUR", - "DAY_MICROSECOND", - "DAY_MINUTE", - "DAY_SECOND", - "DEALLOCATE", - "DEC", - "DECIMAL", - "DECLARE", - "DEFAULT", - "DEFINER", - "DELAYED", - "DELAY_KEY_WRITE", - "DELETE", - "DESC", - "DESCRIBE", - "DES_KEY_FILE", - "DETERMINISTIC", - "DIRECTORY", - "DISABLE", - "DISCARD", - "DISK", - "DISTINCT", - "DISTINCTROW", - "DIV", - "DO", - "DOUBLE", - "DROP", - "DUAL", - "DUMPFILE", - "DUPLICATE", - "DYNAMIC", - "EACH", - "ELSE", - "ELSEIF", - "ENABLE", - "ENCLOSED", - "END", - "ENDS", - "ENGINE", - "ENGINES", - "ENUM", - "ERROR", - "ERRORS", - "ESCAPE", - "ESCAPED", - "EVENT", - "EVENTS", - "EVERY", - "EXECUTE", - "EXISTS", - "EXIT", - "EXPANSION", - "EXPLAIN", - "EXTENDED", - "EXTENT_SIZE", - "FALSE", - "FAST", - "FAULTS", - "FETCH", - "FIELDS", - "FILE", - "FIRST", - "FIXED", - "FLOAT", - "FLOAT4", - "FLOAT8", - "FLUSH", - "FOR", - "FORCE", - "FOREIGN", - "FOUND", - "FRAC_SECOND", - "FROM", - "FULL", - "FULLTEXT", - "FUNCTION", - "GENERAL", - "GEOMETRY", - "GEOMETRYCOLLECTION", - "GET_FORMAT", - "GLOBAL", - "GRANT", - "GRANTS", - "GROUP", - "HANDLER", - "HASH", - "HAVING", - "HELP", - "HIGH_PRIORITY", - "HOST", - "HOSTS", - "HOUR", - "HOUR_MICROSECOND", - "HOUR_MINUTE", - "HOUR_SECOND", - "IDENTIFIED", - "IF", - "IGNORE", - "IGNORE_SERVER_IDS", - "IMPORT", - "IN", - "INDEX", - "INDEXES", - "INFILE", - "INITIAL_SIZE", - "INNER", - "INNOBASE", - "INNODB", - "INOUT", - "INSENSITIVE", - "INSERT", - "INSERT_METHOD", - "INSTALL", - "INT", - "INT1", - "INT2", - "INT3", - "INT4", - "INT8", - "INTEGER", - "INTERVAL", - "INTO", - "INVOKER", - "IO", - "IO_THREAD", - "IPC", - "IS", - "ISOLATION", - "ISSUER", - "ITERATE", - "JOIN", - "KEY", - "KEYS", - "KEY_BLOCK_SIZE", - "KILL", - "LANGUAGE", - "LAST", - "LEADING", - "LEAVE", - "LEAVES", - "LEFT", - "LESS", - "LEVEL", - "LIKE", - "LIMIT", - "LINEAR", - "LINES", - "LINESTRING", - "LIST", - "LOAD", - "LOCAL", - "LOCALTIME", - "LOCALTIMESTAMP", - "LOCK", - "LOCKS", - "LOGFILE", - "LOGS", - "LONG", - "LONGBLOB", - "LONGTEXT", - "LOOP", - "LOW_PRIORITY", - "MASTER", - "MASTER_CONNECT_RETRY", - "MASTER_HEARTBEAT_PERIOD", - "MASTER_HOST", - "MASTER_LOG_FILE", - "MASTER_LOG_POS", - "MASTER_PASSWORD", - "MASTER_PORT", - "MASTER_SERVER_ID", - "MASTER_SSL", - "MASTER_SSL_CA", - "MASTER_SSL_CAPATH", - "MASTER_SSL_CERT", - "MASTER_SSL_CIPHER", - "MASTER_SSL_KEY", - "MASTER_SSL_VERIFY_SERVER_CERT", - "MASTER_USER", - "MATCH", - "MAXVALUE", - "MAX_CONNECTIONS_PER_HOUR", - "MAX_QUERIES_PER_HOUR", - "MAX_ROWS", - "MAX_SIZE", - "MAX_UPDATES_PER_HOUR", - "MAX_USER_CONNECTIONS", - "MEDIUM", - "MEDIUMBLOB", - "MEDIUMINT", - "MEDIUMTEXT", - "MEMORY", - "MERGE", - "MESSAGE_TEXT", - "MICROSECOND", - "MIDDLEINT", - "MIGRATE", - "MINUTE", - "MINUTE_MICROSECOND", - "MINUTE_SECOND", - "MIN_ROWS", - "MOD", - "MODE", - "MODIFIES", - "MODIFY", - "MONTH", - "MULTILINESTRING", - "MULTIPOINT", - "MULTIPOLYGON", - "MUTEX", - "MYSQL_ERRNO", - "NAME", - "NAMES", - "NATIONAL", - "NATURAL", - "NCHAR", - "NDB", - "NDBCLUSTER", - "NEW", - "NEXT", - "NO", - "NODEGROUP", - "NONE", - "NOT", - "NO_WAIT", - "NO_WRITE_TO_BINLOG", - "NULL", - "NUMERIC", - "NVARCHAR", - "OFFSET", - "OLD_PASSWORD", - "ON", - "ONE", - "ONE_SHOT", - "OPEN", - "OPTIMIZE", - "OPTION", - "OPTIONALLY", - "OPTIONS", - "OR", - "ORDER", - "OUT", - "OUTER", - "OUTFILE", - "OWNER", - "PACK_KEYS", - "PAGE", - "PARSER", - "PARTIAL", - "PARTITION", - "PARTITIONING", - "PARTITIONS", - "PASSWORD", - "PHASE", - "PLUGIN", - "PLUGINS", - "POINT", - "POLYGON", - "PORT", - "PRECISION", - "PREPARE", - "PRESERVE", - "PREV", - "PRIMARY", - "PRIVILEGES", - "PROCEDURE", - "PROCESSLIST", - "PROFILE", - "PROFILES", - "PROXY", - "PURGE", - "QUARTER", - "QUERY", - "QUICK", - "RANGE", - "READ", - "READS", - "READ_ONLY", - "READ_WRITE", - "REAL", - "REBUILD", - "RECOVER", - "REDOFILE", - "REDO_BUFFER_SIZE", - "REDUNDANT", - "REFERENCES", - "REGEXP", - "RELAY", - "RELAYLOG", - "RELAY_LOG_FILE", - "RELAY_LOG_POS", - "RELAY_THREAD", - "RELEASE", - "RELOAD", - "REMOVE", - "RENAME", - "REORGANIZE", - "REPAIR", - "REPEAT", - "REPEATABLE", - "REPLACE", - "REPLICATION", - "REQUIRE", - "RESET", - "RESIGNAL", - "RESTORE", - "RESTRICT", - "RESUME", - "RETURN", - "RETURNS", - "REVOKE", - "RIGHT", - "RLIKE", - "ROLLBACK", - "ROLLUP", - "ROUTINE", - "ROW", - "ROWS", - "ROW_FORMAT", - "RTREE", - "SAVEPOINT", - "SCHEDULE", - "SCHEMA", - "SCHEMAS", - "SCHEMA_NAME", - "SECOND", - "SECOND_MICROSECOND", - "SECURITY", - "SELECT", - "SENSITIVE", - "SEPARATOR", - "SERIAL", - "SERIALIZABLE", - "SERVER", - "SESSION", - "SET", - "SHARE", - "SHOW", - "SHUTDOWN", - "SIGNAL", - "SIGNED", - "SIMPLE", - "SLAVE", - "SLOW", - "SMALLINT", - "SNAPSHOT", - "SOCKET", - "SOME", - "SONAME", - "SOUNDS", - "SOURCE", - "SPATIAL", - "SPECIFIC", - "SQL", - "SQLEXCEPTION", - "SQLSTATE", - "SQLWARNING", - "SQL_BIG_RESULT", - "SQL_BUFFER_RESULT", - "SQL_CACHE", - "SQL_CALC_FOUND_ROWS", - "SQL_NO_CACHE", - "SQL_SMALL_RESULT", - "SQL_THREAD", - "SQL_TSI_DAY", - "SQL_TSI_FRAC_SECOND", - "SQL_TSI_HOUR", - "SQL_TSI_MINUTE", - "SQL_TSI_MONTH", - "SQL_TSI_QUARTER", - "SQL_TSI_SECOND", - "SQL_TSI_WEEK", - "SQL_TSI_YEAR", - "SSL", - "START", - "STARTING", - "STARTS", - "STATUS", - "STOP", - "STORAGE", - "STRAIGHT_JOIN", - "STRING", - "SUBCLASS_ORIGIN", - "SUBJECT", - "SUBPARTITION", - "SUBPARTITIONS", - "SUPER", - "SUSPEND", - "SWAPS", - "SWITCHES", - "TABLE", - "TABLES", - "TABLESPACE", - "TABLE_CHECKSUM", - "TABLE_NAME", - "TEMPORARY", - "TEMPTABLE", - "TERMINATED", - "TEXT", - "THAN", - "THEN", - "TIME", - "TIMESTAMP", - "TIMESTAMPADD", - "TIMESTAMPDIFF", - "TINYBLOB", - "TINYINT", - "TINYTEXT", - "TO", - "TRAILING", - "TRANSACTION", - "TRIGGER", - "TRIGGERS", - "TRUE", - "TRUNCATE", - "TYPE", - "TYPES", - "UNCOMMITTED", - "UNDEFINED", - "UNDO", - "UNDOFILE", - "UNDO_BUFFER_SIZE", - "UNICODE", - "UNINSTALL", - "UNION", - "UNIQUE", - "UNKNOWN", - "UNLOCK", - "UNSIGNED", - "UNTIL", - "UPDATE", - "UPGRADE", - "USAGE", - "USE", - "USER", - "USER_RESOURCES", - "USE_FRM", - "USING", - "UTC_DATE", - "UTC_TIME", - "UTC_TIMESTAMP", - "VALUE", - "VALUES", - "VARBINARY", - "VARCHAR", - "VARCHARACTER", - "VARIABLES", - "VARYING", - "VIEW", - "WAIT", - "WARNINGS", - "WEEK", - "WHEN", - "WHERE", - "WHILE", - "WITH", - "WORK", - "WRAPPER", - "WRITE", - "X509", - "XA", - "XML", - "XOR", - "YEAR", - "YEAR_MONTH", - "ZEROFILL", - ); - - private $numberFunctions = array( - 'ABS', - 'ACOS', - 'ASIN', - 'ATAN2', - 'ATAN', - 'CEIL', - 'CEILING', - 'CONV', - 'COS', - 'COT', - 'CRC32', - 'DEGREES', - 'EXP', - 'FLOOR', - 'LN', - 'LOG10', - 'LOG2', - 'LOG', - 'MOD', - 'PI', - 'POW', - 'POWER', - 'RADIANS', - 'RAND', - 'ROUND', - 'SIGN', - 'SIN', - 'SQRT', - 'TAN', - 'TRUNCATE', - ); - - private $charFunctions = array( - 'ASCII_SYM', - 'BIN', - 'BIT_LENGTH', - 'CHAR_LENGTH', - 'CHAR', - 'CONCAT_WS', - 'CONCAT', - 'ELT', - 'EXPORT_SET', - 'FIELD', - 'FIND_IN_SET', - 'FORMAT', - 'FROM_BASE64', - 'HEX', - 'INSERT', - 'INSTR', - 'LEFT', - 'LENGTH', - 'LOAD_FILE', - 'LOCATE', - 'LOWER', - 'LPAD', - 'LTRIM', - 'MAKE_SET', - 'MID', - 'OCT', - 'ORD', - 'QUOTE', - 'REPEAT', - 'REPLACE', - 'REVERSE', - 'RIGHT', - 'RPAD', - 'RTRIM', - 'SOUNDEX', - 'SPACE', - 'STRCMP', - 'SUBSTRING_INDEX', - 'SUBSTRING', - 'TO_BASE64', - 'TRIM', - 'UNHEX', - 'UPPER', - 'WEIGHT_STRING', - ); - - private $timeFunctions = array( - 'ADDDATE', - 'ADDTIME', - 'CONVERT_TZ', - 'CURDATE', - 'CURTIME', - 'DATE_ADD', - 'DATE_FORMAT', - 'DATE_SUB', - 'DATE_SYM', - 'DATEDIFF', - 'DAYNAME', - 'DAYOFMONTH', - 'DAYOFWEEK', - 'DAYOFYEAR', - 'EXTRACT', - 'FROM_DAYS', - 'FROM_UNIXTIME', - 'GET_FORMAT', - 'HOUR', - 'LAST_DAY ', - 'MAKEDATE', - 'MAKETIME ', - 'MICROSECOND', - 'MINUTE', - 'MONTH', - 'MONTHNAME', - 'NOW', - 'PERIOD_ADD', - 'PERIOD_DIFF', - 'QUARTER', - 'SEC_TO_TIME', - 'SECOND', - 'STR_TO_DATE', - 'SUBTIME', - 'SYSDATE', - 'TIME_FORMAT', - 'TIME_TO_SEC', - 'TIME_SYM', - 'TIMEDIFF', - 'TIMESTAMP', - 'TIMESTAMPADD', - 'TIMESTAMPDIFF', - 'TO_DAYS', - 'TO_SECONDS', - 'UNIX_TIMESTAMP', - 'UTC_DATE', - 'UTC_TIME', - 'UTC_TIMESTAMP', - 'WEEK', - 'WEEKDAY', - 'WEEKOFYEAR', - 'YEAR', - 'YEARWEEK', - ); - - private $otherFunctions = array( - 'MAKE_SET', 'LOAD_FILE', - 'IF', 'IFNULL', - 'AES_ENCRYPT', 'AES_DECRYPT', - 'DECODE', 'ENCODE', - 'DES_DECRYPT', 'DES_ENCRYPT', - 'ENCRYPT', 'MD5', - 'OLD_PASSWORD', 'PASSWORD', - 'BENCHMARK', 'CHARSET', 'COERCIBILITY', 'COLLATION', 'CONNECTION_ID', - 'CURRENT_USER', 'DATABASE', 'SCHEMA', 'USER', 'SESSION_USER', 'SYSTEM_USER', - 'VERSION_SYM', - 'FOUND_ROWS', 'LAST_INSERT_ID', 'DEFAULT', - 'GET_LOCK', 'RELEASE_LOCK', 'IS_FREE_LOCK', 'IS_USED_LOCK', 'MASTER_POS_WAIT', - 'INET_ATON', 'INET_NTOA', - 'NAME_CONST', - 'SLEEP', - 'UUID', - 'VALUES', - ); - - private $groupFunctions = array( - 'AVG', 'COUNT', 'MAX_SYM', 'MIN_SYM', 'SUM', - 'BIT_AND', 'BIT_OR', 'BIT_XOR', - 'GROUP_CONCAT', - 'STD', 'STDDEV', 'STDDEV_POP', 'STDDEV_SAMP', - 'VAR_POP', 'VAR_SAMP', 'VARIANCE', - ); - - - /** - * @param wfWAFSQLiLexer $lexer - * @param string $subject - * @param int $flags - */ - public function __construct($lexer, $subject = null, $flags = 0) { - parent::__construct($lexer); - $this->setSubject($subject); - $this->setFlags($flags); - } - - protected function _init() { - $this->portableCommentVersions = array(); - $this->index = -1; - } - - /** - * @param int $num - * @return bool - */ - public function hasMoreThanNumTokens($num) { - $this->_init(); - - $savePoint = $this->index; - for ($i = 0; $i <= $num;) { - $token=$this->nextToken(); - if($token){ - if(!$this->lexer->isValueLiteral($token->getType())) - $i++; - } - else{ - $this->index = $savePoint; - return false; - } - } - $this->index = $savePoint; - return true; - } - - /** - * @return bool - */ - public function evaluate() { - try { - $this->parse(); - return true; - } catch (wfWAFParserSyntaxError $e) { - return false; - } - } - - public function parse() { - $this->_init(); - if ( - $this->parseSelectStatement() - || $this->parseInsertStatement() - || $this->parseUpdateStatement() -// || $this->parseDeleteStatement() -// || $this->parseReplaceStatement() - ) { - $token = $this->nextToken(); - if ($token && !$this->isTokenOfType($token, wfWAFSQLiLexer::SEMICOLON)) { - $this->triggerSyntaxError($this->currentToken()); - } - } else { - $this->triggerSyntaxError($this->expectNextToken()); - } - } - - /** - * @param int $index - * @return bool - */ - protected function getToken($index) { - if (array_key_exists($index, $this->tokens)) { - return $this->tokens[$index]; - } - while ($token = $this->getLexer()->nextToken()) { - if (!$this->isCommentToken($token)) { - $this->tokens[$index] = $token; - return $this->tokens[$index]; - } - } - return false; - } - - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - public function isCommentToken($token) { - if ($this->isTokenOfType($token, wfWAFSQLiLexer::MYSQL_PORTABLE_COMMENT_START)) { - $this->portableCommentVersions[(int) preg_replace('/[^\d]/', '', $token->getValue())] = 1; - } - - return $this->isTokenOfType($token, array( - wfWAFSQLiLexer::SINGLE_LINE_COMMENT, - wfWAFSQLiLexer::MULTI_LINE_COMMENT, - wfWAFSQLiLexer::MYSQL_PORTABLE_COMMENT_START, - wfWAFSQLiLexer::MYSQL_PORTABLE_COMMENT_END, - )); - } - - public function hasMultiplePortableCommentVersions() { - return count($this->portableCommentVersions) > 1; - } - - /** - * Expects the next token to be an identifier with the supplied case-insensitive value - * - * @param $keyword - * @return wfWAFLexerToken - * @throws wfWAFParserSyntaxError - */ - protected function expectNextIdentifierEquals($keyword) { - $nextToken = $this->expectNextToken(); - $this->expectTokenTypeEquals($nextToken, wfWAFSQLiLexer::UNQUOTED_IDENTIFIER); - if ($nextToken->getLowerCaseValue() !== wfWAFUtils::strtolower($keyword)) { - $this->triggerSyntaxError($nextToken); - } - return $nextToken; - } - - private function parseSelectStatement() { - $startIndex = $this->index; - $hasSelect = false; - while ($this->parseSelectExpression()) { - $hasSelect = true; - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'union')) { - $hasSelect = false; - if (!$this->isIdentifierWithValue($this->nextToken(), 'all')) { - $this->index--; - } - continue; - } - $this->index = $savePoint; - break; - } - if ($hasSelect) { - return true; - } - $this->index = $startIndex; - return false; - } - - private function parseSelectExpression() { - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parseSelectExpression() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - - if ($this->parseSelect()) { - if ($this->parseFrom()) { - $this->parseWhere(); - $this->parseProcedure(); - $this->parseGroupBy(); - $this->parseHaving(); - } - $this->parseOrderBy(); - $this->parseLimit(); - - return true; - } - return false; - } - - /** - * @throws wfWAFParserSyntaxError - */ - private function parseSelect() { - $startPoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'select')) { - $optionalSelectParamsRegex = '/ALL|DISTINCT(?:ROW)?|HIGH_PRIORITY|MAX_STATEMENT_TIME|STRAIGHT_JOIN|SQL_SMALL_RESULT|SQL_BIG_RESULT|SQL_BUFFER_RESULT|SQL_CACHE|SQL_NO_CACHE|SQL_CALC_FOUND_ROWS/i'; - while (true) { - $savePoint = $this->index; - $token = $this->nextToken(); - if ($token) { - $value = $token->getLowerCaseValue(); - if (preg_match($optionalSelectParamsRegex, $value)) { - if ($value == 'max_statement_time') { - $this->expectTokenTypeEquals($this->expectNextToken(), wfWAFSQLiLexer::EQUALS_SYMBOL); - $this->expectTokenTypeInArray($this->expectNextToken(), array( - wfWAFSQLiLexer::INTEGER_LITERAL, - wfWAFSQLiLexer::BINARY_NUMBER_LITERAL, - wfWAFSQLiLexer::HEX_NUMBER_LITERAL, - wfWAFSQLiLexer::BINARY_NUMBER_LITERAL, - )); - } - continue; - } - } - $this->index = $savePoint; - break; - } - return $this->parseSelectList(); - } - $this->index = $startPoint; - return false; - } - - /** - * @throws wfWAFParserSyntaxError - */ - private function parseSelectList() { - $startPoint = $this->index; - $hasSelects = false; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::ASTERISK)) { - $hasSelects = true; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - // Just SELECT * [FROM ...] - $this->index--; - return true; - } - } else { - $this->index = $startPoint; - } - while ($this->parseDisplayedColumn()) { - $hasSelects = true; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - continue; - } - $this->index--; - break; - } - if ($hasSelects) { - return true; - } - $this->index = $startPoint; - return false; - } - - private function parseDisplayedColumn() { - /* - ( table_spec DOT ASTERISK ) - | - ( column_spec (alias)? ) - | - ( bit_expr (alias)? ) - */ - $savePoint = $this->index; - if ($this->parseTableSpec() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::DOT) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::ASTERISK) - ) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->parseExpression()) { - $this->parseAlias(); - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->parseColumnSpec()) { - $this->parseAlias(); - return true; - } - $this->index = $savePoint; - - return false; - } - - /** - * @return bool - */ - private function parseExpressionList() { - $startIndex = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS)) { - $hasExpressions = false; - while ($this->parseExpression()) { - $hasExpressions = true; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - continue; - } - $this->index--; - break; - } - if ($hasExpressions && $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - private function parseExpression() { - // Combines these: - // exp_factor3 ( AND_SYM exp_factor3 )* ; - // expression: exp_factor1 ( OR_SYM exp_factor1 )* ; - // exp_factor1: exp_factor2 ( XOR exp_factor2 )* ; - // exp_factor2: exp_factor3 ( AND_SYM exp_factor3 )* ; - - $savePoint = $this->index; - $hasExpression = false; - while ($this->parseExpressionFactor3()) { - $hasExpression = true; - $savePoint2 = $this->index; - $token = $this->nextToken(); - if ($this->isOrToken($token) || $this->isAndToken($token) || $this->isIdentifierWithValue($token, 'xor')) { - continue; - } - $this->index = $savePoint2; - break; - } - if ($hasExpression) { - return true; - } - $this->index = $savePoint; - return false; - } - - private function parseExpressionFactor3() { - // (NOT_SYM)? exp_factor4 ; - $savePoint = $this->index; - if (!$this->isNotSymbolToken($this->nextToken())) { - $this->index--; - } - if ($this->parseExpressionFactor4()) { - return true; - } - $this->index = $savePoint; - return false; - } - - private function parseExpressionFactor4() { - // bool_primary ( IS_SYM (NOT_SYM)? (boolean_literal|NULL_SYM) )? ; - $savePoint = $this->index; - if ($this->parseBoolPrimary()) { - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'is')) { - if (!$this->isNotSymbolToken($this->nextToken())) { - $this->index--; - } - if ($this->isIdentifierWithValue($this->nextToken(), array( - 'true', 'false', 'null', - )) - ) { - return true; - } - } - $this->index = $savePoint; - return true; - } - $this->index = $savePoint; - return false; - } - - /** - * @return bool - */ - private function parseBoolPrimary() { - $startIndex = $this->index; - $token = $this->nextToken(); - if ($token) { - $hasNot = false; - if ($this->isNotSymbolToken($token)) { - $hasNot = true; - $token = $this->nextToken(); - } - $val = $token->getLowerCaseValue(); - if ($token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) { - if ($val === 'exists' && $this->parseSubquery()) { - return true; - } else if ($hasNot) { - $this->index = $startIndex; - return false; - } - } - if (!$hasNot) { - $this->index = $startIndex; - } - } - - if ($this->parsePredicate()) { - $savePoint = $this->index; - $opToken = $this->nextToken(); - if ($opToken) { - switch ($opToken->getType()) { - case wfWAFSQLiLexer::EQUALS_SYMBOL: - case wfWAFSQLiLexer::LESS_THAN: - case wfWAFSQLiLexer::GREATER_THAN: - case wfWAFSQLiLexer::LESS_THAN_EQUAL_TO: - case wfWAFSQLiLexer::GREATER_THAN_EQUAL_TO: - case wfWAFSQLiLexer::NOT_EQUALS: - case wfWAFSQLiLexer::SET_VAR: - $savePoint2 = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), array( - 'any', 'all' - )) && - $this->parseSubquery() - ) { - return true; - } - $this->index = $savePoint2; - - $savePoint2 = $this->index; - if ($this->testForSubquery() && $this->parseSubquery()) { - return true; - } - $this->index = $savePoint2; - - if ($this->parsePredicate()) { - return true; - } - $this->index = $startIndex; - return false; - } - } - $this->index = $savePoint; - return true; - } - $this->index = $startIndex; - return false; - } - - private function parsePredicate() { - $startIndex = $this->index; - if ($this->parseBitExpression()) { - $savePoint = $this->index; - $token = $this->nextToken(); - if ($token) { - if ($hasNot = $this->isNotSymbolToken($token)) { - $token = $this->nextToken(); - if (!$token) { - $this->index = $startIndex; - return false; - } - } - $val = $token->getLowerCaseValue(); - - if ($token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) { - switch ($val) { - case 'in': - if ($this->parseSubquery() || $this->parseExpressionList()) { - return true; - } - break; - - case 'between': - if ($this->parseBitExpression() && $this->isIdentifierWithValue($this->nextToken(), 'and') && - $this->parsePredicate() - ) { - return true; - } - break; - - case 'sounds': - if ($this->isIdentifierWithValue($this->nextToken(), 'like') && - $this->parseBitExpression() - ) { - return true; - } - break; - - case 'like': - case 'rlike': - if ($this->parseSimpleExpression()) { - // We've got a LIKE statement at this point - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'escape') && - $this->parseSimpleExpression() - ) { - return true; - } - $this->index = $savePoint; - return true; - } - break; - - case 'regexp': - if ($this->parseBitExpression()) { - return true; - } - break; - - default: - if ($hasNot) { - $this->index = $startIndex; - return false; - } - break; - } - } - } - $this->index = $savePoint; - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parseBitExpression() { - // factor1 ( VERTBAR factor1 )? ; - $savePoint = $this->index; - if ($this->parseBitExprFactor5()) { - $savePoint = $this->index; - $token = $this->nextToken(); - if (($this->isTokenOfType($token, array( - wfWAFSQLiLexer::BIT_OR, - wfWAFSQLiLexer::BIT_AND, - wfWAFSQLiLexer::BIT_XOR, - wfWAFSQLiLexer::BIT_LEFT_SHIFT, - wfWAFSQLiLexer::BIT_RIGHT_SHIFT, - wfWAFSQLiLexer::BIT_INVERSION, - wfWAFSQLiLexer::PLUS, - wfWAFSQLiLexer::MINUS, - wfWAFSQLiLexer::ASTERISK, - wfWAFSQLiLexer::DIVISION, - wfWAFSQLiLexer::MOD, - )) - || - $this->isIdentifierWithValue($token, array( - 'div', 'mod' - ))) && - $this->parseBitExpression() - ) { - return true; - } - $this->index = $savePoint; - return true; - } - $this->index = $savePoint; - return false; - } - - - private function parseBitExprFactor5() { - // factor6 ( (PLUS|MINUS) interval_expr )? ; - $savePoint = $this->index; - if ($this->parseBitExprFactor6()) { - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), array( - wfWAFSQLiLexer::PLUS, - wfWAFSQLiLexer::MINUS, - )) && $this->parseIntervalExpression() - ) { - return true; - } - $this->index = $savePoint; - return true; - } - $this->index = $savePoint; - return false; - } - - private function parseBitExprFactor6() { - // (PLUS | MINUS | NEGATION | BINARY) simple_expr - // | simple_expr ; - - $startPoint = $this->index; - $savePoint = $this->index; - while ( - ($token = $this->nextToken()) && - ( - $this->isTokenOfType($token, array( - wfWAFSQLiLexer::PLUS, - wfWAFSQLiLexer::MINUS, - )) || - ($this->isTokenOfType($token, wfWAFSQLiLexer::BIT_INVERSION)) || - ($this->isIdentifierWithValue($token, 'BINARY')) - ) - ) { - $savePoint = $this->index; - } - $this->index = $savePoint; - - if ($this->parseSimpleExpression()) { - return true; - } - $this->index = $startPoint; - return false; - - } - - /** - * literal_value - * | column_spec - * | function_call - * | USER_VAR - * | expression_list - * | (ROW_SYM expression_list) - * | subquery - * | EXISTS subquery - * | {identifier expr} - * | match_against_statement - * | case_when_statement - * | interval_expr - * - * @return bool - */ - private function parseSimpleExpression() { - $startPoint = $this->index; - $simple = ($parseLiteral = $this->parseLiteral()) || - ($parseMatchAgainst = $this->parseMatchAgainst()) || - ($parseFunctionCall = $this->parseFunctionCall()) || - ($parseVariable = $this->parseVariable()) || - ($parseExpressionList = $this->parseExpressionList()) || - ($parseSubquery = $this->parseSubquery()) || - ($parseExistsSubquery = $this->parseExistsSubquery()) || - ($parseCaseWhen = $this->parseCaseWhen()) || - ($parseODBCExpression = $this->parseODBCExpression()) || - ($parseIntervalExpression = $this->parseIntervalExpression()) || - ($parseColumnSpec = $this->parseColumnSpec()); - - if ($simple) { - $token = $this->nextToken(); - if ($token && $token->getLowerCaseValue() == 'collate') { - $savePoint = $this->index; - if ($this->parseCollationName()) { - return true; - } - $this->index = $savePoint; - } else { - $this->index--; - } - return true; - } - $this->index = $startPoint; - return false; - } - - /** - * @return bool - */ - private function parseLiteral() { - $startIndex = $this->index; - $savePoint = $this->index; - while ($this->isTokenOfType($this->nextToken(), array( - wfWAFSQLiLexer::PLUS, - wfWAFSQLiLexer::MINUS, - ))) { - $savePoint = $this->index; - } - $this->index = $savePoint; - - // Check if this is a Character Set Introducer - $nextToken = $this->nextToken(); - $hasCharacterSetIntroducer = $this->isTokenOfType($nextToken, wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) && - substr($nextToken->getValue(), 0, 1) === '_'; - if (!$hasCharacterSetIntroducer) { - $this->index--; - } - - $validLiteral = false; - $nextToken = $this->nextToken(); - if ($nextToken) { - switch ($nextToken->getType()) { - case wfWAFSQLiLexer::INTEGER_LITERAL: - case wfWAFSQLiLexer::BINARY_NUMBER_LITERAL: - case wfWAFSQLiLexer::HEX_NUMBER_LITERAL: - case wfWAFSQLiLexer::REAL_NUMBER_LITERAL: - $validLiteral = true; - break; - // Allow concatenation: 'test' 'test' is valid - case wfWAFSQLiLexer::DOUBLE_STRING_LITERAL: - case wfWAFSQLiLexer::SINGLE_STRING_LITERAL: - $savePoint = $this->index; - while ($this->isTokenOfType($this->nextToken(), array( - wfWAFSQLiLexer::DOUBLE_STRING_LITERAL, - wfWAFSQLiLexer::SINGLE_STRING_LITERAL - ))) { - $savePoint = $this->index; - } - $this->index = $savePoint; - $validLiteral = true; - break; - - case wfWAFSQLiLexer::UNQUOTED_IDENTIFIER: - if ($nextToken->getLowerCaseValue() === 'null') { - $validLiteral = true; - } - break; - } - } - - - if ($validLiteral) { - if ($hasCharacterSetIntroducer) { - // Check for and parse collation - $savePoint = $this->index; - $hasCollation = $this->isIdentifierWithValue($this->nextToken(), 'collation') && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::UNQUOTED_IDENTIFIER); - if (!$hasCollation) { - $this->index = $savePoint; - } - } - - return true; - } - - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parseColumnSpec() { - $savePoint = $this->index; - if ($this->parseTableSpec()) { - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::DOT)) { - $nextToken = $this->nextToken(); - if ($nextToken && ($nextToken->getType() == wfWAFSQLiLexer::UNQUOTED_IDENTIFIER || - $nextToken->getType() == wfWAFSQLiLexer::QUOTED_IDENTIFIER) - ) { - return true; - } - $this->index = $savePoint; - return false; - } - - $this->index = $savePoint; - return true; - } - $this->index = $savePoint; - return false; - } - - /** - * CAST_SYM LPAREN expression AS_SYM cast_data_type RPAREN ) - * | ( CONVERT_SYM LPAREN expression COMMA cast_data_type RPAREN ) - * | ( CONVERT_SYM LPAREN expression USING_SYM transcoding_name RPAREN ) - * | ( group_functions LPAREN ( ASTERISK | ALL | DISTINCT )? bit_expr RPAREN ) - * - * @return bool - */ - private function parseFunctionCall() { - $startPoint = $this->index; - $functionToken = $this->nextToken(); - if ($functionToken && $functionToken->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) { - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS)) { - switch ($functionToken->getLowerCaseValue()) { - case 'cast': - if ($this->parseExpression() && - $this->isIdentifierWithValue($this->nextToken(), 'as') && - $this->parseCastDataType() && - $this->parseOptionalCharacterSet() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - break; - - case 'convert': - if ($this->parseExpression()) { - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA) && - $this->parseCastDataType() && - $this->parseOptionalCharacterSet() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'using') && - $this->parseTranscodingName() && - $this->parseOptionalCharacterSet() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - } - break; - - case 'trim': - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'leading', - 'both', - 'trailing', - ))) { - $this->index--; - } - - while ($this->parseExpression()) { - $nextToken = $this->nextToken(); - if ( - $this->isTokenOfType($nextToken, wfWAFSQLiLexer::COMMA) || - $this->isIdentifierWithValue($nextToken, array( - 'from', - 'for', - 'in', - )) - ) { - continue; - } - $this->index--; - break; - } - - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - break; - - case 'weight_string': - if ($this->parseExpression()) { - $savePoint = $this->index; - if (!( - $this->isIdentifierWithValue($this->nextToken(), 'as') && - $this->parseCastDataType() && - $this->parseOptionalCharacterSet() - )) { - $this->index = $savePoint; - } - - if ($this->isIdentifierWithValue($this->nextToken(), 'level')) { - while ($this->parseExpression()) { - $nextToken = $this->nextToken(); - if ( - $this->isTokenOfType($nextToken, wfWAFSQLiLexer::COMMA) || - $this->isTokenOfType($nextToken, wfWAFSQLiLexer::MINUS) - ) { - continue; - } - $this->index--; - break; - } - while ($this->isIdentifierWithValue($this->nextToken(), array( - 'asc', - 'desc', - 'reverse', - ))) { - continue; - } - $this->index--; - } else { - $this->index--; - } - } - - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - break; - - default: - $savePoint = $this->index; - if (in_array($functionToken->getUpperCaseValue(), $this->groupFunctions)) { - $token = $this->nextToken(); - if (!$this->isIdentifierWithValue($token, array( - 'all', 'distinct', - )) && !$this->isTokenOfType($token, wfWAFSQLiLexer::ASTERISK) - ) { - $this->index--; - } - $this->parseBitExpression(); - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $savePoint; - - while ($this->parseExpression()) { - $nextToken = $this->nextToken(); - if ( - $this->isTokenOfType($nextToken, wfWAFSQLiLexer::COMMA) || - $this->isIdentifierWithValue($nextToken, array( - 'from', - 'for', - 'in', - )) - ) { - continue; - } - $this->index--; - break; - } - - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - break; - } - } - } - $this->index = $startPoint; - return false; - } - - /** - * BINARY (INTEGER_NUM)? - * | CHAR (INTEGER_NUM)? - * | DATE_SYM - * | DATETIME - * | DECIMAL_SYM ( INTEGER_NUM (COMMA INTEGER_NUM)? )? - * | SIGNED_SYM (INTEGER_SYM)? - * | TIME_SYM - * | UNSIGNED_SYM (INTEGER_SYM)? - * - * @return bool - */ - private function parseCastDataType() { - $startPoint = $this->index; - $token = $this->nextToken(); - if ($this->isKeywordToken($token)) { - switch ($token->getLowerCaseValue()) { - case 'binary': - case 'char': - case 'nchar': - case 'varchar': - case 'character': - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::INTEGER_LITERAL) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - return true; - - case 'date': - case 'datetime': - case 'time': - return true; - - case 'signed': - case 'unsigned': - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'int', - 'integer', - ))) { - $this->index--; - } - return true; - - case 'decimal': - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::INTEGER_LITERAL)) { - - $savePoint2 = $this->index; - if (!($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::INTEGER_LITERAL) - )) { - $this->index = $savePoint2; - } - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - - $this->index = $savePoint; - return true; - } - } - $this->index = $startPoint; - return false; - } - - private function parseTranscodingName() { - $savePoint = $this->index; - $token = $this->nextToken(); - if ($token && $token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) { - return true; - } - $this->index = $savePoint; - return false; - } - - private function parseOptionalCharacterSet() { - $savePoint = $this->index; - if (!( - $this->nextToken()->getLowerCaseValue() === 'character' && - $this->nextToken()->getLowerCaseValue() === 'set' && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) - )) { - $this->index = $savePoint; - } - return true; - } - - private function parseVariable() { - $nextToken = $this->nextToken(); - if ($nextToken && $nextToken->getType() === wfWAFSQLiLexer::VARIABLE) { - return true; - } - $this->index--; - return false; - } - - /** - * @return bool - */ - private function parseSubquery() { - $startIndex = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parseSelectStatement() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $startIndex; - return false; - } - - private function testForSubquery() { - $startIndex = $this->index; - $nextToken = $this->nextToken(); - if ($nextToken && $nextToken->getType() === wfWAFSQLiLexer::OPEN_PARENTHESIS) { - $selectToken = $this->nextToken(); - if ($this->isIdentifierWithValue($selectToken, 'select')) { - $this->index = $startIndex; - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * - * - * @return bool - */ - private function parseExistsSubquery() { - $startIndex = $this->index; - $existsToken = $this->nextToken(); - if ($this->isIdentifierWithValue($existsToken, 'exists')) { - if ($this->parseSubquery()) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * MATCH (column_spec (COMMA column_spec)* ) AGAINST (expression (search_modifier)? ) - * - * @return bool - */ - private function parseMatchAgainst() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'match')) { - $savePoint = $this->index; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS)) { - $this->index = $savePoint; - } - $hasColumns = false; - while ($this->parseColumnSpec()) { - $hasColumns = true; - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - continue; - } - $this->index = $savePoint; - break; - } - $savePoint = $this->index; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - $this->index = $savePoint; - } - if ($hasColumns && $this->isIdentifierWithValue($this->nextToken(), 'against') && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parseExpression() && - ($this->parseSearchModifier() || true) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * Used in match/against - * - * @link https://dev.mysql.com/doc/refman/5.6/en/fulltext-search.html - * @return bool - */ - private function parseSearchModifier() { - $startIndex = $this->index; - - $startToken = $this->nextToken(); - if ($this->isIdentifierWithValue($startToken, 'in')) { - $next = $this->nextToken(); - if ($this->isIdentifierWithValue($next, 'natural') && - $this->isIdentifierWithValue($this->nextToken(), 'language') && - $this->isIdentifierWithValue($this->nextToken(), 'mode') - ) { - $saveIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'with') && - $this->isIdentifierWithValue($this->nextToken(), 'query') && - $this->isIdentifierWithValue($this->nextToken(), 'expansion') - ) { - return true; - } - $this->index = $saveIndex; - return true; - - } else if ($this->isIdentifierWithValue($next, 'boolean') && - $this->isIdentifierWithValue($this->nextToken(), 'mode') - ) { - return true; - } - } else if ($this->isIdentifierWithValue($startToken, 'with')) { - if ($this->isIdentifierWithValue($this->nextToken(), 'query') && - $this->isIdentifierWithValue($this->nextToken(), 'expansion') - ) { - return true; - } - } - - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parseCaseWhen() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'case')) { - $hasWhen = false; - while (true) { - if (!$this->isIdentifierWithValue($this->nextToken(), 'when')) { - $this->index--; - break; - } - if ($this->parseExpression()) { - if ($this->isIdentifierWithValue($this->nextToken(), 'then') && $this->parseBitExpression()) { - $hasWhen = true; - continue; - } - $this->index--; - } - $this->index--; - break; - } - if ($hasWhen) { - $endToken = $this->nextToken(); - if ($this->isIdentifierWithValue($endToken, 'else')) { - if (!$this->parseBitExpression()) { - $this->index = $startIndex; - return false; - } - $endToken = $this->nextToken(); - } - if ($this->isIdentifierWithValue($endToken, 'end')) { - return true; - } - } - } - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parseODBCExpression() { - $startIndex = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_BRACKET) && $this->isIdentifier($this->nextToken()) && $this->parseExpression() && $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_BRACKET)) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parseIntervalExpression() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'interval') && $this->parseExpression()) { - $intervalUnitToken = $this->nextToken(); - if ($intervalUnitToken && in_array($intervalUnitToken->getType(), $this->intervalUnits)) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - public function parseCollationName() { - $startIndex = $this->index; - $token = $this->nextToken(); - if ($token && $token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parseFrom() { - $startIndex = $this->index; - $token = $this->nextToken(); - if ($this->isIdentifierWithValue($token, 'from')) { - return $this->parseTableReferences(); - } - $this->index = $startIndex; - return false; - } - - /** - * @link http://dev.mysql.com/doc/refman/5.6/en/join.html - * @return bool - */ - private function parseTableReferences() { - $startPoint = $this->index; - $hasReferences = false; - while ($this->parseEscapedTableReference()) { - $hasReferences = true; - $savePoint = $this->index; - $token = $this->nextToken(); - if ($this->isTokenOfType($token, wfWAFSQLiLexer::COMMA)) { - continue; - } - $this->index = $savePoint; - break; - } - if ($hasReferences) { - return true; - } - $this->index = $startPoint; - return false; - } - - /** - * @return bool - */ - private function parseEscapedTableReference() { - $startPoint = $this->index; - if ($this->parseTableReference() || - ( - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_BRACKET) && - $this->isIdentifierWithValue($this->nextToken(), 'oj') && - $this->parseTableReference() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_BRACKET) - ) - ) { - return true; - } - - $this->index = $startPoint; - return false; - } - - /** - * @return bool - */ - private function parseTableReference() { - $savePoint = $this->index; - $hasTables = false; - if ($this->parseTableFactor()) { - $hasTables = true; - while ($this->parseJoinTable()) { - - } - } - if ($hasTables) { - return true; - } - $this->index = $savePoint; - return false; - } - - /** - * table_factor: - * tbl_name [PARTITION (partition_names)] [[AS] alias] [index_hint_list] - * | table_subquery [AS] alias - * | ( table_references ) - */ - private function parseTableFactor() { - $savePoint = $this->index; - if ($this->parseTableSpec()) { - $savePoint2 = $this->index; - if (!$this->parsePartitionClause()) { - $this->index = $savePoint2; - } - - $this->parseAlias(); - $this->parseIndexHintList(); - - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->parseSubquery() && $this->parseAlias()) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parseTableReferences() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - return false; - } - - /** - * PARTITION (partition_names) - * - * @return bool - */ - private function parsePartitionClause() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'partition') && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parsePartitionNames() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * @return bool - */ - private function parsePartitionNames() { - $startPoint = $this->index; - $hasPartition = false; - while ($this->parsePartitionName()) { - $hasPartition = true; - $savePoint = $this->index; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $this->index = $savePoint; - break; - } - } - if ($hasPartition) { - return true; - } - $this->index = $startPoint; - return false; - } - - /** - * @return bool - */ - private function parsePartitionName() { - $startPoint = $this->index; - $token = $this->nextToken(); - if ($this->isValidNonReservedWordIdentifier($token)) { - return true; - } - $this->index = $startPoint; - return false; - } - - /** - * join_table: - * table_reference [INNER | CROSS] JOIN table_factor [join_condition] - * | table_reference STRAIGHT_JOIN table_factor - * | table_reference STRAIGHT_JOIN table_factor ON conditional_expr - * | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition - * | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor - * - * @return bool - */ - private function parseJoinTable() { - $savePoint = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'inner', 'cross', - )) - ) { - $this->index = $savePoint; - } - if ($this->isIdentifierWithValue($this->nextToken(), 'join') && $this->parseTableFactor()) { - $this->parseJoinCondition(); - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'straight_join') && - $this->parseTableFactor() - ) { - $savePoint = $this->index; - if (!($this->isIdentifierWithValue($this->nextToken(), 'on') && $this->parseExpression())) { - $this->index = $savePoint; - } - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), array( - 'left', 'right', - )) - ) { - $savePoint2 = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'outer', - )) - ) { - $this->index = $savePoint2; - } - } else { - $this->index = $savePoint; - } - if ($this->isIdentifierWithValue($this->nextToken(), 'join') && - $this->parseTableReference() && - $this->parseJoinCondition() - ) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), array( - 'natural', - )) - ) { - if ($this->isIdentifierWithValue($this->nextToken(), array( - 'left', 'right', - )) - ) { - $savePoint2 = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'outer', - )) - ) { - $this->index = $savePoint2; - } - } else { - $this->index = $savePoint; - } - if ($this->isIdentifierWithValue($this->nextToken(), 'join') && - $this->parseTableFactor() - ) { - return true; - } - - } - $this->index = $savePoint; - return false; - } - - /** - * (ON expression) | (USING_SYM column_list) - * - * @return bool - */ - private function parseJoinCondition() { - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'on') && $this->parseExpression()) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'using') && $this->parseColumnList()) { - return true; - } - $this->index = $savePoint; - return false; - } - - /** - * @return bool - */ - private function parseTableSpec() { - $savePoint = $this->index; - $lastComponent = $savePoint; - $components = 0; - while (($token = $this->nextToken()) !== false) { - if ($this->isValidIdentifier($token)) { - $lastComponent = $this->index; - $next = $this->nextToken(); - if ($this->isTokenOfType($next, wfWAFSQLiLexer::DOT)) { - $components++; - } - elseif ($this->isTokenOfType($next, wfWAFSQLiLexer::REAL_NUMBER_LITERAL)) { - $next = $this->nextToken(); - if ($this->isTokenOfType($next, wfWAFSQLiLexer::UNQUOTED_IDENTIFIER) && in_array($next->getValue(), array('e', 'E')) && $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::DOT)) { - $components++; - } - else { - break; - } - } - elseif ($components > 0 || $this->isValidNonReservedWordIdentifier($token)) { - $this->index = $lastComponent; - return true; - } - else { - break; - } - } - else if ($this->isTokenOfType($token, wfWAFSQLiLexer::ASTERISK)) { - $this->index = $lastComponent; - return true; - } - else { - break; - } - } - $this->index = $savePoint; - return false; - } - - /** - * @return bool - */ - private function parseAlias() { - $savePoint = $this->index; - $token = $this->nextToken(); - if ($this->isIdentifierWithValue($token, 'as')) { - $token = $this->nextToken(); - } - if ($this->isValidNonReservedWordIdentifier($token)) { - return true; - } - $this->index = $savePoint; - return false; - } - - /** - * @return bool - */ - private function parseIndexHintList() { - $startPoint = $this->index; - $hasHints = false; - while ($this->parseIndexHint()) { - $hasHints = true; - $savePoint = $this->index; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $this->index = $savePoint; - break; - } - } - if ($hasHints) { - return true; - } - $this->index = $startPoint; - return false; - } - - /** - * @return bool - */ - private function parseIndexHint() { - // USE_SYM index_options LPAREN (index_list)? RPAREN - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'use') && - $this->parseIndexOptions() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) - ) { - $this->parseIndexList(); - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $savePoint; - - // IGNORE_SYM index_options LPAREN index_list RPAREN - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'ignore') && - $this->parseIndexOptions() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parseIndexList() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - - // FORCE_SYM index_options LPAREN index_list RPAREN - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'force') && - $this->parseIndexOptions() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) && - $this->parseIndexList() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - - return false; - } - - /** - * (INDEX_SYM | KEY_SYM) ( FOR_SYM ((JOIN_SYM) | (ORDER_SYM BY_SYM) | (GROUP_SYM BY_SYM)) )? - * - * @return bool - */ - private function parseIndexOptions() { - $savePoint = $this->index; - $token = $this->nextToken(); - if ($this->isIdentifierWithValue($token, 'index') || - $this->isIdentifierWithValue($token, 'key') - ) { - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'for')) { - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'join')) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'order') && - $this->isIdentifierWithValue($this->nextToken(), 'by') - ) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'group') && - $this->isIdentifierWithValue($this->nextToken(), 'by') - ) { - return true; - } - $this->index = $savePoint; - - return true; - } - $this->index = $savePoint; - return true; - } - $this->index = $savePoint; - return false; - } - - private function parseIndexList() { - $startPoint = $this->index; - $hasIndex = false; - while ($this->parseIndexName()) { - $hasIndex = true; - $savePoint = $this->index; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $this->index = $savePoint; - break; - } - } - if ($hasIndex) { - return true; - } - $this->index = $startPoint; - return false; - } - - private function parseIndexName() { - $startPoint = $this->index; - $token = $this->nextToken(); - if ($this->isValidNonReservedWordIdentifier($token)) { - return true; - } - $this->index = $startPoint; - return false; - } - - /** - * LPAREN column_spec (COMMA column_spec)* RPAREN - * - * @return bool - */ - private function parseColumnList() { - $startPoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS)) { - $hasColumn = false; - while ($this->parseColumnSpec()) { - $hasColumn = true; - $savePoint = $this->index; - if (!$this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $this->index = $savePoint; - break; - } - } - if ($hasColumn && $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $startPoint; - return false; - } - - private function parseWhere() { - $startIndex = $this->index; - $token = $this->nextToken(); - if ($this->isIdentifierWithValue($token, 'where')) { - if ($this->parseExpression()) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - private function parseProcedure() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'PROCEDURE') && - $this->isIdentifierWithValue($this->nextToken(), 'ANALYSE') && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS) - ) { - $savePoint = $this->index; - if ($this->parseExpression()) { - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA) && - $this->parseExpression() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS) - ) { - return true; - } - $this->index = $savePoint; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $savePoint; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * GROUP_SYM BY_SYM groupby_item (COMMA groupby_item)* (WITH ROLLUP_SYM)? - * - * @return bool - */ - private function parseGroupBy() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'group') && - $this->isIdentifierWithValue($this->nextToken(), 'by') - ) { - $hasItems = false; - while ($this->parseGroupByItem()) { - $hasItems = true; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - continue; - } - $this->index--; - break; - } - if ($hasItems) { - $savePoint = $this->index; - if (!($this->isIdentifierWithValue($this->nextToken(), 'with') && - $this->isIdentifierWithValue($this->nextToken(), 'rollup')) - ) { - $this->index = $savePoint; - } - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * column_spec | INTEGER_NUM | bit_expr ; - * - * @return bool - */ - private function parseGroupByItem() { - $startIndex = $this->index; - if ($this->parseBitExpression()) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * HAVING expression - * - * @return bool - */ - private function parseHaving() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'having') - && $this->parseExpression() - ) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * ORDER_SYM BY_SYM orderby_item (COMMA orderby_item)* - * - * @return bool - */ - private function parseOrderBy() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'order') && - $this->isIdentifierWithValue($this->nextToken(), 'by') - ) { - $hasItems = false; - while ($this->parseOrderByItem()) { - $hasItems = true; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - continue; - } - $this->index--; - break; - } - if ($hasItems) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * groupby_item (ASC | DESC)? ; - * - * @return bool - */ - private function parseOrderByItem() { - $startIndex = $this->index; - if ($this->parseGroupByItem()) { - $savePoint = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'asc', 'desc', - )) - ) { - $this->index = $savePoint; - } - return true; - } - $this->index = $startIndex; - return false; - } - - private function parseLimit() { - // LIMIT ((offset COMMA)? row_count) | (row_count OFFSET_SYM offset) - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'limit') && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::INTEGER_LITERAL) - ) { - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA) && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::INTEGER_LITERAL) - ) { - return true; - } - $this->index = $savePoint; - - $savePoint = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'offset') && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::INTEGER_LITERAL) - ) { - return true; - } - $this->index = $savePoint; - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * @link http://dev.mysql.com/doc/refman/5.6/en/insert.html - * @return bool - */ - private function parseInsertStatement() { - $startIndex = $this->index; - if ($this->parseInsertStatement1() || - $this->parseInsertStatement2() || - $this->parseInsertStatement3() - ) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * insert_header - * (column_list)? - * value_list_clause - * ( insert_subfix )? - * - * @return bool - */ - private function parseInsertStatement1() { - $startIndex = $this->index; - if ($this->parseInsertHeader()) { - $this->parseColumnList(); - if ($this->parseValueListClause()) { - $this->parseInsertSubfix(); - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * insert_header - * set_columns_cluase - * ( insert_subfix )? - * - * @return bool - */ - private function parseInsertStatement2() { - $startIndex = $this->index; - if ($this->parseInsertHeader() && $this->parseSetColumnsClause()) { - $this->parseInsertSubfix(); - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * insert_header - * (column_list)? - * select_expression - * ( insert_subfix )? - * - * @return bool - */ - private function parseInsertStatement3() { - $startIndex = $this->index; - if ($this->parseInsertHeader()) { - $this->parseColumnList(); - if ($this->parseSelectStatement()) { - $this->parseInsertSubfix(); - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * INSERT (LOW_PRIORITY | HIGH_PRIORITY)? (IGNORE_SYM)? - * (INTO)? table_spec - * (partition_clause)? - * - * @return bool - */ - private function parseInsertHeader() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'insert')) { - $savePoint = $this->index; - // (LOW_PRIORITY | HIGH_PRIORITY)? - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'LOW_PRIORITY', 'HIGH_PRIORITY' - )) - ) { - $this->index = $savePoint; - } - - // (IGNORE_SYM)? - $savePoint = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'IGNORE' - )) - ) { - $this->index = $savePoint; - } - - // (INTO)? - $savePoint = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), array( - 'into' - )) - ) { - $this->index = $savePoint; - } - - // table_spec - if ($this->parseTableSpec()) { - $savePoint = $this->index; - // (partition_clause)? - if (!$this->parsePartitionClause()) { - $this->index = $savePoint; - } - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * (VALUES | VALUE_SYM) column_value_list (COMMA column_value_list)*; - * - * @return bool - */ - private function parseValueListClause() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), array( - 'value', 'values', - )) - ) { - $hasValues = false; - while ($this->parseColumnValueList()) { - $hasValues = true; - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $hasValues = false; - continue; - } - $this->index = $savePoint; - break; - } - if ($hasValues) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * LPAREN (bit_expr|DEFAULT) (COMMA (bit_expr|DEFAULT) )* RPAREN ; - * - * @return bool - */ - private function parseColumnValueList() { - $startIndex = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::OPEN_PARENTHESIS)) { - $hasValues = false; - while (true) { - $savePoint = $this->index; - if (!$this->parseBitExpression() && !$this->isIdentifierWithValue($this->nextToken(), 'DEFAULT')) { - $this->index = $savePoint; - break; - } - $hasValues = true; - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $hasValues = false; - continue; - } - $this->index = $savePoint; - break; - } - if ($hasValues && $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::CLOSE_PARENTHESIS)) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - private function parseInsertSubfix() { - // ON DUPLICATE_SYM KEY_SYM UPDATE column_spec EQ_SYM expression (COMMA column_spec EQ_SYM expression)* - $startIndex = $this->index; - if ( - $this->isIdentifierWithValue($this->nextToken(), 'on') && - $this->isIdentifierWithValue($this->nextToken(), 'duplicate') && - $this->isIdentifierWithValue($this->nextToken(), 'key') && - $this->isIdentifierWithValue($this->nextToken(), 'update') - ) { - $hasValues = false; - while (true) { - $savePoint = $this->index; - if ($this->parseColumnSpec() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::EQUALS_SYMBOL) && - $this->parseExpression() - ) { - $hasValues = true; - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $hasValues = false; - continue; - } - $this->index = $savePoint; - break; - } - $this->index = $savePoint; - break; - } - if ($hasValues) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * SET_SYM set_column_cluase ( COMMA set_column_cluase )*; - * - * @return bool - */ - private function parseSetColumnsClause() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'set')) { - $hasValues = true; - while ($this->parseSetColumnClause()) { - $hasValues = true; - $savePoint = $this->index; - if ($this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::COMMA)) { - $hasValues = false; - continue; - } - $this->index = $savePoint; - break; - } - if ($hasValues) { - return true; - } - } - $this->index = $startIndex; - return false; - } - - /** - * column_spec EQ_SYM (expression|DEFAULT) ; - * - * @return bool - */ - private function parseSetColumnClause() { - $startIndex = $this->index; - if ($this->parseColumnSpec() && - $this->isTokenOfType($this->nextToken(), wfWAFSQLiLexer::EQUALS_SYMBOL) && - ($this->parseExpression() || $this->isIdentifierWithValue($this->nextToken(), 'default')) - ) { - return true; - } - $this->index = $startIndex; - return false; - } - - /** - * UPDATE (LOW_PRIORITY)? (IGNORE_SYM)? table_reference - * set_columns_cluase - * (where_clause)? - * (orderby_clause)? - * (limit_clause)? - * | - * UPDATE (LOW_PRIORITY)? (IGNORE_SYM)? table_references - * set_columns_cluase - * (where_clause)? - * - * @return bool - */ - private function parseUpdateStatement() { - $startIndex = $this->index; - if ($this->isIdentifierWithValue($this->nextToken(), 'update')) { - $savePoint = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), 'LOW_PRIORITY')) { - $this->index = $savePoint; - } - - $savePoint = $this->index; - if (!$this->isIdentifierWithValue($this->nextToken(), 'ignore')) { - $this->index = $savePoint; - } - - if ($this->parseTableReferences() && $this->parseSetColumnsClause()) { - $this->parseWhere(); - $this->parseOrderBy(); - $this->parseLimit(); - return true; - } - } - $this->index = $startIndex; - return false; - - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isIdentifier($token) { - return $token && ($token->getType() === wfWAFSQLiLexer::QUOTED_IDENTIFIER || $token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER); - } - - /** - * @param wfWAFLexerToken $token - * @param string|array $value - * @return bool - */ - private function isIdentifierWithValue($token, $value) { - return $token && $token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER && - (is_array($value) ? in_array($token->getLowerCaseValue(), array_map('wfWAFUtils::strtolower', $value)) : - $token->getLowerCaseValue() === wfWAFUtils::strtolower($value)); - } - - /** - * @param wfWAFLexerToken $token - * @param mixed $type - * @return bool - */ - protected function isTokenOfType($token, $type) { - if (is_array($type)) { - return $token && in_array($token->getType(), $type); - } - return $token && $token->getType() === $type; - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isNotSymbolToken($token) { - return $token && - ( - ($token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER && $token->getLowerCaseValue() === 'not') || - ($token->getType() === wfWAFSQLiLexer::EXPR_NOT) - ); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isKeywordToken($token) { - return $token && $token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER && - in_array($token->getUpperCaseValue(), $this->keywords); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isReservedWordToken($token) { - return $token && $token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER && - in_array($token->getUpperCaseValue(), $this->reservedWords); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isValidNonKeywordIdentifier($token) { - return $token && ( - $token->getType() === wfWAFSQLiLexer::QUOTED_IDENTIFIER || - ($token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER && !$this->isKeywordToken($token)) - ); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isValidNonReservedWordIdentifier($token) { - return $token && ( - $token->getType() === wfWAFSQLiLexer::QUOTED_IDENTIFIER || - ($token->getType() === wfWAFSQLiLexer::UNQUOTED_IDENTIFIER && !$this->isReservedWordToken($token)) - ); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isValidIdentifier($token) { - return $this->isTokenOfType($token, array( - wfWAFSQLiLexer::QUOTED_IDENTIFIER, - wfWAFSQLiLexer::UNQUOTED_IDENTIFIER - )); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isOrToken($token) { - return $token && ($this->isIdentifierWithValue($token, 'or') || $this->isTokenOfType($token, wfWAFSQLiLexer::EXPR_OR)); - } - - /** - * @param wfWAFLexerToken $token - * @return bool - */ - private function isAndToken($token) { - return $token && ($this->isIdentifierWithValue($token, 'and') || $this->isTokenOfType($token, wfWAFSQLiLexer::EXPR_AND)); - } - - /** - * @return string - */ - public function getSubject() { - return $this->subject; - } - - /** - * @param string $subject - */ - public function setSubject($subject) { - $this->subject = $subject; - $this->setTokens(array()); - $this->lexer->setSQL($this->subject); - } - - /** - * @return int - */ - public function getFlags() { - return $this->flags; - } - - /** - * @param int $flags - */ - public function setFlags($flags) { - $this->flags = $flags; - $this->lexer->setFlags($this->flags); - } -} - - -class wfWAFSQLiLexer implements wfWAFLexerInterface { - - const FLAG_TOKENIZE_MYSQL_PORTABLE_COMMENTS = 0x1; - - const UNQUOTED_IDENTIFIER = 'UNQUOTED_IDENTIFIER'; - const VARIABLE = 'VARIABLE'; - const QUOTED_IDENTIFIER = 'QUOTED_IDENTIFIER'; - const DOUBLE_STRING_LITERAL = 'DOUBLE_STRING_LITERAL'; - const SINGLE_STRING_LITERAL = 'SINGLE_STRING_LITERAL'; - const INTEGER_LITERAL = 'INTEGER_LITERAL'; - const REAL_NUMBER_LITERAL = 'REAL_NUMBER_LITERAL'; - const BINARY_NUMBER_LITERAL = 'BINARY_NUMBER_LITERAL'; - const HEX_NUMBER_LITERAL = 'HEX_NUMBER_LITERAL'; - const DOT = 'DOT'; - const OPEN_PARENTHESIS = 'OPEN_PARENTHESIS'; - const CLOSE_PARENTHESIS = 'CLOSE_PARENTHESIS'; - const OPEN_BRACKET = 'OPEN_BRACKET'; - const CLOSE_BRACKET = 'CLOSE_BRACKET'; - const COMMA = 'COMMA'; - const EXPR_OR = 'EXPR_OR'; - const EXPR_AND = 'EXPR_AND'; - const EXPR_NOT = 'EXPR_NOT'; - const BIT_AND = 'BIT_AND'; - const BIT_LEFT_SHIFT = 'BIT_LEFT_SHIFT'; - const BIT_RIGHT_SHIFT = 'BIT_RIGHT_SHIFT'; - const BIT_XOR = 'BIT_XOR'; - const BIT_INVERSION = 'BIT_INVERSION'; - const BIT_OR = 'BIT_OR'; - const PLUS = 'PLUS'; - const MINUS = 'MINUS'; - const ASTERISK = 'ASTERISK'; - const DIVISION = 'DIVISION'; - const MOD = 'MOD'; - const ARROW = 'ARROW'; - const EQUALS_SYMBOL = 'EQUALS_SYMBOL'; - const NOT_EQUALS = 'NOT_EQUALS'; - const LESS_THAN = 'LESS_THAN'; - const GREATER_THAN = 'GREATER_THAN'; - const LESS_THAN_EQUAL_TO = 'LESS_THAN_EQUAL_TO'; - const GREATER_THAN_EQUAL_TO = 'GREATER_THAN_EQUAL_TO'; - const SET_VAR = 'SET_VAR'; - const RIGHT_BRACKET = 'RIGHT_BRACKET'; - const LEFT_BRACKET = 'LEFT_BRACKET'; - const SEMICOLON = 'SEMICOLON'; - const COLON = 'COLON'; - const MYSQL_PORTABLE_COMMENT_START = 'MYSQL_PORTABLE_COMMENT_START'; - const MYSQL_PORTABLE_COMMENT_END = 'MYSQL_PORTABLE_COMMENT_END'; - const SINGLE_LINE_COMMENT = 'SINGLE_LINE_COMMENT'; - const MULTI_LINE_COMMENT = 'MULTI_LINE_COMMENT'; - /** - * @var int - */ - private $flags; - private $tokenMatchers; - private $hasPortableCommentStart = false; - - public static function getLexerTokenMatchers() { - static $tokenMatchers; - if ($tokenMatchers === null) { - $tokenMatchers = array( - new wfWAFLexerTokenMatcher(self::REAL_NUMBER_LITERAL, '/^(?:[0-9]+\\.[0-9]+|[0-9]+\\.|\\.[0-9]+|[Ee][\\+\\-][0-9]+)/'), - new wfWAFLexerTokenMatcher(self::BINARY_NUMBER_LITERAL, '/^(?:0b[01]+|[bB]\'[01]+\')/', true), - new wfWAFLexerTokenMatcher(self::HEX_NUMBER_LITERAL, '/^(?:0x[0-9a-fA-F]+|[xX]\'[0-9a-fA-F]+\')/', true), - new wfWAFLexerTokenMatcher(self::INTEGER_LITERAL, '/^[0-9]+/', true), - new wfWAFLexerTokenMatcher(self::VARIABLE, '/^(?:@(?:`(?:[^`]*(?:``[^`]*)*)`| -"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"| -\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'| -[a-zA-Z_\\$\\.]+| -@[a-zA-Z_\\$][a-zA-Z_\\$0-9]{0,256}){0,1}) -/Asx'), - new wfWAFLexerTokenMatcher(self::QUOTED_IDENTIFIER, '/^`(?:[^`]*(?:``[^`]*)*)`/As'), - new wfWAFLexerTokenMatcher(self::DOUBLE_STRING_LITERAL, '/^(?:[nN]|_[0-9a-zA-Z\\$_]{0,256})?"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"/As'), - new wfWAFLexerTokenMatcher(self::SINGLE_STRING_LITERAL, '/^(?:[nN]|_[0-9a-zA-Z\\$_]{0,256})?\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As'), - // U+0080 .. U+FFFF - new wfWAFLexerTokenMatcher(self::UNQUOTED_IDENTIFIER, '/^[0-9a-zA-Z\\$_\\x{0080}-\\x{FFFF}]{1,256}/u'), - new wfWAFLexerTokenMatcher(self::MYSQL_PORTABLE_COMMENT_START, '/^\\/\\*\\![0-9]{0,5}/s'), - new wfWAFLexerTokenMatcher(self::MYSQL_PORTABLE_COMMENT_END, '/^\\*\\//s'), - new wfWAFLexerTokenMatcher(self::SINGLE_LINE_COMMENT, '/^(?:#[^\n]*|--(?:[ \t\r][^\n]*|[\n]))/'), - new wfWAFLexerTokenMatcher(self::MULTI_LINE_COMMENT, '/^\\/\\*.*?\\*\\//s'), - new wfWAFLexerTokenMatcher(self::DOT, '/^\\./'), - new wfWAFLexerTokenMatcher(self::OPEN_PARENTHESIS, '/^\\(/'), - new wfWAFLexerTokenMatcher(self::CLOSE_PARENTHESIS, '/^\\)/'), - new wfWAFLexerTokenMatcher(self::OPEN_BRACKET, '/^\\{/'), - new wfWAFLexerTokenMatcher(self::CLOSE_BRACKET, '/^\\}/'), - new wfWAFLexerTokenMatcher(self::COMMA, '/^,/'), - new wfWAFLexerTokenMatcher(self::EXPR_OR, '/^\\|\\|/'), - new wfWAFLexerTokenMatcher(self::EXPR_AND, '/^&&/'), - new wfWAFLexerTokenMatcher(self::BIT_LEFT_SHIFT, '/^\\<\\</'), - new wfWAFLexerTokenMatcher(self::BIT_RIGHT_SHIFT, '/^\\>\\>/'), - new wfWAFLexerTokenMatcher(self::EQUALS_SYMBOL, '/^(?:\\=|\\<\\=\\>)/'), - new wfWAFLexerTokenMatcher(self::ARROW, '/^\\=\\>/'), - new wfWAFLexerTokenMatcher(self::LESS_THAN_EQUAL_TO, '/^\\<\\=/'), - new wfWAFLexerTokenMatcher(self::GREATER_THAN_EQUAL_TO, '/^\\>\\=/'), - new wfWAFLexerTokenMatcher(self::NOT_EQUALS, '/^(?:\\<\\>|(?:\\!|\\~|\\^)\\=)/'), - new wfWAFLexerTokenMatcher(self::LESS_THAN, '/^\\</'), - new wfWAFLexerTokenMatcher(self::GREATER_THAN, '/^\\>/'), - new wfWAFLexerTokenMatcher(self::SET_VAR, '/^:\\=/'), - new wfWAFLexerTokenMatcher(self::BIT_XOR, '/^\\^/'), - new wfWAFLexerTokenMatcher(self::BIT_INVERSION, '/^\\~/'), - new wfWAFLexerTokenMatcher(self::BIT_OR, '/^\\|/'), - new wfWAFLexerTokenMatcher(self::PLUS, '/^\\+/'), - new wfWAFLexerTokenMatcher(self::MINUS, '/^\\-/'), - new wfWAFLexerTokenMatcher(self::ASTERISK, '/^\\*/'), - new wfWAFLexerTokenMatcher(self::DIVISION, '/^\\//'), - new wfWAFLexerTokenMatcher(self::MOD, '/^%/'), - new wfWAFLexerTokenMatcher(self::EXPR_NOT, '/^\\!/'), - new wfWAFLexerTokenMatcher(self::BIT_AND, '/^&/'), - new wfWAFLexerTokenMatcher(self::RIGHT_BRACKET, '/^\\]/'), - new wfWAFLexerTokenMatcher(self::LEFT_BRACKET, '/^\\[/'), - new wfWAFLexerTokenMatcher(self::SEMICOLON, '/^;/'), - new wfWAFLexerTokenMatcher(self::COLON, '/^:/'), - ); - } - return $tokenMatchers; - } - - /** - * @var string - */ - private $sql; - - /** - * @var wfWAFStringScanner - */ - private $scanner; - - /** - * wfWAFRuleLexer constructor. - * @param $sql - * @param int $flags - */ - public function __construct($sql = null, $flags = 0) { - $this->scanner = new wfWAFStringScanner(); - $this->tokenMatchers = self::getLexerTokenMatchers(); - $this->setSQL($sql); - $this->setFlags($flags); - } - - /** - * @return array - * @throws wfWAFParserSyntaxError - */ - public function tokenize() { - $tokens = array(); - while ($token = $this->nextToken()) { - $tokens[] = $token; - } - return $tokens; - } - - /** - * @return bool|wfWAFLexerToken - * @throws wfWAFParserSyntaxError - */ - public function nextToken() { - if (!$this->scanner->eos()) { - /** @var wfWAFLexerTokenMatcher $tokenMatcher */ - foreach ($this->tokenMatchers as $tokenMatcher) { - $this->scanner->skip('/^\s+/s'); - if ($this->scanner->eos()) { - return false; - } - - if (($this->flags & self::FLAG_TOKENIZE_MYSQL_PORTABLE_COMMENTS) === 0 && - ($tokenMatcher->getTokenID() === self::MYSQL_PORTABLE_COMMENT_START || - $tokenMatcher->getTokenID() === self::MYSQL_PORTABLE_COMMENT_END) - ) { - continue; - } - if (!$this->hasPortableCommentStart && $tokenMatcher->getTokenID() === self::MYSQL_PORTABLE_COMMENT_END) { - continue; - } - - if ($tokenMatcher->useMaximalMunch() && ($match = $this->scanner->check($tokenMatcher->getMatch())) !== null) { - $biggestToken = $this->createToken($tokenMatcher->getTokenID(), $match); - /** @var wfWAFLexerTokenMatcher $tokenMatcher2 */ - foreach ($this->tokenMatchers as $tokenMatcher2) { - if ($tokenMatcher === $tokenMatcher2) { - continue; - } - if (($match2 = $this->scanner->check($tokenMatcher2->getMatch())) !== null) { - $biggestToken2 = $this->createToken($tokenMatcher2->getTokenID(), $match2); - if (wfWAFUtils::strlen($biggestToken2->getValue()) > wfWAFUtils::strlen($biggestToken->getValue())) { - $biggestToken = $biggestToken2; - } - } - } - $this->scanner->advancePointer(wfWAFUtils::strlen($biggestToken->getValue())); - return $biggestToken; - - } else if (($match = $this->scanner->scan($tokenMatcher->getMatch())) !== null) { - $token = $this->createToken($tokenMatcher->getTokenID(), $match); - if ($tokenMatcher->getTokenID() === self::MYSQL_PORTABLE_COMMENT_START) { - $this->hasPortableCommentStart = true; - } else if ($tokenMatcher->getTokenID() === self::MYSQL_PORTABLE_COMMENT_END) { - $this->hasPortableCommentStart = false; - } - return $token; - } - } - $char = $this->scanner->scanChar(); - $e = new wfWAFParserSyntaxError(sprintf('Invalid character "%s" (\x%02x) found on line %d, column %d', - $char, ord($char), $this->scanner->getLine(), $this->scanner->getColumn())); - $e->setParseLine($this->scanner->getLine()); - $e->setParseColumn($this->scanner->getColumn()); - throw $e; - } - return false; - } - - public function hasMoreTokens() { - - } - - /** - * @param $type - * @param $value - * @return wfWAFLexerToken - */ - protected function createToken($type, $value) { - return new wfWAFLexerToken($type, $value, $this->scanner->getLine(), $this->scanner->getColumn()); - } - - /** - * @return string - */ - public function getSQL() { - return $this->sql; - } - - /** - * @param string $sql - */ - public function setSQL($sql) { - if (is_string($sql)) { - $this->scanner->setString($sql); - } - $this->sql = $sql; - } - - /** - * @return int - */ - public function getFlags() { - return $this->flags; - } - - /** - * @param int $flags - */ - public function setFlags($flags) { - $this->flags = $flags; - } - - /** - * Check if the given token type represents a literal value - * @param $type the token type - * @return bool true if the provided type is a value literal, false otherwise - */ - public function isValueLiteral($type){ - switch($type){ - case self::DOUBLE_STRING_LITERAL: - case self::SINGLE_STRING_LITERAL: - case self::INTEGER_LITERAL: - case self::REAL_NUMBER_LITERAL: - case self::BINARY_NUMBER_LITERAL: - case self::HEX_NUMBER_LITERAL: - case self::COMMA: - return true; - default: - return false; - } - } - -} - -class wfWAFLexerTokenMatcher { - /** - * @var mixed - */ - private $tokenID; - /** - * @var string - */ - private $match; - /** - * @var bool - */ - private $useMaximalMunch; - - - /** - * @param mixed $tokenID - * @param string $match - * @param bool $useMaximalMunch - */ - public function __construct($tokenID, $match, $useMaximalMunch = false) { - $this->tokenID = $tokenID; - $this->match = $match; - $this->useMaximalMunch = $useMaximalMunch; - } - - /** - * @return bool - */ - public function useMaximalMunch() { - return $this->useMaximalMunch; - } - - /** - * @return mixed - */ - public function getTokenID() { - return $this->tokenID; - } - - /** - * @param mixed $tokenID - */ - public function setTokenID($tokenID) { - $this->tokenID = $tokenID; - } - - /** - * @return string - */ - public function getMatch() { - return $this->match; - } - - /** - * @param string $match - */ - public function setMatch($match) { - $this->match = $match; - } -} -} diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/request.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/request.php deleted file mode 100644 index 6f0cd728..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/request.php +++ /dev/null @@ -1,1261 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -interface wfWAFRequestInterface { - - public function getBody(); - - public function getRawBody(); - - public function getMd5Body(); - - public function getJsonBody(); - - public function getQueryString(); - - public function getMd5QueryString(); - - public function getHeaders(); - - public function getCookies(); - - public function getFiles(); - - public function getFileNames(); - - public function getHost(); - - public function getURI(); - - public function setMetadata($metadata); - public function getMetadata(); - - public function getPath(); - - public function getIP(); - - public function getMethod(); - - public function getProtocol(); - - public function getAuth(); - - public function getTimestamp(); - - public function __toString(); - -} - -abstract class wfCookieRedactor { - - const REDACTION_MESSAGE = '[redacted]'; - - public abstract function redact(&$name, &$value); - - public static function load() { - $patterns = null; - $waf = wfWAF::getInstance(); - if ($waf !== null) { - $patterns = $waf->getCookieRedactionPatterns(); - } - if ($patterns === null) { - return new wfGlobalCookieRedactor(); - } - else { - return new wfPatternCookieRedactor($waf->getCookieRedactionPatterns()); - } - } - - public static function loadFromWaf() { - return new self($patterns); - } - - public static function getEncodedRedactionMessage() { - static $encoded = null; - if ($encoded === null) - $encoded = urlencode(self::REDACTION_MESSAGE); - return $encoded; - } - -} - -class wfGlobalCookieRedactor extends wfCookieRedactor { - - public function redact(&$name, &$value) { - $name = self::getEncodedRedactionMessage(); - $value = self::REDACTION_MESSAGE; - } - -} - -class wfPatternCookieRedactor extends wfCookieRedactor { - - private $patterns; - - public function __construct($patterns) { - $this->patterns = $patterns; - } - - private static function replaceName($matches) { - if (count($matches) < 2) - return self::getEncodedRedactionMessage(); - $name = $matches[0][0]; - $redacted = array(); - $position = 0; - for ($i = 1; $i < count($matches); $i++) { - $retained = $matches[$i][0]; - $retainedStart = $matches[$i][1]; - $retainedLength = strlen($retained); - if ($retainedStart > $position) - $redacted[] = self::getEncodedRedactionMessage(); - $redacted[] = $retained; - $position = $retainedStart + $retainedLength; - } - if ($position < strlen($name)) - $redacted []= self::getEncodedRedactionMessage(); - return implode('', $redacted); - } - - /** - * TODO: Remove this fallback support for PHP versions earlier than 7.4 is no longer required - */ - private static function replaceNameFallback($matches) { - $completeMatch = array_shift($matches); - $completeRetained = implode('', $matches); - if ($completeMatch === $completeRetained) - return $completeRetained; - $matches[] = ''; - return implode(self::getEncodedRedactionMessage(), $matches); - } - - public function redact(&$name, &$value) { - $pregOffsetCaptureSupported = version_compare(PHP_VERSION, '7.4.0', '>='); - $nameCallback = array($this, $pregOffsetCaptureSupported ? 'replaceName' : 'replaceNameFallback'); - foreach ($this->patterns as $namePattern => $valuePatterns) { - if ($pregOffsetCaptureSupported) { - $nameRedacted = preg_replace_callback($namePattern, $nameCallback, $name, 1, $matchCount, PREG_OFFSET_CAPTURE); - } - else { - $nameRedacted = preg_replace_callback($namePattern, $nameCallback, $name, 1, $matchCount); - } - if ($matchCount === 1 && $nameRedacted !== null) { - $name = $nameRedacted; - if ($valuePatterns === null) - return; - if (is_string($valuePatterns)) - $valuePatterns = array($valuePatterns); - if (is_array($valuePatterns)) { - $valueMatched = false; - foreach ($valuePatterns as $valuePattern) { - if (preg_match($valuePattern, $value) === 1) { - $valueMatched = true; - break; - } - } - if (!$valueMatched) - return; - } - $value = self::REDACTION_MESSAGE; - break; - } - } - } - -} - -class wfWAFRequest implements wfWAFRequestInterface { - - /** - * @param string $requestString - * @return wfWAFRequest - */ - public static function parseString($requestString) { - if (!is_string($requestString)) { - throw new InvalidArgumentException(__METHOD__ . ' expects a string for first parameter, recieved ' . gettype($requestString)); - } - - if (version_compare(phpversion(), '5.3.0') > 0) { - $class = get_called_class(); - $request = new $class(); - } else { - $request = new self(); - } - - $request->setAuth(array()); - $request->setBody(array()); - $request->setMd5Body(array()); - $request->setCookies(array()); - $request->setFileNames(array()); - $request->setFiles(array()); - $request->setHeaders(array()); - $request->setHost(''); - $request->setIP(''); - $request->setMethod(''); - $request->setPath(''); - $request->setProtocol(''); - $request->setQueryString(array()); - $request->setMd5QueryString(array()); - $request->setTimestamp(''); - $request->setURI(''); - $request->setMetadata(array()); - - list($headersString, $bodyString) = explode("\n\n", $requestString, 2); - $headersString = trim($headersString); - $bodyString = trim($bodyString); - - if (defined('WFWAF_DISABLE_RAW_BODY') && WFWAF_DISABLE_RAW_BODY) { - $request->setRawBody(''); - } - else { - $request->setRawBody($bodyString); - } - - $headers = explode("\n", $headersString); - // Assume first is method - if (preg_match('/^([a-z]+) (.*?) HTTP\/1.[0-9]/i', $headers[0], $matches)) { - $request->setMethod($matches[1]); - $uri = $matches[2]; - $request->setUri($uri); - if (($pos = wfWAFUtils::strpos($uri, '?')) !== false) { - $queryString = wfWAFUtils::substr($uri, $pos + 1); - parse_str($queryString, $queryStringArray); - $request->setQueryString($queryStringArray); - - $path = wfWAFUtils::substr($uri, 0, $pos); - $request->setPath($path); - } else { - $request->setPath($uri); - } - } - $kvHeaders = array(); - for ($i = 1; $i < count($headers); $i++) { - $headerString = $headers[$i]; - list($header, $headerValue) = explode(':', $headerString, 2); - $header = trim($header); - $headerValue = trim($headerValue); - $kvHeaders[$header] = $headerValue; - - switch (wfWAFUtils::strtolower($header)) { - case 'authorization': - if (preg_match('/basic ([A-Za-z0-9\+\/=]+)/i', $headerValue, $matches)) { - list($authUser, $authPass) = explode(':', base64_decode($matches[1]), 2); - $auth['user'] = $authUser; - $auth['password'] = $authPass; - $request->setAuth($auth); - } - break; - - case 'host': - $request->setHost($headerValue); - break; - - case 'cookie': - $cookieArray = array(); - $cookies = str_replace('&', '%26', $headerValue); - $cookies = preg_replace('/\s*;\s*/', '&', $cookies); - parse_str($cookies, $cookieArray); - $request->setCookies($cookieArray); - break; - } - - } - $request->setHeaders($kvHeaders); - - if (wfWAFUtils::strlen($bodyString) > 0) { - if (preg_match('/^multipart\/form\-data; boundary=(.*?)$/i', $request->getHeaders('Content-Type'), $boundaryMatches)) { - $body = ''; - $files = array(); - $fileNames = array(); - - $boundary = $boundaryMatches[1]; - $bodyChunks = explode("--$boundary", $bodyString); - foreach ($bodyChunks as $chunk) { - if (!$chunk || $chunk == '--') { - continue; - } - - list($chunkHeaders, $chunkData) = explode("\n\n", $chunk, 2); - $chunkHeaders = explode("\n", $chunkHeaders); - $param = array( - 'value' => wfWAFUtils::substr($chunkData, 0, -1), - ); - foreach ($chunkHeaders as $chunkHeader) { - if (wfWAFUtils::strpos($chunkHeader, ':') !== false) { - list($chunkHeaderKey, $chunkHeaderValue) = explode(':', $chunkHeader, 2); - $chunkHeaderKey = trim($chunkHeaderKey); - $chunkHeaderValue = trim($chunkHeaderValue); - switch ($chunkHeaderKey) { - case 'Content-Disposition': - $dataAttributes = explode(';', $chunkHeaderValue); - foreach ($dataAttributes as $attr) { - $attr = trim($attr); - if (preg_match('/^name="(.*?)"$/i', $attr, $attrMatch)) { - $param['name'] = $attrMatch[1]; - continue; - } - if (preg_match('/^filename="(.*?)"$/i', $attr, $attrMatch)) { - $param['filename'] = $attrMatch[1]; - continue; - } - } - break; - case 'Content-Type': - $param['type'] = $chunkHeaderValue; - break; - } - } - } - if (array_key_exists('name', $param)) { - if (array_key_exists('filename', $param)) { - $files[$param['name']] = array( - 'name' => $param['filename'], - 'type' => $param['type'], - 'size' => wfWAFUtils::strlen($param['value']), - 'content' => $param['value'], - ); - $fileNames[$param['name']] = $param['filename']; - } else { - $body .= urlencode($param['name']) . '=' . urlencode($param['value']) . '&'; - } - } - } - - if ($body) { - parse_str($body, $postBody); - if (is_array($postBody)) { - $request->setBody($postBody); - } else { - $request->setBody($body); - } - } - if ($files) { - $request->setFiles($files); - } - if ($fileNames) { - $request->setFileNames($fileNames); - } - - } else { - parse_str($bodyString, $postBody); - if (is_array($postBody)) { - $request->setBody($postBody); - } else { - $request->setBody($bodyString); - } - } - } - - return $request; - } - - private static function extractFileProperty($key, $property) { - $extracted = array(); - if (is_array($property)) { - foreach ($property as $nestedKey => $value) { - $nestedKey = "{$key}[" . var_export($nestedKey, true) . ']'; - foreach (self::extractFileProperty($nestedKey, $value) as $nested) { - $extracted[] = $nested; - } - } - } - else if (is_string($property) || is_int($property)) { - $extracted[] = array( - $key, - $property - ); - } - return $extracted; - } - - private static function flattenFiles($files) { - $flat = array(); - foreach ($files as $baseKey => $file) { - foreach ($file as $property => $value) { - foreach (self::extractFileProperty($baseKey, $value) as $extracted) { - list($finalKey, $finalValue) = $extracted; - if (!array_key_exists($finalKey, $flat)) - $flat[$finalKey] = array(); - $flat[$finalKey][$property] = $finalValue; - } - } - } - return $flat; - } - - /** - * @param wfWAFRequest|null $request - * @return wfWAFRequest - */ - public static function createFromGlobals($request = null) { - if ($request === null) { - if (version_compare(phpversion(), '5.3.0') > 0) { - $class = get_called_class(); - $request = new $class(); - } else { - $request = new self(); - } - } - - $request->setAuth(array()); - $request->setCookies(array()); - $request->setFileNames(array()); - $request->setFiles(array()); - $request->setHeaders(array()); - $request->setHost(''); - $request->setIP(''); - $request->setMethod(''); - $request->setPath(''); - $request->setProtocol(''); - $request->setTimestamp(''); - $request->setURI(''); - $request->setMetadata(array()); - - $request->setBody(wfWAFUtils::stripMagicQuotes($_POST)); - if (defined('WFWAF_DISABLE_RAW_BODY') && WFWAF_DISABLE_RAW_BODY) { - $request->setRawBody(''); - } - else { - $rawBody=wfWAFUtils::rawPOSTBody(); - $request->setRawBody($rawBody); - } - - $request->setQueryString(wfWAFUtils::stripMagicQuotes($_GET)); - $request->setCookies(wfWAFUtils::stripMagicQuotes($_COOKIE)); - $request->setFiles(wfWAFUtils::stripMagicQuotes(self::flattenFiles($_FILES))); - - if (!empty($_FILES)) { - $fileNames = array(); - foreach ($_FILES as $input => $file) { - $fileNames[$input] = wfWAFUtils::stripMagicQuotes($file['name']); - } - $request->setFileNames($fileNames); - } - - if (is_array($_SERVER)) { //All of these depend on $_SERVER being non-null and an array - $auth = array(); - if (array_key_exists('PHP_AUTH_USER', $_SERVER)) { - $auth['user'] = wfWAFUtils::stripMagicQuotes($_SERVER['PHP_AUTH_USER']); - } - if (array_key_exists('PHP_AUTH_PW', $_SERVER)) { - $auth['password'] = wfWAFUtils::stripMagicQuotes($_SERVER['PHP_AUTH_PW']); - } - $request->setAuth($auth); - - if (array_key_exists('REQUEST_TIME_FLOAT', $_SERVER)) { - $timestamp = $_SERVER['REQUEST_TIME_FLOAT']; - } else if (array_key_exists('REQUEST_TIME', $_SERVER)) { - $timestamp = $_SERVER['REQUEST_TIME']; - } else { - $timestamp = time(); - } - $request->setTimestamp($timestamp); - - $headers = array(); - foreach ($_SERVER as $key => $value) { - if (wfWAFUtils::strpos($key, 'HTTP_') === 0) { - $header = wfWAFUtils::substr($key, 5); - $header = str_replace(array(' ', '_'), array('', ' '), $header); - $header = ucwords(wfWAFUtils::strtolower($header)); - $header = str_replace(' ', '-', $header); - $headers[$header] = wfWAFUtils::stripMagicQuotes($value); - } - } - if (array_key_exists('CONTENT_TYPE', $_SERVER)) { - $headers['Content-Type'] = wfWAFUtils::stripMagicQuotes($_SERVER['CONTENT_TYPE']); - } - if (array_key_exists('CONTENT_LENGTH', $_SERVER)) { - $headers['Content-Length'] = wfWAFUtils::stripMagicQuotes($_SERVER['CONTENT_LENGTH']); - } - $request->setHeaders($headers); - - $host = ''; - if (array_key_exists('Host', $headers)) { - $host = $headers['Host']; - } else if (array_key_exists('SERVER_NAME', $_SERVER)) { - $host = wfWAFUtils::stripMagicQuotes($_SERVER['SERVER_NAME']); - } - $request->setHost($host); - - $request->setMethod(array_key_exists('REQUEST_METHOD', $_SERVER) ? wfWAFUtils::stripMagicQuotes($_SERVER['REQUEST_METHOD']) : 'GET'); - $request->setProtocol((array_key_exists('HTTPS', $_SERVER) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'); - $request->setUri(array_key_exists('REQUEST_URI', $_SERVER) ? wfWAFUtils::stripMagicQuotes($_SERVER['REQUEST_URI']) : ''); - - $uri = parse_url($request->getURI()); - if (is_array($uri) && array_key_exists('path', $uri)) { - $path = $uri['path']; - } else { - $path = $request->getURI(); - } - $request->setPath($path); - } - - return $request; - } - - private $auth; - private $body; - private $rawBody; - private $md5Body; - private $jsonBody; - private $jsonParsed = false; - private $cookies; - private $fileNames; - private $files; - private $headers; - private $host; - private $ip; - private $method; - private $path; - private $protocol; - private $queryString; - private $md5QueryString; - private $timestamp; - private $uri; - private $metadata; - - private $highlightParamFormat; - private $highlightMatchFormat; - private $highlightMatches; - private $highlightMatchFilter = 'urlencode'; - - - protected function _arrayValueByKeys($global, $key) { - if (is_array($global)) { - if (is_array($key)) { - $_key = array_shift($key); - if (array_key_exists($_key, $global)) { - if (count($key) > 0) { - return $this->_arrayValueByKeys($global[$_key], $key); - } else { - return $global[$_key]; - } - } - } else { - return array_key_exists($key, $global) ? $global[$key] : null; - } - } - return null; - } - - public function getBody() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->body, $args); - } - return $this->body; - } - - public function getRawBody() { - return $this->rawBody; - } - - public function getMd5Body() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->md5Body, $args); - } - return $this->md5Body; - } - - public function getJsonBody() { - if ($this->jsonParsed === false) { - if (defined('WFWAF_DISABLE_RAW_BODY') && WFWAF_DISABLE_RAW_BODY) { - $this->setJsonBody(null); - } - else { - $this->setJsonBody(wfWAFUtils::json_decode($this->getRawBody(), true)); - } - } - return $this->jsonBody; - } - - public function getQueryString() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->queryString, $args); - } - return $this->queryString; - } - - public function getMd5QueryString() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->md5QueryString, $args); - } - return $this->md5QueryString; - } - - public function getHeaders() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->headers, $args); - } - return $this->headers; - } - - public function getCookies() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->cookies, $args); - } - return $this->cookies; - } - - /* - * Formats the provided cookie array (or $this->getCookies() if null) into a string - * and preserves arrays. - * - * The format is in "cookie1=value; cookie2=value, ..." - * - * @param array|null $cookies - * @param string|null $baseKey The base key used when recursing. - * @return string - */ - public function getCookieString($cookies = null, $baseKey = null, $preventRedaction = false, $redactor = null) { - if ($cookies == null) { - $cookies = $this->getCookies(); - } - $isAssoc = (array_keys($cookies) !== range(0, count($cookies) - 1)); - $cookieString = ''; - if ($redactor === null) - $redactor = wfCookieRedactor::load(); - foreach ($cookies as $cookieName => $cookieValue) { - $resolvedName = $cookieName; - if ($baseKey !== null) { - if ($isAssoc) { - $resolvedName = $baseKey . '[' . $cookieName . ']'; - } - else { - $resolvedName = $baseKey . '[]'; - } - } - - if (is_array($cookieValue)) { - $nestedCookies = $this->getCookieString($cookieValue, $resolvedName); - $cookieString .= $nestedCookies; - } - else { - if (!$preventRedaction) - $redactor->redact($resolvedName, $cookieValue); - - $cookieString .= $resolvedName . '=' . urlencode($cookieValue) . '; '; - } - } - return $cookieString; - } - - public function getFiles() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->files, $args); - } - return $this->files; - } - - public function getFileNames() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->fileNames, $args); - } - return $this->fileNames; - } - - public function getHost() { - return $this->host; - } - - public function getURI() { - return $this->uri; - } - - public function getMetadata() { - if (func_num_args() > 0) { - $args = func_get_args(); - return $this->_arrayValueByKeys($this->metadata, $args); - } - return $this->metadata; - } - - public function getPath() { - return $this->path; - } - - public function getIP() { - return $this->ip; - } - - public function getMethod() { - return $this->method; - } - - public function getProtocol() { - return $this->protocol; - } - - public function getAuth($arg1 = null) { - if ($arg1) { - if (is_array($this->auth) && array_key_exists($arg1, $this->auth)) { - return $this->auth[$arg1]; - } - return null; - } - return $this->auth; - } - - public function getTimestamp() { - return $this->timestamp; - } - - public function __toString() { - return $this->highlightFailedParams(); - } - - /** - * @param array $failedParams - * @param string $highlightParamFormat - * @param string $highlightMatchFormat - * @return string - */ - public function highlightFailedParams($failedParams = array(), $highlightParamFormat = '[param]%s[/param]', - $highlightMatchFormat = '[match]%s[/match]', $preventRedaction = false) { - $highlights = array(); - - // Cap at 47.5kb - $maxRequestLen = 1024 * 47.5; - - $this->highlightParamFormat = $highlightParamFormat; - $this->highlightMatchFormat = $highlightMatchFormat; - - if (is_array($failedParams)) { - foreach ($failedParams as $paramKey => $categories) { - foreach ($categories as $categoryKey => $failedRules) { - foreach ($failedRules as $failedRule) { - $rule = $failedRule['rule']; - /** @var wfWAFRuleComparisonFailure $failedComparison */ - $failedComparison = $failedRule['failedComparison']; - $action = $failedRule['action']; - - $paramKey = $failedComparison->getParamKey(); - if (preg_match('/request\.([a-z0-9]+)(?:\[(.*?)\](.*?))?$/i', $paramKey, $matches)) { - $global = $matches[1]; - if (method_exists('wfWAFRequestInterface', "get" . ucfirst($global))) { - $highlight = array( - 'match' => $failedComparison->getMatches(), - ); - if (isset($matches[2])) { - $highlight['param'] = "$matches[2]$matches[3]"; - } - $highlights[$global][] = $highlight; - } - } - } - } - } - } - - $uri = $this->getURI(); - $queryStringPos = wfWAFUtils::strpos($uri, '?'); - if ($queryStringPos !== false) { - $uri = wfWAFUtils::substr($uri, 0, $queryStringPos); - } - $queryString = $this->getQueryString(); - if ($queryString) { - $uri .= '?' . http_build_query($queryString, '', '&'); - } - if (!empty($highlights['queryString'])) { - foreach ($highlights['queryString'] as $matches) { - if (!empty($matches['param'])) { - $this->highlightMatches = $matches['match']; - $uri = preg_replace_callback('/(&|\?|^)(' . preg_quote(urlencode($matches['param']), '/') . ')=(.*?)(&|$)/', array( - $this, 'highlightParam', - ), $uri); - } - } - } - - if (!empty($highlights['uri'])) { - foreach ($highlights['uri'] as $matches) { - if ($matches) { - - } - } - $uri = sprintf($highlightParamFormat, $uri); - } - - $request = "{$this->getMethod()} $uri HTTP/1.1\n"; - $hasAuth = false; - $auth = $this->getAuth(); - - if (is_array($this->getHeaders())) { - foreach ($this->getHeaders() as $header => $value) { - switch (wfWAFUtils::strtolower($header)) { - case 'cookie': - // TODO: Hook up highlights to cookies - $request .= 'Cookie: ' . trim($this->getCookieString(null, null, $preventRedaction)) . "\n"; - break; - - case 'host': - $request .= 'Host: ' . $this->getHost() . "\n"; - break; - - case 'authorization': - $hasAuth = true; - if ($auth) { - $request .= 'Authorization: Basic ' . ($preventRedaction ? base64_encode($auth['user'] . ':' . $auth['password']) : '[redacted]') . "\n"; - } - break; - - default: - $request .= $header . ': ' . $value . "\n"; - break; - } - } - } - - if (!$hasAuth && $auth) { - $request .= 'Authorization: Basic ' . ($preventRedaction ? base64_encode($auth['user'] . ':' . $auth['password']) : '[redacted]') . "\n"; - } - - $bareRequestURI = wfWAFUtils::extractBareURI($this->getURI()); - $isAuthRequest = (strpos($bareRequestURI, '/wp-login.php') !== false); - $isXMLRPC = (strpos($bareRequestURI, '/xmlrpc.php') !== false); - $xmlrpcFieldMap = array( - 'wp.getUsersBlogs' => array(0, 1), - 'wp.newPost' => array(1, 2), - 'wp.editPost' => array(1, 2), - 'wp.deletePost' => array(1, 2), - 'wp.getPost' => array(1, 2), - 'wp.getPosts' => array(1, 2), - 'wp.newTerm' => array(1, 2), - 'wp.editTerm' => array(1, 2), - 'wp.deleteTerm' => array(1, 2), - 'wp.getTerm' => array(1, 2), - 'wp.getTerms' => array(1, 2), - 'wp.getTaxonomy' => array(1, 2), - 'wp.getTaxonomies' => array(1, 2), - 'wp.getUser' => array(1, 2), - 'wp.getUsers' => array(1, 2), - 'wp.getProfile' => array(1, 2), - 'wp.editProfile' => array(1, 2), - 'wp.getPage' => array(2, 3), - 'wp.getPages' => array(1, 2), - 'wp.newPage' => array(1, 2), - 'wp.deletePage' => array(1, 2), - 'wp.editPage' => array(2, 3), - 'wp.getPageList' => array(1, 2), - 'wp.getAuthors' => array(1, 2), - 'wp.getTags' => array(1, 2), - 'wp.newCategory' => array(1, 2), - 'wp.deleteCategory' => array(1, 2), - 'wp.suggestCategories' => array(1, 2), - 'wp.getComment' => array(1, 2), - 'wp.getComments' => array(1, 2), - 'wp.deleteComment' => array(1, 2), - 'wp.editComment' => array(1, 2), - 'wp.newComment' => array(1, 2), - 'wp.getCommentStatusList' => array(1, 2), - 'wp.getCommentCount' => array(1, 2), - 'wp.getPostStatusList' => array(1, 2), - 'wp.getPageStatusList' => array(1, 2), - 'wp.getPageTemplates' => array(1, 2), - 'wp.getMediaItem' => array(1, 2), - 'wp.getMediaLibrary' => array(1, 2), - 'wp.getPostFormats' => array(1, 2), - 'wp.getPostType' => array(1, 2), - 'wp.getPostTypes' => array(1, 2), - 'wp.getRevisions' => array(1, 2), - 'wp.restoreRevision' => array(1, 2), - 'blogger.getUsersBlogs' => array(1, 2), - 'blogger.getUserInfo' => array(1, 2), - 'blogger.getPost' => array(2, 3), - 'blogger.getRecentPosts' => array(2, 3), - 'blogger.newPost' => array(2, 3), - 'blogger.editPost' => array(2, 3), - 'blogger.deletePost' => array(2, 3), - 'metaWeblog.newPost' => array(1, 2), - 'metaWeblog.editPost' => array(1, 2), - 'metaWeblog.getPost' => array(1, 2), - 'metaWeblog.getRecentPosts' => array(1, 2), - 'metaWeblog.getCategories' => array(1, 2), - 'metaWeblog.newMediaObject' => array(1, 2), - 'mt.getRecentPostTitles' => array(1, 2), - 'mt.getCategoryList' => array(1, 2), - 'mt.getPostCategories' => array(1, 2), - 'mt.setPostCategories' => array(1, 2), - 'mt.publishPost' => array(1, 2), - ); - - $body = $this->getBody(); - $rawBody = $this->getRawBody(); - $contentType = $this->getHeaders('Content-Type'); - if (wfXMLRPCBody::canParse() && $isXMLRPC && is_string($rawBody) && !$preventRedaction) { - $xml =& $rawBody; - if ($contentType == 'application/x-www-form-urlencoded') { - $xml = @urldecode($rawBody); - } - - $xmlrpc = new wfXMLRPCBody($xml); - if ($xmlrpc->parse() && $xmlrpc->messageType == 'methodCall') { - if ($xmlrpc->methodName == 'system.multicall') { - $subCalls =& $xmlrpc->params[0]['value']; - if (is_array($subCalls)) { - foreach ($subCalls as &$call) { - $method = $call['value']['methodName']['value']; - $params =& $call['value']['params']['value']; - - if (isset($xmlrpcFieldMap[$method])) { - $fieldIndexes = $xmlrpcFieldMap[$method]; - foreach ($fieldIndexes as $i) { - if (isset($params[$i])) { - $params[$i]['value'] = '[redacted]'; - } - } - } - } - } - } - else { - if (isset($xmlrpcFieldMap[$xmlrpc->methodName])) { - $params =& $xmlrpc->params; - $fieldIndexes = $xmlrpcFieldMap[$xmlrpc->methodName]; - foreach ($fieldIndexes as $i) { - if (isset($params[$i])) { - $params[$i]['value'] = '[redacted]'; - } - } - } - } - - $xml = (string) $xmlrpc; - if ($contentType == 'application/x-www-form-urlencoded') { - $body = urlencode($xml); - } - } - } - else if (is_array($body)) { - foreach ($body as $bkey => &$bvalue) { - if (!$preventRedaction && $isAuthRequest && ($bkey == 'log' || $bkey == 'pwd' || $bkey == 'user_login' || $bkey == 'user_email' || $bkey == 'pass1' || $bkey == 'pass2' || $bkey == 'rp_key')) { - $bvalue = '[redacted]'; - } - } - - if (preg_match('/^multipart\/form\-data;(?:\s*(?!boundary)(?:[^\x00-\x20\(\)<>@,;:\\"\/\[\]\?\.=]+)=[^;]+;)*\s*boundary=([^;]*)(?:;\s*(?:[^\x00-\x20\(\)<>@,;:\\"\/\[\]\?\.=]+)=[^;]+)*$/i', (string) $contentType, $boundaryMatches)) { - $boundary = $boundaryMatches[1]; - $bodyArray = array(); - foreach ($body as $key => $value) { - $bodyArray = array_merge($bodyArray, $this->reduceBodyParameter($key, $value)); - } - - $body = ''; - foreach ($bodyArray as $param => $value) { - if (!empty($highlights['body'])) { - foreach ($highlights['body'] as $matches) { - if (!empty($matches['param']) && $matches['param'] === $param) { - $value = sprintf($this->highlightParamFormat, $value); - if (is_array($matches['match'][0])) { - $replace = array(); - foreach ($matches['match'][0] as $key => $match) { - $replace[$match] = sprintf($this->highlightMatchFormat, $match); - } - if ($replace) { - $value = str_replace(array_keys($replace), $replace, $value); - } - } else { // preg_match - $value = str_replace($matches['match'][0], sprintf($this->highlightMatchFormat, $matches['match'][0]), $value); - } - break; - } - } - } - - $body .= <<<FORM ---$boundary -Content-Disposition: form-data; name="$param" - -$value - -FORM; - } - - foreach ($this->getFiles() as $param => $file) { - $name = array_key_exists('name', $file) ? $file['name'] : ''; - $mime = array_key_exists('type', $file) ? $file['type'] : ''; - $value = ''; - $lenToRead = $maxRequestLen - (wfWAFUtils::strlen($request) + wfWAFUtils::strlen($body) + 1); - if (array_key_exists('content', $file)) { - $value = $file['content']; - } else if ($lenToRead > 0 && file_exists($file['tmp_name'])) { - $handle = fopen($file['tmp_name'], 'r'); - $value = fread($handle, $lenToRead); - fclose($handle); - } - - if (!empty($highlights['fileNames'])) { - foreach ($highlights['fileNames'] as $matches) { - if (!empty($matches['param']) && $matches['param'] === $param) { - $name = sprintf($this->highlightParamFormat, $name); - $name = str_replace($matches['match'][0], sprintf($this->highlightMatchFormat, $matches['match'][0]), $name); - break; - } - } - } - - $body .= <<<FORM ---$boundary -Content-Disposition: form-data; name="$param"; filename="$name" -Content-Type: $mime -Expires: 0 - -$value - -FORM; - } - - if ($body) { - $body .= "--$boundary--\n"; - } - } - else { //Assume application/x-www-form-urlencoded and re-encode the body - $body = http_build_query($body, '', '&'); - if (!empty($highlights['body'])) { - foreach ($highlights['body'] as $matches) { - if (!empty($matches['param'])) { - $this->highlightMatches = $matches['match']; - $body = preg_replace_callback('/(&|^)(' . preg_quote(urlencode($matches['param']), '/') . ')=(.*?)(&|$)/', array( - $this, 'highlightParam', - ), $body); - } - } - } - } - } - - if (!is_string($body) || empty($body)) { - if (is_string($rawBody)) { - $body = $rawBody; - } - else { - $body = ''; - } - } - - $request .= "\n" . $body; - - if (wfWAFUtils::strlen($request) > $maxRequestLen) { - $request = wfWAFUtils::substr($request, 0, $maxRequestLen); - } - return $request; - } - - /** - * @param array $matches - * @return string - */ - private function highlightParam($matches) { - $value = ''; - if (is_array($this->highlightMatches)) { - // preg_match_all - if (is_array($this->highlightMatches[0])) { - $value = $matches[3]; - $replace = array(); - foreach ($this->highlightMatches[0] as $key => $match) { - $this->highlightMatches[0][$key] = $this->callHighlightMatchFilter($match); - $replace[] = sprintf($this->highlightMatchFormat, $this->callHighlightMatchFilter($match)); - } - if ($replace) { - $value = str_replace($this->highlightMatches[0], $replace, $value); - } - - } else { // preg_match - $param = $this->callHighlightMatchFilter($this->highlightMatches[0]); - $value = str_replace($param, sprintf($this->highlightMatchFormat, $param), $matches[3]); - } - } - if (wfWAFUtils::strlen($value) === 0) { - $value = sprintf($this->highlightMatchFormat, $value); - } - - return $matches[1] . sprintf($this->highlightParamFormat, $matches[2] . '=' . $value) . $matches[4]; - } - - /** - * @param $match - * @return mixed - */ - private function callHighlightMatchFilter($match) { - return is_callable($this->highlightMatchFilter) ? call_user_func($this->highlightMatchFilter, $match) : $match; - } - - /** - * Encodes all of the keys with the MD5 hash. - * - * @param array|string $value - * @return array|string - */ - private function md5EncodeKeys($value) { - if (!is_array($value)) { - return md5($value); - } - - $result = array(); - foreach ($value as $k => $v) { - $md5Key = md5($k); - if (is_array($v)) { - $result[$md5Key] = $this->md5EncodeKeys($v); - } - else { - $result[$md5Key] = $v; - } - } - return $result; - } - - /** - * @param string $key - * @param string|array $value - * @return array - */ - private function reduceBodyParameter($key, $value) { - if (is_array($value)) { - $param = array(); - foreach ($value as $index => $val) { - $param = array_merge($param, $this->reduceBodyParameter("{$key}[$index]", $val)); - } - return $param; - } - return array( - $key => $value, - ); - } - - /** - * @param mixed $auth - */ - public function setAuth($auth) { - $this->auth = $auth; - } - - /** - * @param mixed $body - */ - public function setBody($body) { - $this->body = $body; - $this->setMd5Body($this->md5EncodeKeys($body)); - } - - public function setRawBody($rawBody) { - $this->rawBody = $rawBody; - } - - /** - * @param mixed $md5Body - */ - public function setMd5Body($md5Body) { - $this->md5Body = $md5Body; - } - - public function setJsonBody($jsonBody) { - $this->jsonBody = $jsonBody; - $this->jsonParsed = true; - } - - /** - * @param mixed $cookies - */ - public function setCookies($cookies) { - $this->cookies = $cookies; - } - - /** - * @param mixed $fileNames - */ - public function setFileNames($fileNames) { - $this->fileNames = $fileNames; - } - - /** - * @param mixed $files - */ - public function setFiles($files) { - $this->files = $files; - } - - /** - * @param mixed $headers - */ - public function setHeaders($headers) { - $this->headers = $headers; - } - - /** - * @param mixed $host - */ - public function setHost($host) { - $this->host = $host; - } - - /** - * @param mixed $ip - */ - public function setIP($ip) { - $this->ip = $ip; - } - - /** - * @param mixed $method - */ - public function setMethod($method) { - $this->method = $method; - } - - /** - * @param mixed $path - */ - public function setPath($path) { - $this->path = $path; - } - - /** - * @param mixed $protocol - */ - public function setProtocol($protocol) { - $this->protocol = $protocol; - } - - /** - * @param mixed $queryString - */ - public function setQueryString($queryString) { - $this->queryString = $queryString; - $this->setMd5QueryString($this->md5EncodeKeys($queryString)); - } - - /** - * @param mixed $md5QueryString - */ - public function setMd5QueryString($md5QueryString) { - $this->md5QueryString = $md5QueryString; - } - - /** - * @param mixed $timestamp - */ - public function setTimestamp($timestamp) { - $this->timestamp = $timestamp; - } - - /** - * @param mixed $uri - */ - public function setUri($uri) { - $this->uri = $uri; - } - - /** - * @param array $metadata - */ - public function setMetadata($metadata) { - $this->metadata = $metadata; - } -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php deleted file mode 100644 index 6b3ef84f..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php +++ /dev/null @@ -1,2032 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -interface wfWAFRuleInterface { - - /** - * @return string - */ - public function render(); - - public function renderRule(); - - public function evaluate(); -} - -class wfWAFRuleException extends wfWAFException { -} - -class wfWAFRuleLogicalOperatorException extends wfWAFException { -} - -class wfWAFRule implements wfWAFRuleInterface { - - private $ruleID; - private $type; - private $category; - private $score; - private $description; - private $whitelist; - private $action; - /** @var wfWAFRuleComparisonGroup */ - private $comparisonGroup; - /** - * @var wfWAF - */ - private $waf; - - /** - * @param wfWAF $waf - * @param int $ruleID - * @param string $type - * @param string $category - * @param int $score - * @param string $description - * @param int $whitelist - * @param string $action - * @param wfWAFRuleComparisonGroup $comparisonGroup - * @return wfWAFRule - */ - public static function create() { - $waf = func_get_arg(0); - $ruleID = func_get_arg(1); - $type = func_get_arg(2); - $category = func_get_arg(3); - $score = func_get_arg(4); - $description = func_get_arg(5); - $whitelist = 1; - $action = ''; - $comparisonGroup = null; - //Compatibility with old compiled rules - if (func_num_args() == 8) { //Pre-whitelist flag - $action = func_get_arg(6); - $comparisonGroup = func_get_arg(7); - } - else if (func_num_args() == 9) { //Whitelist flag - $whitelist = func_get_arg(6); - $action = func_get_arg(7); - $comparisonGroup = func_get_arg(8); - } - return new self($waf, $ruleID, $type, $category, $score, $description, $whitelist, $action, $comparisonGroup); - } - - /** - * @param string $value - * @return string - */ - public static function exportString($value) { - return sprintf("'%s'", str_replace("'", "\\'", $value)); - } - - /** - * @param wfWAF $waf - * @param int $ruleID - * @param string $type - * @param string $category - * @param int $score - * @param string $description - * @param int $whitelist - * @param string $action - * @param wfWAFRuleComparisonGroup $comparisonGroup - */ - public function __construct($waf, $ruleID, $type, $category, $score, $description, $whitelist, $action, $comparisonGroup) { - $this->setWAF($waf); - $this->setRuleID($ruleID); - $this->setType($type); - $this->setCategory($category); - $this->setScore($score); - $this->setDescription($description); - $this->setWhitelist($whitelist); - $this->setAction($action); - $this->setComparisonGroup($comparisonGroup); - } - - public function __sleep() { - return array( - 'ruleID', - 'type', - 'category', - 'score', - 'description', - 'whitelist', - 'action', - 'comparisonGroup', - ); - } - - /** - * @return string - */ - public function render() { - return sprintf('%s::create($this, %d, %s, %s, %s, %s, %d, %s, %s)', get_class($this), - $this->getRuleID(), - var_export($this->getType(), true), - var_export($this->getCategory(), true), - var_export($this->getScore(), true), - var_export($this->getDescription(), true), - var_export($this->getWhitelist(), true), - var_export($this->getAction(), true), - $this->getComparisonGroup()->render() - ); - } - - /** - * @return string - */ - public function renderRule() { - return sprintf(<<<RULE -if %s: - %s(%s) -RULE - , - $this->getComparisonGroup()->renderRule(), - $this->getAction(), - join(', ', array_filter(array( - $this->getRuleID() ? 'id=' . (int) $this->getRuleID() : '', - $this->getCategory() ? 'category=' . self::exportString($this->getCategory()) : '', - $this->getScore() > 0 ? 'score=' . (int) $this->getScore() : '', - $this->getDescription() ? 'description=' . self::exportString($this->getDescription()) : '', - $this->getWhitelist() == 0 ? 'whitelist=0' : '', - ))) - ); - } - - public function evaluate() { - $comparisons = $this->getComparisonGroup(); - $waf = $this->getWAF(); - if ($comparisons instanceof wfWAFRuleComparisonGroup && $waf instanceof wfWAF) { - $comparisons->setRule($this); - if ($comparisons->evaluate()) { - $waf->tripRule($this); - return true; - } - } - return false; - } - - public function debug() { - return $this->getComparisonGroup()->debug(); - } - - /** - * For JSON. - * - * @return array - */ - public function toArray() { - return array( - 'ruleID' => $this->getRuleID(), - 'type' => $this->getType(), - 'category' => $this->getCategory(), - 'score' => $this->getScore(), - 'description' => $this->getDescription(), - 'whitelist' => $this->getWhitelist(), - 'action' => $this->getAction(), - ); - } - - /** - * @return int - */ - public function getRuleID() { - return $this->ruleID; - } - - /** - * @param int $ruleID - */ - public function setRuleID($ruleID) { - $this->ruleID = $ruleID; - } - - /** - * @return string - */ - public function getType() { - return $this->type; - } - - /** - * @param string $type - */ - public function setType($type) { - $this->type = $type; - } - - /** - * @return string - */ - public function getCategory() { - return $this->category; - } - - /** - * @param string $category - */ - public function setCategory($category) { - $this->category = $category; - } - - /** - * @return int - */ - public function getScore() { - return $this->score; - } - - /** - * @param int $score - */ - public function setScore($score) { - $this->score = $score; - } - - /** - * @return string - */ - public function getDescription() { - return $this->description; - } - - /** - * @param string $description - */ - public function setDescription($description) { - $this->description = $description; - } - - /** - * @return int - */ - public function getWhitelist() { - return $this->whitelist; - } - - /** - * @param string $whitelist - */ - public function setWhitelist($whitelist) { - $this->whitelist = $whitelist; - } - - /** - * @return string - */ - public function getAction() { - return $this->action; - } - - /** - * @param string $action - */ - public function setAction($action) { - $this->action = $action; - } - - /** - * @return wfWAFRuleComparisonGroup - */ - public function getComparisonGroup() { - return $this->comparisonGroup; - } - - /** - * @param wfWAFRuleComparisonGroup $comparisonGroup - */ - public function setComparisonGroup($comparisonGroup) { - $this->comparisonGroup = $comparisonGroup; - } - - /** - * @return wfWAF - */ - public function getWAF() { - return $this->waf; - } - - /** - * @param wfWAF $waf - */ - public function setWAF($waf) { - $this->waf = $waf; - if ($this->comparisonGroup) { - $this->comparisonGroup->setWAF($waf); - } - } -} - -class wfWAFRuleLogicalOperator implements wfWAFRuleInterface { - - /** - * @var string - */ - private $operator; - - /** - * @var array - */ - protected $validOperators = array( - '||', - '&&', - 'and', - 'or', - 'xor', - ); - /** - * @var bool - */ - private $currentValue = false; - /** - * @var wfWAFRuleInterface - */ - private $comparison; - - /** - * @param string $operator - * @param bool $currentValue - * @param wfWAFRuleInterface $comparison - */ - public function __construct($operator, $currentValue = false, $comparison = null) { - $this->setOperator($operator); - $this->setCurrentValue($currentValue); - $this->setComparison($comparison); - } - - public function __sleep() { - return array( - 'operator', - 'currentValue', - 'comparison', - ); - } - - /** - * @return string - * @throws wfWAFRuleLogicalOperatorException - */ - public function render() { - if (!$this->isValid()) { - throw new wfWAFRuleLogicalOperatorException(sprintf('Invalid logical operator "%s", must be one of %s', $this->getOperator(), join(", ", $this->validOperators))); - } - return sprintf("new %s(%s)", get_class($this), var_export(trim(wfWAFUtils::strtoupper($this->getOperator())), true)); - } - - /** - * @return string - * @throws wfWAFRuleLogicalOperatorException - */ - public function renderRule() { - if (!$this->isValid()) { - throw new wfWAFRuleLogicalOperatorException(sprintf('Invalid logical operator "%s", must be one of %s', $this->getOperator(), join(", ", $this->validOperators))); - } - return trim(wfWAFUtils::strtolower($this->getOperator())); - } - - public function evaluate() { - $currentValue = $this->getCurrentValue(); - $comparison = $this->getComparison(); - if (is_bool($currentValue) && $comparison instanceof wfWAFRuleInterface) { - switch (wfWAFUtils::strtolower($this->getOperator())) { - case '&&': - case 'and': - return $currentValue && $comparison->evaluate(); - - case '||': - case 'or': - return $currentValue || $comparison->evaluate(); - - case 'xor': - return $currentValue xor $comparison->evaluate(); - } - } - return false; - } - - /** - * @return bool - */ - public function isValid() { - return in_array(wfWAFUtils::strtolower($this->getOperator()), $this->validOperators); - } - - /** - * @return string - */ - public function getOperator() { - return $this->operator; - } - - /** - * @param string $operator - */ - public function setOperator($operator) { - $this->operator = $operator; - } - - /** - * @return boolean - */ - public function getCurrentValue() { - return $this->currentValue; - } - - /** - * @param boolean $currentValue - */ - public function setCurrentValue($currentValue) { - $this->currentValue = $currentValue; - } - - /** - * @return wfWAFRuleInterface - */ - public function getComparison() { - return $this->comparison; - } - - /** - * @param wfWAFRuleInterface $comparison - */ - public function setComparison($comparison) { - $this->comparison = $comparison; - } -} - -class wfWAFPhpBlock { - public $open = false; - public $echoTag; - public $shortTag; - public $openParentheses = 0, $closedParentheses = 0; - public $backtickCount = 0; - public $badCharacter = false; - public $mismatchedParentheses = false; - - public function __construct($echoTag = false, $shortTag = false) { - $this->echoTag = $echoTag; - $this->shortTag = $shortTag; - } - - public function hasParentheses() { - return $this->openParentheses > 0 && $this->closedParentheses === $this->openParentheses; - } - - public function hasBacktickPair() { - return $this->backtickCount > 0 && $this->backtickCount % 2 === 0; - } - - public function hasParenthesesOrBacktickPair() { - return $this->hasParentheses() || $this->hasBacktickPair(); - } - - public function hasMismatchedParentheses() { - return $this->mismatchedParentheses || $this->closedParentheses !== $this->openParentheses; - } - - public function hasSyntaxError() { - if (version_compare(phpversion(), '8.0.0', '>=')) { - return $this->badCharacter; - } - return $this->hasMismatchedParentheses(); - } - - public static function isValid($phpBlock) { - return $phpBlock !== null && !$phpBlock->hasSyntaxError(); - } - - public static function extend($phpBlock, $echoTag = false, $shortTag = false) { - if ($phpBlock === null) - $phpBlock = new self(); - $phpBlock->open = true; - $phpBlock->echoTag = $echoTag; - $phpBlock->shortTag = $shortTag; - return $phpBlock; - } -} - -class wfWAFRuleComparison implements wfWAFRuleInterface { - - private $matches; - private $failedSubjects; - private $result; - /** - * @var wfWAFRule - */ - private $rule; - - private static $scalarActions = array( - 'contains', - 'notcontains', - 'match', - 'notmatch', - 'matchcount', - 'containscount', - 'equals', - 'notequals', - 'identical', - 'notidentical', - 'greaterthan', - 'greaterthanequalto', - 'lessthan', - 'lessthanequalto', - 'lengthgreaterthan', - 'lengthlessthan', - 'currentuseris', - 'currentuserisnot', - 'md5equals', - 'filepatternsmatch', - 'filehasphp', - 'islocalurl', - 'isremoteurl', - 'isvalidurl', - 'isnotvalidurl', - 'urlhostequals', - 'urlhostnotequals', - 'urlhostmatches', - 'urlhostnotmatches', - 'urlschemeequals', - 'urlschemenotequals', - 'urlschemematches', - 'urlschemenotmatches', - 'versionequals', - 'versionnotequals', - 'versiongreaterthan', - 'versiongreaterthanequalto', - 'versionlessthan', - 'versionlessthanequalto', - 'exists' - ); - - private static $arrayActions = array( - 'keyexists', - 'keymatches' - ); - - private static $globalActions = array( - 'hasuser', - 'nothasuser', - 'currentusercan', - 'currentusercannot' - ); - - const ACTION_TYPE_SCALAR=0; - const ACTION_TYPE_ARRAY=1; - const ACTION_TYPE_GLOBAL=2; - - /** - * @var mixed - */ - private $expected; - /** - * @var mixed - */ - private $subjects; - /** - * @var string - */ - private $action; - private $multiplier; - /** - * @var wfWAF - */ - private $waf; - - /** - * @param wfWAF $waf - * @param string $action - * @param mixed $expected - * @param mixed $subjects - */ - public function __construct($waf, $action, $expected, $subjects = null) { - $this->setWAF($waf); - $this->setAction($action); - $this->setExpected($expected); - $this->setSubjects($subjects); - } - - public function __sleep() { - return array( - 'rule', - 'action', - 'expected', - 'subjects', - ); - } - - /** - * @param string|array $subject - * @return string - */ - public static function getSubjectKey($subject) { - if (!is_array($subject)) { - return (string) $subject; - } - $return = ''; - $global = array_shift($subject); - if ($global instanceof wfWAFRuleComparisonSubject) { - $global = 'filtered'; - } - foreach ($subject as $key) { - $return .= '[' . $key . ']'; - } - return $global . $return; - } - - /** - * @return string - * @throws wfWAFRuleException - */ - public function render() { - if (!$this->isActionValid()) { - throw new wfWAFRuleException('Invalid action passed to ' . get_class($this) . ', action: ' . var_export($this->getAction(), true)); - } - $subjectExport = ''; - /** @var wfWAFRuleComparisonSubject $subject */ - foreach ($this->getSubjects() as $subject) { - $subjectExport .= $subject->render() . ",\n"; - } - $subjectExport = 'array(' . wfWAFUtils::substr($subjectExport, 0, -2) . ')'; - - $expected = $this->getExpected(); - return sprintf('new %s($this, %s, %s, %s)', get_class($this), var_export((string) $this->getAction(), true), - ($expected instanceof wfWAFRuleVariable ? $expected->render() : var_export($expected, true)), $subjectExport); - } - - /** - * @return string - * @throws wfWAFRuleException - */ - public function renderRule() { - if (!$this->isActionValid()) { - throw new wfWAFRuleException('Invalid action passed to ' . get_class($this) . ', action: ' . var_export($this->getAction(), true)); - } - $subjectExport = ''; - /** @var wfWAFRuleComparisonSubject $subject */ - foreach ($this->getSubjects() as $subject) { - $subjectExport .= $subject->renderRule() . ", "; - } - $subjectExport = wfWAFUtils::substr($subjectExport, 0, -2); - - $expected = $this->getExpected(); - return sprintf('%s(%s, %s)', $this->getAction(), - ($expected instanceof wfWAFRuleVariable ? $expected->renderRule() : wfWAFRule::exportString($expected)), - $subjectExport); - } - - public function getActionType() { - $action=wfWAFUtils::strtolower($this->getAction()); - if (in_array($action, self::$scalarActions)) { - return self::ACTION_TYPE_SCALAR; - } - else if(in_array($action, self::$arrayActions)) { - return self::ACTION_TYPE_ARRAY; - } - else if(in_array($action, self::$globalActions)) { - return self::ACTION_TYPE_GLOBAL; - } - else { - return null; - } - } - - public function isActionValid() { - return $this->getActionType() !== null; - } - - public function hasSubject() { - return $this->getActionType() !== self::ACTION_TYPE_GLOBAL; - } - - private function isWhitelisted($subjectKey = '') { - return $this->getWAF() && $this->getRule() && - $this->getWAF()->isRuleParamWhitelisted($this->getRule()->getRuleID(), $this->getWAF()->getRequest()->getPath(), $subjectKey); - } - - public function evaluate() { - $type = $this->getActionType(); - if ($type===null) { - return false; - } - else if ($type===self::ACTION_TYPE_GLOBAL) { - return (!$this->isWhitelisted()) && ($this->result=call_user_func(array($this, $this->getAction()))); - } - $subjects = $this->getSubjects(); - if (!is_array($subjects)) { - return false; - } - - $this->result = false; - /** @var wfWAFRuleComparisonSubject $subject */ - foreach ($subjects as $subject) { - $global = $subject->getValue(); - $subjectKey = $subject->getKey(); - - if ($this->_evaluate(array($this, $this->getAction()), $global, $subjectKey, $type===self::ACTION_TYPE_SCALAR)) { - $this->result = true; - } - } - return $this->result; - } - - /** - * @param callback $callback - * @param mixed $global - * @param string $subjectKey - * @param bool $iterate - * @return bool - */ - private function _evaluate($callback, $global, $subjectKey, $iterate) { - $result = false; - - if ($this->isWhitelisted($subjectKey)) { - return $result; - } - - if (is_array($global) && $iterate) { - foreach ($global as $key => $value) { - if ($this->_evaluate($callback, $value, $subjectKey . '[' . $key . ']', $iterate)) { - $result = true; - } - } - } else if (call_user_func($callback, $global)) { - $result = true; - $this->failedSubjects[] = array( - 'subject' => $subjectKey, - 'value' => is_string($global) ? $global : wfWAFUtils::json_encode($global), - 'multiplier' => $this->getMultiplier(), - 'matches' => $this->getMatches(), - ); - } - return $result; - } - - public function contains($subject) { - if (is_array($this->getExpected())) { - return in_array($this->getExpected(), $subject); - } - return wfWAFUtils::strpos((string) $subject, (string) $this->getExpected()) !== false; - } - - public function notContains($subject) { - return !$this->contains($subject); - } - - public function match($subject) { - return preg_match((string) $this->getExpected(), (string) $subject, $this->matches) > 0; - } - - public function notMatch($subject) { - return !$this->match($subject); - } - - public function matchCount($subject) { - $this->multiplier = preg_match_all((string) $this->getExpected(), (string) $subject, $this->matches); - return $this->multiplier > 0; - } - - public function containsCount($subject) { - if (is_array($this->getExpected())) { - $this->multiplier = 0; - foreach ($this->getExpected() as $val) { - if ($val == $subject) { - $this->multiplier++; - } - } - return $this->multiplier > 0; - } - $this->multiplier = wfWAFUtils::substr_count($subject, $this->getExpected()); - return $this->multiplier > 0; - } - - public function equals($subject) { - return $this->getExpected() == $subject; - } - - public function notEquals($subject) { - return $this->getExpected() != $subject; - } - - public function identical($subject) { - return $this->getExpected() === $subject; - } - - public function notIdentical($subject) { - return $this->getExpected() !== $subject; - } - - public function greaterThan($subject) { - return $subject > $this->getExpected(); - } - - public function greaterThanEqualTo($subject) { - return $subject >= $this->getExpected(); - } - - public function lessThan($subject) { - return $subject < $this->getExpected(); - } - - public function lessThanEqualTo($subject) { - return $subject <= $this->getExpected(); - } - - public function lengthGreaterThan($subject) { - return wfWAFUtils::strlen(is_array($subject) ? join('', $subject) : (string) $subject) > $this->getExpected(); - } - - public function lengthLessThan($subject) { - return wfWAFUtils::strlen(is_array($subject) ? join('', $subject) : (string) $subject) < $this->getExpected(); - } - - public function currentUserIs($subject) { - if ($authCookie = $this->getWAF()->parseAuthCookie()) { - return $authCookie['role'] === $this->getExpected(); - } - return false; - } - - public function currentUserIsNot($subject) { - return !$this->currentUserIs($subject); - } - - public function hasUser() { - return $this->getWAF()->parseAuthCookie()!==false; - } - - public function notHasUser() { - return !$this->hasUser(); - } - - public function currentUserCan() { - return $this->getWAF()->checkCapability($this->getExpected()); - } - - public function currentUserCannot() { - return !$this->currentUserCan(); - } - - public function md5Equals($subject) { - return md5((string) $subject) === $this->getExpected(); - } - - public function filePatternsMatch($subject) { - $request = $this->getWAF()->getRequest(); - $files = $request->getFiles(); - $patterns = $this->getWAF()->getMalwareSignatures(); - $commonStrings = $this->getWAF()->getMalwareSignatureCommonStrings(); - if (!is_array($patterns) || !is_array($files)) { - return false; - } - - $backtrackLimit = ini_get('pcre.backtrack_limit'); - if (is_numeric($backtrackLimit)) { - $backtrackLimit = (int) $backtrackLimit; - if ($backtrackLimit > 10000000) { - ini_set('pcre.backtrack_limit', 1000000); - } - } - else { - $backtrackLimit = false; - } - - foreach ($files as $file) { - if ($file['name'] == (string) $subject) { - if (!is_file($file['tmp_name'])) { - continue; - } - $fh = @fopen($file['tmp_name'], 'r'); - if (!$fh) { - continue; - } - $totalRead = 0; - - $first = true; - $readsize = max(min(10 * 1024 * 1024, wfWAFUtils::iniSizeToBytes(ini_get('upload_max_filesize'))), 1 * 1024 * 1024); - while (!feof($fh)) { - $data = fread($fh, $readsize); - $totalRead += strlen($data); - if ($totalRead < 1) { - return false; - } - - $commonStringsChecked = array(); - foreach ($patterns as $index => $rule) { - if (@preg_match('/' . $rule . '/iS', null) === false) { - continue; //This PCRE version can't compile the rule - } - - if (!$first && substr($rule, 0, 1) == '^') { - continue; //Signature only applies to file beginning - } - - if (isset($commonStrings[$index])) { - foreach ($commonStrings[$index] as $s) { - if (!isset($commonStringsChecked[$s])) { - $commonStringsChecked[$s] = (preg_match('/' . $s . '/iS', $data) == 1); - } - - if (!$commonStringsChecked[$s]) { - continue 2; - } - } - } - - if (preg_match('/(' . $rule . ')/iS', $data, $matches)) { - if ($backtrackLimit !== false) { ini_set('pcre.backtrack_limit', $backtrackLimit); } - return true; - } - } - - $first = false; - } - } - } - - if ($backtrackLimit !== false) { ini_set('pcre.backtrack_limit', $backtrackLimit); } - return false; - } - - private function checkForPhp($path) { - if (!is_file($path)) - return false; - $fh = @fopen($path, 'r'); - if ($fh === false) - return false; - //T_BAD_CHARACTER is only available since PHP 7.4.0 and before 7.0.0 - $T_BAD_CHARACTER = defined('T_BAD_CHARACTER') ? constant('T_BAD_CHARACTER') : 10001; - $phpBlock = null; - $wrappedTokenCheckBytes = ''; - $maxTokenSize = 15; //__halt_compiler - $possibleWrappedTokens = array('<?php', '<?=', '<?', '?>', 'exit', 'new', 'clone', 'echo', 'print', 'require', 'include', 'require_once', 'include_once', '__halt_compiler'); - - $readsize = 1024 * 1024; //1MB chunks - $iteration = 0; - $shortOpenTagEnabled = (bool) ini_get('short_open_tag'); - do { - $data = fread($fh, $readsize); - $actualReadsize = strlen($data); - if ($actualReadsize === 0) - break; - - //Make sure we didn't miss PHP split over a chunking boundary - $wrappedCheckLength = strlen($wrappedTokenCheckBytes); - if ($wrappedCheckLength > 0) { - $testBytes = $wrappedTokenCheckBytes . substr($data, 0, min($maxTokenSize, $actualReadsize)); - foreach ($possibleWrappedTokens as $t) { - $position = strpos($testBytes, $t); - if ($position !== false && $position < $wrappedCheckLength && $position + strlen($t) >= $wrappedCheckLength) { //Found a token that starts before this segment of data and ends within it - $data = substr($wrappedTokenCheckBytes, $position) . $data; - break; - } - } - } - - $prepended = NULL; - - //Make sure it tokenizes correctly if chunked - if ($phpBlock !== null) { - if ($phpBlock->echoTag) { - $data = '<?= ' . $data; - $prepended = T_OPEN_TAG_WITH_ECHO; - } - else { - $data = '<?php ' . $data; - $prepended = T_OPEN_TAG; - } - } - - //Tokenize the data and check for PHP - $this->_resetErrors(); - $tokens = @token_get_all($data); - $error = error_get_last(); - - if ($error !== null && feof($fh) && stripos($error['message'], 'Unterminated comment') !== false) - break; - - $firstToken = reset($tokens); - if (is_array($firstToken) && $firstToken[0] === $prepended) - array_shift($tokens); //Ignore the prepended token; it is only relevant for token_get_all - - $offset = 0; - foreach ($tokens as $token) { - if (is_array($token)) { - $offset += strlen($token[1]); - switch ($token[0]) { - case T_OPEN_TAG: - $phpBlock = wfWAFPhpBlock::extend($phpBlock, false, $token[1] === '<?'); - break; - case T_OPEN_TAG_WITH_ECHO: - $phpBlock = wfWAFPhpBlock::extend($phpBlock, true); - break; - case T_CLOSE_TAG: - if (wfWAFPhpBlock::isValid($phpBlock) && ($phpBlock->echoTag || $phpBlock->hasParenthesesOrBacktickPair())) { - fclose($fh); - return true; - } - $phpBlock->open = false; - break; - case T_NEW: - case T_CLONE: - case T_ECHO: - case T_PRINT: - case T_REQUIRE: - case T_INCLUDE: - case T_REQUIRE_ONCE: - case T_INCLUDE_ONCE: - case T_HALT_COMPILER: - case T_EXIT: - if (wfWAFPhpBlock::isValid($phpBlock)) { - fclose($fh); - return true; - } - break; - case $T_BAD_CHARACTER: - if ($phpBlock !== null) - $phpBlock->badCharacter = true; - break; - case T_STRING: - if (!$phpBlock->shortTag && preg_match('/^[A-z0-9_]{3,}$/', $token[1]) && function_exists($token[1])) { - fclose($fh); - return true; - } - break; - } - } - else { - $offset += strlen($token); - if ($phpBlock !== null) { - switch ($token) { - case '(': - $phpBlock->openParentheses++; - break; - case ')': - if ($phpBlock->openParentheses > $phpBlock->closedParentheses) - $phpBlock->closedParentheses++; - else - $phpBlock->mismatchedParentheses = true; - break; - case '`': - $phpBlock->backtickCount++; - break; - } - } - } - } - - if (wfWAFPhpBlock::isValid($phpBlock) && $phpBlock->hasParenthesesOrBacktickPair()) { - fclose($fh); - return true; - } - - $wrappedTokenCheckBytes = substr($data, - min($maxTokenSize, $actualReadsize)); - } while (!feof($fh)); - - fclose($fh); - return false; - } - - public function fileHasPHP($subject) { - $request = $this->getWAF()->getRequest(); - $files = $request->getFiles(); - if (!is_array($files)) { - return false; - } - - foreach ($files as $file) { - if ($file['name'] === (string) $subject && $this->checkForPhp($file['tmp_name'])) - return true; - } - - return false; - } - - private function _resetErrors() { - if (function_exists('error_clear_last')) { - error_clear_last(); - } - else { - // set error_get_last() to defined state by forcing an undefined variable error - set_error_handler(array($this, '_resetErrorsHandler'), 0); - @$undefinedVariable; - restore_error_handler(); - } - } - - public function _resetErrorsHandler($errno, $errstr, $errfile, $errline) { - //Do nothing - } - - public function isLocalURL($subject) { - if (empty($subject)) { - return false; - } - - $parsed = wfWAFUtils::parse_url((string) $subject); - if (!isset($parsed['host'])) { - return true; - } - - $guessSiteURL = sprintf('%s://%s/', wfWAF::getInstance()->getRequest()->getProtocol(), wfWAF::getInstance()->getRequest()->getHost()); - $siteURL = wfWAF::getInstance()->getStorageEngine()->getConfig('siteURL', null, 'synced') ? wfWAF::getInstance()->getStorageEngine()->getConfig('siteURL', null, 'synced') : $guessSiteURL; - $homeURL = wfWAF::getInstance()->getStorageEngine()->getConfig('homeURL', null, 'synced') ? wfWAF::getInstance()->getStorageEngine()->getConfig('homeURL', null, 'synced') : $guessSiteURL; - - $siteHost = wfWAFUtils::parse_url($siteURL, PHP_URL_HOST); - $homeHost = wfWAFUtils::parse_url($homeURL, PHP_URL_HOST); - - return (is_string($siteHost) && strtolower($parsed['host']) == strtolower($siteHost)) || (is_string($homeHost) && strtolower($parsed['host']) == strtolower($homeHost)); - } - - public function isRemoteURL($subject) { - if (empty($subject)) { - return false; - } - - return !$this->isLocalURL($subject); - } - - public function isValidURL($subject) { - if ($subject === null) { - return false; - } - return wfWAFUtils::validate_url((string) $subject) !== false; - } - - public function isNotValidURL($subject) { - if ($subject === null) { - return false; - } - return !$this->isValidURL($subject); - } - - public function urlHostEquals($subject) { - if ($subject === null) { - return false; - } - $host = wfWAFUtils::parse_url((string) $subject, PHP_URL_HOST); - if (!is_string($host)) { - return wfWAFUtils::strlen($this->getExpected()) == 0; - } - - return strtolower($host) == strtolower($this->getExpected()); - } - - public function urlHostNotEquals($subject) { - if ($subject === null) { - return false; - } - return !$this->urlHostEquals($subject); - } - - public function urlHostMatches($subject) { - if ($subject === null) { - return false; - } - $host = wfWAFUtils::parse_url((string) $subject, PHP_URL_HOST); - if (!is_string($host)) { - return false; - } - - return preg_match((string) $this->getExpected(), $host, $this->matches) > 0; - } - - public function urlHostNotMatches($subject) { - if ($subject === null) { - return false; - } - return !$this->urlHostMatches($subject); - } - - public function urlSchemeEquals($subject) { - if ($subject === null) { - return false; - } - $scheme = wfWAFUtils::parse_url((string) $subject, PHP_URL_SCHEME); - if (!is_string($scheme)) { - return wfWAFUtils::strlen($this->getExpected()) == 0; - } - - return strtolower($scheme) == strtolower($this->getExpected()); - } - - public function urlSchemeNotEquals($subject) { - if ($subject === null) { - return false; - } - return !$this->urlSchemeEquals($subject); - } - - public function urlSchemeMatches($subject) { - if ($subject === null) { - return false; - } - $scheme = wfWAFUtils::parse_url((string) $subject, PHP_URL_SCHEME); - if (!is_string($scheme)) { - return false; - } - - return preg_match((string) $this->getExpected(), $scheme, $this->matches) > 0; - } - - public function urlSchemeNotMatches($subject) { - if ($subject === null) { - return false; - } - return !$this->urlSchemeMatches($subject); - } - - public function versionEquals($subject) { - if ($subject === null) { - return false; - } - return version_compare($subject, $this->getExpected(), '=='); - } - - public function versionNotEquals($subject) { - if ($subject === null) { - return false; - } - return version_compare($subject, $this->getExpected(), '!='); - } - - public function versionGreaterThan($subject) { - if ($subject === null) { - return false; - } - return version_compare($subject, $this->getExpected(), '>'); - } - - public function versionGreaterThanEqualTo($subject) { - if ($subject === null) { - return false; - } - return version_compare($subject, $this->getExpected(), '>='); - } - - public function versionLessThan($subject) { - if ($subject === null) { - return false; - } - return version_compare($subject, $this->getExpected(), '<'); - } - - public function versionLessThanEqualTo($subject) { - if ($subject === null) { - return false; - } - return version_compare($subject, $this->getExpected(), '<='); - } - - public function keyExists($subject) { - if (!is_array($subject)) { - return false; - } - return array_key_exists($this->getExpected(), $subject); - } - - public function keyMatches($subject) { - if (!is_array($subject)) { - return false; - } - foreach($subject as $key=>$value) { - if (preg_match($this->getExpected(), $key)) - return true; - } - return false; - } - - public function exists($subject) { - return isset($subject); - } - - /** - * @return mixed - */ - public function getAction() { - return $this->action; - } - - /** - * @param mixed $action - */ - public function setAction($action) { - $this->action = $action; - } - - /** - * @return mixed - */ - public function getExpected() { - return $this->expected; - } - - /** - * @param mixed $expected - */ - public function setExpected($expected) { - $this->expected = $expected; - } - - /** - * @return mixed - */ - public function getSubjects() { - return $this->subjects; - } - - /** - * @param mixed $subjects - * @return $this - */ - public function setSubjects($subjects) { - $this->subjects = $subjects; - return $this; - } - - /** - * @return mixed - */ - public function getMatches() { - return $this->matches; - } - - /** - * @return mixed - */ - public function getFailedSubjects() { - return (array)$this->failedSubjects; - } - - /** - * @return mixed - */ - public function getResult() { - return $this->result; - } - - /** - * @return mixed - */ - public function getMultiplier() { - return $this->multiplier; - } - - /** - * @return wfWAF - */ - public function getWAF() { - return $this->waf; - } - - /** - * @param wfWAF $waf - */ - public function setWAF($waf) { - $this->waf = $waf; - if (is_array($this->subjects)) { - foreach ($this->subjects as $subject) { - if (is_object($subject) && method_exists($subject, 'setWAF')) { - $subject->setWAF($waf); - } - } - } - if (is_object($this->expected) && method_exists($this->expected, 'setWAF')) { - $this->expected->setWAF($waf); - } - } - - /** - * @return wfWAFRule - */ - public function getRule() { - return $this->rule; - } - - /** - * @param wfWAFRule $rule - */ - public function setRule($rule) { - $this->rule = $rule; - } -} - -class wfWAFRuleComparisonGroup implements wfWAFRuleInterface { - - private $items = array(); - private $failedComparisons = array(); - private $result = false; - private $waf; - - /** - * @var wfWAFRule - */ - private $rule; - - public function __construct() { - $args = func_get_args(); - foreach ($args as $arg) { - $this->add($arg); - } - } - - public function __sleep() { - return array( - 'items', - ); - } - - public function add($item) { - $this->items[] = $item; - } - - public function remove($item) { - $key = array_search($item, $this->items); - if ($key !== false) { - unset($this->items[$key]); - } - } - - /** - * - * @throws wfWAFRuleException - */ - public function evaluate() { - if (count($this->items) % 2 != 1) { - throw new wfWAFRuleException('Invalid number of rules and logical operators. Should be odd number of rules and logical operators.'); - } - - $this->result = false; - $operator = null; - /** @var wfWAFRuleComparison|wfWAFRuleLogicalOperator|wfWAFRuleComparisonGroup $comparison */ - for ($i = 0; $i < count($this->items); $i++) { - $comparison = $this->items[$i]; - if ($i % 2 == 1 && !($comparison instanceof wfWAFRuleLogicalOperator)) { - throw new wfWAFRuleException('Invalid WAF rule format, expected wfWAFRuleLogicalOperator, got ' . get_class($comparison)); - } - if ($i % 2 == 0 && !($comparison instanceof wfWAFRuleComparison || $comparison instanceof wfWAFRuleComparisonGroup)) { - throw new wfWAFRuleException('Invalid WAF rule format, expected wfWAFRuleComparison or wfWAFRuleComparisonGroup, got ' . get_class($comparison)); - } - - if ($comparison instanceof wfWAFRuleLogicalOperator) { - $operator = $comparison; - continue; - } - if ($comparison instanceof wfWAFRuleComparison || $comparison instanceof wfWAFRuleComparisonGroup) { - $comparison->setRule($this->getRule()); - if ($operator instanceof wfWAFRuleLogicalOperator) { - $operator->setCurrentValue($this->result); - $operator->setComparison($comparison); - $this->result = $operator->evaluate(); - } else { - $this->result = $comparison->evaluate(); - } - } - if ($comparison instanceof wfWAFRuleComparison && $comparison->getResult()) { - if ($comparison->hasSubject()) { - foreach ($comparison->getFailedSubjects() as $failedSubject) { - $this->failedComparisons[] = new wfWAFRuleComparisonFailure( - $failedSubject['subject'], $failedSubject['value'], $comparison->getExpected(), - $comparison->getAction(), $failedSubject['multiplier'], $failedSubject['matches'] - ); - } - } - else { - $this->failedComparisons[] = new wfWAFRuleComparisonFailure( - '', '', $comparison->getExpected(), - $comparison->getAction(), 1, array() - ); - } - } - if ($comparison instanceof wfWAFRuleComparisonGroup && $comparison->getResult()) { - foreach ($comparison->getFailedComparisons() as $comparisonFail) { - $this->failedComparisons[] = $comparisonFail; - } - } - } - return $this->result; - } - - /** - * @return string - * @throws wfWAFRuleException - */ - public function render() { - if (count($this->items) % 2 != 1) { - throw new wfWAFRuleException('Invalid number of rules and logical operators. Should be odd number of rules and logical operators.'); - } - - $return = array(); - /** - * @var wfWAFRuleInterface $item - */ - for ($i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ($i % 2 == 1 && !($item instanceof wfWAFRuleLogicalOperator)) { - throw new wfWAFRuleException('Invalid WAF rule format, expected wfWAFRuleLogicalOperator, got ' . get_class($item)); - } - if ($i % 2 == 0 && !($item instanceof wfWAFRuleComparison || $item instanceof wfWAFRuleComparisonGroup)) { - throw new wfWAFRuleException('Invalid WAF rule format, expected wfWAFRule or wfWAFRuleComparisonGroup, got ' . get_class($item)); - } - $return[] = $item->render(); - } - return sprintf('new %s(%s)', get_class($this), join(', ', $return)); - } - - /** - * @return string - * @throws wfWAFRuleException - */ - public function renderRule() { - if (count($this->items) % 2 != 1) { - throw new wfWAFRuleException('Invalid number of rules and logical operators. Should be odd number of rules and logical operators.'); - } - - $return = array(); - /** - * @var wfWAFRuleInterface $item - */ - for ($i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ($i % 2 == 1 && !($item instanceof wfWAFRuleLogicalOperator)) { - throw new wfWAFRuleException('Invalid WAF rule format, expected wfWAFRuleLogicalOperator, got ' . get_class($item)); - } - if ($i % 2 == 0 && !($item instanceof wfWAFRuleComparison || $item instanceof wfWAFRuleComparisonGroup)) { - throw new wfWAFRuleException('Invalid WAF rule format, expected wfWAFRule or wfWAFRuleComparisonGroup, got ' . get_class($item)); - } - $return[] = $item->renderRule(); - } - return sprintf('(%s)', join(' ', $return)); - } - - public function debug() { - $debug = ''; - /** @var wfWAFRuleComparisonFailure $failedComparison */ - foreach ($this->getFailedComparisons() as $failedComparison) { - $debug .= $failedComparison->getParamKey() . ' ' . $failedComparison->getAction() . ' ' . $failedComparison->getExpected() . "\n"; - } - return $debug; - } - - /** - * @return array - */ - public function getItems() { - return $this->items; - } - - /** - * @param array $items - */ - public function setItems($items) { - $this->items = $items; - } - - /** - * @return mixed - */ - public function getFailedComparisons() { - return $this->failedComparisons; - } - - /** - * @return boolean - */ - public function getResult() { - return $this->result; - } - - /** - * @return wfWAFRule - */ - public function getRule() { - return $this->rule; - } - - /** - * @param wfWAFRule $rule - */ - public function setRule($rule) { - $this->rule = $rule; - } - - /** - * @return mixed - */ - public function getWAF() { - return $this->waf; - } - - /** - * @param mixed $waf - */ - public function setWAF($waf) { - $this->waf = $waf; - foreach ($this->items as $item) { - if (is_object($item) && method_exists($item, 'setWAF')) { - $item->setWAF($waf); - } - } - } -} - -class wfWAFRuleComparisonFailure { - - private $paramKey; - private $expected; - private $action; - /** - * @var null|int - */ - private $multiplier; - /** - * @var string - */ - private $paramValue; - /** - * @var mixed - */ - private $matches; - - /** - * @param string $paramKey - * @param string $paramValue - * @param string $expected - * @param string $action - * @param mixed $multiplier - * @param mixed $matches - */ - public function __construct($paramKey, $paramValue, $expected, $action, $multiplier = null, $matches = null) { - $this->setParamKey($paramKey); - $this->setExpected($expected); - $this->setAction($action); - $this->setMultiplier($multiplier); - $this->setParamValue($paramValue); - $this->setMatches($matches); - } - - public function __sleep() { - return array( - 'paramKey', - 'expected', - 'action', - 'multiplier', - 'paramValue', - 'matches', - ); - } - - /** - * @return mixed - */ - public function getParamKey() { - return $this->paramKey; - } - - /** - * @param mixed $paramKey - */ - public function setParamKey($paramKey) { - $this->paramKey = $paramKey; - } - - /** - * @return mixed - */ - public function getExpected() { - return $this->expected; - } - - /** - * @param mixed $expected - */ - public function setExpected($expected) { - $this->expected = $expected; - } - - /** - * @return mixed - */ - public function getAction() { - return $this->action; - } - - /** - * @param mixed $action - */ - public function setAction($action) { - $this->action = $action; - } - - /** - * @return int|null - */ - public function getMultiplier() { - return $this->multiplier; - } - - /** - * @param int|null $multiplier - */ - public function setMultiplier($multiplier) { - $this->multiplier = $multiplier; - } - - /** - * @return bool - */ - public function hasMultiplier() { - return $this->getMultiplier() > 1; - } - - /** - * @return string - */ - public function getParamValue() { - return $this->paramValue; - } - - /** - * @param string $paramValue - */ - public function setParamValue($paramValue) { - $this->paramValue = $paramValue; - } - - /** - * @return mixed - */ - public function getMatches() { - return $this->matches; - } - - /** - * @param mixed $matches - */ - public function setMatches($matches) { - $this->matches = $matches; - } -} - -class wfWAFRuleComparisonSubject { - - /** - * @var array - */ - private $subject; - /** - * @var array - */ - private $filters; - - /** @var wfWAF */ - private $waf; - - public static function create($waf, $subject, $filters) { - return new self($waf, $subject, $filters); - } - - /** - * wfWAFRuleComparisonSubject constructor. - * @param wfWAF $waf - * @param array $subject - * @param array $filters - */ - public function __construct($waf, $subject, $filters) { - $this->waf = $waf; - $this->subject = $subject; - $this->filters = $filters; - } - - public function __sleep() { - return array( - 'subject', - 'filters', - ); - } - - private function getRootValue($subject) { - if ($subject instanceof wfWAFRuleComparisonSubject) { - return $subject->getValue(); - } - else { - return $this->getWAF()->getGlobal($subject); - } - } - - /** - * @return mixed|null - */ - public function getValue() { - $subject = $this->getSubject(); - if (!is_array($subject)) { - return $this->runFilters($this->getRootValue($subject), $subject); - } - else if (count($subject) > 0) { - $globalKey = array_shift($subject); - return $this->runFilters($this->_getValue($subject, $this->getRootValue($globalKey))); - } - return null; - } - - /** - * @param array $subjectKey - * @param array $global - * @return null - */ - private function _getValue($subjectKey, $global) { - if (!is_array($global) || !is_array($subjectKey)) { - return null; - } - - $key = array_shift($subjectKey); - if (array_key_exists($key, $global)) { - if (count($subjectKey) > 0) { - return $this->_getValue($subjectKey, $global[$key]); - } else { - return $global[$key]; - } - } - return null; - } - - - /** - * @return string - */ - public function getKey() { - return wfWAFRuleComparison::getSubjectKey($this->getSubject()); - } - - /** - * @param mixed $value - * @return mixed - */ - private function runFilters($value) { - $filters = $this->getFilters(); - if (is_array($filters)) { - foreach ($filters as $filterArgs) { - if (method_exists($this, 'filter' . $filterArgs[0])) { - $value = call_user_func_array(array($this, 'filter' . $filterArgs[0]), array_merge(array($value), array_slice($filterArgs, 1))); - } - } - } - return $value; - } - - /** - * @param mixed $value - * @return string - */ - public function filterBase64decode($value) { - if (is_string($value)) { - return base64_decode($value); - } - return $value; - } - - public function filterReplace($value, $find, $replace) { - return str_replace($find, $replace, $value); - } - - public function filterPregReplace($value, $pattern, $replacement, $limit=-1) { - return preg_replace($pattern, $replacement, $value, $limit); - } - - private function getMatchingKeys($array, $patterns) { - if (!is_array($array)) - return array(); - $filtered = array(); - $pattern = array_shift($patterns); - foreach ($array as $key=>$value) { - if (preg_match($pattern, $key)) { - if (empty($patterns)) { - $filtered[] = $value; - } - else { - $filtered = array_merge($filtered, $this->getMatchingKeys($value, $patterns)); - } - } - } - return $filtered; - } - - public function filterFilterKeys($values) { - $patterns = array_slice(func_get_args(), 1); - return $this->getMatchingKeys($values, $patterns); - } - - public function filterJson($value) { - return wfWAFUtils::json_decode(@(string)$value, true); - } - - private function renderSubject() { - $subjects = $this->getSubject(); - if (is_array($subjects)) { - $rendered = array(); - foreach ($subjects as $subject) { - if ($subject instanceof wfWAFRuleComparisonSubject) { - array_push($rendered, $subject->render()); - } - else { - array_push($rendered, var_export($subject, true)); - } - } - return sprintf('array(%s)', implode(', ', $rendered)); - } - else { - return var_export($subjects, true); - } - } - - /** - * @return string - */ - public function render() { - return sprintf('%s::create($this, %s, %s)', get_class($this), $this->renderSubject(), - var_export($this->getFilters(), true)); - } - - /** - * @return string - */ - public function renderRule() { - $subjects = $this->getSubject(); - if (is_array($subjects)) { - if (strpos($subjects[0], '.') !== false) { - list($superGlobal, $global) = explode('.', $subjects[0], 2); - unset($subjects[0]); - $subjects = array_merge(array($superGlobal, $global), $subjects); - } - $rule = ''; - foreach ($subjects as $subject) { - if (preg_match("/^[a-zA-Z_][a-zA-Z0-9_]*$/", $subject)) { - $rule .= "$subject."; - } else { - $rule = rtrim($rule, '.'); - $rule .= sprintf("['%s']", str_replace("'", "\\'", $subject)); - } - } - $rule = rtrim($rule, '.'); - } else { - $rule = $this->getSubject(); - } - - foreach ($this->getFilters() as $filter) { - $rule = $filter[0] . '(' . implode(',', array_merge(array($rule), array_slice($filter, 1))) . ')'; - } - return $rule; - } - - /** - * @return array - */ - public function getSubject() { - return $this->subject; - } - - /** - * @param array $subject - */ - public function setSubject($subject) { - $this->subject = $subject; - } - - /** - * @return array - */ - public function getFilters() { - return $this->filters; - } - - /** - * @param array $filters - */ - public function setFilters($filters) { - $this->filters = $filters; - } - - /** - * @return wfWAF - */ - public function getWAF() { - return $this->waf; - } - - private static function setWafForSubject($subject, $waf) { - if (is_array($subject)) { - foreach ($subject as $child) { - self::setWafForSubject($child, $waf); - } - } - else if ($subject instanceof wfWAFRuleComparisonSubject) { - $subject->setWAF($waf); - } - } - - /** - * @param wfWAF $waf - */ - public function setWAF($waf) { - $this->waf = $waf; - self::setWafForSubject($this->subject, $waf); - } -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/shutdown.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/shutdown.php deleted file mode 100644 index cd0679c7..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/shutdown.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -class wfShutdownFunction { - - private $callable; - private $priority; - - public function __construct($callable, $priority) { - $this->callable = $callable; - $this->priority = $priority; - } - - public function invoke() { - call_user_func($this->callable); - } - - public function getPriority() { - return $this->priority; - } - - public function __wakeup() { - $this->callable = function() {}; - } - -} - -class wfShutdownRegistry { - - private static $instance = null; - - const PRIORITY_LAST = 100; - - private $functions = array(); - private $registered = false; - - public function handleShutdown() { - usort($this->functions, function ($a, $b) { - return $a->getPriority() - $b->getPriority(); - }); - foreach ($this->functions as $function) { - $function->invoke(); - } - } - - public function register($function, $priority = 50) { - array_push($this->functions, new wfShutdownFunction($function, $priority)); - $this->registerSelf(); - } - - private function registerSelf() { - if (!$this->registered) { - register_shutdown_function(array($this, 'handleShutdown')); - $this->registered = true; - } - } - - public function __wakeup() { - $this->functions = array(); - $this->registered = false; - } - - public static function getDefaultInstance() { - if (self::$instance === null) - self::$instance = new self(); - return self::$instance; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage.php deleted file mode 100644 index 86c46543..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -interface wfWAFStorageInterface { - const IP_BLOCKS_ALL = PHP_INT_MAX; - const IP_BLOCKS_SINGLE = 1; //1 << 0 - const IP_BLOCKS_BLACKLIST = 2; //1 << 1 - - public function hasPreviousAttackData($olderThan); - - public function hasNewerAttackData($newerThan); - - public function getAttackData(); - - public function getAttackDataArray(); - - public function getNewestAttackDataArray($newerThan); - - public function truncateAttackData(); - - /** - * @param array $failedRules - * @param string $failedParamKey - * @param string $failedParamValue - * @param wfWAFRequestInterface $request - * @param mixed $_ - * @return mixed - */ - public function logAttack($failedRules, $failedParamKey, $failedParamValue, $request, $_ = null); - - /** - * @param int $timestamp - * @param string $ip - * @param bool $ssl - * @param array $failedRuleIDs - * @param wfWAFRequestInterface|string $request - * @param mixed $_ - * @return mixed - */ -// public function logAttack($timestamp, $ip, $ssl, $failedRuleIDs, $request, $_ = null); - - /** - * @param float $timestamp - * @param string $ip - * @return mixed - */ - public function blockIP($timestamp, $ip); - - public function isIPBlocked($ip); - - public function purgeIPBlocks($types = wfWAFStorageInterface::IP_BLOCKS_ALL); - - public function getConfig($key, $default = null, $category = ''); - - public function setConfig($key, $value, $category = ''); - - public function unsetConfig($key, $category = ''); - - public function uninstall(); - - //optional public function fileList(); - - public function isInLearningMode(); - - public function isDisabled(); - - public function getRulesDSLCacheFile(); - - public function isAttackDataFull(); - - public function vacuum(); - - public function getRules(); - - public function setRules($rules); - - public function needsInitialRules(); - - public function getDescription(); -} -} diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php deleted file mode 100644 index d1ab75b9..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php +++ /dev/null @@ -1,1616 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -class wfWAFStorageFile implements wfWAFStorageInterface { - - const LOG_FILE_HEADER = "<?php exit('Access denied'); __halt_compiler(); ?>\n"; - const LOG_INFO_HEADER = "******************************************************************\nThis file is used by the Wordfence Web Application Firewall. Read \nmore at https://docs.wordfence.com/en/Web_Application_Firewall_FAQ\n******************************************************************\n"; - const IP_BLOCK_RECORD_SIZE = 24; - private $rules; - private $failScores; - private $variables; - private $whitelistedParams; - private $blacklistedParams; - - public static function allowFileWriting() { - if (defined('WFWAF_ALWAYS_ALLOW_FILE_WRITING') && WFWAF_ALWAYS_ALLOW_FILE_WRITING) { - return true; - } - - if (wfWAFUtils::isCli()) { - return false; - } - return true; - } - - public static function atomicFilePutContents($file, $content, $prefix = 'config') { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $tmpFile = @tempnam(dirname($file), $prefix . '.tmp.'); - if (!$tmpFile) { - $tmpFile = @tempnam(sys_get_temp_dir(), $prefix . '.tmp.'); - } - if (!$tmpFile) { - throw new wfWAFStorageFileException('Unable to save temporary file for atomic writing.'); - } - $tmpHandle = @fopen($tmpFile, 'w'); - if (!$tmpHandle) { - throw new wfWAFStorageFileException('Unable to save temporary file ' . $tmpFile . ' for atomic writing.'); - } - - self::lock($tmpHandle, LOCK_EX); - fwrite($tmpHandle, $content); - fflush($tmpHandle); - self::lock($tmpHandle, LOCK_UN); - fclose($tmpHandle); - chmod($tmpFile, self::permissions()); - - // Attempt to verify file has finished writing (sometimes the disk will lie for better benchmarks) - $tmpContents = file_get_contents($tmpFile); - if ($tmpContents !== $content) { - throw new wfWAFStorageFileException('Unable to verify temporary file contents for atomic writing.'); - } - - if (!@rename($tmpFile, $file)) { - $backFile = @tempnam(dirname($file), $prefix . '.bak.'); - if (!$backFile) { - $backFile = @tempnam(sys_get_temp_dir(), $prefix . '.bak.'); - } - if (!$backFile) { - throw new wfWAFStorageFileException('Unable to save temporary file for atomic writing.'); - } - if (WFWAF_DEBUG) { - rename($file, $backFile); - rename($tmpFile, $file); - unlink($backFile); - unlink($tmpFile); - } else { - @rename($file, $backFile); - @rename($tmpFile, $file); - @unlink($backFile); - @unlink($tmpFile); - } - } - } - - public static function lock($handle, $lock, $wouldLock = 1) { - $locked = flock($handle, $lock, $wouldLock); - if (!$locked) { - error_log('Lock not acquired ' . $locked); - } - return $locked; - } - - public static function permissions() { - if (defined('WFWAF_LOG_FILE_MODE')) { - return WFWAF_LOG_FILE_MODE; - } - - static $_cachedPermissions = null; - if ($_cachedPermissions === null) { - if (defined('WFWAF_LOG_PATH')) { - $template = rtrim(WFWAF_LOG_PATH, '/') . '/template.php'; - if (file_exists($template)) { - $stat = @stat($template); - if ($stat !== false) { - $mode = $stat[2]; - $updatedMode = 0600; - if (($mode & 0020) == 0020) { - $updatedMode = $updatedMode | 0060; - } - $_cachedPermissions = $updatedMode; - return $updatedMode; - } - } - } - return 0660; - } - return $_cachedPermissions; - } - - /** - * @var resource - */ - private $ipCacheFileHandle; - - /** - * @var string|null - */ - private $attackDataFile; - /** - * @var wfWAFAttackDataStorageFileEngine - */ - private $attackDataEngine; - - /** - * @var string|null - */ - private $ipCacheFile; - private $configFile; - private $rulesFile; - private $rulesDSLCacheFile; - private $dataChanged = array(); - private $data = array(); - /** - * @var resource[] - */ - private $configFileHandles = array(); - private $uninstalled; - private $attackDataRows; - private $attackDataNewerThan; - - - /** - * @param string|null $attackDataFile - * @param string|null $ipCacheFile - * @param string|null $configFile - * @param string|null $rulesFile - * @param null $rulesDSLCacheFile - */ - public function __construct($attackDataFile = null, $ipCacheFile = null, $configFile = null, $rulesFile = null, $rulesDSLCacheFile = null) { - $this->setAttackDataFile($attackDataFile); - $this->setIPCacheFile($ipCacheFile); - $this->setConfigFile($configFile); - $this->setRulesFile($rulesFile); - $this->setRulesDSLCacheFile($rulesDSLCacheFile); - } - - /** - * @param float $olderThan - * @return bool - * @throws wfWAFStorageFileException - */ - public function hasPreviousAttackData($olderThan) { - $this->open(); - $timestamp = $this->getAttackDataEngine()->getOldestTimestamp(); - return $timestamp && $timestamp < $olderThan; - } - - /** - * @param float $newerThan - * @return bool - * @throws wfWAFStorageFileException - */ - public function hasNewerAttackData($newerThan) { - $this->open(); - $timestamp = $this->getAttackDataEngine()->getNewestTimestamp(); - return $timestamp && $timestamp > $newerThan; - } - - - /** - * @return mixed|string|void - * @throws wfWAFStorageFileException - */ - public function getAttackData() { - $this->open(); - $this->attackDataRows = array(); - $this->getAttackDataEngine()->scanRows(array($this, '_getAttackDataRowsSerialized')); - return wfWAFUtils::json_encode($this->attackDataRows); - } - - /** - * @return array - * @throws wfWAFStorageFileException - */ - public function getAttackDataArray() { - $this->open(); - $this->attackDataRows = array(); - $this->getAttackDataEngine()->scanRows(array($this, '_getAttackDataRows')); - return $this->attackDataRows; - } - - /** - * @param resource $fileHandle - * @param int $offset - * @param int $length - */ - public function _getAttackDataRowsSerialized($fileHandle, $offset, $length) { - fseek($fileHandle, $offset); - self::lock($fileHandle, LOCK_SH); - $binary = fread($fileHandle, $length); - self::lock($fileHandle, LOCK_UN); - $row = wfWAFAttackDataStorageFileEngineRow::unpack($binary); - $data = wfWAFUtils::json_decode($row->getData(), true); - if (is_array($data)) { - array_unshift($data, $row->getTimestamp()); - $this->attackDataRows[] = $data; - } - } - - /** - * @param resource $fileHandle - * @param int $offset - * @param int $length - */ - public function _getAttackDataRows($fileHandle, $offset, $length) { - fseek($fileHandle, $offset); - self::lock($fileHandle, LOCK_SH); - $binary = fread($fileHandle, $length); - self::lock($fileHandle, LOCK_UN); - $row = wfWAFAttackDataStorageFileEngineRow::unpack($binary); - $data = $this->unserializeRow($row->getData()); - array_unshift($data, $row->getTimestamp()); - $this->attackDataRows[] = $data; - } - - /** - * @param $newerThan - * @return array - * @throws wfWAFStorageFileException - */ - public function getNewestAttackDataArray($newerThan) { - $this->open(); - $this->attackDataRows = array(); - $this->attackDataNewerThan = $newerThan; - $this->getAttackDataEngine()->scanRowsReverse(array($this, '_getAttackDataRowsNewerThan')); - return $this->attackDataRows; - } - - /** - * @param resource $fileHandle - * @param int $offset - * @param int $length - * @return bool - */ - public function _getAttackDataRowsNewerThan($fileHandle, $offset, $length) { - fseek($fileHandle, $offset); - self::lock($fileHandle, LOCK_SH); - $binaryTimestamp = fread($fileHandle, 8); - self::lock($fileHandle, LOCK_UN); - $timestamp = wfWAFAttackDataStorageFileEngine::unpackMicrotime($binaryTimestamp); - if ($timestamp > $this->attackDataNewerThan) { - $binary = $binaryTimestamp . fread($fileHandle, $length - 8); - $row = wfWAFAttackDataStorageFileEngineRow::unpack($binary); - $data = $this->unserializeRow($row->getData()); - if (is_array($data)) { - array_unshift($data, $row->getTimestamp()); - $this->attackDataRows[] = $data; - } - return true; - } - return false; - } - - /** - * @return bool - * @throws wfWAFStorageFileException - */ - public function truncateAttackData() { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - $this->open(); - $this->getAttackDataEngine()->truncate(); - return $this->getAttackDataEngine()->getRowCount() === 0; - } - - /** - * @return bool - * @throws wfWAFStorageFileException - */ - public function isAttackDataFull() { - $this->open(); - return $this->getAttackDataEngine()->getRowCount() === wfWAFAttackDataStorageFileEngine::MAX_ROWS; - } - - /** - * @param array $failedRules - * @param string $failedParamKey - * @param string $failedParamValue - * @param wfWAFRequestInterface $request - * @param mixed $_ - * @return mixed - */ - public function logAttack($failedRules, $failedParamKey, $failedParamValue, $request, $_ = null) { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $this->open(); - $row = array( - $request->getTimestamp(), - $request->getIP(), - (int) $this->isInLearningMode(), - $failedParamKey, - $failedParamValue, - ); - - $failedRulesString = ''; - if (is_array($failedRules)) { - /** - * @var int $index - * @var wfWAFRule|int $rule - */ - foreach ($failedRules as $index => $rule) { - if ($rule instanceof wfWAFRule) { - $failedRulesString .= $rule->getRuleID() . '|'; - } else { - $failedRulesString .= $rule . '|'; - } - } - $failedRulesString = wfWAFUtils::substr($failedRulesString, 0, -1); - } - $row[] = $failedRulesString; - $row[] = $request->getProtocol() === 'https' ? 1 : 0; - $row[] = (string) $request; - // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection - $args = func_get_args(); - $row = array_merge($row, array_slice($args, 4)); - - if (($rowString = $this->serializeRow($row)) !== false) { - $attackRow = new wfWAFAttackDataStorageFileEngineRow(microtime(false), $rowString); - $this->getAttackDataEngine()->addRow($attackRow); - } - } - - /** - * @param int $timestamp - * @param string $ip - * @return mixed|void - * @throws wfWAFStorageFileException - */ - public function blockIP($timestamp, $ip, $type = wfWAFStorageInterface::IP_BLOCKS_SINGLE) { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $this->open(); - if (!$this->isIPBlocked($ip)) { - self::lock($this->ipCacheFileHandle, LOCK_EX); - fseek($this->ipCacheFileHandle, 0, SEEK_END); - fwrite($this->ipCacheFileHandle, wfWAFUtils::inet_pton($ip) . pack('V', $timestamp) . pack('V', $type)); - fflush($this->ipCacheFileHandle); - self::lock($this->ipCacheFileHandle, LOCK_UN); - } - } - - /** - * @param string $ip - * @return bool - */ - public function isIPBlocked($ip) { - $this->open(); - $ipBin = wfWAFUtils::inet_pton($ip); - fseek($this->ipCacheFileHandle, wfWAFUtils::strlen(self::LOG_FILE_HEADER), SEEK_SET); - self::lock($this->ipCacheFileHandle, LOCK_SH); - while (!feof($this->ipCacheFileHandle)) { - $ipStr = fread($this->ipCacheFileHandle, self::IP_BLOCK_RECORD_SIZE); - if (wfWAFUtils::strlen($ipStr) < self::IP_BLOCK_RECORD_SIZE) { break; } - $ip2 = wfWAFUtils::substr($ipStr, 0, 16); - $unpacked = @unpack('V', wfWAFUtils::substr($ipStr, 16, 4)); - if (is_array($unpacked)) { - $t = array_shift($unpacked); - if ($ipBin === $ip2 && $t >= time()) { - self::lock($this->ipCacheFileHandle, LOCK_UN); - return true; - } - } - } - self::lock($this->ipCacheFileHandle, LOCK_UN); - return false; - } - - public function pathForConfig($category = '') { - $category = strtolower(preg_replace('/[^a-z0-9]/i', '', $category)); - $path = $this->_normalizeSlashes($this->getConfigFile()); - $components = explode('/', $path); - $last = $components[count($components) - 1]; - if (preg_match('/^([^.]+)(\..+$|$)/', $last, $matches) && !empty($category)) { - $last = $matches[1] . '-' . $category . $matches[2]; - } - $components[count($components) - 1] = $last; - $path = implode('/', $components); - return $path; - } - - /** - * @return bool - */ - public function isOpened($category = '') { - return isset($this->configFileHandles[$category]) && is_resource($this->configFileHandles[$category]); - } - - /** - * @throws wfWAFStorageFileException - */ - public function open($category = '') { - if ($this->isOpened($category)) { - return; - } - if ($this->uninstalled) { - throw new wfWAFStorageFileException('Unable to open WAF file storage, WAF has been uninstalled.'); - } - - if (!empty($category)) { //A non-empty category only opens that config file rather than including the rest of the WAF files. - $this->_open($this->pathForConfig($category), $this->configFileHandles, $category, self::LOG_FILE_HEADER . self::LOG_INFO_HEADER . serialize($this->getDefaultConfiguration($category)), true); - return; - } - - $files = array( - array($this->getIPCacheFile(), 'ipCacheFileHandle', false, self::LOG_FILE_HEADER, true), - array($this->pathForConfig($category), 'configFileHandles', $category, self::LOG_FILE_HEADER . self::LOG_INFO_HEADER . serialize($this->getDefaultConfiguration($category)), false), - ); - foreach ($files as $file) { - list($filePath, $fileHandle, $arrayKey, $defaultContents, $remakeIfCorrupt) = $file; - $this->_open($filePath, $this->$fileHandle, $arrayKey, $defaultContents, $remakeIfCorrupt); - } - - $this->setAttackDataEngine(new wfWAFAttackDataStorageFileEngine($this->getAttackDataFile())); - $this->getAttackDataEngine()->open(); - } - - private function _open($filePath, &$fileHandle, $arrayKey, $defaultContents, $remakeIfCorrupt = false) { - if (!file_exists($filePath)) { - @file_put_contents($filePath, $defaultContents, LOCK_EX); - } - if (wfWAFStorageFile::allowFileWriting()) { - @chmod($filePath, self::permissions()); - } - if ($arrayKey !== false) { - $fileHandle[$arrayKey] = @fopen($filePath, 'r+'); - $handle = $fileHandle[$arrayKey]; - } - else { - $fileHandle = @fopen($filePath, 'r+'); - $handle = $fileHandle; - } - - if (!$handle && $remakeIfCorrupt && wfWAFStorageFile::allowFileWriting()) { - @file_put_contents($filePath, $defaultContents, LOCK_EX); - @chmod($filePath, self::permissions()); - if ($arrayKey !== false) { - $fileHandle[$arrayKey] = @fopen($filePath, 'r+'); - $handle = $fileHandle[$arrayKey]; - } - else { - $fileHandle = @fopen($filePath, 'r+'); - $handle = $fileHandle; - } - } - - if (!$handle) { - throw new wfWAFStorageFileException('Unable to open ' . $filePath . ' for reading and writing.'); - } - } - - /** - * - */ - public function close($category = '') { - if (!$this->isOpened($category)) { - return; - } - - fclose($this->configFileHandles[$category]); - unset($this->configFileHandles[$category]); - - if (!empty($category)) { //A non-empty category only closes that config file rather than including the rest of the WAF files. - return; - } - - fclose($this->ipCacheFileHandle); - $this->ipCacheFileHandle = null; - $this->getAttackDataEngine()->close(); - } - - /** - * Clean up old expired IP blocks. - */ - public function vacuum() { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $this->open(); - $readPointer = wfWAFUtils::strlen(self::LOG_FILE_HEADER); - $writePointer = wfWAFUtils::strlen(self::LOG_FILE_HEADER); - fseek($this->ipCacheFileHandle, $readPointer, SEEK_SET); - self::lock($this->ipCacheFileHandle, LOCK_EX); - $ipCacheRow = fread($this->ipCacheFileHandle, self::IP_BLOCK_RECORD_SIZE); - while (!feof($this->ipCacheFileHandle)) { - $unpacked = @unpack('V', wfWAFUtils::substr($ipCacheRow, 16, 4)); - if (is_array($unpacked)) { - $expires = array_shift($unpacked); - if ($expires >= time()) { - fseek($this->ipCacheFileHandle, $writePointer, SEEK_SET); - fwrite($this->ipCacheFileHandle, $ipCacheRow); - $writePointer += self::IP_BLOCK_RECORD_SIZE; - } - } - $readPointer += self::IP_BLOCK_RECORD_SIZE; - fseek($this->ipCacheFileHandle, $readPointer, SEEK_SET); - $ipCacheRow = fread($this->ipCacheFileHandle, self::IP_BLOCK_RECORD_SIZE); - } - ftruncate($this->ipCacheFileHandle, $writePointer); - fflush($this->ipCacheFileHandle); - self::lock($this->ipCacheFileHandle, LOCK_UN); - } - - /** - * Remove all existing IP blocks. - */ - public function purgeIPBlocks($types = wfWAFStorageInterface::IP_BLOCKS_ALL) { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $this->open(); - $readPointer = wfWAFUtils::strlen(self::LOG_FILE_HEADER); - $writePointer = wfWAFUtils::strlen(self::LOG_FILE_HEADER); - fseek($this->ipCacheFileHandle, $readPointer, SEEK_SET); - self::lock($this->ipCacheFileHandle, LOCK_EX); - if ($types !== wfWAFStorageInterface::IP_BLOCKS_ALL) { - $ipCacheRow = fread($this->ipCacheFileHandle, self::IP_BLOCK_RECORD_SIZE); - while (!feof($this->ipCacheFileHandle)) { - $unpacked = @unpack('Vexpires/Vtype', wfWAFUtils::substr($ipCacheRow, 16, 8)); - if (is_array($unpacked)) { - $type = $unpacked['type']; - if (($type & $types) == 0) { - fseek($this->ipCacheFileHandle, $writePointer, SEEK_SET); - fwrite($this->ipCacheFileHandle, $ipCacheRow); - $writePointer += self::IP_BLOCK_RECORD_SIZE; - } - } - $readPointer += self::IP_BLOCK_RECORD_SIZE; - fseek($this->ipCacheFileHandle, $readPointer, SEEK_SET); - $ipCacheRow = fread($this->ipCacheFileHandle, self::IP_BLOCK_RECORD_SIZE); - } - } - ftruncate($this->ipCacheFileHandle, $writePointer); - fflush($this->ipCacheFileHandle); - self::lock($this->ipCacheFileHandle, LOCK_UN); - } - - /** - * @param string $key - * @param mixed $default - * @return mixed - */ - public function getConfig($key, $default = null, $category = '') { - if (!isset($this->data[$category]) || $this->data[$category] === false) - { - $this->fetchConfigData($category); - } - return (is_array($this->data[$category]) && array_key_exists($key, $this->data[$category])) ? $this->data[$category][$key] : $default; - } - - /** - * @param string $key - * @param mixed $value - */ - public function setConfig($key, $value, $category = '') { - if (!isset($this->data[$category]) || $this->data[$category] === false) { - $this->fetchConfigData($category); - } - - if (is_array($this->data[$category])) { - if (!isset($this->dataChanged[$category]) && ( - (array_key_exists($key, $this->data[$category]) && $this->data[$category][$key] !== $value) || - !array_key_exists($key, $this->data[$category]) - ) - ) { - $this->dataChanged[$category] = array($key, true); - register_shutdown_function(array($this, 'saveConfig'), $category); - } - $this->data[$category][$key] = $value; - } - } - - /** - * @param string $key - */ - public function unsetConfig($key, $category = '') { - if (!isset($this->data[$category]) || $this->data[$category] === false) { - $this->fetchConfigData($category); - } - if (!isset($this->dataChanged[$category]) && is_array($this->data[$category]) && array_key_exists($key, $this->data[$category])) { - $this->dataChanged[$category] = array($key, true); - register_shutdown_function(array($this, 'saveConfig'), $category); - } - unset($this->data[$category][$key]); - } - - /** - * @throws wfWAFStorageFileException - */ - public function fetchConfigData($category = '', $redoing = false) { - unset($this->configFileHandles[$category]); - $this->open($category); - self::lock($this->configFileHandles[$category], LOCK_SH); - $i = 0; - // Attempt to read contents of the config file. This could be in the middle of a write, so we account for it and - // wait for the operation to complete. - fseek($this->configFileHandles[$category], wfWAFUtils::strlen(self::LOG_FILE_HEADER), SEEK_SET); - $serializedData = ''; - while (!feof($this->configFileHandles[$category])) { - $serializedData .= fread($this->configFileHandles[$category], 1024); - } - if (wfWAFUtils::substr($serializedData, 0, 1) == '*') { - $serializedData = wfWAFUtils::substr($serializedData, wfWAFUtils::strlen(self::LOG_INFO_HEADER)); - } - $this->data[$category] = @unserialize($serializedData); - - if ($this->data[$category] === false) { - if (!empty($category) && !$redoing) { - $this->regenerateConfigFile($category); - $this->fetchConfigData($category, true); - return; - } - throw new wfWAFStorageFileConfigException('Error reading Wordfence Firewall config data, configuration file could be corrupted or inaccessible. Path: ' . $this->pathForConfig($category)); - } - - self::lock($this->configFileHandles[$category], LOCK_UN); - } - - /** - * @throws wfWAFStorageFileException - */ - public function saveConfig($category = '') { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - if (WFWAF_DEBUG) { - error_log('Saving WAF config for change in key ' . $this->dataChanged[$category][0] . ', value: ' . - ((is_object($this->data[$category][$this->dataChanged[$category][0]]) || $this->dataChanged[$category][0] === 'cron') ? - gettype($this->data[$category][$this->dataChanged[$category][0]]) : - var_export($this->data[$category][$this->dataChanged[$category][0]], true))); - } - - if ($this->uninstalled) { - return; - } - - if (WFWAF_IS_WINDOWS) { - self::lock($this->configFileHandles[$category], LOCK_UN); - fclose($this->configFileHandles[$category]); - file_put_contents($this->pathForConfig($category), self::LOG_FILE_HEADER . self::LOG_INFO_HEADER . serialize($this->data[$category]), LOCK_EX); - } else { - wfWAFStorageFile::atomicFilePutContents($this->pathForConfig($category), self::LOG_FILE_HEADER . self::LOG_INFO_HEADER . serialize($this->data[$category])); - } - - if (WFWAF_IS_WINDOWS) { - $this->configFileHandles[$category] = fopen($this->pathForConfig($category), 'r+'); - } - } - - /** - * - */ - public function uninstall() { - $this->uninstalled = true; - $this->close(); - foreach ($this->configFileHandles as $key => $handle) { - $this->close($key); - } - $this->removeConfigFiles(); - @unlink($this->getAttackDataFile()); - @unlink($this->getIPCacheFile()); - @unlink($this->getRulesDSLCacheFile()); - } - - public function fileList() { - $fileList = array(); - $fileList[] = $this->getAttackDataFile(); - $fileList[] = $this->getIPCacheFile(); - if (defined('WFWAF_DEBUG') && WFWAF_DEBUG) { - $fileList[] = $this->getRulesDSLCacheFile(); - } - $fileList[] = $this->getConfigFile(); - $configDir = dirname($this->getConfigFile()); - $dir = opendir($configDir); - if ($dir) { - $escapedPath = preg_quote($this->_normalizeSlashes($this->getConfigFile()), '/'); - $components = explode('\\/', $escapedPath); - $pattern = $components[count($components) - 1]; - if (preg_match('/^(.+?)(\\\..+$|$)/i', $pattern, $matches)) { - $pattern = $matches[1] . '\\-[a-z0-9]+' . $matches[2]; //Results in a pattern like config\-[a-z0-9]\.php - } - - while ($path = readdir($dir)) { - if ($path == '.' || $path == '..') { continue; } - if (is_dir($configDir . '/' . $path)) { continue; } - if (preg_match('/^' . $pattern . '$/i', $path)) { - $fileList[] = $configDir . '/' . $path; - } - } - closedir($dir); - } - return $fileList; - } - - public function removeConfigFiles() { - @unlink($this->getConfigFile()); - $configDir = dirname($this->getConfigFile()); - $dir = opendir($configDir); - if ($dir) { - $escapedPath = preg_quote($this->_normalizeSlashes($this->getConfigFile()), '/'); - $components = explode('\\/', $escapedPath); - $pattern = $components[count($components) - 1]; - if (preg_match('/^(.+?)(\\\..+$|$)/i', $pattern, $matches)) { - $pattern = $matches[1] . '\\-[a-z0-9]+' . $matches[2]; //Results in a pattern like config\-[a-z0-9]\.php - } - - while ($path = readdir($dir)) { - if ($path == '.' || $path == '..') { continue; } - if (is_dir($configDir . '/' . $path)) { continue; } - if (preg_match('/^' . $pattern . '$/i', $path)) { - @unlink($configDir . '/' . $path); - } - } - closedir($dir); - } - } - - public function regenerateConfigFile($category = '') { - $path = $this->pathForConfig($category); - if (file_exists($path)) { - @unlink($path); - } - - $this->_open($path, $this->configFileHandles, $category, self::LOG_FILE_HEADER . self::LOG_INFO_HEADER . serialize($this->getDefaultConfiguration($category)), false); - } - - protected function _normalizeSlashes($path) { - return str_replace('\\', '/', $path); //The same sanitation performed by WordPress -- PHP can handle both, but it simplifies path processing - } - - /** - * @return bool - */ - public function isInLearningMode() { - if ($this->getConfig('wafStatus', '') == 'learning-mode') { - if ($this->getConfig('learningModeGracePeriodEnabled', false)) { - if ($this->getConfig('learningModeGracePeriod', 0) > time()) { - return true; - } - } else { - return true; - } - } - return false; - } - - public function isDisabled() { - return $this->getConfig('wafStatus', '') === 'disabled' || $this->getConfig('wafDisabled', 0); - } - - /** - * @return array - */ - public function getDefaultConfiguration($category = '') { - if (empty($category)) { - return array( - 'wafStatus' => 'learning-mode', - 'learningModeGracePeriodEnabled' => 1, - 'learningModeGracePeriod' => time() + (86400 * 7), - 'authKey' => wfWAFUtils::getRandomString(64), - ); - } - return array(); - } - - /** - * @return mixed - */ - public function getConfigFile() { - return $this->configFile; - } - - /** - * @param mixed $configFile - */ - public function setConfigFile($configFile) { - $this->configFile = $configFile; - } - - /** - * @return string|null - */ - public function getAttackDataFile() { - return $this->attackDataFile; - } - - /** - * @param string|null $attackDataFile - */ - public function setAttackDataFile($attackDataFile) { - $this->attackDataFile = $attackDataFile; - } - - /** - * @return string|null - */ - public function getIPCacheFile() { - return $this->ipCacheFile; - } - - /** - * @param string|null $ipCacheFile - */ - public function setIPCacheFile($ipCacheFile) { - $this->ipCacheFile = $ipCacheFile; - } - - /** - * @return mixed - */ - public function getRulesDSLCacheFile() { - return $this->rulesDSLCacheFile; - } - - /** - * @param mixed $rulesDSLCacheFile - */ - public function setRulesDSLCacheFile($rulesDSLCacheFile) { - $this->rulesDSLCacheFile = $rulesDSLCacheFile; - } - - /** - * param key, param value, request string - * - * @var array - */ - private $rowsToB64 = array(3, 4, 7); - - /** - * @param $row - * @return bool|string - */ - private function serializeRow($row) { - foreach ($this->rowsToB64 as $index) { - if (array_key_exists($index, $row)) { - $row[$index] = base64_encode((string) $row[$index]); - } - } - $row = wfWAFUtils::json_encode($row); - if (is_string($row) && wfWAFUtils::strlen($row) > 0) { - return $row; - } - return false; - } - - /** - * @param $row - * @return array|bool|mixed|object - */ - private function unserializeRow($row) { - if ($row) { - $json = wfWAFUtils::json_decode($row, true); - if (is_array($json)) { - foreach ($this->rowsToB64 as $index) { - if (array_key_exists($index, $json)) { - $json[$index] = base64_decode((string) $json[$index]); - } - } - return $json; - } - } - return false; - } - - /** - * @return wfWAFAttackDataStorageFileEngine - */ - public function getAttackDataEngine() { - return $this->attackDataEngine; - } - - /** - * @param wfWAFAttackDataStorageFileEngine $attackDataEngine - */ - public function setAttackDataEngine($attackDataEngine) { - $this->attackDataEngine = $attackDataEngine; - } - - public function getRules() { - throw new wfWAFStorageFileException('wfWAFStorageFile::getRules not implemented.'); - } - - public function setRules($rules) { - throw new wfWAFStorageFileException('wfWAFStorageFile::getRules not implemented.'); - } - - public function needsInitialRules() { - if (file_exists($this->getRulesFile())) { - return is_writeable($this->getRulesFile()) && !filesize($this->getRulesFile()); - } else { - return is_writeable(dirname($this->getRulesFile())); - } - } - - /** - * @return mixed - */ - public function getRulesFile() { - return $this->rulesFile; - } - - /** - * @param mixed $rulesFile - */ - public function setRulesFile($rulesFile) { - $this->rulesFile = $rulesFile; - } - - public function getDescription() { - return __('file system', 'wordfence'); - } -} - -class wfWAFAttackDataStorageFileEngine { - - const MAX_ROWS = 10000; - const MAX_READ_LENGTH = 51200; - const FILE_SIGNATURE = "wfWAF\x00\x00\x00"; - - /** - * @param string|float|null $microtime - * @return string - */ - public static function packMicrotime($microtime = null) { - if ($microtime === null) { - $microtime = microtime(); - } - if (is_string($microtime)) { - list($msec, $sec) = explode(' ', $microtime, 2); - } else if (is_float($microtime)) { - list($sec, $msec) = explode('.', (string) $microtime, 2); - $msec = '0.' . $msec; - } else { - throw new InvalidArgumentException(__METHOD__ . ' $microtime expected to be string or float, received ' - . gettype($microtime)); - } - $msec = $msec * 1000000; - return pack('V*', $sec, $msec); - } - - /** - * @param string $binary - * @return string - */ - public static function unpackMicrotime($binary) { - if (!is_string($binary) || wfWAFUtils::strlen($binary) !== 8) { - throw new InvalidArgumentException(__METHOD__ . ' $binary expected to be string with length of 8, received ' - . gettype($binary) . (is_string($binary) ? ' of length ' . wfWAFUtils::strlen($binary) : '')); - } - list(, $attackLogSeconds, $attackLogMicroseconds) = @unpack('V*', $binary); - return sprintf('%d.%s', $attackLogSeconds, str_pad($attackLogMicroseconds, 6, '0', STR_PAD_LEFT)); - } - - public static function getCompressionAlgos() { - static $compressionFunctions; - if ($compressionFunctions === null) { - $compressionFunctions = array( - new wfWAFStorageFileCompressionGZDeflate(), - new wfWAFStorageFileCompressionGZCompress(), - new wfWAFStorageFileCompressionGZEncode(), - ); - } - return $compressionFunctions; - } - - /** - * @param string $decompressed - * @return mixed - */ - public static function compress($decompressed) { - if (empty($decompressed)) - return $decompressed; - - $compressionAlgos = self::getCompressionAlgos(); - /** @var wfWAFStorageFileCompressionAlgo $algo */ - foreach ($compressionAlgos as $algo) { - if ($algo->isUsable() && ($compressed = $algo->testCompression($decompressed)) !== false) { - return $compressed; - } - } - return $decompressed; - } - - /** - * @param string $compressed - * @return mixed - */ - public static function decompress($compressed) { - if (empty($compressed)) - return $compressed; - - $compressionAlgos = self::getCompressionAlgos(); - /** @var wfWAFStorageFileCompressionAlgo $algo */ - foreach ($compressionAlgos as $algo) { - if ($algo->isUsable() && ($decompressed = $algo->decompress($compressed)) !== false) { - return $decompressed; - } - } - return $compressed; - } - - - private $file; - private $fileHandle; - - private $header = array(); - private $offsetTable = array(); - - /** - * wfWAFStorageFileEngine constructor. - * @param string $file - */ - public function __construct($file) { - $this->file = $file; - } - - /** - * @throws wfWAFStorageFileException - */ - public function open() { - if (is_resource($this->fileHandle)) { - return; - } - if (!file_exists($this->file)) { - @file_put_contents($this->file, $this->getDefaultHeader(), LOCK_EX); - } - if (wfWAFStorageFile::allowFileWriting()) { - @chmod($this->file, wfWAFStorageFile::permissions()); - } - $this->fileHandle = @fopen($this->file, 'r+'); - if (!$this->fileHandle) { - throw new wfWAFStorageFileException('Unable to open ' . $this->file . ' for reading and writing.'); - } - } - - /** - * - */ - public function close() { - if (is_resource($this->fileHandle)) { - fclose($this->fileHandle); - } - $this->fileHandle = null; - $this->header = array(); - $this->offsetTable = array(); - } - - /** - * @param int $offset - * @return int - */ - private function seek($offset) { - return fseek($this->fileHandle, $offset, SEEK_SET); - } - - /** - * @return int - */ - private function seekToData() { - return $this->seek(wfWAFUtils::strlen($this->getHeaderLength())); - } - - /** - * @param int $length - * @return string - */ - private function read($length) { - if ($length > self::MAX_READ_LENGTH) { - $length = self::MAX_READ_LENGTH; - } - return fread($this->fileHandle, $length); - } - - /** - * @param string $data - * @return int - */ - private function write($data) { - return fwrite($this->fileHandle, $data); - } - - /** - * @return bool - */ - private function lockRead() { - return wfWAFStorageFile::lock($this->fileHandle, LOCK_SH); - } - - /** - * @return bool - */ - private function lockWrite() { - return wfWAFStorageFile::lock($this->fileHandle, LOCK_EX); - } - - /** - * @return bool - */ - private function unlock() { - return wfWAFStorageFile::lock($this->fileHandle, LOCK_UN); - } - - /** - * @return int - */ - public function getHeaderLength() { - return wfWAFUtils::strlen($this->getDefaultHeader()); - } - - /** - * @return string - */ - public function getDefaultHeader() { - /** - * 51 PHP die() header - * 8 Signature - * 8 oldest 64bit timestamp - * 8 newest 64bit timestamp - * 4 row count - * 1600 offset table - * 1 last length - */ - $headerLength = wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) - + 8 + 8 + 4 + (self::MAX_ROWS * 4); - return wfWAFStorageFile::LOG_FILE_HEADER - . self::FILE_SIGNATURE - . str_repeat("\x00", 8 + 8 + 4) - . pack('V', $headerLength) - . str_repeat("\x00", self::MAX_ROWS * 4); - } - - /** - * @throws wfWAFStorageFileException - */ - public function unpackHeader() { - if ($this->header) { - return $this->header; - } - - $this->open(); - $this->header = array(); - $this->seek(0); - $this->lockRead(); - $this->header['phpHeader'] = $this->read(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER)); - $this->header['signature'] = $this->read(wfWAFUtils::strlen(self::FILE_SIGNATURE)); - if ($this->header['phpHeader'] !== wfWAFStorageFile::LOG_FILE_HEADER || $this->header['signature'] !== self::FILE_SIGNATURE) { - $this->unlock(); - $this->truncate(); - $this->lockRead(); - $this->seek(0); - $this->lockRead(); - $this->header['phpHeader'] = $this->read(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER)); - $this->header['signature'] = $this->read(wfWAFUtils::strlen(self::FILE_SIGNATURE)); - } - $this->header['oldestTimestamp'] = self::unpackMicrotime($this->read(8)); - $this->header['newestTimestamp'] = self::unpackMicrotime($this->read(8)); - list(, $this->header['rowCount']) = @unpack('V', $this->read(4)); - $this->header['offsetTable'] = $this->unpackOffsetTable(); - $this->unlock(); - return $this->header; - } - - /** - * @return array - */ - private function unpackOffsetTable() { - if ($this->offsetTable) { - return $this->offsetTable; - } - $rowCount = min($this->header['rowCount'], self::MAX_ROWS); - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8 + 8 + 4); - $offsetTableBinary = $this->read(($rowCount + 1) * 4); - $this->offsetTable = array_values(@unpack('V*', $offsetTableBinary)); - return $this->offsetTable; - } - - /** - * @param callable $callback - */ - public function scanRows($callback) { - if (!is_callable($callback)) { - throw new InvalidArgumentException(__METHOD__ . ' $callback expected to be callable, received ' . gettype($callback)); - } - $this->open(); - $header = $this->unpackHeader(); - $this->seekToData(); - for ($index = 0; $index < $header['rowCount'] && $index < self::MAX_ROWS; $index++) { - $offset = $header['offsetTable'][$index]; - $length = $header['offsetTable'][$index + 1] - $offset; - if ($length > self::MAX_READ_LENGTH) { - $length = self::MAX_READ_LENGTH; - } - $result = call_user_func($callback, $this->fileHandle, $offset, $length); - if ($result === false) { - break; - } - } - } - - /** - * @param callable $callback - */ - public function scanRowsReverse($callback) { - if (!is_callable($callback)) { - throw new InvalidArgumentException(__METHOD__ . ' $callback expected to be callable, received ' . gettype($callback)); - } - $this->open(); - $header = $this->unpackHeader(); - // $this->seekToData(); - for ($index = min($header['rowCount'], self::MAX_ROWS) - 1; $index >= 0; $index--) { - $offset = $header['offsetTable'][$index]; - $length = $header['offsetTable'][$index + 1] - $offset; - if ($length > self::MAX_READ_LENGTH) { - $length = self::MAX_READ_LENGTH; - } - $result = call_user_func($callback, $this->fileHandle, $offset, $length); - if ($result === false) { - break; - } - } - } - - /** - * @param $index - * @return wfWAFAttackDataStorageFileEngineRow - * @throws wfWAFStorageFileException - */ - public function getRow($index) { - $this->open(); - $this->header = array(); - $this->offsetTable = array(); - $header = $this->unpackHeader(); - $this->seekToData(); - if ($index < $header['rowCount'] && $index >= 0) { - $offset = $header['offsetTable'][$index]; - $length = $header['offsetTable'][$index + 1] - $offset; - } else { - return false; - } - $this->seek($offset); - $this->lockRead(); - $binary = $this->read($length); - $this->unlock(); - return wfWAFAttackDataStorageFileEngineRow::unpack($binary); - } - - /** - * @return mixed - * @throws wfWAFStorageFileException - */ - public function getRowCount() { - $this->open(); - $header = $this->unpackHeader(); - return $header['rowCount']; - } - - /** - * @param wfWAFAttackDataStorageFileEngineRow $row - * @return bool - * @throws wfWAFStorageFileException - */ - public function addRow($row) { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $this->open(); - - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8 + 8); - $this->lockRead(); - list(, $rowCount) = @unpack('V', $this->read(4)); - $this->unlock(); - if ($rowCount >= self::MAX_ROWS) { - return false; - } - - $this->lockWrite(); - - //Re-read the row count in case it changed between releasing the shared lock and getting the exclusive - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8 + 8); - list(, $rowCount) = @unpack('V', $this->read(4)); - - //Start the write - $this->header = array(); - $this->offsetTable = array(); - - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8 + 8 + 4 + ($rowCount * 4)); - list(, $nextRowOffset) = @unpack('V', $this->read(4)); - - $rowString = $row->pack(); - - // Update offset table - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8 + 8 + 4 + (($rowCount + 1) * 4)); - $this->write(pack('V', $nextRowOffset + wfWAFUtils::strlen($rowString))); - - // Update rowCount - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8 + 8); - $this->write(pack('V', $rowCount + 1)); - - // Write data - $this->seek($nextRowOffset); - $packedTimestamp = wfWAFUtils::substr($rowString, 0, 8); - $this->write($rowString); - - // Update oldest timestamp - if ($rowCount === 0) { - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE)); - $this->write($packedTimestamp); - } - - // Update newest timestamp - $this->seek(wfWAFUtils::strlen(wfWAFStorageFile::LOG_FILE_HEADER) + wfWAFUtils::strlen(self::FILE_SIGNATURE) + 8); - $this->write($packedTimestamp); - - $this->unlock(); - - $this->header = array(); - $this->offsetTable = array(); - - return true; - } - - /** - * - */ - public function truncate() { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $defaultHeader = $this->getDefaultHeader(); - $this->close(); - if (WFWAF_IS_WINDOWS) { - file_put_contents($this->getFile(), $defaultHeader, LOCK_EX); - } else { - wfWAFStorageFile::atomicFilePutContents($this->getFile(), $defaultHeader, 'attack'); - } - $this->header = array(); - $this->offsetTable = array(); - $this->open(); - } - - /** - * @return mixed - * @throws wfWAFStorageFileException - */ - public function getOldestTimestamp() { - $this->open(); - if ($this->getRowCount() === 0) { - return false; - } - $header = $this->unpackHeader(); - return $header['oldestTimestamp']; - } - - /** - * @return mixed - * @throws wfWAFStorageFileException - */ - public function getNewestTimestamp() { - $this->open(); - if ($this->getRowCount() === 0) { - return false; - } - $header = $this->unpackHeader(); - return $header['newestTimestamp']; - } - - /** - * @return string - */ - public function getFile() { - return $this->file; - } - - /** - * @param string $file - */ - public function setFile($file) { - $this->file = $file; - } -} - -interface wfWAFAttackDataStorageFileEngineScanRowCallback { - - public function scanRow($handle, $offset, $length); -} - -class wfWAFAttackDataStorageFileEngineResultSet implements wfWAFAttackDataStorageFileEngineScanRowCallback { - - private $rows = array(); - - public function scanRow($handle, $offset, $length) { - fseek($handle, $offset); - $binary = fread($handle, $length); - $this->rows = wfWAFAttackDataStorageFileEngineRow::unpack($binary); - } - - /** - * @return array - */ - public function getRows() { - return $this->rows; - } -} - -class wfWAFAttackDataStorageFileEngineScanRowAttackDataNewer implements wfWAFAttackDataStorageFileEngineScanRowCallback { - - /** - * @var int - */ - private $newerThan; - - /** - * wfWAFStorageFileEngineScanRowAttackDataNewer constructor. - * @param int $newerThan - */ - public function __construct($newerThan) { - $this->newerThan = $newerThan; - } - - /** - * @param resource $handle - * @param int $offset - * @param int $length - * @return bool - */ - public function scanRow($handle, $offset, $length) { - $attackLogTimeBin = fread($handle, 8); - list(, $attackLogSeconds, $attackLogMicroseconds) = @unpack('VV', $attackLogTimeBin); - $attackLogTime = $attackLogSeconds . '.' . $attackLogMicroseconds; - return $this->newerThan < $attackLogTime; - } -} - -class wfWAFAttackDataStorageFileEngineScanRowAttackDataOlder implements wfWAFAttackDataStorageFileEngineScanRowCallback { - - /** - * @var int - */ - private $olderThan; - - /** - * wfWAFStorageFileEngineScanRowAttackDataNewer constructor. - * @param int $olderThan - */ - public function __construct($olderThan) { - $this->olderThan = $olderThan; - } - - /** - * @param resource $handle - * @param int $offset - * @param int $length - * @return bool - */ - public function scanRow($handle, $offset, $length) { - $attackLogTimeBin = fread($handle, 8); - list(, $attackLogSeconds, $attackLogMicroseconds) = @unpack('VV', $attackLogTimeBin); - $attackLogTime = $attackLogSeconds . '.' . $attackLogMicroseconds; - return $this->olderThan > $attackLogTime; - } -} - -class wfWAFAttackDataStorageFileEngineRow { - - /** - * @param string $binary - * @return wfWAFAttackDataStorageFileEngineRow - */ - public static function unpack($binary) { - $attackLogTime = wfWAFAttackDataStorageFileEngine::unpackMicrotime(wfWAFUtils::substr($binary, 0, 8)); - $data = wfWAFAttackDataStorageFileEngine::decompress(wfWAFUtils::substr($binary, 8)); - return new self($attackLogTime, $data); - } - - /** - * @var float|string - */ - private $timestamp; - /** - * @var string - */ - private $data; - - /** - * @param float $timestamp - * @param string $data - */ - public function __construct($timestamp, $data) { - $this->timestamp = $timestamp; - $this->data = $data; - } - - /** - * @return string - */ - public function pack() { - return wfWAFAttackDataStorageFileEngine::packMicrotime($this->getTimestamp()) . wfWAFAttackDataStorageFileEngine::compress($this->getData()); - } - - /** - * @return float|string - */ - public function getTimestamp() { - return $this->timestamp; - } - - /** - * @param float|string $timestamp - */ - public function setTimestamp($timestamp) { - $this->timestamp = $timestamp; - } - - /** - * @return string - */ - public function getData() { - return $this->data; - } - - /** - * @param string $data - */ - public function setData($data) { - $this->data = $data; - } -} - -abstract class wfWAFStorageFileCompressionAlgo { - - abstract public function isUsable(); - - abstract public function compress($string); - - abstract public function decompress($binary); - - /** - * @param string $string - * @return bool - */ - public function testCompression($string) { - $compressed = $this->compress($string); - if ($string === $this->decompress($compressed)) { - return $compressed; - } - return false; - } -} - -class wfWAFStorageFileCompressionGZDeflate extends wfWAFStorageFileCompressionAlgo { - - public function isUsable() { - return function_exists('gzinflate') && function_exists('gzdeflate'); - } - - public function compress($string) { - return @gzdeflate($string); - } - - public function decompress($binary) { - return @gzinflate($binary); - } -} - -class wfWAFStorageFileCompressionGZCompress extends wfWAFStorageFileCompressionAlgo { - - public function isUsable() { - return function_exists('gzuncompress') && function_exists('gzcompress'); - } - - public function compress($string) { - return @gzcompress($string); - } - - public function decompress($binary) { - return @gzuncompress($binary); - } -} - -class wfWAFStorageFileCompressionGZEncode extends wfWAFStorageFileCompressionAlgo { - - public function isUsable() { - return function_exists('gzencode') && function_exists('gzdecode'); - } - - public function compress($string) { - return @gzencode($string); - } - - public function decompress($binary) { - return @gzdecode($binary); - } -} - -class wfWAFStorageFileException extends wfWAFException { - -} - -class wfWAFStorageFileConfigException extends wfWAFStorageFileException { - -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/mysql.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/mysql.php deleted file mode 100644 index 31a7343e..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/mysql.php +++ /dev/null @@ -1,1144 +0,0 @@ -<?php - -/** - * - */ -class wfWAFStorageMySQL implements wfWAFStorageInterface { - - private $_usingLowercase; - - /** - * @var wfWAFStorageEngineDatabase - */ - private $db; - /** - * @var string - */ - private $tablePrefix; - private $uninstalled; - private $dataChanged = false; - private $data = array(); - private $dataToSave = array(); - private $shutdownRegistry = null; - - public $installing = false; - - /** - * @param wfWAFStorageEngineDatabase $engine - * @param string $tablePrefix - */ - public function __construct($engine, $tablePrefix = 'wp_', $shutdownRegistry = null) { - $this->db = $engine; - $this->tablePrefix = $tablePrefix; - $this->shutdownRegistry = $shutdownRegistry === null ? wfShutdownRegistry::getDefaultInstance() : $shutdownRegistry; - } - - public function usingLowercase() { - if ($this->_usingLowercase === null) { - $table = $this->tablePrefix . 'wfConfig'; - $tableExists = $this->getDb()->get_var("SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND BINARY TABLE_NAME='$table'"); - $this->_usingLowercase = $tableExists !== $table; - } - return $this->_usingLowercase; - } - - /** - * Returns the table with the site (single site installations) or network (multisite) prefix added. - * - * @param string $table - * @param bool $applyCaseConversion Whether or not to convert the table case to what is actually in use. - * @return string - */ - public function networkTable($table, $applyCaseConversion = true) { - if ($this->usingLowercase() && $applyCaseConversion) { - $table = strtolower($table); - } - return $this->tablePrefix . $table; - } - - /** - * Check if there's attack before a certain timestamp. - * - * @param int $olderThan - * @return bool - */ - public function hasPreviousAttackData($olderThan) { - $table = $this->networkTable('wfHits'); - $lastAttackDataTruncateTime = floatval($this->getConfig('lastAttackDataTruncateTime')); - $count = $this->db->get_var('SELECT count(*) FROM ' . $table . ' where attackLogTime < ? and attackLogTime > ?', array( - sprintf('%.6f', $olderThan), - $lastAttackDataTruncateTime, - )); - return $count > 0; - } - - /** - * Check if there's attack data after a given timestamp. - * - * @param int $newerThan - * @return bool - */ - public function hasNewerAttackData($newerThan) { - $table = $this->networkTable('wfHits'); - $lastAttackDataTruncateTime = floatval($this->getConfig('lastAttackDataTruncateTime')); - $count = $this->db->get_var('SELECT count(*) FROM ' . $table . ' where attackLogTime > ?', array( - sprintf('%.6f', max($newerThan, $lastAttackDataTruncateTime)), - )); - return $count > 0; - } - - /** - * Get all attack data. - * - * - */ - public function getAttackData() { - $table = $this->networkTable('wfHits'); - $lastAttackDataTruncateTime = floatval($this->getConfig('lastAttackDataTruncateTime')); - $results = $this->db->get_results('SELECT * FROM ' . $table . ' WHERE attackLogTime > ?', array( - $lastAttackDataTruncateTime, - )); - - $data = array(); - foreach ($results as $row) { - $actionData = wfWAFUtils::json_decode($row['actionData'], true); - if (!is_array($actionData)) - $actionData = array(); - $data[] = array( - $row['attackLogTime'], - $row['ctime'], - wfWAFUtils::inet_ntop($row['IP']), - (array_key_exists('learningMode', $actionData) ? $actionData['learningMode'] : 0), - (array_key_exists('paramKey', $actionData) ? $actionData['paramKey'] : false), - (array_key_exists('paramValue', $actionData) ? $actionData['paramValue'] : false), - (array_key_exists('failedRules', $actionData) ? $actionData['failedRules'] : ''), - strpos($row['URL'], 'https') === 0 ? 1 : 0, - (array_key_exists('fullRequest', $actionData) ? $actionData['fullRequest'] : ''), - ); - } - return wfWAFUtils::json_encode($data); - } - - /** - * Get all attack data in array format. - */ - public function getAttackDataArray() { - return $this->getNewestAttackDataArray(floatval($this->getConfig('lastAttackDataTruncateTime'))); - } - - /** - * Get attack data after a certain timestamp in array format. - * - * @param int $newerThan - * @return array - */ - public function getNewestAttackDataArray($newerThan) { - $table = $this->networkTable('wfHits'); - $results = $this->db->get_results('SELECT * FROM ' . $table . ' WHERE attackLogTime > ?', array( - $newerThan, - )); - - $data = array(); - foreach ($results as $row) { - $actionData = wfWAFUtils::json_decode($row['actionData'], true); - if (!is_array($actionData)) - $actionData = array(); - $data[] = array( - $row['attackLogTime'], - $row['ctime'], - wfWAFUtils::inet_ntop($row['IP']), - (array_key_exists('learningMode', $actionData) ? $actionData['learningMode'] : 0), - (array_key_exists('paramKey', $actionData) ? base64_decode($actionData['paramKey']) : false), - (array_key_exists('paramValue', $actionData) ? base64_decode($actionData['paramValue']) : false), - (array_key_exists('failedRules', $actionData) ? $actionData['failedRules'] : ''), - strpos($row['URL'], 'https') === 0 ? 1 : 0, - (array_key_exists('fullRequest', $actionData) ? base64_decode($actionData['fullRequest']) : ''), - (array_key_exists('requestMetadata', $actionData) ? $actionData['requestMetadata'] : ''), - $row['id'], - ); - } - return $data; - } - - /** - * I don't think this will be needed for what it's used for in the plugin. - */ - public function truncateAttackData() { - $this->setConfig('lastAttackDataTruncateTime', microtime(true)); - return true; - } - - /** - * Insert request into wfHits. - * - * @param array $failedRules - * @param string $failedParamKey - * @param string $failedParamValue - * @param wfWAFRequestInterface $request - * @param mixed $_ - * @return mixed - */ - public function logAttack($failedRules, $failedParamKey, $failedParamValue, $request, $_ = null) { - $table = $this->networkTable('wfHits'); - - $failedRulesString = ''; - if (is_array($failedRules)) { - /** - * @var int $index - * @var wfWAFRule|int $rule - */ - foreach ($failedRules as $index => $rule) { - if ($rule instanceof wfWAFRule) { - $failedRulesString .= $rule->getRuleID() . '|'; - } else { - $failedRulesString .= $rule . '|'; - } - } - $failedRulesString = wfWAFUtils::substr($failedRulesString, 0, -1); - } - if (preg_match('/\blogged\b/i', $failedRulesString)) { - $statusCode = 200; - $action = 'logged:waf'; - } else { - $statusCode = 403; - $action = 'blocked:waf'; - } - - $ua = ''; - $referer = ''; - $headers = $request->getHeaders(); - if (is_array($headers)) { - if (array_key_exists('User-Agent', $headers)) { - $ua = $headers['User-Agent']; - } - if (array_key_exists('Referer', $headers)) { - $referer = $headers['Referer']; - } - } - - $attackData = array( - 'failedRules' => $failedRulesString, - 'paramKey' => base64_encode($failedParamKey), - 'paramValue' => base64_encode($failedParamValue), - 'path' => base64_encode($request->getPath()), - 'fullRequest' => base64_encode($request), - 'requestMetadata' => $request->getMetadata(), - ); - $attackDataJson = wfWAFUtils::json_encode_limited($attackData, 65535, array('fullRequest', 'paramValue')); - - $row = array( - 'attackLogTime' => microtime(true), - 'ctime' => $request->getTimestamp(), - 'IP' => wfWAFUtils::inet_pton($request->getIP()), - 'statusCode' => $statusCode, - 'URL' => $request->getProtocol() . '://' . $request->getHost() . $request->getURI(), - 'isGoogle' => 0, - 'userID' => 0, - 'newVisit' => 0, - 'referer' => $referer, - 'UA' => $ua, - 'action' => $action, - 'actionData' => $attackDataJson - ); - - try { - return $this->db->insert($table, $row); - } catch (wfWAFStorageEngineMySQLiException $e) { // Let the firewall block the request without logging. - error_log('Failed to log attack data: ' . $e->getMessage()); - return false; - } - } - - /** - * Insert IP into wfBlocks. - * - * @param float $timestamp - * @param string $ip - * @param int $type - * @return mixed - */ - public function blockIP($timestamp, $ip, $type = wfWAFStorageInterface::IP_BLOCKS_SINGLE) { - $blockedIPs = $this->getConfig('wfWAFBlockedIPs'); - if (!$blockedIPs) { - $blockedIPs = array(); - } - $blockedIPs[$ip] = array($timestamp, $type); - $this->setConfig('wfWAFBlockedIPs', $blockedIPs); - return true; - } - - /** - * Check if the IP is in wfBlocks. - * - * @param string $ip - * @return bool - */ - public function isIPBlocked($ip) { - $blockedIPs = $this->getConfig('wfWAFBlockedIPs'); - if (!$blockedIPs) { - $blockedIPs = array(); - } - return array_key_exists($ip, $blockedIPs) && is_array($blockedIPs[$ip]) && $blockedIPs[$ip][0] >= time(); - } - - /** - * Remove all blocked IPs. - * - * @param int $types - */ - public function purgeIPBlocks($types = wfWAFStorageInterface::IP_BLOCKS_ALL) { - if ($types === wfWAFStorageInterface::IP_BLOCKS_ALL) { - $this->unsetConfig('wfWAFBlockedIPs'); - } else { - $blockedIPs = $this->getConfig('wfWAFBlockedIPs'); - if (!$blockedIPs) { - $blockedIPs = array(); - } - foreach ($blockedIPs as $key => $values) { - list($timestamp, $type) = $values; - if (($type & $types) > 0 || $timestamp < time()) { - unset($blockedIPs[$key]); - } - } - $this->setConfig('wfWAFBlockedIPs', $blockedIPs); - } - } - - /** - * Query config item from wfConfig table. - * - * @param $key - * @param null $default - * @param string $category - * @return mixed - */ - public function getConfig($key, $default = null, $category = '') { - if (!$this->data) { - $this->autoloadConfig(); - } - - if (array_key_exists($category, $this->data) && array_key_exists($key, $this->data[$category])) { - return $this->data[$category][$key]; - } - - $table = $this->getStorageTable($category); - $val = $this->db->get_var('SELECT val FROM ' . $table . ' WHERE name = ?', array( - $key, - )); - if ($val !== null) { - if (in_array($key, $this->getSerializedParams())) { - $value = @unserialize($val); - $this->data[$category][$key] = $value; - return $value; - } - $this->data[$category][$key] = $val; - return $val; - } - return $default; - } - - /** - * Insert/update wfConfig table for WAF option. - * - * @param $key - * @param $value - * @param string $category - */ - public function setConfig($key, $value, $category = '') { - if (!array_key_exists($category, $this->data)) { - $this->data[$category] = array(); - } - - $changedConfigValue = (array_key_exists($key, $this->data[$category]) && $this->data[$category][$key] != $value) || - !array_key_exists($key, $this->data[$category]); - - if (!$this->dataChanged && $changedConfigValue) { - $this->dataChanged = array($category, $key, true); - $this->shutdownRegistry->register(array($this, 'saveConfig'), wfShutdownRegistry::PRIORITY_LAST); - } - if ($changedConfigValue) { - $this->dataToSave[$category][$key] = $value; - } - - $this->data[$category][$key] = $value; - } - - /** - * Delete config item from wfConfig table. - * - * @param $key - * @param string $category - */ - public function unsetConfig($key, $category = '') { - unset($this->data[$category][$key]); - $table = $this->getStorageTable($category); - $this->db->delete($table, array( - 'name' => $key, - )); - } - - /** - * - */ - public function saveConfig() { - if ($this->uninstalled) { - return; - } - - try { - foreach ($this->dataToSave as $category => $data) { - foreach ($data as $key => $value) { - if (in_array($key, $this->getSerializedParams())) { - $value = serialize($value); - } - $table = $this->getStorageTable($category); - $this->db->query("INSERT INTO {$table} (name, val, autoload) values (?, ?, 'no') ON DUPLICATE KEY UPDATE val = ?", array( - $key, - $value, - $value, - )); - } - } - } catch (wfWAFStorageEngineMySQLiException $e) { - if (WFWAF_DEBUG) { - error_log($e); - } - } - } - - /** - * Remove related WAF specific configuration. - */ - public function uninstall() { - try { - $this->getDb()->query("DROP TABLE IF EXISTS " . $this->networkTable('wfwafconfig')); - } catch (wfWAFStorageEngineMySQLiException $e) { - error_log($e); - } - $this->uninstalled = true; - } - - /** - * Pull from wfConfig. - */ - public function isInLearningMode() { - if ($this->getConfig('wafStatus', '') == 'learning-mode') { - if ($this->getConfig('learningModeGracePeriodEnabled', false)) { - if ($this->getConfig('learningModeGracePeriod', 0) > time()) { - return true; - } else { - // Reached the end of the grace period, activate the WAF. - $this->setConfig('wafStatus', 'enabled'); - $this->setConfig('learningModeGracePeriodEnabled', 0); - $this->unsetConfig('learningModeGracePeriod'); - } - } else { - return true; - } - } - return false; - } - - /** - * Pull from wfConfig. - */ - public function isDisabled() { - return $this->getConfig('wafStatus', '') === 'disabled' || $this->getConfig('wafDisabled', 0); - } - - /** - * Return hardcoded path maybe? - */ - public function getRulesDSLCacheFile() { - - } - - /** - * Probably not. - */ - public function isAttackDataFull() { - return false; - } - - /** - * - */ - public function vacuum() { - $this->purgeIPBlocks(wfWAFStorageInterface::IP_BLOCKS_ALL); - } - - /** - * @return wfWAFStorageEngineDatabase - */ - public function getDb() { - return $this->db; - } - - /** - * - */ - public function setDefaults() { - $defaults = $this->getDefaultConfiguration(); - foreach ($defaults as $key => $value) { - $val = $this->getConfig($key); - if ($val === null) { - $this->setConfig($key, $value); - } - } - } - - /** - * - */ - public function runMigrations() { -// $currentVersion = $this->getConfig('version'); -// if (!$currentVersion || version_compare($currentVersion, WFWAF_VERSION) === -1) { -// -// } - - $this->getDb()->query("CREATE TABLE IF NOT EXISTS " . $this->networkTable('wfwafconfig') . - " ( - `name` varchar(100) NOT NULL, - `val` longblob, - `autoload` enum('no','yes') NOT NULL DEFAULT 'yes', - PRIMARY KEY (`name`) -) DEFAULT CHARSET=utf8 -"); - } - - /** - * @return array - */ - public function getDefaultConfiguration() { - return array( - 'wafStatus' => 'learning-mode', - 'learningModeGracePeriodEnabled' => 1, - 'learningModeGracePeriod' => time() + (86400 * 7), - 'authKey' => wfWAFUtils::getRandomString(64), - ); - } - - /** - * @return array - */ - public function getSerializedParams() { - return array( - 'cron', - 'whitelistedURLParams', - 'disabledRules', - 'wfWAFBlockedIPs', - 'wafRules', - ); - } - - /** - * @return array - */ - public function getAutoloadParams() { - return array( - '' => array( - 'wafStatus', - 'learningModeGracePeriodEnabled', - 'learningModeGracePeriod', - 'authKey', - 'version', - 'advancedBlockingEnabled', - 'disabledRules', - 'patternBlocks', - 'countryBlocks', - 'otherBlocks', - 'lockouts', - 'wafRules', - 'avoid_php_input', - 'wafDisabled', - 'wfWAFBlockedIPs', - 'disableWAFBlacklistBlocking', - ), - 'livewaf' => array( - 'cron', - 'whitelistedURLParams', - 'whitelistedURLs', - ), - 'transient' => array( - 'watchedIPs', - 'blockedPrefixes', - ), - 'synced' => array( - 'timeoffset_wf', - 'apiKey', - 'isPaid', - 'siteURL', - 'homeURL', - 'whitelistedIPs', - 'howGetIPs', - 'howGetIPs_trusted_proxies', - 'howGetIPs_trusted_proxies_unified', - 'other_WFNet', - 'pluginABSPATH', - 'serverIPs', - 'disableWAFIPBlocking', - 'advancedBlockingEnabled', - 'blockCustomText', - 'whitelistedServiceIPs' - ), - ); - } - - protected function autoloadConfig() { - $params = $this->getAutoloadParams(); - foreach ($params as $category => $autoloadParams) { - // Set default keys to null to prevent re-querying the table for config keypairs that aren't in the table. - foreach ($autoloadParams as $autoloadParam) { - $this->data[$category][$autoloadParam] = null; - } - - $table = $this->getStorageTable($category); - $whereIn = str_repeat('?,', count($autoloadParams) - 1) . '?'; - $results = $this->db->get_results('SELECT * FROM ' . $table . ' WHERE name IN (' . $whereIn . ')', $autoloadParams); - $serializedParams = $this->getSerializedParams(); - foreach ($results as $row) { - if (in_array($row['name'], $serializedParams)) { - $this->data[$category][$row['name']] = @unserialize($row['val']); - } else { - $this->data[$category][$row['name']] = $row['val']; - } - } - } - } - - public function getRules() { - return $this->getConfig('wafRules'); - } - - public function setRules($rules) { - $this->setConfig('wafRules', $rules); - } - - public function needsInitialRules() { - $rules = $this->getRules(); - return !$rules; - } - - public function getStorageTable($category) { - switch ($category) { - case 'livewaf': - case 'transient': - $table = $this->networkTable('wfwafconfig'); - break; - default: - $table = $this->networkTable('wfConfig'); - break; - } - return $table; - } - - public function getDescription() { - return __('mysqli', 'wordfence'); - } - -} - -interface wfWAFStorageEngineDatabase { - - public function connect($user, $password, $database, $host, $port = null, $socket = null, $flags = 0); - - public function setCharset($charset, $collation); - - public function close(); - - public function insert($table, $data); - - public function update($table, $data, $where); - - public function delete($table, $where); - - public function query($sql, $data = array()); - - public function get_var($query = null, $data = array(), $x = 0, $y = 0); - - public function get_row($query = null, $data = array(), $y = 0); - - public function get_results($query = null, $data = array()); -} - -class wfWAFStorageEngineMySQLi implements wfWAFStorageEngineDatabase { - - /** - * @var string - */ - private $user; - /** - * @var string - */ - private $password; - /** - * @var string - */ - private $database; - /** - * @var string - */ - private $host; - /** - * @var int|null - */ - private $port; - /** - * @var string|null - */ - private $socket; - - /** @var mysqli */ - private $dbh; - - private $lastStatement; - - public $installing = false; - - /** - * - */ - public function __construct() { - - } - - /** - * @param string $user - * @param string $password - * @param string $database - * @param string $host - * @param null|int $port - * @param mixed $socket - * @return mysqli - * @throws wfWAFStorageEngineMySQLiException - */ - public function connect($user, $password, $database, $host, $port = null, $socket = null, $flags = 0, $sslOptions = null) { - $this->dbh = mysqli_init(); - if (!empty($sslOptions) && ($flags & (MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT))) { - mysqli_ssl_set( - $this->dbh, - array_key_exists('key', $sslOptions) ? $sslOptions['key'] : null, - array_key_exists('certificate', $sslOptions) ? $sslOptions['certificate'] : null, - array_key_exists('ca_certificate', $sslOptions) ? $sslOptions['ca_certificate'] : null, - array_key_exists('ca_path', $sslOptions) ? $sslOptions['ca_path'] : null, - array_key_exists('cipher_algos', $sslOptions) ? $sslOptions['cipher_algos'] : null - ); - } - if (!@mysqli_real_connect($this->dbh, $host, $user, $password, $database, $port, $socket, $flags)) { - $error = error_get_last(); - throw new wfWAFStorageEngineMySQLiException('Unable to connect to database: ' . $error['message'], $error['type']); - } - - return $this->dbh; - } - - public function setCharset($charset, $collation) { - $result = $this->determineCharset($charset, $collation); - $charset = $result['charset']; - $collation = $result['collation']; - $this->setConnectionCharset($charset, $collation); - } - - protected function determineCharset($charset, $collation) { - if ('utf8' === $charset && $this->hasCap('utf8mb4')) { - $charset = 'utf8mb4'; - } - - if ('utf8mb4' === $charset && !$this->hasCap('utf8mb4')) { - $charset = 'utf8'; - $collation = str_replace('utf8mb4_', 'utf8_', $collation); - } - - if ('utf8mb4' === $charset) { - // _general_ is outdated, so we can upgrade it to _unicode_, instead. - if (!$collation || 'utf8_general_ci' === $collation) { - $collation = 'utf8mb4_unicode_ci'; - } else { - $collation = str_replace('utf8_', 'utf8mb4_', $collation); - } - } - - // _unicode_520_ is a better collation, we should use that when it's available. - if ($this->hasCap('utf8mb4_520') && 'utf8mb4_unicode_ci' === $collation) { - $collation = 'utf8mb4_unicode_520_ci'; - } - - return compact('charset', 'collation'); - } - - /** - * Determine if a database supports a particular feature. - * - * @param string $dbCap The feature to check for. Accepts 'collation', - * 'group_concat', 'subqueries', 'set_charset', - * 'utf8mb4', or 'utf8mb4_520'. - * @return int|false Whether the database feature is supported, false otherwise. - */ - public function hasCap($dbCap) { - $version = $this->dbVersion(); - - switch (strtolower($dbCap)) { - case 'collation' : // @since 2.5.0 - case 'group_concat' : // @since 2.7.0 - case 'subqueries' : // @since 2.7.0 - return version_compare($version, '4.1', '>='); - case 'set_charset' : - return version_compare($version, '5.0.7', '>='); - case 'utf8mb4' : // @since 4.1.0 - if (version_compare($version, '5.5.3', '<')) { - return false; - } - $client_version = mysqli_get_client_info(); - - /* - * libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server. - * mysqlnd has supported utf8mb4 since 5.0.9. - */ - if (false !== strpos($client_version, 'mysqlnd')) { - $client_version = preg_replace('/^\D+([\d.]+).*/', '$1', $client_version); - return version_compare($client_version, '5.0.9', '>='); - } else { - return version_compare($client_version, '5.5.3', '>='); - } - case 'utf8mb4_520' : // @since 4.6.0 - return version_compare($version, '5.6', '>='); - } - - return false; - } - - public function setConnectionCharset($charset, $collation) { - if ($this->hasCap('collation') && !empty($charset)) { - $setCharsetSucceeded = false; - - if (function_exists('mysqli_set_charset') && $this->hasCap('set_charset')) { - $setCharsetSucceeded = mysqli_set_charset($this->dbh, $charset); - } - - if ($setCharsetSucceeded) { - $query = "SET NAMES {$this->escape($charset)}"; - if ($collation) { - $query .= " COLLATE {$this->escape($collation)}"; - } - $this->query($query); - } - } - } - - /** - * Retrieves the MySQL server version. - * - * @return null|string Null on failure, version number on success. - */ - public function dbVersion() { - $serverInfo = mysqli_get_server_info($this->dbh); - return preg_replace('/[^0-9.].*/', '', $serverInfo); - } - - /** - * - */ - public function close() { - mysqli_close($this->dbh); - } - - /** - * @param string $table - * @param array $data - * @return bool|int|string - */ - public function insert($table, $data) { - $sql = $this->buildInsertSQL($table, $data); - if ($stmt = $this->query($sql, $data)) { - $insertID = mysqli_insert_id($this->dbh); - $stmt->close(); - return $insertID; - } - return false; - } - - /** - * @param string $table - * @param array $data - * @param array $where - * @return bool|int - * @throws wfWAFStorageEngineMySQLiException - */ - public function update($table, $data, $where) { - if (!$data) { - throw new wfWAFStorageEngineMySQLiException('Values to update must supplied to \wfWAFStorageEngineMySQLi::update.'); - } - if (!$where) { - throw new wfWAFStorageEngineMySQLiException('A where clause must supplied to \wfWAFStorageEngineMySQLi::update.'); - } - $sql = $this->buildUpdateSQL($table, $data, $where); - if ($stmt = $this->query($sql, array_merge(array_values($data), array_values($where)))) { - $affectedRows = mysqli_affected_rows($this->dbh); - $stmt->close(); - return $affectedRows; - } - return false; - - } - - /** - * @param string $table - * @param array $where - * @return bool|int - * @throws wfWAFStorageEngineMySQLiException - */ - public function delete($table, $where) { - if (!$where) { - throw new wfWAFStorageEngineMySQLiException('A where clause must supplied to \wfWAFStorageEngineMySQLi::delete.'); - } - $sql = $this->buildDeleteSQL($table, $where); - if ($stmt = $this->query($sql, $where)) { - $affectedRows = mysqli_affected_rows($this->dbh); - $stmt->close(); - return $affectedRows; - } - return false; - } - - /** - * @param $sql - * @param array $data - * @return mysqli_stmt - * @throws wfWAFStorageEngineMySQLiException - */ - public function query($sql, $data = array()) { - if ($this->installing) { - return false; - } - - $stmt = mysqli_prepare($this->dbh, $sql); - if (!$stmt) { - throw new wfWAFStorageEngineMySQLiException( - sprintf('MySQL error[%d]: %s', mysqli_errno($this->dbh), mysqli_error($this->dbh)), - mysqli_errno($this->dbh) - ); - } - - $bindFormats = ''; - $bindData = array(); - $bindCounter = 0; - foreach ($data as $value) { - switch (gettype($value)) { - case 'integer': - case 'boolean': - $bindFormats .= 'i'; - ${"bindVar{$bindCounter}"} = (int) $value; - $bindData[] = &${"bindVar{$bindCounter}"}; - break; - - case 'string': - $bindFormats .= 's'; - ${"bindVar{$bindCounter}"} = $value; - $bindData[] = &${"bindVar{$bindCounter}"}; - break; - - case 'double': - case 'float': - $bindFormats .= 'd'; - ${"bindVar{$bindCounter}"} = $value; - $bindData[] = &${"bindVar{$bindCounter}"}; - break; - - default: - $bindFormats .= 'b'; - ${"bindVar{$bindCounter}"} = $value; - $bindData[] = &${"bindVar{$bindCounter}"}; - break; - } - $bindCounter++; - } - - if ($bindData) { - array_unshift($bindData, $bindFormats); - call_user_func_array(array($stmt, 'bind_param'), $bindData); - } - - $stmt->execute(); - if ($stmt->errno > 0) { - throw new wfWAFStorageEngineMySQLiException('MySQL error [' . $stmt->errno . ']: ' . $stmt->error, $stmt->errno); - } - - return $stmt; - } - - /** - * @param mysqli_stmt $stmt - * @return array - */ - public function statementToArray($stmt) { - if (!$stmt) { - return array(); - } - - $result = $stmt->get_result(); - - $return = array(); - while ($row = $result->fetch_array(MYSQLI_BOTH)) { - $return[] = $row; - } - return $return; - } - - /** - * @param string $query - * @param array $data - * @param int $x - * @param int $y - * @return null|mixed - */ - public function get_var($query = null, $data = array(), $x = 0, $y = 0) { - $this->lastStatement = $this->query($query, $data); - $results = $this->statementToArray($this->lastStatement); - - if (isset($results[$y][$x])) { - return $results[$y][$x]; - } - - return null; - } - - /** - * @param string $query - * @param array $data - * @param int $y - * @return mixed|null - */ - public function get_row($query = null, $data = array(), $y = 0) { - $stmt = $this->query($query, $data); - $results = $this->statementToArray($stmt); - - if (isset($results[$y])) { - return $results[$y]; - } - - return null; - } - - /** - * @param string $query - * @param array $data - * @return array - */ - public function get_results($query = null, $data = array()) { - $stmt = $this->query($query, $data); - return $this->statementToArray($stmt); - } - - /** - * @param mixed $value - * @return string - */ - public function escape($value) { - return sprintf("'%s'", mysqli_real_escape_string($this->dbh, $value)); - } - - /** - * @param string $table - * @param array $data - * @return string - */ - protected function buildInsertSQL($table, $data) { - $columns = array(); - $values = array(); - foreach ($data as $column => $value) { - $columns[] = $this->sanitizeColumn($column); - $values[] = '?'; - } - $sql = sprintf('INSERT INTO %s (%s) VALUES (%s)', $table, join(',', $columns), join(',', $values)); - return $sql; - } - - /** - * @param string $column - * @return mixed - */ - protected function sanitizeColumn($column) { - return preg_replace('/[^a-zA-Z0-9_]/i', '', $column); - } - - /** - * @return mixed - */ - public function getLastStatement() { - return $this->lastStatement; - } - - /** - * @param string $table - * @param array $where - * @return string - */ - protected function buildDeleteSQL($table, $where) { - $sql = sprintf('DELETE FROM %s %s', $table, $this->buildWhereClause($where)); - return $sql; - } - - /** - * @param string $table - * @param array $data - * @param array $where - * @return string - */ - protected function buildUpdateSQL($table, $data, $where) { - if (!is_array($data)) { - throw new InvalidArgumentException('Argument 2 expected to be array. ' . gettype($data) . ' given.'); - } - if (count($data) === 0) { - throw new InvalidArgumentException('Argument 2 cannot be empty.'); - } - if (!is_array($where)) { - throw new InvalidArgumentException('Argument 3 expected to be array. ' . gettype($where) . ' given.'); - } - if (count($where) === 0) { - throw new InvalidArgumentException('Argument 3 cannot be empty.'); - } - - return sprintf('UPDATE %s SET %s %s', $table, $this->buildUpdateClause($data), $this->buildWhereClause($where)); - } - - /** - * @param array $where - * @return string - */ - protected function buildWhereClause($where) { - if (!is_array($where)) { - throw new InvalidArgumentException('Argument 1 expected to be array. ' . gettype($where) . ' given.'); - } - if (!$where) { - return ''; - } - $sql = 'WHERE '; - foreach ($where as $column => $value) { - $sql .= $this->sanitizeColumn($column) . ' = ? AND '; - } - return wfWAFUtils::substr($sql, 0, -5); - } - - /** - * @param array $data - * @return string - */ - protected function buildUpdateClause($data) { - if (!is_array($data)) { - throw new InvalidArgumentException('Argument 1 expected to be array. ' . gettype($data) . ' given.'); - } - if (!$data) { - throw new InvalidArgumentException('Argument 1 cannot be an empty array.'); - } - $sql = ''; - foreach ($data as $column => $value) { - $sql .= $this->sanitizeColumn($column) . ' = ?, '; - } - return wfWAFUtils::substr($sql, 0, -2); - } -} - - -class wfWAFStorageEngineMySQLiException extends wfWAFException { - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php deleted file mode 100644 index a4c230a6..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php +++ /dev/null @@ -1,1249 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -class wfWAFUtils { - - /** - * Return dot or colon notation of IPv4 or IPv6 address. - * - * @param string $ip - * @return string|bool - */ - public static function inet_ntop($ip) { - // trim this to the IPv4 equiv if it's in the mapped range - if (wfWAFUtils::strlen($ip) == 16 && wfWAFUtils::substr($ip, 0, 12) == "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff") { - $ip = wfWAFUtils::substr($ip, 12, 4); - } - return self::hasIPv6Support() ? @inet_ntop($ip) : self::_inet_ntop($ip); - } - - /** - * Return the packed binary string of an IPv4 or IPv6 address. - * - * @param string $ip - * @return string - */ - public static function inet_pton($ip) { - // convert the 4 char IPv4 to IPv6 mapped version. - $pton = str_pad(self::hasIPv6Support() ? @inet_pton($ip) : self::_inet_pton($ip), 16, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00", STR_PAD_LEFT); - return $pton; - } - - /** - * Added compatibility for hosts that do not have inet_pton. - * - * @param $ip - * @return bool|string - */ - public static function _inet_pton($ip) { - // IPv4 - if (preg_match('/^(?:\d{1,3}(?:\.|$)){4}/', $ip)) { - $octets = explode('.', $ip); - $bin = chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]); - return $bin; - } - - // IPv6 - if (preg_match('/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/i', $ip)) { - if ($ip === '::') { - return "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - } - $colon_count = wfWAFUtils::substr_count($ip, ':'); - $dbl_colon_pos = wfWAFUtils::strpos($ip, '::'); - if ($dbl_colon_pos !== false) { - $ip = str_replace('::', str_repeat(':0000', - (($dbl_colon_pos === 0 || $dbl_colon_pos === wfWAFUtils::strlen($ip) - 2) ? 9 : 8) - $colon_count) . ':', $ip); - $ip = trim($ip, ':'); - } - - $ip_groups = explode(':', $ip); - $ipv6_bin = ''; - foreach ($ip_groups as $ip_group) { - $ipv6_bin .= pack('H*', str_pad($ip_group, 4, '0', STR_PAD_LEFT)); - } - - return wfWAFUtils::strlen($ipv6_bin) === 16 ? $ipv6_bin : false; - } - - // IPv4 mapped IPv6 - if (preg_match('/^((?:0{1,4}(?::|)){0,5})(::)?ffff:((?:\d{1,3}(?:\.|$)){4})$/i', $ip, $matches)) { - $octets = explode('.', $matches[3]); - return "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" . chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]); - } - - return false; - } - - /** - * Added compatibility for hosts that do not have inet_ntop. - * - * @param $ip - * @return bool|string - */ - public static function _inet_ntop($ip) { - // IPv4 - if (wfWAFUtils::strlen($ip) === 4) { - return ord($ip[0]) . '.' . ord($ip[1]) . '.' . ord($ip[2]) . '.' . ord($ip[3]); - } - - // IPv6 - if (wfWAFUtils::strlen($ip) === 16) { - - // IPv4 mapped IPv6 - if (wfWAFUtils::substr($ip, 0, 12) == "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff") { - return "::ffff:" . ord($ip[12]) . '.' . ord($ip[13]) . '.' . ord($ip[14]) . '.' . ord($ip[15]); - } - - $hex = bin2hex($ip); - $groups = str_split($hex, 4); - $collapse = false; - $done_collapse = false; - foreach ($groups as $index => $group) { - if ($group == '0000' && !$done_collapse) { - if (!$collapse) { - $groups[$index] = ':'; - } else { - $groups[$index] = ''; - } - $collapse = true; - } else if ($collapse) { - $done_collapse = true; - $collapse = false; - } - $groups[$index] = ltrim($groups[$index], '0'); - } - $ip = join(':', array_filter($groups)); - $ip = str_replace(':::', '::', $ip); - return $ip == ':' ? '::' : $ip; - } - - return false; - } - - /** - * Verify PHP was compiled with IPv6 support. - * - * Some hosts appear to not have inet_ntop, and others appear to have inet_ntop but are unable to process IPv6 addresses. - * - * @return bool - */ - public static function hasIPv6Support() { - return defined('AF_INET6'); - } - - /** - * Expand a compressed printable representation of an IPv6 address. - * - * @param string $ip - * @return string - */ - public static function expandIPv6Address($ip) { - $hex = bin2hex(self::inet_pton($ip)); - $ip = wfWAFUtils::substr(preg_replace("/([a-f0-9]{4})/i", "$1:", $hex), 0, -1); - return $ip; - } - - protected static $servicesJSON; - - public static function json_encode($string) { - if (function_exists('json_encode')) { - return json_encode($string); - } else { - if (!self::$servicesJSON) { - require_once WFWAF_LIB_PATH . 'json.php'; - self::$servicesJSON = new wfServices_JSON(); - } - return self::$servicesJSON->encodeUnsafe($string); - } - } - - public static function json_decode($string, $assoc_array = false) { - if (function_exists('json_decode')) { - return json_decode($string, $assoc_array); - } else { - if (!self::$servicesJSON) { - require_once WFWAF_LIB_PATH . 'json.php'; - self::$servicesJSON = new wfServices_JSON(); - } - $res = self::$servicesJSON->decode($string); - if ($assoc_array) - $res = self::_json_decode_object_helper($res); - return $res; - - } - } - - /** - * @param object $data - * @return array - */ - protected static function _json_decode_object_helper($data) { - if (is_object($data)) - $data = get_object_vars($data); - return is_array($data) ? array_map('wfWAFUtils::_json_decode_object_helper', $data) : $data; - } - - public static function json_encode_limited($data, $limit, $truncatable) { - $json = self::json_encode($data); - $size = strlen($json); - if ($size > $limit) { - $json = null; - $minimalData = $data; - foreach ($minimalData as $key => &$value) { - if (in_array($key, $truncatable)) { - $value = ''; - } - } - $minimumSize = strlen(self::json_encode($minimalData)); - if ($minimumSize <= $limit) { - $excess = $size - $limit; - foreach ($truncatable as $field) { - if (!array_key_exists($field, $data)) - continue; - $value = $data[$field]; - if (is_string($value)) { - $originalLength = strlen($value); - $truncatedLength = max(0, $originalLength - $excess); - $excess -= ($originalLength - $truncatedLength); - $data[$field] = substr($value, 0, $truncatedLength); - } - if ($excess === 0) { - $json = self::json_encode($data); - break; - } - } - } - } - return $json; - } - - /** - * Compare two strings in constant time. It can leak the length of a string. - * - * @param string $a Expected string. - * @param string $b Actual string. - * @return bool Whether strings are equal. - */ - public static function hash_equals($a, $b) { - $a_length = wfWAFUtils::strlen($a); - if ($a_length !== wfWAFUtils::strlen($b)) { - return false; - } - $result = 0; - - // Do not attempt to "optimize" this. - for ($i = 0; $i < $a_length; $i++) { - $result |= ord($a[$i]) ^ ord($b[$i]); - } - - return $result === 0; - } - - /** - * @param $algo - * @param $data - * @param $key - * @param bool|false $raw_output - * @return bool|string - */ - public static function hash_hmac($algo, $data, $key, $raw_output = false) { - if (function_exists('hash_hmac')) { - return hash_hmac($algo, $data, $key, $raw_output); - } - return self::_hash_hmac($algo, $data, $key, $raw_output); - } - - /** - * @param $algo - * @param $data - * @param $key - * @param bool|false $raw_output - * @return bool|string - */ - private static function _hash_hmac($algo, $data, $key, $raw_output = false) { - $packs = array('md5' => 'H32', 'sha1' => 'H40'); - - if (!isset($packs[$algo])) - return false; - - $pack = $packs[$algo]; - - if (wfWAFUtils::strlen($key) > 64) - $key = pack($pack, $algo($key)); - - $key = str_pad($key, 64, chr(0)); - - $ipad = (wfWAFUtils::substr($key, 0, 64) ^ str_repeat(chr(0x36), 64)); - $opad = (wfWAFUtils::substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64)); - - $hmac = $algo($opad . pack($pack, $algo($ipad . $data))); - - if ($raw_output) - return pack($pack, $hmac); - return $hmac; - } - - /** - * @param int $length - * @param string $chars - * @return string - */ - public static function getRandomString($length = 16, $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|') { - // This is faster than calling self::random_int for $length - $bytes = self::random_bytes($length); - $return = ''; - $maxIndex = wfWAFUtils::strlen($chars) - 1; - for ($i = 0; $i < $length; $i++) { - $fp = (float) ord($bytes[$i]) / 255.0; // convert to [0,1] - $index = (int) (round($fp * $maxIndex)); - $return .= $chars[$index]; - } - return $return; - } - - /** - * Polyfill for random_bytes. - * - * @param int $bytes - * @return string - */ - public static function random_bytes($bytes) { - $bytes = (int) $bytes; - if (function_exists('random_bytes')) { - try { - $rand = random_bytes($bytes); - if (is_string($rand) && wfWAFUtils::strlen($rand) === $bytes) { - return $rand; - } - } catch (Exception $e) { - // Fall through - } catch (TypeError $e) { - // Fall through - } catch (Error $e) { - // Fall through - } - } - if (function_exists('mcrypt_create_iv')) { - // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved,PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved,PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved - $rand = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); - if (is_string($rand) && wfWAFUtils::strlen($rand) === $bytes) { - return $rand; - } - } - if (function_exists('openssl_random_pseudo_bytes')) { - $rand = @openssl_random_pseudo_bytes($bytes, $strong); - if (is_string($rand) && wfWAFUtils::strlen($rand) === $bytes) { - return $rand; - } - } - // Last resort is insecure - $return = ''; - for ($i = 0; $i < $bytes; $i++) { - $return .= chr(mt_rand(0, 255)); - } - return $return; - } - - /** - * Polyfill for random_int. - * - * @param int $min - * @param int $max - * @return int - */ - public static function random_int($min = 0, $max = 0x7FFFFFFF) { - if (function_exists('random_int')) { - try { - return random_int($min, $max); - } catch (Exception $e) { - // Fall through - } catch (TypeError $e) { - // Fall through - } catch (Error $e) { - // Fall through - } - } - $diff = $max - $min; - $bytes = self::random_bytes(4); - if ($bytes === false || wfWAFUtils::strlen($bytes) != 4) { - throw new RuntimeException("Unable to get 4 bytes"); - } - $val = @unpack("Nint", $bytes); - $val = $val['int'] & 0x7FFFFFFF; - $fp = (float) $val / 2147483647.0; // convert to [0,1] - return (int) (round($fp * $diff) + $min); - } - - /** - * @param mixed $subject - * @return array|string - */ - public static function stripMagicQuotes($subject) { - // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.magic_quotes_sybaseDeprecatedRemoved - $sybase = ini_get('magic_quotes_sybase'); - $sybaseEnabled = ((is_numeric($sybase) && $sybase) || - (is_string($sybase) && $sybase && !in_array(wfWAFUtils::strtolower($sybase), array( - 'off', - 'false' - )))); - if (defined('PHP_VERSION_ID') && PHP_VERSION_ID >= 70400) { //Avoid get_magic_quotes_gpc on PHP >= 7.4.0 - return $subject; - } - // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_gpcDeprecated - if ((function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) || $sybaseEnabled) { - return self::stripslashes_deep($subject); - } - return $subject; - } - - /** - * @param mixed $subject - * @return array|string - */ - public static function stripslashes_deep($subject) { - if (is_array($subject)) { - return array_map(array( - 'self', 'stripslashes_deep', - ), $subject); - } else if (is_string($subject)) { - return stripslashes($subject); - } - return $subject; - } - - - /** - * Set the mbstring internal encoding to a binary safe encoding when func_overload - * is enabled. - * - * When mbstring.func_overload is in use for multi-byte encodings, the results from - * strlen() and similar functions respect the utf8 characters, causing binary data - * to return incorrect lengths. - * - * This function overrides the mbstring encoding to a binary-safe encoding, and - * resets it to the users expected encoding afterwards through the - * `reset_mbstring_encoding` function. - * - * It is safe to recursively call this function, however each - * `mbstring_binary_safe_encoding()` call must be followed up with an equal number - * of `reset_mbstring_encoding()` calls. - * - * @see wfWAFUtils::reset_mbstring_encoding - * - * @staticvar array $encodings - * @staticvar bool $overloaded - * - * @param bool $reset Optional. Whether to reset the encoding back to a previously-set encoding. - * Default false. - */ - public static function mbstring_binary_safe_encoding($reset = false) { - static $encodings = array(); - static $overloaded = null; - - if (is_null($overloaded)) { - // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated - $overloaded = function_exists('mb_internal_encoding') && (ini_get('mbstring.func_overload') & 2); - } - - if (false === $overloaded) { return; } - - if (!$reset) { - $encoding = mb_internal_encoding(); - array_push($encodings, $encoding); - mb_internal_encoding('ISO-8859-1'); - } - - if ($reset && $encodings) { - $encoding = array_pop($encodings); - mb_internal_encoding($encoding); - } - } - - /** - * Reset the mbstring internal encoding to a users previously set encoding. - * - * @see wfWAFUtils::mbstring_binary_safe_encoding - */ - public static function reset_mbstring_encoding() { - self::mbstring_binary_safe_encoding(true); - } - - /** - * @param callable $function - * @param array $args - * @return mixed - */ - protected static function callMBSafeStrFunction($function, $args) { - self::mbstring_binary_safe_encoding(); - $return = call_user_func_array($function, $args); - self::reset_mbstring_encoding(); - return $return; - } - - /** - * Multibyte safe strlen. - * - * @param $binary - * @return int - */ - public static function strlen($binary) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strlen', $args); - } - - /** - * @param $haystack - * @param $needle - * @param int $offset - * @return int - */ - public static function stripos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::callMBSafeStrFunction('stripos', $args); - } - - /** - * @param $string - * @return mixed - */ - public static function strtolower($string) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strtolower', $args); - } - - /** - * @param $string - * @param $start - * @param $length - * @return mixed - */ - public static function substr($string, $start, $length = null) { - if ($length === null) { $length = self::strlen($string); } - return self::callMBSafeStrFunction('substr', array( - $string, $start, $length - )); - } - - /** - * @param $haystack - * @param $needle - * @param int $offset - * @return mixed - */ - public static function strpos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strpos', $args); - } - - /** - * @param string $haystack - * @param string $needle - * @param int $offset - * @param int $length - * @return mixed - */ - public static function substr_count($haystack, $needle, $offset = 0, $length = null) { - if ($length === null) { $length = self::strlen($haystack); } - return self::callMBSafeStrFunction('substr_count', array( - $haystack, $needle, $offset, $length - )); - } - - /** - * @param $string - * @return mixed - */ - public static function strtoupper($string) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strtoupper', $args); - } - - /** - * @param string $haystack - * @param string $needle - * @param int $offset - * @return mixed - */ - public static function strrpos($haystack, $needle, $offset = 0) { - $args = func_get_args(); - return self::callMBSafeStrFunction('strrpos', $args); - } - - /** - * @param string $val An ini byte size value (e.g., 20M) - * @return int - */ - public static function iniSizeToBytes($val) { - $val = trim($val); - if (preg_match('/^\d+$/', $val)) { - return (int) $val; - } - - $last = strtolower(substr($val, -1)); - $val = (int) substr($val, 0, -1); - switch ($last) { - case 'g': - $val *= 1024; - case 'm': - $val *= 1024; - case 'k': - $val *= 1024; - } - - return $val; - } - - public static function reverseLookup($IP) { - $IPn = self::inet_pton($IP); - // This function works for IPv4 or IPv6 - if (function_exists('gethostbyaddr')) { - $host = @gethostbyaddr($IP); - } - if (!$host) { - $ptr = false; - if (filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false) { - $ptr = implode(".", array_reverse(explode(".", $IP))) . ".in-addr.arpa"; - } else if (filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false) { - $ptr = implode(".", array_reverse(str_split(bin2hex($IPn)))) . ".ip6.arpa"; - } - - if ($ptr && function_exists('dns_get_record')) { - $host = @dns_get_record($ptr, DNS_PTR); - if ($host) { - $host = $host[0]['target']; - } - } - } - if (!$host) { - return ''; - } - return $host; - } - - public static function patternToRegex($pattern, $mod = 'i', $sep = '/') { - $pattern = preg_quote(trim($pattern), $sep); - $pattern = str_replace(' ', '\s', $pattern); - return $sep . '^' . str_replace('\*', '.*', $pattern) . '$' . $sep . $mod; - } - - public static function isUABlocked($uaPattern, $ua) { // takes a pattern using asterisks as wildcards, turns it into regex and checks it against the visitor UA returning true if blocked - return fnmatch($uaPattern, $ua, FNM_CASEFOLD); - } - - public static function isRefererBlocked($refPattern, $referer) { - return fnmatch($refPattern, $referer, FNM_CASEFOLD); - } - - public static function extractBareURI($URL) { - $URL = preg_replace('/^https?:\/\/[^\/]+/i', '', $URL); //strip of method and host - $URL = preg_replace('/\#.*$/', '', $URL); //strip off fragment - $URL = preg_replace('/\?.*$/', '', $URL); //strip off query string - return $URL; - } - - public static function extractHostname($str) { - if (preg_match('/https?:\/\/([a-zA-Z0-9\.\-]+)(?:\/|$)/i', $str, $matches)) { - return strtolower($matches[1]); - } - else { - return false; - } - } - - public static function redirect($location, $status = 302) { - $is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false); - $is_IIS = !$is_apache && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false); - - self::doNotCache(); - - if (!$is_IIS && PHP_SAPI != 'cgi-fcgi') { - self::statusHeader($status); // This causes problems on IIS and some FastCGI setups - } - - header("Location: {$location}", true, $status); - exit; - } - - public static function statusHeader($code) { - $code = abs(intval($code)); - - $statusCodes = array( - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', - 226 => 'IM Used', - - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Reserved', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', - - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 421 => 'Misdirected Request', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 426 => 'Upgrade Required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 451 => 'Unavailable For Legal Reasons', - - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 510 => 'Not Extended', - 511 => 'Network Authentication Required', - ); - - $description = (isset($statusCodes[$code]) ? $statusCodes[$code] : ''); - - $protocol = $_SERVER['SERVER_PROTOCOL']; - if (!in_array($protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) { - $protocol = 'HTTP/1.0'; - } - - $header = "{$protocol} {$code} {$description}"; - @header($header, true, $code); - } - - public static function doNotCache() { - header("Pragma: no-cache"); - header("Cache-Control: no-cache, must-revalidate, private, max-age=0"); - header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); //In the past - if (!defined('DONOTCACHEPAGE')) { define('DONOTCACHEPAGE', true); } - if (!defined('DONOTCACHEDB')) { define('DONOTCACHEDB', true); } - if (!defined('DONOTCDN')) { define('DONOTCDN', true); } - if (!defined('DONOTCACHEOBJECT')) { define('DONOTCACHEOBJECT', true); } - } - - /** - * Check if an IP address is in a network block - * - * @param string $subnet Single IP or subnet in CIDR notation (e.g. '192.168.100.0' or '192.168.100.0/22') - * @param string $ip IPv4 or IPv6 address in dot or colon notation - * @return boolean - */ - public static function subnetContainsIP($subnet, $ip) { - static $_network_cache = array(); - static $_ip_cache = array(); - static $_masks = array( - 0 => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 1 => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 2 => "\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 3 => "\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 4 => "\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 5 => "\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 6 => "\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 7 => "\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 8 => "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 9 => "\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 10 => "\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 11 => "\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 12 => "\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 13 => "\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 14 => "\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 15 => "\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 16 => "\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 17 => "\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 18 => "\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 19 => "\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 20 => "\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 21 => "\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 22 => "\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 23 => "\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 24 => "\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 25 => "\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 26 => "\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 27 => "\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 28 => "\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 29 => "\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 30 => "\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 31 => "\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 32 => "\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 33 => "\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 34 => "\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 35 => "\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 36 => "\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 37 => "\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 38 => "\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 39 => "\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 40 => "\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 41 => "\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 42 => "\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 43 => "\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 44 => "\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 45 => "\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 46 => "\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 47 => "\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 48 => "\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 49 => "\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 50 => "\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 51 => "\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 52 => "\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 53 => "\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 54 => "\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 55 => "\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 56 => "\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00", - 57 => "\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00", - 58 => "\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00", - 59 => "\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00", - 60 => "\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00", - 61 => "\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00", - 62 => "\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00", - 63 => "\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00", - 64 => "\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00", - 65 => "\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00\x00", - 66 => "\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00", - 67 => "\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00", - 68 => "\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00", - 69 => "\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00", - 70 => "\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00", - 71 => "\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00", - 72 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00", - 73 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00\x00", - 74 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00\x00", - 75 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00", - 76 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00", - 77 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00", - 78 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00", - 79 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00", - 80 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00", - 81 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00\x00", - 82 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00\x00", - 83 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00", - 84 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00\x00", - 85 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00\x00", - 86 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00\x00", - 87 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00", - 88 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00", - 89 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00\x00", - 90 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00\x00", - 91 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00\x00", - 92 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00\x00", - 93 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00\x00", - 94 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00\x00", - 95 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00\x00", - 96 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00", - 97 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00\x00", - 98 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00\x00", - 99 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00\x00", - 100 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00\x00", - 101 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00\x00", - 102 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00\x00", - 103 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00\x00", - 104 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00", - 105 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x00", - 106 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x00", - 107 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\x00", - 108 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\x00", - 109 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x00", - 110 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\x00", - 111 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x00", - 112 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00", - 113 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00", - 114 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00", - 115 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00", - 116 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00", - 117 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00", - 118 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00", - 119 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00", - 120 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00", - 121 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80", - 122 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0", - 123 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0", - 124 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0", - 125 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8", - 126 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc", - 127 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe", - 128 => "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", - ); - /* - * The above is generated by: - * - function gen_mask($prefix, $size = 128) { - //Workaround to avoid overflow, split into four pieces - $mask_1 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 1 * $size / 4 - $prefix))) - 1); - $mask_2 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 2 * $size / 4 - $prefix))) - 1); - $mask_3 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 3 * $size / 4 - $prefix))) - 1); - $mask_4 = (pow(2, $size / 4) - 1) ^ (pow(2, min($size / 4, max(0, 4 * $size / 4 - $prefix))) - 1); - return ($mask_1 ? pack('N', $mask_1) : "\0\0\0\0") . ($mask_2 ? pack('N', $mask_2) : "\0\0\0\0") . ($mask_3 ? pack('N', $mask_3) : "\0\0\0\0") . ($mask_4 ? pack('N', $mask_4) : "\0\0\0\0"); - } - - $masks = array(); - for ($i = 0; $i <= 128; $i++) { - $mask = gen_mask($i); - $chars = str_split($mask); - $masks[] = implode('', array_map(function($c) { return '\\x' . bin2hex($c); }, $chars)); - } - - echo 'array(' . "\n"; - foreach ($masks as $index => $m) { - echo "\t{$index} => \"{$m}\",\n"; - } - echo ')'; - * - */ - - if (isset($_network_cache[$subnet])) { - list($bin_network, $prefix, $masked_network) = $_network_cache[$subnet]; - $mask = $_masks[$prefix]; - } - else { - list($network, $prefix) = array_pad(explode('/', $subnet, 2), 2, null); - if (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - // If no prefix was supplied, 32 is implied for IPv4 - if ($prefix === null) { - $prefix = 32; - } - - // Validate the IPv4 network prefix - if ($prefix < 0 || $prefix > 32) { - return false; - } - - // Increase the IPv4 network prefix to work in the IPv6 address space - $prefix += 96; - } - else { - // If no prefix was supplied, 128 is implied for IPv6 - if ($prefix === null) { - $prefix = 128; - } - - // Validate the IPv6 network prefix - if ($prefix < 1 || $prefix > 128) { - return false; - } - } - $mask = $_masks[$prefix]; - $bin_network = self::inet_pton($network); - $masked_network = $bin_network & $mask; - $_network_cache[$subnet] = array($bin_network, $prefix, $masked_network); - } - - if (isset($_ip_cache[$ip]) && isset($_ip_cache[$ip][$prefix])) { - list($bin_ip, $masked_ip) = $_ip_cache[$ip][$prefix]; - } - else { - $bin_ip = self::inet_pton($ip); - $masked_ip = $bin_ip & $mask; - if (!isset($_ip_cache[$ip])) { - $_ip_cache[$ip] = array(); - } - $_ip_cache[$ip][$prefix] = array($bin_ip, $masked_ip); - } - - return ($masked_ip === $masked_network); - } - - /** - * Behaves exactly like PHP's parse_url but uses WP's compatibility fixes for early PHP 5 versions. - * - * @param string $url - * @param int $component - * @return mixed - */ - public static function parse_url($url, $component = -1) { - $to_unset = array(); - $url = strval($url); - - if (substr($url, 0, 2) === '//') { - $to_unset[] = 'scheme'; - $url = 'placeholder:' . $url; - } - elseif (substr($url, 0, 1) === '/') { - $to_unset[] = 'scheme'; - $to_unset[] = 'host'; - $url = 'placeholder://placeholder' . $url; - } - - $parts = @parse_url($url); - - if ($parts === false) { // Parsing failure - return $parts; - } - - // Remove the placeholder values - foreach ($to_unset as $key) { - unset($parts[$key]); - } - - if ($component === -1) { - return $parts; - } - - $translation = array( - PHP_URL_SCHEME => 'scheme', - PHP_URL_HOST => 'host', - PHP_URL_PORT => 'port', - PHP_URL_USER => 'user', - PHP_URL_PASS => 'pass', - PHP_URL_PATH => 'path', - PHP_URL_QUERY => 'query', - PHP_URL_FRAGMENT => 'fragment', - ); - - $key = false; - if (isset($translation[$component])) { - $key = $translation[$component]; - } - - if ($key !== false && is_array($parts) && isset($parts[$key])) { - return $parts[$key]; - } - - return null; - } - - /** - * Validates the URL, supporting both scheme-relative and path-relative formats. - * - * @param $url - * @return mixed - */ - public static function validate_url($url) { - $url = strval($url); - - if (substr($url, 0, 2) === '//') { - $url = 'placeholder:' . $url; - } - elseif (substr($url, 0, 1) === '/') { - $url = 'placeholder://placeholder' . $url; - } - - return filter_var($url, FILTER_VALIDATE_URL); - } - - public static function rawPOSTBody() { - // phpcs:ignore PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_raw_post_dataDeprecatedRemoved - global $HTTP_RAW_POST_DATA; - // phpcs:ignore PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_raw_post_dataDeprecatedRemoved - if (empty($HTTP_RAW_POST_DATA)) { //Defined if always_populate_raw_post_data is on, PHP < 7, and the encoding type is not multipart/form-data - $avoidPHPInput = false; - try { - $avoidPHPInput = wfWAF::getSharedStorageEngine() && wfWAF::getSharedStorageEngine()->getConfig('avoid_php_input', false); - } - catch (Exception $e) { - //Ignore - } - - if ($avoidPHPInput) { //Some custom PHP builds break reading from php://input - //Reconstruct the best possible approximation of it from $_POST if populated -- won't help JSON or other raw payloads - $data = http_build_query($_POST, '', '&'); - } - else { - $data = file_get_contents('php://input'); //Available if the encoding type is not multipart/form-data; it can only be read once prior to PHP 5.6 so we save it in $HTTP_RAW_POST_DATA for WP Core and others - - //For our purposes, we don't currently need the raw POST body if it's multipart/form-data since the data will be in $_POST/$_FILES. If we did, we could reconstruct the body here. - - // phpcs:ignore PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_raw_post_dataDeprecatedRemoved - $HTTP_RAW_POST_DATA = $data; - } - } - else { - // phpcs:ignore PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_raw_post_dataDeprecatedRemoved - $data =& $HTTP_RAW_POST_DATA; - } - return $data; - } - - /** - * Returns the current timestamp, adjusted as needed to get close to what we consider a true timestamp. We use this - * because a significant number of servers are using a drastically incorrect time. - * - * @return int - */ - public static function normalizedTime() { - $offset = 0; - try { - $offset = wfWAF::getInstance()->getStorageEngine()->getConfig('timeoffset_ntp', false, 'synced'); - if ($offset === false) { - $offset = wfWAF::getInstance()->getStorageEngine()->getConfig('timeoffset_wf', false, 'synced'); - } - } - catch (Exception $e) { - //Ignore - } - return time() + ((int) $offset); - } - - /** - * @param $file - * @return array|bool - */ - public static function extractCredentialsWPConfig($file, &$return = array()) { - $configContents = file_get_contents($file); - $tokens = token_get_all($configContents); - $tokens = array_values(array_filter($tokens, 'wfWAFUtils::_removeUnneededTokens')); - - $parsedConstants = array(); - $parsedVariables = array(); - for ($i = 0; $i < count($tokens); $i++) { - $token = $tokens[$i]; - if (is_array($token)) { - if (token_name($token[0]) === 'T_STRING' && strtolower($token[1]) === 'define') { - $startParenToken = $tokens[$i + 1]; - $constantNameToken = $tokens[$i + 2]; - $commaToken = $tokens[$i + 3]; - $constantValueToken = $tokens[$i + 4]; - $endParenToken = $tokens[$i + 5]; - if ( - !is_array($startParenToken) && $startParenToken === '(' && - is_array($constantNameToken) && token_name($constantNameToken[0]) === 'T_CONSTANT_ENCAPSED_STRING' && - !is_array($commaToken) && $commaToken === ',' && - is_array($constantValueToken) && in_array(token_name($constantValueToken[0]), array('T_CONSTANT_ENCAPSED_STRING', 'T_STRING')) && - !is_array($endParenToken) && $endParenToken === ')' - ) { - if (token_name($constantValueToken[0]) === 'T_STRING') { - $value = defined($constantValueToken[1]) ? constant($constantValueToken[1]) : null; - } - else { - $value = self::substr($constantValueToken[1], 1, -1); - } - $parsedConstants[self::substr($constantNameToken[1], 1, -1)] = $value; - } - } - if (token_name($token[0]) === 'T_VARIABLE') { - $assignmentToken = $tokens[$i + 1]; - $variableValueToken = $tokens[$i + 2]; - if ( - !is_array($assignmentToken) && $assignmentToken === '=' && - is_array($variableValueToken) && token_name($variableValueToken[0]) === 'T_CONSTANT_ENCAPSED_STRING' - ) { - $parsedVariables[$token[1]] = self::substr($variableValueToken[1], 1, -1); - } - } - } - } - - $optionalConstants = array( - 'flags' => 'MYSQL_CLIENT_FLAGS' - ); - $constants = array( - 'user' => 'DB_USER', - 'pass' => 'DB_PASSWORD', - 'database' => 'DB_NAME', - 'host' => 'DB_HOST', - 'charset' => array('constant' => 'DB_CHARSET', 'default' => ''), - 'collation' => array('constant' => 'DB_COLLATE', 'default' => ''), - ); - $constants += $optionalConstants; - foreach ($constants as $key => $constant) { - unset($defaultValue); - if (is_array($constant)) { - $defaultValue = $constant['default']; - $constant = $constant['constant']; - } - - if (array_key_exists($key, $return)) { - continue; - } - else if (array_key_exists($constant, $parsedConstants)) { - $return[$key] = $parsedConstants[$constant]; - } - else if (!array_key_exists($key, $optionalConstants)){ - if (isset($defaultValue)) { - $return[$key] = $defaultValue; - } - else { - return ($return = false); - } - } - } - - /** - * @see \wpdb::parse_db_host - */ - $socketPos = self::strpos($return['host'], ':/'); - if ($socketPos !== false) { - $return['socket'] = self::substr($return['host'], $socketPos + 1); - $return['host'] = self::substr($return['host'], 0, $socketPos); - } - - if ( self::substr_count( $return['host'], ':' ) > 1 ) { - $pattern = '#^(?:\[)?(?P<host>[0-9a-fA-F:]+)(?:\]:(?P<port>[\d]+))?#'; - $return['ipv6'] = true; - } else { - $pattern = '#^(?P<host>[^:/]*)(?::(?P<port>[\d]+))?#'; - } - - $matches = array(); - $result = preg_match($pattern, $return['host'], $matches); - - if (1 !== $result) { - return ($return = false); - } - - foreach (array('host', 'port') as $component) { - if (!empty($matches[$component])) { - $return[$component] = $matches[$component]; - } - } - - if (!array_key_exists('tablePrefix', $return)) { - if (array_key_exists('$table_prefix', $parsedVariables)) { - $return['tablePrefix'] = $parsedVariables['$table_prefix']; - } else { - return ($return = false); - } - } - return $return; - } - - protected static function _removeUnneededTokens($token) { - if (is_array($token)) { - return !in_array(token_name($token[0]), array( - 'T_DOC_COMMENT', 'T_WHITESPACE' - )); - } - return true; - } - - public static function isVersionBelow($target, $compared) { - return $compared === null || version_compare($compared, $target, '<'); - } - - public static function isCli() { - return (@php_sapi_name()==='cli') || !array_key_exists('REQUEST_METHOD', $_SERVER); - } -} -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/view.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/view.php deleted file mode 100644 index 531bef44..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/view.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -class wfWAFView { - - /** - * @var string - */ - protected $viewPath; - - /** - * @var string - */ - protected $viewFileExtension = '.php'; - - /** - * @var string - */ - protected $view; - - /** - * @var array - */ - protected $data; - - /** - * @param string $view - * @param array $data - * @return wfWAFView - */ - public static function create($view, $data = array()) { - return new self($view, $data); - } - - /** - * @param string $view - * @param array $data - */ - public function __construct($view, $data = array()) { - $this->viewPath = WFWAF_VIEW_PATH; - $this->view = $view; - $this->data = $data; - } - - /** - * @return string - * @throws wfWAFViewNotFoundException - */ - public function render() { - $view = preg_replace('/\.{2,}/', '.', $this->view); - $viewPath = $this->viewPath . '/' . $view . $this->viewFileExtension; - if (!file_exists($viewPath)) { - throw new wfWAFViewNotFoundException('The view ' . $viewPath . ' does not exist or is not readable.'); - } - - extract($this->data, EXTR_SKIP); - - if (!defined('WFWAF_VIEW_RENDERING')) { define('WFWAF_VIEW_RENDERING', true); } - ob_start(); - /** @noinspection PhpIncludeInspection */ - include $viewPath; - return ob_get_clean(); - } - - /** - * @return string - */ - public function __toString() { - try { - return $this->render(); - } catch (wfWAFViewNotFoundException $e) { - return defined('WFWAF_DEBUG') && WFWAF_DEBUG ? $e->getMessage() : 'The view could not be loaded.'; - } - } - - /** - * @param $data - * @return $this - */ - public function addData($data) { - $this->data = array_merge($data, $this->data); - return $this; - } - - /** - * @return array - */ - public function getData() { - return $this->data; - } - - /** - * @param array $data - * @return $this - */ - public function setData($data) { - $this->data = $data; - return $this; - } - - /** - * @return string - */ - public function getView() { - return $this->view; - } - - /** - * @param string $view - * @return $this - */ - public function setView($view) { - $this->view = $view; - return $this; - } - - /** - * Prevent POP - */ - public function __wakeup() { - $this->viewPath = WFWAF_VIEW_PATH; - $this->view = null; - $this->data = array(); - $this->viewFileExtension = '.php'; - } -} - -class wfWAFViewNotFoundException extends Exception { -} -} diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php deleted file mode 100644 index 715549c4..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php +++ /dev/null @@ -1,2489 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -class wfWAF { - - const AUTH_COOKIE = 'wfwaf-authcookie'; - - /** - * @var wfWAF - */ - private static $instance; - protected $blacklistedParams; - protected $whitelistedParams; - protected $variables = array(); - - /** - * @return wfWAF - */ - public static function getInstance() { - return self::$instance; - } - - /** - * @param wfWAF $instance - */ - public static function setInstance($instance) { - self::$instance = $instance; - } - - /** - * @var wfWAFStorageInterface - */ - private static $sharedStorageEngine; - private static $fallbackStorageEngine; - - /** - * @return wfWAFStorageInterface - */ - public static function getSharedStorageEngine() { - return self::$sharedStorageEngine; - } - - /** - * @param wfWAFStorageInterface $instance - */ - public static function setSharedStorageEngine($sharedStorageEngine, $fallback = false) { - self::$sharedStorageEngine = $sharedStorageEngine; - self::$fallbackStorageEngine = $fallback; - } - - public static function hasFallbackStorageEngine() { - return self::$fallbackStorageEngine; - } - - protected $rulesFile; - protected $trippedRules = array(); - protected $failedRules = array(); - protected $scores = array(); - protected $scoresXSS = array(); - protected $failScores = array(); - protected $rules = array(); - /** - * @var wfWAFRequestInterface - */ - private $request; - /** - * @var wfWAFStorageInterface - */ - private $storageEngine; - /** - * @var wfWAFEventBus - */ - private $eventBus; - private $debug = array(); - private $disabledRules; - private $publicKey = '-----BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzovUDp/qu7r6LT5d8dLL -H/87aRrCjUd6XtnG+afAPVfMKNp4u4L+UuYfw1RfpfquP/zLMGdfmJCUp/oJywkW -Rkqo+y7pDuqIFQ59dHvizmYQRvaZgvincBDpey5Ek9AFfB9fqYYnH9+eQw8eLdQi -h6Zsh8RsuxFM2BW6JD9Km7L5Lyxw9jU+lye7I3ICYtUOVxc3n3bJT2SiIwHK57pW -g/asJEUDiYQzsaa90YPOLdf1Ysz2rkgnCduQaEGz/RPhgUrmZfKwq8puEmkh7Yee -auEa+7b+FGTKs7dUo2BNGR7OVifK4GZ8w/ajS0TelhrSRi3BBQCGXLzUO/UURUAh -1QIDAQAB ------END PUBLIC KEY-----'; - - - /** - * @param wfWAFRequestInterface $request - * @param wfWAFStorageInterface $storageEngine - * @param wfWAFEventBus $eventBus - * @param string|null $rulesFile - */ - public function __construct($request, $storageEngine, $eventBus = null) { - $this->setRequest($request); - $this->setStorageEngine($storageEngine); - $this->setEventBus($eventBus ? $eventBus : new wfWAFEventBus); - } - - public function isReadOnly() { - $storage = $this->getStorageEngine(); - if ($storage instanceof wfWAFStorageFile) { - return !wfWAFStorageFile::allowFileWriting(); - } - - return false; - } - - public function getGlobal($global) { - if (wfWAFUtils::strpos($global, '.') === false) { - return null; - } - list($prefix, $_global) = explode('.', $global); - switch ($prefix) { - case 'request': - $method = "get" . ucfirst($_global); - if (method_exists('wfWAFRequestInterface', $method)) { - return call_user_func(array( - $this->getRequest(), - $method, - )); - } - break; - case 'server': - $key = wfWAFUtils::strtoupper($_global); - if (isset($_SERVER) && array_key_exists($key, $_SERVER)) { - return $_SERVER[$key]; - } - break; - } - return null; - } - - public function repairCron() { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $cron = $this->getStorageEngine()->getConfig('cron', null, 'livewaf'); - $changed = false; - if (!is_array($cron)) { - $cron = array(); - } - - if (!$this->_hasCronOfType($cron, 'wfWAFCronFetchRulesEvent')) { - $cron[] = new wfWAFCronFetchRulesEvent(time() + - (86400 * ($this->getStorageEngine()->getConfig('isPaid', null, 'synced') ? .5 : 7))); - $changed = true; - } - else { - foreach ($cron as $index => $c) { - if ($c instanceof wfWAFCronFetchRulesEvent && $this->getStorageEngine()->getConfig('isPaid', null, 'synced')) { - if ($c->getFireTime() > (time() + 43200)) { - $cron[$index] = $c->reschedule(); - $changed = true; - break; - } - } - } - } - - if (!$this->_hasCronOfType($cron, 'wfWAFCronFetchIPListEvent')) { - $cron[] = new wfWAFCronFetchIPListEvent(time() + 86400); - $changed = true; - } - - if (!$this->_hasCronOfType($cron, 'wfWAFCronFetchBlacklistPrefixesEvent')) { - $cron[] = new wfWAFCronFetchBlacklistPrefixesEvent(time() + 7200); - $changed = true; - } - - if (!$this->_hasCronOfType($cron, 'wfWAFCronFetchCookieRedactionPatternsEvent')) { - $cron[] = new wfWAFCronFetchCookieRedactionPatternsEvent(); - $changed = true; - } - - if ($changed) { - $this->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - } - } - - protected function _hasCronOfType($crons, $type) { - foreach ($crons as $c) { - if ($c instanceof $type) { - return true; - } - } - - return false; - } - - /** - * - */ - public function runCron() { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $storage = $this->getStorageEngine(); - - if (( - $storage->getConfig('attackDataNextInterval', null, 'transient') === null || - $storage->getConfig('attackDataNextInterval', time() + 0xffff, 'transient') <= time() - ) && - $storage->hasPreviousAttackData(microtime(true) - (60 * 5)) - ) { - $this->sendAttackData(); - } - $cron = $storage->getConfig('cron', null, 'livewaf'); - $run = array(); - $updated = false; - if (is_array($cron)) { - /** @var wfWAFCronEvent $event */ - foreach ($cron as $index => $event) { - $event->setWaf($this); - if ($event->isInPast()) { - $run[$index] = $event; - $newEvent = $event->reschedule(); - if ($newEvent instanceof wfWAFCronEvent && $newEvent !== $event) { - $cron[$index] = $newEvent; - $updated = true; - } else { - unset($cron[$index]); - } - } - } - } - $storage->setConfig('cron', $cron, 'livewaf'); - - if ($updated && method_exists($storage, 'saveConfig')) { - $storage->saveConfig('livewaf'); - } - - foreach ($run as $index => $event) { - $event->fire(); - } - } - - /** - * - */ - public function run() { - $this->loadRules(); - if ($this->isDisabled()) { - $this->eventBus->wafDisabled(); - return; - } - $this->runMigrations(); - $request = $this->getRequest(); - if ($request->getBody('wfwaf-false-positive-verified') && $this->currentUserCanWhitelist() && - wfWAFUtils::hash_equals($request->getBody('wfwaf-false-positive-nonce'), $this->getAuthCookieValue('nonce', '')) - ) { - $urlParams = wfWAFUtils::json_decode($request->getBody('wfwaf-false-positive-params'), true); - if (is_array($urlParams) && $urlParams) { - $whitelistCount = 0; - foreach ($urlParams as $urlParam) { - $path = isset($urlParam['path']) ? $urlParam['path'] : false; - $paramKey = isset($urlParam['paramKey']) ? $urlParam['paramKey'] : false; - $ruleID = isset($urlParam['ruleID']) ? $urlParam['ruleID'] : false; - if ($path && $paramKey && $ruleID) { - $this->whitelistRuleForParam($path, $paramKey, $ruleID, array( - 'timestamp' => time(), - 'description' => wfWAFI18n::__('Allowlisted via false positive dialog'), - 'source' => 'false-positive', - 'ip' => $request->getIP(), - )); - $whitelistCount++; - } - } - exit(sprintf(wfWAFI18n::__('Successfully allowlisted %d params.'), $whitelistCount)); - } - } - - $ip = $this->getRequest()->getIP(); - if ($this->isIPBlocked($ip)) { - $this->eventBus->prevBlocked($ip); - $e = new wfWAFBlockException(); - $e->setRequest($this->getRequest()); - $e->setFailedRules(array('blocked')); - $this->blockAction($e); - } - - try { - $this->eventBus->beforeRunRules(); - $this->runRules(); - $this->eventBus->afterRunRules(); - - } catch (wfWAFAllowException $e) { - // Do nothing - $this->eventBus->allow($ip, $e); - - } catch (wfWAFBlockException $e) { - $this->eventBus->block($ip, $e); - $this->blockAction($e); - - } catch (wfWAFBlockXSSException $e) { - $this->eventBus->blockXSS($ip, $e); - $this->blockXSSAction($e); - - } catch (wfWAFBlockSQLiException $e) { - $this->eventBus->blockSQLi($ip, $e); - $this->blockAction($e); - - } - - $this->runCron(); - $this->repairCron(); - - // Check if this is signed request and update ruleset. - - $ping = $this->getRequest()->getBody('ping256'); - $pingResponse = $this->getRequest()->getBody('ping_response'); - - if ($ping && $pingResponse && - $this->verifyPing($ping) && - $this->verifySignedRequest($this->getRequest()->getBody('signature256'), $this->getStorageEngine()->getConfig('apiKey', null, 'synced')) - ) { - // $this->updateRuleSet(base64_decode($this->getRequest()->body('ping'))); - $event = new wfWAFCronFetchRulesEvent(time() - 2); - $event->setWaf($this); - $event->fire(); - - header('Content-type: text/plain'); - $pingResponse = preg_replace('/[a-zA-Z0-9]/', '', $this->getRequest()->getBody('ping_response')); - exit('Success: ' . hash('sha256', $this->getStorageEngine()->getConfig('apiKey', null, 'synced') . $pingResponse)); - } - } - - /** - * - */ - public function loadRules() { - $storageEngine = $this->getStorageEngine(); - if ($storageEngine instanceof wfWAFStorageFile) { - $logLevel = error_reporting(); - if (wfWAFUtils::isCli()) { //Done to suppress errors from WP-CLI when the WAF is run on environments that have a server level constant to use the MySQLi storage engine that is not in place when running from the CLI - error_reporting(0); - } - - // Acquire lock on this file so we're not including it while it's being written in another process. - $handle = fopen($storageEngine->getRulesFile(), 'r'); - $locked = $handle !== false && flock($handle, LOCK_SH); - /** @noinspection PhpIncludeInspection */ - include $storageEngine->getRulesFile(); - if ($locked) - flock($handle, LOCK_UN); - if ($handle !== false) - fclose($handle); - - if (wfWAFUtils::isCli()) { - error_reporting($logLevel); - } - } else { - $wafRules = $storageEngine->getRules(); - if (is_array($wafRules)) { - if (array_key_exists('rules', $wafRules)) { - /** @var wfWAFRule $rule */ - foreach ($wafRules['rules'] as $rule) { - $rule->setWAF($this); - $this->rules[intval($rule->getRuleID())] = $rule; - } - } - - $properties = array( - 'failScores', - 'variables', - 'whitelistedParams', - 'blacklistedParams', - ); - foreach ($properties as $property) { - if (array_key_exists($property, $wafRules)) { - $this->{$property} = $wafRules[$property]; - } - } - } - } - } - - private function handleRuleFailure($rule, $cause) { - global $wf_waf_failure; - error_log("An unexpected error occurred while processing WAF rule " . $rule->getRuleID() . ": {$cause}"); - $wf_waf_failure = [ - 'rule_id' => $rule->getRuleID(), - 'throwable' => $cause - ]; - } - - /** - * @throws wfWAFAllowException|wfWAFBlockException|wfWAFBlockXSSException - */ - public function runRules() { - global $wf_waf_failure; - /** - * @var int $ruleID - * @var wfWAFRule $rule - */ - foreach ($this->getRules() as $ruleID => $rule) { - if (!$this->isRuleDisabled($ruleID)) { - try { - $rule->evaluate(); - } - catch (wfWAFRunException $e) { - throw $e; - } - catch (Exception $e) { // In PHP 5, Throwable does not exist - $this->handleRuleFailure($rule, $e); - } - catch (Throwable $t) { - $this->handleRuleFailure($rule, $t); - } - } - } - - $blockActions = array(); - foreach ($this->failedRules as $paramKey => $categories) { - foreach ($categories as $category => $failedRules) { - foreach ($failedRules as $failedRule) { - /** - * @var wfWAFRule $rule - * @var wfWAFRuleComparisonFailure $failedComparison - */ - $rule = $failedRule['rule']; - $failedComparison = $failedRule['failedComparison']; - $action = $failedRule['action']; - - if ($action !== 'log') { - $score = $rule->getScore(); - if ($failedComparison->hasMultiplier()) { - $score *= $failedComparison->getMultiplier(); - } - if (!isset($this->failScores[$category])) { - $this->failScores[$category] = 100; - } - if (!isset($this->scores[$paramKey][$category])) { - $this->scores[$paramKey][$category] = 0; - } - $this->scores[$paramKey][$category] += $score; - if ($this->scores[$paramKey][$category] >= $this->failScores[$category]) { - $blockActions[$category] = array( - 'paramKey' => $paramKey, - 'score' => $this->scores[$paramKey][$category], - 'action' => $action, - 'rule' => $rule, - 'failedComparison' => $failedComparison, - ); - } - if (defined('WFWAF_DEBUG') && WFWAF_DEBUG) { - $this->debug[] = sprintf("%s tripped %s for %s->%s('%s'). Score %d/%d", $paramKey, $action, - $category, $failedComparison->getAction(), $failedComparison->getExpected(), - $this->scores[$paramKey][$category], $this->failScores[$category]); - } - } - } - } - } - - uasort($blockActions, array($this, 'sortBlockActions')); - foreach ($blockActions as $blockAction) { - call_user_func(array($this, $blockAction['action']), $blockAction['rule'], $blockAction['failedComparison'], false); - } - } - - /** - * @param array $a - * @param array $b - * @return int - */ - private function sortBlockActions($a, $b) { - if ($a['score'] == $b['score']) { - return 0; - } - return ($a['score'] > $b['score']) ? -1 : 1; - } - - protected function runMigrations() { - if (!wfWAFStorageFile::allowFileWriting()) { return false; } - - $storageEngine = $this->getStorageEngine(); - $currentVersion = $storageEngine->getConfig('version'); - if (wfWAFUtils::isVersionBelow(WFWAF_VERSION, $currentVersion)) { - if (!$currentVersion) { - $cron = array( - new wfWAFCronFetchRulesEvent(time() + - (86400 * ($this->getStorageEngine()->getConfig('isPaid', null, 'synced') ? .5 : 7))), - new wfWAFCronFetchIPListEvent(time() + 86400), - new wfWAFCronFetchBlacklistPrefixesEvent(time() + 7200), - ); - $this->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - } - - // Any migrations to newer versions go here. - if ($currentVersion === '1.0.0') { - $cron = (array) $this->getStorageEngine()->getConfig('cron', null, 'livewaf'); - if (is_array($cron)) { - $cron[] = new wfWAFCronFetchIPListEvent(time() + 86400); - } - $this->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - } - - if (wfWAFUtils::isVersionBelow('1.0.2', $currentVersion)) { - $event = new wfWAFCronFetchRulesEvent(time() - 2); - $event->setWaf($this); - $event->fire(); - } - - if (wfWAFUtils::isVersionBelow('1.0.3', $currentVersion)) { - $this->getStorageEngine()->purgeIPBlocks(); - - $cron = (array) $this->getStorageEngine()->getConfig('cron', null, 'livewaf'); - if (is_array($cron)) { - $cron[] = new wfWAFCronFetchBlacklistPrefixesEvent(time() + 7200); - } - $this->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - - $event = new wfWAFCronFetchBlacklistPrefixesEvent(time() - 2); - $event->setWaf($this); - $event->fire(); - } - - if (wfWAFUtils::isVersionBelow('1.0.4', $currentVersion)) { - $movedKeys = array( - 'whitelistedURLParams' => 'livewaf', - 'cron' => 'livewaf', - 'attackDataNextInterval' => 'transient', - 'rulesLastUpdated' => 'transient', - 'premiumCount' => 'transient', - 'filePatterns' => 'transient', - 'filePatternCommonStrings' => 'transient', - 'filePatternIndexes' => 'transient', - 'signaturesLastUpdated' => 'transient', - 'signaturePremiumCount' => 'transient', - 'createInitialRulesDelay' => 'transient', - 'watchedIPs' => 'transient', - 'blockedPrefixes' => 'transient', - 'blacklistAllowedCache' => 'transient', - 'apiKey' => 'synced', - 'isPaid' => 'synced', - 'siteURL' => 'synced', - 'homeURL' => 'synced', - 'whitelistedIPs' => 'synced', - 'howGetIPs' => 'synced', - 'howGetIPs_trusted_proxies' => 'synced', - 'howGetIPs_trusted_proxies_unified' => 'synced', - 'pluginABSPATH' => 'synced', - 'other_WFNet' => 'synced', - 'serverIPs' => 'synced', - 'blockCustomText' => 'synced', - 'timeoffset_wf' => 'synced', - 'advancedBlockingEnabled' => 'synced', - 'disableWAFIPBlocking' => 'synced', - 'patternBlocks' => 'synced', - 'countryBlocks' => 'synced', - 'otherBlocks' => 'synced', - 'lockouts' => 'synced', - ); - foreach ($movedKeys as $key => $category) { - $value = $this->getStorageEngine()->getConfig($key, null, ''); - $this->getStorageEngine()->setConfig($key, $value, $category); - - if ($this->getStorageEngine() instanceof wfWAFStorageMySQL && - $this->getStorageEngine()->getStorageTable($category) === $this->getStorageEngine()->getStorageTable('') - ) { - continue; - } - - $this->getStorageEngine()->unsetConfig($key, ''); - } - } - if (wfWAFUtils::isVersionBelow('1.0.5', $currentVersion)) { - $cron = $this->getStorageEngine()->getConfig('cron', array(), 'livewaf'); - $cron[] = new wfWAFCronFetchCookieRedactionPatternsEvent(); - $this->getStorageEngine()->setConfig('cron', $cron, 'livewaf'); - } - - $this->getStorageEngine()->setConfig('version', WFWAF_VERSION); - } - } - - /** - * @param wfWAFRule $rule - */ - public function tripRule($rule) { - $this->trippedRules[] = $rule; - $action = $rule->getAction(); - $scores = $rule->getScore(); - $categories = $rule->getCategory(); - if (is_array($categories)) { - for ($i = 0; $i < count($categories); $i++) { - if (is_array($action) && !empty($action[$i])) { - $a = $action[$i]; - } else { - $a = $action; - } - if ($this->isAllowedAction($a)) { - $r = clone $rule; - $r->setScore($scores[$i]); - $r->setCategory($categories[$i]); - /** @var wfWAFRuleComparisonFailure $failed */ - foreach ($r->getComparisonGroup()->getFailedComparisons() as $failed) { - call_user_func(array($this, $a), $r, $failed); - } - } - } - } else { - if ($this->isAllowedAction($action)) { - /** @var wfWAFRuleComparisonFailure $failed */ - foreach ($rule->getComparisonGroup()->getFailedComparisons() as $failed) { - call_user_func(array($this, $action), $rule, $failed); - } - } - } - } - - /** - * @return bool - */ - public function isInLearningMode() { - return $this->getStorageEngine()->isInLearningMode(); - } - - /** - * @return bool - */ - public function isDisabled() { - return $this->getStorageEngine()->isDisabled() || !WFWAF_ENABLED; - } - - public function hasOpenSSL() { - return function_exists('openssl_verify'); - } - - public function verifyPing($ping, $algorithm = 'sha256') { - $hash = hash($algorithm, $this->getStorageEngine()->getConfig('apiKey', null, 'synced')); - return wfWAFUtils::hash_equals($ping, $hash); - } - - /** - * @param string $signature - * @param string $data - * @return bool - */ - public function verifySignedRequest($signature, $data, $algorithm = OPENSSL_ALGO_SHA256) { - if (!$this->hasOpenSSL()) { - return false; - } - $valid = openssl_verify($data, $signature, $this->getPublicKey(), $algorithm); - return $valid === 1; - } - - /** - * @param string $hash - * @param string $data - * @return bool - */ - public function verifyHashedRequest($hash, $data) { - if ($this->hasOpenSSL()) { - return false; - } - return wfWAFUtils::hash_equals($hash, - wfWAFUtils::hash_hmac('sha1', $data, $this->getStorageEngine()->getConfig('apiKey', null, 'synced'))); - } - - /** - * @return array - */ - public function getMalwareSignatures() { - try { - $encoded = $this->getStorageEngine()->getConfig('filePatterns', null, 'transient'); - if (empty($encoded)) { - return array(); - } - - $authKey = $this->getStorageEngine()->getConfig('authKey'); - $encoded = base64_decode($encoded); - $paddedKey = wfWAFUtils::substr(str_repeat($authKey, ceil(strlen($encoded) / strlen($authKey))), 0, strlen($encoded)); - $json = $encoded ^ $paddedKey; - $signatures = wfWAFUtils::json_decode($json, true); - if (!is_array($signatures)) { - return array(); - } - return $signatures; - } - catch (Exception $e) { - //Ignore - } - return array(); - } - - /** - * @param array $signatures - * @param bool $updateLastUpdatedTimestamp - */ - public function setMalwareSignatures($signatures, $updateLastUpdatedTimestamp = true) { - try { - if (!is_array($signatures)) { - $signatures = array(); - } - - $authKey = $this->getStorageEngine()->getConfig('authKey'); - if (strlen($authKey) === 0) { - return; - } - - $json = wfWAFUtils::json_encode($signatures); - $paddedKey = wfWAFUtils::substr(str_repeat($authKey, ceil(strlen($json) / strlen($authKey))), 0, strlen($json)); - $payload = $json ^ $paddedKey; - $this->getStorageEngine()->setConfig('filePatterns', base64_encode($payload), 'transient'); - - if ($updateLastUpdatedTimestamp) { - $this->getStorageEngine()->setConfig('signaturesLastUpdated', is_int($updateLastUpdatedTimestamp) ? $updateLastUpdatedTimestamp : time(), 'transient'); - } - } - catch (Exception $e) { - //Ignore - } - } - - /** - * @return array - */ - public function getMalwareSignatureCommonStrings() { - try { - $encoded = $this->getStorageEngine()->getConfig('filePatternCommonStrings', null, 'transient'); - if (empty($encoded)) { - return array(); - } - - //Grab the list of words - $authKey = $this->getStorageEngine()->getConfig('authKey'); - if (strlen($authKey) === 0) { - return array(); - } - - $encoded = base64_decode($encoded); - $paddedKey = wfWAFUtils::substr(str_repeat($authKey, ceil(strlen($encoded) / strlen($authKey))), 0, strlen($encoded)); - $json = $encoded ^ $paddedKey; - $commonStrings = wfWAFUtils::json_decode($json, true); - if (!is_array($commonStrings)) { - return array(); - } - - //Grab the list of indexes - $json = $this->getStorageEngine()->getConfig('filePatternIndexes', null, 'transient'); - if (empty($json)) { - return array(); - } - $signatureIndexes = wfWAFUtils::json_decode($json, true); - if (!is_array($signatureIndexes)) { - return array(); - } - - //Reconcile the list of indexes and transform into a list of words - $signatureCommonWords = array(); - foreach ($signatureIndexes as $indexSet) { - $entry = array(); - foreach ($indexSet as $i) { - if (isset($commonStrings[$i])) { - $entry[] = &$commonStrings[$i]; - } - } - $signatureCommonWords[] = $entry; - } - - return $signatureCommonWords; - } - catch (Exception $e) { - //Ignore - } - return array(); - } - - /** - * @param array $commonStrings - * @param array $signatureIndexes - */ - public function setMalwareSignatureCommonStrings($commonStrings, $signatureIndexes) { - try { - if (!is_array($commonStrings)) { - $commonStrings = array(); - } - - if (!is_array($signatureIndexes)) { - $signatureIndexes = array(); - } - - $authKey = $this->getStorageEngine()->getConfig('authKey'); - if (strlen($authKey) === 0) { - return; - } - - $json = wfWAFUtils::json_encode($commonStrings); - $paddedKey = wfWAFUtils::substr(str_repeat($authKey, ceil(strlen($json) / strlen($authKey))), 0, strlen($json)); - $payload = $json ^ $paddedKey; - $this->getStorageEngine()->setConfig('filePatternCommonStrings', base64_encode($payload), 'transient'); - - $payload = wfWAFUtils::json_encode($signatureIndexes); - $this->getStorageEngine()->setConfig('filePatternIndexes', $payload, 'transient'); - } - catch (Exception $e) { - //Ignore - } - } - - /** - * @param $rules - * @param bool|int $updateLastUpdatedTimestamp - * @throws wfWAFBuildRulesException - */ - public function updateRuleSet($rules, $updateLastUpdatedTimestamp = true) { - try { - if (is_string($rules)) { - $ruleString = $rules; - $parser = new wfWAFRuleParser(new wfWAFRuleLexer($rules), $this); - $rules = $parser->parse(); - } - - $storageEngine = $this->getStorageEngine(); - if ($storageEngine instanceof wfWAFStorageFile) { - if ((!is_file($storageEngine->getRulesFile()) && !is_writeable(dirname($storageEngine->getRulesFile()))) || - (is_file($storageEngine->getRulesFile()) && !is_writable($storageEngine->getRulesFile())) - ) { - throw new wfWAFBuildRulesException('Rules file not writable.'); - } - - wfWAFStorageFile::atomicFilePutContents($storageEngine->getRulesFile(), sprintf(<<<PHP -<?php -if (!defined('WFWAF_VERSION')) { - exit('Access denied'); -} -/* - This file is generated automatically. Any changes made will be lost. -*/ - -%s?> -PHP - , $this->buildRuleSet($rules)), 'rules'); - if (!empty($ruleString) && WFWAF_DEBUG && !file_exists($this->getStorageEngine()->getRulesDSLCacheFile())) { - wfWAFStorageFile::atomicFilePutContents($this->getStorageEngine()->getRulesDSLCacheFile(), $ruleString, 'rules'); - } - - } else { - $this->getStorageEngine()->setRules($rules); - } - - if ($updateLastUpdatedTimestamp) { - $this->getStorageEngine()->setConfig('rulesLastUpdated', is_int($updateLastUpdatedTimestamp) ? $updateLastUpdatedTimestamp : time(), 'transient'); - } - - } catch (wfWAFBuildRulesException $e) { - // Do something. - throw $e; - } - } - - /** - * @param string|array $rules - * @return string - * @throws wfWAFException - */ - public function buildRuleSet($rules) { - if (is_string($rules)) { - $parser = new wfWAFRuleParser(new wfWAFRuleLexer($rules), $this); - $rules = $parser->parse(); - } - - if (!array_key_exists('rules', $rules) || !is_array($rules['rules'])) { - throw new wfWAFBuildRulesException('Invalid rule format passed to buildRuleSet.'); - } - $exportedCode = ''; - - if (isset($rules['scores']) && is_array($rules['scores'])) { - foreach ($rules['scores'] as $category => $score) { - $exportedCode .= sprintf("\$this->failScores[%s] = %d;\n", var_export($category, true), $score); - } - $exportedCode .= "\n"; - } - - if (isset($rules['variables']) && is_array($rules['variables'])) { - foreach ($rules['variables'] as $var => $value) { - $exportedCode .= sprintf("\$this->variables[%s] = %s;\n", var_export($var, true), - ($value instanceof wfWAFRuleVariable) ? $value->render() : var_export($value, true)); - } - $exportedCode .= "\n"; - } - - foreach (array('blacklistedParams', 'whitelistedParams') as $key) { - if (isset($rules[$key]) && is_array($rules[$key])) { - /** @var wfWAFRuleParserURLParam $urlParam */ - foreach ($rules[$key] as $urlParam) { - if ($urlParam->getConditional()) { - - $exportedCode .= sprintf("\$this->{$key}[%s][] = array(\n%s => %s,\n%s => %s,\n%s => %s\n);\n", var_export($urlParam->getParam(), true), - var_export('url', true), var_export($urlParam->getUrl(), true), - var_export('rules', true), var_export($urlParam->getRules(), true), - var_export('conditional', true), $urlParam->getConditional()->render()); - } - else { - if ($urlParam->getRules()) { - $url = array( - 'url' => $urlParam->getUrl(), - 'rules' => $urlParam->getRules(), - ); - } else { - $url = $urlParam->getUrl(); - } - - $exportedCode .= sprintf("\$this->{$key}[%s][] = %s;\n", var_export($urlParam->getParam(), true), - var_export($url, true)); - } - } - $exportedCode .= "\n"; - } - } - - /** @var wfWAFRule $rule */ - foreach ($rules['rules'] as $rule) { - $rule->setWAF($this); - $exportedCode .= sprintf(<<<HTML -\$this->rules[%d] = %s; - -HTML - , - $rule->getRuleID(), - $rule->render() - ); - } - - return $exportedCode; - } - - /** - * @param $rules - * @return wfWAFRuleComparisonGroup - * @throws wfWAFBuildRulesException - */ - protected function _buildRuleSet($rules) { - $ruleGroup = new wfWAFRuleComparisonGroup(); - foreach ($rules as $rule) { - if (!array_key_exists('type', $rule)) { - throw new wfWAFBuildRulesException('Invalid rule: type not set.'); - } - switch ($rule['type']) { - case 'comparison_group': - if (!array_key_exists('comparisons', $rule) || !is_array($rule['comparisons'])) { - throw new wfWAFBuildRulesException('Invalid rule format passed to _buildRuleSet.'); - } - $ruleGroup->add($this->_buildRuleSet($rule['comparisons'])); - break; - - case 'comparison': - if (array_key_exists('parameter', $rule)) { - $rule['parameters'] = array($rule['parameter']); - } - - foreach (array('action', 'expected', 'parameters') as $ruleRequirement) { - if (!array_key_exists($ruleRequirement, $rule)) { - throw new wfWAFBuildRulesException("Invalid rule: $ruleRequirement not set."); - } - } - - $ruleGroup->add(new wfWAFRuleComparison($this, $rule['action'], $rule['expected'], $rule['parameters'])); - break; - - case 'operator': - if (!array_key_exists('operator', $rule)) { - throw new wfWAFBuildRulesException('Invalid rule format passed to _buildRuleSet. operator not passed.'); - } - $ruleGroup->add(new wfWAFRuleLogicalOperator($rule['operator'])); - break; - - default: - throw new wfWAFBuildRulesException("Invalid rule type [{$rule['type']}] passed to _buildRuleSet."); - } - } - return $ruleGroup; - } - - public function isRuleDisabled($ruleID) { - if ($this->disabledRules === null) { - $this->disabledRules = $this->getStorageEngine()->getConfig('disabledRules'); - if (!is_array($this->disabledRules)) { - $this->disabledRules = array(); - } - } - return !empty($this->disabledRules[$ruleID]); - } - - public function getDisabledRuleIDs() { - if ($this->disabledRules === null) { - $this->disabledRules = $this->getStorageEngine()->getConfig('disabledRules'); - if (!is_array($this->disabledRules)) { - $this->disabledRules = array(); - } - } - - $ruleIDs = array(); - foreach ($this->disabledRules as $id => $value) { - if (!empty($value)) { - $ruleIDs[] = $id; - } - } - return $ruleIDs; - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @throws wfWAFBlockException - */ - public function fail($rule, $failedComparison) { - $category = $rule->getCategory(); - $paramKey = $failedComparison->getParamKey(); - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'block', - ); - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @throws wfWAFBlockException - */ - public function failXSS($rule, $failedComparison) { - $category = $rule->getCategory(); - $paramKey = $failedComparison->getParamKey(); - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'blockXSS', - ); - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @throws wfWAFBlockException - */ - public function failSQLi($rule, $failedComparison) { - $category = $rule->getCategory(); - $paramKey = $failedComparison->getParamKey(); - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'blockSQLi', - ); - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @throws wfWAFAllowException - */ - public function allow($rule, $failedComparison) { - // Exclude this request from further blocking - $e = new wfWAFAllowException(); - $e->setFailedRules(array($rule)); - $e->setParamKey($failedComparison->getParamKey()); - $e->setParamValue($failedComparison->getParamValue()); - $e->setRequest($this->getRequest()); - throw $e; - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @param bool $updateFailedRules - * @throws wfWAFBlockException - */ - public function block($rule, $failedComparison, $updateFailedRules = true) { - $paramKey = $failedComparison->getParamKey(); - $category = $rule->getCategory(); - - if ($updateFailedRules) { - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'block', - ); - } - - $e = new wfWAFBlockException(); - $e->setFailedRules(array($rule)); - $e->setParamKey($failedComparison->getParamKey()); - $e->setParamValue($failedComparison->getParamValue()); - $e->setRequest($this->getRequest()); - throw $e; - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @param bool $updateFailedRules - * @throws wfWAFBlockXSSException - */ - public function blockXSS($rule, $failedComparison, $updateFailedRules = true) { - $paramKey = $failedComparison->getParamKey(); - $category = $rule->getCategory(); - - if ($updateFailedRules) { - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'blockXSS', - ); - } - $e = new wfWAFBlockXSSException(); - $e->setFailedRules(array($rule)); - $e->setParamKey($failedComparison->getParamKey()); - $e->setParamValue($failedComparison->getParamValue()); - $e->setRequest($this->getRequest()); - throw $e; - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @param bool $updateFailedRules - * @throws wfWAFBlockSQLiException - */ - public function blockSQLi($rule, $failedComparison, $updateFailedRules = true) { - // Verify the param looks like SQLi to help reduce false positives. - if (!wfWAFSQLiParser::testForSQLi($failedComparison->getParamValue())) { - return; - } - - $paramKey = $failedComparison->getParamKey(); - $category = $rule->getCategory(); - - if ($updateFailedRules) { - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'blockXSS', - ); - } - $e = new wfWAFBlockSQLiException(); - $e->setFailedRules(array($rule)); - $e->setParamKey($failedComparison->getParamKey()); - $e->setParamValue($failedComparison->getParamValue()); - $e->setRequest($this->getRequest()); - throw $e; - } - - /** - * @param wfWAFRule $rule - * @param wfWAFRuleComparisonFailure $failedComparison - * @param bool $updateFailedRules - */ - public function log($rule, $failedComparison, $updateFailedRules = true) { - $paramKey = $failedComparison->getParamKey(); - $category = $rule->getCategory(); - - if ($updateFailedRules) { - $this->failedRules[$paramKey][$category][] = array( - 'rule' => $rule, - 'failedComparison' => $failedComparison, - 'action' => 'log', - ); - } - - $event=new wfWAFLogEvent( - array($rule), - $failedComparison->getParamKey(), - $failedComparison->getParamValue(), - $this->getRequest() - ); - - $this->recordLogEvent($event); - } - - public function recordLogEvent($event) { - $this->eventBus->log($this->getRequest()->getIP(), $event); - $this->logAction($event); - } - - /** - * @todo Hook up $httpCode - * @param wfWAFBlockException $e - * @param int $httpCode - */ - public function blockAction($e, $httpCode = 403, $redirect = false, $template = null) { - $this->getStorageEngine()->logAttack($e->getFailedRules(), $e->getParamKey(), $e->getParamValue(), $e->getRequest(), $e->getRequest()->getMetadata()); - - if ($redirect) { - wfWAFUtils::redirect($redirect); // exits and emits no cache headers - } - - if ($httpCode == 503) { - wfWAFUtils::statusHeader(503); - wfWAFUtils::doNotCache(); - if ($secsToGo = $e->getRequest()->getMetadata('503Time')) { - header('Retry-After: ' . $secsToGo); - } - exit($this->getUnavailableMessage($e->getRequest()->getMetadata('503Reason'), $template)); - } - - header('HTTP/1.0 403 Forbidden'); - wfWAFUtils::doNotCache(); - exit($this->getBlockedMessage($template)); - } - - /** - * @todo Hook up $httpCode - * @param wfWAFBlockXSSException $e - * @param int $httpCode - */ - public function blockXSSAction($e, $httpCode = 403, $redirect = false) { - $this->getStorageEngine()->logAttack($e->getFailedRules(), $e->getParamKey(), $e->getParamValue(), $e->getRequest(), $e->getRequest()->getMetadata()); - - if ($redirect) { - wfWAFUtils::redirect($redirect); // exits and emits no cache headers - } - - if ($httpCode == 503) { - wfWAFUtils::statusHeader(503); - wfWAFUtils::doNotCache(); - if ($secsToGo = $e->getRequest()->getMetadata('503Time')) { - header('Retry-After: ' . $secsToGo); - } - exit($this->getUnavailableMessage($e->getRequest()->getMetadata('503Reason'))); - } - - header('HTTP/1.0 403 Forbidden'); - wfWAFUtils::doNotCache(); - exit($this->getBlockedMessage()); - } - - public function logAction($event) { - $failedRules = array_merge(array('logged'), $event->getFailedRules()); - $this->getStorageEngine()->logAttack($failedRules, $event->getParamKey(), $event->getParamValue(), $this->getRequest()); - } - - /** - * @return string - */ - public function getBlockedMessage($template = null) { - if ($template === null) { - if ($this->currentUserCanWhitelist()) { - $template = '403-roadblock'; - } - else { - $template = '403'; - } - } - try { - $homeURL = wfWAF::getInstance()->getStorageEngine()->getConfig('homeURL', null, 'synced'); - $siteURL = wfWAF::getInstance()->getStorageEngine()->getConfig('siteURL', null, 'synced'); - $customText = wfWAF::getInstance()->getStorageEngine()->getConfig('blockCustomText', null, 'synced'); - $errorNonce = ''; - if ($authCookie = wfWAF::getInstance()->parseAuthCookie()) { - $errorNonce = wfWAF::getInstance()->getStorageEngine()->getConfig('errorNonce_' . (int) $authCookie['userID'], '', 'synced'); - } - } - catch (Exception $e) { - //Do nothing - } - - return wfWAFView::create($template, array( - 'waf' => $this, - 'homeURL' => $homeURL, - 'siteURL' => $siteURL, - 'customText' => $customText, - 'errorNonce' => $errorNonce, - ))->render(); - } - - /** - * @return string - */ - public function getUnavailableMessage($reason = '', $template = null) { - if ($template === null) { $template = '503'; } - try { - $homeURL = wfWAF::getInstance()->getStorageEngine()->getConfig('homeURL', null, 'synced'); - $siteURL = wfWAF::getInstance()->getStorageEngine()->getConfig('siteURL', null, 'synced'); - $customText = wfWAF::getInstance()->getStorageEngine()->getConfig('blockCustomText', null, 'synced'); - $errorNonce = ''; - if ($authCookie = wfWAF::getInstance()->parseAuthCookie()) { - $errorNonce = wfWAF::getInstance()->getStorageEngine()->getConfig('errorNonce_' . (int) $authCookie['userID'], '', 'synced'); - } - } - catch (Exception $e) { - //Do nothing - } - - return wfWAFView::create($template, array( - 'waf' => $this, - 'reason' => $reason, - 'homeURL' => $homeURL, - 'siteURL' => $siteURL, - 'customText' => $customText, - 'errorNonce' => $errorNonce, - ))->render(); - } - - /** - * - */ - public function whitelistFailedRules() { - foreach ($this->failedRules as $paramKey => $categories) { - foreach ($categories as $category => $failedRules) { - foreach ($failedRules as $failedRule) { - /** - * @var wfWAFRule $rule - * @var wfWAFRuleComparisonFailure $failedComparison - */ - $rule = $failedRule['rule']; - if ($rule->getWhitelist()) { - $failedComparison = $failedRule['failedComparison']; - - $data = array( - 'timestamp' => time(), - 'description' => 'Allowlisted while in Learning Mode.', - 'source' => 'learning-mode', - 'ip' => $this->getRequest()->getIP(), - ); - if (function_exists('get_current_user_id')) { - $data['userID'] = get_current_user_id(); - } - $this->whitelistRuleForParam($this->getRequest()->getPath(), $failedComparison->getParamKey(), - $rule->getRuleID(), $data); - } - } - } - } - } - - /** - * @param string $path - * @param string $paramKey - * @param int $ruleID - * @param array $data - */ - public function whitelistRuleForParam($path, $paramKey, $ruleID, $data = array()) { - if ($this->isParamKeyURLBlacklisted($ruleID, $paramKey, $path)) { - return; - } - - $whitelist = (array) $this->getStorageEngine()->getConfig('whitelistedURLParams', null, 'livewaf'); - if (!is_array($whitelist)) { - $whitelist = array(); - } - if (is_array($ruleID)) { - foreach ($ruleID as $id) { - $whitelist[base64_encode($path) . "|" . base64_encode($paramKey)][$id] = $data; - } - } else { - $whitelist[base64_encode($path) . "|" . base64_encode($paramKey)][$ruleID] = $data; - } - - $this->getStorageEngine()->setConfig('whitelistedURLParams', $whitelist, 'livewaf'); - } - - /** - * @param int $ruleID - * @param string $urlPath - * @param string $paramKey - * @return bool - */ - public function isRuleParamWhitelisted($ruleID, $urlPath, $paramKey) { - if ($this->isParamKeyURLBlacklisted($ruleID, $paramKey, $urlPath)) { - return false; - } - - if ($paramKey==='none' || (is_array($this->whitelistedParams) && array_key_exists($paramKey, $this->whitelistedParams) - && is_array($this->whitelistedParams[$paramKey])) - ) { - foreach ($this->whitelistedParams[$paramKey] as $urlRegex) { - if (is_array($urlRegex)) { - if (isset($urlRegex['rules']) && is_array($urlRegex['rules']) && !in_array($ruleID, $urlRegex['rules'])) { - continue; - } - if (isset($urlRegex['conditional']) && !$urlRegex['conditional']->evaluate()) { - continue; - } - $urlRegex = $urlRegex['url']; - } - if (preg_match($urlRegex, $urlPath)) { - return true; - } - } - } - - $whitelistKey = base64_encode($urlPath) . "|" . base64_encode($paramKey); - $whitelist = (array) $this->getStorageEngine()->getConfig('whitelistedURLParams', array(), 'livewaf'); - if (!is_array($whitelist)) { - $whitelist = array(); - } - - if (array_key_exists($whitelistKey, $whitelist)) { - foreach (array('all', $ruleID) as $key) { - if (array_key_exists($key, $whitelist[$whitelistKey])) { - $ruleData = $whitelist[$whitelistKey][$key]; - if (is_array($ruleData) && array_key_exists('disabled', $ruleData)) { - return !$ruleData['disabled']; - } else if ($ruleData) { - return true; - } - } - } - } - return false; - } - - /** - * - */ - public function sendAttackData() { - if ($this->getStorageEngine()->getConfig('attackDataKey', false) === false) { - $this->getStorageEngine()->setConfig('attackDataKey', mt_rand(0, 0xfff)); - } - - if (!$this->getStorageEngine()->getConfig('other_WFNet', true, 'synced')) { - $this->getStorageEngine()->truncateAttackData(); - $this->getStorageEngine()->unsetConfig('attackDataNextInterval', 'transient'); - return; - } - - $request = new wfWAFHTTP(); - try { - $response = wfWAFHTTP::get( - sprintf(WFWAF_API_URL_SEC . "waf-rules/%d.txt", $this->getStorageEngine()->getConfig('attackDataKey')), - $request); - - if ($response instanceof wfWAFHTTPResponse) { - if ($response->getBody() === 'ok') { - $request = new wfWAFHTTP(); - $request->setHeaders(array( - 'Content-Type' => 'application/json', - )); - $response = wfWAFHTTP::post(WFWAF_API_URL_SEC . "?" . http_build_query(array( - 'action' => 'send_waf_attack_data', - 'k' => $this->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $this->getStorageEngine()->getConfig('siteURL', null, 'synced') ? $this->getStorageEngine()->getConfig('siteURL', null, 'synced') : - sprintf('%s://%s/', $this->getRequest()->getProtocol(), rawurlencode($this->getRequest()->getHost())), - 'h' => $this->getStorageEngine()->getConfig('homeURL', null, 'synced') ? $this->getStorageEngine()->getConfig('homeURL', null, 'synced') : - sprintf('%s://%s/', $this->getRequest()->getProtocol(), rawurlencode($this->getRequest()->getHost())), - 't' => microtime(true), - 'lang' => $this->getStorageEngine()->getConfig('WPLANG', null, 'synced'), - ), '', '&'), $this->getStorageEngine()->getAttackData(), $request); - - if ($response instanceof wfWAFHTTPResponse && $response->getBody()) { - $jsonData = wfWAFUtils::json_decode($response->getBody(), true); - if (is_array($jsonData) && array_key_exists('success', $jsonData)) { - $this->getStorageEngine()->truncateAttackData(); - $this->getStorageEngine()->unsetConfig('attackDataNextInterval', 'transient'); - } - if (array_key_exists('data', $jsonData) && array_key_exists('watchedIPList', $jsonData['data'])) { - $this->getStorageEngine()->setConfig('watchedIPs', $jsonData['data']['watchedIPList'], 'transient'); - } - } - } else if (is_string($response->getBody()) && preg_match('/next check in: ([0-9]+)/', $response->getBody(), $matches)) { - $this->getStorageEngine()->setConfig('attackDataNextInterval', time() + $matches[1], 'transient'); - if ($this->getStorageEngine()->isAttackDataFull()) { - $this->getStorageEngine()->truncateAttackData(); - } - } - - // Could be that the server is down, so hold off on sending data for a little while. - } else { - $this->getStorageEngine()->setConfig('attackDataNextInterval', time() + 7200, 'transient'); - } - - } catch (wfWAFHTTPTransportException $e) { - error_log($e->getMessage()); - } - } - - /** - * @param string $action - * @return array - */ - public function isAllowedAction($action) { - static $actions; - if (!isset($actions)) { - $actions = array_flip($this->getAllowedActions()); - } - return array_key_exists($action, $actions); - } - - /** - * @return array - */ - public function getAllowedActions() { - return array('fail', 'allow', 'block', 'failXSS', 'blockXSS', 'failSQLi', 'blockSQLi', 'log'); - } - - /** - * - */ - public function uninstall() { - $this->getStorageEngine()->uninstall(); - } - - public function fileList() { - $fileList = array(); - $rulesFile = $this->getCompiledRulesFile(); - if ($rulesFile !== null) - array_push($fileList, $rulesFile); - if (method_exists($this->getStorageEngine(), 'fileList')) { - $fileList = array_merge($fileList, $this->getStorageEngine()->fileList()); - } - return $fileList; - } - - /** - * @param int $ruleID - * @param string $paramKey - * @param string $urlPath - * @return bool - */ - public function isParamKeyURLBlacklisted($ruleID, $paramKey, $urlPath) { - if (is_array($this->blacklistedParams) && array_key_exists($paramKey, $this->blacklistedParams) - && is_array($this->blacklistedParams[$paramKey]) - ) { - foreach ($this->blacklistedParams[$paramKey] as $urlRegex) { - if (is_array($urlRegex)) { - if (!in_array($ruleID, $urlRegex['rules'])) { - continue; - } - if (isset($urlRegex['conditional']) && !$urlRegex['conditional']->evaluate()) { - continue; - } - $urlRegex = $urlRegex['url']; - } - if (preg_match($urlRegex, $urlPath)) { - return true; - } - } - } - return false; - } - - /** - * @return bool - */ - public function currentUserCanWhitelist() { - if ($authCookie = $this->parseAuthCookie()) { - return $authCookie['role'] === 'administrator'; - } - return false; - } - - /** - * @param string $capability - * @return bool - */ - public function checkCapability($capability) { - if ($authCookie = $this->parseAuthCookie()) { - return $authCookie['capabilities']!==null && in_array($capability, $authCookie['capabilities']); - } - return false; - } - - /** - * @param string|null $cookieVal - * @return bool - */ - public function parseAuthCookie($cookieVal = null) { - if ($cookieVal === null) { - $cookieName = $this->getAuthCookieName(); - $cookieVal = !empty($_COOKIE[$cookieName]) && is_string($_COOKIE[$cookieName]) ? $_COOKIE[$cookieName] : ''; - } - $pieces = explode('|', $cookieVal); - $pieceCount = count($pieces); - if ($pieceCount === 4) { - list($userID, $role, $capabilityList, $signature) = $pieces; - $capabilities = empty($capabilityList) ? array() : explode(',', $capabilityList); - } - else if ($pieceCount === 3) { - list($userID, $role, $signature) = $pieces; - $capabilities = null; - } - else { - return false; - } - if (wfWAFUtils::hash_equals($signature, $this->getAuthCookieValue($userID, $role, $capabilities))) { - return array( - 'userID' => $userID, - 'role' => $role, - 'capabilities' => $capabilities - ); - } - return false; - } - - /** - * @param int|string $userID - * @param string $role - * @param array $capabilities - * @return bool|string - */ - public function getAuthCookieValue($userID, $role, $capabilities = array()) { - if (!is_array($capabilities)) - $capabilities = array(); - $algo = function_exists('hash') ? 'sha256' : 'sha1'; - return wfWAFUtils::hash_hmac($algo, $userID . $role . '|'. implode(',', $capabilities) . floor(time() / 43200), $this->getStorageEngine()->getConfig('authKey')); - } - - /** - * @param string $action - * @return bool|string - */ - public function createNonce($action) { - $userInfo = $this->parseAuthCookie(); - if ($userInfo === false) { - $userInfo = array('userID' => 0, 'role' => ''); // Use an empty user like WordPress would - } - $userID = $userInfo['userID']; - $role = $userInfo['role']; - $algo = function_exists('hash') ? 'sha256' : 'sha1'; - return wfWAFUtils::hash_hmac($algo, $action . $userID . $role . floor(time() / 43200), $this->getStorageEngine()->getConfig('authKey')); - } - - /** - * @param string $nonce - * @param string $action - * @return bool - */ - public function verifyNonce($nonce, $action) { - if (empty($nonce)) { - return false; - } - return wfWAFUtils::hash_equals($nonce, $this->createNonce($action)); - } - - /** - * @param string|null $host - * @return string - */ - public function getAuthCookieName($host = null) { - if ($host === null) { - $host = $this->getRequest()->getHost(); - } - return self::AUTH_COOKIE . '-' . md5($host); - } - - /** - * @return string - */ - public function getCompiledRulesFile() { - return $this->rulesFile; - } - - /** - * @param string $rulesFile - */ - public function setCompiledRulesFile($rulesFile) { - $this->rulesFile = $rulesFile; - } - - /** - * @param $ip - * @return mixed - */ - public function isIPBlocked($ip) { - return $this->getStorageEngine()->isIPBlocked($ip); - } - - /** - * @param wfWAFRequest $request - * @return bool|array false if it should not be blocked, otherwise an array defining the context for the final action - */ - public function willPerformFinalAction($request) { - return false; - } - - /** - * @return array - */ - public function getTrippedRules() { - return $this->trippedRules; - } - - /** - * @return array - */ - public function getTrippedRuleIDs() { - $ret = array(); - /** @var wfWAFRule $rule */ - foreach ($this->getTrippedRules() as $rule) { - $ret[] = $rule->getRuleID(); - } - return $ret; - } - - public function showBench() { - return sprintf("Bench: %f seconds\n\n", microtime(true) - $this->getRequest()->getTimestamp()); - } - - public function debug() { - return join("\n", $this->debug) . "\n\n" . $this->showBench(); -// $debug = ''; -// /** @var wfWAFRule $rule */ -// foreach ($this->trippedRules as $rule) { -// $debug .= $rule->debug(); -// } -// return $debug; - } - - /** - * @return array - */ - public function getScores() { - return $this->scores; - } - - /** - * @param string $var - * @return null - */ - public function getVariable($var) { - if (array_key_exists($var, $this->variables)) { - return $this->variables[$var]; - } - return null; - } - - /** - * @return wfWAFRequestInterface - */ - public function getRequest() { - return $this->request; - } - - /** - * @param wfWAFRequestInterface $request - */ - public function setRequest($request) { - $this->request = $request; - } - - /** - * @return wfWAFStorageInterface - */ - public function getStorageEngine() { - return $this->storageEngine; - } - - /** - * @param wfWAFStorageInterface $storageEngine - */ - public function setStorageEngine($storageEngine) { - $this->storageEngine = $storageEngine; - } - - /** - * @return wfWAFEventBus - */ - public function getEventBus() { - return $this->eventBus; - } - - /** - * @param wfWAFEventBus $eventBus - */ - public function setEventBus($eventBus) { - $this->eventBus = $eventBus; - } - - /** - * @return array - */ - public function getRules() { - return $this->rules; - } - - /** - * @param array $rules - */ - public function setRules($rules) { - $this->rules = $rules; - } - - /** - * @param int $ruleID - * @return null|wfWAFRule - */ - public function getRule($ruleID) { - $rules = $this->getRules(); - if (is_array($rules) && array_key_exists($ruleID, $rules)) { - return $rules[$ruleID]; - } - return null; - } - - /** - * @return string - */ - public function getPublicKey() { - return $this->publicKey; - } - - /** - * @param string $publicKey - */ - public function setPublicKey($publicKey) { - $this->publicKey = $publicKey; - } - - /** - * @return array - */ - public function getFailedRules() { - return $this->failedRules; - } - - public function getCookieRedactionPatterns($retry = true) { - $patterns = $this->getStorageEngine()->getConfig('cookieRedactionPatterns', null, 'transient'); - if ($patterns === null) { - if ($retry) { - $event = new wfWAFCronFetchCookieRedactionPatternsEvent(time()); - $event->setWaf($this); - $event->fire(); - return $this->getCookieRedactionPatterns(false); - } - } - else { - $patterns = wfWAFUtils::json_decode($patterns, true); - if (is_array($patterns)) - return $patterns; - } - return null; - } - - public function getVersion() { - return WFWAF_VERSION; - } - -} - -require_once __DIR__ . '/api.php'; - -/** - * Serialized for use with the WAF cron. - */ -abstract class wfWAFCronEvent { - - abstract public function fire(); - - abstract public function getNextFireTime(); - - protected $fireTime; - private $waf; - - /** - * @param int $fireTime - */ - public function __construct($fireTime = null) { - $this->setFireTime($fireTime === null ? $this->getNextFireTime() : $fireTime); - } - - /** - * @param int|null $time - * @return bool - */ - public function isInPast($time = null) { - if ($time === null) { - $time = time(); - } - return $this->getFireTime() <= $time; - } - - public function __sleep() { - return array('fireTime'); - } - - /** - * @return mixed - */ - public function getFireTime() { - return $this->fireTime; - } - - /** - * @param mixed $fireTime - */ - public function setFireTime($fireTime) { - $this->fireTime = $fireTime; - } - - /** - * @return wfWAF - */ - public function getWaf() { - return $this->waf; - } - - /** - * @param wfWAF $waf - */ - public function setWaf($waf) { - $this->waf = $waf; - } - - public function reschedule() { - $nextFireTime = $this->getNextFireTime(); - if ($nextFireTime === null) - return false; - $newEvent = new static($nextFireTime); - return $newEvent; - } - -} - -class wfWAFCronFetchRulesEvent extends wfWAFCronEvent { - - /** - * @var wfWAFHTTPResponse - */ - private $response; - private $forceUpdate; - - public function __construct($fireTime, $forceUpdate = false) { - parent::__construct($fireTime); - $this->forceUpdate = $forceUpdate; - } - - public function fire() { - $waf = $this->getWaf(); - if (!$waf) { - return false; - } - - $success = true; - $guessSiteURL = sprintf('%s://%s/', $waf->getRequest()->getProtocol(), $waf->getRequest()->getHost()); - try { - $payload = array( - 'action' => 'get_waf_rules', - 'k' => $waf->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') : $guessSiteURL, - 'h' => $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') : $guessSiteURL, - 'openssl' => $waf->hasOpenSSL() ? 1 : 0, - 'lang' => $waf->getStorageEngine()->getConfig('WPLANG', null, 'synced'), - 'waf_version' => $waf->getVersion() - ); - $lastRuleHash=$this->forceUpdate ? null : $waf->getStorageEngine()->getConfig('lastRuleHash', null, 'transient'); - if($lastRuleHash!==null) - $payload['hash']=$lastRuleHash; - if ($waf->getStorageEngine()->getConfig('other_WFNet', true, 'synced')) { - $payload['disabled'] = implode('|', $waf->getDisabledRuleIDs()); - } - - $this->response = wfWAFHTTP::get(WFWAF_API_URL_SEC . "?" . http_build_query($payload, '', '&'), null, 10, 5); - if ($this->response) { - if($this->response->getStatusCode() !== 304){ - $jsonData = wfWAFUtils::json_decode($this->response->getBody(), true); - if (is_array($jsonData)) { - - if ($waf->hasOpenSSL() && - isset($jsonData['data']['signature256']) && - isset($jsonData['data']['rules']) && - $waf->verifySignedRequest(base64_decode($jsonData['data']['signature256']), $jsonData['data']['rules']) - ) { - $waf->updateRuleSet(base64_decode($jsonData['data']['rules']), - isset($jsonData['data']['timestamp']) ? $jsonData['data']['timestamp'] : true); - $waf->getStorageEngine()->setConfig('lastRuleHash', $jsonData['data']['signature256'], 'transient'); - if (array_key_exists('premiumCount', $jsonData['data'])) { - $waf->getStorageEngine()->setConfig('premiumCount', $jsonData['data']['premiumCount'], 'transient'); - } - - } else if (!$waf->hasOpenSSL() && - isset($jsonData['data']['hash']) && - isset($jsonData['data']['rules']) && - $waf->verifyHashedRequest($jsonData['data']['hash'], $jsonData['data']['rules']) - ) { - $waf->updateRuleSet(base64_decode($jsonData['data']['rules']), - isset($jsonData['data']['timestamp']) ? $jsonData['data']['timestamp'] : true); - $waf->getStorageEngine()->setConfig('lastRuleHash', $jsonData['data']['hash'], 'transient'); - if (array_key_exists('premiumCount', $jsonData['data'])) { - $waf->getStorageEngine()->setConfig('premiumCount', $jsonData['data']['premiumCount'], 'transient'); - } - } - else { - $success = false; - } - } - else { - $success = false; - } - } - } - else { - $success = false; - } - - $lastMalwareSignatureUpdate=$waf->getStorageEngine()->getConfig('signaturesLastUpdated', 0, 'transient'); - $isPaid=$waf->getStorageEngine()->getConfig('isPaid', false, 'synced'); - //Only update malware signatures for free sites if they are older than 3 days plus an hour - if ($isPaid || $this->forceUpdate || $lastMalwareSignatureUpdate < (time() - (259200 + 3600))) { - $this->response = wfWAFHTTP::get(WFWAF_API_URL_SEC . "?" . http_build_query(array( - 'action' => 'get_malware_signatures', - 'k' => $waf->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') : $guessSiteURL, - 'h' => $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') : $guessSiteURL, - 'openssl' => $waf->hasOpenSSL() ? 1 : 0, - 'hash' => $this->forceUpdate ? null : $waf->getStorageEngine()->getConfig('lastMalwareHash', null, 'transient'), - 'cs-hash' => $this->forceUpdate ? null : $waf->getStorageEngine()->getConfig('lastMalwareHashCommonStrings', null, 'transient'), - 'lang' => $waf->getStorageEngine()->getConfig('WPLANG', null, 'synced') - ), '', '&'), null, 15, 5); - if ($this->response) { - if($this->response->getStatusCode() !== 304){ - $jsonData = wfWAFUtils::json_decode($this->response->getBody(), true); - if (is_array($jsonData)) { - if ($waf->hasOpenSSL() && - isset($jsonData['data']['signature256']) && - isset($jsonData['data']['signatures']) && - $waf->verifySignedRequest(base64_decode($jsonData['data']['signature256']), $jsonData['data']['signatures']) - ) { - $waf->setMalwareSignatures(wfWAFUtils::json_decode(base64_decode($jsonData['data']['signatures'])), - isset($jsonData['data']['timestamp']) ? $jsonData['data']['timestamp'] : true); - $waf->getStorageEngine()->setConfig('lastMalwareHash', $jsonData['data']['signature256'], 'transient'); - if (array_key_exists('premiumCount', $jsonData['data'])) { - $waf->getStorageEngine()->setConfig('signaturePremiumCount', $jsonData['data']['premiumCount'], 'transient'); - } - - if (array_key_exists('commonStringsSignature256', $jsonData['data']) && - array_key_exists('commonStrings', $jsonData['data']) && - array_key_exists('signatureIndexes', $jsonData['data']) && - $waf->verifySignedRequest(base64_decode($jsonData['data']['commonStringsSignature256']), $jsonData['data']['commonStrings'] . $jsonData['data']['signatureIndexes']) - ) { - $waf->setMalwareSignatureCommonStrings(wfWAFUtils::json_decode(base64_decode($jsonData['data']['commonStrings'])), wfWAFUtils::json_decode(base64_decode($jsonData['data']['signatureIndexes']))); - - $waf->getStorageEngine()->setConfig('lastMalwareHashCommonStrings', $jsonData['data']['commonStringsSignature256'], 'transient'); - } - - } else if (!$waf->hasOpenSSL() && - isset($jsonData['data']['hash']) && - isset($jsonData['data']['signatures']) && - $waf->verifyHashedRequest($jsonData['data']['hash'], $jsonData['data']['signatures']) - ) { - $waf->setMalwareSignatures(wfWAFUtils::json_decode(base64_decode($jsonData['data']['signatures'])), - - isset($jsonData['data']['timestamp']) ? $jsonData['data']['timestamp'] : true); - $waf->getStorageEngine()->setConfig('lastMalwareHash', $jsonData['data']['hash'], 'transient'); - if (array_key_exists('premiumCount', $jsonData['data'])) { - $waf->getStorageEngine()->setConfig('signaturePremiumCount', $jsonData['data']['premiumCount'], 'transient'); - } - - if (array_key_exists('commonStringsHash', $jsonData['data']) && - array_key_exists('commonStrings', $jsonData['data']) && - array_key_exists('signatureIndexes', $jsonData['data']) && - $waf->verifyHashedRequest($jsonData['data']['commonStringsHash'], $jsonData['data']['commonStrings'] . $jsonData['data']['signatureIndexes']) - ) { - $waf->setMalwareSignatureCommonStrings(wfWAFUtils::json_decode(base64_decode($jsonData['data']['commonStrings'])), wfWAFUtils::json_decode(base64_decode($jsonData['data']['signatureIndexes']))); - $waf->getStorageEngine()->setConfig('lastMalwareHashCommonStrings', $jsonData['data']['commonStringsHash'], 'transient'); - } - } - else { - $success = false; - } - } - else { - $success = false; - } - } - } - else { - $success = false; - } - } - } catch (wfWAFHTTPTransportException $e) { - error_log($e->getMessage()); - $success = false; - } catch (wfWAFBuildRulesException $e) { - error_log($e->getMessage()); - $success = false; - } - - if ($success) { - $waf->getStorageEngine()->setConfig('lastRuleUpdateCheck', time(), 'transient'); - } - - return $success; - } - - public function getNextFireTime() { - $waf = $this->getWaf(); - if (!$waf) - return null; - if ($this->response) { - $headers = $this->response->getHeaders(); - if (isset($headers['Expires'])) { - $timestamp = strtotime($headers['Expires']); - // Make sure it's at least 2 hours ahead. - if ($timestamp && $timestamp > (time() + 7200)) { - return $timestamp; - } - } - } - return time() + (86400 * ($waf->getStorageEngine()->getConfig('isPaid', null, 'synced') ? .5 : 7)); - } - - public function getResponse() { - return $this->response; - } -} - -class wfWAFCronFetchIPListEvent extends wfWAFCronEvent { - - public function fire() { - $waf = $this->getWaf(); - if (!$waf) { - return; - } - $guessSiteURL = sprintf('%s://%s/', $waf->getRequest()->getProtocol(), $waf->getRequest()->getHost()); - try { - //Watch List - $request = new wfWAFHTTP(); - $request->setHeaders(array( - 'Content-Type' => 'application/json', - )); - $response = wfWAFHTTP::post(WFWAF_API_URL_SEC . "?" . http_build_query(array( - 'action' => 'send_waf_attack_data', - 'k' => $waf->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') : $guessSiteURL, - 'h' => $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') : $guessSiteURL, - 't' => microtime(true), - 'lang' => $waf->getStorageEngine()->getConfig('WPLANG', null, 'synced'), - ), '', '&'), '[]', $request); - - if ($response instanceof wfWAFHTTPResponse && $response->getBody()) { - $jsonData = wfWAFUtils::json_decode($response->getBody(), true); - if (is_array($jsonData) && array_key_exists('data', $jsonData) && is_array($jsonData['data']) && array_key_exists('watchedIPList', $jsonData['data'])) { - $waf->getStorageEngine()->setConfig('watchedIPs', $jsonData['data']['watchedIPList'], 'transient'); - } - } - } catch (wfWAFHTTPTransportException $e) { - error_log($e->getMessage()); - } - } - - public function getNextFireTime() { - return time() + 86400; - } - -} - -class wfWAFCronFetchBlacklistPrefixesEvent extends wfWAFCronEvent { - - public function fire() { - $waf = $this->getWaf(); - if (!$waf) { - return; - } - $guessSiteURL = sprintf('%s://%s/', $waf->getRequest()->getProtocol(), $waf->getRequest()->getHost()); - try { - if ($waf->getStorageEngine()->getConfig('isPaid', null, 'synced')) { - $request = new wfWAFHTTP(); - $response = wfWAFHTTP::get(WFWAF_API_URL_SEC . 'blacklist-prefixes.bin' . "?" . http_build_query(array( - 'k' => $waf->getStorageEngine()->getConfig('apiKey', null, 'synced'), - 's' => $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('siteURL', null, 'synced') : $guessSiteURL, - 'h' => $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') ? $waf->getStorageEngine()->getConfig('homeURL', null, 'synced') : $guessSiteURL, - 't' => microtime(true), - 'lang' => $waf->getStorageEngine()->getConfig('WPLANG', null, 'synced'), - ), '', '&'), $request); - - if ($response instanceof wfWAFHTTPResponse && $response->getBody()) { - $waf->getStorageEngine()->setConfig('blockedPrefixes', base64_encode($response->getBody()), 'transient'); - $waf->getStorageEngine()->setConfig('blacklistAllowedCache', '', 'transient'); - } - } - - $waf->getStorageEngine()->vacuum(); - } catch (wfWAFHTTPTransportException $e) { - error_log($e->getMessage()); - } - } - - public function getNextFireTime() { - return time() + 7200; - } - -} - -class wfWAFCronFetchCookieRedactionPatternsEvent extends wfWAFCronEvent { - - const INTERVAL = 604800; - const RETRY_DELAY = 14400; - - public function fire() { - $waf = $this->getWaf(); - if (!$waf) - return; - $storageEngine = $waf->getStorageEngine(); - $lastFailure = $storageEngine->getConfig('cookieRedactionLastUpdateFailure', null, 'transient'); - if ($lastFailure !== null && time() - (int) $lastFailure < self::RETRY_DELAY) - return; - try { - $api = new wfWafApi($waf); - $response = $api->actionGet('get_cookie_redaction_patterns'); - if ($response->getStatusCode() === 200) { - $body = $response->getBody(); - $data = wfWAFUtils::json_decode($body, true); - if (is_array($data) && array_key_exists('data', $data)) { - $patterns = $data['data']; - if (is_array($patterns)) { - $storageEngine->setConfig('cookieRedactionPatterns', wfWAFUtils::json_encode($patterns), 'transient'); - return; - } - } - error_log('Malformed cookie redaction patterns received, response body: ' . print_r($body, true)); - } - else { - error_log('Failed to retrieve cookie redaction patterns, response code: ' . $response->getStatusCode()); - } - } - catch (wfWafMissingApiKeyException $e) { - // This is intentionally ignored as the API key may be missing during initial setup of the plugin - } - catch (wfWafApiException $e) { - error_log('Failed to retrieve cookie redaction patterns: ' . $e->getMessage()); - } - $storageEngine->setConfig('cookieRedactionLastUpdateFailure', time(), 'transient'); - } - - public function getNextFireTime() { - return time() + self::INTERVAL; - } - -} - -interface wfWAFObserver { - - public function prevBlocked($ip); - - public function block($ip, $exception); - - public function allow($ip, $exception); - - public function blockXSS($ip, $exception); - - public function blockSQLi($ip, $exception); - - public function log($ip, $event); - - public function wafDisabled(); - - public function beforeRunRules(); - - public function afterRunRules(); -} - -class wfWAFEventBus implements wfWAFObserver { - - private $observers = array(); - - /** - * @param wfWAFObserver $observer - * @throws wfWAFEventBusException - */ - public function attach($observer) { - if (!($observer instanceof wfWAFObserver)) { - throw new wfWAFEventBusException('Observer supplied to wfWAFEventBus::attach must implement wfWAFObserver'); - } - $this->observers[] = $observer; - } - - /** - * @param wfWAFObserver $observer - */ - public function detach($observer) { - $key = array_search($observer, $this->observers, true); - if ($key !== false) { - unset($this->observers[$key]); - } - } - - public function prevBlocked($ip) { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->prevBlocked($ip); - } - } - - public function block($ip, $exception) { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->block($ip, $exception); - } - } - - public function allow($ip, $exception) { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->allow($ip, $exception); - } - } - - public function blockXSS($ip, $exception) { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->blockXSS($ip, $exception); - } - } - - public function blockSQLi($ip, $exception) { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->blockSQLi($ip, $exception); - } - } - - public function log($ip, $event) { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->log($ip, $event); - } - } - - - public function wafDisabled() { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->wafDisabled(); - } - } - - public function beforeRunRules() { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->beforeRunRules(); - } - } - - public function afterRunRules() { - /** @var wfWAFObserver $observer */ - foreach ($this->observers as $observer) { - $observer->afterRunRules(); - } - } -} - -class wfWAFBaseObserver implements wfWAFObserver { - - public function prevBlocked($ip) { - - } - - public function block($ip, $exception) { - - } - - public function allow($ip, $exception) { - - } - - public function blockXSS($ip, $exception) { - - } - - public function blockSQLi($ip, $exception) { - - } - - public function log($ip, $exception) { - - } - - public function wafDisabled() { - - } - - public function beforeRunRules() { - - } - - public function afterRunRules() { - - } -} - -class wfWAFException extends Exception { -} - -class wfWAFRunException extends Exception { - - /** @var array */ - private $failedRules; - /** @var string */ - private $paramKey; - /** @var string */ - private $paramValue; - /** @var wfWAFRequestInterface */ - private $request; - - /** - * @return array - */ - public function getFailedRules() { - return $this->failedRules; - } - - /** - * @param array $failedRules - */ - public function setFailedRules($failedRules) { - $this->failedRules = $failedRules; - } - - /** - * @return string - */ - public function getParamKey() { - return $this->paramKey; - } - - /** - * @param string $paramKey - */ - public function setParamKey($paramKey) { - $this->paramKey = $paramKey; - } - - /** - * @return string - */ - public function getParamValue() { - return $this->paramValue; - } - - /** - * @param string $paramValue - */ - public function setParamValue($paramValue) { - $this->paramValue = $paramValue; - } - - /** - * @return wfWAFRequestInterface - */ - public function getRequest() { - return $this->request; - } - - /** - * @param wfWAFRequestInterface $request - */ - public function setRequest($request) { - $this->request = $request; - } -} - -class wfWAFAllowException extends wfWAFRunException { -} - -class wfWAFBlockException extends wfWAFRunException { -} - -class wfWAFBlockXSSException extends wfWAFRunException { -} - -class wfWAFBlockSQLiException extends wfWAFRunException { -} - -class wfWAFBuildRulesException extends wfWAFException { -} - -class wfWAFEventBusException extends wfWAFException { -} -} - -class wfWAFLogEvent { - - private $failedRules; - private $paramKey, $paramValue; - private $request; - - public function __construct($failedRules=array(), $paramKey=null, $paramValue=null, $request=null){ - $this->failedRules=$failedRules; - $this->paramKey=$paramKey; - $this->paramValue=$paramValue; - $this->request=$request; - } - - public function getFailedRules(){ - return $this->failedRules; - } - - public function getParamKey(){ - return $this->paramKey; - } - - public function getParamValue(){ - return $this->paramValue; - } - - public function getRequest(){ - return $this->request; - } - -} \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/xmlrpc.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/xmlrpc.php deleted file mode 100644 index 2b289164..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/xmlrpc.php +++ /dev/null @@ -1,335 +0,0 @@ -<?php -if (defined('WFWAF_VERSION') && !defined('WFWAF_RUN_COMPLETE')) { - -/** - * Adaptation of WordPress's XML-RPC message parser so we can use it without loading the full environment - * - */ -class wfXMLRPCBody -{ - var $header; - var $doctype; - var $message; - var $messageType; // methodCall / methodResponse / fault - var $faultCode; - var $faultString; - var $methodName; - var $params; - - // Current variable stacks - var $_arraystructs = array(); // The stack used to keep track of the current array/struct - var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array - var $_currentStructName = array(); // A stack as well - var $_param; - var $_value; - var $_currentTag; - var $_currentTagContents; - // The XML parser - var $_parser; - - static function canParse() { - return function_exists('xml_parser_create'); - } - - /** - * PHP5 constructor. - */ - function __construct( $message ) - { - $this->message =& $message; - } - - function __toString() { - $output = ''; - if (isset($this->header)) { - $output .= $this->header . "\n"; - } - - if (isset($this->doctype)) { - $output .= $this->doctype . "\n"; - } - - $output .= '<methodCall><methodName>' . htmlentities($this->methodName, ENT_XML1) . '</methodName><params>' . $this->_paramsToString($this->params) . '</params></methodCall>'; - return $output; - } - - function _paramsToString($params, $parentType = false) { - $output = ''; - if (is_array($params)) { - foreach ($params as $key => $p) { - if (!$parentType) { //Top level - $output .= '<param><value>'; - } - else if ($parentType == 'array') { - $output .= '<value>'; - } - else if ($parentType == 'struct') { - $output .= '<member><name>' . htmlentities($key, ENT_XML1) . '</name><value>'; - } - - if ($p['tag'] == 'data') { - $output .= '<array><data>' . $this->_paramsToString($p['value'], 'array') . '</data></array>'; - } - else if ($p['tag'] == 'struct') { - $output .= '<struct>' . $this->_paramsToString($p['value'], 'struct') . '</struct>'; - } - else if ($p['tag'] == 'base64') { - $output .= '<base64>' . base64_encode($p['value']) . '</base64>'; - } - else if ($p['tag'] == 'value') { - $output .= htmlentities($p['value'], ENT_XML1); - } - else if ($p['tag'] == 'dateTime.iso8601') { - $output .= $p['value']->getXml(); - } - else { - $output .= '<' . $p['tag'] . '>' . htmlentities($p['value'], ENT_XML1) . '</' . $p['tag'] . '>'; - } - - if (!$parentType) { //Top level - $output .= '</value></param>'; - } - else if ($parentType == 'array') { - $output .= '</value>'; - } - else if ($parentType == 'struct') { - $output .= '</value></member>'; - } - } - } - return $output; - } - - function parse() - { - if (!function_exists( 'xml_parser_create')) { - return false; - } - - // first remove the XML declaration - if (preg_match('/<\?xml.*?\?'.'>/s', substr( $this->message, 0, 100 ), $matches)) { - $this->header = $matches[0]; - } - $replacement = preg_replace( '/<\?xml.*?\?'.'>/s', '', substr( $this->message, 0, 100 ), 1 ); - $this->message = trim( substr_replace( $this->message, $replacement, 0, 100 ) ); - if ( '' == $this->message ) { - return false; - } - - // Then remove the DOCTYPE - if (preg_match('/^<!DOCTYPE[^>]*+>/i', substr( $this->message, 0, 100 ), $matches)) { - $this->doctype = $matches[0]; - } - $replacement = preg_replace( '/^<!DOCTYPE[^>]*+>/i', '', substr( $this->message, 0, 200 ), 1 ); - $this->message = trim( substr_replace( $this->message, $replacement, 0, 200 ) ); - if ( '' == $this->message ) { - return false; - } - - // Check that the root tag is valid - $root_tag = substr( $this->message, 0, strcspn( substr( $this->message, 0, 20 ), "> \t\r\n" ) ); - if ( '<!DOCTYPE' === strtoupper( $root_tag ) ) { - return false; - } - if ( ! in_array( $root_tag, array( '<methodCall', '<methodResponse', '<fault' ) ) ) { - return false; - } - - // Bail if there are too many elements to parse - $element_limit = 30000; - if ( $element_limit && 2 * $element_limit < substr_count( $this->message, '<' ) ) { - return false; - } - - $this->_parser = xml_parser_create(); - // Set XML parser to take the case of tags in to account - xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false); - // Set XML parser callback functions - xml_set_object($this->_parser, $this); - xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); - xml_set_character_data_handler($this->_parser, 'cdata'); - - // 256Kb, parse in chunks to avoid the RAM usage on very large messages - $chunk_size = 262144; - - $final = false; - do { - if (strlen($this->message) <= $chunk_size) { - $final = true; - } - $part = substr($this->message, 0, $chunk_size); - $this->message = substr($this->message, $chunk_size); - if (!xml_parse($this->_parser, $part, $final)) { - return false; - } - if ($final) { - break; - } - } while (true); - xml_parser_free($this->_parser); - - // Grab the error messages, if any - if ($this->messageType == 'fault') { - $this->faultCode = $this->params[0]['faultCode']; - $this->faultString = $this->params[0]['faultString']; - } - return true; - } - - function tag_open($parser, $tag, $attr) - { - $this->_currentTagContents = ''; - $this->currentTag = $tag; - switch($tag) { - case 'methodCall': - case 'methodResponse': - case 'fault': - $this->messageType = $tag; - break; - /* Deal with stacks of arrays and structs */ - case 'data': // data is to all intents and puposes more interesting than array - $this->_arraystructstypes[] = 'array'; - $this->_arraystructs[] = array(); - break; - case 'struct': - $this->_arraystructstypes[] = 'struct'; - $this->_arraystructs[] = array(); - break; - } - } - - function cdata($parser, $cdata) - { - $this->_currentTagContents .= $cdata; - } - - function tag_close($parser, $tag) - { - $valueFlag = false; - switch($tag) { - case 'int': - case 'i4': - $value = (int)trim($this->_currentTagContents); - $valueFlag = true; - break; - case 'double': - $value = (double)trim($this->_currentTagContents); - $valueFlag = true; - break; - case 'string': - $value = (string)trim($this->_currentTagContents); - $valueFlag = true; - break; - case 'dateTime.iso8601': - $value = new wfXMLRPCDate(trim($this->_currentTagContents)); - $valueFlag = true; - break; - case 'value': - // "If no type is indicated, the type is string." - if (trim($this->_currentTagContents) != '') { - $value = (string)$this->_currentTagContents; - $valueFlag = true; - } - break; - case 'boolean': - $value = (boolean)trim($this->_currentTagContents); - $valueFlag = true; - break; - case 'base64': - $value = base64_decode($this->_currentTagContents); - $valueFlag = true; - break; - /* Deal with stacks of arrays and structs */ - case 'data': - case 'struct': - $value = array_pop($this->_arraystructs); - array_pop($this->_arraystructstypes); - $valueFlag = true; - break; - case 'member': - array_pop($this->_currentStructName); - break; - case 'name': - $this->_currentStructName[] = trim($this->_currentTagContents); - break; - case 'methodName': - $this->methodName = trim($this->_currentTagContents); - break; - } - - if ($valueFlag) { - if (count($this->_arraystructs) > 0) { - // Add value to struct or array - if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') { - // Add to struct - $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = array('tag' => $tag, 'value' => $value); - } else { - // Add to array - $this->_arraystructs[count($this->_arraystructs)-1][] = array('tag' => $tag, 'value' => $value); - } - } else { - // Just add as a parameter - $this->params[] = array('tag' => $tag, 'value' => $value); - } - } - $this->_currentTagContents = ''; - } -} - -class wfXMLRPCDate { - var $year; - var $month; - var $day; - var $hour; - var $minute; - var $second; - var $timezone; - - function __construct( $time ) - { - // $time can be a PHP timestamp or an ISO one - if (is_numeric($time)) { - $this->parseTimestamp($time); - } else { - $this->parseIso($time); - } - } - - function parseTimestamp($timestamp) - { - $this->year = date('Y', $timestamp); - $this->month = date('m', $timestamp); - $this->day = date('d', $timestamp); - $this->hour = date('H', $timestamp); - $this->minute = date('i', $timestamp); - $this->second = date('s', $timestamp); - $this->timezone = ''; - } - - function parseIso($iso) - { - $this->year = substr($iso, 0, 4); - $this->month = substr($iso, 4, 2); - $this->day = substr($iso, 6, 2); - $this->hour = substr($iso, 9, 2); - $this->minute = substr($iso, 12, 2); - $this->second = substr($iso, 15, 2); - $this->timezone = substr($iso, 17); - } - - function getIso() - { - return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second.$this->timezone; - } - - function getXml() - { - return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>'; - } - - function getTimestamp() - { - return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year); - } -} -} diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/rules.key b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/rules.key deleted file mode 100644 index 82f96b7f..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/rules.key +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzovUDp/qu7r6LT5d8dLL -H/87aRrCjUd6XtnG+afAPVfMKNp4u4L+UuYfw1RfpfquP/zLMGdfmJCUp/oJywkW -Rkqo+y7pDuqIFQ59dHvizmYQRvaZgvincBDpey5Ek9AFfB9fqYYnH9+eQw8eLdQi -h6Zsh8RsuxFM2BW6JD9Km7L5Lyxw9jU+lye7I3ICYtUOVxc3n3bJT2SiIwHK57pW -g/asJEUDiYQzsaa90YPOLdf1Ysz2rkgnCduQaEGz/RPhgUrmZfKwq8puEmkh7Yee -auEa+7b+FGTKs7dUo2BNGR7OVifK4GZ8w/ajS0TelhrSRi3BBQCGXLzUO/UURUAh -1QIDAQAB ------END PUBLIC KEY----- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-blacklist.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-blacklist.php deleted file mode 100644 index 834919ce..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-blacklist.php +++ /dev/null @@ -1,219 +0,0 @@ -<?php -if (!defined('WFWAF_VIEW_RENDERING')) { exit; } - -/** @var wfWAF $waf */ -/** @var wfWAFView $this */ - -/* - * IMPORTANT: - * - * If the form variables below change name or format, admin.ajaxWatcher.js in the main plugin also needs changed. It - * processes these to generate its whitelist button. - */ - -$request = $waf->getRequest(); -$headerString = ''; -if (is_array($request->getHeaders())) { - foreach ($request->getHeaders() as $header => $value) { - switch (wfWAFUtils::strtolower($header)) { - case 'cookie': - $headerString .= 'Cookie: ' . trim($request->getCookieString()) . "\n"; - break; - - case 'host': - $headerString .= 'Host: ' . $request->getHost() . "\n"; - break; - - case 'authorization': - $hasAuth = true; - if ($request->getAuth()) { - $headerString .= 'Authorization: Basic <redacted>' . "\n"; - } - break; - - default: - $headerString .= $header . ': ' . $value . "\n"; - break; - } - } -} - -$payload = array('ip' => $request->getIP(), 'timestamp' => $request->getTimestamp(), 'headers' => $headerString, 'url' => $request->getProtocol() . '://' . $request->getHost() . $request->getPath(), 'home_url' => $waf->getStorageEngine()->getConfig('homeURL', '', 'synced')); -$payloadJSON = wfWAFUtils::json_encode($payload); -$shouldEncrypt = false; -if (function_exists('openssl_get_publickey') && function_exists('openssl_get_cipher_methods')) { - $ciphers = openssl_get_cipher_methods(); - $shouldEncrypt = array_search('aes-256-cbc', $ciphers) !== false; -} - -if ($shouldEncrypt) { - $keyData = file_get_contents(dirname(__FILE__) . '/../falsepositive.key'); - $key = @openssl_get_publickey($keyData); - if ($key !== false) { - $symmetricKey = wfWAFUtils::random_bytes(32); - $iv = wfWAFUtils::random_bytes(16); - $encrypted = @openssl_encrypt($payloadJSON, 'aes-256-cbc', $symmetricKey, OPENSSL_RAW_DATA, $iv); - if ($encrypted !== false) { - $success = openssl_public_encrypt($symmetricKey, $symmetricKeyEncrypted, $key, OPENSSL_PKCS1_OAEP_PADDING); - if ($success) { - $message = $iv . $symmetricKeyEncrypted . $encrypted; - $signatureRaw = hash('sha256', $message, true); - $success = openssl_public_encrypt($signatureRaw, $signature, $key, OPENSSL_PKCS1_OAEP_PADDING); - if ($success) { - $payload = array('message' => bin2hex($message), 'signature' => bin2hex($signature)); - $payloadJSON = wfWAFUtils::json_encode($payload); - } - } - } - } -} - -$message = base64_encode($payloadJSON); -$payload = "-----BEGIN REPORT-----\n" . implode("\n", str_split($message, 60)) . "\n-----END REPORT-----"; - -?> -<!DOCTYPE html> -<html> -<head> - <meta charset="UTF-8"> - <title><?php wfWAFI18n::esc_html_e('403 Forbidden') ?> - - - -'; } -?> - -

- -

- -

- -

- -
- -

- -

- -

- - -

- -

- -


.

- - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-roadblock.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-roadblock.php deleted file mode 100644 index ee0d5e98..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-roadblock.php +++ /dev/null @@ -1,450 +0,0 @@ -getRequest()->getMethod()); -$urlParamsToWhitelist = array(); -foreach ($waf->getFailedRules() as $paramKey => $categories) { - foreach ($categories as $category => $failedRules) { - foreach ($failedRules as $failedRule) { - /** - * @var wfWAFRule $rule - * @var wfWAFRuleComparisonFailure $failedComparison - */ - $rule = $failedRule['rule']; - $failedComparison = $failedRule['failedComparison']; - - $urlParamsToWhitelist[] = array( - 'path' => $waf->getRequest()->getPath(), - 'paramKey' => $failedComparison->getParamKey(), - 'ruleID' => $rule->getRuleID(), - ); - } - } -} - - -?> - - - - <?php wfWAFI18n::esc_html_e('403 Forbidden') ?> - - - -'; } ?> -
-
-

-

-

- -
-
- - -
-

- -
- - - -
-

- -

-
- - - -
- -
- - -

- - - - - - - - - -
- -
-
- \s*/i', '', $contents); - $contents = preg_replace('/^\s*/i', '', $contents); - $contents = preg_replace('/ -
-
-

-

-

-
-
- -

-


.

-
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403.php deleted file mode 100644 index cfa23e16..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403.php +++ /dev/null @@ -1,365 +0,0 @@ - - - - - <?php wfWAFI18n::esc_html_e('403 Forbidden') ?> - - - -'; } ?> -
-
-

-

-

- -
-
- - -

- - - - - - - - - -
- -
-
- \s*/i', '', $contents); - $contents = preg_replace('/^\s*/i', '', $contents); - $contents = preg_replace('/ -
-
-

-

-

-
-
- -

-


.

-
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503-lockout.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503-lockout.php deleted file mode 100644 index 89d42c63..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503-lockout.php +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - <?php wfWAFI18n::esc_html_e('Your access to this site has been limited by the site owner') ?> - - - -'; } ?> -
-
-

-

-

- -
-
- - -
-
    -
  • -
- createNonce('wf-form'); - if (!empty($siteURL) && !empty($nonce)) : ?> -
-

- -
- -    -
- - - -

- - - - - - - - - -
- -
-
- \s*/i', '', $contents); - $contents = preg_replace('/^\s*/i', '', $contents); - $contents = preg_replace('/ -
-
-

-

-

-
-
- -

-


.

-
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503.php b/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503.php deleted file mode 100644 index b0c76f19..00000000 --- a/wp/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503.php +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - <?php wfWAFI18n::esc_html_e('Your access to this site has been limited by the site owner') ?> - - - -'; } ?> -
-
-

-

-

- -
-
- -createNonce('wf-form'); -if (!empty($siteURL) && !empty($nonce)) : ?> -
-

- -
- -    -
- - - -

- - - - - - - - - -
- -
-
- \s*/i', '', $contents); - $contents = preg_replace('/^\s*/i', '', $contents); - $contents = preg_replace('/ -
-
-

-

-

-
-
- -

-


.

-
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/.htaccess b/wp/wp-content/plugins/wordfence/views/.htaccess deleted file mode 100644 index 1fc312f9..00000000 --- a/wp/wp-content/plugins/wordfence/views/.htaccess +++ /dev/null @@ -1,16 +0,0 @@ - - RewriteEngine On - RewriteCond %{REQUEST_URI} \.php$ - RewriteRule .* - [F,L,NC] - - - - - Require all denied - - - Order deny,allow - Deny from all - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/block-list.php b/wp/wp-content/plugins/wordfence/views/blocking/block-list.php deleted file mode 100644 index 34c1d7db..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/block-list.php +++ /dev/null @@ -1,505 +0,0 @@ - -
-
-
-

for %s', 'wordfence'), preg_replace('/^https?:\/\//i', '', wfUtils::wpSiteURL())), array('span'=>array('class'=>array()))); ?>

-
-
-
    -
  • -
  • - Wordfence Automatic Blocks', 'wordfence'), array('span'=>array('class'=>array()))); ?> -
  • -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/blocking-create.php b/wp/wp-content/plugins/wordfence/views/blocking/blocking-create.php deleted file mode 100644 index 3dba73df..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/blocking-create.php +++ /dev/null @@ -1,533 +0,0 @@ - -
    -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Block Type', 'wordfence'), array('span'=>array('class'=>array()))); ?> - - -
    - - - -
    -
  • - -
-render(); -?> - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/blocking-status.php b/wp/wp-content/plugins/wordfence/views/blocking/blocking-status.php deleted file mode 100644 index 058ae126..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/blocking-status.php +++ /dev/null @@ -1,31 +0,0 @@ - -
    -
  • - 'blocking-all-options', - 'img' => 'options.svg', - 'title' => __('Blocking Options', 'wordfence'), - 'subtitle' => __('Manage global blocking options.', 'wordfence'), - 'link' => network_admin_url('admin.php?page=WordfenceWAF&subpage=blocking_options'), - ))->render(); - ?> -
  • - -
  • -
    -

    -

    -
    -
    -

       ()

    -
    -
  • - -
diff --git a/wp/wp-content/plugins/wordfence/views/blocking/country-block-map.php b/wp/wp-content/plugins/wordfence/views/blocking/country-block-map.php deleted file mode 100644 index 1ee7a22d..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/country-block-map.php +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/country-modal.php b/wp/wp-content/plugins/wordfence/views/blocking/country-modal.php deleted file mode 100644 index 97cd8483..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/country-modal.php +++ /dev/null @@ -1,79 +0,0 @@ - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/option-bypass-cookie.php b/wp/wp-content/plugins/wordfence/views/blocking/option-bypass-cookie.php deleted file mode 100644 index 8dd9bad3..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/option-bypass-cookie.php +++ /dev/null @@ -1,51 +0,0 @@ - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/option-bypass-redirect.php b/wp/wp-content/plugins/wordfence/views/blocking/option-bypass-redirect.php deleted file mode 100644 index c3366846..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/option-bypass-redirect.php +++ /dev/null @@ -1,58 +0,0 @@ - -
    -
  • -
  • -
      -
    • ()
    • -
    • - - - - - - - - - - - - - -
      - -
    • -
    -
  • -
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/blocking/options-group-advanced-country.php b/wp/wp-content/plugins/wordfence/views/blocking/options-group-advanced-country.php deleted file mode 100644 index f0c6eed0..00000000 --- a/wp/wp-content/plugins/wordfence/views/blocking/options-group-advanced-country.php +++ /dev/null @@ -1,91 +0,0 @@ - -
-
-
-
-
-
- -
-
-
-
-
- -
    -
  • - 'cbl_action', - 'selectOptions' => array( - array('value' => 'block', 'label' => 'Show the standard Wordfence blocked message'), - array('value' => 'redir', 'label' => 'Redirect to the URL below'), - ), - 'selectValue' => wfConfig::get('cbl_action'), - 'title' => __('What to do when we block someone', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING_OPTION_WHAT_TO_DO), - ))->render(); - ?> -
  • -
  • - 'cbl_redirURL', - 'textValue' => wfConfig::get('cbl_redirURL'), - 'title' => __('URL to redirect blocked users to', 'wordfence'), - 'placeholder' => __('Enter a full URL (e.g., http://example.com/blocked/)', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING_OPTION_REDIRECT), - ))->render(); - ?> -
  • -
  • - 'cbl_loggedInBlocked', - 'enabledValue' => 1, - 'disabledValue' => 0, - 'value' => wfConfig::get('cbl_loggedInBlocked') ? 1 : 0, - 'title' => __('Block countries even if they are logged in', 'wordfence'), - 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_BLOCKING_OPTION_BLOCK_LOGGED_IN), - ))->render(); - ?> -
  • -
  • - render(); - ?> -
  • -
  • - render(); - ?> -
  • -
- -
    -
  • -
  • -
  • render(); ?>
  • -
  • ()
  • -
- -
-
-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/common/block-navigation-option.php b/wp/wp-content/plugins/wordfence/views/common/block-navigation-option.php deleted file mode 100644 index 9b07ff8b..00000000 --- a/wp/wp-content/plugins/wordfence/views/common/block-navigation-option.php +++ /dev/null @@ -1,37 +0,0 @@ - -
- - ]+)/i', '${1} class="wf-block-navigation-option-icon"', $contents); - echo $contents; - ?> - - <?php echo esc_attr($title); ?> - -
-

-

-
-
- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/common/indeterminate-progress.php b/wp/wp-content/plugins/wordfence/views/common/indeterminate-progress.php deleted file mode 100644 index 19e26701..00000000 --- a/wp/wp-content/plugins/wordfence/views/common/indeterminate-progress.php +++ /dev/null @@ -1,13 +0,0 @@ - - diff --git a/wp/wp-content/plugins/wordfence/views/common/license.php b/wp/wp-content/plugins/wordfence/views/common/license.php deleted file mode 100644 index ca28ef4c..00000000 --- a/wp/wp-content/plugins/wordfence/views/common/license.php +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - <?php echo esc_html($title); ?> - - - - -

- - -

-

Wordfence Admin Page', 'wordfence'), network_admin_url('admin.php?page=Wordfence')), array('a'=>array('href'=>array()))); ?>

- -

- -

-
-

- -

-
- - -

.
.

- - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/common/modal-prompt.php b/wp/wp-content/plugins/wordfence/views/common/modal-prompt.php deleted file mode 100644 index 883035fa..00000000 --- a/wp/wp-content/plugins/wordfence/views/common/modal-prompt.php +++ /dev/null @@ -1,55 +0,0 @@ - , 'label' => - - - - - -
-
-
-
-
-
-
-

-

-
- -
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
- - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/banner.php b/wp/wp-content/plugins/wordfence/views/onboarding/banner.php deleted file mode 100644 index 63d043f5..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/banner.php +++ /dev/null @@ -1,43 +0,0 @@ - -
    -
  • -
  • - - - - -
  • -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/disabled-overlay.php b/wp/wp-content/plugins/wordfence/views/onboarding/disabled-overlay.php deleted file mode 100644 index b812a949..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/disabled-overlay.php +++ /dev/null @@ -1,10 +0,0 @@ - -
-
-
-

-

-
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/fresh-install.php b/wp/wp-content/plugins/wordfence/views/onboarding/fresh-install.php deleted file mode 100644 index 53b7998f..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/fresh-install.php +++ /dev/null @@ -1,28 +0,0 @@ - -
-
- -

- 1)) ?> -
-
- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/modal-final-attempt.php b/wp/wp-content/plugins/wordfence/views/onboarding/modal-final-attempt.php deleted file mode 100644 index 40e39eb2..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/modal-final-attempt.php +++ /dev/null @@ -1,41 +0,0 @@ - -
-
-
-
-
-
-
-
-
-
- - -
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/overlay.php b/wp/wp-content/plugins/wordfence/views/onboarding/overlay.php deleted file mode 100644 index 171d3a71..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/overlay.php +++ /dev/null @@ -1,35 +0,0 @@ - -
- × - - -
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/plugin-header.php b/wp/wp-content/plugins/wordfence/views/onboarding/plugin-header.php deleted file mode 100644 index fea1ec1a..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/plugin-header.php +++ /dev/null @@ -1,41 +0,0 @@ - -
-
-
- -
-
-
    -
  • -
    - 2)) ?> -
    -
  • -
  • -
-
-
- \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/registration-prompt.php b/wp/wp-content/plugins/wordfence/views/onboarding/registration-prompt.php deleted file mode 100644 index a4c311f1..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/registration-prompt.php +++ /dev/null @@ -1,124 +0,0 @@ - -
-

- - - - - -

-
style="display: none;"> -
- -
-
- -
-
-
style="display: none;" - > -
-
- - - -
-
- - -
- - - -
- -
- -
- -
-
-
- array( - 'title' => __('Response License Installed', 'wordfence'), - 'content' => __('Congratulations! Wordfence Response is now active on your website. Please note that some Response features are not enabled by default.', 'wordfence') - ), - 'care' => array( - 'title' => __('Care License Installed', 'wordfence'), - 'content' => __('Congratulations! Wordfence Care is now active on your website. Please note that some Care features are not enabled by default.', 'wordfence') - ), - 'premium' => array( - 'title' => __('Premium License Installed', 'wordfence'), - 'content' => __('Congratulations! Wordfence Premium is now active on your website. Please note that some Premium features are not enabled by default.', 'wordfence') - ), - 'free' => array( - 'title' => __('Free License Installed', 'wordfence'), - 'content' => __('Congratulations! Wordfence Free is now active on your website.', 'wordfence') - ), - ); - ?> - $modal): ?> -
"> -
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-

-

contact Wordfence Support(opens in new tab)', 'wordfence'), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))) ?> -

- -
-
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/onboarding/tour-overlay.php b/wp/wp-content/plugins/wordfence/views/onboarding/tour-overlay.php deleted file mode 100644 index 11c069f0..00000000 --- a/wp/wp-content/plugins/wordfence/views/onboarding/tour-overlay.php +++ /dev/null @@ -1,9 +0,0 @@ - - diff --git a/wp/wp-content/plugins/wordfence/views/options/block-all-options-controls.php b/wp/wp-content/plugins/wordfence/views/options/block-all-options-controls.php deleted file mode 100644 index c1cf3878..00000000 --- a/wp/wp-content/plugins/wordfence/views/options/block-all-options-controls.php +++ /dev/null @@ -1,169 +0,0 @@ - -
-
- -
    -
  • - -
    - -
  • -
  • - -
  • - -
  • - ••• -
  • - -
-
-
- - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/options/block-controls.php b/wp/wp-content/plugins/wordfence/views/options/block-controls.php deleted file mode 100644 index da255e75..00000000 --- a/wp/wp-content/plugins/wordfence/views/options/block-controls.php +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/options/option-label.php b/wp/wp-content/plugins/wordfence/views/options/option-label.php deleted file mode 100644 index dc54d268..00000000 --- a/wp/wp-content/plugins/wordfence/views/options/option-label.php +++ /dev/null @@ -1,37 +0,0 @@ - -
    - -
  • - -
  • -
      -
    • - -
        -
      • - - (' . esc_html__('opens in new tab', 'wordfence') . ')'; } ?> - -
      • -
      • -
      - -
    • -
    -
  • -
\ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/options/option-select.php b/wp/wp-content/plugins/wordfence/views/options/option-select.php deleted file mode 100644 index 3fa06b4e..00000000 --- a/wp/wp-content/plugins/wordfence/views/options/option-select.php +++ /dev/null @@ -1,32 +0,0 @@ - , 'label' => ), ...) - * @var string $selectValue The current value of $selectOptionName. - * @var string $title The title shown for the option. - * @var string $helpLink If defined, the link to the corresponding external help page. - * @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users. - */ - -$id = 'wf-option-' . preg_replace('/[^a-z0-9]/i', '-', $selectOptionName); -?> - \ No newline at end of file diff --git a/wp/wp-content/plugins/wordfence/views/options/option-switch.php b/wp/wp-content/plugins/wordfence/views/options/option-switch.php deleted file mode 100644 index d2deac27..00000000 --- a/wp/wp-content/plugins/wordfence/views/options/option-switch.php +++ /dev/null @@ -1,50 +0,0 @@ - , 'label' =>