edit/head: check original file request for writability
[minimedit.git] / edit / head.inc.php
index 5c056a7c620077b15c541d9a55d5f60645bbd701..a12c54be218713d6140adc52d1ecdb3f1254d8f8 100644 (file)
@@ -1,4 +1,8 @@
 <?php
+if (file_exists($Page->file) and !is_writable($Page->file)) {
+       return;
+}
+
 if (!isset($Page->raw)) {
        # open bottom template as initial contents
        $template = 'template.inc.html';