logo

sshpaste

Simple paste script to a server having SSH+HTTP daemons
commit: a0252ea7b999124f0d44537a0a22cd1e62b15f2c
parent: 81c638e5bfb648a2e050031d1c43e0c6a093760d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 11 May 2018 01:40:02 +0200

sshpaste: Fix quoting

Diffstat:

MChangelog.md1+
Msshpaste2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Changelog.md b/Changelog.md @@ -1,5 +1,6 @@ ## HEAD * Compatibility with OpenBSD’s mktemp +* Fix quoting, it should now work in shells other than mksh ## 1.0.0 — 2018-05-10 04:14 * Read from stdin when ``-`` is given diff --git a/sshpaste b/sshpaste @@ -28,7 +28,7 @@ sshpaste_file() { file -i "$1" 2>&1 >/dev/null | grep 'text/' && target_name="${target_name}.txt" - if scp -q "$1" "${target_ssh}-${target_name@Q}" + if scp -q "$1" "${target_ssh}-'${target_name}'" then echo "${target_www}-${target_name}" else die "Failed uploading $1" fi