From: paul Date: Wed, 18 Mar 2015 16:05:26 +0000 (+0000) Subject: cleared HTTP syntax in Location forward X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=73af685d5cc48a33b6e1bd8b39c6fe725b83eff3;p=busy cleared HTTP syntax in Location forward svn path=/trunk/; revision=61 --- diff --git a/actions/introedit.sh b/actions/introedit.sh index 5f987fd..d629a16 100755 --- a/actions/introedit.sh +++ b/actions/introedit.sh @@ -34,7 +34,7 @@ case "$info" in || info='' esac -[ -n "$info" ] || echo -n "Location: //${HTTP_HOST}/?p=Error&i=noaccess\n\n" +[ -n "$info" ] || echo -n "Location: ?p=Error&i=noaccess\n\n" [ -n "$info" ] || exit 0 cgi_post diff --git a/actions/lock.sh b/actions/lock.sh index dadfd1f..ea27764 100755 --- a/actions/lock.sh +++ b/actions/lock.sh @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Busy. If not, see . -$ACL_WIKIEDIT || echo "Location: //${HTTP_HOST}/?p=Error&i=noaccess\n\n" +$ACL_WIKIEDIT || echo "Location: ?p=Error&i=noaccess\n\n" $ACL_WIKIEDIT || exit 0 page="$(echo -E "$_GET[\"p\"]" |egrep -Ex 'Wiki')" @@ -23,9 +23,9 @@ edit="$(echo -E "$_GET[\"e\"]" |egrep -Ex '[0-9]{10}_[0-9]{3}(_[0-9]{1,4})?')" case "$page" in Wiki) [ -f "$_DATA/Wiki/${edit}" ] && echo "${USER}:$(($(date +%s)+600))" >"$_DATA/Wiki/${edit}.lock" - echo -n "Location: //${HTTP_HOST}/?p=Wiki&e=$edit\n\n" + echo -n "Location: ?p=Wiki&e=$edit\n\n" ;; - *) echo -n "Location: //${HTTP_HOST}/?p=Error&r=input&$page\n\n" + *) echo -n "Location: ?p=Error&r=input&$page\n\n" exit 0 ;; esac diff --git a/actions/projectmeta.sh b/actions/projectmeta.sh index ac7e454..9ee642f 100755 --- a/actions/projectmeta.sh +++ b/actions/projectmeta.sh @@ -18,7 +18,7 @@ metafile="$_DATA/project.meta" -$ACL_ADMIN || echo "Location: //${HTTP_HOST}/?p=Error&i=noaccess\n\n" +$ACL_ADMIN || echo "Location: ?p=Error&i=noaccess\n\n" $ACL_ADMIN || exit 0 cgi_post diff --git a/actions/taskmeta.sh b/actions/taskmeta.sh index 0b2544d..cd4e900 100755 --- a/actions/taskmeta.sh +++ b/actions/taskmeta.sh @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Busy. If not, see . -$ACL_CREATETASK || echo "Location: //${HTTP_HOST}/?p=Error&i=noaccess\n\n" +$ACL_CREATETASK || echo "Location: ?p=Error&i=noaccess\n\n" $ACL_CREATETASK || exit 0 info="$_GET[\"i\"]" @@ -40,14 +40,14 @@ if [ -z "$cancel" -a -n "$comment" ]; then touch "$_DATA/Tasks/$info" echo -e "author=${USER}" > "$commfile" echo -e "${comment}" >> "$commfile" - echo -n "Location: //${HTTP_HOST}/?p=Tasks&i=$info\n\n" + echo -n "Location: ?p=Tasks&i=$info\n\n" elif [ -z "$cancel" -a -n "$description" ]; then touch "$_DATA/Tasks/$info" echo -e "headline=${headline}" > "$descfile" echo -e "status=${taskstatus}" >> "$descfile" echo -e "section=${section}" >> "$descfile" echo -e "${description}" >> "$_DATA/Tasks/$info" - echo -n "Location: //${HTTP_HOST}/?p=Tasks#$anchor\n\n" + echo -n "Location: ?p=Tasks#$anchor\n\n" elif [ -n "$cancel" ]; then - echo -n "Location: //${HTTP_HOST}/?p=Tasks#$anchor\n\n" + echo -n "Location: ?p=Tasks#$anchor\n\n" fi diff --git a/actions/wikiedit.sh b/actions/wikiedit.sh index 4c61409..12b9874 100755 --- a/actions/wikiedit.sh +++ b/actions/wikiedit.sh @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Busy. If not, see . -$ACL_WIKIEDIT || echo "Location: ${proto}://${HTTP_HOST}/?p=Error&i=noaccess\n\n" +$ACL_WIKIEDIT || echo "Location: ?p=Error&i=noaccess\n\n" $ACL_WIKIEDIT || exit 0 info="$(echo "$_GET[\"i\"]" |grep -Ex '[0-9]{10}_[0-9]{3}')" @@ -28,4 +28,4 @@ page="$_POST[\"page\"]" [ -z "$cancel" -a -f "$_DATA/Wiki/$info" ] && mv "$_DATA/Wiki/$info" "$_DATA/Wiki/$info.$(date +%s)" [ -z "$cancel" ] && echo -e "${page}" >"$_DATA/Wiki/$info" -echo -n "Location: //${HTTP_HOST}/?p=Wiki&i=$info\n\n" +echo -n "Location: ?p=Wiki&i=$info\n\n" diff --git a/actions/wikimeta.sh b/actions/wikimeta.sh index 74b8ac9..51236c9 100755 --- a/actions/wikimeta.sh +++ b/actions/wikimeta.sh @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Busy. If not, see . -$ACL_WIKIEDIT || echo "Location: //${HTTP_HOST}/?p=Error&i=noaccess\n\n" +$ACL_WIKIEDIT || echo "Location: ?p=Error&i=noaccess\n\n" $ACL_WIKIEDIT || exit 0 info="$(egrep -o '(^|&)i=[0-9]{10}_[0-9]{3}(&|$)' <<<"${QUERY_STRING}" |tr -d '&i=')" @@ -38,12 +38,12 @@ if [ -z "$cancel" -a -n "$comment" ]; then touch "$_DATA/Wiki/$info" echo -e "author=${USER}" > "$commfile" echo -e "${comment}" >> "$commfile" - echo -n "Location: //${HTTP_HOST}/?p=Wiki&i=$info\n\n" + echo -n "Location: ?p=Wiki&i=$info\n\n" elif [ -z "$cancel" -a -n "$description" ]; then touch "$_DATA/Wiki/$info" echo -e "title=${title}" > "$descfile" echo -e "description=${description}" >> "$descfile" - echo -n "Location: //${HTTP_HOST}/?p=Wiki#$anchor\n\n" + echo -n "Location: ?p=Wiki#$anchor\n\n" elif [ -n "$cancel" ]; then - echo -n "Location: //${HTTP_HOST}/?p=Wiki#$anchor\n\n" + echo -n "Location: ?p=Wiki#$anchor\n\n" fi