From 56bf2669196996f2096f10a23969fee2f7febc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 26 Jun 2023 14:49:14 +0200 Subject: [PATCH] fix scn_send script with non-urlencoded data --- scnserver/website/scn_send.html | 18 +++++++++--------- scnserver/website/scn_send.sh.txt | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/scnserver/website/scn_send.html b/scnserver/website/scn_send.html index 628541b..97c348c 100644 --- a/scnserver/website/scn_send.html +++ b/scnserver/website/scn_send.html @@ -85,26 +85,26 @@ usage() { curlparams=() -curlparams+=( "--data" "user_id=${SCN_UID}" ) -curlparams+=( "--data" "key=${SCN_KEY}" ) -curlparams+=( "--data" "title=$title" ) -curlparams+=( "--data" "timestamp=$sendtime" ) -curlparams+=( "--data" "msg_id=$usr_msg_id" ) +curlparams+=( "--data-urlencode" "user_id=${SCN_UID}" ) +curlparams+=( "--data-urlencode" "key=${SCN_KEY}" ) +curlparams+=( "--data-urlencode" "title=$title" ) +curlparams+=( "--data-urlencode" "timestamp=$sendtime" ) +curlparams+=( "--data-urlencode" "msg_id=$usr_msg_id" ) if [[ -n "$content" ]]; then - curlparams+=("--data" "content=$content") + curlparams+=("--data-urlencode" "content=$content") fi if [[ -n "$priority" ]]; then - curlparams+=("--data" "priority=$priority") + curlparams+=("--data-urlencode" "priority=$priority") fi if [[ -n "$channel" ]]; then - curlparams+=("--data" "channel=$channel") + curlparams+=("--data-urlencode" "channel=$channel") fi if [[ -n "$sender" ]]; then - curlparams+=("--data" "sender_name=$sender") + curlparams+=("--data-urlencode" "sender_name=$sender") fi while true ; do diff --git a/scnserver/website/scn_send.sh.txt b/scnserver/website/scn_send.sh.txt index a818864..58897d3 100644 --- a/scnserver/website/scn_send.sh.txt +++ b/scnserver/website/scn_send.sh.txt @@ -85,26 +85,26 @@ fi curlparams=() -curlparams+=( "--data" "user_id=${SCN_UID}" ) -curlparams+=( "--data" "key=${SCN_KEY}" ) -curlparams+=( "--data" "title=$title" ) -curlparams+=( "--data" "timestamp=$sendtime" ) -curlparams+=( "--data" "msg_id=$usr_msg_id" ) +curlparams+=( "--data-urlencode" "user_id=${SCN_UID}" ) +curlparams+=( "--data-urlencode" "key=${SCN_KEY}" ) +curlparams+=( "--data-urlencode" "title=$title" ) +curlparams+=( "--data-urlencode" "timestamp=$sendtime" ) +curlparams+=( "--data-urlencode" "msg_id=$usr_msg_id" ) if [[ -n "$content" ]]; then - curlparams+=("--data" "content=$content") + curlparams+=("--data-urlencode" "content=$content") fi if [[ -n "$priority" ]]; then - curlparams+=("--data" "priority=$priority") + curlparams+=("--data-urlencode" "priority=$priority") fi if [[ -n "$channel" ]]; then - curlparams+=("--data" "channel=$channel") + curlparams+=("--data-urlencode" "channel=$channel") fi if [[ -n "$sender" ]]; then - curlparams+=("--data" "sender_name=$sender") + curlparams+=("--data-urlencode" "sender_name=$sender") fi while true ; do