goto glZa3;
MiWcT: function wsug_normalize_domain($domain) {
$domain = strtolower(trim($domain));
$domain = preg_replace("#^https?://#", '', $domain);
$domain = rtrim($domain, "/");
if (strpos($domain, "www.") === 0) {
$domain = substr($domain, 4);
}
return $domain;
}
goto Hm18B;
glZa3: defined("ABSPATH") || die;
goto MiWcT;
Hm18B: function wsug_is_license_valid() {
$opt = get_option(WSUG_OPTION);
if (empty($opt["license"])) {
return false;
}
$decoded = wsug_decrypt(trim($opt["license"]));
if (!$decoded || strpos($decoded, "|") === false) {
return false;
}
list($hash, $host) = explode("|", $decoded, 2);
$licensed = wsug_normalize_domain($host);
$current = wsug_normalize_domain($_SERVER["HTTP_HOST"]);
if ($current !== $licensed) {
return false;
}
$expected = md5($licensed . WSUG_SECRET);
return hash_equals($expected, $hash);
}
© 2023 Quttera Ltd. All rights reserved.