]> git.plutz.net Git - busy/blobdiff - actions/projectmeta.sh
upgraded to fit new shcgi revision, slightly better input validation, switched to...
[busy] / actions / projectmeta.sh
index 9ee642f3f34a1c5e592d53ce95fac77a72a90582..1375e6c371e80cfa2ceb49856749b1e7260c438b 100755 (executable)
@@ -23,26 +23,26 @@ $ACL_ADMIN || exit 0
 
 cgi_post
 
-[ "$_POST[\"btcAdGamble\"]"  = yes -a "$_POST[\"btcAdErotic\"]" = yes ] && btcAdContent=1
-[ "$_POST[\"btcAdGamble\"]" != yes -a "$_POST[\"btcAdErotic\"]" = yes ] && btcAdContent=2
-[ "$_POST[\"btcAdGamble\"]"  = yes -a "$_POST[\"btcAdErotic\"]" != yes ] && btcAdContent=3
-[ "$_POST[\"btcAdGamble\"]" != yes -a "$_POST[\"btcAdErotic\"]" != yes ] && btcAdContent=4
+[ "${_POST[btcAdGamble]}"  = yes -a "${_POST[btcAdErotic]}" = yes ] && btcAdContent=1
+[ "${_POST[btcAdGamble]}" != yes -a "${_POST[btcAdErotic]}" = yes ] && btcAdContent=2
+[ "${_POST[btcAdGamble]}"  = yes -a "${_POST[btcAdErotic]}" != yes ] && btcAdContent=3
+[ "${_POST[btcAdGamble]}" != yes -a "${_POST[btcAdErotic]}" != yes ] && btcAdContent=4
 
 echo -E "\
-name=$_POST[\"appName\"]
-slogan=$_POST[\"appSlogan\"]
-repoType=$(echo -E "$_POST[\"repoType\"]" |grep -Ex 'svn|git')
-svnRepo=$_POST[\"svnRepo\"]
-gitRepo=$_POST[\"gitRepo\"]
-useFlattr=$(echo -E "$_POST[\"useFlattr\"]" |grep -Ex 'yes')
-flattrThingURL=$_POST[\"flattrThingURL\"]
-usePaypal=$(echo -E "$_POST[\"usePaypal\"]" |grep -Ex 'yes')
-paypalAddress=$_POST[\"paypalAddress\"]
-useBitcoin=$(echo -E "$_POST[\"useBitcoin\"]" |grep -Ex 'yes')
-btcAddress=$_POST[\"btcAddress\"]
-advertise=$(echo -E "$_POST[\"advertise\"]" |grep -Ex 'btcAd|no')
-btcAdAddress=$_POST[\"btcAdAddress\"]
-btcAdContent=$btcAdContent
+name="${_POST[appName]}"
+slogan="${_POST[appSlogan]}"
+repoType=$(printf %s\\n "$_POST[\"repoType\"]" |grep -Ex 'svn|git')
+svnRepo="${_POST[svnRepo]}"
+gitRepo="${_POST[gitRepo]}"
+useFlattr="$(printf %s\\n "${_POST[useFlattr]}" |grep -Ex 'yes')"
+flattrThingURL="${_POST[flattrThingURL]}"
+usePaypal="$(printf %s\\n "${_POST[usePaypal]}" |grep -Ex 'yes')"
+paypalAddress="${_POST[paypalAddress]}"
+useBitcoin="$(printf %s\\n "${_POST[useBitcoin]}" |grep -Ex 'yes')"
+btcAddress="${_POST[btcAddress]}"
+advertise="$(printf %s\\n "${_POST[advertise]}" |grep -Ex 'btcAd|no')"
+btcAdAddress="${_POST[btcAdAddress]}"
+btcAdContent="$btcAdContent"
 " >"$metafile"
 
 echo -n "Location: ${HTTP_REFERER}\n\n"