diff options
| author | 2018-10-28 09:49:10 +0100 | |
|---|---|---|
| committer | 2018-10-28 09:49:10 +0100 | |
| commit | e04804d0f67dd43fd3f072b9a127768ee7b7b56c (patch) | |
| tree | a49023ed25aab7fb1c1aafe749f7d462de0027b2 /lib | |
| parent | 44bd07e506ade204151c276fdc05994d51efdd7a (diff) | |
| parent | 4234dfe0d72b61fe931d2c76a1d8a335ce65a209 (diff) | |
Merge pull request #2049 from FreshRSS/dev1.12.0
FreshRSS 1.12.0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Minz/Request.php | 2 | ||||
| -rw-r--r-- | lib/lib_rss.php | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index e21697e42..24e30546f 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -129,6 +129,8 @@ class Minz_Request { if (!empty($_SERVER['HTTP_X_FORWARDED_PORT'])) { $port = intval($_SERVER['HTTP_X_FORWARDED_PORT']); + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + $port = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https' ? 443 : 80; } elseif (!empty($_SERVER['SERVER_PORT'])) { $port = intval($_SERVER['SERVER_PORT']); } else { diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 44123b746..4087f6faf 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -125,9 +125,8 @@ function server_is_public($address) { )); if ($is_public) { - $ip = gethostbyname($host); - $is_public &= !preg_match('/^(10|127|172[.]16|192[.]168)[.]/', $ip); - $is_public &= !preg_match('/^(\[)?(::1$|fc00::|fe80::)/i', $ip); + $is_public &= !preg_match('/^(10|127|172[.]16|192[.]168)[.]/', $host); + $is_public &= !preg_match('/^(\[)?(::1$|fc00::|fe80::)/i', $host); } return (bool)$is_public; @@ -450,6 +449,9 @@ function check_install_database() { 'categories' => false, 'feeds' => false, 'entries' => false, + 'entrytmp' => false, + 'tag' => false, + 'entrytag' => false, ); try { @@ -459,6 +461,9 @@ function check_install_database() { $status['categories'] = $dbDAO->categoryIsCorrect(); $status['feeds'] = $dbDAO->feedIsCorrect(); $status['entries'] = $dbDAO->entryIsCorrect(); + $status['entrytmp'] = $dbDAO->entrytmpIsCorrect(); + $status['tag'] = $dbDAO->tagIsCorrect(); + $status['entrytag'] = $dbDAO->entrytagIsCorrect(); } catch(Minz_PDOConnectionException $e) { $status['connection'] = false; } |
