mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-05-19 21:36:56 +02:00
strip leading null-bytes from urlbase64 (fixes #275)
This commit is contained in:
+1
-1
@@ -289,7 +289,7 @@ clean_json() {
|
|||||||
# Encode data as url-safe formatted base64
|
# Encode data as url-safe formatted base64
|
||||||
urlbase64() {
|
urlbase64() {
|
||||||
# urlbase64: base64 encoded string with '+' replaced with '-' and '/' replaced with '_'
|
# 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
|
# Convert hex string to binary data
|
||||||
|
|||||||
Reference in New Issue
Block a user