# You should have received a copy of the GNU Affero General Public License
# along with Serve0. If not, see <http://www.gnu.org/licenses/>.
-ACTION="$(echo "$_GET[\"action\"]" |egrep '^[a-zA-Z0-9_-]+$')"
+ACTION="$(printf %s "${_GET[action]}" |egrep '^[a-zA-Z0-9_-]+$')"
ACTION="${_EXEC}/actions/${ACTION}.sh"
if [ -x "$ACTION" ]; then
. $ACTION
else
debug "unable to execute $ACTION"
- echo -n "Location: ?p=error\n\n"
+ printf "Location: ?p=error\n\n"
fi