summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Nelson <unixabg@gmail.com>2013-03-25 16:43:18 -0500
committerDaniel Baumann <daniel@debian.org>2013-04-09 05:54:28 +0200
commita979cdf16353c0fe10b6a99c39206e6595c9fefa (patch)
treeafbd0666fc928220b101dc836d155e9a26fd8bcd
parentb37b97b5b61e54d1a376da96004fcf16d2072207 (diff)
downloadvyos-live-build-a979cdf16353c0fe10b6a99c39206e6595c9fefa.tar.gz
vyos-live-build-a979cdf16353c0fe10b6a99c39206e6595c9fefa.zip
Converting l-b-cgi frontend to process forms with post.
-rwxr-xr-xfrontends/cgi/live-build-cgi13
-rw-r--r--templates/cgi/debian/form.html2
2 files changed, 9 insertions, 6 deletions
diff --git a/frontends/cgi/live-build-cgi b/frontends/cgi/live-build-cgi
index ebf55411d..69f839ba5 100755
--- a/frontends/cgi/live-build-cgi
+++ b/frontends/cgi/live-build-cgi
@@ -32,6 +32,14 @@ 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
@@ -52,11 +60,6 @@ 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)
diff --git a/templates/cgi/debian/form.html b/templates/cgi/debian/form.html
index 45f981982..b79816205 100644
--- a/templates/cgi/debian/form.html
+++ b/templates/cgi/debian/form.html
@@ -1,7 +1,7 @@
<h3>Submit your parameters (<b>working</b> email address is required) to generate your very own Debian Live system.</h3>
-<form action="live-build" method="get">
+<form action="live-build" method="post">
<fieldset>