From e9f626c36eeec12a448cbb49f22e2dbd8e2fcb1c Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 20 Apr 2022 10:11:38 +1200 Subject: [PATCH] Allowed for spaces in passwords more permissively + fixed space bug --- matrix-send | 6 +++--- matrix-send.conf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix-send b/matrix-send index 803e92f..7917dc9 100755 --- a/matrix-send +++ b/matrix-send @@ -36,8 +36,8 @@ Username () { } Password () { - [ -z $1 ] && conf_error "Password not specified in directive Password" - password="$1" + [ -z "$1" ] && conf_error "Password not specified in directive Password" + password="$*" } AccessToken () { @@ -111,7 +111,7 @@ fi # Run checks for essential directives [ -z $homeserver ] && conf_error "Homeserver directive is not present" [ -z $username ] && conf_error "Username directive is not present" -[ -z $password ] && conf_error "Password directive is not present" +[ -z "$password" ] && conf_error "Password directive is not present" ############## #### Main #### diff --git a/matrix-send.conf b/matrix-send.conf index 89cd43b..fce7e7e 100644 --- a/matrix-send.conf +++ b/matrix-send.conf @@ -13,5 +13,5 @@ Homeserver matrix-client.matrix.org Username john_doe # The Password directive is your password for your account. -# If your password has spaces, put speech marks ("") around it. +# Example with spaces: Password This is my super duper secure password. Password supersecretpassword