From b51c00dd185a9003c20f406aeb4f216937f99311 Mon Sep 17 00:00:00 2001 From: umorigu Date: Thu, 16 Feb 2017 22:58:43 +0900 Subject: [PATCH] BugTrack/598 List only readable pages as template --- lib/html.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/html.php b/lib/html.php index 912747e..33b43bd 100644 --- a/lib/html.php +++ b/lib/html.php @@ -2,7 +2,7 @@ // PukiWiki - Yet another WikiWikiWeb clone. // html.php // Copyright -// 2002-2016 PukiWiki Development Team +// 2002-2017 PukiWiki Development Team // 2001-2002 Originally written by yu-ji // License: GPL v2 or (at your option) any later version // @@ -232,7 +232,8 @@ function edit_form($page, $postdata, $digest = FALSE, $b_template = TRUE) } $page_names = array(); foreach(get_existpages() as $_page) { - if ($_page == $whatsnew || check_non_list($_page)) + if ($_page == $whatsnew || check_non_list($_page) || + !is_page_readable($_page)) continue; if (preg_match('/template/i', $_page)) { $tpage_names[] = $_page; -- 2.11.0