chiark / gitweb /
Do not allow include statements in sites
authorPeter Palfrader <peter@palfrader.org>
Sat, 10 Jan 2009 13:54:49 +0000 (14:54 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sat, 10 Jan 2009 13:54:49 +0000 (14:54 +0100)
apache2-vhost-update
debian/changelog

index 61c5bf3..a61369e 100755 (executable)
@@ -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
index 1afa4c8..03fe383 100644 (file)
@@ -1,3 +1,9 @@
+debian.org (10) stable; urgency=low
+
+  * Do not allow include statements.
+
+ -- Peter Palfrader <weasel@debian.org>  Sat, 10 Jan 2009 14:54:34 +0100
+
 debian.org (9) stable; urgency=low
 
   * Make restart-apache way more powerful.