/** * Check whether the current WordPress version must be reported to the API * service or not, this is to avoid duplicated information in the audit logs. * * @return boolean TRUE if the current WordPress version must be reported, FALSE otherwise. */ private static function report_site_version() { $option_name = ':site_version'; $reported_version = SucuriScanOption::get_option($option_name); $wp_version = self::site_version(); if ($reported_version != $wp_version) { SucuriScanEvent::report_info_event('WordPress version detected ' . $wp_version); SucuriScanOption::update_option($option_name, $wp_version); return true; } return false; }
public static function timeoutPage($nonce) { $params = array(); // Update the SiteCheck timeout. if ($nonce) { $timeout = (int) SucuriScanRequest::post(':sitecheck_timeout', '[0-9]+'); if ($timeout > 0) { if ($timeout <= SUCURISCAN_MAX_SITECHECK_TIMEOUT) { $message = 'SiteCheck timeout set to <code>' . $timeout . '</code> seconds.'; SucuriScanOption::update_option(':sitecheck_timeout', $timeout); SucuriScanEvent::report_info_event($message); SucuriScanEvent::notify_event('plugin_change', $message); SucuriScanInterface::info($message); } else { SucuriScanInterface::error('SiteCheck timeout in seconds is too high.'); } } } $params['MaxRequestTimeout'] = SUCURISCAN_MAX_SITECHECK_TIMEOUT; $params['RequestTimeout'] = SucuriScanOption::get_option(':sitecheck_timeout') . ' seconds'; return SucuriScanTemplate::getSection('settings-sitecheck-timeout', $params); }