]> git.plutz.net Git - busy/blobdiff - actions/lock.sh
upgraded to fit new shcgi revision, slightly better input validation, switched to...
[busy] / actions / lock.sh
index ea27764ad17226516fd066d6988fa5753b1b3559..e66f29cc100b44b31d67ad0fba459259443d3be5 100755 (executable)
@@ -18,8 +18,8 @@
 $ACL_WIKIEDIT || echo "Location: ?p=Error&i=noaccess\n\n"
 $ACL_WIKIEDIT || exit 0 
 
-page="$(echo -E "$_GET[\"p\"]" |egrep -Ex 'Wiki')"
-edit="$(echo -E "$_GET[\"e\"]" |egrep -Ex '[0-9]{10}_[0-9]{3}(_[0-9]{1,4})?')"
+page="$(printf %s\\n "${_GET[p]}" |egrep -Ex 'Wiki')"
+edit="$(printf %s\\n "${_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"