From 15fadc336d0d511bd4faac6f1031985070d9a12d Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 10 Jan 2009 14:54:49 +0100 Subject: [PATCH] Do not allow include statements in sites --- apache2-vhost-update | 8 ++++++++ debian/changelog | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/apache2-vhost-update b/apache2-vhost-update index 61c5bf3..a61369e 100755 --- a/apache2-vhost-update +++ b/apache2-vhost-update @@ -112,8 +112,16 @@ if [ "$?" != "0" ]; then echo "Could not get a lock/checkout $DESTINATION/$site." >&2 exit 1 fi + cp -f "$STATINGDIR/$site" "$DESTINATION/$site" +if grep -i include "$DESTINATION/$site" > /dev/null; then + echo "New site may have include statements - rejecting." >&2 + rm -f "$DESTINATION/$site" + co "$DESTINATION/$site" + exit 1 +fi + /usr/sbin/apache2ctl configtest if [ "$?" != "0" ]; then echo "configtest returned errors; reverting." >&2 diff --git a/debian/changelog b/debian/changelog index 1afa4c8..03fe383 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debian.org (10) stable; urgency=low + + * Do not allow include statements. + + -- Peter Palfrader Sat, 10 Jan 2009 14:54:34 +0100 + debian.org (9) stable; urgency=low * Make restart-apache way more powerful. -- 2.30.2