mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 04:28:17 +01:00
修正判断不完全的问题
This commit is contained in:
parent
9a3949247d
commit
3041d50461
@ -67,7 +67,10 @@ if (!empty($_GET) || !empty($_POST)) {
|
||||
}
|
||||
|
||||
$parts = parse_url($_SERVER['HTTP_REFERER']);
|
||||
if($parts['port'] != 80) $parts['host'] = "{$parts['host']}:{$parts['port']}";
|
||||
if (!empty($parts['port']) && $parts['port'] != 80) {
|
||||
$parts['host'] = "{$parts['host']}:{$parts['port']}";
|
||||
}
|
||||
|
||||
if (empty($parts['host']) || $_SERVER['HTTP_HOST'] != $parts['host']) {
|
||||
exit;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user