From 319852dc8cf167d8baeb0848b4998e86a02aa2d0 Mon Sep 17 00:00:00 2001 From: Lukas Schauer Date: Sat, 17 Sep 2016 13:15:15 +0200 Subject: [PATCH] strip leading null-bytes from urlbase64 (fixes #275) --- dehydrated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dehydrated b/dehydrated index 63e3fc3..4d34b93 100755 --- a/dehydrated +++ b/dehydrated @@ -289,7 +289,7 @@ clean_json() { # Encode data as url-safe formatted base64 urlbase64() { # urlbase64: base64 encoded string with '+' replaced with '-' and '/' replaced with '_' - openssl base64 -e | tr -d '\n\r' | _sed -e 's:=*$::g' -e 'y:+/:-_:' + _sed 's/^\x0+//g' | openssl base64 -e | tr -d '\n\r' | _sed -e 's:=*$::g' -e 'y:+/:-_:' } # Convert hex string to binary data -- 2.39.5