diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2013-05-06 14:48:46 +0200 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2013-05-06 14:48:46 +0200 |
commit | d1047e809a90daa0e88329efc0db21931be0b919 (patch) | |
tree | 5dc92aaaeb4d15dcad4796935b90a9675be93ad5 /frontends/cgi/live-build-cgi | |
parent | 160d6bade79bf58a1c0d1842dc9b55ec178ec303 (diff) | |
download | vyos-live-build-d1047e809a90daa0e88329efc0db21931be0b919.tar.gz vyos-live-build-d1047e809a90daa0e88329efc0db21931be0b919.zip |
Adding debian version 4.0~a1-1.debian/4.0_a1-1
Diffstat (limited to 'frontends/cgi/live-build-cgi')
-rwxr-xr-x | frontends/cgi/live-build-cgi | 22 |
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) |