isGoLink)) { header('Location: /404.php'); exit; } $t_url = $_GET['target']; // 判断取值是否加密 if ($t_url === base64_encode(base64_decode($t_url))) { $t_url = base64_decode($t_url); } // 防止 XSS $t_url = htmlspecialchars($t_url, ENT_QUOTES, 'UTF-8'); // 对取值进行网址校验和判断 $allowed_protocols = array('http', 'https', 'thunder', 'qqdl', 'ed2k', 'Flashget', 'qbrowser'); $pattern = '/^(' . implode('|', $allowed_protocols) . '):\/\//i'; if (preg_match($pattern, $t_url, $matches)) { $url = $t_url; } elseif (preg_match('/\./i', $t_url)) { $url = 'http://' . $t_url; } else { header('Location: /404.php'); exit; } // 替换 & 为 & $url = str_replace('&', '&', $url); // 设置页面标题 $title = $options->title . ' - 安全中心'; ?>
isCSP): ?> favicon): ?>