This commit has been accessed 576 times via Git panel.
commit d3333332796cf4f47e48f2b7fae161d4830ab30d
tree ab6bc2297709db7a1ff83279fcd2170109ff1fa6
parent 756002a8f0c768257c75ae132fe53e77b487ce27
author Engels Antonio <engels@majcms.org> 1306064820 +0800
committer Engels Antonio <engels@majcms.org> 1306064820 +0800
Fix members-only entries leak in sitemap.php
diff --git a/sitemap.php b/sitemap.php
index d9063e6..52b9c48 100644
--- a/sitemap.php
+++ b/sitemap.php
@@ -20,6 +20,14 @@ if ($dh_sitemap_items = opendir($dir)) {
continue;
}
+ if (file_exists("data/items/$entry_sitemap_items/private.txt")) {
+ continue;
+ }
+
+ if (file_exists("data/items/$entry_sitemap_items/member.txt")) {
+ continue;
+ }
+
$private = "0";
if (file_exists("data/items/$entry_sitemap_items/categories")) {
@@ -43,7 +51,7 @@ if ($dh_sitemap_items = opendir($dir)) {
continue;
}
- if ($entry_sitemap_items != "." && $entry_sitemap_items != ".." && fnmatch("*", $entry_sitemap_items) && !file_exists("data/items/$entry_sitemap_items/private.txt")) {
+ if ($entry_sitemap_items != "." && $entry_sitemap_items != "..") {
$show_sitemap_items[] = $entry_sitemap_items;
}
}
tree ab6bc2297709db7a1ff83279fcd2170109ff1fa6
parent 756002a8f0c768257c75ae132fe53e77b487ce27
author Engels Antonio <engels@majcms.org> 1306064820 +0800
committer Engels Antonio <engels@majcms.org> 1306064820 +0800
Fix members-only entries leak in sitemap.php
diff --git a/sitemap.php b/sitemap.php
index d9063e6..52b9c48 100644
--- a/sitemap.php
+++ b/sitemap.php
@@ -20,6 +20,14 @@ if ($dh_sitemap_items = opendir($dir)) {
continue;
}
+ if (file_exists("data/items/$entry_sitemap_items/private.txt")) {
+ continue;
+ }
+
+ if (file_exists("data/items/$entry_sitemap_items/member.txt")) {
+ continue;
+ }
+
$private = "0";
if (file_exists("data/items/$entry_sitemap_items/categories")) {
@@ -43,7 +51,7 @@ if ($dh_sitemap_items = opendir($dir)) {
continue;
}
- if ($entry_sitemap_items != "." && $entry_sitemap_items != ".." && fnmatch("*", $entry_sitemap_items) && !file_exists("data/items/$entry_sitemap_items/private.txt")) {
+ if ($entry_sitemap_items != "." && $entry_sitemap_items != "..") {
$show_sitemap_items[] = $entry_sitemap_items;
}
}