[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Drop leading + before POSTing to Teles
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Drop leading + before POSTing to Telesign. |
Date: |
Sun, 10 Dec 2023 17:20:34 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new da2aa56e Drop leading + before POSTing to Telesign.
da2aa56e is described below
commit da2aa56eaf8ad545746eb7c8520b665980127523
Author: MS <ms@taler.net>
AuthorDate: Sun Dec 10 17:20:00 2023 +0100
Drop leading + before POSTing to Telesign.
---
contrib/libeufin-tan-sms.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/libeufin-tan-sms.sh b/contrib/libeufin-tan-sms.sh
index c4f489fa..ae33bad3 100755
--- a/contrib/libeufin-tan-sms.sh
+++ b/contrib/libeufin-tan-sms.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
# This file is in the public domain.
set -eu
@@ -8,13 +9,13 @@ set -eu
MESSAGE=`cat -`
TMPFILE=`mktemp /tmp/sms-loggingXXXXXX`
-
+PHONE_NUMBER=$(echo $1 | sed 's/^+//') # Telesign refuses the leading +
STATUS=$(curl --request POST \
--user "$CUSTOMER_ID:$API_KEY" \
--url https://rest-api.telesign.com/v1/messaging \
--data "message_type=OTP" \
--data "message=$MESSAGE" \
- --data "phone_number=$1" \
+ --data "phone_number=$PHONE_NUMBER" \
-w "%{http_code}" -s -o $TMPFILE)
echo `cat $TMPFILE` >> $HOME/sms.log
rm -f $TMPFILE
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Drop leading + before POSTing to Telesign.,
gnunet <=