From e6c659bfdef46ce64bc0c1dbc901b4ed983ffa7b Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 14 Sep 2017 17:45:48 +0200 Subject: [PATCH] edit: allow any non-hidden filename --- edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit.php b/edit.php index f0d001e..3b280ee 100644 --- a/edit.php +++ b/edit.php @@ -16,7 +16,7 @@ if (!isset($_SERVER['PATH_INFO']) or strlen($_SERVER['PATH_INFO']) <= 1) abort('409 input error', "geen bestand aangeleverd"); $filename = ltrim($Args, '/').'.html'; -if (!preg_match('{^(?:[/a-z0-9-])+\.html$}', $filename)) +if (preg_match('{^\.}', $filename)) abort('403 input error', "ongeldige bestandsnaam: $filename"); if (file_exists($filename) and !is_writable($filename)) abort('403 input error', "onwijzigbaar bestand: $filename"); -- 2.30.0