-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: uritools
action: commit
revision:
path_from:
revision_from: 47eb00790cfe9badb8f08d4f3e7e3241f1f1649f:
path_to:
revision_to:

git.thebackupbox.net

uritools

git://git.thebackupbox.net/uritools

commit 47eb00790cfe9badb8f08d4f3e7e3241f1f1649f
Author: epochqwert <epoch@hacking.allowed.org>
Date:   Thu Apr 12 10:48:08 2018 +0000

    better format string cutting in printfurl and start now single-quote escapes the url before sending it to printf url

diff --git a/printfurl b/printfurl

index 91fd38871d74bb6e792869b02261abe369fd587a..

index ..c141bc187d394e156561ce39f221131c7939e3c6 100755

--- a/printfurl
+++ b/printfurl
@@ -1,5 +1,5 @@
 #!/bin/sh
-cutargs="$(printf "%s\n" "$1" | tr '%' '\n' | tail -n+2 | grep '^[sukdPpqfU]' | sed 's/^\(.\).*/-\1/g')"
+cutargs="$(printf "%s\n" "$1" | sed 's/%[^sukdPpqfU]//g' | tr '%' '\n' | tail -n+2 | sed 's/^\(.\).*/-\1/g' | tr '\n' ' ')"
 count="$(echo $cutargs | tr '-' '\n' | grep -c .)"
 printfargs="$(printf "%s\n" "$1" | sed 's/%[sukdPpqfU]/%s/g')"
 cuturl "$cutargs" | tr '\n' '\0' | xargs -n $count -0 printf "$printfargs"
diff --git a/start b/start

index 873f792cca46b315baf8bf5dba0aa1e0e4cba800..

index ..9a3dca6d73bd103418db6840c472f62275e593cb 100755

--- a/start
+++ b/start
@@ -1,4 +1,4 @@
 #!/bin/sh
 scheme="$(printf "%s\n" "$1" | cuturl -s)"
 line="$(grep "^${scheme}:" ~/.config/start.conf | cut -d: -f2-)"
-eval "$(printf "%s\n" "$1" | printfurl "$line" )"
+eval "$(printf "%s\n" "$1" | sed 's/'\''/'\''\\'\'''\''/g' | printfurl "$line")"

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 18:44:41 2024