From b2a5d4bdd4531f4062eadd63b5f065d4588c7f20 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 20 Dec 2020 01:58:13 +0100 Subject: [PATCH] edit/head: check original file request for writability --- edit/head.inc.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/edit/head.inc.php b/edit/head.inc.php index 9759ec8..a12c54b 100644 --- a/edit/head.inc.php +++ b/edit/head.inc.php @@ -1,4 +1,8 @@ file) and !is_writable($Page->file)) { + return; +} + if (!isset($Page->raw)) { # open bottom template as initial contents $template = 'template.inc.html'; @@ -11,19 +15,6 @@ if (!isset($Page->raw)) { $Page->body = NULL; } -$editpage = $Page->link; -if (is_dir($editpage)) { - if (file_exists("$editpage/index.html")) { - $editpage .= '/index.html'; - } -} -else { - $editpage .= '.html'; -} -if (file_exists($editpage) and !is_writable($editpage)) { - return; -} - if (isset($Page->raw)) { # restore meta tags in static contents for editing foreach (array_reverse($Page->meta) as $metaprop => $val) { -- 2.30.0