summaryrefslogtreecommitdiff
path: root/frontends/cgi/live-build-cgi
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/cgi/live-build-cgi')
-rwxr-xr-xfrontends/cgi/live-build-cgi22
1 files changed, 10 insertions, 12 deletions
diff --git a/frontends/cgi/live-build-cgi b/frontends/cgi/live-build-cgi
index 69f839ba5..55ce08302 100755
--- a/frontends/cgi/live-build-cgi
+++ b/frontends/cgi/live-build-cgi
@@ -1,7 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
-## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
+## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
@@ -22,8 +22,8 @@ fi
_HOSTNAME="$(hostname -f)"
-# Turn on debug if true
-if [ "${_DEBUG}" = "true" ]
+# Turn on debug if enabled
+if [ "${_DEBUG}" = "enabled" ]
then
set -x
fi
@@ -32,14 +32,6 @@ fi
echo "Content-type: text/html"
echo
-#QUERY_STRING=`cat /dev/stdin`
-QUERY_STRING=$(cat /dev/stdin)
-# Translate parameters
-QUERY_STRING=$(echo "${QUERY_STRING}" | sed -e 's/%2F/\//g' -e 's/+/ /g' -e 's/%3B/;/g' -e 's/%7E/~/g' -e 's/%3A/:/g' -e 's/%40/@/g' -e 's/%3D/=/g' -e 's/%2B/+/g')
-# Debug the filtering string
-# echo ${QUERY_STRING}
-
-
# Sending html header
cat "${_TEMPLATES}"/header.html
@@ -60,6 +52,11 @@ else
# Converting '=': sed 's/%3D/=/g'
# Converting '+': sed 's/%2B/+/g'
+ # Translate parameters
+ QUERY_STRING=$(echo "${QUERY_STRING}" | sed -e 's/%2F/\//g' -e 's/+/ /g' -e 's/%3B/;/g' -e 's/%7E/~/g' -e 's/%3A/:/g' -e 's/%40/@/g' -e 's/%3D/=/g' -e 's/%2B/+/g')
+ # Debug the filtering string
+ # echo ${QUERY_STRING}
+
# Email
_EMAIL=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])email=[-0-9a-zA-Z._@]+' | cut -f 2 -d '=' | head -n1)
@@ -67,7 +64,8 @@ else
_LB_CGIPACKAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])cgipackages=[-0-9a-zA-Z. _+]+' | cut -f 2 -d '=' | head -n1)
# CGI Config for git
- _LB_CONFIG=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])config=[-a-z]+' | cut -f 2 -d '=' | head -n1)
+ _LB_CONFIG=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])config=[-a-z.]+' | cut -f 2 -d '=' | head -n1)
+ _LB_CONFIG="git://live.debian.net/git/${_LB_CONFIG}"
# Standard options
LB_BINARY_IMAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_images=[-a-z]+' | cut -f 2 -d '=' | head -n1)