mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 04:28:17 +01:00
直接用parse_url会忽略端口,如果用户是非80端口会产生问题
This commit is contained in:
parent
a7bcb93d75
commit
cee9dbc41e
@ -67,6 +67,7 @@ if (!empty($_GET) || !empty($_POST)) {
|
||||
}
|
||||
|
||||
$parts = parse_url($_SERVER['HTTP_REFERER']);
|
||||
if($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