aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Request.php2
-rw-r--r--lib/lib_rss.php11
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;
}