From 618117fd1a97ad4550b3316a980e2ffcca4e409c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 25 Nov 2021 00:58:19 +0100 Subject: [PATCH] source: subdirectory index for tools/ --- source.plp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source.plp b/source.plp index 9c18320..358bf84 100644 --- a/source.plp +++ b/source.plp @@ -43,13 +43,18 @@ Html({ say ''; -if (not $source) { - print "

Source files

"; +if (not $source or -d $source) { + PLP_START { + print "

Source files

"; + }; + + if ($source and $source ne 'tools') { + Abort("Directory index not permitted", '403 source not allowed'); + } print "

Project code distributed under the AGPL. Please contribute back.

"; say '\n"; -- 2.30.0